A solid state hard disk data processing method, device, electronic device and storage medium
By analyzing the historical read operation information of the solid-state drive, determining the multi-dimensional timing fusion characteristics and predicting the target pre-read information, the problem of inaccurate data pre-reading in the existing technology is solved, and the accuracy and response speed of the solid-state drive data processing are improved.
Patent Information
- Application Number
- CN202410667686.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-28
AI Technical Summary
Existing solid-state drives cannot accurately determine the pre-read data during data pre-reading, causing the data cached in the cache to not meet the current business needs of the server, wasting resources and increasing the cache load.
By obtaining the historical read operation information of the solid-state drive, the multi-dimensional timing fusion characteristics are determined, and the target pre-read information of the target pre-read time interval is predicted based on the characteristics of the timing variables and the dependencies between the features, thereby reading from the solid-state drive and saving it to the pre-read operation. Set the data in the buffer area.
It improves the accuracy of the target pre-read data, ensures that the data cached in the preset cache area is the data that the server's current business really needs, and improves the response rate of the server's read request.
Smart Images

Figure CN118244997B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage, and in particular to a solid state hard disk data processing method, device, electronic device and storage medium. Background Art
[0002] At present, Solid State Drive (SSD) has been widely used in server storage systems. SSDs generally store data based on low-speed non-volatile memory. Therefore, how to improve the response rate of SSDs to server read requests has become a hot research topic.
[0003] In the related art, fixed data pre-reading rules are usually followed to locate the pre-read data to be requested in the non-volatile memory, and the pre-read data is stored in the cache so that when the actual read request arrives, the data can be returned directly from the cache to improve the response rate of the server read request.
[0004] However, since server applications have different data reading requirements in different business scenarios, if the data pre-processing of the SSD is always performed according to the fixed data pre-reading rules, the pre-read data cached in the cache will not be the data actually needed by the current server business, which not only wastes data pre-reading resources but also increases the load on the cache. Summary of the invention
[0005] The present application provides a solid state drive data processing method, device, electronic device and storage medium to solve the defects that the related technology cannot accurately determine the pre-read data, resulting in the pre-read data cached in the cache not being the data actually needed by the current business of the server.
[0006] The first aspect of the present application provides a solid state hard disk data processing method, comprising:
[0007] Get the historical read operation information of the solid state drive;
[0008] Determining a multi-dimensional timing fusion feature of the solid state drive according to the historical read operation information;
[0009] Determine the target pre-reading information corresponding to the target pre-reading time interval according to the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependency relationship between the characteristics;
[0010] According to the target pre-read information, corresponding target pre-read data is read from the solid state drive, and the target pre-read data is saved in a preset cache area.
[0011] In an optional implementation, the obtaining of historical read operation information of the solid state drive includes:
[0012] Get the read and write logs of the solid state drive;
[0013] Filtering original read operation information in the read-write log; wherein the original read operation information includes a logical block address and a data size value;
[0014] According to the time series growth direction, performing first-order difference calculation processing on the logic block address in the original read operation information to convert the logic block address into an address feature;
[0015] Performing multiplication processing on the data size value to convert the data size value into a size feature;
[0016] According to the address characteristics and the size characteristics, historical read operation information of the solid state drive is determined.
[0017] In an optional implementation, determining the multi-dimensional timing fusion feature of the solid state drive according to the historical read operation information includes:
[0018] Generate a historical read operation sequence of a preset time point length according to the historical read operation information;
[0019] Performing a convolution operation on the historical read operation sequence to upgrade the historical read operation sequence into a historical read operation projection;
[0020] Determine the local position feature coding and the multi-dimensional time series feature coding of the historical read operation sequence according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection;
[0021] The multi-dimensional time series fusion feature of the solid state drive is determined according to the historical read operation projection, the local position feature encoding and the multi-dimensional time series feature encoding.
[0022] In an optional implementation, the determining of the local position feature encoding and the multi-dimensional time series feature encoding of the historical read operation sequence according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes:
[0023] Determine the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection;
[0024] According to the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each of the time point variables, the local position feature code and the multi-dimensional time series feature code of the historical read operation sequence are determined.
[0025] In an optional implementation, the determining of the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes:
[0026] For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an even time point variable, the local position feature sub-code of the time point variable is determined based on the following formula:
[0027]
[0028] in, A local position feature subcode representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in the current time dimension. represents the sine function, represents the preset time point length of the historical read operation sequence, Represents the dimension of the projection of historical read operations.
[0029] In an optional implementation, the determining of the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes:
[0030] For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an odd time point variable, the local position feature sub-code of the time point variable is determined based on the following formula:
[0031]
[0032] in, A local position feature subcode representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in the current time dimension. represents the cosine function, represents the preset time point length of the historical read operation sequence, Indicates the dimension of the projection of the historical read operation.
[0033] In an optional implementation, the determining of the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes:
[0034] For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an even time point variable, the multi-dimensional temporal feature sub-coding of the time point variable is determined based on the following formula:
[0035]
[0036] in, A multi-dimensional temporal feature sub-code representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in multiple different time dimensions. represents the sine function, represents the preset time point length of the historical read operation sequence, Represents the dimension of the projection of historical read operations.
[0037] In an optional implementation, the determining of the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes:
[0038] For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an odd time point variable, the local position feature sub-code of the time point variable is determined based on the following formula:
[0039]
[0040] in, A local position feature subcode representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in multiple different time dimensions. represents the cosine function, represents the preset time point length of the historical read operation sequence, Indicates the dimension of the projection of the historical read operation.
[0041] In an optional implementation, determining the multi-dimensional time series fusion feature of the solid state drive according to the historical read operation projection, the local position feature encoding, and the multi-dimensional time series feature encoding includes:
[0042] Determine the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence according to the historical read operation projection, the local position feature encoding and the multi-dimensional time series feature encoding;
[0043] The multi-dimensional time series fusion feature of the solid state drive is determined according to the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence.
[0044] In an optional implementation, determining the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence according to the historical read operation projection, the local position feature encoding, and the multi-dimensional time series feature encoding includes:
[0045] Based on the following formula, the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence are determined:
[0046]
[0047] in, Indicates The first The multi-dimensional time series fusion sub-features corresponding to the time point variables, Indicates the preset scaling factor, Indicates the The input variable projection corresponding to the time point variable in the historical read operation projection, Indicates the The local position feature encoding of the variable at each time point, Indicates the Multi-dimensional time series feature encoding of time point variables, Indicates the position information of the variable at this time point in the historical read operation sequence, Represents multi-dimensional traversal and summation calculation.
[0048] In an optional implementation, determining the target pre-reading information corresponding to the target pre-reading time interval according to the time series variable features represented by the multi-dimensional time series fusion features and the dependency relationship between the features includes:
[0049] Mapping the multi-dimensional time series fusion features to multiple feature vector spaces to convert the multi-dimensional time series fusion features into a query vector, a key vector and a value vector;
[0050] Determining, according to the similarity between the query vector and the key vector, an attention score corresponding to each temporal feature element in the multi-dimensional temporal fusion feature;
[0051] Determining the attention weight of each temporal feature element in the multi-dimensional temporal fusion feature according to the attention score;
[0052] Determining the attention probability distribution corresponding to the multi-dimensional time series fusion feature according to the attention weight and value vector of each of the time series feature elements;
[0053] According to the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution, the time series variable feature is selected from the multiple time series feature elements in the multi-dimensional time series fusion feature, and the dependency relationship between the features is determined;
[0054] Constructing a prediction mask sequence according to the multi-dimensional time series fusion features;
[0055] According to the time series variable features and the dependency relationship between the features in the multi-dimensional time series fusion features, mask prediction is performed on the mask interval in the prediction mask sequence to obtain the mask prediction result of the mask interval;
[0056] According to the mask prediction result of the mask interval, target pre-reading information corresponding to the target pre-reading time interval is determined.
[0057] In an optional implementation, the step of screening the time series variable feature from the multiple time series feature elements in the multi-dimensional time series fusion feature according to the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution includes:
[0058] According to the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution, a number of time series feature elements whose distance exceeds a preset distance threshold are taken as candidate time series feature elements;
[0059] Perform feature distillation processing on the candidate time series feature elements to obtain time series variable features.
[0060] In an optional implementation, the reading corresponding target pre-read data from the solid state drive according to the target pre-read information includes:
[0061] Determining a target logical block address and a target data size corresponding to the target pre-read data according to the target pre-read information;
[0062] According to the target logical block address and the target data size, corresponding target pre-read data is read from the solid state drive.
[0063] In an optional implementation, before reading corresponding target pre-read data from the solid state drive according to the target pre-read information, the method further includes:
[0064] Determining whether the target pre-read information meets a preset legal condition;
[0065] When it is determined that the target pre-read information satisfies the preset legal condition, the step of reading the corresponding target pre-read data from the solid state drive according to the target pre-read information is performed.
[0066] In an optional implementation, before reading corresponding target pre-read data from the solid state drive according to the target pre-read information, the method further includes:
[0067] Determining whether a read bus of the solid state drive is in an idle state;
[0068] In the case where it is determined that the read bus of the solid state hard disk is in an idle state, determining whether the solid state hard disk is performing a write operation;
[0069] When the solid state drive is performing a write operation, suspending the write operation and then performing the step of reading the corresponding target pre-read data from the solid state drive according to the target pre-read information;
[0070] After the target pre-read data is saved in the preset buffer area, the write operation is continued.
[0071] In an optional embodiment, the method further includes:
[0072] When it is determined that the read bus of the solid state drive is not in an idle state, the target pre-read information corresponding to the next target pre-read time interval is determined according to the target pre-read information and the historical read operation information of the solid state drive.
[0073] A second aspect of the present application provides a solid state hard disk data processing device, comprising:
[0074] An acquisition module is used to obtain historical read operation information of the solid state drive;
[0075] A determination module, configured to determine a multi-dimensional timing fusion feature of the solid state drive according to the historical read operation information;
[0076] A prediction module, used to determine the target pre-reading information corresponding to the target pre-reading time interval according to the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependency relationship between the characteristics;
[0077] The processing module is used to read the corresponding target pre-read data from the solid state drive according to the target pre-read information, and save the target pre-read data to a preset cache area.
[0078] A third aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0079] The memory stores computer-executable instructions;
[0080] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0081] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0082] A fifth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.
[0083] The technical solution of this application has the following advantages:
[0084] The present application provides a method, device, electronic device and storage medium for processing data of a solid-state hard disk, the method comprising: obtaining historical read operation information of the solid-state hard disk; determining the multi-dimensional time series fusion characteristics of the solid-state hard disk based on the historical read operation information; determining the target pre-read information corresponding to the target pre-read time interval based on the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependency relationship between the characteristics; reading the corresponding target pre-read data from the solid-state hard disk based on the target pre-read information, and saving the target pre-read data to a preset cache area. The method provided by the above scheme improves the accuracy of the target pre-read data determination result by analyzing the historical read operation information of the solid-state hard disk and fully integrating the multi-dimensional time series characteristics of the historical read operation information, so as to ensure that the target pre-read data cached in the preset cache area is the data that the server actually needs for the current business. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0086] Figure 1This is a schematic diagram of the structure of the solid state drive data processing system based on the embodiment of the present application;
[0087] Figure 2 A schematic diagram of a flow chart of a solid state drive data processing method provided in an embodiment of the present application;
[0088] Figure 3 A schematic diagram of the structure of the multi-dimensional time series fusion feature provided in an embodiment of the present application;
[0089] Figure 4 A schematic diagram of the structure of a neural network model provided in an embodiment of the present application;
[0090] Figure 5 A schematic diagram of the overall process of the solid state drive data processing method provided in an embodiment of the present application;
[0091] Figure 6 A schematic diagram of the structure of a solid state drive data processing device provided in an embodiment of the present application;
[0092] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0093] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0094] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0095] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0096] In related technologies, data pre-reading is an important function of solid-state drives (SSDs). Its basic working principle is to use the idle time of the read queue to pre-identify and store the data to be requested in the cache (DRAM) before the host issues the next read request, so that when the real read request comes, the system can directly return the data from this cache instead of reading from the slower non-volatile memory (NAND), thereby increasing the data reading speed and reducing the latency of obtaining data on the host side.
[0097] Most of the current data pre-fetching methods are based on specific behaviors. The disadvantage of this type of method is that it relies on pre-defined, fixed rules to pre-fetch hard disk data, and cannot cope with the problem of multi-dimensional changes in the address and data volume of the host reading data at different time series scales. The traditional time series prediction model LSTM has a serial structure. The longer the time series, the slower its operation speed. In addition, the loss back propagation gradient is easy to disappear during the training process, making it difficult for the model to converge and difficult to obtain data association features on long time series.
[0098] In response to the above problems, the embodiments of the present application provide a solid-state hard disk data processing method, device, electronic device and storage medium, the method comprising: obtaining historical read operation information of the solid-state hard disk; determining the multi-dimensional time series fusion characteristics of the solid-state hard disk based on the historical read operation information; determining the target pre-read information corresponding to the target pre-read time interval based on the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependency relationship between the characteristics; reading the corresponding target pre-read data from the solid-state hard disk based on the target pre-read information, and saving the target pre-read data to a preset cache area. The method provided by the above scheme improves the accuracy of the target pre-read data determination result by analyzing the historical read operation information of the solid-state hard disk and fully integrating the multi-dimensional time series characteristics of the historical read operation information, so as to ensure that the target pre-read data cached in the preset cache area is the data that the server actually needs for the current business.
[0099] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0100] First, the structure of the solid state drive data processing system on which this application is based is described:
[0101] The solid state drive data processing method, device, electronic device and storage medium provided in the embodiments of the present application are suitable for pre-reading and caching data in the solid state drive to a high-speed preset cache area. Figure 1As shown, it is a structural diagram of the solid-state hard disk data processing system based on the embodiment of the present application, which mainly includes a solid-state hard disk, a solid-state hard disk data processing device and a preset cache area. Specifically, the solid-state hard disk data processing device reads the corresponding target pre-read data from the solid-state hard disk according to the historical read operation information of the solid-state hard disk, and saves the target pre-read data to the preset cache area. When the server sends a read request, the preset cache area is traversed first to determine whether the pre-read data currently cached in the preset cache area is a read request, so as to achieve a fast response to the read request.
[0102] The embodiment of the present application provides a solid state drive data processing method for pre-reading and caching data in a solid state drive to a high-speed preset cache area. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used for solid state drive processing.
[0103] like Figure 2 FIG. 1 is a flow chart of a solid state drive data processing method provided in an embodiment of the present application, the method comprising:
[0104] Step 201, obtaining historical read operation information of the solid state drive.
[0105] Specifically, the read and write logs of the solid-state drive in the past period of time can be collected, and the historical read operation information can be filtered out from the read and write logs.
[0106] The historical read operation information at least includes the read address information and the read data attribute information corresponding to each read operation.
[0107] Step 202: Determine the multi-dimensional timing fusion characteristics of the solid state drive based on the historical read operation information.
[0108] Specifically, the timing characteristics of the solid-state drive in multiple time dimensions can be determined based on the timing characteristics of the historical read operation information, and the potential multi-dimensional periodic characteristics during the operation of the solid-state drive can be perceived to obtain the multi-dimensional timing fusion characteristics of the solid-state drive.
[0109] The multiple different time dimensions may include seconds, minutes, hours, days, weeks and other time dimensions.
[0110] Step 203 : determining the target pre-reading information corresponding to the target pre-reading time interval according to the time series variable features represented by the multi-dimensional time series fusion features and the dependencies between the features.
[0111] Specifically, based on a preset machine learning model, the target pre-reading information corresponding to the target pre-reading time interval can be determined according to the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependencies between the characteristics.
[0112] The target pre-reading time interval may be one or more time intervals corresponding to a period of time in the future.
[0113] Step 204 , reading corresponding target pre-read data from the solid state drive according to the target pre-read information, and saving the target pre-read data to a preset cache area.
[0114] Specifically, according to the read address information and read data attribute information of the target pre-read data in the solid-state drive represented by the target pre-read information, the corresponding target pre-read data can be read from the solid-state drive, and the target pre-read data can be saved to a preset cache area such as a cache (DRAM) to implement data pre-reading processing on the solid-state drive, thereby improving the subsequent data reading speed of the server host side, thereby reducing the delay in the host side obtaining data.
[0115] Based on the above embodiment, as an implementable manner, in one embodiment, obtaining historical read operation information of a solid state drive includes:
[0116] Step 2011, obtaining the read and write log of the solid state drive;
[0117] Step 2012, filtering original read operation information in the read / write log; wherein the original read operation information includes a logical block address and a data size value;
[0118] Step 213, performing first-order difference calculation processing on the logical block address in the original read operation information according to the time series growth direction, so as to convert the logical block address into an address feature;
[0119] Step 2014, performing multiple processing on the data size value to convert the data size value into a size feature;
[0120] Step 2015: determining historical read operation information of the solid state drive according to the address characteristics and the size characteristics.
[0121] Specifically, since the read and write logs of the solid-state hard disk include both read operation information and write operation information, the original read operation information with a read identifier is first filtered from the read and write logs, and then the original read operation information is preprocessed to remove invalid interference features such as read operation failure records, and only includes the logical block address and data size value. In order to further reduce the amount of computation of the machine learning model and save the computing resources of the server, the original read operation information can be sorted according to the occurrence time of each original read operation information, and then the first-order difference calculation and processing of the logical block address (absolute value of LBA) in the original read operation information is performed in the direction of the time series growth to convert the logical block address into an address feature (LBA differential sequence). The obtained address feature retains the relative position feature and can reflect the LBA increase and decrease trend.
[0122] Specifically, in order to further save computing resources, the data size value can also be processed by multiples to convert the data size value into a size feature. On the one hand, data with a data size value less than a preset scale threshold can be eliminated from the original read operation information, such as removing read operation data less than 4K (4096 Byte) bytes, because the prediction of fragmented data with a small data size value will increase the convergence difficulty of the neural network model (machine learning model) and will bring excessive CPU computing power consumption, which will reduce the performance of the solid-state drive. On the other hand, the read data size greater than 4K bytes (preset scale threshold) can be rounded up to its 4K multiple size, and only the 4K number contained in the read operation is retained to obtain the size feature.
[0123] Furthermore, in the training results of the machine learning model, the LBA differential sequence and the data size (size feature) in units of 4K can be Z-Score standardized to convert data of different magnitudes into a unified metric score, which is beneficial for model training to prevent gradient explosion. Arrange in the direction of time series growth. So far, the training data set The construction is complete.
[0124] On the basis of the above embodiments, since the multi-dimensional time series fusion feature will directly affect the accuracy of the prediction result of the target pre-read information, therefore, in order to improve the accuracy of the prediction result, as an implementable method, in one embodiment, the multi-dimensional time series fusion feature of the solid state drive is determined according to the historical read operation information, including:
[0125] Step 2021, generating a historical read operation sequence of a preset time point length according to the historical read operation information;
[0126] Step 2022, performing a convolution operation on the historical read operation sequence to upgrade the historical read operation sequence into a historical read operation projection;
[0127] Step 2023, determining the local position feature coding and the multi-dimensional time series feature coding of the historical read operation sequence according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection;
[0128] Step 2024, determining the multi-dimensional time series fusion features of the solid state drive based on the historical read operation projection, the local position feature encoding, and the multi-dimensional time series feature encoding.
[0129] It should be noted that in order to adapt to the machine learning model, the data input format is first set, the number of single batch samples (batch_size) for training is set to N, and the training data set is According to the time series growth direction, it is divided into a sequence of preset time points with a length of L, and the division step is 1. The data set has two variables, namely the LBA difference value and the standardized data size. The data input format of the encoder encoder is , the data input formula of the decoder is ,in The length of the next time interval (target pre-reading time interval) that needs to be predicted.
[0130] Specifically, after generating several historical read operation sequences with a preset time point length of L based on the historical read operation data, the low-dimensional binary time series variables are projected into the high-dimensional space to obtain richer input feature information and enhance the expression ability. The specific implementation is to use D groups of convolution kernels with a size of Conv1D performs convolution operation on the input data, and the format of the input data after dimensionality increase is and , D is a multiple of 2, and the data after dimensionality increase (historical read operation projection) is marked as .
[0131] It should be further explained that the machine learning model used in the embodiment of the present application adopts the transformer model. The transformer model does not inherently learn the dependencies between time series, and it is necessary to add time series features to the input data to build a model embedding layer (multi-dimensional time series fusion features). In order to obtain multi-dimensional contextual attributes on a long time series, the data is encoded according to time dimensions such as seconds, minutes, hours, days and weeks. In particular, the three time dimension periods of seconds, minutes and hours are all set to [0, 59].
[0132] Specifically, in one embodiment, the local position feature sub-code and multi-dimensional timing feature sub-code corresponding to each time point variable can be determined based on the position information of the variable at each time point in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection; the local position feature sub-code and multi-dimensional timing feature sub-code corresponding to the variable at each time point are determined.
[0133] It should be noted that the position information can represent the time point at which the variable at the time point is in the historical read operation sequence. The historical read operation sequence includes time points, each of which corresponds to a set of time point variables.
[0134] Specifically, in one embodiment, sine and cosine can be used to characterize and calculate feature distances. For any time point variable, when the position information of the time point variable in the historical read operation sequence characterizes that the time point variable is an even time point variable, the local position feature sub-code of the time point variable is determined based on the following formula:
[0135]
[0136] in, The local position feature sub-encoding of the time point variable representing the current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence. Indicates the position information of the variable at this time point in the current time dimension. represents the sine function, Indicates the preset time point length of the historical read operation sequence. Represents the dimension of the projection of historical read operations.
[0137] Specifically, the time point variables corresponding to the 1st time point, the 3rd time point, and the 5th time point in the historical read operation sequence are odd time point variables, and the time point variables corresponding to the 2nd time point, the 4th time point, and the 6th time point in the historical read operation sequence are even time point variables.
[0138] Accordingly, in one embodiment, for any time point variable, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an odd time point variable, the local position feature sub-code of the time point variable is determined based on the following formula:
[0139]
[0140] in, The local position feature sub-encoding of the time point variable representing the current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence. Indicates the position information of the variable at this time point in the current time dimension. represents the cosine function, Indicates the preset time point length of the historical read operation sequence. Represents the dimension of the projection of historical read operations.
[0141] It should be noted that, when multiple time dimensions use three time dimensions of seconds, minutes and hours, the current time dimension is any time dimension of seconds, minutes or hours.
[0142] Specifically, in one embodiment, for any time point variable, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an even time point variable, the multi-dimensional temporal feature sub-coding of the time point variable is determined based on the following formula:
[0143]
[0144] in, The multi-dimensional temporal feature sub-coding of the time point variable representing the current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence. Indicates the position information of the variable at this time point in multiple different time dimensions. represents the sine function, Indicates the preset time point length of the historical read operation sequence. Represents the dimension of the projection of historical read operations.
[0145] Accordingly, in one embodiment, for any time point variable, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an odd time point variable, the local position feature sub-code of the time point variable is determined based on the following formula:
[0146]
[0147] in, The local position feature sub-encoding of the time point variable representing the current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence. Indicates the position information of the variable at this time point in multiple different time dimensions. represents the cosine function, Indicates the preset time point length of the historical read operation sequence. Represents the dimension of the projection of historical read operations.
[0148] Specifically, the position information of the time point variable in different time dimensions can be obtained by mapping the time point variable to different time dimensions. , each time dimension corresponds to a location information .
[0149] Furthermore, in one embodiment, in order to further improve the accuracy of the multi-dimensional timing fusion features, the multi-dimensional timing fusion sub-features corresponding to the variables at each time point in the historical read operation sequence can be determined based on the historical read operation projection, local position feature encoding and multi-dimensional timing feature encoding; the multi-dimensional timing fusion features of the solid-state drive can be determined based on the multi-dimensional timing fusion sub-features corresponding to the variables at each time point in the historical read operation sequence.
[0150] Specifically, the time point variables in the historical read operation sequence can be used as feature fusion units, and the multi-dimensional time series fusion features of the solid state drive can be determined according to the multi-dimensional time series fusion sub-features corresponding to each time point variable in the historical read operation sequence.
[0151] Specifically, based on the following formula, the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence are determined:
[0152]
[0153] in, Indicates The first The multi-dimensional time series fusion sub-features corresponding to the time point variables, , Indicates the preset scaling factor, Indicates The input variable projection corresponding to the variable at a time point in the historical read operation projection, Indicates The local position feature encoding of the variable at each time point, Indicates Multi-dimensional time series feature encoding of time point variables, Indicates the position information of the variable at this time point in the historical read operation sequence. Represents multi-dimensional traversal and summation calculation. Actually represents the first The position of a time point variable in the entire data set, that is, determining the time point variable of the time point variable in the entire data set, the data set includes several historical read operation sequences arranged in time sequence.
[0154] For example, Figure 3 As shown in FIG. 1 , it is a schematic diagram of the structure of the multi-dimensional time series fusion feature provided in an embodiment of the present application. For example, Respectively represent the first The input variable projection corresponding to the variable at each time point (variable projection), Respectively represent the first The local position feature encoding (local position encoding) corresponding to the time point variable, the multi-dimensional time series fusion sub-features are divided into second-time series encoding, minute-time series encoding and hour-time series encoding, second Second Respectively represent the first The second-time series code corresponding to the time point variable, Figure 3 Middle point Respectively represent the first The time-series code corresponding to the time point variable, The time-series coding corresponding to the six time-point variables Figure 3 Not shown, Figure 3 China Times hour Respectively represent the first The time-series code corresponding to the time point variable, Time-series coding corresponding to the six time point variables Figure 3 Not shown in FIG.
[0155] On the basis of the above embodiments, in the process of model construction, the encoder and decoder structures are introduced, and the multi-head probabilistic sparse self-attention and feature distillation can remove the calculation and parameter redundancy in the hidden layer of the network, and reduce the memory and CPU computing power occupation. Therefore, in order to further improve the prediction efficiency of the target pre-reading information, as an implementable method, in one embodiment, according to the time series variable characteristics represented by the multi-dimensional time series fusion features and the dependency relationship between the features, the target pre-reading information corresponding to the target pre-reading time interval is determined, including:
[0156] Step 2031, mapping the multi-dimensional time series fusion features to multiple feature vector spaces to convert the multi-dimensional time series fusion features into a query vector, a key vector and a value vector;
[0157] Step 2032, determining the attention score corresponding to each temporal feature element in the multi-dimensional temporal fusion feature according to the similarity between the query vector and the key vector;
[0158] Step 2033, determining the attention weight of each temporal feature element in the multi-dimensional temporal fusion feature according to the attention score;
[0159] Step 2034, determining the attention probability distribution corresponding to the multi-dimensional time series fusion feature according to the attention weight and value vector of each time series feature element;
[0160] Step 2035, based on the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution, the time series variable feature is screened from the multiple time series feature elements in the multi-dimensional time series fusion feature, and the dependency relationship between the features is determined;
[0161] Step 2036, constructing a prediction mask sequence based on the multi-dimensional time series fusion features;
[0162] Step 2037, performing mask prediction on the mask interval in the prediction mask sequence according to the time series variable features and the dependency relationship between the features in the multi-dimensional time series fusion features, and obtaining the mask prediction result of the mask interval;
[0163] Step 2037: Determine the target pre-reading information corresponding to the target pre-reading time interval according to the mask prediction result of the mask interval.
[0164] Specifically, in one embodiment, based on the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution, several time series feature elements whose distance exceeds a preset distance threshold can be selected as candidate time series feature elements; feature distillation processing is performed on the candidate time series feature elements to obtain time series variable features.
[0165] It should be noted that the neural network model in the embodiment of the present application adopts a neural network model with an improved encoder-decoder structure, and the proposed data pre-reading method uses the encoder of the model to extract the time series variable features and the dependencies between the features, and uses the decoder to infer and generate the prediction results of the read operation of the next set time interval. Figure 4 As shown, it is a structural schematic diagram of the neural network model provided in an embodiment of the present application, and the neural network model includes a feature encoding module and a feature decoding module, wherein the feature encoding module is composed of multiple stacked encoders, and the encoder is based on a multi-head probabilistic sparse attention mechanism and a feature distillation mechanism.
[0166] Specifically, the multi-dimensional time series fusion features are first used as model input and input into the feature encoding module. The feature encoding module maps the obtained multi-dimensional time series fusion features to multiple feature vector spaces to convert the multi-dimensional time series fusion features into query vectors, key vectors and value vectors. Among them, the query vector (Q) represents the feature to be queried, which is used to measure the similarity between other features and the query feature. The query vector is obtained by linearly transforming the query feature. The key vector (K) represents the relationship between the feature to be queried and other features, which is used to calculate the importance of other features to the query feature. Similarly, the key vector is obtained by linearly transforming other features. The value vector (V) is the feature vector corresponding to the key vector, which contains the feature information corresponding to the key vector. The value vector is used for weighted calculation, and the attention score is calculated according to its similarity with the query vector, and the weight of the feature is determined.
[0167] Furthermore, in the attention calculation process, since the elements in the sequence only have dependencies on a few other elements, a few dot products can provide dynamic and meaningful attention. The embodiment of the present application uses KL divergence to calculate the distance between the attention probability distribution and the preset uniform probability distribution, and selects the one that makes the distribution distance larger. , and replace the remaining part with the average value of V.
[0168] The i-th row of the output Z after attention calculation can be expressed as:
[0169]
[0170] Where d is the input dimension, is an asymmetric exponential kernel function , that is, use The probability output pair Perform weighted sum calculation. Not all can provide useful information for attention calculation and distribute the attention probability With uniform distribution Substitute KL divergence for distance measurement and take the position with the largest difference as the approximate value. Finally, the i-th The approximate sparsity of is expressed as follows:
[0171]
[0172] Randomly sample from the original Q indivual The dot product is calculated , which reduces the amount of model calculation and complexity, and selects the first u that are far from the uniform distribution , which can provide effective information for network training , the final attention calculation is as follows:
[0173]
[0174] in, By the previous u It is considered that the distribution is relatively far from uniform and has dynamic features. Furthermore, a multi-head attention mechanism is used to obtain feature information from different projection subspaces:
[0175]
[0176] in, is the input Embedding, h is the number of decomposed heads, are learnable parameters in the projection process.
[0177] For the feature distillation mechanism, the encoders need to be stacked multiple times during the feature extraction process, resulting in parameter redundancy. After the multi-head probabilistic sparse attention calculation is completed, feature distillation is performed to extract the dominant significant feature information, generate a focused self-attention feature map, and use it as the input of the next encoder. The specific implementation of distillation from the jth neural network layer to the j+1th layer is as follows:
[0178]
[0179] in, Represents a multi-head probabilistic sparse attention calculation module, which is then aligned with the temporal dimension through a one-dimensional convolution Conv1D and used The activation function performs nonlinear mapping on the input, and finally uses Max pooling (with a stride of 2) downsamples the feature map to half its resolution.
[0180] For the feature decoding module, the decoding process is similar to the encoding encoder, and it also needs to calculate multi-head probabilistic sparse self-attention and stack it multiple times, which will not be repeated here. The input of the encoder decoder in the feature encoding module comes from two parts. One is the K and V output by the encoder after extracting the temporal features, which are used for multi-head attention calculation with the Q of the decoder. The other is the embedding after using the Padding 0 mask as the original input of the decoder. , the specific implementation is as follows:
[0181]
[0182] in, represents the predicted mask sequence, It is the partial embedding before the next time series interval to be predicted, that is, the embedding after the historical sequence projection (multi-dimensional time series fusion features). The target prediction sequence part for Padding 0 is Indicates the mask interval to prevent the model from associating with future information during the calculation process. When calculating the multi-head attention of the mask, the dot product of the mask part is set to negative infinity, and the output is 0 after softmax, so that the loss of the mask part will not be introduced in the back propagation.
[0183] The purpose of the entire neural network model is to predict the masked time series part. The model can directly predict the multivariate time series output of all mask interval positions after a single forward inference. In the output part, full connection is used to fuse features, and its dimension is In the embodiments of the present application , that is, predicting the binary timing variables, we can obtain the LBA address and data size of the read operation sent by the host in the next predetermined time interval (needs to be denormalized and depreprocessed). The length of the next time interval.
[0184] Furthermore, the original output (mask prediction result) of the above neural network model can be transformed through denormalization and depreprocessing to obtain the LBA address and data size prediction sequence result of the host read operation in the specified next time interval, that is, to obtain the target pre-read information corresponding to the target pre-read time interval.
[0185] During the neural network model training phase, the optimizer in the training process is set to Adam and the loss function is set to the true value. With the predicted value The mean square error MSE between them is implemented as follows:
[0186]
[0187] Based on the above embodiment, as an implementable manner, in one embodiment, according to the target pre-read information, reading the corresponding target pre-read data from the solid state drive includes:
[0188] Step 2041, determining the target logical block address and target data size corresponding to the target pre-read data according to the target pre-read information;
[0189] Step 2042: read the corresponding target pre-read data from the solid state drive according to the target logical block address and the target data size.
[0190] It should be noted that the target pre-read information may include multiple time points, each time point corresponds to a target pre-read data, that is, the target pre-read information includes the target logical block address and target data size corresponding to the target pre-read data at each time point, and then according to the target logical block address and target data size corresponding to the target pre-read data at each time point, the target pre-read data corresponding to each time point is read from the solid-state hard disk.
[0191] Specifically, in one embodiment, in order to avoid addressing anomalies and the like in the process of reading target pre-read data from a solid-state hard disk, before reading the corresponding target pre-read data from the solid-state hard disk based on the target pre-read information, it is possible to determine whether the target pre-read information satisfies a preset legal condition; when it is determined that the target pre-read information satisfies the preset legal condition, the step of reading the corresponding target pre-read data from the solid-state hard disk based on the target pre-read information is executed.
[0192] Specifically, the target logical block address LBA in the predicted target pre-read data is compared with the legal LBA interval that can be sent by the actual host. If an address is out of bounds or illegal, it is determined that the target pre-read information does not meet the preset legal conditions, and the prediction result is ignored. The target data size in the predicted target pre-read data is compared with the maximum legal size threshold that can be sent by the actual host. If the target data size exceeds the maximum legal size threshold, it is determined that the target pre-read information does not meet the preset legal conditions, and the prediction result is ignored. Among them, if the target data size in the predicted target pre-read data is less than or equal to 0, it is also determined that the target pre-read information does not meet the preset legal conditions, and the prediction result is ignored.
[0193] On the basis of the above embodiment, in order to avoid bus conflicts of the solid state drive, as an implementable manner, in one embodiment, before reading corresponding target pre-read data from the solid state drive according to the target pre-read information, the method further includes:
[0194] Step 301, determining whether the read bus of the solid state drive is in an idle state;
[0195] Step 302, when it is determined that the read bus of the solid state hard disk is in an idle state, determining whether the solid state hard disk is performing a write operation;
[0196] Step 303, when the solid state drive is performing a write operation, after suspending the write operation, a step of reading corresponding target pre-read data from the solid state drive according to the target pre-read information is performed;
[0197] Step 304, after the target pre-read data is saved in the preset buffer area, continue to perform the write operation.
[0198] It should be noted that if the read bus of the solid state drive is in an idle state, it indicates that the host terminal is not currently performing a read operation on the solid state drive.
[0199] Specifically, when the read bus of the solid-state drive is in an idle state but the solid-state drive is performing a write operation, since the latency requirement of the write operation is lower than that of the read operation, the write operation can be suspended first and the data pre-read operation can be performed preferentially, that is, the step of reading the corresponding target pre-read data from the solid-state drive according to the target pre-read information, and resuming the write operation after the pre-read is completed.
[0200] Accordingly, in one embodiment, when it is determined that the read bus of the solid state drive is not in an idle state, the target pre-read information corresponding to the next target pre-read time interval is determined according to the target pre-read information and the historical read operation information of the solid state drive.
[0201] Specifically, if the read bus of the solid-state drive is not in an idle state, it indicates that the solid-state drive is responding to a read request sent by the host. In order to avoid the impact of the data pre-read operation on the response to the read request, the above steps can be continued to determine the target pre-read information corresponding to the next target pre-read time interval according to the target pre-read information and the historical read operation information of the solid-state drive, that is, continue to predict subsequent target pre-read time intervals until the read bus of the solid-state drive is in an idle state.
[0202] Furthermore, in one embodiment, in order to further improve the accuracy of the prediction results of the neural network model for the target pre-read information, the data access behavior of the solid state drive can be periodically counted, and the model hyperparameters of the neural network model can be continuously fine-tuned, and the model hyperparameters at least include preset scaling factors, etc. When there are new data access logs, these logs can be parsed, cleaned and pre-processed, and added to the training set, and the hyperparameters can be adaptively adjusted, the historical model is used as the pre-training model, and the time series model is continuously fine-tuned. The specific fine-tuning process can be referred to the above embodiment, which will not be repeated here.
[0203] Among them, during the entire model enabling cycle, the embodiment of the present application can continuously maintain and update the time series model, continuously add new solid-state drive access logs after cleaning to the training data set, use the historical model as a pre-training model, and fine-tune the time series model, which can have better adaptability and robustness to the actual usage environment of the solid-state drive.
[0204] For example, Figure 5 As shown, it is a schematic diagram of the overall process of the solid state drive data processing method provided in the embodiment of the present application, such as Figure 5 The method shown is as follows Figure 2 An exemplary implementation of the method shown is shown, and the implementation principles of the two are the same and will not be repeated here.
[0205] The solid-state hard disk data processing method provided in the embodiment of the present application obtains the historical read operation information of the solid-state hard disk; determines the multi-dimensional time series fusion characteristics of the solid-state hard disk based on the historical read operation information; determines the target pre-read information corresponding to the target pre-read time interval based on the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependency relationship between the characteristics; reads the corresponding target pre-read data from the solid-state hard disk according to the target pre-read information, and saves the target pre-read data to a preset cache area. The method provided by the above scheme improves the accuracy of the target pre-read data determination result by analyzing the historical read operation information of the solid-state hard disk and fully integrating the multi-dimensional time series characteristics of the historical read operation information, so as to ensure that the target pre-read data cached in the preset cache area is the data that the server actually needs for the current business. In addition, the encoder and decoder structures are introduced, and the multi-head probabilistic sparse self-attention and feature distillation can remove the calculation and parameter redundancy in the hidden layer of the network, and reduce the memory and CPU computing power usage. After obtaining the original prediction results of the model, an adaptive pre-reading strategy is also provided, which is divided into two stages for result post-processing, eliminating illegal and unreasonable LBAs and data sizes, and judging and selecting the prediction results based on the bus occupancy and read queue conditions, and reading them into the fast cache to prevent addressing anomalies, bus conflicts and CPU computing power consumption.
[0206] An embodiment of the present application provides a solid-state hard disk data processing device, which is used to execute the solid-state hard disk data processing method provided by the above embodiment.
[0207] like Figure 6 , which is a schematic diagram of the structure of a solid state disk data processing device provided in an embodiment of the present application. The solid state disk data processing device 60 comprises: an acquisition module 601 , a determination module 602 , a prediction module 603 and a processing module 604 .
[0208] Among them, the acquisition module is used to obtain the historical read operation information of the solid-state drive; the determination module is used to determine the multi-dimensional timing fusion characteristics of the solid-state drive based on the historical read operation information; the prediction module is used to determine the target pre-reading information corresponding to the target pre-reading time interval based on the timing variable characteristics represented by the multi-dimensional timing fusion characteristics and the dependency relationship between the characteristics; the processing module is used to read the corresponding target pre-reading data from the solid-state drive according to the target pre-reading information, and save the target pre-reading data to a preset cache area.
[0209] Regarding the solid state hard disk data processing device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0210] The solid-state hard disk data processing device provided in the embodiment of the present application is used to execute the solid-state hard disk data processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0211] An embodiment of the present application provides an electronic device for executing the solid state drive data processing method provided in the above embodiment.
[0212] like Figure 7 FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 70 includes: at least one processor 71 and a memory 72 .
[0213] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the solid-state hard disk data processing method provided in the above embodiment.
[0214] The electronic device provided in the embodiment of the present application is used to execute the solid-state hard disk data processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0215] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the solid-state hard disk data processing method provided in any of the above embodiments is implemented.
[0216] The storage medium containing computer executable instructions provided in the embodiment of the present application can be used to store the computer executable instructions of the solid-state hard disk data processing method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.
[0217] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the solid-state hard disk data processing method provided in the above-mentioned embodiment.
[0218] The computer program product provided in the embodiment of the present application can be used to execute computer instructions of the solid-state hard disk data processing method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.
[0219] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0220] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0221] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0222] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment 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.
[0223] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0224] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0225] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing data of a solid state hard disk, characterized in that: include: Get the historical read operation information of the solid state drive; Determining a multi-dimensional timing fusion feature of the solid state drive according to the historical read operation information; Determine the target pre-reading information corresponding to the target pre-reading time interval according to the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependency relationship between the characteristics; According to the target pre-read information, reading corresponding target pre-read data from the solid state drive, and saving the target pre-read data to a preset cache area; The determining, according to the historical read operation information, the multi-dimensional timing fusion feature of the solid state drive includes: Generate a historical read operation sequence of a preset time point length according to the historical read operation information; Performing a convolution operation on the historical read operation sequence to upgrade the historical read operation sequence into a historical read operation projection; Determine the local position feature coding and the multi-dimensional time series feature coding of the historical read operation sequence according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection; Determining a multi-dimensional time series fusion feature of the solid state drive according to the historical read operation projection, the local position feature encoding, and the multi-dimensional time series feature encoding; The determining of the local position feature coding and the multi-dimensional time series feature coding of the historical read operation sequence according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes: Determine the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection; Determine the local position feature code and the multi-dimensional time series feature code of the historical read operation sequence according to the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each of the time point variables; The determining of the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes: For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an even time point variable, the local position feature sub-code of the time point variable is determined based on the following formula: in, A local position feature subcode representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in the current time dimension. represents the sine function, represents the preset time point length of the historical read operation sequence, Represents the dimension of the projection of historical read operations; For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an odd time point variable, the local position feature sub-code of the time point variable is determined based on the following formula: in, A local position feature subcode representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in the current time dimension. represents the cosine function, represents the preset time point length of the historical read operation sequence, Indicates the dimension of the projection of the historical read operation.
2. The method according to claim 1, characterized in that The obtaining of historical read operation information of the solid state drive includes: Get the read and write logs of the solid state drive; Filtering original read operation information in the read-write log; wherein the original read operation information includes a logical block address and a data size value; According to the time series growth direction, performing first-order difference calculation processing on the logic block address in the original read operation information to convert the logic block address into an address feature; Performing multiplication processing on the data size value to convert the data size value into a size feature; According to the address characteristics and the size characteristics, historical read operation information of the solid state drive is determined.
3. The method according to claim 1, characterized in that The determining of the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection includes: For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an even time point variable, the multi-dimensional temporal feature sub-coding of the time point variable is determined based on the following formula: in, A multi-dimensional temporal feature sub-code representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in multiple different time dimensions. represents the sine function, represents the preset time point length of the historical read operation sequence, Represents the dimension of the projection of historical read operations; For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an odd time point variable, the multi-dimensional temporal feature sub-coding of the time point variable is determined based on the following formula: in, A multi-dimensional temporal feature sub-code representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in multiple different time dimensions. represents the cosine function, represents the preset time point length of the historical read operation sequence, Indicates the dimension of the projection of the historical read operation.
4. The method according to claim 3, characterized in that The determining the multi-dimensional time series fusion feature of the solid state drive according to the historical read operation projection, the local position feature encoding and the multi-dimensional time series feature encoding includes: Determine the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence according to the historical read operation projection, the local position feature encoding and the multi-dimensional time series feature encoding; The multi-dimensional time series fusion feature of the solid state drive is determined according to the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence.
5. The method according to claim 4, characterized in that The determining, according to the historical read operation projection, the local position feature encoding and the multi-dimensional time series feature encoding, the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence includes: Based on the following formula, the multi-dimensional time series fusion sub-features corresponding to the variables at each time point in the historical read operation sequence are determined: in, Indicates The first The multi-dimensional time series fusion sub-features corresponding to the time point variables, Indicates the preset scaling factor, Indicates the The input variable projection corresponding to the time point variable in the historical read operation projection, Indicates the The local position feature encoding of the variable at each time point, Indicates the Multi-dimensional time series feature encoding of time point variables, Indicates the position information of the variable at this time point in the historical read operation sequence, Represents multi-dimensional traversal and summation calculation.
6. The method according to claim 1, characterized in that The determining the target pre-reading information corresponding to the target pre-reading time interval according to the time series variable features represented by the multi-dimensional time series fusion features and the dependency relationship between the features includes: Mapping the multi-dimensional time series fusion features to multiple feature vector spaces to convert the multi-dimensional time series fusion features into a query vector, a key vector and a value vector; Determining, according to the similarity between the query vector and the key vector, an attention score corresponding to each temporal feature element in the multi-dimensional temporal fusion feature; Determining the attention weight of each temporal feature element in the multi-dimensional temporal fusion feature according to the attention score; Determining the attention probability distribution corresponding to the multi-dimensional time series fusion feature according to the attention weight and value vector of each of the time series feature elements; According to the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution, the time series variable feature is selected from the multiple time series feature elements in the multi-dimensional time series fusion feature, and the dependency relationship between the features is determined; Constructing a prediction mask sequence according to the multi-dimensional time series fusion features; According to the time series variable features and the dependency relationship between the features in the multi-dimensional time series fusion features, mask prediction is performed on the mask interval in the prediction mask sequence to obtain the mask prediction result of the mask interval; According to the mask prediction result of the mask interval, target pre-reading information corresponding to the target pre-reading time interval is determined.
7. The method according to claim 6, characterized in that The step of screening the time series variable feature from the multiple time series feature elements in the multi-dimensional time series fusion feature according to the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution includes: According to the distance between the attention probability distribution corresponding to the multi-dimensional time series fusion feature and the preset uniform probability distribution, a number of time series feature elements whose distance exceeds a preset distance threshold are taken as candidate time series feature elements; Perform feature distillation processing on the candidate time series feature elements to obtain time series variable features.
8. The method according to claim 1, characterized in that The step of reading corresponding target pre-read data from the solid state drive according to the target pre-read information includes: Determining a target logical block address and a target data size corresponding to the target pre-read data according to the target pre-read information; According to the target logical block address and the target data size, corresponding target pre-read data is read from the solid state drive.
9. The method according to claim 1, characterized in that: Before reading corresponding target pre-read data from the solid state drive according to the target pre-read information, the method further includes: Determining whether the target pre-read information meets a preset legal condition; When it is determined that the target pre-read information satisfies the preset legal condition, the step of reading the corresponding target pre-read data from the solid state drive according to the target pre-read information is performed.
10. The method according to claim 1, characterized in that Before reading corresponding target pre-read data from the solid state drive according to the target pre-read information, the method further includes: Determining whether a read bus of the solid state drive is in an idle state; In the case where it is determined that the read bus of the solid state hard disk is in an idle state, determining whether the solid state hard disk is performing a write operation; When the solid state drive is performing a write operation, suspending the write operation and then performing the step of reading the corresponding target pre-read data from the solid state drive according to the target pre-read information; After the target pre-read data is saved in the preset buffer area, the write operation is continued.
11. The method according to claim 10, characterized in that The method further comprises: When it is determined that the read bus of the solid state drive is not in an idle state, the target pre-read information corresponding to the next target pre-read time interval is determined according to the target pre-read information and the historical read operation information of the solid state drive.
12. A solid state hard disk data processing device, characterized in that: include: An acquisition module is used to obtain historical read operation information of the solid state drive; A determination module, configured to determine a multi-dimensional timing fusion feature of the solid state drive according to the historical read operation information; A prediction module, used to determine the target pre-reading information corresponding to the target pre-reading time interval according to the time series variable characteristics represented by the multi-dimensional time series fusion characteristics and the dependency relationship between the characteristics; A processing module, configured to read corresponding target pre-read data from the solid state drive according to the target pre-read information, and save the target pre-read data to a preset cache area; The determining module is specifically used for: Generate a historical read operation sequence of a preset time point length according to the historical read operation information; Performing a convolution operation on the historical read operation sequence to upgrade the historical read operation sequence into a historical read operation projection; Determine the local position feature coding and the multi-dimensional time series feature coding of the historical read operation sequence according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection; Determining a multi-dimensional time series fusion feature of the solid state drive according to the historical read operation projection, the local position feature encoding, and the multi-dimensional time series feature encoding; The determining module is specifically used for: Determine the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each time point variable according to the position information of each time point variable in the historical read operation sequence, the preset time point length and the dimension of the historical read operation projection; Determine the local position feature code and the multi-dimensional time series feature code of the historical read operation sequence according to the local position feature sub-code and the multi-dimensional time series feature sub-code corresponding to each of the time point variables; The determining module is specifically used for: For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an even time point variable, the local position feature sub-code of the time point variable is determined based on the following formula: in, A local position feature subcode representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in the current time dimension. represents the sine function, represents the preset time point length of the historical read operation sequence, Represents the dimension of the projection of historical read operations; For any of the time point variables, when the position information of the time point variable in the historical read operation sequence indicates that the time point variable is an odd time point variable, the local position feature sub-code of the time point variable is determined based on the following formula: in, A local position feature subcode representing a time point variable of a current traversal position in the historical read operation sequence, Indicates the position information of the variable at this time point in the historical read operation sequence, Indicates the position information of the variable at this time point in the current time dimension. represents the cosine function, represents the preset time point length of the historical read operation sequence, Indicates the dimension of the projection of the historical read operation.
13. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Data reading method and device and electronic equipment
CN115202748A
