Data storage method, device, electronic device and storage medium

By identifying and processing the biperiodic pattern of object data, and migrating it to the high-speed storage layer before predicting the access time, it solves the problem of low data access speed caused by the inability to accurately identify the biperiodic pattern in the existing technology, and improves Data processing efficiency and storage system performance.

CN118363544BActive Publication Date: 2024-10-15HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410799670.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-15
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

When existing storage systems identify the access frequency patterns of object data, they cannot accurately identify data with bi-periodic patterns, causing data to migrate to low-speed tiers during non-working hours, affecting user access speeds and thus reducing processing efficiency.

Method used

By obtaining the object data access information within the historical access time period, determine whether the object data has a bi-periodic pattern, use the correspondence between the preset time interval and the set access time to convert the historical access time, and identify the periodic access pattern of the object data. And migrate the data to the storage layer with the highest access speed before the predicted access time.

Benefits of technology

It improves data access speed, improves data processing efficiency, reduces storage costs, and avoids waste of high-speed storage layer resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118363544B_ABST
    Figure CN118363544B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data storage method, device, electronic device and storage medium, which relates to the field of data storage technology. The method includes: obtaining object data access information within a historical access time period; determining the historical access time of the object data based on the object data access information to obtain a historical access time sequence; determining the set access time corresponding to the historical access time according to the correspondence between the preset time interval and the set access time to obtain a set access time sequence; determining whether the object data has a double periodicity law based on the set access time sequence corresponding to the object data, the double periodicity law is used to characterize that the object data has multiple cycles that are repeated alternately within the historical access time period, and the object data has a periodicity law in each cycle; in the case that the object data has a periodic access law, determining the predicted access time corresponding to the object data, and storing the object data in a high-speed storage layer before the predicted access time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data storage, and in particular to a data storage method, device, electronic device and storage medium. Background Art

[0002] A storage system is usually equipped with multiple storage layers, and different storage layers have different access speeds. In order to improve the processing efficiency of object data and reduce storage costs, the object data stored in the storage system is usually divided into cold and hot data, and the "cold data" is dynamically migrated to the low-speed, low-cost storage layer to reduce storage costs; and the "hot data" is moved to the high-speed storage layer for processing to improve data processing efficiency.

[0003] In the related technologies, the popularity of data is determined based on the frequency of data access. It is considered that the object data with a high access frequency is of high importance and needs to be stored in the high-speed storage layer for processing. Alternatively, it is determined whether there is periodic object data in the storage layer, that is, object data that is accessed once every certain period of time, and it can be placed in the high-speed storage layer for user access.

[0004] However, in actual applications, a large portion of object data may actually be accessed more frequently during the working hours of the day, which may show a periodic high-frequency access pattern, but may be accessed less frequently during non-working hours, which may not show the above periodic high-frequency access pattern. When the system identifies data with periodic access patterns, it may not recognize such data and can only store it in the low-speed layer. The access speed is slow when the user accesses it, and the data processing efficiency is low. Summary of the invention

[0005] The present application provides a data storage method, device, electronic device and storage medium for identifying whether data has a periodic access rule with a dual periodicity regularity, and storing object data in a storage layer with the highest access speed among multiple storage layers according to its corresponding periodic access rule, thereby improving data processing efficiency.

[0006] A first aspect of an embodiment of the present application provides a data storage method, including: obtaining object data access information within a historical access time period; for each object data in the object data access information, determining the historical access time of the object data based on the object data access information to obtain a historical access time sequence; determining the set access time corresponding to the time interval to which the historical access time in the historical access time sequence belongs according to the correspondence between the preset time interval and the set access time, and converting the historical access time into the set access time to obtain the set access time sequence; based on the set access time sequence corresponding to the object data, determining whether the object data has a periodic access pattern, the periodic access pattern including a dual periodic pattern, the dual periodic pattern being used to characterize that the object data has multiple cycles that are repeated alternately within the historical access time period, and the object data has a periodic pattern in each cycle; in the case that the object data has a periodic access pattern, determining the predicted access time corresponding to the object data based on the periodic access pattern corresponding to the object data, and storing the object data in a storage layer with the highest access speed among multiple storage layers before the predicted access time.

[0007] The data storage method provided in the embodiment of the present application determines whether any object data accessed within the historical access time period has a dual periodicity regularity by obtaining the object data access information within the historical access time period. Specifically, the historical access time of the object data is first determined based on the object data access information to obtain a historical access time series. It can be understood that even if the user accesses the object data with regularity, the time intervals between the historical access times may not be fixed due to differences in the reading speed of the storage system. Therefore, in order to avoid the inability to accurately determine the regularity of object data access due to small differences, it is necessary to determine the set access time corresponding to the time interval to which the historical access time in the historical access time series belongs according to the corresponding relationship between the preset time interval and the set access time, and convert the historical access time into the set access time to obtain the set access time series. In other words, the historical access time within a time interval is converted into a set access time to avoid the inability to accurately determine the regularity of object data access due to errors.

[0008] Furthermore, based on the set access time sequence corresponding to the object data, it can be determined whether the object data has a periodic access rule with a double periodicity rule, wherein the double periodicity rule is used to characterize that the object data has multiple cycles that are repeated alternately in the historical access time period, and the object data has a periodic rule in each cycle. In other words, the object data has two cycles that are repeated alternately, and in each cycle it is accessed at intervals. Therefore, according to the periodic access rule corresponding to the object data, the predicted access time corresponding to the object data can be determined, and before the predicted access time, the object data can be stored in the storage layer with the highest access speed among multiple storage layers, so that the reading speed is faster when it is accessed next time, thereby improving the speed of reading data.

[0009] In combination with the first implementation method of the first aspect, based on the set access time sequence corresponding to the object data, determining whether the object data has a periodic access pattern includes: subtracting the set access times in the set access time sequence corresponding to the object data in sequence to obtain a set difference sequence; subtracting the elements in the set difference sequence in sequence to obtain a secondary difference sequence; when there is a peak jump point in the secondary difference sequence of the object data, dividing the set difference sequence of the object data into multiple sub-set difference sequences with the peak jump point as a separation point; determining whether each sub-set difference sequence has a periodic pattern; when all sub-set difference sequences in the object data have a periodic pattern, determining whether all sub-set difference sequences satisfy an alternating repetition pattern; when all sub-set difference sequences of the object data satisfy the alternating repetition pattern, determining that the object data has a dual periodic pattern.

[0010] In combination with the second implementation method of the first aspect, determining whether each sub-setting difference sequence has a periodic pattern includes: subtracting the elements in the sub-setting difference sequence in order to obtain a secondary difference sequence corresponding to each sub-setting difference sequence; for any sub-setting difference sequence in the object data, when the number of consecutive 0 elements in the secondary difference sequence corresponding to the sub-setting difference sequence is greater than or equal to a first preset difference threshold, or when the absolute maximum value of all elements in the secondary difference sequence corresponding to the sub-setting difference sequence is less than or equal to a first preset relaxation threshold, it is determined that the sub-setting difference sequence has a periodic pattern.

[0011] In combination with the third implementation method of the first aspect, the periodic access rule also includes a periodic rule; based on the set access time sequence corresponding to the object data, determining whether the object data has a periodic access rule includes: subtracting the set access times in the set access time sequence corresponding to the object data in sequence to obtain a set difference sequence; subtracting the elements in the set difference sequence corresponding to the object data in sequence to obtain a secondary difference sequence; when the number of consecutive 0 elements in the secondary difference sequence of the object data is greater than or equal to a second preset difference threshold, or the absolute maximum value of all elements in the secondary difference sequence of the object data is less than or equal to a second preset relaxation threshold, it is determined that the object data has a periodic rule.

[0012] In combination with the fourth implementation method of the first aspect, after storing the object data in the storage layer with the highest access speed among multiple storage layers, the method also includes: if the object data is not accessed within a preset time period after the predicted access time, re-determining whether the object data has a periodic access pattern; if the object data is accessed within a preset time period after the predicted access time, determining the next predicted access time of the object data based on the periodic access pattern of the object data; determining the time interval between the next access time and the current time, and if the time interval is greater than the preset time interval, migrating the object data out of the storage layer with the highest access speed.

[0013] In combination with a fifth implementation manner of the first aspect, the method further includes: obtaining a data hot / cold range corresponding to each storage layer in a plurality of storage layers in a storage system; the data hot / cold range corresponding to a storage layer is positively correlated with an access speed of the storage layer; for target object data stored in the storage layer, determining a data hot / cold value of the target object data according to an access frequency, an access filter condition frequency, and an access data feature frequency; wherein the access frequency is used to characterize the number of accesses to the target object data within a preset time period; the access filter condition frequency is used to characterize the number of accesses to an object data list to which the target object data belongs within a preset time period; the object data list is obtained by filtering the object data stored in the storage system according to a preset filter condition; the access data feature frequency is used to characterize the number of times the similarity between feature information of the object data accessed by the user and feature information of the target object data within the preset time period is higher than a preset similarity threshold; in a case where the data hot / cold value of the target object data does not match the data hot / cold range of the storage layer to which the target object data belongs, determining that the target object data is the object data to be migrated, and determining a target storage layer whose data hot / cold range matches the data hot / cold value of the object data to be migrated; and migrating the object data to be migrated to the corresponding target storage layer.

[0014] In combination with a sixth implementation method of the first aspect, for object data stored in a storage layer, determining a data hot / cold value of the target object data according to an access frequency, an access filter condition frequency, and an access data feature frequency, including: determining, among the object data stored in the storage layer, object data that meets a preset condition to obtain the target object data; the preset condition includes at least one of the following: an access frequency of the object data within a preset time period is greater than a preset access frequency; unaccessed object data in an object data list whose number of object data accessed by a user within a preset time period exceeds a preset access number; unaccessed object data whose similarity to feature information of object data accessed by a user within a preset time period is higher than a preset similarity threshold for more than a preset feature number, and which is unaccessed; for target object data that meets the preset conditions, determining a data hot / cold value of the target object data according to the access frequency, the access filter condition frequency, and the access data feature frequency.

[0015] A second aspect of an embodiment of the present application provides a data storage device, including: an acquisition module, used to acquire object data access information within a historical access time period; a determination module, used to determine, for each object data in the object data access information, the historical access time of the object data based on the object data access information, and obtain a historical access time sequence; the determination module is also used to determine, based on the correspondence between the preset time interval and the set access time, the set access time corresponding to the time interval to which the historical access time in the historical access time sequence belongs, and convert the historical access time into the set access time to obtain the set access time sequence; the determination module is also used to determine, based on the set access time sequence corresponding to the object data, whether the object data has a periodic access pattern, the periodic access pattern including a dual periodic pattern, the dual periodic pattern being used to characterize that the object data has multiple cycles that are repeated alternately within the historical access time period, and the object data has a periodic pattern in each cycle; the determination module is also used to determine, if the object data has a periodic access pattern, the predicted access time corresponding to the object data based on the periodic access pattern corresponding to the object data, and before the predicted access time, store the object data in a storage layer with the highest access speed among multiple storage layers.

[0016] A third aspect of an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; wherein the one or more memories are used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the data storage method provided by the first aspect and its possible implementation methods.

[0017] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the data storage method provided by the first aspect and its possible implementation methods.

[0018] A fifth aspect of an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the data storage method provided by the first aspect and its possible implementation methods.

[0019] Among them, the beneficial effects described in the second to fifth aspects can refer to the beneficial effect analysis of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0021] Figure 1 A schematic diagram of the structure of a storage system provided in an embodiment of the present application;

[0022] Figure 2 A method flow of a data storage method provided in an embodiment of the present application Figure 1 ;

[0023] Figure 3 A method flow of a data storage method provided in an embodiment of the present application Figure 2 ;

[0024] Figure 4 A method flow of a data storage method provided in an embodiment of the present application Figure 3 ;

[0025] Figure 5 A method flow of a data storage method provided in an embodiment of the present application Figure 4 ;

[0026] Figure 6 A method flow of a data storage method provided in an embodiment of the present application Figure 5 ;

[0027] Figure 7 A method flow of a data storage method provided in an embodiment of the present application Figure 6 ;

[0028] Figure 8 A method flow of a data storage method provided in an embodiment of the present application Figure 7 ;

[0029] Fig. 9 A schematic diagram of the structure of a data storage device provided in an embodiment of the present application;

[0030] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0032] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0033] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, when describing a pipeline, the "connected" and "connection" used in this application have the meaning of conduction. The specific meaning needs to be understood in conjunction with the context.

[0034] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0035] A storage system is usually provided with multiple storage layers, and different storage layers have different access speeds. In order to improve the processing efficiency of object data and reduce storage costs, the object data stored in the storage system is usually stored in different storage layers according to the access frequency. The related art discloses identifying whether there is periodic object data in the storage layer, that is, object data that is accessed once every certain period of time. In order to facilitate fast access by users, it can be placed in a high-speed storage layer for user access.

[0036] However, in real scenarios, since the time when users use electronic devices is limited, users use electronic devices more frequently during working hours (such as 8:00~17:00), and thus the frequency of accessing object data is also high. In non-working hours (such as 18:00~7:00), users use electronic devices less frequently, and thus the frequency of accessing object data is also low. In other words, a large part of object data may actually show a periodic high-frequency access pattern during the working hours of the day, but may show a periodic low-frequency access pattern during the non-working hours (18:00~7:00). If the above periodic data calculation rule is only followed, it may be evaluated as no periodicity or the period interval is set at the minimum period interval. When the high-frequency access interval enters the low-frequency access interval, it will occupy the high-speed layer resources for a period of time. When it is determined that the data has become cold and migrated back to the low-speed layer, it will immediately enter the high-frequency access interval again. At this time, it is necessary to wait for the data to be migrated back to the high-speed layer, resulting in a waste of system performance and storage resources.

[0037] Based on this, an embodiment of the present application provides a data storage method, which determines whether any object data accessed within the historical access time period has a dual periodicity regularity by obtaining object data access information within the historical access time period. Specifically, the historical access time of the object data is first determined based on the object data access information to obtain a historical access time series. It can be understood that even if the user accesses the object data with regularity, the time intervals between the historical access times may not be fixed due to differences in the reading speed of the storage system. Therefore, in order to avoid the inability to accurately determine the regularity of object data access due to small differences, it is necessary to determine the set access time corresponding to the time interval to which the historical access time in the historical access time series belongs according to the corresponding relationship between the preset time interval and the set access time, and convert the historical access time into the set access time to obtain the set access time series. In other words, the historical access time within a time interval is converted into a set access time to avoid the inability to accurately determine the regularity of object data access due to errors.

[0038] Furthermore, based on the set access time sequence corresponding to the object data, it can be determined whether the object data has a periodic access rule with a double periodicity rule, wherein the double periodicity rule is used to characterize that the object data has multiple cycles that are repeated alternately in the historical access time period, and the object data has a periodic rule in each cycle. In other words, the object data has two cycles that are repeated alternately, and in each cycle it is accessed at intervals. Therefore, according to the periodic access rule corresponding to the object data, the predicted access time corresponding to the object data can be determined, and before the predicted access time, the object data can be stored in the storage layer with the highest access speed among multiple storage layers, so that the reading speed is faster when it is accessed next time, thereby improving the speed of reading data.

[0039] The data storage method provided in the embodiment of the present application can be applied to Figure 1 For storage systems shown, see Figure 1 The storage system 100 at least includes: a management module 101, a high-speed storage layer 102 and a low-speed storage layer 103.

[0040] Each storage layer stores a different amount of object data. The high-speed storage layer 102 has the highest access speed, while the low-speed storage layer has the lowest access speed.

[0041] As a feasible implementation method, Figure 1 As shown, the storage system 100 may further include a medium-speed storage layer 104 , and the access speed of the medium-speed storage layer 104 is between the access speeds of the high-speed storage layer 102 and the low-speed storage layer 103 .

[0042] For example, the high-speed storage layer 102 may be a memory, the medium-speed storage layer 104 may be a solid-state disk (SSD), and the low-speed storage layer may be a mechanical hard disk (HDD), which is not specifically limited in the present embodiment of the application.

[0043] The management module 101 is used to manage the object data stored in the storage layer, determine whether the object data has a periodic access pattern based on the object data access information within the historical access time period, and predict the predicted access time of the object data with a periodic access pattern. Before the predicted access time, the object data is stored in the high-speed storage layer 102 for user access.

[0044] In some embodiments, please refer to Figure 1 The management module 101 includes a hierarchical strategy management module 1011 and a hierarchical detection management module 1012. The hierarchical strategy management module 1011 includes a rule engine 11, a timing module 12, and a migration module 13. The hierarchical detection management module 1012 includes a detection module 21 and a scanning module 22.

[0045] The rule engine 11 is used to determine the hot and cold priority of the object data, so that the object data is migrated between different storage layers according to the hot and cold priority calibrated by the rule engine. The hot and cold level of the data is comprehensively evaluated based on the access hotspot and periodicity of the object data.

[0046] The timing module 12 is used to set a judgment period for judging whether the object data is cold or hot data, a load period for detecting the load of each storage layer, and a migration period for migrating the object data, etc., to trigger related events at a fixed time.

[0047] The migration module 13 maintains cold and hot data queues and periodic queues in each storage layer. When the migration conditions are met, the migration module 13 will prioritize the migration of data with high levels or data that are about to reach the predicted access time to the corresponding layer. At the same time, the cold and hot levels and periodic rules of objects in the migration queue will be updated regularly to remove objects that have not been migrated for a long time or no longer meet the migration conditions.

[0048] The scanning module 22 is used to periodically scan and count the load conditions of the storage layers. The detection module 21 is used to determine the load conditions of each storage layer. When the load of a certain storage layer reaches a set threshold, the migration module 13 is notified to migrate the data of the storage layer.

[0049] As a feasible implementation method, the timing module 12 triggers a periodic inspection, and the rule engine 11 determines whether to store object data with periodic access rules. If the rule engine 11 determines that the object data has a periodic access rule, the index information, data cycle rule, and next predicted access time of the object are inserted into the periodic data migration queue, so that the migration module 13 regularly migrates and stores the object data with periodic access rules to the high-speed storage layer before the predicted access time.

[0050] After the migration is completed, the rule engine 11 will continue to evaluate the access status of the object data in the periodic data migration queue. If the object data is not accessed within the predicted period after migration, the rule engine will re-determine whether the object data has a periodic access pattern based on the latest access data. If it is determined that the object data does not have a periodic access pattern, the object data will be removed from the periodic data migration queue.

[0051] It should be understood that the periodic access rule includes a periodic rule and a dual periodic rule. The dual periodic rule has multiple cycles that are repeated alternately, and each cycle has a periodic rule.

[0052] It should be noted that Figure 1 The structure shown does not constitute a limitation on the above-mentioned storage system 100. The storage system 100 may include more or fewer modules. For example, a detection module 21 and a scanning module 22 may be set for each storage layer. This application does not impose any limitation on this.

[0053] As a feasible implementation method, the scanning module of the high-speed storage layer periodically scans and counts the load of the high-speed storage layer. When the detection module determines that the load of the high-speed storage layer has reached the set threshold, it notifies the migration module to automatically migrate the cold data (data with cold and hot values ​​lower than the data cold and hot value range corresponding to the high-speed storage layer) from the queue to be migrated according to the data hot and cold values ​​calibrated by the object data to the medium-speed storage layer or the low-speed storage layer.

[0054] The scanning module of the medium-speed storage layer periodically scans the load of the medium-speed storage layer. When the detection module determines that the load of data accessing the medium-speed storage layer is high and reaches the set threshold, such as too high latency or overload of throughput (Input / Output Per Second, IOPS) and read / write speed, the migration module is notified to automatically migrate cold data (data with data hot / cold values ​​lower than the data hot / cold value range corresponding to the medium-speed storage layer) from the queue to be migrated to the low-speed storage layer according to the data hot / cold values ​​calibrated by the object data, and migrate hot data (data with data hot / cold values ​​higher than the data hot / cold value range corresponding to the medium-speed storage layer) to the high-speed storage layer cache.

[0055] The scanning module of the low-speed storage layer periodically scans the load of the low-speed storage layer. When the detection module determines that the load of data accessing the low-speed storage layer is high and reaches the set threshold, such as too high latency or overload of iops or read and write speeds, the migration module is notified to automatically migrate hot data (data with data hot and cold values ​​higher than the data hot and cold value range corresponding to the low-speed storage layer) from the queue to be migrated according to the data hot and cold values ​​calibrated by the object data to the high-speed storage layer cache or the medium-speed storage layer accelerated storage.

[0056] It should be understood that the storage system 100 in the embodiment of the present application can be set in an electronic device such as a server, a desktop computer, a tablet computer, a laptop computer, a handheld computer, a mobile phone, a handheld computer, an ultra-mobile personal computer (UMPC), a netbook, a wearable device, etc., and the embodiment of the present application does not impose any restrictions on this. Alternatively, the electronic device can also be a single server, or a server cluster composed of multiple servers. In some implementations, the server cluster can be a distributed cluster server. The embodiment of the present application does not impose any restrictions on this.

[0057] The data storage method provided in the embodiment of the present application can be applied to Figure 1 In the management module 101 in the storage system shown in FIG. Figure 2 The data storage method provided in the embodiment of the present application comprises the following steps:

[0058] S201: Obtain object data access information within a historical access time period.

[0059] Each time the object data is accessed, the storage system 100 can record the access information of the object data. When it is necessary to determine the object data with periodic access rules, it is necessary to obtain the object data access information within the historical access time period. It is understandable that the object data access information may include access time, access times, access users, etc., and this application does not limit this.

[0060] It should be understood that the historical access time period can be pre-set by the system or set by the user according to his own needs, and the embodiment of the present application does not limit this. Exemplarily, as a feasible implementation method, the historical access time period can be three days.

[0061] S202 . For each object data in the object data access information, determine the historical access time of the object data based on the object data access information to obtain a historical access time series.

[0062] Each object data in the object data access information may have a periodic access pattern. Therefore, for each object data in the object data access information, its corresponding historical access time needs to be determined to obtain a historical access time series to facilitate confirmation of whether the object data has a periodic access pattern.

[0063] S203: Determine the set access time corresponding to the time interval to which the historical access time in the historical access time sequence belongs according to the correspondence between the preset time interval and the set access time, and convert the historical access time into the set access time to obtain the set access time sequence.

[0064] Even if the access object data has a certain regularity, the time intervals between historical access times may not be fixed due to differences in the reading speed of the storage system. Therefore, in order to avoid the inability to accurately determine the access regularity of the object data due to small differences, it is necessary to pre-set the corresponding relationship between the time interval and the set access time in the system, and then determine the set access time corresponding to the time interval to which the historical access time in the historical access time sequence belongs according to the corresponding relationship between the preset time interval and the set access time, and convert the historical access time into the set access time to obtain the set access time sequence. In other words, convert the historical access time within a time interval into a set access time to avoid the inability to accurately determine the access regularity of the object data due to errors.

[0065] As a feasible implementation method, in order to facilitate subsequent calculations, the set access time can be set to the hour, such as setting the historical access time within the range of 17:30:01-18:30:00 to correspond to the set access time of 18:00.

[0066] Exemplarily, the historical access time sequence of object data Object1 is {22:03, 03:11, 08:03, 09:12, 10:01, 10:58, 12:08, 13:05, 14:10, 15:06, 16:10, 17:08}, and the set access time sequence obtained after conversion may be {22:00, 03:00, 08:00, 09:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00}.

[0067] S204: Determine whether the object data has a periodic access pattern based on the set access time sequence corresponding to the object data.

[0068] In the embodiment of the present application, the periodic access rule includes a dual periodic rule, which is used to characterize that the object data has multiple cycles that are repeated alternately in the historical access time period, and the object data has a periodic rule in each cycle.

[0069] As a feasible implementation method, since the access time of the object data with a dual periodicity has two alternating and repeated cycles, and has a periodicity in each cycle, that is, it is accessed at intervals, it is possible to directly determine whether the object data has a dual periodicity by observing the set access time sequence.

[0070] For example, the historical access time list of the object data Object2 is {22:03, 03:11, 08:03, 09:12, 10:01, 10:58, 12:08, 13:05, 14:10, 15:06, 16:10, 17:08, 22:03, 03:11, 08:03, 09:12, 10:01, 10:58, 12:08, 13:05, 14:10, 15:06, 16:10, 17:08}, which is converted into a set access time sequence of {22:00, 03:00, 08:00, 09:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00, 22:00, 03:00, 08:00, 09:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00}. It can be seen that the object data is accessed less frequently during the period of 17:00-08:00, that is, once every five hours, while the object data is accessed once every hour during the period of 08:00-17:00, and the two periods are repeated alternately. Therefore, it can be considered that the object data Object2 has a dual periodicity pattern.

[0071] As another feasible implementation method, it is also possible to use methods such as drawing a sequence diagram, Fourier transform analysis, and autocorrelation function analysis to determine whether the object data has a dual periodicity pattern, which is not limited in the embodiments of the present application.

[0072] S205. In the case where the object data has a periodic access pattern, determine the predicted access time corresponding to the object data based on the periodic access pattern corresponding to the object data, and store the object data in a storage layer with the highest access speed among multiple storage layers before the predicted access time.

[0073] It is understandable that since the dual periodicity rule is used to characterize that the object data has multiple cycles of alternating repetitions in the historical access time period, and the object data has a periodicity rule in each cycle, that is, the access time of the object data with the dual periodicity rule has two cycles of alternating repetitions, and the time intervals of access in these two cycles are not the same. Therefore, when determining the predicted access time corresponding to the object data with the dual periodicity rule, it is possible to first calculate whether the current object data is in a high-frequency cycle, a low-frequency cycle, or a cycle switching point when it is accessed next time based on the periodic access rule corresponding to the object data and the historical access time series, and then calculate the next predicted access time of the object data based on the historical access time interval in each cycle.

[0074] Before predicting the access time, the object data is stored in a storage layer with the highest access speed among multiple storage layers, so that the object data can be read faster when accessed, thereby improving the speed of data processing.

[0075] As a feasible implementation method, when determining the set access time sequence, in order to avoid errors, the historical access time within a time interval is converted into a set access time, so the predicted access time predicted based on the converted set access time is also determined based on the converted set access time, so there may be a certain error between the predicted access time and the actual access time. Therefore, the object data can be stored in the storage layer with the highest access speed among multiple storage layers at the start time of the time interval to which the predicted access time belongs.

[0076] Exemplarily, in the above example, the historical access time within the range of 17:30:01-18:30:00 corresponds to the set access time of 18:00; assuming that the predicted access time of the object data Object2 is 18:00, the object data Object2 can be stored in the storage layer with the highest access speed among multiple storage layers at 17:30.

[0077] It can be seen that the data storage method provided in the embodiment of the present application determines whether any object data accessed within the historical access time period has a dual periodicity regularity by obtaining the object data access information within the historical access time period. Specifically, the historical access time of the object data is first determined based on the object data access information to obtain a historical access time series. It can be understood that even if the user accesses the object data with regularity, the time intervals between the historical access times may not be fixed due to differences in the reading speed of the storage system. Therefore, in order to avoid the inability to accurately determine the regularity of object data access due to small differences, it is necessary to determine the set access time corresponding to the time interval to which the historical access time in the historical access time series belongs according to the corresponding relationship between the preset time interval and the set access time, and convert the historical access time into the set access time to obtain the set access time series. In other words, the historical access time within a time interval is converted into a set access time to avoid the inability to accurately determine the regularity of object data access due to errors.

[0078] Furthermore, based on the set access time sequence corresponding to the object data, it can be determined whether the object data has a periodic access rule with a double periodicity rule, wherein the double periodicity rule is used to characterize that the object data has multiple cycles that are repeated alternately in the historical access time period, and the object data has a periodic rule in each cycle. In other words, the object data has two cycles that are repeated alternately, and in each cycle it is accessed at intervals. Therefore, according to the periodic access rule corresponding to the object data, the predicted access time corresponding to the object data can be determined, and before the predicted access time, the object data can be stored in the storage layer with the highest access speed among multiple storage layers, so that the reading speed is faster when it is accessed next time, thereby improving the speed of reading data.

[0079] In some embodiments, when determining whether the object data has a dual periodicity, since the observation method requires user participation, efficiency and accuracy cannot be guaranteed, the use of methods such as drawing sequence diagrams, Fourier transform analysis, and autocorrelation function analysis is relatively cumbersome and requires the use of a portion of computing resources. Based on this, the present application can determine whether the object data has a dual periodicity based on the difference between two adjacent set access times in the set access time sequence.

[0080] For details, please refer to Figure 3 , S204 can be specifically implemented as follows:

[0081] S301. Subtract the set access times in the set access time sequence corresponding to the object data in order to obtain a set difference value sequence.

[0082] It can be understood that the set access times in the set access time sequence corresponding to the object data are sequentially differentiated, that is, the time interval between two adjacent set access times is determined, and the elements in the obtained set difference sequence are the time intervals.

[0083] Exemplarily, the set access time sequence of object data Object2 is {22:00, 03:00, 08:00, 09:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00, 22:00, 03:00, 08:00, 09:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00}. The n elements in the set access time sequence are sequentially subtracted to obtain a set difference value list including n-1 difference values ​​{5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1}.

[0084] As a feasible implementation method, in order to avoid interference caused by accidental repeated access, element 0 in the set difference list can be removed to avoid the inability to accurately determine the periodic access pattern of the object data due to accidental repeated access.

[0085] S302: Subtract the elements in the set difference sequence in order to obtain a secondary difference sequence.

[0086] The set difference list is performed as a secondary difference to obtain a secondary set difference list. By way of example, the secondary difference list of the object data Object2 in the above example is {0, 4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0}.

[0087] S303: When there is a peak jump point in the secondary difference sequence of the object data, the set difference sequence of the object data is divided into a plurality of sub-set difference sequences by taking the peak jump point as a separation point.

[0088] It should be understood that the peak jump point refers to a point that satisfies both the peak condition (local maximum or local minimum) and the jump condition (large difference with adjacent points). The peak jump point is very different from other elements and can be identified by setting a threshold or using a more complex algorithm. For example, -4 and 4 in the above example are peak jump points.

[0089] Since the peak jump point is an element in the quadratic difference sequence, it represents the difference between two elements in the set difference sequence, that is, the difference between two adjacent time intervals is large. Therefore, the peak jump point is used as a separation point to divide the set difference sequence of the object data into multiple sub-set difference sequences, and the difference between the time intervals in each sub-set difference sequence is small.

[0090] Exemplarily, the secondary difference list of object data Object2 in the above example is {0, 4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0}, and the peak jump points are -4 and 4. The corresponding setting difference list {5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1} is divided into multiple sub-setting difference sequences, to obtain sub-setting difference sequence 1: {5, 5}, sub-setting difference sequence 2: {1, 1, 1, 1, 1, 1, 1, 1}, sub-setting difference sequence 3: {5, 5}, and sub-setting difference sequence 4: {1, 1, 1, 1, 1, 1, 1, 1}.

[0091] S304: Determine whether each sub-setting difference sequence has a periodic regularity.

[0092] It can be understood that the dual periodicity pattern is a pattern of multiple cycles that are repeated alternately, and each cycle has a periodic pattern. Therefore, after the setting difference sequence of the object data is divided into multiple sub-setting difference sequences, it is necessary to determine whether each sub-setting difference sequence has a periodic pattern.

[0093] It can be understood that the periodic law means that the object data is accessed at a certain time interval, that is, the time interval between any two adjacent set access times of the object data with a periodic law is the same. Therefore, it is possible to directly determine whether the sub-set difference sequence has a periodic law based on whether the elements in the sub-set difference sequence are the same. In other words, as a feasible implementation method, when all the elements in the sub-set difference sequence are the same, it can be directly determined that the sub-set difference sequence has a periodic law.

[0094] As another feasible implementation method, the elements in the sub-setting difference sequence can be subtracted in sequence, and based on the obtained secondary difference sequence, it can be determined whether the sub-setting difference sequence has a periodic pattern. For details, please refer to Figure 4 , S304 can be implemented as follows:

[0095] S401. Subtract the elements in the sub-setting difference sequence in order to obtain a secondary difference sequence corresponding to each sub-setting difference sequence.

[0096] S402. For any sub-setting difference sequence in the object data, when the number of consecutive 0 elements in the secondary difference sequence corresponding to the sub-setting difference sequence is greater than or equal to a first preset difference threshold, or when the absolute maximum value of all elements in the secondary difference sequence corresponding to the sub-setting difference sequence is less than or equal to a first preset relaxation threshold, it is determined that the sub-setting difference sequence has a periodic pattern.

[0097] It should be understood that the first preset difference threshold and the first preset relaxation threshold can be preset by the system, and can be determined according to needs in practical applications, and this application does not limit this. As a feasible implementation, the first preset difference threshold can be 5, and the first preset relaxation threshold can be 4.

[0098] The number of consecutive 0 elements in the secondary difference sequence corresponding to the sub-setting difference sequence is greater than or equal to the first preset difference threshold, indicating that multiple consecutive elements in the sub-setting difference sequence are the same, that is, the time intervals between multiple consecutive adjacent set access times in the set access time sequence corresponding to the sub-setting difference sequence are the same. At this time, it can be determined that the elements in the set access time sequence corresponding to the sub-setting difference sequence have a strict arithmetic progression, and therefore it can be determined that the sub-setting difference sequence has a periodic pattern.

[0099] The maximum absolute value of all elements in the secondary difference sequence corresponding to the sub-setting difference sequence is less than or equal to the first preset relaxation threshold, indicating that the difference between two adjacent elements in the sub-setting difference sequence is small. At this time, although the elements in the setting access time sequence do not have a strict arithmetic interval, the difference in the time intervals between adjacent setting access times in the setting access time sequence is small, that is, the object data is not strictly accessed every certain period of time, but is accessed once at a shorter interval. At this time, it can be considered that the object data has a non-strict arithmetic periodicity, that is, the sub-setting difference sequence has a periodicity.

[0100] It can be seen that the method provided in this embodiment uses the secondary difference sequence corresponding to the sub-setting difference sequence to judge whether the sub-setting difference sequence has a periodic law. When the number of consecutive 0 elements in the secondary difference sequence is greater than or equal to the first preset difference threshold, it is judged that it has a strictly arithmetic periodic law. When the absolute maximum value of all elements in the secondary difference sequence is less than or equal to the first preset relaxation threshold, it is judged that there is a non-strictly arithmetic periodic law. This method can accurately identify whether the sub-setting difference sequence has a periodic law.

[0101] S305: When all sub-setting difference sequences in the object data have a periodic rule, determine whether all sub-setting difference sequences satisfy an alternating repetition rule.

[0102] Since the dual periodicity rule also needs to satisfy that multiple periods are repeated and alternating, when all sub-setting difference sequences in the object data have a periodicity rule, it is also necessary to determine whether all sub-setting difference sequences satisfy the alternating and repetitive rule, that is, whether the two periods appear alternately.

[0103] As a feasible implementation method, when the number of repetitions of two cycles is greater than a double-cycle judgment threshold K preset by the rule engine, it can be determined that all sub-set difference sequences satisfy the alternating repetition rule.

[0104] In some embodiments, even for object data with a dual periodicity pattern, since the historical access time period is a fixed value, the first period and the last period in the historical access time period may not be a complete period. As a feasible implementation method, the first and last sequences of the obtained multiple sub-setting difference sequences can be deleted, and only the middle sub-setting difference sequences are used for periodicity judgment.

[0105] S306: When all sub-set difference sequences of the object data satisfy the alternating repetition rule, it is determined that the object data has a double periodicity rule.

[0106] It can be seen that the data storage method provided in this embodiment is based on the difference between two adjacent set access times in the set access time sequence, that is, setting the difference sequence to determine whether the object data has a dual periodicity pattern. It does not require user participation in the judgment, and the calculation process is relatively simple. It does not require a large amount of computing power resources to ensure high judgment efficiency and accuracy.

[0107] In some embodiments, some object data in the storage system may be accessed periodically, that is, accessed once every certain period of time. In order to improve the access speed of such data, the periodic access rule in the scheme provided by the present application also includes a periodic rule, that is, the method provided by the present application can also identify whether the access of the object data in the historical access time period has a periodic rule.

[0108] For details, please refer to Figure 5 , S204 may include the following steps:

[0109] S501. Subtract the set access times in the set access time sequence corresponding to the object data in order to obtain a set difference value sequence.

[0110] It can be understood that the set difference sequence can be used to represent the time interval between adjacent set access times in the set access time sequence.

[0111] S502: Subtract the elements in the set difference sequence corresponding to the object data in order to obtain a secondary difference sequence.

[0112] It should be understood that the secondary difference sequence can be used to characterize the size relationship between adjacent time intervals in the set difference sequence.

[0113] S503: When the number of consecutive 0 elements in the secondary difference sequence of the object data is greater than or equal to a second preset difference threshold, or the maximum absolute value of all elements in the secondary difference sequence of the object data is less than or equal to a second preset relaxation threshold, it is determined that the object data has a periodic pattern.

[0114] It should be understood that the second preset difference threshold and the second preset relaxation threshold may be preset by the system, and may be determined according to requirements in practical applications, and may be different from or the same as the first preset difference threshold and the first preset relaxation threshold, and the present application does not limit this. As a feasible implementation, the second preset difference threshold may be 5, and the second preset relaxation threshold may be 4.

[0115] If the number of consecutive 0 elements in the quadratic difference sequence is greater than or equal to the second preset difference threshold, it indicates that multiple consecutive elements in the set difference sequence are the same, that is, the time intervals between multiple adjacent set access times in the set access time sequence are the same. At this time, it can be determined that the elements in the set access time sequence have a strict arithmetic progression, and therefore it can be determined that the set difference sequence has a periodic pattern.

[0116] The maximum absolute value of all elements in the secondary difference sequence corresponding to the set difference sequence is less than or equal to the second preset relaxation threshold, indicating that the difference between two adjacent elements in the set difference sequence is small. At this time, although the elements in the set access time sequence do not have a strict arithmetic interval, the difference in the time intervals between adjacent set access times in the set access time sequence is small. At this time, it can also be considered that the object data has a non-strict arithmetic periodicity, that is, the set difference sequence has a periodicity.

[0117] It can be seen that the data storage method provided in this embodiment, after obtaining the set access time series of the object data, not only determines whether the object data has a dual periodicity pattern, but also determines whether the object data has a periodic pattern, which can ensure that the object data with a periodic access pattern can be accurately identified, and then the object data with a periodic access pattern can be stored in a timely manner in the storage layer with the highest access speed among multiple storage layers to facilitate subsequent access.

[0118] In some embodiments, after storing object data in a storage layer with the highest access speed among multiple storage layers, if the object data is continuously stored in the high-speed storage layer, it will inevitably cause a higher load on the high-speed storage layer, affecting the access speed of the high-speed storage layer.

[0119] Therefore, as a feasible implementation method, after S205, please refer to Figure 6 The data storage method provided in this application also includes the following steps:

[0120] S601: Determine whether object data is accessed within a preset time period after a predicted access time.

[0121] If not, execute S602; if so, execute S603.

[0122] S602: Re-determine whether the object data has a periodic access pattern.

[0123] If the object data is not accessed within the preset time period after the predicted access time, it indicates that the object data may no longer have a periodic access pattern. If it is stored in a high-speed storage layer, it may affect the load of the high-speed storage layer, and migrating it back and forth between multiple storage layers will generate some unnecessary operations. Therefore, if the object data is not accessed within the preset time period after the predicted access time, it is re-determined whether the object data has a periodic access pattern. If it does not have a periodic access pattern, it can be stored in other data layers.

[0124] S603: Determine the next predicted access time of the object data based on the periodic access rule of the object data.

[0125] When the object data is accessed within a preset time period after the predicted access time, it indicates that the object data still has a periodic access rule, and the next predicted access time of the object data can be determined at this time.

[0126] S604: Determine the time interval between the next access time and the current time, and if the time interval is greater than a preset time interval, migrate the object data out of the storage layer with the highest access speed.

[0127] If the time interval between the next access time and the current time is greater than the preset time interval, it indicates that the object data will not be accessed until at least after the preset time interval. Therefore, it can be migrated out of the storage layer with the highest access speed first, and then stored in the high-speed storage layer before the next access time, so as to avoid excessive load in the high-speed storage layer and affect the efficiency of reading data.

[0128] As a feasible implementation method, the access cycle of the object data with a dual periodicity rule can be divided into a high-frequency cycle and a low-frequency cycle according to the access time interval. Since the access frequency of the object data in the high-frequency cycle is high, that is, the access time interval is short, in order to avoid unnecessary migration operations, the object data may not be migrated in the high-frequency cycle, and it is continuously stored in the high-speed storage layer. In the low-frequency cycle, since the access time interval is long, when the time interval is greater than the preset time interval or the load of the high-speed storage layer is high, the object data can be migrated to the low-speed storage layer first, and then stored in the high-speed storage layer before the next access time, to avoid excessive load in the high-speed storage layer, affecting the efficiency of reading data.

[0129] It can be seen that the data storage method provided in this embodiment, after moving the object data with periodic access rules into the high-speed storage layer, if the object data is not accessed within the preset time period after the predicted access time, re-determines whether the object data has periodic access rules, and if it does not have periodic access rules, it can be stored in other data layers. If the object data is accessed within the preset time period after the predicted access time, it indicates that the object data still has periodic access rules, and by determining the time interval between the next access time of the object data and the current time to determine whether to move it out of the high-speed storage layer, it can avoid the excessive load in the high-speed storage layer affecting the efficiency of data reading.

[0130] In some embodiments, the relevant technology usually determines the importance of stored data based on access frequency or collects operation logs based on user access operations, divides the data into cold and hot data, and dynamically migrates different data to storage layers with different performance, thereby improving the reading speed of hot data and the storage performance of the storage layer.

[0131] For structured data, users can set search conditions for filtering, and the system can determine the importance of structured data based on the number of times the user filters it. However, for unstructured data, existing unstructured data is generally stored in the storage system in sequence, so there is no correlation between the data, which makes the identification and retrieval time long and difficult to use. The system is also unable to accurately judge the importance of unstructured data, and is therefore unable to migrate data on it.

[0132] Based on this, as a feasible implementation method, please refer to Figure 7 , the data storage method provided in the embodiment of the present application also includes:

[0133] S701. Obtain a data hot / cold range corresponding to each storage layer in multiple storage layers in a storage system.

[0134] Among them, the hot and cold range of data corresponding to the storage layer is positively correlated with the access speed of the storage layer.

[0135] That is to say, a data hot / cold range is assigned to each storage layer, so that the storage layer with a higher access speed stores object data with a higher data hot / cold value, while the storage layer with a lower access speed stores object data with a lower data hot / cold value. Since object data with a higher data hot / cold value is object data with a higher probability of being accessed in the future, storing it in a storage layer with a higher access speed can ensure the read efficiency when the object data is accessed later.

[0136] S702: For target object data stored in the storage layer, determine the data hot / cold value of the target object data according to the access frequency, the access filter condition frequency, and the access data feature frequency.

[0137] The access frequency is used to characterize the number of times the target object data is accessed within a preset time period. It is understandable that the higher the number of times the object data is accessed within a preset time period, the greater the probability of being accessed in the future, that is, the access frequency is positively correlated with the data hotness and coldness value.

[0138] The access filter condition frequency is used to characterize the number of accesses to the object data list to which the target object data belongs within a preset time period; the object data list is obtained by filtering the object data stored in the storage system according to the preset filter condition. It is understandable that when accessing the data stored in the storage system, it may be filtered according to some preset filter conditions, such as storage time, data name or data type, etc., and an object data list will be obtained after filtering. If the number of accesses to the object data in the object data list within the preset time period is large, it indicates that the data in the object data list is being traversed and accessed. At this time, the possibility of other object data in the object data list being accessed is high. Therefore, in this application, the number of accesses to the object data in the object data list within the preset time period is used as the access filter condition frequency of any object data in the object data list.

[0139] The access data feature frequency is used to characterize the number of times that the similarity between the feature information of the object data accessed by the user and the feature information of the target object data within a preset time period is higher than a preset similarity threshold. It is understandable that the feature information of different types of object data is different. If the object data accessed by the user within a preset time period has similar feature information, it indicates that the user is traversing data with similar feature information, that is, data of the same type. Therefore, in order to facilitate the faster reading speed of this type of data during subsequent access, the number of times that the similarity between the feature information of the object data accessed by the user within a preset time period and the feature information of the target object data is higher than a preset similarity threshold can be used as the access data feature frequency, and the access data feature frequency is used to determine the data hot and cold value of the target object data.

[0140] Specifically, as a feasible implementation method, the access frequency, the access filter condition frequency and the access data feature frequency may be directly summed to obtain the data hot and cold values ​​of the target object data.

[0141] As another feasible implementation method, since the importance of access frequency, access filter condition frequency and access data feature frequency may not be the same, in actual applications, different weights can be set for access frequency, access filter condition frequency and access data feature frequency, and the data hot and cold values ​​of the target object data can be determined by weighted summation.

[0142] It can be understood that since the solution provided in this embodiment needs to determine the data hot and cold values ​​of the data based on the characteristic information of each object data, in order to improve the efficiency of determining the data hot and cold values, the characteristic information of the object data can be extracted and stored when the object data is stored for the first time or when the object data is modified and stored again.

[0143] As a feasible implementation method, the data storage method provided in the embodiment of the present application also includes: in response to receiving a data storage instruction, performing feature extraction on the data to be stored to obtain feature information of the data to be stored; and storing the data to be stored and the feature information of the data to be stored.

[0144] When data is stored in a storage system, content features of the object data can be extracted using a preset feature extraction method and saved in the object metadata. In this way, when determining the hot and cold values ​​of the object data, feature information of the object data can be obtained from the object metadata.

[0145] It is understandable that different types of data can use different feature extraction methods. For example, text data can use a text encoder to obtain corresponding feature information, and image data can use an image encoder, principal component analysis (Principal Component Analysis, PCA) or other feature extraction algorithms to obtain corresponding feature information. The embodiments of the present application do not limit this.

[0146] S703: When the data hot / cold value of the target object data does not match the data hot / cold range of the storage layer to which the target object data belongs, determine that the target object data is the object data to be migrated, and determine a target storage layer whose data hot / cold range matches the data hot / cold value of the object data to be migrated.

[0147] When the data hot / cold value of the target object data does not match the data hot / cold range of the storage layer to which the target object data belongs, it indicates that it is not appropriate to store the target object data in the current storage layer, which may affect the reading efficiency of the object data or increase the load of the current storage layer. Therefore, it is necessary to determine that the target object data is the object data to be migrated, and determine the target storage layer with a matching data hot / cold range based on the data hot / cold value of the object data to be migrated.

[0148] S704: Migrate the object data to be migrated to the corresponding target storage layer.

[0149] Migrate the object data to be migrated to the corresponding target storage layer so that the data hot and cold values ​​of the target object data match the data hot and cold ranges of the storage layer to which the target object data belongs, to avoid affecting the reading efficiency of the object data or affecting the load of other storage layers.

[0150] As a feasible implementation method, the object data to be migrated can be first added to the queue of data to be migrated of the corresponding storage layer. When the load of the current storage layer is high (such as reaching the set load threshold), the latency is too high, or the iops or read / write speed is overloaded, the object data to be migrated can be migrated to the corresponding target storage layer from high to low according to the data hot and cold values ​​of the object data to be migrated.

[0151] It can be seen that the data storage method provided in this embodiment combines the access frequency of the object data within a preset time period, the access filter condition frequency and the access data feature frequency to determine the data hot and cold value of the object data. When determining the importance of the data, not only the access frequency of the data and the number of accesses in the filtered object data list are considered, but also whether the object data has similar feature information to the object data accessed historically. Using the access data feature frequency as one of the judgment conditions for the importance of the data can accurately judge the importance of non-structured data with weak correlation between data, and then accurately identify the data to be migrated that needs to be migrated, and migrate it to a matching storage layer to prevent it from being stored in an unmatched storage layer, which will affect the reading efficiency of the object data or affect the load of the current storage layer.

[0152] In some embodiments, the amount of object data stored in the storage system is large. If the data hot and cold values ​​are determined for each object data in the storage system, high computing resources and processing resources are also required. Therefore, the data hot and cold values ​​may be determined only for part of the object data in the storage system.

[0153] As a possible implementation, see Figure 8 , S702 can be specifically implemented as follows:

[0154] S801. Determine object data that meets preset conditions among object data stored in a storage layer, and obtain target object data.

[0155] Among them, the preset conditions include at least one of the following: the access frequency of the object data within the preset time period is greater than the preset access frequency; the number of object data accessed by the user within the preset time period exceeds the preset access number of the unaccessed object data in the object data list; the number of times the similarity of the feature information of the object data accessed by the user within the preset time period is higher than the preset similarity threshold exceeds the preset feature number, and the object data is not accessed.

[0156] Since there are corresponding access records for the accessed object data, and there are no access records for the unaccessed data, and the data volume of the unaccessed data is usually large, the object data with an access frequency greater than the preset access frequency within the preset time period can be determined from the object data in the corresponding access records as the target object data.

[0157] Alternatively, after filtering using preset filtering conditions, the number of accessed object data in the object data list filtered out within a preset time period exceeds the preset access number, indicating that the object data in the object data list may all be accessed, and since the accessed data will generally not be accessed again, the unaccessed object data in the object data list can be used as the target object data.

[0158] Alternatively, if the number of times that the similarity of the characteristic information of the object data accessed by the user within the preset time period is higher than the preset similarity threshold exceeds the preset characteristic number, it indicates that the data with the characteristic information or similar characteristic information may be accessed, and since the accessed data will generally not be accessed again, the number of times that the similarity of the characteristic information of the object data accessed by the user within the preset time period is higher than the preset similarity threshold exceeds the preset characteristic number, and the object data that has not been accessed can be used as the target object data.

[0159] S802: For target object data that meets preset conditions, determine the data hot and cold values ​​of the target object data according to access frequency, access filter condition frequency, and access data feature frequency.

[0160] After filtering out the target object data that meets the preset conditions, the data hot and cold values ​​of the target object data can be determined based on the access frequency, the access filter condition frequency and the access data feature frequency. The specific process of determining the data hot and cold values ​​can be referred to the above embodiment, and this application will not repeat them here.

[0161] It can be seen that the method provided in this embodiment first determines the target object data that meets the preset conditions among the object data stored in each storage layer before determining the data hot and cold values ​​of the target object data, thereby avoiding determining the data hot and cold values ​​for all object data and causing a waste of computing resources and processing resources.

[0162] In some embodiments, if the frequency of data migration is too high or the amount of data to be migrated is too large, it will bring a large load to the storage system and affect system performance. Therefore, as a feasible implementation method, the priority of data migration operations can be lower than the priority of normal data access operations of users, giving priority to ensuring the operating performance of basic user functions.

[0163] The present application also provides a data storage device. Fig. 9 The data storage device 90 includes: an acquisition module 91 and a determination module 92.

[0164] The acquisition module 91 is used to acquire object data access information within a historical access time period.

[0165] The determination module 92 is used to determine the historical access time of each object data in the object data access information based on the object data access information to obtain a historical access time series.

[0166] The determination module 92 is further used to determine the set access time corresponding to the time interval to which the historical access time in the historical access time sequence belongs according to the correspondence between the preset time interval and the set access time, and convert the historical access time into the set access time to obtain the set access time sequence.

[0167] The determination module 92 is also used to determine whether the object data has a periodic access pattern based on the set access time sequence corresponding to the object data. The periodic access pattern includes a double periodic pattern. The double periodic pattern is used to characterize that the object data has multiple cycles that are repeated alternately within the historical access time period, and the object data has a periodic pattern in each cycle.

[0168] The determination module 92 is also used to determine the predicted access time corresponding to the object data based on the periodic access pattern corresponding to the object data when the object data has a periodic access pattern, and store the object data in the storage layer with the highest access speed among multiple storage layers before the predicted access time.

[0169] As a feasible implementation method, the determination module 92 is specifically used to sequentially subtract the set access times in the set access time sequence corresponding to the object data to obtain a set difference sequence; sequentially subtract the elements in the set difference sequence to obtain a secondary difference sequence; when there is a peak jump point in the secondary difference sequence of the object data, the peak jump point is used as a separation point to divide the set difference sequence of the object data into multiple sub-set difference sequences; determine whether each sub-set difference sequence has a periodic law; when all sub-set difference sequences in the object data have a periodic law, determine whether all sub-set difference sequences satisfy the alternating repetition law; when all sub-set difference sequences of the object data satisfy the alternating repetition law, determine that the object data has a dual periodic law.

[0170] As a feasible implementation method, the determination module 92 is specifically used to sequentially differ the elements in the sub-setting difference sequence to obtain a secondary difference sequence corresponding to each sub-setting difference sequence; for any sub-setting difference sequence in the object data, when the number of consecutive 0 elements in the secondary difference sequence corresponding to the sub-setting difference sequence is greater than or equal to a first preset difference threshold, or when the absolute maximum value of all elements in the secondary difference sequence corresponding to the sub-setting difference sequence is less than or equal to a first preset relaxation threshold, it is determined that the sub-setting difference sequence has a periodic pattern.

[0171] As a feasible implementation method, the periodic access rule also includes a periodic rule; a determination module 92 is specifically used to sequentially subtract the set access times in the set access time sequence corresponding to the object data to obtain a set difference sequence; sequentially subtract the elements in the set difference sequence corresponding to the object data to obtain a secondary difference sequence; when the number of consecutive 0 elements in the secondary difference sequence of the object data is greater than or equal to a second preset difference threshold, or the absolute maximum value of all elements in the secondary difference sequence of the object data is less than or equal to a second preset relaxation threshold, it is determined that the object data has a periodic rule.

[0172] As a feasible implementation method, the determination module 92 is also used to re-determine whether the object data has a periodic access pattern when the object data is not accessed within a preset time period after the predicted access time; determine the next predicted access time of the object data based on the periodic access pattern of the object data when the object data is accessed within a preset time period after the predicted access time; determine the time interval between the next access time and the current time, and when the time interval is greater than the preset time interval, migrate the object data out of the storage layer with the highest access speed.

[0173] As a feasible implementation method, the acquisition module 91 is also used to obtain the data hot and cold range corresponding to each storage layer in the multiple storage layers in the storage system; the data hot and cold range corresponding to the storage layer is positively correlated with the access speed of the storage layer; the determination module 92 is also used to determine the data hot and cold value of the target object data stored in the storage layer according to the access frequency, the access filter condition frequency and the access data feature frequency; wherein the access frequency is used to represent the number of accesses to the target object data within a preset time period; the access filter condition frequency is used to represent the number of accesses to the object data list to which the target object data belongs within the preset time period; the object data list The access data feature frequency is obtained by filtering the object data stored in the storage system according to the preset filtering conditions; the access data feature frequency is used to characterize the number of times that the similarity between the feature information of the object data accessed by the user and the feature information of the target object data within the preset time period is higher than the preset similarity threshold; when the data hot and cold value of the target object data does not match the data hot and cold range of the storage layer to which the target object data belongs, the target object data is determined to be the object data to be migrated, and the target storage layer whose data hot and cold range matches the data hot and cold value of the object data to be migrated is determined; the data storage device also includes: a migration module, which is used to migrate the object data to be migrated to the corresponding target storage layer.

[0174] As a feasible implementation method, the determination module 92 is specifically used to determine the object data that meets the preset conditions in the object data stored in the storage layer to obtain the target object data; the preset conditions include at least one of the following: the access frequency of the object data within the preset time period is greater than the preset access frequency; the number of object data accessed by the user within the preset time period exceeds the preset access number of the unaccessed object data in the object data list; the number of times the similarity of the feature information of the object data accessed by the user within the preset time period is higher than the preset similarity threshold exceeds the preset feature number, and the object data has not been accessed; for the target object data that meets the preset conditions, the data hot and cold value of the target object data is determined according to the access frequency, the access filter condition frequency and the access data feature frequency.

[0175] As a feasible implementation method, the data storage device also includes: an extraction module, which is used to extract features of the data to be stored after receiving the data storage instruction to obtain feature information of the data to be stored; and a storage module, which is used to store the data to be stored and the feature information of the data to be stored.

[0176] The present application also provides an electronic device. Fig.10The electronic device 201 includes: multiple memories 111, one or more processors 112, a communication bus 113 and a communication interface 114. The processor 112 is connected to the memory 111 through the bus 113; the one or more memories 111 are used to store computer program codes, and the computer program codes include computer instructions; when the one or more processors 112 execute the computer instructions, the electronic device 201 executes the data storage method provided in the above embodiment.

[0177] Optionally, the memory 111 may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc., and the embodiments of the present application do not impose any restrictions on this.

[0178] It can be understood that in the embodiment of the present application, multiple memories 111 are divided into multiple storage layers according to the access speed of the memory 111.

[0179] The processor 112 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof, and the embodiments of the present application do not impose any limitation on this.

[0180] The communication bus 113 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The communication bus 113 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Just one thick line is used, but it does not mean that there is only one bus or one type of communication bus.

[0181] The communication interface 114 uses any transceiver or other device for communicating with other devices or communication networks, such as control systems, radio access networks (RAN), wireless local area networks (WLAN), etc.

[0182] The embodiments of the present application also provide a computer program product including one or more instructions, where the one or more instructions are stored in a memory of a computer device and executed by a processor to complete the various processes of the above embodiments.

[0183] An embodiment of the present application also provides a computer-readable storage medium, which includes computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the data storage method provided in the above embodiment.

[0184] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0185] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0186] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0187] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0188] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device or processor to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or CD-ROM and other media that can store program code.

[0189] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data storage method, characterized in that: include: Obtain object data access information within a historical access time period; For each object data in the object data access information, determining a historical access time of the object data based on the object data access information to obtain a historical access time series; According to the correspondence between the preset time interval and the set access time, determine the set access time corresponding to the time interval to which the historical access time in the historical access time sequence belongs, and convert the historical access time into the set access time to obtain the set access time sequence; Based on the set access time sequence corresponding to the object data, determining whether the object data has a periodic access rule, the periodic access rule includes a double periodic rule, and the double periodic rule is used to characterize that the object data has multiple cycles that are repeated alternately in the historical access time period, and the object data has a periodic rule in each cycle; In the case where the object data has a periodic access pattern, determining a predicted access time corresponding to the object data based on the periodic access pattern corresponding to the object data, and storing the object data in a storage layer with the highest access speed among the multiple storage layers before the predicted access time; The determining whether the object data has a periodic access pattern based on the set access time sequence corresponding to the object data includes: Subtract the set access times in the set access time sequence corresponding to the object data in order to obtain a set difference value sequence; Subtracting the elements in the set difference sequence in order to obtain a secondary difference sequence; In the case where there is a peak jump point in the secondary difference sequence of the object data, the set difference sequence of the object data is divided into a plurality of sub-set difference sequences by taking the peak jump point as a separation point; Determine whether each sub-setting difference sequence has a periodic pattern; When all sub-set difference sequences in the object data have the periodic law, determining whether all the sub-set difference sequences satisfy an alternating repetition law; When all sub-set difference sequences of the object data satisfy the alternating repetition rule, determining that the object data has the dual periodicity rule; In the case where the object data has a dual periodicity rule, determining the predicted access time corresponding to the object data based on the periodic access rule corresponding to the object data includes: Determine the periodic position of the object data according to the periodic access rule and the historical access time sequence corresponding to the object data, wherein the periodic position includes a high-frequency period, a low-frequency period or a period switching point; The predicted access time corresponding to the object data is determined according to the periodic position of the object data.

2. The method according to claim 1, characterized in that The determining whether each sub-setting difference sequence has a periodic regularity includes: Subtract the elements in the sub-set difference sequence in order to obtain a secondary difference sequence corresponding to each sub-set difference sequence; For any of the sub-setting difference sequences in the object data, when the number of consecutive 0 elements in the secondary difference sequence corresponding to the sub-setting difference sequence is greater than or equal to a first preset difference threshold, or when the absolute maximum value of all elements in the secondary difference sequence corresponding to the sub-setting difference sequence is less than or equal to a first preset relaxation threshold, it is determined that the sub-setting difference sequence has a periodic regularity.

3. The method according to claim 1, characterized in that The periodic access rule also includes a periodic rule; The determining whether the object data has a periodic access pattern based on the set access time sequence corresponding to the object data includes: Subtract the set access times in the set access time sequence corresponding to the object data in order to obtain a set difference value sequence; Subtracting the elements in the set difference sequence corresponding to the object data in order to obtain a secondary difference sequence; When the number of consecutive 0 elements in the secondary difference sequence of the object data is greater than or equal to a second preset difference threshold, or when the absolute maximum value of all elements in the secondary difference sequence of the object data is less than or equal to a second preset relaxation threshold, it is determined that the object data has the periodic regularity.

4. The method according to any one of claims 1 to 3, characterized in that: After storing the object data in the storage layer with the highest access speed among the multiple storage layers, the method further includes: In the case that the object data is not accessed within a preset time period after the predicted access time, re-determining whether the object data has the periodic access regularity; In the case where the object data is accessed within a preset time period after the predicted access time, determining the next predicted access time of the object data based on a periodic access rule of the object data; The time interval between the next predicted access time and the current time is determined, and when the time interval is greater than a preset time interval, the object data is migrated out of the storage layer with the highest access speed.

5. The method according to claim 1, characterized in that: The method further comprises: Acquire a data hot / cold range corresponding to each storage layer in a plurality of storage layers in a storage system; the data hot / cold range corresponding to the storage layer is positively correlated with an access speed of the storage layer; For the target object data stored in the storage layer, the data hot and cold value of the target object data is determined according to the access frequency, the access filter condition frequency and the access data feature frequency; wherein the access frequency is used to characterize the number of accesses to the target object data within a preset time period; the access filter condition frequency is used to characterize the number of accesses to the object data list to which the target object data belongs within the preset time period; the object data list is obtained by filtering the object data stored in the storage system according to the preset filter condition; the access data feature frequency is used to characterize the number of times the similarity between the feature information of the object data accessed by the user and the feature information of the target object data within the preset time period is higher than a preset similarity threshold; In the case where the data hot / cold value of the target object data does not match the data hot / cold range of the storage layer to which the target object data belongs, determining that the target object data is the object data to be migrated, and determining a target storage layer whose data hot / cold range matches the data hot / cold value of the object data to be migrated; Migrate the object data to be migrated to the corresponding target storage layer.

6. The method according to claim 5, characterized in that The step of determining the data hot / cold value of the target object data according to the access frequency, the access filter condition frequency and the access data feature frequency for the object data stored in the storage layer includes: Among the object data stored in the storage layer, object data satisfying a preset condition is determined to obtain the target object data; the preset condition includes at least one of the following: the access frequency of the object data within the preset time period is greater than the preset access frequency; the number of object data accessed by the user within the preset time period exceeds the preset access number of the unaccessed object data in the object data list; the number of times the similarity of the feature information of the object data accessed by the user within the preset time period is higher than the preset similarity threshold exceeds the preset feature number, and the unaccessed object data; For the target object data that meets the preset condition, the data hot / cold value of the target object data is determined according to the access frequency, the access filter condition frequency, and the access data feature frequency.

7. A data storage device, characterized in that: include: An acquisition module is used to acquire object data access information within a historical access time period; A determination module, configured to determine, for each object data in the object data access information, a historical access time of the object data based on the object data access information, to obtain a historical access time series; The determination module is further used to determine the set access time corresponding to the time interval to which the historical access time in the historical access time sequence belongs according to the correspondence between the preset time interval and the set access time, and convert the historical access time into the set access time to obtain the set access time sequence; The determination module is further used to determine whether the object data has a periodic access rule based on the set access time sequence corresponding to the object data, the periodic access rule including a double periodic rule, the double periodic rule being used to characterize that the object data has a plurality of cycles that are alternately repeated within the historical access time period, and the object data has a periodic rule in each cycle; The determination module is further configured to determine, when the object data has a periodic access pattern, a predicted access time corresponding to the object data based on the periodic access pattern corresponding to the object data, and store the object data in a storage layer with the highest access speed among the multiple storage layers before the predicted access time; The determination module is specifically used to sequentially subtract the set access times in the set access time sequence corresponding to the object data to obtain a set difference sequence; sequentially subtract the elements in the set difference sequence to obtain a secondary difference sequence; in the case where there is a peak jump point in the secondary difference sequence of the object data, the set difference sequence of the object data is divided into a plurality of sub-set difference sequences using the peak jump point as a separation point; determine whether each sub-set difference sequence has a periodic law; when all the sub-set difference sequences in the object data have the periodic law, determine whether all the sub-set difference sequences satisfy an alternating repetition law; when all the sub-set difference sequences of the object data satisfy the alternating repetition law, determine that the object data has the double periodic law; In the case where the object data has a dual periodic pattern, the determination module is specifically used to: determine the periodic position of the object data according to the periodic access pattern corresponding to the object data and the historical access time series, the periodic position including a high-frequency period, a low-frequency period or a period switching point; determine the predicted access time corresponding to the object data according to the periodic position of the object data.

8. An electronic device, characterized in that: include: one or more processors; one or more memories; Among them, one or more of the memories are used to store computer program codes, and the computer program codes include computer instructions. When one or more of the processors execute the computer instructions, the electronic device executes the data storage method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed on a computer, the computer is enabled to execute the data storage method according to any one of claims 1 to 6.