Data processing method and data storage system

Through online training of the streaming model, the model is updated in real time using the data characteristics of the current access request, which solves the problem of low accuracy of the offline training model in the existing technology when the file access mode changes, and improves the business performance and prediction accuracy of the data storage system. Spend.

WO2024174478A1PCT designated stage expired Publication Date: 2024-08-29HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2023/112731
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-21
Filing Date
2023-08-11
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

When the file access mode changes, the existing data storage system uses offline training models to predict the next access part of the file or the access heat with low accuracy, resulting in reduced business performance.

Method used

Using an online training streaming model, the model is trained in real time by obtaining multiple data features of the file at the time of the current access request, and the model is updated to adapt to changes in file access patterns, thereby improving prediction accuracy.

Benefits of technology

With limited storage and computing resources, more efficient data prediction is achieved, the business performance of the data storage system is improved, the system adapts to changes in file access patterns, and the prediction accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023112731_29082024_PF_FP_ABST
    Figure CN2023112731_29082024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a data processing method and a data storage system. The method comprises: a data storage system training a first flow-based model according to a plurality of first access data features corresponding to a first file upon an (i-1)th access request, and a first access attribute parameter of the first file; then, inputting a plurality of second access data features corresponding to the first file upon an ith access request into the first flow-based model, so as to obtain a second access attribute parameter of the first file upon an (i+1)th access request; and then, pre-fetching or migrating the first file according to the second access attribute parameter. In this way, by means of the method, online training is performed on the first flow-based model by using the plurality of first access data features, and therefore less storage resources and computing power resources are consumed, and the first flow-based model can be adapted to a constantly changing file access mode, such that the service performance of the data storage system can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method and data storage system

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 21, 2023, with application number 202310179944.9 and application name “A Data Processing Method and Data Storage System”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of computer technology, and in particular to a data processing method and a data storage system. Background Art

[0004] Caching and tiering strategies are fundamental to building modern data storage systems. These strategies can reduce the latency of accessing data from cold storage media, extend the life of flash devices, and retain sufficient space in the cache to store new data. However, caching and tiering are very sensitive to the workload (i.e., access requests) of the data storage system, which is typically generated by many applications accessing thousands of files in parallel. Building such strategies requires understanding and leveraging the file access patterns present in these workloads. At the same time, the workloads handled by modern data storage systems are constantly changing, and during their lifecycle, the workloads will transition through multiple file access patterns. Therefore, effectively leveraging multiple file access patterns to predict future access variables of modern data storage systems is a complex task.

[0005] To address the above issues, modern data storage systems use a certain model (such as a heuristic algorithm, a neural network, or a Markov chain, etc.) to process multiple historical file access patterns of the accessed file and predict the next access part of the file to be accessed (such as the file block or file page required for the next access request of the file), and use a certain model (such as reinforcement learning, a neural network, or a gradient boosting tree, etc.) to process multiple historical access frequencies of the accessed file and predict the access popularity of the file to be accessed. However, the training method used by the model involved in the above solution is offline training, and the model needs to consume more computing power and storage resources during offline training. In addition, when the file access pattern is constantly changing, the accuracy of the offline trained model in predicting the next access part or access popularity of the file to be accessed will be relatively low, thereby reducing the business performance of the data storage system.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a data processing method and a data storage system for effectively improving the service performance of the data storage system.

[0008] In a first aspect, an embodiment of the present application provides a data processing method, which can be executed by a data storage system or a component (such as a chip system or circuit, etc.) that can support the data storage system to implement the functions required by the method. Optionally, taking the data storage system executing the data processing method as an example, in this method, the data storage system can, after obtaining a plurality of first access data features corresponding to the first file at the i-1th access request, train a first streaming model based on the plurality of first access data features and the first access attribute parameters of the first file. Thereafter, the data storage system can, after obtaining a plurality of second access data features corresponding to the first file at the i-th access request, input the plurality of second access data features into the first streaming model to obtain the second access attribute parameters of the first file. Then, the data storage system can pre-fetch or migrate the first file based on the second access attribute parameters, wherein the first access attribute parameters are the actual access attribute parameters of the first file at the i-th access request, and the second access attribute parameters are the predicted access attribute parameters of the first file at the i+1th access request.

[0009] In the above design, the data storage system uses multiple first access data features corresponding to the first file at the time of the i-1th access request to perform online training on the first streaming model, rather than using massive historical sample data to perform offline training on the model required to predict the second access attribute parameters of the first file. Therefore, the storage resources and computing power resources consumed are relatively small, and the data storage system can use the first streaming model to predict the second access attribute parameters of the first file at the time of the i+1th access request under limited storage resources and computing power resources. In addition, since the first streaming model begins online training when an access request arrives, the first streaming model is constantly updated and can adapt to the ever-changing file access pattern. Therefore, it can more accurately predict the second access attribute parameters of the first file, thereby effectively improving the business performance of the data storage system.

[0010] In one possible design, the data storage system obtains multiple first access data features corresponding to the first file during the (i-1)th access request, including:

[0011] The data storage system may obtain the plurality of first access data features corresponding to the first file at the time of the (i-1)th access request by at least one of the following: request information corresponding to the first file at the time of the (i-1)th access request, file attribute information, directory attribute information of a directory to which the first file belongs, or file format attribute information of a file format to which the first file belongs;

[0012] The data storage system obtains a plurality of second access data features corresponding to the first file in the i-th access request, including:

[0013] The data storage system can obtain multiple second access data characteristics corresponding to the first file at the i-th access request through at least one of the following: request information, file attribute information, directory attribute information of the directory to which the first file belongs, or file format attribute information of the file format to which the first file belongs, corresponding to the first file at the i-th access request.

[0014] In the above design, the data storage system extracts multiple first access data features corresponding to the first file at the time of the previous access request based on at least one information corresponding to the first file at the time of the previous access request, thereby ensuring that the sample data required for online training of the first streaming model is all up-to-date, thereby enabling the first streaming model to promptly capture changes in file access patterns, thereby enabling the first streaming model to naturally adjust and adapt to changes in workload over time. In this way, the data storage system inputs the multiple first access data features extracted from at least one information corresponding to the first file at the time of the current access request into the trained first streaming model, thereby more accurately determining the predicted access attribute parameters corresponding to the first file at the time of the next access request.

[0015] In one possible design, the request information includes at least one of the following: a requested operation, a requested offset, or a requested length;

[0016] The file attribute information includes at least one of the following: file identification, file size, file creation time, last access time, last update time, most recent opening time, or access popularity;

[0017] The directory attribute information includes at least one of the following: a directory identifier, a total number of different files included in the directory, a total access frequency of the files included in the directory, or a ratio of access modes of the files included in the directory;

[0018] The file format attribute information includes at least one of the following: a file format identifier, a total number of different files belonging to the file format, a total access frequency of the files belonging to the file format, or a ratio of access modes of the files belonging to the file format.

[0019] In the above design, the data storage system extracts access data features by using information of the first file at different information granularities (such as access request, file, directory to which the file belongs, and file format to which the file belongs), and can more comprehensively obtain the data features corresponding to the first file at the time of the access request. Afterwards, the data storage system trains the first streaming model using more comprehensive data features, which can improve the training accuracy of the first streaming model, thereby improving the prediction accuracy of the first streaming model.

[0020] In one possible design, the access pattern includes at least one of the following: a time-intensive pattern, a time-sparse pattern, a spatially sequential pattern, a spatially random pattern, a length-uniform pattern, a length-variable pattern, a file access frequency pattern, or a file complete read frequency pattern.

[0021] In one possible design, the data storage system obtains multiple second access data features corresponding to the first file during the i-th access request, including:

[0022] The data storage system first determines a plurality of third access data features corresponding to the first file in the i-th access request, and then the data storage system may select a plurality of second access data features from the plurality of third access data features.

[0023] In the above design, the data storage system can effectively reduce the number of access data features by selecting a part of the third access data features as the second access data features and inputting them into the first streaming model for prediction, which helps to reduce the storage resources and computing power resources consumed by the first streaming model during prediction, thereby improving the prediction efficiency of the first streaming model.

[0024] In one possible design, the data storage system selects a plurality of second access data characteristics from a plurality of third access data characteristics, including:

[0025] The data storage system can determine the P value corresponding to each of the multiple third access data features based on the P value test method, determine the chi-square value corresponding to each of the multiple third access data features based on the chi-square test method, and determine the Gini value corresponding to each of the multiple third access data features based on the Gini measurement method. Afterwards, the data storage system can perform weighted processing on the P value, chi-square value and Gini value corresponding to each of the multiple third access data features to determine the weighted value corresponding to each of the multiple third access data features. Then, the data storage system can select multiple second access data features whose weighted values ​​are greater than or equal to the first set threshold from the multiple third access data features.

[0026] In the above design, the data storage system can retain only the access data features that have a good impact on the prediction effect of the first streaming model by eliminating or deleting some non-representative access data features. This can reduce the number of access data features required for the prediction of the first streaming model, help reduce the storage resources and computing power resources consumed by the first streaming model during prediction, and reduce possible noise in the prediction process of the first streaming model, thereby effectively improving the prediction efficiency and accuracy of the first streaming model.

[0027] In one possible design, the data storage system selects a plurality of second access data characteristics from a plurality of third access data characteristics, including:

[0028] The data storage system first determines the correlation between any two third access data features among the multiple third access data features. When any correlation is greater than a second set threshold, one of the two third access data features corresponding to the correlation is eliminated. Thereafter, the data storage system may use the remaining third access data features among the multiple third access data features except the eliminated third access data features as the multiple second access data features.

[0029] In the above design, the data storage system can reduce possible noise in the prediction process of the first streaming model by eliminating or deleting some access data features with high correlation, and can reduce the number of access data features required for the prediction of the first streaming model, which helps to reduce the storage resources and computing power resources consumed by the first streaming model during prediction, thereby effectively improving the prediction efficiency and prediction accuracy of the first streaming model.

[0030] In one possible design, the first access attribute parameter is one of the following: actual request offset, actual request offset category, actual access heat or actual access heat category; the second access attribute parameter is one of the following: predicted request offset, predicted request offset category, predicted access heat or predicted access heat category.

[0031] In a second aspect, embodiments of the present application provide a possible data storage system. The beneficial effects can be found in the description of the first aspect and are not further elaborated here. The data storage system has the function of implementing the actions described in the method example of the first aspect. The function can be implemented through hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. In one possible design, the data storage system includes an acquisition module and a processing module. The acquisition module is configured to acquire multiple first access data features corresponding to a first file at the time of the (i-1)th access request. The processing module is configured to train a first streaming model based on the multiple first access data features and first access attribute parameters of the first file. The first access attribute parameters are the actual access attribute parameters of the first file at the time of the (i)th access request. The acquisition module is further configured to acquire multiple second access data features corresponding to the first file at the time of the (i)th access request. The processing module is further configured to input the multiple second access data features into the first streaming model to obtain second access attribute parameters of the first file. The second access attribute parameters are the predicted access attribute parameters of the first file at the time of the (i+1)th access request. The processing module is further configured to prefetch or migrate the first file based on the second access attribute parameters. These modules can perform the corresponding functions in any possible design of the first aspect mentioned above. Please refer to the detailed description in the method example for details, which will not be repeated here.

[0032] In a third aspect, embodiments of the present application provide a possible data storage system, comprising a communication interface and a processor. Optionally, the data storage system further comprises a memory. The memory is configured to store computer programs or instructions. The processor is coupled to the memory and the communication interface. When the processor executes the computer program or instructions, the data storage system performs the method of any possible design of the first aspect described above.

[0033] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the method in any possible design of the first aspect above.

[0034] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computer, the computer executes the method in any possible design of the first aspect above.

[0035] In a sixth aspect, an embodiment of the present application further provides a chip, which is coupled to a memory, and is used to read a computer program stored in the memory and execute a method in any possible design of the first aspect above.

[0036] In a seventh aspect, an embodiment of the present application further provides a chip system, which includes a processor for supporting a computer device to implement the method in any possible design of the first aspect. In one possible design, the chip system also includes a memory for storing programs and data necessary for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0037] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] FIG1 exemplarily shows a schematic diagram of a possible application scenario provided by an embodiment of the present application;

[0039] FIG2 exemplarily shows a schematic diagram of the functional module structure of a data storage system provided in an embodiment of the present application;

[0040] FIG3 exemplarily shows a flow chart of a data processing method provided in an embodiment of the present application;

[0041] FIG4 exemplarily shows a structural diagram of a possible data storage system provided by an embodiment of the present application;

[0042] FIG5 exemplarily shows a structural diagram of a possible data storage system provided by an embodiment of the present application. DETAILED DESCRIPTION

[0043] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0044] The following describes possible application scenarios of the present application. It should be noted that these descriptions are for the purpose of facilitating understanding by those skilled in the art and are not intended to limit the scope of protection claimed by the present application.

[0045] Figure 1 exemplarily shows a possible application scenario to which the present application is applicable. As shown in Figure 1 , the application scenario may include a terminal 100 and a data storage system 200 (such as a hybrid data storage system, or a multi-level storage system).

[0046] Terminal 100 may be a user-side entity with signal transceiver capabilities, providing users with services such as audio, video, voice, and data connectivity. Optionally, terminal 100 may also have data processing capabilities. For example, terminal 100 may send a user-submitted data access request to data storage system 200, enabling the user to access relevant data stored in data storage system 200.

[0047] For example, the terminal 100 may be a smartphone, a tablet computer, a desktop computer, a computer with wireless transceiver capabilities (such as a laptop), a personal digital assistant (PPD), a mobile internet device (MID), an in-vehicle terminal (such as a cockpit computer, also known as an in-vehicle infotainment system), a wearable device with wireless communication capabilities (such as a smart watch, smart bracelet, smart glasses, or a smart helmet), a virtual reality (VR) device, an augmented reality (AR) device, or a smart home device (such as a smart speaker or a smart TV). It should be understood that this application does not limit the specific device form of the terminal.

[0048] The data storage system 200 may be an entity with data processing capabilities and capable of storing large amounts of data, and may provide users with data access services or data storage services, etc. For example, after receiving a user's data access request, the data storage system 200 may provide the user with the data the user needs to access.

[0049] Optionally, the terminal 100 may be communicatively connected to the data storage system 200. For example, the terminal 100 and the data storage system 200 may be communicatively connected via a wired network or a wireless network, which is not limited in this embodiment of the present application.

[0050] Optionally, when the terminal 100 and the data storage system 200 are communicated via a wireless network, the wireless network may be a wireless local area network (WLAN), such as a wireless fidelity (WiFi) network, a ZigBee network, a Bluetooth (BT) network, or a short-range communication network such as a near field communication (NFC) network, or may be other forms of communication networks, which are not limited in the embodiments of the present application.

[0051] It should be noted that the application scenario shown in FIG1 above is only an example. This schematic application scenario is intended to more clearly illustrate the technical solution of the embodiment of the present application and does not limit the application scenario of the data processing method provided by the present application. Moreover, the form and quantity of each structure in the application scenario shown in FIG1 are only used for example and do not constitute a limitation on the present application. In addition, the name of each structure in the application scenario shown in FIG1 is only an example. The name of each structure in the specific implementation may also be other names, and the present application does not make specific limitations on this.

[0052] As described in the background, in existing data storage systems, when file access patterns are constantly changing, the accuracy of using offline trained models to predict the next accessed portion of a file or its access popularity is relatively low, resulting in reduced service performance of the data storage system. In view of this, the present application provides a data processing method to effectively improve the service performance of the data storage system.

[0053] Based on the application scenario shown in Figure 1, the present application also provides a functional module structure of a data storage system. Referring to Figure 2, according to the logical function, the data storage system can be divided into the following functional modules: a data prediction module, a data cache module, a data classification module (or it can be called a data migration module) or a multi-level storage module, etc. Optionally, the data prediction module may include but is not limited to at least one of the following: an access pattern recognition submodule, a feature extraction submodule, a feature selection submodule or a model training / prediction submodule, etc. Optionally, the multi-level storage module may include but is not limited to at least one of the following: a cache medium, a main memory medium, a solid state drive (SSD) medium, a mechanical hard disk (HDD) medium, a tape medium or an optical disc medium, etc.

[0054] It should be noted that the connection relationship between the functional modules shown in Figure 2 is only an example and does not constitute a limitation of the present application. The functions of each functional module are described below.

[0055] The data prediction module is used to predict the access attribute parameters (such as request offset or access popularity, etc.) of a file in the i+1th access request based on the access data characteristics corresponding to the file in the i-th access request.

[0056] The access mode identification submodule is used to identify the access mode corresponding to the i-th access request for a certain file after obtaining the i-th access request submitted by the user.

[0057] A feature extraction submodule is used to extract the request data features carried in the above-mentioned i-th access request (i.e., used to characterize the data features of the i-th access request), or to extract the file data features contained in the metadata of the above-mentioned file (i.e., used to characterize the data features of the above-mentioned file), or to extract the directory data features of the directory to which the above-mentioned file belongs (i.e., used to characterize the data features of the directory to which the above-mentioned file belongs), or to extract the file format data features of the file format to which the above-mentioned file belongs (i.e., used to characterize the data features of the file format to which the above-mentioned file belongs).

[0058] The feature selection submodule is used to select a target data feature (i.e., at least one data feature used for model prediction or training) from the multiple data features extracted by the feature extraction submodule.

[0059] The model training / prediction submodule is used to perform model training or model prediction based on the target data features selected by the feature selection submodule.

[0060] The data cache module is configured to perform corresponding pre-fetch processing on the above-mentioned file based on the predicted request offset or request offset category corresponding to the above-mentioned file at the time of the i+1th access request. For example, taking the predicted request offset (e.g., request offset a) corresponding to a certain file (e.g., file 1) at the time of the i+1th access request as an example, the data cache module can determine the data (e.g., file block 2) required for the i+1th access request of file 1 based on the predicted request offset a corresponding to the i+1th access request of file 1, and can also determine the storage location of file block 2, that is, determine in which storage medium file block 2 is stored, such as whether file block 2 is stored in an HDD medium. Since HDD media is a low-performance storage medium, the data cache module can pre-fetch file block 2 to a high-performance storage medium (such as SSD media) in advance, that is, copy file block 2 and put it on the SSD media. In this way, when the i+1th access request for file 1 arrives, file block 2 is more likely to be hit on the SSD media, so the access delay of the data to be accessed (such as file block 2) can be greatly shortened, thereby effectively improving the business performance of the data storage system.

[0061] The data classification module is used to perform corresponding migration processing on the above-mentioned files according to the predicted access heat or access heat category corresponding to the above-mentioned files at the time of the i+1th access request. For example, taking the predicted access heat (such as access heat 0.8) corresponding to a certain file (such as file 1) at the time of the i+1th access request as an example, since the access heat 0.8 indicates that the access frequency of file 1 is relatively high, that is to say, file 1 is a hot file, therefore, if part of the multiple file blocks included in file 1 are stored in a low-performance storage medium and part are stored in a high-performance storage medium, the data classification module needs to migrate part of the file blocks stored in the low-performance storage medium to the high-performance storage medium; if the multiple file blocks included in file 1 are all stored in a low-performance storage medium, the data classification module needs to migrate the multiple file blocks stored in the low-performance storage medium to the high-performance storage medium.

[0062] Multi-level storage modules are used to store corresponding data. For example, cache media stores part of the data, main memory media stores part of the data, SSD media stores part of the data, HDD media stores part of the data, tape media stores part of the data, and optical disk media stores part of the data.

[0063] The following is a detailed introduction to the specific implementation of the data processing method in the embodiment of the present application based on the application scenario shown in Figure 1.

[0064] FIG3 exemplarily shows a flow chart of a data processing method provided in an embodiment of the present application. The method is applicable to the application scenario illustrated in FIG1 . The method flow can be executed by a data storage system or a component (such as a chip system or circuit, etc.) that can support the data storage system to implement the functions required by the method. Optionally, the data storage system can be the data storage system 200 illustrated in FIG1 . In order to facilitate the introduction of the technical solution provided in an embodiment of the present application, the following is an example of an example of a data storage system executing a data processing method. As shown in FIG3 , the method includes:

[0065] Step 301: The data storage system obtains a plurality of first access data features corresponding to the first file during the (i-1)th access request.

[0066] Optionally, the first access data feature may include a request data feature, a file data feature, a directory data feature, or a file format data feature corresponding to the first file in the (i-1)th access request. Optionally, the first access data feature may also include an access frequency of the first file or a complete read frequency of the first file corresponding to the (i-1)th access request.

[0067] Among them, the request data feature corresponding to the first file at the i-1th access request is obtained by the data storage system through feature extraction of the request information carried in the i-1th access request; the file data feature corresponding to the first file at the i-1th access request is obtained by the data storage system through feature extraction of the file attribute information corresponding to the first file at the i-1th access request; the directory data feature corresponding to the first file at the i-1th access request is obtained by the data storage system through feature extraction of the directory attribute information corresponding to the first file at the i-1th access request; the file format data feature corresponding to the first file at the i-1th access request is obtained by the data storage system through The feature extraction is performed on the file format attribute information corresponding to the first file at the i-1 access request; the access frequency of the first file corresponding to the first file at the i-1 access request is determined by the data storage system based on the total number of accesses to the first file within a period of time (for example, a sliding time window before the access time of the i-1 access request, for example, the length of the sliding time window is 1 hour); the complete read frequency of the first file corresponding to the first file at the i-1 access request is determined by the data storage system based on the request length carried in multiple access requests for the first file within a period of time (for example, a sliding time window before the access time of the i-1 access request).

[0068] For example, referring to Table 1, Table 1 presents the access data features corresponding to any file at different information granularities (such as access request, file, directory, and file format).

[0069] Table 1

[0070] It should be noted that Table 1 is only a simple example for the purpose of illustrating the technical solutions in the embodiments of the present application, and does not constitute a limitation on the technical solutions in the embodiments of the present application.

[0071] Optionally, the request information may include but is not limited to at least one of the following: request operation, request offset or request length, etc.; the file attribute information may include but is not limited to at least one of the following: file identification, file size, file creation time, last access time, last update time, most recent open time or access popularity, etc.; the directory attribute information may include but is not limited to at least one of the following: directory identification, the total number of multiple different files included in the directory, the total access frequency of multiple files included in the directory, or the proportion of access modes of multiple files included in the directory, etc.; the file format attribute information may include but is not limited to at least one of the following: file format identification, the total number of multiple different files belonging to the file format, the total access frequency of multiple files belonging to the file format, or the proportion of access modes of multiple files belonging to the file format, etc.

[0072] For example, the access pattern of a file may include, but is not limited to, at least one of the following: a time pattern, a space pattern, a length pattern, or a frequency pattern. The time pattern includes a time-intensive pattern and a time-sparse pattern; the space pattern includes a space-sequential pattern and a space-random pattern; the length pattern includes a uniform length pattern and a variable length pattern; and the frequency pattern includes a file access frequency pattern and a file complete read frequency pattern.

[0073] The time pattern represents the frequency with which a file (e.g., file 1) is requested for access within a period of time (e.g., a sliding time window before the access time of the current access request for file 1). Optionally, the access frequency of a file may be dense or sparse, so the time pattern can be divided into a time-dense pattern and a time-sparse pattern. For example, for a time pattern, when identifying the time pattern of any file, it is necessary to obtain the access time of the last n access requests for the file, so that the data storage system needs to save the access time of the last n access requests for the file. For example, for a certain file (e.g., file 1), the data storage system can calculate the difference between any two consecutive access times among the access times of the last n access requests for file 1 to obtain multiple first difference values. If the multiple first difference values ​​are all less than or equal to a preset threshold, the data storage system can determine that the access pattern of file 1 is a time-dense pattern. If at least one first difference value among the multiple first difference values ​​is greater than the preset threshold, the data storage system can determine that the access pattern of file 1 is a time-sparse pattern.

[0074] The spatial pattern represents the location of the data (such as a file block or a file page) being accessed in the file (i.e., the request offset carried in the access request submitted by the user for accessing the file). Optionally, the access requests for the data contained in the file can be sequential or non-sequential, so that the spatial pattern can be divided into a spatial sequential pattern and a spatial random pattern. Among them, the spatial sequential pattern refers to continuous access to the data contained in the file, without any gaps in the data requested for access between consecutive access requests. The spatial random pattern refers to non-strictly continuous access requests that follow a certain sorting form of rules. Exemplarily, for the spatial pattern, when identifying the spatial pattern of any file (such as file 1), it is necessary to obtain multiple access requests for file 1 within a period of time (such as a sliding time window before the access time of the current access request of file 1), wherein the last access request of file 1 is excluded. Afterwards, the data storage system can calculate the difference between the request offsets carried by any two consecutive access requests in the remaining access requests within the period of time to obtain multiple second differences. When multiple second difference values ​​are all constant values ​​and equal to the request length (or can be understood as the size of the data requested for access), the data storage system can determine that the spatial pattern of file 1 is a spatial sequential pattern. When multiple second difference values ​​are all constant values ​​and equal to the sum of the request length and a set constant, the data storage system can determine that the spatial pattern of file 1 is a spatial stride pattern. When at least one second difference value among the multiple second difference values ​​is not a constant value, the data storage system can determine that the spatial pattern of file 1 is a spatial random pattern.

[0075] It should be noted that a time window consists of a set of time slices (i.e., multiple segments of the same size). For example, assuming the length of the time window is 1 hour and the length of each time slice is 10 seconds, such as a time slice from 8:00:10 to 9:00:10, the time window includes 6 time slices. Each time slice stores the status information of files, directories, and file formats accessed within a continuous time interval. Because there may be a large time interval between access requests (for example, there is a large time interval between access requests generated on Monday morning and access requests generated in the evening), the time interval is continuous within the time slice, but there may be gaps between time slices. The time window only retains time slices within the time length of the time window; any time slices exceeding this time length will be discarded. The time window and time slice are configurable parameters. By default, the time slice retains information within 10 seconds, and the time window is set to 1 hour.

[0076] For optimization, the time window has a special time slice, called the aggregate time slice, which stores the aggregate information currently stored across time slices in the time window. For example, if the first file is file 1, there are 60 time slices in a time window, and file 1 has different access times in each time slice, the data storage system will aggregate the access times of file 1 in the 60 time slices to obtain the total access times of file 1 in the time window. Each time a time slice is created or updated, the aggregate time slice is also updated. Similarly, when a time slice is discarded, the aggregate time slice is also updated accordingly. Therefore, the aggregate time slice always maintains the latest information and uses it to extract features when needed. In this way, time windows and time slices provide the following advantages: (1) They bind the amount of information stored about files, directories, and file formats that are accessed only within the time window; (2) They can efficiently calculate the aggregate state as time moves forward without recalculating any values; (3) Old information will be discarded from the data storage system and will not affect the data storage system's future decisions. This property can be used as access patterns change and evolve over time.

[0077] The length pattern represents the change in the length of the data requested to be read or written by the access request of the file. Optionally, the size of the data requested to be read or written by the access request of the file may be uniform or may be variable in length. In this way, the length pattern can be divided into a uniform length pattern and a variable length pattern. Exemplarily, for the length pattern, when identifying the length pattern of any file (such as file 1), it is necessary to obtain multiple access requests for file 1 within a period of time (such as a sliding time window before the access time of the current access request of file 1). When the request lengths carried in any two consecutive access requests among the multiple access requests within the period are the same, the data storage system can determine that the length pattern of file 1 is a uniform length pattern. When the request lengths carried in any two consecutive access requests among the multiple access requests within the period are different, the data storage system can determine that the length pattern of file 1 is a variable length pattern.

[0078] The frequency pattern represents the number of times a file (such as file 1) is accessed within a period of time (such as a sliding time window before the access time of the current access request for file 1). Optionally, there are two forms of frequency patterns. The first form is the file access frequency, which is represented by a number between 0 and 1 and can be represented by a logarithmic function. For each file, the file is configured with a counter for counting the number of times the file is accessed. Afterwards, the data storage system can calculate the file access frequency based on the number of times the file is accessed counted by the counter, that is, (1-1 / log(c+2)), where c is used to represent the total number of times the file is accessed within the period. The second form is the file complete read frequency, which is an approximate value of the number of times any file is completely read. In the specific implementation process, the complete read frequency of a file can be represented by the ratio between the total number of bytes accessed by the file within the period and the file size of the file. The total number of bytes accessed by the file within the period can be obtained by the request length carried in multiple access requests for the file within the period.

[0079] Optionally, after the data storage system identifies the access mode of any file, the access mode of the file can be aggregated into the access mode corresponding to the directory to which the file belongs, or the access mode of the file can be aggregated into the access mode corresponding to the file format to which the file belongs. In one example, the access mode corresponding to the directory to which the file belongs and the access mode corresponding to the file format to which the file belongs can be the same, for example, the access mode corresponding to the directory to which the file belongs and the access mode corresponding to the file format to which the file belongs both include a time mode, a space mode, a length mode, and a frequency mode. In another example, the access mode corresponding to the directory to which the file belongs and the access mode corresponding to the file format to which the file belongs can be different, for example, the access mode corresponding to the directory to which the file belongs includes a time mode, a space mode, and a length mode, and the access mode corresponding to the file format to which the file belongs includes a time mode and a space mode.

[0080] Optionally, for some files located in the same directory, it can be generally considered that these files have the same or similar access patterns. For example, taking file 1 and file 2 being located in the same directory as an example, when the data storage system identifies that the time pattern of file 1 is a time-intensive pattern and the space pattern of file 1 is a space-sequential pattern, if the data storage system determines that file 1 and file 2 are located in the same directory, the data storage system can also determine that the time pattern of file 2 is a time-intensive pattern and the space pattern of file 2 is a space-sequential pattern. Optionally, for some files belonging to the same file format, it can be generally considered that these files have the same or similar access patterns. For example, taking file 1 and file 2 belonging to the same file format as an example, when the data storage system identifies that the time pattern of file 1 is a time-intensive pattern and the space pattern of file 1 is a space-sequential pattern, if the data storage system determines that file 1 and file 2 belong to the same file format, the data storage system can also determine that the time pattern of file 2 is a time-intensive pattern and the space pattern of file 2 is a space-sequential pattern.

[0081] For example, based on the above content, the implementation process of the data storage system determining the access mode ratio corresponding to the directory is introduced through the following possible examples.

[0082] Optionally, before obtaining the directory data features corresponding to the first file during the (i-1)th access request, the data storage system needs to identify the access patterns of multiple files contained in the directory to which the first file belongs. The data storage system then aggregates the identified access patterns of the multiple files to obtain an access pattern ratio corresponding to the directory.

[0083] Example 1: Assume that a directory (e.g., directory a) contains three files: file 1, file 2, and file 3. Assume that the i-1th access request received by the data storage system is for file 1. Assuming that all three files have a temporal pattern, a spatial pattern, and a length pattern, when the data storage system receives the i-1th access request, it determines that the i-1th access request is for file 1 and that the directory to which file 1 belongs is directory a. The data storage system then determines, based on directory a, that directory a contains files 1, 2, and 3. The data storage system can then perform access pattern recognition on files 1, 2, and 3, respectively. Optionally, the data storage system first obtains access requests for files 1, 2, and 3 within a sliding time window prior to the access time of the i-1th access request. For example, assuming the sliding time window is one hour long and the access time of the i-1th access request is t0, the data storage system then obtains multiple access requests for files 1, 2, and 3, respectively, within the time period (t0-1 to t0).

[0084] For file 1, in one example, the data storage system can calculate the difference between any two consecutive access times among the access times of the last n access requests for file 1 within the time period (t0-1 to t0) to obtain multiple first difference values. When the multiple first difference values ​​are all less than or equal to a preset threshold value, the data storage system can determine that the time pattern of file 1 is a time-intensive pattern. In another example, the data storage system can calculate the difference between the request offsets carried by any two consecutive access requests among the multiple access requests for file 1 within the time period (t0-1 to t0) to obtain multiple second difference values. When the multiple second difference values ​​are all constant values ​​and equal to the request length, the data storage system can determine that the spatial pattern of file 1 is a spatial sequential pattern. In yet another example, when the request lengths carried by any two consecutive access requests among the multiple access requests for file 1 within the time period (t0-1 to t0) are the same, the data storage system can determine that the length pattern of file 1 is a uniform length pattern. Optionally, when file 1 also has a frequency pattern, the data storage system may calculate the sum of the request lengths carried in multiple access requests for file 1 within the time period (t0-1 to t0), and use the sum as the total number of bytes accessed by file 1 within the time period (t0-1 to t0). Afterwards, the data storage system may calculate the ratio of the total number of bytes accessed by file 1 within the time period (t0-1 to t0) to the file size of file 1, and use the ratio as the complete read frequency of file 1. The complete read frequency of file 1 is used to characterize the file complete read frequency pattern of file 1. In addition, the data storage system may also calculate the total number of accesses to file 1 within the time period (t0-1 to t0), and calculate the access frequency of file 1 based on the total number of accesses to file 1 within the time period (t0-1 to t0). The access frequency of file 1 is used to characterize the file access frequency pattern of file 1.

[0085] For file 2, the data storage system can calculate the difference between any two consecutive access times among the access times of the last n access requests for file 2 within the time period (t0-1 to t0) to obtain multiple first difference values. When the multiple first difference values ​​are all less than or equal to a preset threshold, the data storage system can determine that the time pattern of file 2 is a time-intensive pattern. In another example, the data storage system can calculate the difference between the request offsets carried by any two consecutive access requests among the multiple access requests for file 2 within the time period (t0-1 to t0) to obtain multiple second difference values. When at least one of the multiple second difference values ​​is not a constant value, the data storage system can determine that the spatial pattern of file 2 is a spatially random pattern. In yet another example, when the request lengths carried by any two consecutive access requests among the multiple access requests for file 2 within the time period (t0-1 to t0) are the same, the data storage system can determine that the length pattern of file 2 is a uniform length pattern.

[0086] For file 3, the data storage system can calculate the difference between any two consecutive access times among the access times of the last n access requests for file 3 within the time period (t0-1 to t0) to obtain multiple first difference values. When the multiple first difference values ​​are all less than or equal to a preset threshold, the data storage system can determine that the time pattern of file 3 is a time-intensive pattern. In another example, the data storage system can calculate the difference between the request offsets carried by any two consecutive access requests among the multiple access requests for file 3 within the time period (t0-1 to t0) to obtain multiple second difference values. When at least one of the multiple second difference values ​​is not a constant value, the data storage system can determine that the spatial pattern of file 3 is a spatially random pattern. In yet another example, when the request lengths carried by any two consecutive access requests among the multiple access requests for file 3 within the time period (t0-1 to t0) are different, the data storage system can determine that the length pattern of file 3 is a variable length pattern.

[0087] Then, the data storage system can aggregate the access patterns of the three identified files to determine the proportion of each access pattern corresponding to directory a, for example, the proportion of the time-intensive pattern corresponding to directory a = 3 / 3 = 1, the proportion of the spatial sequential pattern corresponding to directory a = 1 / (1+2) = 1 / 3, the proportion of the spatial random pattern corresponding to directory a = 2 / (1+2) = 2 / 3, the proportion of the length uniform pattern corresponding to directory a = 2 / (1+2) = 2 / 3, and the proportion of the length variable pattern corresponding to directory a = 1 / (1+2) = 1 / 3.

[0088] Example 2: Continuing with the example of directory a including file 1, file 2, and file 3, and the i-1th access request obtained by the data storage system is a request to access file 1, it is assumed that all three files have a time pattern, a space pattern, and a length pattern. Optionally, if the data storage system identifies that the time pattern of file 1 is a time-sparse pattern, the space pattern of file 1 is a space-sequential pattern, and the length pattern of file 1 is a variable-length pattern, then when the data storage system determines that file 1, file 2, and file 3 belong to the same directory a, it can determine that the time pattern of file 2 is also a time-sparse pattern, the space pattern of file 2 is also a space-sequential pattern, the length pattern of file 2 is also a variable-length pattern, the time pattern of file 3 is also a time-sparse pattern, the space pattern of file 3 is also a space-sequential pattern, and the length pattern of file 3 is also a variable-length pattern based on the fact that multiple files belonging to the same directory have the same or similar access patterns. Afterwards, the data storage system can aggregate the access patterns of the three identified files, that is, determine the proportion of each access pattern corresponding to directory a, for example, the proportion of the time-sparse pattern corresponding to directory a = 3 / (1+1+1) = 1, the proportion of the spatial sequential pattern corresponding to directory a = 3 / (1+1+1) = 1, and the proportion of the length-uniform pattern corresponding to directory a = 3 / (1+1+1) = 1. It should be noted that the access pattern identification process of the files in Example 2 can refer to the access pattern identification process of the files in Example 1 above, and will not be repeated here.

[0089] Example 3: Continuing with the example of directory a including file 1, file 2, and file 3, the i-1th access request obtained by the data storage system is a request to access file 1. Assuming that file 1 has a time pattern and a space pattern, file 2 has a time pattern and a length pattern, and file 3 has a space pattern and a length pattern, when the data storage system identifies that the time pattern of file 1 is a time-intensive pattern, the space pattern of file 1 is a space-sequential pattern, the time pattern of file 2 is a time-sparse pattern, the length pattern of file 2 is a length-uniform pattern, the space pattern of file 3 is a space-sequential pattern, and the length pattern of file 3 is a length-variable pattern, the access patterns of the three identified files can be aggregated, that is, the proportion of each access pattern corresponding to directory a is determined. For example, the proportion of the time-intensive pattern corresponding to directory a = 1 / (1+1+0) = 1 / 2, and the proportion of the time-sparse pattern corresponding to directory a = 1 / (1+1+0) = 1 / 2, The spatial order pattern corresponding to directory a accounts for 2 / (1+0+1)=1, the uniform length pattern corresponding to directory a accounts for 1 / (0+1+1)=1 / 2, and the variable length pattern corresponding to directory a accounts for 1 / (0+1+1)=1 / 2. It should be noted that the identification process of the file access pattern in Example 3 can refer to the identification process of the file access pattern in Example 1 above, and will not be repeated here.

[0090] Optionally, the data storage system may also determine the access frequency (or access count) of each of the multiple files contained in the directory to which the first file belongs when obtaining the directory data features corresponding to the i-1th access request of the first file, and aggregate the access frequencies of the multiple files determined to obtain the total access frequency of the multiple files included in the directory. For example, continuing with the example of the three files included in the above-mentioned directory a, assume that the i-1th access request obtained by the data storage system is a request to access file 1. When the data storage system obtains the i-1th access request, the i-1th access request is for requesting access to file 1, and determines that the directory to which file 1 belongs is directory a. Afterwards, based on directory a, the data storage system can determine that directory a includes file 1, file 2, and file 3. Then, based on the access status of file 1 within a period of time (for example, the sliding time window before the access time of the i-1th access request for file 1), the data storage system can determine that the access frequency of file 1 within this period is 5. Based on the access status of file 2 within this period, the data storage system can determine that the access frequency of file 2 within this period is 3. Based on the access status of file 3 within this period, the data storage system can determine that the access frequency of file 3 within this period is 8. The data storage system then aggregates the access frequencies of the three determined files to obtain the total access frequency corresponding to directory a = (5 + 3 + 8) = 16.

[0091] Optionally, the data storage system may also determine the total number of different files contained in the directory to which the first file belongs when obtaining the directory data features corresponding to the first file in the (i-1)th access request. For example, continuing with the example of directory a containing three files, assuming the (i-1)th access request obtained by the data storage system is for access to file 1, when the data storage system obtains the (i-1)th access request, it may determine that the total number of files contained in directory a is 3.

[0092] Exemplarily, the following describes the implementation process of the data storage system determining the access mode ratio corresponding to the file format through the following possible examples.

[0093] Optionally, before obtaining the file format data features corresponding to the first file in the (i-1)th access request, the data storage system needs to identify access patterns for multiple files that share the same file format as the first file. The data storage system then aggregates the identified access patterns for the multiple files to determine a percentage of access patterns corresponding to the file format.

[0094] Example 1: Assume there are three files of a certain file format (e.g., file format a), namely file 1, file 2, and file 3. Assume that the i-1th access request received by the data storage system is for access to file 1. Assuming that all three files have a time pattern, a spatial pattern, and a length pattern, when the data storage system receives the i-1th access request, it determines that the i-1th access request is for access to file 1 and that the file format of file 1 is file format a. Based on file format a, the data storage system can then determine that the files belonging to file format a are file 1, file 2, and file 3. Then, the data storage system can identify the access patterns of file 1, file 2 and file 3 respectively, and identify that the time pattern of file 1 is a time-sparse pattern, the spatial pattern of file 1 is a spatial sequential pattern, and the length pattern of file 1 is a variable length pattern. The time pattern of file 2 is a time-intensive pattern, the spatial pattern of file 2 is a spatial sequential pattern, and the length pattern of file 2 is a uniform length pattern. The time pattern of file 3 is a time-intensive pattern, the spatial pattern of file 3 is a spatial random pattern, and the length pattern of file 3 is a variable length pattern. Then, the data storage system can aggregate the access patterns of the three identified files to determine the proportion of each access pattern corresponding to file format a, such as the proportion of time-intensive patterns corresponding to file format a = 2 / (1+2) = 2 / 3, the proportion of time-sparse patterns corresponding to file format a = 1 / (1+2) = 1 / 3, the proportion of space-sequential patterns corresponding to file format a = 2 / (1+2) = 2 / 3, the proportion of space-random patterns corresponding to file format a = 1 / (1+2) = 1 / 3, the proportion of length-uniform patterns corresponding to file format a = 1 / (1+2) = 1 / 3, and the proportion of length-variable patterns corresponding to file format a = 2 / (1+2) = 2 / 3. It should be noted that the identification process of the file access pattern in Example 1 can refer to the identification process of the file access pattern in Example 1 in the implementation process of determining the proportion of access patterns corresponding to the directory, and will not be repeated here.

[0095] Example 2: Continuing with the example that the files belonging to file format a include file 1, file 2, and file 3, and the i-1th access request obtained by the data storage system is a request to access file 1, it is assumed that all three files have a time pattern, a space pattern, and a length pattern. Optionally, if the data storage system identifies that the time pattern of file 1 is a time-sparse pattern, the space pattern of file 1 is a space-sequential pattern, and the length pattern of file 1 is a variable-length pattern, then when the data storage system determines that files 1, 2, and 3 belong to the same file format a, it can determine that the time pattern of file 2 is also a time-sparse pattern, the space pattern of file 2 is also a space-sequential pattern, the length pattern of file 2 is also a variable-length pattern, the time pattern of file 3 is also a time-sparse pattern, the space pattern of file 3 is also a space-sequential pattern, and the length pattern of file 3 is also a variable-length pattern based on the fact that multiple files belonging to the same file format have the same or similar access patterns. Afterwards, the data storage system can aggregate the access patterns of the three identified files, that is, determine the proportion of each access pattern corresponding to file format a, for example, the proportion of the time sparse pattern corresponding to file format a = 3 / (1+1+1) = 1, the proportion of the spatial sequential pattern corresponding to file format a = 3 / (1+1+1) = 1, and the proportion of the length uniform pattern corresponding to file format a = 3 / (1+1+1) = 1. It should be noted that the identification process of the file access pattern in Example 2 can refer to the identification process of the file access pattern in Example 1 in the implementation process of determining the proportion of the access pattern corresponding to the directory, and will not be repeated here.

[0096] In one possible implementation, when the data storage system obtains the i-1th access request for the first file, it can parse the i-1th access request to obtain the request operation, request timestamp, file name, request offset, request length, file size, process ID and duration of the request operation carried in the i-1th access request. Then, the data storage system can extract the request data features corresponding to the i-1th access request, and the request data features may include but are not limited to data features of the request operation, data features of the request offset and data features of the request length. Optionally, the request data features may also include data features of the total access frequency of the first file within a period of time (such as a sliding time window before the access time of the i-1th access request for the first file), data features of the number of times the first file is opened within the period of time, or data features of the complete read frequency of the first file, etc.

[0097] Optionally, for the request operation carried in the i-1th access request, the data storage system may convert the request operation into a class with a specific number, represented by a number between 1 and 5, where the number 1 represents an open operation, the number 2 represents a write operation, the number 3 represents a read operation, the number 4 represents a close operation, and the number 5 represents a delete operation, and the converted numbers are standardized. For example, if the request operation carried in the i-1th access request is a read operation, the data storage system converts the read operation into the number 3, and divides the number 3 by 5 to obtain a value of 0.6, which is used to characterize the data characteristics of the request operation. For the request offset carried in the i-1th access request (such as the request offset a), the data storage system may standardize the request offset a to obtain a standardized value of (a / M)^0.2, which is used to characterize the data characteristics of the request offset. For the request length (e.g., request length L) carried in the (i-1)th access request, the data storage system may normalize the request length L to obtain a normalized value (L / M)^0.2, which is used to characterize the data characteristics of the request length. M represents the largest file size among the file sizes carried in multiple access requests obtained by the data storage system within a period of time (e.g., a sliding time window before the access time of the (i-1)th access request for the first file).

[0098] Among them, the process ID is used to characterize the application that submits the i-1th access request; the request timestamp is used to indicate the submission time of the i-1th access request; the request operation includes file operations such as opening, closing, reading or writing; the file name is used to indicate the file name of the first file to be accessed; the request offset is used to indicate the file position (in bytes) at which processing starts when reading or writing a file; the request length is used to indicate the amount of data that needs to be processed by the request operation (in bytes); the file size is used to indicate the current size of the first file, and the duration of the request operation is used to indicate the total time required to process the i-1th access request.

[0099] In another possible implementation, after the data storage system obtains the file name carried in the (i-1)th access request, it can query the metadata of the first file corresponding to the file name and extract file data features from the metadata of the first file. The file data features may include but are not limited to data features of the file identifier, data features of the file size, data features of the file creation time, data features of the last access time, data features of the last update time, data features of the most recent multiple opening times, and data features of the current access popularity. Among them, the current size of the first file can be used to characterize the data features of the file size, the creation time of the first file can be used to characterize the data features of the file creation time, the access time corresponding to the (i-2)th access request for the first file can be used to characterize the data features of the last access time, and the last update time of the first file can be used to characterize the data features of the last update time.

[0100] Optionally, for the data characteristics of the file identifier of the first file (e.g., identifier a), the data storage system may normalize identifier a to obtain a normalized value of |Hash value of identifier a|%M / M, which is used to characterize the data characteristics of the file identifier a of the first file. Optionally, the data storage system may also normalize the file name of the first file (e.g., file name d) to obtain a normalized value of |Hash value of file name d|%M / M, which is also used to characterize the data characteristics of the file identifier a of the first file.

[0101] For the data features of the most recent multiple open times of the first file, the data storage system may use the most recent multiple open times before the (i-1)th access request to represent the data features of the most recent multiple open times of the first file. Optionally, the data storage system may also calculate the time difference between any consecutive open times in the most recent multiple open times before the (i-1)th access request to obtain multiple time difference values, and normalize the multiple time difference values ​​to obtain multiple normalized values. The multiple normalized values ​​are used to represent the data features of the most recent multiple open times of the first file.

[0102] For the data characteristics of the current access heat of the first file, the data storage system can first obtain the amount of read data for the first file at each access moment within a period of time (such as a sliding time window, for example, the length of the sliding time window is 1 hour). Afterwards, the data storage system can perform weighted processing on the amount of read data of the first file at each access moment, and use the ratio of the weighted read data amount to the current size of the first file as the current access heat of the first file, that is, the current access heat of the first file = the amount of file read data at each access moment t within a period of time * weight w(t) / current size of the first file. Among them, the weight w(t) of the file read data amount at each access moment t is proportional to the current access moment t 当前 and is inversely proportional to the difference between the access times t. For example, taking the first file as file 1, assume that file 1 has four access times within a period of time, namely time t1, time t2, time t3, and time t4, where time t4 is the current access time of file 1, and assume that the current size of file 1 is B, and assume that the amount of data read by file 1 at time t1 is A1, the amount of data read by file 1 at time t2 is A2, and the amount of data read by file 1 at time t3 is A3. Then, the data storage system can calculate the current access popularity of file 1 as (A1 / (t4-t1)+A2 / (t4-t2)+A3 / (t4-t3)) / B based on the four access times of file 1, the amount of data read corresponding to the four access times of file 1, and the current size of file 1. Here, 1 / (t4-t1) represents the weight of the read data volume A1 at time t1, 1 / (t4-t2) represents the weight of the read data volume A2 at time t2, and 1 / (t4-t3) represents the weight of the read data volume A3 at time t3.

[0103] In another possible implementation, after the data storage system obtains the file name carried in the (i-1)th access request, it can query the directory to which the first file corresponding to the file name belongs, and can query the directory attribute information of the directory to which the first file belongs. Thereafter, the data storage system can extract directory data features from the directory attribute information of the directory to which the first file belongs. The directory data features may include, but are not limited to, data features of the directory identifier, data features of the total number of multiple different files included in the directory, data features of the total access frequency of the multiple files included in the directory, or data features of the access pattern ratios of the multiple files included in the directory.

[0104] Optionally, for the data characteristics of the directory identifier (such as identifier b) of the directory to which the first file belongs, the data storage system can normalize identifier b to obtain a normalized value of |hash value of identifier b|%N / N, and this value |hash value of identifier b|%N / N is used to characterize the data characteristics of the directory identifier b of the directory to which the first file belongs. Optionally, the data storage system can also normalize the directory name (such as directory name c) of the directory to which the first file belongs to obtain a normalized value of |hash value of directory name c|%N / N, and this value |hash value of directory name c|%N / N can also be used to characterize the data characteristics of the directory identifier b of the directory to which the first file belongs. Wherein, N is used to represent the maximum number of files included in the directory to which the first file belongs within a period of time (such as a sliding time window before the access time of the i-1th access request of the first file).

[0105] For the data feature of the total number of multiple different files included in the directory to which the first file belongs, the data storage system can calculate the total number of multiple different files included in the directory to which the first file belongs within a period of time (such as a sliding time window before the access time of the i-1th access request of the first file), and the total number is used to characterize the data feature of the total number of multiple different files included in the directory to which the first file belongs.

[0106] Regarding the data characteristics of the total access frequency of multiple files included in the directory to which the first file belongs, the data storage system can calculate the total number of accesses (i.e., the total access frequency) of the multiple files included in the directory to which the first file belongs within a period of time (such as a sliding time window before the access time of the i-1th access request of the first file) based on at least one access request for each of the multiple files included in the directory to which the first file belongs. The total number of accesses is used to characterize the data characteristics of the total access frequency of the multiple files included in the directory to which the first file belongs.

[0107] With respect to the data characteristics of the access mode ratios of the multiple files included in the directory to which the first file belongs, the data storage system may refer to the aforementioned implementation process for determining the access mode ratios corresponding to the directory to determine the access mode ratios corresponding to the first file, such as at least one of the time-intensive mode ratio, the time-sparse mode ratio, the spatially sequential mode ratio, the spatially random mode ratio, the length-uniform mode ratio, and the length-variable mode ratio. The access mode ratio corresponding to the directory to which the first file belongs is used to characterize the data characteristics of the access mode ratios of the multiple files included in the directory to which the first file belongs.

[0108] In another possible implementation, after the data storage system obtains the file name carried in the (i-1)th access request, it can query the file format of the first file corresponding to the file name and query the file format attribute information of the file format of the first file. The data storage system can then extract file format data features from the file format attribute information of the file format of the first file. The file format data features may include, but are not limited to, data features of a file format identifier, data features of the total number of multiple different files belonging to the file format, data features of the total access frequency of multiple files belonging to the file format, or data features of the access pattern ratios of multiple files belonging to the file format.

[0109] Optionally, for the data features of the file format identifier (e.g., identifier f) of the file format to which the first file belongs, the data storage system may normalize identifier f to obtain a normalized value of |hash value of identifier f|%N / N, which is used to characterize the data features of the file format identifier f of the file format to which the first file belongs. Optionally, the data storage system may also normalize the file format name (e.g., file format name g) of the file format to which the first file belongs to obtain a normalized value of |hash value of file format name g|%N / N, which is also used to characterize the data features of the file format identifier f of the file format to which the first file belongs. Wherein, N is used to represent the maximum number of files included in the file format to which the first file belongs within a period of time (e.g., a sliding time window before the access time of the i-1th access request of the first file).

[0110] For the data feature of the total number of multiple different files belonging to the file format, the data storage system can calculate the total number of multiple different files belonging to the file format within a period of time (such as a sliding time window before the access time of the i-1th access request of the first file), and the total number is used to characterize the data feature of the total number of multiple different files belonging to the file format.

[0111] For the data characteristics of the total access frequency of multiple files belonging to the file format, the data storage system can calculate the total number of accesses (i.e., the total access frequency) of the multiple files belonging to the file format within a period of time (such as a sliding time window before the access time of the i-1th access request of the first file) based on at least one access request for each file in the multiple files belonging to the file format. The total number of accesses is used to characterize the data characteristics of the total access frequency of multiple files belonging to the file format.

[0112] For the data characteristics of the access mode ratios of multiple files belonging to the file format, the data storage system can refer to the above-mentioned implementation process for determining the access mode ratio corresponding to the file format to determine the access mode ratio corresponding to the file format to which the first file belongs, such as at least one of the time-intensive mode ratio, the time-sparse mode ratio, the spatially sequential mode ratio, the spatially random mode ratio, the length-uniform mode ratio, or the length-variable mode ratio. The access mode ratio corresponding to the file format to which the first file belongs is used to characterize the data characteristics of the access mode ratios of multiple files belonging to the file format.

[0113] Step 302: The data storage system trains a first streaming model based on a plurality of first access data features and a first access attribute parameter of the first file.

[0114] Optionally, the first access attribute parameter is used to represent the actual access attribute parameter of the first file in the i-th access request. The first access attribute parameter may include but is not limited to the actual request offset, the actual request offset category, the actual access heat or the actual access heat category.

[0115] For example, taking the data storage system predicting the next request offset of the first file (for example, the predicted request offset of the first file at the i+1th access request) as an example, the implementation process of the data storage system training the first streaming model is introduced through the following two possible implementation methods.

[0116] Implementation Method 1: The data storage system can refer to the implementation method of step 301 above and determine multiple fourth access data features corresponding to the first file at the i-1th access request. The data storage system can then select multiple first access data features from the multiple fourth access data features and input the multiple first access data features and the actual request offset carried in the i-th access request for the first file into the first streaming model for training. In this way, the data storage system can, through Implementation Method 1, delete some non-representative or highly correlated access data features in order to select sufficiently good access data features for training the first streaming model, effectively reducing the number of access data features, thereby alleviating the memory pressure of the data storage system and reducing possible noise during the training of the first streaming model, thereby effectively improving the training efficiency of the first streaming model. Furthermore, through Implementation Method 1, the data storage system can reduce the number of access data features, thereby ensuring that, within limited storage and computing resources, the data storage system can effectively use the first streaming model to predict the predicted access attribute parameters of the first file at the i+1th access request.

[0117] Based on the above implementation manner 1, the implementation process of the data storage system selecting multiple first access data features from multiple fourth access data features is introduced below through the following two possible implementation manners.

[0118] Method 1: The data storage system determines the P value corresponding to each of the multiple fourth access data features based on a P-value test method, determines the chi-square value corresponding to each of the multiple fourth access data features based on a chi-square test method, and determines the Gini value corresponding to each of the multiple fourth access data features based on a Gini measurement method. The data storage system then performs weighted processing on the P value, chi-square value, and Gini value corresponding to each of the multiple fourth access data features to determine a weighted value corresponding to each of the multiple fourth access data features. The data storage system can then select a fourth access data feature whose weighted value is greater than or equal to a first set threshold from the multiple fourth access data features as the first access data feature, or it can sort the weighted values ​​corresponding to the multiple fourth access data features in descending order of weighted values ​​and select the fourth access data feature whose weighted value ranks in the top m as the first access data feature. In this way, the data storage system can retain only the access data features that have a good impact on the prediction effect of the first streaming model by eliminating or deleting some non-representative access data features, thereby improving the training effect of the first streaming model and reducing the storage resources and computing power resources consumed when training the first streaming model.

[0119] Optionally, after selecting multiple first access data features, the data storage system may also determine the correlation between any two first access data features among the multiple first access data features based on a correlation algorithm (such as a cosine similarity algorithm or a Pearson correlation coefficient algorithm, etc.) or a correlation matrix algorithm, thereby obtaining multiple correlations. When any one of the multiple correlations is greater than a second set threshold, the data storage system eliminates or deletes one of the two first access data features corresponding to the correlation. Afterwards, the data storage system may use the remaining first access data features among the multiple first access data features except for the eliminated or deleted first access data features for training the first streaming model. Optionally, the data storage system may also sort the multiple correlations in descending order of correlation, and filter out the correlations that are ranked in the top n. Afterwards, for any one of the top n correlations, the data storage system eliminates or deletes one of the two first access data features corresponding to the correlation. Then, the data storage system can use the remaining first access data features of the multiple first access data features except for the eliminated or deleted first access data features to train the first streaming model. For example, the remaining first access data features include all data features included in the request data features corresponding to the first file at the time of the (i-1)th access request, all data features included in the directory data features, all data features included in the file data features, and data features of the file format identifier included in the file format data features and data features of the total number of multiple different files belonging to the file format. In this way, by eliminating or deleting some access data features with high relevance, the data storage system can retain only the access data features that have a good impact on the prediction effect of the first streaming model, thereby improving the training effect of the first streaming model and reducing the storage resources and computing power resources consumed when training the first streaming model.

[0120] Method 2: The data storage system may determine the correlation between any two fourth access data features from the plurality of fourth access data features based on a correlation algorithm or a correlation matrix algorithm, thereby obtaining multiple correlations. When any one of the plurality of correlations exceeds a second predetermined threshold, the data storage system eliminates or deletes one of the two fourth access data features corresponding to that correlation. The data storage system may then use the remaining fourth access data features from the plurality of fourth access data features, excluding the eliminated or deleted fourth access data features, as the plurality of first access data features. Optionally, the data storage system may also sort the plurality of correlations in descending order of correlation and select the top n correlations. For any one of the top n correlations, the data storage system eliminates or deletes one of the two fourth access data features corresponding to that correlation. The data storage system may then use the remaining fourth access data features from the plurality of fourth access data features, excluding the eliminated or deleted fourth access data features, as the plurality of first access data features.

[0121] Implementation Method 2: The data storage system can refer to the implementation of step 301 above and determine multiple fourth access data features corresponding to the i-1th access request for the first file. The data storage system then directly uses these multiple fourth access data features as the first access data features and inputs the multiple fourth access data features and the actual request offset carried in the i-th access request for the first file into the first streaming model for training.

[0122] Optionally, the first streaming model is a type of model that can provide high accuracy through online training, testing, and evaluation. Exemplarily, the first streaming model can support at least one of the following: (1) processing only one instance at a time; (2) using a limited amount of time to process each instance; (3) using a limited amount of memory; (4) adapting to time changes; and (5) being ready to provide predictions at any time. In other words, the first streaming model can capture changes in the underlying data distribution (such as changes in file access patterns), and the first streaming model can naturally adjust and adapt to changes in workload over time with minimal overhead, thereby significantly reducing the need for massive historical sample data sets.

[0123] The first streaming model sees each individual training sample only once. Therefore, each individual training sample is used to train and test the model. This eliminates the need to split the input data (e.g., 80% of the sample data is used for training and 20% for testing) as is typically done with batch processing models. Instead, each individual training sample can be used for both training and testing. For example, when receiving a current access request for a file, the data storage system can determine the multiple access data features corresponding to the previous access request for file 1 and use these access data features to train and test the first streaming model. Furthermore, during the online training, testing, and evaluation of the first streaming model, a pre-order evaluation technique is employed. In pre-order evaluation, individual training samples are processed in the order in which they were submitted, and each individual training sample is used to test the model before being used to train it. This ensures that the first streaming model is always tested on samples it has never seen before and forces the use of all available data. As the first streaming model is trained with each training sample, its accuracy increases, and as more samples are processed, its accuracy gradually increases and stabilizes.

[0124] Optionally, when the data storage system predicts the next request offset or the next access heat of the first file, since predicting the request offset or predicting the access heat is a regression problem, the first streaming model that the data storage system can use may include but is not limited to an Adaptive Random Forest (ARF) model, a K-Nearest Neighbor (KNN), a Stochastic Gradient Descent (SGD) model, a Stochastic Gradient Descent-Squared Loss (SGD-SL) model, or an Adaptive Gradient-Squared Loss (AdaGrad-SL) model.

[0125] For example, taking the first streaming model as an ARF model, when the data storage system needs to predict the predicted request offset of the first file at the i+1th access request, the data storage system can make the prediction by using the ARF model. Among them, the ARF model has a better balance between prediction accuracy and execution time. When the data storage system obtains the i-th access request of the first file, the data storage system needs to obtain multiple fourth access data features corresponding to the first file at the i-1th access request (such as [data feature 1. data feature 2, data feature 3, ..., data feature n]), and select multiple first access data features from the multiple fourth access data features. After that, the data storage system can use the multiple first access data features and the actual request offset corresponding to the first file at the i-th access request for online training of the ARF model to obtain the trained ARF model.

[0126] Optionally, when the data storage system predicts the next request offset category or the next access heat category of the first file, since predicting the request offset category or predicting the access heat category is a classification problem, the first streaming model that the data storage system can use may include the Hoeffding Tree algorithm (HT) and the like.

[0127] For example, taking the HT model as the first streaming model, when the data storage system needs to predict the predicted access popularity category of the first file at the i+1th access request, the data storage system can use the HT model. The HT model is an advanced, memory-efficient decision tree designed specifically for streaming data and capable of learning from large datasets. It exploits the fact that a small sample size is sufficient to select the optimal split attribute. It also has a unique feature: guaranteed performance, as its output is asymptotically identical to non-incremental learning using infinite examples. When the data storage system receives the i-th access request for the first file, it needs to obtain multiple fourth access data features (e.g., [data feature 1, data feature 2, data feature 3, ..., data feature n]) corresponding to the first file at the i-1th access request and select multiple first access data features from the multiple fourth access data features. The data storage system then uses the multiple first access data features and the actual access popularity category corresponding to the first file at the i-th access request to train the HT model online, resulting in a trained HT model.

[0128] In one example, taking the case where the data storage system obtains multiple first access data features corresponding to the first file at the time of the i-1th access request to train the ARF model as an example, first, the data storage system can refer to the implementation of the above step 301 to determine [data feature 1, data feature 2, data feature 3, ..., data feature n] corresponding to the first file at the time of the i-1th access request. Afterwards, the data storage system can determine the numerical value P1 corresponding to data feature 1, the numerical value P2 corresponding to data feature 2, the numerical value P3 corresponding to data feature 3, ..., the numerical value Pn corresponding to data feature n according to the P-value test method, determine the chi-square value s1 corresponding to data feature 1, the chi-square value s2 corresponding to data feature 2, the chi-square value s3 corresponding to data feature 3, ..., the chi-square value sn corresponding to data feature n according to the chi-square test method, and determine the Gini value q1 corresponding to data feature 1, the Gini value q2 corresponding to data feature 2, the Gini value q3 corresponding to data feature 3, ..., the Gini value qn corresponding to data feature n according to the Gini measurement method. Afterwards, the data storage system can perform weighted processing on the P value, chi-square value, and Gini value corresponding to each data feature to obtain a weighted value corresponding to each data feature, such as the weighted value corresponding to data feature 1 (P1+s1+q1), the weighted value corresponding to data feature 2 (P2+s2+q2), the weighted value corresponding to data feature 3 (P3+s3+q3), ..., the weighted value corresponding to data feature n (Pn+sn+qn). Then, the data storage system can select data features with weighted values ​​greater than or equal to a first set threshold from the n data features for training the ARF model. For example, if the weighted value corresponding to data feature 1, the weighted value corresponding to data feature 2, the weighted value corresponding to data feature 3, the weighted value corresponding to data feature 5, the weighted value corresponding to data feature 7, and the weighted value corresponding to data feature 10 are greater than or equal to the first set threshold, the data storage system can use data feature 1, data feature 2, data feature 3, data feature 5, data feature 7, and data feature 10 to train the ARF model.

[0129] Step 303: The data storage system obtains a plurality of second access data features corresponding to the first file during the i-th access request, inputs the plurality of second access data features into the first streaming model, and obtains a second access attribute parameter of the first file.

[0130] Optionally, the second access attribute parameter is used to represent the predicted access attribute parameter of the first file at the time of the i+1th access request. The second access attribute parameter may include but is not limited to a predicted request offset, a predicted request offset category, a predicted access heat, or a predicted access heat category.

[0131] Optionally, the second access data feature may include a request data feature, a file data feature, a directory data feature, or a file format data feature corresponding to the i-th access request for the first file. Optionally, the second access data feature may also include an access frequency of the first file or a complete read frequency of the first file corresponding to the i-th access request for the first file.

[0132] Among them, the request data feature corresponding to the first file at the i-th access request is obtained by the data storage system through feature extraction of the request information carried in the i-th access request; the file data feature corresponding to the first file at the i-th access request is obtained by the data storage system through feature extraction of the file attribute information corresponding to the first file at the i-th access request; the directory data feature corresponding to the first file at the i-th access request is obtained by the data storage system through feature extraction of the directory attribute information corresponding to the first file at the i-th access request; the file format data feature corresponding to the first file at the i-th access request is obtained by the data storage system through feature extraction of the file format attribute information corresponding to the first file at the i-th access request; the access frequency of the first file corresponding to the i-th access request is determined by the data storage system based on the total number of accesses to the first file within a period of time (for example, a sliding time window before the access time of the i-th access request); and the complete read frequency of the first file corresponding to the i-th access request is determined by the data storage system based on the request lengths carried in multiple access requests for the first file within a period of time (for example, a sliding time window before the access time of the i-th access request).

[0133] For example, taking the data storage system predicting the next request offset of the first file (for example, the predicted request offset of the first file at the i+1th access request) as an example, the following two possible implementation methods are used to introduce the implementation process of the data storage system determining the predicted request offset of the first file at the i+1th access request by using the trained first streaming model.

[0134] Implementation Method 1: The data storage system can refer to the implementation of step 301 above and determine multiple third access data features corresponding to the first file during the i-th access request. The data storage system can then select multiple second access data features from the multiple third access data features and input them into the trained first streaming model to obtain the predicted request offset for the first file during the i+1-th access request.

[0135] Optionally, the implementation process of the data storage system selecting multiple second access data features from multiple third access data features can refer to the implementation process of the data storage system selecting multiple first access data features from multiple fourth access data features, which will not be repeated here.

[0136] Implementation Method 2: The data storage system can refer to the implementation of step 301 above and determine multiple third access data features corresponding to the first file during the i-th access request. The data storage system then directly inputs the multiple third access data features as second access data features into the first streaming model to obtain the predicted request offset for the first file during the i+1-th access request.

[0137] In an example, when the data storage system needs to predict the predicted request offset of the first file at the i+1th access request, taking the first streaming model as the ARF model and the first file as file 1 as an example, the data storage system can make the prediction by using the trained ARF model.

[0138] Optionally, when the data storage system obtains the i-th access request for file 1, before predicting the predicted request offset for file 1 in the i+1-th access request, the data storage system needs to obtain multiple third access data features corresponding to file 1 in the i-th access request (e.g., [data feature 1. data feature 2, data feature 3, ..., data feature 20]). Thereafter, the data storage system can determine, based on a P-value test method, the numerical value P1 corresponding to data feature 1, the numerical value P2 corresponding to data feature 2, the numerical value P3 corresponding to data feature 3, ..., the numerical value P20 corresponding to data feature 20; determine, based on a chi-square test method, the chi-square value s1 corresponding to data feature 1, the chi-square value s2 corresponding to data feature 2, the chi-square value s3 corresponding to data feature 3, ..., the chi-square value s20 corresponding to data feature 20; and determine, based on a Gini metric method, the Gini value q1 corresponding to data feature 1, the Gini value q2 corresponding to data feature 2, the Gini value q3 corresponding to data feature 3, ..., the Gini value q20 corresponding to data feature 20. Afterwards, the data storage system can perform weighted processing on the P value, chi-square value, and Gini value corresponding to each data feature to obtain the weighted value corresponding to each data feature, such as the weighted value corresponding to data feature 1 (P1+s1+q1), the weighted value corresponding to data feature 2 (P2+s2+q2), the weighted value corresponding to data feature 3 (P3+s3+q3), ..., the weighted value corresponding to data feature 20 (P20+s20+q20).

[0139] Then, the data storage system can select data features whose weighted values ​​are greater than or equal to the first set threshold from the 20 data features, such as the weighted value corresponding to data feature 1, the weighted value corresponding to data feature 2, the weighted value corresponding to data feature 3, the weighted value corresponding to data feature 5, the weighted value corresponding to data feature 7, the weighted value corresponding to data feature 8, the weighted value corresponding to data feature 9, the weighted value corresponding to data feature 10, the weighted value corresponding to data feature 16, and the weighted value corresponding to data feature 18 are greater than or equal to the first set threshold. The data storage system can input data feature 1, data feature 2, data feature 3, data feature 5, data feature 7, data feature 8, data feature 9, data feature 10, data feature 16, and data feature 18 into the trained ARF model to obtain the predicted request offset of file 1 at the i+1th access request, such as the predicted request offset is 3.

[0140] In another example, when the data storage system needs to predict the predicted access heat category of the first file at the i+1th access request, taking the first streaming model as the HT model and the first file as file 1 as an example, the data storage system can make the prediction by using the trained HT model.

[0141] Optionally, when the data storage system obtains the i-th access request for file 1, before predicting the predicted access popularity category of file 1 in the i+1-th access request, the data storage system needs to obtain multiple third access data features corresponding to file 1 in the i-th access request (for example, [data feature 1. data feature 2, data feature 3, ..., data feature 15]). Afterwards, the data storage system can determine the numerical value P1 corresponding to data feature 1, the numerical value P2 corresponding to data feature 2, the numerical value P3 corresponding to data feature 3, ..., the numerical value P15 corresponding to data feature 15 based on the P-value test method, determine the chi-square value s1 corresponding to data feature 1, the chi-square value s2 corresponding to data feature 2, the chi-square value s3 corresponding to data feature 3, ..., the chi-square value s15 corresponding to data feature 1, based on the chi-square test method, and determine the Gini value q1 corresponding to data feature 1, the Gini value q2 corresponding to data feature 2, the Gini value q3 corresponding to data feature 3, ..., the Gini value q15 corresponding to data feature 1, based on the Gini measurement method. Afterwards, the data storage system can perform weighted processing on the P value, chi-square value, and Gini value corresponding to each data feature to obtain the weighted value corresponding to each data feature, such as the weighted value corresponding to data feature 1 (P1+s1+q1), the weighted value corresponding to data feature 2 (P2+s2+q2), the weighted value corresponding to data feature 3 (P3+s3+q3), ..., the weighted value corresponding to data feature 20 (P15+s15+q15).

[0142] Then, the data storage system can select data features from the 15 data features whose weighted values ​​are greater than or equal to the first set threshold, such as the weighted value corresponding to data feature 1, the weighted value corresponding to data feature 2, the weighted value corresponding to data feature 3, the weighted value corresponding to data feature 5, the weighted value corresponding to data feature 7, the weighted value corresponding to data feature 8, the weighted value corresponding to data feature 16, and the weighted value corresponding to data feature 18 are greater than or equal to the first set threshold. The data storage system can input data feature 1, data feature 2, data feature 3, data feature 5, data feature 7, data feature 8, data feature 16, and data feature 18 into the trained HT model to obtain the predicted access heat category of file 1 at the i+1th access request, such as the predicted access heat category is HOTNESS_SIX (indicating that the access heat of file 1 is the hottest).

[0143] For example, the access popularity categories include the following categories: HOTNESS_ONE, HOTNESS_TWO, HOTNESS_THREE, HOTNESS_FOUR, HOTNESS_FIVE, and HOTNESS_SIX (indicating that the file's access popularity is the hottest). The numbers ONE, TWO, THREE, FOUR, FIVE, and SIX in the category represent the hotness (or coldness) of the file's access popularity. HOTNESS_ONE indicates that the file's access popularity is the coldest, and HOTNESS_SIX indicates that the file's access popularity is the hottest.

[0144] Step 304: The data storage system pre-fetches or migrates the first file according to the second access attribute parameter.

[0145] Optionally, in one example, when the second access attribute parameter is the predicted request offset corresponding to the first file at the time of the i+1th access request (e.g., the predicted request offset is 3), the data storage system may prefetch the first file based on the predicted request offset. For example, taking the first file as file 1, assuming that file 1 includes three file blocks, namely file block 1, file block 2, and file block 3, the predicted request offset 3 corresponds to file block 3 in the first file. In other words, the i+1th access request is likely to be for requesting access to file block 3 in the first file, and file block 3 is stored in a low-performance medium (e.g., an HDD medium). In this way, the data storage system may prefetch a copy of file block 3 to a high-performance storage medium (e.g., a main memory medium) in advance. In this way, when the i+1th access request for the first file arrives, the data storage system can quickly query file block 3 in the main memory medium, thereby effectively shortening the access latency of the i+1th access request.

[0146] In another example, when the second access attribute parameter is a predicted request offset category corresponding to the first file in the (i+1)th access request, the data storage system may prefetch the first file according to the predicted request offset category.

[0147] Exemplarily, the request offset categories include the following categories: (1) OFFSET_SEQ category, indicating that the next request offset is adjacent to the current request offset; (2) OFFSET_RANDOM category, indicating that the next request offset is not adjacent to the current request offset; (3) OFFSET_NONE category, indicating that the file will no longer be read in the next access request.

[0148] For example, let's assume that the first file is file 1, and the predicted request offset type corresponding to the i+1th access request for file 1 is OFFSET_SEQ. Assume that file 1 includes four file blocks: file block 1, file block 2, file block 3, and file block 4. Assume that the request offset corresponding to the i-th access request for file 1 is 3, and that request offset 3 corresponds to file block 3 in file 1. Based on the predicted request offset type being OFFSET_SEQ, the data storage system can determine that the i+1th access request for file 1 is likely to be requesting file block 4 in file 1. If file block 4 is stored in high-performance media (such as main memory), the data storage system does not need to prefetch it. If file block 4 is stored in low-performance media (such as HDD media), the data storage system needs to prefetch a copy of file block 4 to a high-performance storage medium (such as cache media). This way, when the i+1th access request for the first file arrives, the data storage system can quickly retrieve file block 4 from the cache media, effectively reducing the access latency of the i+1th access request.

[0149] In yet another example, when the second access attribute parameter is the predicted access popularity of the first file corresponding to the (i+1)th access request, the data storage system may migrate the first file according to the predicted access popularity.

[0150] Exemplarily, the hotness or coldness of the file's access popularity can be represented by a value between 0 and 1, wherein a value of 0 indicates that the file's access popularity is the coldest, and a value of 1 indicates that the file's access popularity is the hottest.

[0151] For example, let's assume that the first file is file 1, and the predicted access heat corresponding to file 1 at the i+1th access request is 0.9. Assume that file 1 includes three file blocks, namely file block 1, file block 2, and file block 3. Based on the predicted access heat of 0.9 corresponding to file 1 at the i+1th access request, the data storage system can determine that the future access heat of file 1 will be relatively hot. Therefore, when the data storage system determines that the three file blocks included in file 1 are all stored in a high-performance storage medium, the data storage system does not need to migrate the three file blocks included in file 1. When the data storage system determines that the three file blocks included in file 1 are all stored in a low-performance storage medium (such as an optical disc medium), the data storage system needs to migrate the three file blocks included in file 1 to a high-performance storage medium in advance. For example, the data storage system can migrate file block 1, file block 2, and file block 3 to the main storage medium, or it can migrate file block 1 to the cache medium and file block 2 and file block 3 to the main storage medium. When the data storage system determines that file block 1 is stored in a high-performance storage medium, and file blocks 2 and 3 are stored in a low-performance storage medium, the data storage system does not need to migrate file block 1. Instead, it needs to migrate file blocks 2 and 3 from the low-performance storage medium to the high-performance storage medium. In this way, when the i+1th access request for file 1 arrives, the data storage system can quickly search the high-performance storage medium for the file block corresponding to the request offset carried by the i+1th access request, thereby effectively shortening the access latency of the i+1th access request.

[0152] In another example, when the second access attribute parameter is the predicted access heat category corresponding to the first file at the (i+1)th access request, the data storage system may migrate the first file according to the predicted access heat category.

[0153] For example, let's assume that the first file is file 1, and the predicted access popularity category corresponding to file 1 at the i+1th access request is HOTNESS_FIVE. Assume that file 1 includes three file blocks: file block 1, file block 2, and file block 3. Based on the predicted access popularity category HOTNESS_FIVE corresponding to file 1 at the i+1th access request, the data storage system can determine that file 1 will have relatively high access popularity in the future. Therefore, if the data storage system determines that all three file blocks included in file 1 are stored in a high-performance storage medium, the data storage system does not need to migrate the three file blocks included in file 1. If the data storage system determines that all three file blocks included in file 1 are stored in a low-performance storage medium (such as an optical disc), the data storage system needs to migrate the three file blocks included in file 1 to the high-performance storage medium in advance. If the data storage system determines that file block 1 is stored in a high-performance storage medium, and file blocks 2 and 3 are stored in a low-performance storage medium, the data storage system does not need to migrate file block 1, but needs to migrate file blocks 2 and 3 from the low-performance storage medium to the high-performance storage medium. In addition, optionally, when the data storage system determines that a certain portion of data (such as file block 2) in a high-performance storage medium (such as a main memory medium) needs to be eliminated, if the data storage system determines that the future access popularity of file 1 is relatively hot, the data storage system can store file block 2 in another high-performance storage medium (such as an SSD medium); if the data storage system determines that the future access popularity of file 1 is relatively cold, the data storage system can directly eliminate file block 2.

[0154] For another example, let's assume that the first file is file 1, and the predicted access heat category corresponding to file 1 at the time of the i+1th access request is HOTNESS_TWO. Assume that file 1 includes three file blocks, namely file block 1, file block 2, and file block 3. Based on the predicted access heat category HOTNESS_TWO corresponding to file 1 at the time of the i+1th access request, the data storage system can determine that the future access heat of file 1 will be relatively cold. Therefore, when the data storage system determines that the three file blocks included in file 1 are all stored in a low-performance storage medium, the data storage system does not need to migrate the three file blocks included in file 1. When the data storage system determines that the three file blocks included in file 1 are all stored in a high-performance storage medium (such as a main memory medium), the data storage system needs to migrate the three file blocks included in file 1 to the low-performance storage medium in advance. For example, the data storage system can migrate file block 1, file block 2, and file block 3 to HDD media, or it can migrate file block 1 to HDD media and file block 2 and file block 3 to optical disk media. When the data storage system determines that file block 1 is stored in a low-performance storage medium and file block 2 and file block 3 are stored in a high-performance storage medium, the data storage system does not need to migrate file block 1, but needs to migrate file block 2 and file block 3 from the high-performance storage medium to the low-performance storage medium.

[0155] It should be noted that in the description of this application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of A, B and C" includes A, B, C, AB, AC, BC or ABC. And, unless otherwise specified, the ordinal numbers such as "first", "second", and "third" mentioned in the embodiments of this application are used to distinguish multiple objects and are not used to limit the order, timing, priority or importance of multiple objects. In addition, the terms "including", "comprising", "having" and their variations appearing in this application all mean "including but not limited to" unless otherwise specifically emphasized.

[0156] In addition, it should be noted that each step involved in the above embodiments can be performed by a corresponding device, or by a component such as a chip, processor, or chip system within the device, and the embodiments of the present application do not limit this. The above embodiments are described only as examples of execution by corresponding devices.

[0157] It should be noted that in each of the above embodiments, some steps may be selected for implementation, and the order of the steps in the diagrams may be adjusted for implementation, and this application does not limit this. It should be understood that executing some of the steps in the diagrams, adjusting the order of the steps, or combining them for specific implementation all fall within the scope of protection of this application.

[0158] It is understandable that in order to implement the functions in the above embodiments, the various devices involved in the above embodiments include hardware structures and / or software modules corresponding to the execution of each function. It should be readily apparent to those skilled in the art that, in combination with the units and method steps of the various examples described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0159] It should be noted that the "steps" in the embodiments of this application are merely illustrative and serve as a method of expression for a better understanding of the embodiments. They do not constitute a substantial limitation on the execution of the solutions of this application. For example, the "steps" can also be understood as "features." Furthermore, the steps do not constitute any limitation on the execution order of the solutions of this application. Any changes to the order of steps, or any operations such as step merging or splitting that do not affect the implementation of the overall solution, resulting in new technical solutions, are also within the scope of this application.

[0160] Based on the same concept, an embodiment of the present application also provides a possible data storage system, which is suitable for the application scenario illustrated in FIG1 . The data storage system is used to implement the data processing method provided in the above embodiments, or the module (such as a chip) of the data storage system is used to implement the data processing method provided in the above embodiments, thereby also achieving the beneficial effects of the above embodiments. In an embodiment of the present application, the data storage system may be a data storage system 200 as illustrated in FIG1 .

[0161] Referring to Figure 4, the data storage system 400 includes an acquisition module 401 and a processing module 402. The acquisition module 401 is used to acquire multiple first access data features corresponding to the first file at the i-1th access request. The processing module 402 is used to train the first streaming model based on the multiple first access data features and the first access attribute parameters of the first file. The first access attribute parameters are the actual access attribute parameters of the first file at the i-th access request. The acquisition module 401 is also used to acquire multiple second access data features corresponding to the first file at the i-th access request. The processing module 402 is also used to input the multiple second access data features into the first streaming model to obtain the second access attribute parameters of the first file. The second access attribute parameters are the predicted access attribute parameters of the first file at the i+1th access request. The processing module 402 is also used to pre-fetch or migrate the first file based on the second access attribute parameters.

[0162] For a more detailed description of the acquisition module 401 and the processing module 402 , please refer to the relevant description of the data storage system in the above method embodiment, which will not be repeated here.

[0163] It should be understood that the acquisition module 401 in the embodiment of the present application can be implemented by a communication interface or a communication interface related circuit component, and the processing module 402 can be implemented by a processor or a processor related circuit component.

[0164] It should be noted that the division of modules in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0165] 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 computer-readable storage medium. Based on this understanding, the technical solution 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, or a server, etc.) or a processor to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0166] Based on the same concept, an embodiment of the present application also provides a possible data storage system, which is suitable for the application scenario shown in Figure 1. The data storage system is used to implement the technical solutions involved in the data storage system in the above embodiments, and therefore can also achieve the beneficial effects of the data storage system in the above method embodiments. Referring to Figure 5, the data storage system 500 includes: a communication interface 501, a processor 502. Optionally, the data storage system 500 also includes a memory 503. The communication interface 501, the processor 502 and the memory 503 are interconnected. When the data storage system 500 is used to implement the technical solutions involved in the data storage system provided in the above embodiments, the communication interface 501 can be used to implement the functions of the above-mentioned acquisition module 401, and the processor 502 is used to implement the functions of the above-mentioned processing module 402.

[0167] Optionally, the communication interface 501, the processor 502, and the memory 503 are interconnected via a bus 504. The bus 504 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, FIG5 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0168] The communication interface 501 is used to receive and send data. For example, when the data storage system is the data storage system 200 shown in FIG1 , the communication interface 501 can communicate with the terminal 100 shown in FIG1 , or can also communicate with other devices (such as a cloud or service device) outside the application scenario shown in FIG1 . Optionally, the communication interface 501 can be an input / output interface. For example, the data storage system can use the communication interface to communicate with the cloud or service device.

[0169] The functions of the processor 502 can refer to the description of the corresponding functions involved in the data storage system in the above embodiment, and will not be repeated here. Among them, the processor 502 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP, etc. The processor 502 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. When implementing the above-mentioned functions, the processor 502 can be implemented through hardware, and of course, it can also execute the corresponding software implementation through hardware.

[0170] The memory 503 is used to store program instructions, etc. Specifically, the program instructions may include program code, which includes computer operating instructions. The memory 503 may include random access memory (RAM) or non-volatile memory (non-volatile memory), such as at least one disk storage device. The processor 502 executes the program instructions stored in the memory 503 to implement the above functions, thereby implementing the method steps required to be executed by the data storage system in the above embodiment.

[0171] Based on the same concept, an embodiment of the present application further provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the method provided in the above embodiment.

[0172] Based on the same concept, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computer, the computer executes the method provided in the above embodiment.

[0173] The storage medium may be any available medium that can be accessed by a computer. By way of example and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.

[0174] Based on the same concept, an embodiment of the present application further provides a chip, which is coupled to a memory and is used to read a computer program stored in the memory to implement the method provided in the above embodiment.

[0175] Based on the same concept, an embodiment of the present application also provides a chip system, which includes a processor for supporting a computer device to implement the functions involved in the data storage system in the above embodiments. In one possible design, the chip system also includes a memory for storing the necessary programs and data for the computer device. The chip system can be composed of a chip or can include a chip and other discrete devices.

[0176] The methods provided in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).

[0177] The steps of the methods described in the embodiments of the present application can be directly embedded in hardware, software units executed by a processor, or a combination of the two. The software units can be stored in RAM, ROM, EEPROM, registers, hard disks, removable disks, CD-ROMs, or other storage media in any form known in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Alternatively, the storage medium can also be integrated into the processor. The processor and storage medium can be arranged in an ASIC.

[0178] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0180] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: Applied to a data storage system, the method comprises: Obtaining a plurality of first access data features corresponding to the first file at the time of the (i-1)th access request; Training a first streaming model according to the plurality of first access data features and a first access attribute parameter of the first file; wherein the first access attribute parameter is an actual access attribute parameter of the first file at the time of the i-th access request; Obtaining a plurality of second access data features corresponding to the first file at the time of the i-th access request, inputting the plurality of second access data features into the first streaming model, and obtaining a second access attribute parameter of the first file; wherein the second access attribute parameter is a predicted access attribute parameter of the first file at the time of the i+1-th access request; Pre-fetch or migrate the first file according to the second access attribute parameter.

2. The method according to claim 1, characterized in that Acquiring a plurality of first access data features corresponding to the first file at the time of the (i-1)th access request, including: Acquire a plurality of first access data features corresponding to the first file at the time of the (i-1)th access request by at least one of the following: request information, file attribute information, directory attribute information of a directory to which the first file belongs, or file format attribute information of a file format to which the first file belongs, corresponding to the first file at the time of the (i-1)th access request; Acquiring a plurality of second access data features corresponding to the first file during the i-th access request, including: Multiple second access data features corresponding to the first file at the i-th access request are obtained through at least one of the following: request information, file attribute information, directory attribute information of the directory to which the first file belongs, or file format attribute information of the file format to which the first file belongs, corresponding to the first file at the i-th access request.

3. The method according to claim 2, characterized in that The request information includes at least one of the following: a request operation, a request offset, or a request length; The file attribute information includes at least one of the following: file identification, file size, file creation time, last access time, last update time, most recent multiple opening times or access popularity; The directory attribute information includes at least one of the following: a directory identifier, a total number of multiple different files included in the directory, a total access frequency of multiple files included in the directory, or a proportion of access modes of multiple files included in the directory; The file format attribute information includes at least one of the following: a file format identifier, a total number of multiple different files belonging to the file format, a total access frequency of multiple files belonging to the file format, or a proportion of access modes of multiple files belonging to the file format.

4. The method according to claim 3, characterized in that The access pattern includes at least one of the following: a time-intensive pattern, a time-sparse pattern, a spatial sequential pattern, a spatial random pattern, a uniform length pattern, a variable length pattern, a file access frequency pattern, or a file complete read frequency pattern.

5. The method according to any one of claims 1 to 4, characterized in that: Acquiring a plurality of second access data features corresponding to the first file during the i-th access request, including: Determine a plurality of third access data features corresponding to the first file at the time of the i-th access request; The plurality of second access data characteristics are selected among the plurality of third access data characteristics.

6. The method according to claim 5, characterized in that Selecting the plurality of second access data features from the plurality of third access data features comprises: Determine the P value corresponding to each of the plurality of third access data features according to the P value test method, determine the chi-square value corresponding to each of the plurality of third access data features according to the chi-square test method, and determine the Gini value corresponding to each of the plurality of third access data features according to the Gini measurement method; Performing weighted processing on the P value, the chi-square value, and the Gini value corresponding to each of the plurality of third access data features, and determining a weighted value corresponding to each of the plurality of third access data features; The plurality of second access data features whose weighted values ​​are greater than or equal to a first set threshold are selected from the plurality of third access data features.

7. The method according to claim 5, characterized in that Selecting the plurality of second access data features from the plurality of third access data features comprises: determining a correlation between any two third access data features among the plurality of third access data features; When any correlation is greater than a second set threshold, one of the two third access data features corresponding to the correlation is eliminated; The remaining third access data features except the eliminated third access data features in the plurality of third access data features are used as The plurality of second access data characteristics.

8. The method according to any one of claims 1 to 7, characterized in that: The first access attribute parameter is one of the following: actual request offset, actual request offset category, actual access heat or actual access heat category; the second access attribute parameter is one of the following: predicted request offset, predicted request offset category, predicted access heat or predicted access heat category.

9. A data storage system, characterized in that: The method comprises modules for executing the method as claimed in any one of claims 1 to 8.

10. A data storage system, characterized in that: include Communication interface, used to receive and send data; Memory for storing computer program instructions and data; A processor is used to execute and call the computer program instructions and data in the memory so that the data storage system performs the method as claimed in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed by a computer, the computer is enabled to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product comprises a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 8.

13. A chip, characterized in that: The chip is coupled to a memory, and the chip reads a computer program stored in the memory to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Massive small file-oriented user hotspot data access prediction method

    CN108446340A

  • Event trigger probability estimation model training method and event trigger probability estimation method

    CN111047009A

  • Semantic recognition method and device, equipment and storage medium

    CN112530437A

  • Streaming model training method and device, computer equipment and storage medium

    CN113902137A

  • Prefetching method, electronic equipment, storage medium and program product

    CN115470157A

Cited By

  • Data distributed storage method, computer equipment and program product

    CN119254632A

  • Multi-user storage docking method of AI platform and AI system

    CN120909808A