Data processing method and data storage system
Through online training of the streaming model, the data characteristics of the current access request are used to update the attribute parameters of the next access request to predict the file, which solves the problem of low accuracy of the offline training model in the existing technology when the file access mode changes, and improves data storage. System business performance.
Patent Information
- Application Number
- CN202310179944.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-02-21
AI Technical Summary
When file access patterns change, existing data storage systems use offline-trained models to predict the next access part of a file or access heat with low accuracy, resulting in reduced business performance.
Using a streaming model trained online, the model is updated by obtaining multiple data features of the file at the current access request, predicting the attribute parameters of the file at the next access request, and adapting to changes in file access patterns.
It improves the prediction accuracy and efficiency of the data storage system under limited resources, adapts to changing file access patterns, and improves business performance.
Smart Images

Figure CN118535074A
Abstract
Description
Technical Field
[0001] 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
[0002] Caching and staging strategies are fundamental to building modern data storage systems. Such strategies can reduce the latency of accessing data from cold storage media and extend the life of flash devices while keeping enough space in the cache to store new data. However, caching and staging are very sensitive to the workload (i.e., access requests) of the data storage system, which is usually generated by many applications accessing thousands of files in parallel. Building such strategies requires understanding and exploiting 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 life cycle, the workloads will transition through multiple file access patterns. Therefore, effectively exploiting multiple file access patterns to predict future access variables of modern data storage systems is a complex task.
[0003] In response to the above problems, modern data storage systems use a certain model (such as heuristic algorithms, neural networks or Markov chains, etc.) to process multiple historical file access patterns of the files to be accessed, 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, neural networks or gradient boosting trees, etc.) to process multiple historical access frequencies of the files to be accessed and predict the access popularity of the files to be accessed. However, the training method used for the models involved in the above schemes is offline training, and the models need 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 files to be accessed will be relatively low, thereby reducing the business performance of the data storage system. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and a data storage system, which are used to effectively improve the service performance of the data storage system.
[0005] 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 the 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 according to the plurality of first access data features and the first access attribute parameters of the first file. After that, 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 according to 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.
[0006] In the above design, the data storage system uses multiple first access data features corresponding to the first file at 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 i+1th access request under limited storage resources and computing power resources. In addition, since the first streaming model begins to be trained online when an access request arrives, the first streaming model is constantly updated and can adapt to the ever-changing file access mode. Therefore, the second access attribute parameters of the first file can be predicted more accurately, thereby effectively improving the business performance of the data storage system.
[0007] In a possible design, the data storage system obtains a plurality of first access data features corresponding to the first file at the time of the (i-1)th access request, including:
[0008] The data storage system may obtain a plurality of first access data features corresponding to the first file at the i-1th access request by at least one of the following: request information corresponding to the first file at the i-1th 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;
[0009] The data storage system obtains a plurality of second access data features corresponding to the first file at the time of the i-th access request, including:
[0010] 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 corresponding to the first file at the i-th access request, 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.
[0011] In the above design, the data storage system can ensure that the sample data required for online training of the first streaming model are all the latest by extracting 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, so that the first streaming model can capture the changes in the file access mode in a timely manner, and then the first streaming model can naturally adjust and adapt to the changes in workload over time. In this way, the data storage system will input 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, and can more accurately determine the predicted access attribute parameters corresponding to the first file at the next access request.
[0012] In one possible design, the request information includes at least one of the following: a request operation, a request offset, or a request length;
[0013] 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;
[0014] 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;
[0015] 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.
[0016] 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 by using more comprehensive data features, and can improve the training accuracy of the first streaming model, thereby improving the prediction accuracy of the first streaming model.
[0017] In one possible design, 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.
[0018] In a possible design, the data storage system obtains a plurality of second access data features corresponding to the first file at the time of the i-th access request, including:
[0019] The data storage system first determines a plurality of third access data features corresponding to the first file at the time of 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.
[0020] 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.
[0021] In one possible design, the data storage system selects a plurality of second access data features from a plurality of third access data features, including:
[0022] 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.
[0023] 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 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.
[0024] In one possible design, the data storage system selects a plurality of second access data features from a plurality of third access data features, including:
[0025] The data storage system first determines the correlation between any two third access data features among 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 multiple second access data features.
[0026] 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 prediction, thereby effectively improving the prediction efficiency and prediction accuracy of the first streaming model.
[0027] 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.
[0028] In a second aspect, an embodiment of the present application provides a possible data storage system, and the beneficial effects can be found in the description of the first aspect, which will not be repeated here. The data storage system has the function of implementing the behavior in the method example of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In a possible design, the data storage system includes an acquisition module and a processing module. The acquisition module is used to acquire multiple first access data features corresponding to the first file at the i-1th access request. The processing module is used to train the first streaming model according to the multiple first access data features and the first access attribute parameter of the first file. The first access attribute parameter is the actual access attribute parameter of the first file at the i-th access request. The acquisition module is also used to acquire multiple second access data features corresponding to the first file at the i-th access request. The processing module is also used to input the multiple second access data features into the first streaming model to obtain the second access attribute parameter of the first file. The second access attribute parameter is the predicted access attribute parameter of the first file at the i+1th access request. The processing module is also used to pre-fetch or migrate the first file according to the second access attribute parameter. These modules can perform 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.
[0029] In a third aspect, an embodiment of the present application provides a possible data storage system, the data storage system comprising a communication interface and a processor. Optionally, the data storage system further comprises a memory. The memory is used to store computer programs or instructions, and the processor is coupled to the memory and the communication interface. When the processor executes the computer program or instruction, the data storage system executes the method in any possible design of the first aspect.
[0030] 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 a method in any possible design of the first aspect above.
[0031] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are executed by a computer, the computer executes a method in any possible design of the first aspect above.
[0032] 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 to execute a method in any possible design of the first aspect above.
[0033] 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, which is used to store the necessary programs and data of the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0034] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of a possible application scenario provided by an embodiment of the present application is exemplified;
[0036] Figure 2 A schematic diagram of the functional module structure of a data storage system provided by an embodiment of the present application is exemplified;
[0037] Figure 3 A schematic diagram showing a flow chart of a data processing method provided by an embodiment of the present application;
[0038] Figure 4 A schematic diagram showing a possible data storage system provided by an embodiment of the present application is exemplified;
[0039] Figure 5 A structural diagram of a possible data storage system provided by an embodiment of the present application is exemplified. DETAILED DESCRIPTION
[0040] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0041] The following is an introduction to possible application scenarios of the present application. It should be noted that these introductions are intended to facilitate understanding by those skilled in the art and do not constitute a limitation on the scope of protection claimed by the present application.
[0042] Figure 1 The following is a schematic diagram showing a possible application scenario to which the present application is applicable. Figure 1 As shown, 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).
[0043] The terminal 100 may be an entity on the user side with a signal receiving and sending function, and may provide the user with service functions such as audio, video, voice, and data connectivity. Optionally, the terminal 100 may also have data processing capabilities. For example, the terminal 100 may send a data access request submitted by a user to the data storage system 200, so that the user can access the relevant data stored in the data storage system 200.
[0044] Exemplarily, the terminal 100 may be a smart phone, a tablet computer, a desktop computer, a computer with wireless transceiver function (such as a laptop computer, etc.), a PPD (Personal Digital Assistant), a mobile internet device (MID), a vehicle terminal (such as a cockpit vehicle computer, which may also be referred to as a vehicle infotainment system), a wearable device with wireless communication function (such as a smart watch, a smart bracelet, smart glasses or a smart helmet, etc.), a virtual reality (VR) device, an augmented reality (AR) device or a smart home device (such as a smart speaker or a smart TV, etc.), etc. It should be understood that the present application does not limit the specific device form of the terminal.
[0045] The data storage system 200 may be an entity with data processing capabilities and capable of storing a large amount of data, and may provide data access services or data storage services to users. For example, after obtaining a user's data access request, the data storage system 200 may provide the user with the data that the user needs to access.
[0046] Optionally, the terminal 100 may be communicatively connected to the data storage system 200. For example, the terminal 100 may be communicatively connected to the data storage system 200 via a wired network, or via a wireless network, which is not limited in the present embodiment.
[0047] Optionally, when the terminal 100 and the data storage system 200 are communicatively connected 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.
[0048] It should be noted that the above Figure 1 The application scenario shown is only an example, which 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. Figure 1 The form and quantity of each structure in the application scenario shown are only for example and do not constitute a limitation of the present application. Figure 1 The names of the various structures in the application scenario shown are only examples. The names of the various structures in the specific implementation may also be other names, and this application does not make specific limitations on this.
[0049] As described in the background technology, based on the existing data storage system, when the file access mode is constantly changing, the accuracy of using the offline trained model to predict the next access part or access popularity of the file will be relatively low, resulting in reduced business performance of the data storage system. In view of this, the present application provides a data processing method to effectively improve the business performance of the data storage system.
[0050] based on Figure 1 In the application scenario shown, the present application also provides a functional module structure of a data storage system. Figure 2According to the logical functions, the data storage system can be divided into the following functional modules: data prediction module, data cache module, data classification module (or data migration module) or multi-level storage module, etc. Optionally, the data prediction module can include but is not limited to at least one of the following: access pattern recognition submodule, feature extraction submodule, feature selection submodule or model training / prediction submodule, etc. Optionally, the multi-level storage module can include but is not limited to at least one of the following: cache medium, main memory medium, solid state drive (SSD) medium, mechanical hard disk (HDD) medium, tape medium or optical disk medium, etc.
[0051] It should be noted that Figure 2 The connection relationship between the functional modules shown is only an example and does not constitute a limitation of the present application. The functions of each functional module are described below.
[0052] The data prediction module is used to predict the access attribute parameters (such as request offset or access heat, etc.) of a file at the i+1th access request based on the access data characteristics corresponding to the file at the i-th access request.
[0053] 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.
[0054] 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).
[0055] 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.
[0056] 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.
[0057] The data cache module is used to perform corresponding pre-fetch processing on the above-mentioned file according to the predicted request offset or request offset category corresponding to the above-mentioned file at the i+1th access request. Exemplarily, taking the predicted request offset (such as request offset a) corresponding to a certain file (such as file 1) at the i+1th access request as an example, the data cache module can determine the data (such as file block 2) required for the i+1th access request of file 1 according to the predicted request offset a corresponding to the i+1th access request of file 1, and can determine the storage location of file block 2, that is, determine in which storage medium file block 2 is stored, such as file block 2 is stored in the HDD medium. Since the HDD medium is a low-performance storage medium, the data cache module can pre-fetch file block 2 to a high-performance storage medium (such as an SSD medium), that is, copy file block 2 and put it in the SSD medium. In this way, when the i+1th access request for file 1 arrives, file block 2 is more likely to hit the SSD medium. Therefore, 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.
[0058] The data classification module is used to perform corresponding migration processing on the above-mentioned file according to the predicted access heat or access heat category corresponding to the above-mentioned file at the i+1th access request. Exemplarily, taking the predicted access heat (such as access heat 0.8) corresponding to a certain file (such as file 1) at 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 the 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.
[0059] The multi-level storage module is used to store corresponding data. For example, a portion of the data is stored in the cache medium, a portion of the data is stored in the main memory medium, a portion of the data is stored in the SSD medium, a portion of the data is stored in the HDD medium, a portion of the data is stored in the tape medium, and a portion of the data is stored in the optical disk medium.
[0060] The following is based on Figure 1 The application scenario shown is a detailed introduction to the specific implementation of the data processing method in the embodiment of the present application.
[0061] Figure 3The following is a flow chart showing a data processing method provided by an embodiment of the present application. Figure 1 The method process may 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 may be as follows: Figure 1 The data storage system 200 is shown. In order to facilitate the introduction of the technical solution provided by the embodiment of the present application, the following is an example of a data storage system executing a data processing method. Figure 3 As shown, the method includes:
[0062] Step 301: The data storage system obtains a plurality of first access data features corresponding to the first file at the time of the (i-1)th access request.
[0063] 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 at the i-1th access request. Optionally, the first access data feature may also include an access frequency of the first file corresponding to the i-1th access request or a complete read frequency of the first file.
[0064] 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-1th access request; the access frequency of the first file corresponding to the first file at the i-1th 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 (such as a sliding time window before the access time of the i-1th 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-1th 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 (such as a sliding time window before the access time of the i-1th access request).
[0065] Exemplarily, 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).
[0066] Table 1
[0067]
[0068]
[0069] It should be noted that Table 1 is only a simple example for the purpose of illustrating the technical solution in the embodiments of the present application, and does not constitute a limitation on the technical solution in the embodiments of the present application.
[0070] 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 the multiple files included in the directory, or the proportion of access modes of the 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 the multiple files belonging to the file format, or the proportion of access modes of the multiple files belonging to the file format, etc.
[0071] Exemplarily, the access mode of a file may include but is not limited to at least one of the following: time mode, space mode, length mode or frequency mode, etc. Among them, the time mode includes time-intensive mode and time-sparse mode; the space mode includes space-sequential mode and space-random mode; the length mode includes length-uniform mode and length-variable mode; the frequency mode includes file access frequency mode and file complete read frequency mode.
[0072] Among them, the time pattern represents the frequency of access requests to a file (such as 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). Optionally, the access frequency of the file may be dense or sparse, so the time pattern can be divided into a time-intensive pattern and a time-sparse pattern. Exemplarily, for the time pattern, when identifying the time pattern of any file, it is necessary to obtain the access time of the last n access requests of the file, so that the data storage system is required to save the access time of the last n access requests of the file. For example, for a certain file (such as file 1), the data storage system can calculate the difference between any two consecutive access times in the access time of the last n access requests of file 1 to obtain multiple first difference values. If the multiple first difference values are all less than or equal to the preset threshold value, the data storage system can determine that the access pattern of file 1 is a time-intensive pattern. If there is at least one first difference value greater than the preset threshold value among the multiple first difference values, the data storage system can determine that the access pattern of file 1 is a time-sparse pattern.
[0073] 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 request 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 the continuous access to the data contained in the file, without any gaps in the data requested for access between the continuous access requests. The spatial random pattern refers to non-strictly continuous access requests, which 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 eliminated. 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 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 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 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.
[0074] 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 that the length of the time window is 1 hour, the size of each time slice is 10 seconds, and a time slice is 8:00:10-9:00:10, then the time window includes 6 time slices. Among them, each time slice saves the status information of files, directories, and file formats accessed in a continuous time interval. Since 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, and 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.
[0075] For optimization, the time window has a special time slice, called the aggregate time slice, which saves the aggregate information currently stored in the time window across time slices. 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 60 time slices to get 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 only accessed 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 future decisions of the data storage system. This property can be used as access patterns change and evolve over time.
[0076] 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 variable in length, so 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 in 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 in 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.
[0077] The frequency mode 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 of file 1). Optionally, there are two forms of frequency modes here. The first form is the file access frequency, which is represented by a number between 0 and 1 and can be reflected 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 access frequency of the file according to the number of accesses to the file counted by the counter, that is, (1-1 / log(c+2)), where c is used to represent the total number of accesses to the file within the period of time. The second form is the file complete read frequency, that is, the approximate value of calculating 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 of time and the file size of the file. Among them, the total number of bytes accessed by the file within the period of time can be obtained by the request length carried in multiple access requests for the file within the period of time.
[0078] 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.
[0079] Optionally, for some files located in the same directory, it can be generally considered that these files have the same or similar access modes. Exemplarily, taking file 1 and file 2 being located in the same directory as an example, when the data storage system identifies that the time mode of file 1 is a time-intensive mode and the space mode of file 1 is a space-sequential mode, if the data storage system determines that file 1 and file 2 are located in the same directory, the data storage system may also determine that the time mode of file 2 is a time-intensive mode and the space mode of file 2 is a space-sequential mode. Optionally, for some files belonging to the same file format, it can be generally considered that these files have the same or similar access modes. Exemplarily, taking file 1 and file 2 belonging to the same file format as an example, when the data storage system identifies that the time mode of file 1 is a time-intensive mode and the space mode of file 1 is a space-sequential mode, if the data storage system determines that file 1 and file 2 are located in the same file format, the data storage system may also determine that the time mode of file 2 is a time-intensive mode and the space mode of file 2 is a space-sequential mode.
[0080] Exemplarily, 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.
[0081] Optionally, before obtaining the directory data features corresponding to the first file at the i-1th access request, the data storage system needs to identify the access modes of the multiple files contained in the directory to which the first file belongs. Afterwards, the data storage system aggregates the access modes of the identified multiple files to obtain the access mode ratio corresponding to the directory.
[0082] Example 1: Assume that a directory (such as directory a) includes three files, namely file 1, file 2 and file 3, and assume that the i-1th access request obtained by the data storage system is a request to access file 1. Taking the above three files all having a time pattern, a space pattern and a length pattern as an example, when the data storage system obtains the i-1th access request, it is determined that the i-1th access request is for requesting access to file 1, and the directory to which file 1 belongs is determined to be directory a. Afterwards, the data storage system can determine that directory a includes file 1, file 2 and file 3 based on directory a. Then, the data storage system can perform access pattern recognition on file 1, file 2 and file 3 respectively. Optionally, the data storage system first obtains the access request status of file 1, file 2 and file 3 in a sliding time window before the access time of the i-1th access request. For example, assuming that the length of the sliding time window is 1 hour and the access time of the i-1th access request is t0, the data storage system obtains multiple access requests for file 1, file 2 and file 3 in the time period (t0-1 to t0).
[0083] For file 1, in one example, the data storage system can calculate the difference between any two consecutive access times of the last n access requests for file 1 within the time period (t0-1 to t0), and obtain multiple first difference values. When the multiple first difference values are all less than or equal to the 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 in the multiple access requests for file 1 within the time period (t0-1 to t0), and 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 another example, when the request lengths carried by any two consecutive access requests in 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 to 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 to 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, and 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), and the access frequency of file 1 is used to characterize the file access frequency pattern of file 1.
[0084] For file 2, the data storage system can calculate the difference between any two consecutive access times of the last n access requests of file 2 in 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 the preset threshold value, 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 in the multiple access requests of file 2 in the time period (t0-1 to t0) to obtain multiple second difference values. 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 2 is a spatial random pattern. In another example, when the request lengths carried by any two consecutive access requests in the multiple access requests of file 2 in 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.
[0085] For file 3, the data storage system can calculate the difference between any two consecutive access times of the last n access requests of file 3 in 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 the preset threshold value, 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 in the multiple access requests of file 3 in the time period (t0-1 to t0) to obtain multiple second difference values. 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 3 is a spatial random pattern. In another example, when the request lengths carried by any two consecutive access requests in the multiple access requests of file 3 in 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.
[0086] 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.
[0087] Example 2: Continuing with the example that directory a includes 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 modes of the three identified files, that is, determine the proportion of each access mode corresponding to directory a, such as the proportion of the time sparse mode corresponding to directory a = 3 / (1+1+1) = 1, the proportion of the space sequential mode corresponding to directory a = 3 / (1+1+1) = 1, and the proportion of the length uniform mode corresponding to directory a = 3 / (1+1+1) = 1. It should be noted that the identification process of the access mode of the file in Example 2 can refer to the identification process of the access mode of the file in Example 1 above, which will not be repeated here.
[0088] Example 3: Continuing with the example that directory a includes files 1, 2, and 3, and 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 recognizes 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 file 3 has After the length pattern is a variable length 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, the proportion of the time-sparse pattern corresponding to directory a = 1 / (1+1+0) = 1 / 2, the proportion of the space-sequential pattern corresponding to directory a = 2 / (1+0+1) = 1, the proportion of the length-uniform pattern corresponding to directory a = 1 / (0+1+1) = 1 / 2, and the proportion of the length-variable pattern corresponding to directory a = 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, which will not be repeated here.
[0089] Optionally, when obtaining the directory data features corresponding to the first file at the i-1th access request, 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, 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 that the above directory a includes 3 files, 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, the data storage system can determine that the access frequency of file 1 in a period of time (for example, in the sliding time window before the access time of the i-1th access request of file 1) is 5, and can determine that the access frequency of file 2 in this period of time is 3 according to the access situation of file 2 in this period of time, and can determine that the access frequency of file 3 in this period of time is 8 according to the access situation of file 3 in this period of time. After that, the data storage system aggregates the access frequencies of the three determined files, and obtains the total access frequency corresponding to directory a = (5+3+8) = 16.
[0090] Optionally, the data storage system may also determine the total number of different files included in the directory to which the first file belongs when obtaining the directory data feature corresponding to the first file at the i-1th access request. For example, continuing to take the example that the above directory a includes 3 files, assuming 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, it can be determined that the total number of files included in the above directory a is 3.
[0091] Exemplarily, the implementation process of the data storage system determining the access mode ratio corresponding to the file format is introduced below through the following possible examples.
[0092] Optionally, before obtaining the file format data features corresponding to the first file at the i-1th access request, the data storage system needs to identify the access modes of multiple files that have the same file format as the first file. Afterwards, the data storage system aggregates the access modes of the identified multiple files to obtain the access mode ratio corresponding to the file format.
[0093] Example 1: Assume that there are three files belonging to a certain file format (such as file format a), namely file 1, file 2 and file 3, and assume that the i-1th access request obtained by the data storage system is a request to access file 1. Taking the above three files all having a time pattern, a space pattern and a length pattern as an example, when the data storage system obtains the i-1th access request, it is determined that the i-1th access request is for requesting access to file 1, and that the file format to which file 1 belongs is file format a. Afterwards, the data storage system can determine that the files belonging to file format a are file 1, file 2 and file 3 based on file format a. Then, the data storage system can perform access pattern recognition on file 1, file 2 and file 3 respectively, and recognize 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 dense 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 dense 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 modes of the three identified files to determine the proportion of each access mode corresponding to file format a, such as the proportion of time-intensive mode corresponding to file format a = 2 / (1+2) = 2 / 3, the proportion of time-sparse mode corresponding to file format a = 1 / (1+2) = 1 / 3, the proportion of space-sequential mode corresponding to file format a = 2 / (1+2) = 2 / 3, the proportion of space-random mode corresponding to file format a = 1 / (1+2) = 1 / 3, the proportion of length-uniform mode corresponding to file format a = 1 / (1+2) = 1 / 3, the proportion of length-variable mode corresponding to file format a = 2 / (1+2) = 2 / 3. It should be noted that the identification process of the file access mode in Example 1 can refer to the identification process of the file access mode in Example 1 in the implementation process of determining the proportion of access modes corresponding to the directory, which will not be repeated here.
[0094] 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 file 1, file 2, and file 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 modes of the three identified files, that is, determine the proportion of each access mode corresponding to file format a, for example, the proportion of the time sparse mode corresponding to file format a = 3 / (1+1+1) = 1, the proportion of the space sequential mode corresponding to file format a = 3 / (1+1+1) = 1, and the proportion of the length uniform mode corresponding to file format a = 3 / (1+1+1) = 1. It should be noted that the identification process of the file access mode in Example 2 can refer to the identification process of the file access mode in Example 1 in the implementation process of determining the proportion of the access mode corresponding to the directory, which will not be repeated here.
[0095] In a possible implementation, when the data storage system obtains the i-1th access request for the first file, 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 can be obtained by parsing 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 the data features of the request operation, the data features of the request offset and the 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.
[0096] 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, wherein 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-1th access request, the data storage system may normalize the request length L to obtain a normalized value of (L / M)^0.2, which is used to characterize the data characteristics of the request length. Wherein, M is used to represent 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-1th access request of the first file).
[0097] 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 open, close, read or write; the file name is used to indicate the file name of the first file that needs to be accessed; the request offset is used to indicate the file position (in bytes) where 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.
[0098] In another possible implementation, after the data storage system obtains the file name carried in the i-1th access request, it can query the metadata of the first file corresponding to the file name, and can extract file data features from the metadata of the first file, which may include but are not limited to data features of file identification, file size, file creation time, last access time, last update time, most recent multiple open times, and 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-2th 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.
[0099] Optionally, for the data features of the file identifier of the first file (such as 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 features of the file identifier a of the first file. Optionally, the data storage system may also normalize the file name of the first file (such as 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 features of the file identifier a of the first file.
[0100] For the data features of the most recent multiple opening times of the first file, the data storage system may use the most recent multiple opening times before the i-1th access request to characterize the data features of the most recent multiple opening times of the first file. Optionally, the data storage system may also calculate the time difference between any consecutive opening times in the most recent multiple opening times before the i-1th access request to obtain multiple time difference values, and normalize the multiple time difference values to obtain multiple normalized values, and the multiple normalized values are used to characterize the data features of the most recent multiple opening times of the first file.
[0101] 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 time 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 weight the amount of read data of the first file at each access time, 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 time 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 time t is proportional to the current access time t 当前 and inversely proportional to the difference in the access time t. For example, taking the first file as file 1, assuming that file 1 contains 4 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 assuming that the current size of file 1 is B, and assuming 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 heat of file 1 as (A1 / (t4-t1)+A2 / (t4-t2)+A3 / (t4-t3)) / B based on the 4 access times of file 1, the amount of data read corresponding to the 4 access times of file 1, and the current size of file 1. Among them, 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.
[0102] 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. Afterwards, the data storage system can extract directory data features from the directory attribute information of the directory to which the first file belongs, and 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 multiple files included in the directory, or data features of the access mode ratio of multiple files included in the directory.
[0103] Optionally, for the data features of the directory identifier (such as identifier b) of the directory to which the first file belongs, the data storage system may 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 features of the directory identifier b of the directory to which the first file belongs. Optionally, the data storage system may 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 may also be used to characterize the data features 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).
[0104] For the data characteristic 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 for the first file), and the total number is used to characterize the data characteristic of the total number of multiple different files included in the directory to which the first file belongs.
[0105] 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.
[0106] For 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 can refer to the implementation process of determining the access mode ratios corresponding to the directory to which the first file belongs, and determine the access mode ratios corresponding to the directory to which the first file belongs, such as at least one of the time-intensive mode ratio, the time-sparse mode ratio, the space-sequential mode ratio, the space-random mode ratio, the length-uniform mode ratio, or 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.
[0107] 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 to which the first file corresponding to the file name belongs, and can query the file format attribute information of the file format to which the first file belongs. Afterwards, the data storage system can extract file format data features from the file format attribute information of the file format to which the first file belongs, and the file format data features may include but are not limited to data features of file format identification, 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 mode ratio of multiple files belonging to the file format.
[0108] Optionally, for the data features of the file format identifier (such as identifier f) of the file format to which the first file belongs, the data storage system may normalize identifier f, and 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 (such as file format name g) of the file format to which the first file belongs, and 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 (such as a sliding time window before the access time of the i-1th access request of the first file).
[0109] For the data characteristic 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 characteristic of the total number of multiple different files belonging to the file format.
[0110] For the data feature 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 feature of the total access frequency of multiple files belonging to the file format.
[0111] For the data characteristics of the access mode ratios of the multiple files belonging to the file format, the data storage system can refer to the implementation process of determining the access mode ratios corresponding to the file format to determine the access mode ratios 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 space-sequential mode ratio, the space-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 the multiple files belonging to the file format.
[0112] Step 302: The data storage system trains a first streaming model according to a plurality of first access data features and a first access attribute parameter of a first file.
[0113] 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, and 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.
[0114] Exemplarily, taking the data storage system predicting the next request offset of the first file (such as 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.
[0115] Implementation method 1: The data storage system can refer to the implementation method of step 301 above to determine the multiple fourth access data features corresponding to the first file at the i-1 access request. Afterwards, the data storage system can 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 of the first file into the first streaming model for training. In this way, the data storage system can delete some unrepresentative or highly correlated access data features through implementation method 1, so as 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 the possible noise in the training process of the first streaming model, thereby effectively improving the training efficiency of the first streaming model. In addition, the data storage system can reduce the number of access data features through implementation method 1, thereby ensuring that under limited storage resources and computing power 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+1 access request.
[0116] Based on the above implementation mode 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 modes.
[0117] Method 1: The data storage system determines the P value corresponding to each of the plurality of fourth access data features according to the P value test method, determines the chi-square value corresponding to each of the plurality of fourth access data features according to the chi-square test method, and determines the Gini value corresponding to each of the plurality of fourth access data features according to the Gini measurement method. Afterwards, the data storage system performs weighted processing on the P value, chi-square value, and Gini value corresponding to each of the plurality of fourth access data features, and can determine the weighted value corresponding to each of the plurality of fourth access data features. Then, the data storage system can select the fourth access data feature whose weighted value is greater than or equal to the first set threshold value from the plurality of fourth access data features as the first access data feature, or can also sort the weighted values corresponding to the plurality of fourth access data features in descending order of the weighted values, and select the fourth access data feature whose weighted value is ranked in the first 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.
[0118] 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 according to a correlation algorithm (such as a cosine similarity algorithm or a Pearson correlation coefficient algorithm, etc.) or a correlation matrix algorithm, so as to obtain multiple correlations. When any one of the multiple correlations is greater than a second set threshold, the data storage system removes 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 removed or deleted first access data features for training the first streaming model. Optionally, the data storage system may also sort the multiple correlations in order from large to small, and filter out the correlations whose correlations are ranked in the top n. Afterwards, for any one of the top n correlations, the data storage system removes 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 except the eliminated or deleted first access data features among the multiple 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 i-1th 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, the data storage system can only retain the access data features that have a good impact on the prediction effect of the first streaming model by eliminating or deleting some access data features with high correlation, 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] Method 2: The data storage system can determine the correlation between any two fourth access data features among the multiple fourth access data features according to the correlation algorithm or the correlation matrix algorithm, and obtain multiple correlations. When any correlation among the multiple correlations is greater than the second set threshold value, the data storage system removes or deletes one of the two fourth access data features corresponding to the correlation. Afterwards, the data storage system can use the remaining fourth access data features other than the removed or deleted fourth access data features among the multiple fourth access data features as multiple first access data features. Optionally, the data storage system can also sort the multiple correlations in descending order of correlation, and filter out the correlations whose correlations are ranked in the top n. Afterwards, for any correlation among the top n correlations, the data storage system removes or deletes one of the two fourth access data features corresponding to the correlation. Then, the data storage system can use the remaining fourth access data features other than the removed or deleted fourth access data features among the multiple fourth access data features as multiple first access data features.
[0120] Implementation method 2: The data storage system can refer to the implementation method of the above step 301 to determine the multiple fourth access data features corresponding to the first file at the i-1th access request. After that, the data storage system directly uses the 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 of the first file into the first streaming model for training.
[0121] Optionally, the first stream model is a type of model that can provide high accuracy through online training, testing, and evaluation. Exemplarily, the first stream model can support at least one of the following: (1) processing only one instance at a time; (2) using a limited time to process each instance; (3) using limited memory; (4) adapting to time changes; (5) being ready to give prediction content at any time. In other words, the first stream model can capture changes in the underlying data distribution (such as changes in file access patterns), and the first stream 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.
[0122] Among them, the first streaming model can only see each individual training sample once. Therefore, each individual training sample is used to train and test the model. In this way, there is no need to split the input data as is usually used for batch processing models (for example, 80% of the sample data is used for training and 20% of the sample data is used for testing), but each individual training sample can be used for testing and training. For example, when the current access request for a certain file is obtained, the data storage system can determine the multiple access data features corresponding to the previous access request of file 1, and can use the multiple access data features corresponding to the access request for training and testing the first streaming model. In addition, in the implementation process of online training, testing and evaluation of the first streaming model, a pre-order evaluation technology is used. In the pre-order evaluation, the processing of a single training sample follows its submission order, and each individual training sample is used to test the model before being used to train the model, which ensures that the first streaming model is always tested on samples it has never seen before, and forces the use of all available data. After the first streaming model is trained by each training sample, the accuracy of the first streaming model will increase, and as the number of processed samples increases, the accuracy of the first streaming model will gradually increase and stabilize.
[0123] 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.
[0124] Exemplarily, 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 predict 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.
[0125] 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.
[0126] Exemplarily, taking the first streaming model as the HT model, when the data storage system needs to predict the predicted access heat category of the first file at the i+1th access request, the data storage system can predict by using the HT model. Among them, the HT model is an advanced, memory-efficient decision tree designed for streaming data and capable of learning from large data sets. It takes advantage of the fact that a small sample is sufficient to select the best split attribute. It also has a unique feature that it guarantees performance because its output is asymptotically the same as non-incremental learning using infinite examples. 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 access heat category corresponding to the first file at the i-th access request for online training of the HT model to obtain the trained HT model.
[0127] In one example, take the case where the data storage system obtains a plurality of first access data features corresponding to the first file at the i-1th access request to train the ARF model as an example. First, the data storage system can refer to the implementation method 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 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, and 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 n (Pn+sn+qn). Then, the data storage system can select data features whose weighted values are greater than or equal to the 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, then 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 for training the ARF model.
[0128] Step 303: The data storage system obtains a plurality of second access data features corresponding to the first file at the time of 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.
[0129] 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, and 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.
[0130] 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 first file at the i-th access request. Optionally, the second access data feature may also include an access frequency of the first file corresponding to the i-th access request or a complete read frequency of the first file.
[0131] 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 first file at 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); the complete read frequency of the first file corresponding to the first file at the i-th 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-th access request).
[0132] Exemplarily, 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.
[0133] Implementation method 1: The data storage system may refer to the implementation method of step 301 above to determine the multiple third access data features corresponding to the first file at the i-th access request. Afterwards, the data storage system may select multiple second access data features from the multiple third access data features, and input the multiple second access data features into the trained first streaming model to obtain the predicted request offset of the first file at the i+1-th access request.
[0134] 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.
[0135] Implementation method 2: The data storage system can refer to the implementation method of step 301 above to determine the multiple third access data features corresponding to the first file at the i-th access request. Afterwards, the data storage system directly inputs the multiple third access data features as the second access data features into the first streaming model to obtain the predicted request offset of the first file at the i+1-th access request.
[0136] In one 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 predict by using the trained ARF model.
[0137] Optionally, when the data storage system obtains the i-th access request of file 1, the data storage system needs to obtain multiple third access data features corresponding to file 1 at the i-th access request before predicting the predicted request offset of file 1 at the i+1-th access request (such as [data feature 1. data feature 2, data feature 3, ..., data feature 20]). 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 P20 corresponding to data feature 20 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 s20 corresponding to data feature 20 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 q20 corresponding to data feature 20 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 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).
[0138] 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. For example, 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, for example, the predicted request offset is 3.
[0139] 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.
[0140] Optionally, when the data storage system obtains the i-th access request of file 1, the data storage system needs to obtain multiple third access data features corresponding to file 1 at the i-th access request before predicting the predicted access heat category of file 1 at the i+1-th access request (such as [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 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 s15 corresponding to data feature 15 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 q15 corresponding to data feature 15 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 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).
[0141] Then, the data storage system can select data features whose weighted values are greater than or equal to the first set threshold from the 15 data features. For example, 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, for example, the predicted access heat category is HOTNESS_SIX (indicating that the access heat of file 1 is the hottest).
[0142] Exemplarily, the access heat category includes the following categories: HOTNESS_ONE, HOTNESS_TWO, HOTNESS_THREE, HOTNESS_FOUR, HOTNESS_FIVE, HOTNESS_SIX (indicating that the access heat of the file is the hottest). The numbers ONE, TWO, THREE, FOUR, FIVE, SIX in the category indicate the hotness (or coldness) of the access heat of the file, HOTNESS_ONE indicates that the access heat of the file is the coldest, and HOTNESS_SIX indicates that the access heat of the file is the hottest.
[0143] Step 304: The data storage system pre-fetches or migrates the first file according to the second access attribute parameter.
[0144] Optionally, in one example, when the second access attribute parameter is the predicted request offset corresponding to the first file at the i+1th access request (for example, the predicted request offset is 3), the data storage system can pre-fetch the first file according to the predicted request offset. For example, taking the first file as file 1, assuming that file 1 includes 3 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, that is, the i+1th access request is very likely to be used to request access to file block 3 in the first file, and the file block 3 is stored in a low-performance medium (such as an HDD medium), then the data storage system can pre-fetch a copy of file block 3 to a high-performance storage medium (such as a main memory medium) in advance, so that when the i+1th access request of the first file arrives, the data storage system can quickly query file block 3 in the main memory medium, thereby effectively shortening the access delay of the i+1th access request.
[0145] In another example, when the second access attribute parameter is a predicted request offset category corresponding to the first file at the (i+1)th access request, the data storage system may pre-fetch the first file according to the predicted request offset category.
[0146] 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.
[0147] For example, the first file is file 1, and the predicted request offset category corresponding to file 1 in the i+1th access request is OFFSET_SEQ. Assume that file 1 includes 4 file blocks, namely file block 1, file block 2, file block 3 and file block 4, and assume that the request offset corresponding to file 1 in the i-th access request is 3, and the request offset 3 corresponds to file block 3 in file 1. The data storage system can determine that the i+1th access request of file 1 is likely to request access to file block 4 in file 1 based on the predicted request offset category being OFFSET_SEQ. If file block 4 is stored in a high-performance medium (such as a main memory medium), the data storage system does not need to pre-fetch in advance. If file block 4 is stored in a low-performance medium (such as an HDD medium), the data storage system needs to pre-fetch a copy of file block 4 in advance to a high-performance storage medium (such as a cache medium), so that when the i+1th access request of the first file arrives, the data storage system can quickly query file block 4 in the cache medium, thereby effectively shortening the access delay of the i+1th access request.
[0148] In yet another example, when the second access attribute parameter is the predicted access heat 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.
[0149] Exemplarily, the hotness or coldness of the access popularity of a file may be represented by a value between 0 and 1, wherein a value of 0 represents that the access popularity of the file is the coldest, and a value of 1 represents that the access popularity of the file is the hottest.
[0150] For example, 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 3 file blocks, namely file block 1, file block 2 and file block 3. The data storage system can determine that the future access heat of file 1 is relatively hot according to the predicted access heat of 0.9 corresponding to file 1 at the i+1th access request. Therefore, when the data storage system determines that the 3 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 3 file blocks included in file 1. When the data storage system determines that the 3 file blocks included in file 1 are all stored in a low-performance storage medium (such as an optical disk medium), the data storage system needs to migrate the 3 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 can also migrate file block 1 to the cache medium and migrate 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, but 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 query the file block corresponding to the request offset carried by the i+1th access request in the high-performance storage medium, thereby effectively shortening the access delay of the i+1th access request.
[0151] In yet 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.
[0152] For example, the first file is file 1, and the predicted access heat category corresponding to file 1 at the i+1th access request is HOTNESS_FIVE. Assume that file 1 includes three file blocks, namely file block 1, file block 2, and file block 3. The data storage system can determine that the future access heat of file 1 is relatively hot according to the predicted access heat category HOTNESS_FIVE corresponding to file 1 at the i+1th access request. 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 disk medium), the data storage system needs to migrate the three file blocks included in file 1 to the high-performance storage medium in advance. When the data storage system determines that file block 1 is stored in a high-performance storage medium, and file blocks 2 and file blocks 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 file blocks 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.
[0153] For another example, the first file is file 1, and the predicted access heat category corresponding to file 1 at 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. The data storage system can determine that the future access heat of file 1 is relatively cold based on the predicted access heat category HOTNESS_TWO corresponding to file 1 at the i+1th access request. 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 the HDD medium, or it can also migrate file block 1 to the HDD medium and migrate file block 2 and file block 3 to the optical disk medium. 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.
[0154] It should be noted that in the description of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there may be three relationships, for example, A and / or B, which can represent: the situation where A exists alone, A and B exist at the same time, and B exists alone, wherein A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are an "or" relationship. "At least one of the following (individuals)" or its similar expression refers to any combination of these items, including any combination of single items (individuals) or plural items (individuals). 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 the present 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 the present application all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0155] In addition, it should be noted that each step involved in the above embodiments can be performed by a corresponding device, or by a chip, processor, or chip system in the device, and the embodiments of the present application do not limit them. The above embodiments are only described by taking the corresponding device as an example.
[0156] It should be noted that in the above embodiments, some steps can be selected for implementation, and the order of the steps in the diagram can be adjusted for implementation, and this application does not limit this. It should be understood that executing some steps in the diagram, adjusting the order of the steps, or combining them for specific implementation all fall within the scope of protection of this application.
[0157] 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 the various functions. It should be easily appreciated by 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.
[0158] It should be noted that the "steps" in the embodiments of the present application are only for illustration, and are a method of expression used to better understand the embodiments, and do not constitute a substantial limitation on the execution of the scheme of the present application. For example, the "steps" can also be understood as "features". In addition, the steps do not constitute any limitation on the execution order of the scheme of the present application. Any changes in the order of steps, step merging, or step splitting made on this basis that do not affect the implementation of the overall scheme, and the resulting new technical solutions are also within the scope of the disclosure of the present application.
[0159] Based on the same concept, the embodiment of the present application also provides a possible data storage system, which is suitable for Figure 1 The data storage system is used to implement the data processing method provided in the above embodiment, or the module (such as a chip) of the data storage system is used to implement the data processing method provided in the above embodiment, so the beneficial effects of the above embodiment can also be achieved. In the embodiment of the present application, the data storage system can be as follows: Figure 1 A data storage system 200 is illustrated.
[0160] See also 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.
[0161] For a more detailed description of the acquisition module 401 and the processing module 402, reference may be made to the relevant description of the data storage system in the above method embodiment, which will not be repeated here.
[0162] 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.
[0163] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0164] 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, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, or a server, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0165] Based on the same concept, the embodiment of the present application also provides a possible data storage system, which is suitable for Figure 1 The data storage system is used to implement the technical solutions involved in the data storage system in the above embodiments, and thus can also achieve the beneficial effects of the data storage system in the above method embodiments. 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 solution involved in the data storage system provided in the above embodiment, the communication interface 501 can be used to implement the function of the above acquisition module 401, and the processor 502 is used to implement the function of the above processing module 402.
[0166] 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 divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0167] The communication interface 501 is used to receive and send data. For example, when the data storage system is Figure 1The data storage system 200 shown in FIG. 1 is implemented with the communication interface 501. Figure 1 The terminal 100 shown in the figure can communicate with the Figure 1 The communication interface 501 may be used to communicate with other devices (such as cloud or service devices) other than the application scenario shown. Optionally, the communication interface 501 may be an input / output interface. For example, the data storage system may use a communication interface to communicate with a cloud or service device.
[0168] 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 CPU and 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 the processor 502 implements the above-mentioned functions, it can be implemented by hardware, and of course, it can also be implemented by executing the corresponding software through hardware.
[0169] The memory 503 is used to store program instructions, etc. Specifically, the program instructions may include program codes, and the program codes include computer operation instructions. The memory 503 may include random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. 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.
[0170] 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 executed on a computer, the computer executes the method provided in the above embodiment.
[0171] 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.
[0172] The storage medium may be any available medium that can be accessed by a computer. For example, but not limited to, a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.
[0173] 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.
[0174] Based on the same concept, the 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 embodiment. In a possible design, the chip system also includes a memory, which is used to store the necessary programs and data of the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0175] In the method provided in the embodiment of the present application, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it 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 embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may 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 may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).
[0176] The steps of the method described in the embodiments of the present application can be directly embedded in the hardware, the software unit executed by the processor, or the combination of the two. The software unit can be stored in RAM, ROM, EEPROM, register, hard disk, removable disk, CD-ROM or other storage media of any form 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 can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC.
[0177] 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 process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart 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 generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0178] 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, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0179] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also 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 features.
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
File prefetching method, storage equipment and prefetching device
CN113535658A
Content Pre-fetching for Computing Devices
US20130226837A1
Cited By
Data reading method, data processing method, and related device
WO2026045553A1
