IO scheduling method, magnetic tape unit equipment and storage system

By using a latency prediction model to optimize motor scheduling in tape drive devices, the problem of motor parameter adaptation was solved, and the access efficiency and latency performance of tape drive devices were improved.

CN121433562APending Publication Date: 2026-01-30CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410986487.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

In existing tape drive equipment, the pre-calibrated parameters cannot be adapted to the actual operating scenarios of the motor, resulting in low motor scheduling performance and increased tape read/write latency.

Method used

A latency prediction model based on the motor's addressing parameters is adopted. Through training and updating, the access latency under different scheduling algorithms is predicted. The scheduling algorithm with the minimum predicted latency is selected to control the motor to drive the magnetic tape. Combined with the magnetic head accessing the area in the magnetic tape, the motor scheduling is optimized.

Benefits of technology

It improves the access efficiency of tape drive devices, reduces the actual read/write latency of tape drive devices, and adapts to performance changes in different motor states and life cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121433562A_ABST
    Figure CN121433562A_ABST
Patent Text Reader

Abstract

The invention discloses an IO scheduling method, magnetic tape unit equipment and a storage system, and relates to the technical field of magnetic tapes. The method comprises the following steps: training a time delay prediction model according to addressing parameters of a motor in an actual use process, predicting access time delays of an IO flow under different scheduling algorithms by adopting the trained time delay prediction model, and selecting a scheduling algorithm corresponding to the minimum predicted time delay to control the motor, so that the motor drives a magnetic tape to be wound, and the service life of the magnetic tape is prolonged. And the area in the magnetic tape is accessed by the magnetic head, so that the time delay required for scheduling the motor in the magnetic tape unit equipment is reduced, and the access efficiency of the magnetic tape unit equipment is improved. Wherein the time delay prediction model can be determined according to addressing parameters of the motor, for example, the addressing parameters can include but not limited to the maximum speed, the cruising speed, the read-write speed, the acceleration acceleration, the deceleration acceleration, the lane changing time delay, the turning-around time delay and the like of the motor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of magnetic tape technology, and in particular to an I / O scheduling method, a magnetic tape drive device, and a storage system. Background Technology

[0002] Magnetic tape is the primary storage medium for backup and archiving scenarios, offering advantages such as low cost, large capacity, and long lifespan. In storage technology, magnetic tape, with its low cost, high reliability, and security, is the optimal choice for backup and archiving. During magnetic tape access, a motor drives the tape reel, aligning the head with the target area on the tape for data reading and writing. In batch data access scenarios, a pre-defined model predicts access latency based on pre-calibrated motor parameters and the target data to be accessed by the head, and determines a motor scheduling scheme based on this latency. However, because the pre-calibrated parameters cannot adapt to the actual operating conditions of the motor, the motor scheduling performance is low, increasing the actual read / write latency of the magnetic tape. Summary of the Invention

[0003] This application provides an IO scheduling method, a tape drive device, and a storage system, which solves the problem that pre-calibrated parameters cannot be adapted to the actual operating scenarios of motors, thus improving the scheduling performance of motors in tape drive devices and reducing the actual read / write latency of tape drive devices.

[0004] The technical solution adopted in this application is as follows.

[0005] Firstly, this application provides an I / O scheduling method. This I / O scheduling method is applied to a tape drive device, which includes a magnetic head, a magnetic tape, and a motor. Exemplarily, the tape drive device may also include a controller. Taking the controller executing the I / O scheduling method as an example, the I / O scheduling method provided in this application includes: the controller acquiring an I / O stream and processing the I / O stream and the initial address of the magnetic head alignment in the tape based on a latency prediction model to obtain multiple predicted latencies of the motor under various scheduling algorithms. The I / O stream includes multiple I / O requests, and each I / O request includes an access address. The latency prediction model is determined based on the addressing parameters of the motor during use. The addressing parameters include one or more combinations of the following: the motor's maximum speed, cruising speed, read / write speed, acceleration, deceleration, lane-changing latency, and turnaround latency. One scheduling algorithm corresponds to one predicted latency, and the scheduling algorithm includes one or more combinations of the following: natural ordering, linear ordering of access addresses, greedy algorithm, and elevator algorithm. Furthermore, the controller controls the motor to drive the magnetic tape according to a first scheduling algorithm corresponding to the minimum predicted latency among the multiple predicted latencies, so that the magnetic head accesses the access addresses corresponding to different I / O requests in the tape.

[0006] In the first aspect of this application, a trained latency prediction model is used to predict the access latency of the I / O stream under different scheduling algorithms. The scheduling algorithm corresponding to the minimum predicted latency is selected to control the motor, enabling the motor to drive the magnetic tape for winding and the magnetic head to access regions on the tape. This helps reduce the latency required for motor scheduling in the tape drive and improves the access efficiency of the tape drive. Moreover, since the latency prediction model is determined based on the addressing parameters of the motor during use, it has good adaptability even for motors in different tape drives and motors in different degradation states during their life cycle. This ensures the prediction accuracy of the latency prediction model and the scheduling performance of the motor, which is beneficial to improving the latency performance of the tape throughout its life cycle.

[0007] In conjunction with the IO scheduling method provided in the first aspect, in one optional implementation, the controller processes the IO stream and the initial address of the head alignment in the tape based on a latency prediction model to obtain multiple predicted latencies of the motor under various scheduling algorithms. This includes: the controller inputs a first IO request and the initial address of the head alignment in the tape into the latency prediction model, and outputs a first sub-predicted latency of the first IO request; the first IO request is any one of multiple IO requests. Furthermore, the controller obtains a first predicted latency of the motor under a first scheduling algorithm based on the multiple sub-predicted latencies of the multiple IO requests in the IO stream. In the first aspect of this application, using a latency prediction model to predict the latency of a single IO request and determining the access latency of the IO stream based on the predicted latencies of different IO requests in the IO stream helps the controller select a scheduling algorithm with a smaller access latency to process the IO stream, reducing the access latency of the tape drive and improving the access efficiency of the tape drive.

[0008] In conjunction with the IO scheduling method provided in the first aspect, in an optional implementation, the IO scheduling method provided in this application further includes: the controller acquiring the first access delay of the tape drive device processing the first IO request according to the first scheduling algorithm, and the controller training a delay prediction model based on the first sub-predicted delay of the first IO request and the first access delay to obtain an updated delay prediction model. In the first aspect of this application, the tape drive device can collect the actual access delay (first access delay) corresponding to the IO request during the IO scheduling process, and the controller trains and updates the delay prediction model based on the collected actual access delay and the predicted delay (first sub-predicted delay) corresponding to the IO request. This allows the delay prediction model to be continuously optimized and improved during use, thereby adapting to the continuously degrading motor in the tape drive device, which is beneficial to improving the scheduling performance of the tape drive device and reducing the access delay of the IO stream.

[0009] In conjunction with the IO scheduling method provided in the first aspect, in one optional implementation, the controller trains a latency prediction model based on the first sub-predicted latency and the first access latency of the first IO request to obtain an updated latency prediction model, including: the controller obtaining the difference between the first access latency and the first sub-predicted latency; and the controller training a latency prediction model based on the difference to obtain an updated latency prediction model.

[0010] In conjunction with the IO scheduling method provided in the first aspect, in one optional implementation, the controller trains a latency prediction model based on the difference to obtain an updated latency prediction model, including: the controller determines whether the difference is greater than or equal to an error threshold; and if the difference is greater than or equal to the error threshold, the controller updates the latency prediction model based on the error threshold to obtain an updated latency prediction model.

[0011] In conjunction with the IO scheduling method provided in the first aspect, in an optional implementation, before the controller trains a latency prediction model based on the first sub-predicted latency and the first access latency of the first IO request to obtain an updated latency prediction model, the IO scheduling method provided in this application further includes: the controller inputs the first IO request and the initial address into the nominal prediction model, and outputs the nominal latency of the first IO request. The nominal prediction model is obtained by training based on the nominal parameters of the motor, the initial address of the head alignment, and multiple access addresses of the magnetic tape. The nominal parameters of the motor include one or more combinations of the following: a pre-calibrated maximum speed, read / write speed, acceleration, and deceleration. The aforementioned controller training the latency prediction model based on the first sub-predicted latency and the first access latency of the first IO request to obtain an updated latency prediction model includes: the controller obtaining a first difference between the first sub-predicted latency and the nominal latency, and obtaining a second difference between the first access latency and the nominal latency. Additionally, the controller acquires the time delay deviation between the first difference and the second difference, and trains the time delay prediction model based on the time delay deviation to obtain the updated time delay prediction model.

[0012] In the first aspect of this application, the tape drive device records the actual motor parameters (addressing parameters) during use, and predicts the delay deviation by combining the initial address of the head alignment and the access address in the IO request. During the IO scheduling process, the controller can refer to the nominal parameters and actual parameters (addressing parameters) of the motor to train the delay prediction model, so that the delay prediction model can have better adaptability to different tape motors and tape motors in different degradation states during the life cycle, ensuring the accuracy of delay prediction and scheduling performance, and improving the delay performance during the tape life cycle.

[0013] In conjunction with the IO scheduling method provided in the first aspect, in one optional implementation, the aforementioned track-switching delay includes the time it takes for the motor to drive the magnetic tape from one track alignment head to another track alignment head. The turning delay includes the time it takes for the motor to drive the magnetic tape to switch from a first direction to a second direction, wherein the first and second directions are consistent with the length direction of the magnetic tape and opposite to each other.

[0014] In conjunction with the IO scheduling method provided in the first aspect, in one optional implementation, the latency prediction model includes one or more of the following combinations: artificial neural networks, convolutional neural networks, and deep neural networks.

[0015] Secondly, this application provides a model training method. This model training method is executed by a training device, which can be a controller in a tape drive or other devices. The model training method provided in this application includes: the training device acquiring multiple sets of training data. Each set of training data includes: addressing parameters of the motor in the tape drive during use, a first address for head alignment in the tape drive, multiple access addresses of the tape in the tape drive, and access delay for each access address. The addressing parameters include one or more combinations of the following: maximum motor speed, cruising speed, read / write speed, acceleration, deceleration, lane change delay, and turnaround delay. Furthermore, the training device inputs the multiple sets of training data and the first access address into an initial model and outputs a first sub-predicted delay for the first access address; the aforementioned multiple access addresses include the first access address, and the first access address corresponds to the first access delay. Finally, the training device trains the initial model based on the first access delay and the first sub-predicted delay to obtain a delay prediction model.

[0016] In the second aspect of this application, for a single IO request, the training device corrects the predicted latency of the model based on the actual parameters of the motor (addressing parameters) and the actual access latency of the access address in the IO request (first access latency). That is, the training device updates the latency prediction model based on the latency prediction error and the actual parameters of the motor, which helps to adapt the latency prediction model to the actual application scenario of the motor, improve the scheduling performance of the motor in the tape drive, and reduce the actual read and write latency of the tape drive.

[0017] In conjunction with the model training method provided in the second aspect, in one optional implementation, the training device trains an initial model based on a first access delay and a first sub-prediction delay to obtain a delay prediction model, including: the training device obtaining the difference between the first access delay and the first sub-prediction delay; and the training device training the initial model based on the difference to obtain a delay prediction model.

[0018] In conjunction with the model training method provided in the second aspect, in one optional implementation, the training device trains the initial model based on the difference to obtain a latency prediction model, including: the training device determining whether the difference is greater than or equal to an error threshold; and if the difference is greater than or equal to the error threshold, the training device updates the initial model based on the error threshold to obtain the latency prediction model. In the second aspect of this application, the training device corrects the predicted latency of the model based on the motor's addressing parameters and the actual access latency (first access latency) in the IO request, so that the error between the predicted latency of the IO request and the actual access latency of the trained latency prediction model is as small as possible to be less than or equal to the error threshold. This makes the latency prediction model suitable for the actual application scenarios of motors, improves the scheduling performance of motors in tape drives, and reduces the actual read / write latency of tape drives.

[0019] In conjunction with the model training method provided in the second aspect, in an optional implementation, before the training device trains the initial model based on the first access delay and the first sub-prediction delay to obtain the delay prediction model, the model training method provided in this application further includes: the training device inputs the first access address into the nominal prediction model and outputs the nominal delay of the first access address. The nominal prediction model is obtained by training based on the nominal parameters of the motor, the initial address of the head alignment, and multiple access addresses of the magnetic tape. The nominal parameters of the motor include one or more combinations of the following: a pre-calibrated maximum speed, read / write speed, acceleration, and deceleration. The training device trains the initial model based on the first access delay and the first sub-prediction delay to obtain the delay prediction model, including: the training device obtaining a first difference between the first access delay and the nominal delay, and obtaining a second difference between the first sub-prediction delay and the nominal delay. Furthermore, the training device obtains the delay deviation between the first difference and the second difference, and trains the initial model based on the delay deviation to obtain the delay prediction model. In the second aspect of this application, the tape drive device records the actual motor parameters (addressing parameters) during use, and combines the initial address of the head alignment and the access address in the IO request to predict the delay deviation. During the model training process, the nominal parameters and actual parameters (addressing parameters) of the motor are referenced, so that the delay prediction model can have better adaptability to different tape motors and tape motors in different degradation states during the life cycle, ensuring the accuracy of delay prediction and scheduling performance, and improving the delay performance during the tape life cycle.

[0020] In conjunction with the model training method provided in the second aspect, in one optional implementation, the aforementioned track-changing delay includes the time it takes for the motor to drive the magnetic tape from one track alignment head to another track alignment head. The turning delay includes the time it takes for the motor to drive the magnetic tape to switch from a first direction to a second direction, wherein the first and second directions are consistent with the length direction of the magnetic tape and opposite to each other.

[0021] In conjunction with the model training method provided in the second aspect, in one optional implementation, the time delay prediction model includes one or more of the following combinations: artificial neural networks, convolutional neural networks, and deep neural networks.

[0022] Thirdly, this application provides a controller. The controller includes: a communication interface and a processor. The communication interface is used to obtain an I / O stream and a first address of the head alignment in the tape drive device. The processor is used to execute the method provided in the first aspect or any optional implementation thereof, based on the I / O stream and the first address.

[0023] Fourthly, this application provides a training apparatus. The training apparatus includes a transceiver and a processor. The transceiver is used to acquire multiple sets of training data. The processor is used to execute the method provided in the second aspect or any optional implementation thereof based on the multiple sets of training data.

[0024] Fifthly, this application provides a magnetic tape drive device. The magnetic tape drive device includes: a magnetic tape, a magnetic head, a magnetic tape driver, and a controller provided in a third aspect. The magnetic tape is used to store data; the magnetic head is used to access the magnetic tape; the magnetic tape driver includes a motor for driving the magnetic tape to reel in. The controller is used to acquire I / O streams and control the motor to drive the magnetic tape to reel in based on the I / O streams, thereby enabling the magnetic head to access the magnetic tape.

[0025] Sixthly, this application provides a storage system. The storage system includes a storage controller and one or more tape drive devices as described in the fifth aspect. The storage controller is used to manage a target tape drive device among the one or more tape drive devices according to an I / O stream.

[0026] In a seventh aspect, this application provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are executed in an electronic device, the electronic device performs the method provided by any optional implementation of the first or second aspect. The electronic device may refer to the aforementioned controller, training device, magnetic tape drive, or storage system.

[0027] Eighthly, this application provides a computer program product. When the computer program product is run in an electronic device, the electronic device executes the method provided by any optional implementation of the first or second aspect. The electronic device may be a controller, training device, magnetic tape drive, or storage system as described above.

[0028] The beneficial effects of aspects three through eight can be found in the description of any optional implementation in aspect one or two, and will not be repeated here. Based on the implementations provided in the above aspects, this application can be further combined to provide even more implementations. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the structure of a data access system provided in this application.

[0030] Figure 2 This is a structural schematic diagram of a magnetic tape drive device provided in this application.

[0031] Figure 3 A schematic diagram of the structure of a reel 201 and a magnetic tape 210 provided in this application.

[0032] Figure 4 This is a schematic diagram of the structure of a magnetic tape 210 provided in this application.

[0033] Figure 5 A flowchart illustrating a model training method provided in this application. Figure 1 .

[0034] Figure 6 A flowchart illustrating a model training method provided in this application. Figure 2 .

[0035] Figure 7 A flowchart illustrating a model training method provided in this application. Figure 3 .

[0036] Figure 8 A flowchart illustrating a model training method provided in this application. Figure 4 .

[0037] Figure 9 A flowchart illustrating an I / O scheduling method provided in this application. Figure 1 .

[0038] Figure 10 A flowchart illustrating an I / O scheduling method provided in this application. Figure 2 .

[0039] Figure 11 A flowchart illustrating an I / O scheduling method provided in this application. Figure 3 .

[0040] Figure 12 A flowchart illustrating an I / O scheduling method provided in this application. Figure 4 .

[0041] Figure 13 A flowchart illustrating an I / O scheduling method provided in this application. Figure 5 .

[0042] Figure 14 A schematic diagram of the structure of the training equipment provided in this application.

[0043] Figure 15 A schematic diagram of the controller provided in this application. Detailed Implementation

[0044] This application provides an I / O scheduling method, a tape drive device, and a storage system. A latency prediction model is trained based on the addressing parameters of the motor during actual use. The trained latency prediction model is then used to predict the access latency of the I / O stream under different scheduling algorithms. The scheduling algorithm corresponding to the minimum predicted latency is selected to control the motor, enabling the motor to drive the tape for winding and the read / write head to access regions on the tape. This helps reduce the latency required for motor scheduling in the tape drive device and improves the access efficiency of the tape drive device. The latency prediction model can be determined based on the motor's addressing parameters, which may include, but are not limited to, the motor's maximum speed, cruising speed, read / write speed, acceleration, deceleration, lane-changing latency, and turn-around latency.

[0045] The technical solutions involved in this application may be applied not only to current magnetic tape technology or storage devices, but also to future magnetic tape technology or storage devices, or to storage systems including magnetic tape drive devices or storage devices, such as magnetic tape systems or magnetic tape libraries. The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. A brief introduction to some concepts that may be involved in this application is given below.

[0046] Storage medium: A storage material used to record sound, images, digital signals, or other signals. This storage material may include, but is not limited to, magnetic tape, such as a tape-shaped material with a magnetic layer used to record sound, images, digital signals, or other signals. Magnetic tape contains a magnetic medium, such as magnetic powder, for storing data. For example, changes in the magnetic field in this magnetic medium are typically achieved by coating a plastic film substrate (support or backing) with a layer of granular magnetic material or by evaporating and depositing a layer of magnetic oxide or alloy film. The substrate of magnetic tape may include, but is not limited to, paper, celluloid, or polyester film.

[0047] Magnetic head: A component that reads and writes data on magnetic tape using magnetic principles. It is divided into write heads and read heads. Write heads record data by magnetizing the magnetic medium (such as magnetic powder), while read heads read data from the magnetic medium by sensing its magnetic field.

[0048] Redundant storage with multiple replicas: also known as multiple backups, this involves creating multiple identical copies of a single data set and storing them on different nodes. For example, by copying important data multiple times and storing each copy on a separate storage medium, the data will not be lost as long as at least one storage medium is available.

[0049] Erasure coding redundancy storage: Erasure coding (EC) is a checksum that corrects data loss. It divides data into N data blocks and generates M checksum blocks (also called parity data) using a checksum algorithm. These N data blocks + M checksum blocks are then stored in different locations. If K blocks (data blocks or checksum blocks) are lost, the remaining M + NK blocks (data blocks or checksum blocks) can be used to recover the lost K blocks. Here, K ≤ M and K ≤ N, and K, M, and N are all positive integers. For example, important data can be divided into N data blocks (N is an even number). M checksum blocks (M can be 2, 3, 4, or more) can be calculated using the EC coding algorithm. The M + N data blocks and checksum blocks are stored on different storage devices or nodes. As long as the total number of lost or corrupted data blocks or checksum blocks does not exceed M, the original data can be reconstructed losslessly using the normal data blocks or checksum blocks. If even one of the N data blocks is updated or modified, all M checksum blocks need to be recalculated. Therefore, checksum blocks are usually updated more frequently than data blocks.

[0050] Neural networks can be composed of neurons, and neurons can refer to neurons that are denoted by x. s The arithmetic unit takes an intercept of 1 as input. The output of this arithmetic unit satisfies the following formula (1).

[0051]

[0052] Among them, h W,b s is the output of the arithmetic unit, x is the input of the arithmetic unit, s = 1, 2, ..., n, where n is a natural number greater than 1, W s For x sThe weights are denoted by b, where b is the bias of the computational unit. f is the activation function of the neuron, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neuron into the output signal. The output signal of this activation function can be used as the input of the next layer; the activation function can be the sigmoid function. A neural network is a network formed by connecting multiple single neurons, meaning that the output of one neuron can be the input of another neuron. The input of each neuron can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, which can be a region composed of several neurons. The weights represent the strength of the connection between different neurons. The weights determine the influence of the input on the output. A weight close to 0 means that changing the input does not change the output. A negative weight means that increasing the input decreases the output. In some feasible embodiments, the input signal of the neural network can be various forms of signals such as video signals, image signals, matrix data, and graph structure data. The input signal of the neural network also includes various other computer-processable engineering signals, which will not be listed here. If deep learning is used to perform tasks such as base station text recognition using neural networks, the accuracy of neural network base station text recognition can be improved.

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the application will now be described in further detail with reference to the accompanying drawings.

[0054] In the following description, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0055] Furthermore, in this application, directional terms such as "upper" and "lower" are defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms are relative concepts, used for relative description and clarification, and can change accordingly depending on the orientation of the components in the accompanying drawings.

[0056] The application scenarios of the embodiments of this application will be described below with reference to the accompanying drawings. Figure 1 This is a schematic diagram of a data access system provided in this application. The data access system includes: a data access device 100 and a storage device 120. Figure 1 In the application scenario shown, users access data through applications. The computer running these applications can be referred to as a "computing device".

[0057] Data access device 100 can be a physical machine, a virtual machine, or a container. The physical machine can include, but is not limited to, one or both a client and a smart NIC. For example, data access device 100 includes a client, such as a host, desktop computer, server, laptop, or mobile device. Another example is that data access device 100 includes a smart NIC. This smart NIC, also known as a smart network adapter, not only performs the network transmission functions of a standard NIC but also provides a built-in programmable and configurable hardware acceleration engine. This improves application performance and significantly reduces CPU consumption in the host connected to the smart NIC, providing more CPU resources for the application. For example, in a highly virtualized environment, the host CPU needs to run open virtual switch (OVS) related tasks. Simultaneously, the host CPU also needs to handle storage, online or offline encryption / decryption of data packets, deep packet inspection, firewalls, complex routing, and other operations. These operations not only consume significant CPU resources but also, due to competition for CPU resources between different services, prevent the services from achieving optimal performance. As a hub connecting various services, smart network interface cards (NICs) accelerate these services.

[0058] In one possible example, data access device 100 accesses storage device 120 via a network to access data; for example, the network may include switch 110.

[0059] In another possible example, data access device 100 may also communicate with storage device 120 via a wired connection, such as a universal serial bus (USB) or a peripheral component interconnect express (PCIe) bus.

[0060] Figure 1 The storage device 120 shown can be a centralized storage system. A key feature of a centralized storage system is a unified entry point through which all data from external devices passes; this entry point is the engine 121 of the centralized storage system. The engine 121 has management functions, and many advanced functions of the storage system are implemented within it.

[0061] like Figure 1 As shown, engine 121 may have one or more controllers. Figure 1The following example illustrates the concept of engine 121 containing one controller. In one possible example, if engine 121 has multiple controllers, any two controllers can have a mirror channel, enabling any two controllers to serve as backups for each other, thereby preventing hardware failures from causing the entire storage device 120 to become unavailable. It should be understood that if engine 121 includes multiple controllers, then engine 121 can also be referred to as the array controller of storage device 120.

[0062] Engine 121 also includes a front-end interface 1211 and a back-end interface 1214. The front-end interface 1211 is used to communicate with the data access device 100 to provide data access services to the data access device 100. The back-end interface 1214 is used to communicate with hard drives to expand the capacity of the storage device 120. Through the back-end interface 1214, engine 121 can connect to more hard drives, thereby forming a very large storage resource pool.

[0063] In terms of hardware, such as Figure 1 As shown, the controller includes at least a processor 1212 and memory 1213. The processor 1212 is a central processing unit (CPU) used to process data access requests from outside the storage device 120 (servers or other storage systems), and also to process requests generated internally by the storage device 120. For example, when the processor 1212 receives write data requests from the data access device 100 through the front-end interface 1211, it temporarily stores the data in these write data requests in memory 1213. When the total amount of data in memory 1213 reaches a certain threshold, the processor 1212 sends the data stored in memory 1213 to at least one of the following hard drives for persistent storage: a mechanical hard drive 1221, a solid-state drive (SSD) 1222, a tape drive 200, or another hard drive 1224, through a back-end port.

[0064] Memory 1213 refers to internal memory that directly exchanges data with the processor. It can read and write data at any time and at high speed, serving as temporary data storage for the operating system or other running programs. Memory includes at least two types of memory, such as random access memory (RAM) or read-only memory (ROM). For example, RAM can be DRAM or SCM. DRAM is a semiconductor memory and, like most RAM, is a type of volatile memory device. However, DRAM and SCM are merely illustrative examples in this embodiment; memory can also include other types of RAM, such as static random access memory (SRAM). For read-only memory, examples include programmable read-only memory (PROM) and erasable programmable read-only memory (EPROM). Additionally, memory 1213 can also be a dual in-line memory module (DIMM), i.e., a module composed of dynamic random access memory (DRAM), or an SSD. In practical applications, the controller can be configured with multiple memory modules 1213, and different types of memory modules 1213. This embodiment does not limit the number or type of memory modules 1213. Furthermore, memory modules 1213 can be configured to have a power-saving function. The power-saving function means that when the system loses power and then regains power, the data stored in memory modules 1213 will not be lost. Memory with a power-saving function is called non-volatile memory. Memory modules 1213 store software programs, and processor 1212 can run the software programs in memory modules 1213 to manage the hard disk. For example, the hard disk can be abstracted as a storage resource pool, and the storage resource pool can be provided to the server in the form of logical unit numbers (LUNs). Here, the LUN is actually the hard disk seen on the server. Of course, some centralized storage systems are also file servers themselves, and can provide shared file services to the server.

[0065] like Figure 1As shown, in this system, engine 121 may not have a hard drive slot; the hard drive needs to be placed in hard drive enclosure 122, and the back-end interface 1214 communicates with the hard drive enclosure 122. The back-end interface 1214 exists in the form of an adapter card within engine 121, and two or more back-end interfaces 1214 can be used simultaneously on one engine 121 to connect multiple hard drive enclosures. Alternatively, the adapter card can be integrated onto the motherboard, in which case the adapter card can communicate with processor 1212 via the PCIe bus.

[0066] It should be noted that, Figure 1 Only one engine 121 is shown in the figure. However, in actual applications, the storage system may contain two or more engines 121, and redundancy or load balancing may be performed between multiple engines 121.

[0067] The hard drive enclosure 122 includes a control unit 1225 and several hard drives. The control unit 1225 can have various forms. In one case, the hard drive enclosure 122 is a smart enclosure, such as... Figure 1 As shown, the control unit 1225 includes a CPU and memory. The CPU performs operations such as address translation and reading / writing data. The memory is used to temporarily store data to be written to the hard disk or to read data from the hard disk to be sent to the controller. Alternatively, the control unit 1225 can be a programmable electronic component, such as a data processing unit (DPU). A DPU has the versatility and programmability of a CPU, but is more specialized, capable of efficiently operating on network packets, storage requests, or analysis requests. A DPU differs from a CPU by its high degree of parallelism (the ability to handle a large number of requests). Optionally, the DPU can be replaced by a graphics processing unit (GPU), an embedded neural network processing unit (NPU), or other processing chips. Typically, there can be one, two, or more control units 1225. The functions of the control unit 1225 can be offloaded to the network interface card (NIC) 1226. In other words, in this embodiment, the hard disk enclosure 122 does not contain a control unit 1225; instead, the NIC 1226 performs data reading / writing, address translation, and other computational functions. At this point, network interface card 1226 is a smart network interface card. It can contain a CPU and memory. The CPU is used to perform address translation and data reading / writing operations. Memory is used to temporarily store data to be written to the hard drive or to read data from the hard drive to be sent to the controller. It can also be a programmable electronic component, such as a DPU. There is no ownership relationship between network interface card 1226 and the hard drives in hard drive enclosure 122; network interface card 1226 can access any hard drive in hard drive enclosure 122 (e.g., ...). Figure 1The mechanical hard drive 1221, solid-state drive 1222, tape drive device 200 and other hard drives 1224 shown are examples of hard drives that make it easier to expand hard drives when storage space is insufficient.

[0068] In this embodiment, the tape drive device 200 refers to a memory that includes a magnetic tape medium. In hardware implementation, the tape drive device may include, but is not limited to, a magnetic head, a magnetic tape, and a tape drive. The tape drive is used to drive the magnetic tape for winding, and the magnetic head accesses the tape during winding, such as writing data to or reading data from the tape. Specific implementation details of the tape drive device are provided below. Figures 2 to 9 The embodiments shown are not described in detail here.

[0069] Depending on the type of communication protocol between engine 121 and disk enclosure 122, disk enclosure 122 may be a serially attached small computer system interface (SAS) disk enclosure, an NVMe (Non-Volatile Memory Express) disk enclosure, or other types of disk enclosures. SAS disk enclosures use the SAS 3.0 protocol, and each enclosure supports 25 SAS disks. Engine 121 connects to disk enclosure 122 via an onboard SAS interface or a SAS interface module. NVMe disk enclosures function more like a complete computer system, with NVMe disks inserted into them. The NVMe disk enclosure then connects to engine 121 via an RDMA port. In some cases, engine 121 may also be referred to as a disk management device or storage controller.

[0070] In terms of hardware implementation, the hard disk enclosure 122 can be installed in the storage system, or the hard disk enclosure 122 can be encapsulated and set up independently. When the hard disk enclosure 122 exists independently, it can also be called a storage device or a storage system. This application does not limit this.

[0071] In one alternative implementation, storage device 120 is a centralized storage system integrating disk and controller. Storage device 120 does not have the aforementioned hard disk enclosure 122, and engine 121 is used to manage multiple hard drives connected via hard disk slots. The functionality of the hard disk slots can be implemented by backend interface 1214.

[0072] In some alternative implementations, storage device 120 is a distributed storage system. The distributed storage system includes a cluster of compute nodes and a cluster of storage nodes. The compute node cluster includes one or more compute nodes that can communicate with each other. Compute nodes can be servers, desktop computers, or controllers of storage arrays, etc. Hardware-wise, compute nodes can include processors, memory, and network interface cards (NICs), etc. The processor is a CPU used to process data access requests from outside the compute node or requests generated internally within the compute node. For example, when the processor receives a write data request from a user, it temporarily stores the data in the write data request in memory. When the total amount of data in memory reaches a certain threshold, the processor sends the data stored in memory to the storage node for persistent storage. In addition, the processor is also used for data computation or processing, such as metadata management, deduplication, data compression, virtualization of storage space, and address translation. In the embodiments provided in this application, the storage node can be a tape drive or other types of hard disks, etc. It is understood that the storage system described in the embodiments of this application can be a distributed storage system integrating storage and computing, or a distributed storage system separating storage and computing; this application does not limit this.

[0073] For example, a distributed storage system can be implemented using network attached storage (NAS) technology. NAS refers to a network storage architecture that provides storage resources through file-level data access and sharing over an Internet Protocol (IP) network. In a NAS scenario, the NAS is an external device for the server / host, used to provide file-level storage space for the server / host in the distributed storage system.

[0074] It is worth noting that the above examples are merely possible implementations of the data access system provided in this embodiment and should not be construed as limiting this application. For example, Figure 1In the storage device 120 shown, data is stored as files on various hard drives. The files stored on each hard drive constitute a file storage system, which could be a distributed file system, such as a network file system (NFS). NFS is both a distributed file system and a network protocol used for accessing and sharing files between devices on the same local area network. For example, a NAS system can be implemented using the NFS protocol. A network file system is a low-cost network file-sharing option that allows users and applications to access, store, and update files on remote computers, just like using direct-attached storage. Network file systems use the Remote Procedure Call (RPC) protocol to route requests between clients and servers. While participating devices need to support network file systems, they do not need to know the details of the network. It is worth noting that RPC can be insecure, so network file systems should only be deployed on trusted networks behind firewalls. Although Windows supports this protocol, it is primarily used in Linux environments.

[0075] Regarding the aforementioned tape drive device 200, this application provides an optional example, such as... Figure 2 As shown, Figure 2 This is a schematic diagram of a magnetic tape drive device provided in this application. The magnetic tape drive device 200 can be used to implement the functions of the aforementioned magnetic tape drive device 200. In this document, the magnetic tape drive device may also be referred to as a magnetic tape media storage device, magnetic tape drive, integrated magnetic tape machine, integrated magnetic tape disk, or magneto-electric disk, etc., and this application does not limit it to these terms.

[0076] The following is combined Figure 2 The tape drive device 200 is described by way of example and includes: tape 210, tape drive 220, magnetic head 230, reel 201, roller 202, base 203 and controller 240.

[0077] The reel 201 and the base 203 are rotatably connected, and the magnetic tape 210 is wound onto the reel 201.

[0078] Regarding the structural relationship between the reel 201 and the magnetic tape 210, the following will be combined with... Figure 3 Provided as an example, Figure 3 A schematic diagram of the structure of a reel 201 and a magnetic tape 210 provided for this application. Please refer to... Figure 3 The reel 201 includes a reel 2013, a first cover plate 2011, and a second cover plate 2012. The reel 2013 and the aforementioned... Figure 2The base 203 shown is rotatably connected. The magnetic tape 210 is located between the first cover plate 2011 and the second cover plate 2012. The first cover plate 2011 and the second cover plate 2012 can constrain the magnetic tape 210 and prevent the magnetic tape 210 from detaching from the reel 2013. During the rotation of the reel 2013, the first cover plate 2011 and the second cover plate 2012 rotate synchronously.

[0079] The first cover plate 2011 can be as follows: Figure 3 The circular plate-like structure shown can have a second cover plate 2012 as follows: Figure 3 The circular plate-like structure shown.

[0080] The embodiments of this application do not limit the shape of the first cover plate 2011 and the second cover plate 2012. For example, the first cover plate 2011 can be a circular, square, elliptical, or irregularly shaped plate. Similarly, the second cover plate 2012 can be a circular, square, elliptical, or irregularly shaped plate. The shape of the first cover plate 2011 can be the same as or different from the shape of the second cover plate 2012.

[0081] For example, the connection between the first cover plate 2011 and the roll 2013 can be achieved by welding, snap-fitting, or bonding. Similarly, the connection between the second cover plate 2012 and the roll 2013 can be achieved by welding, snap-fitting, or bonding.

[0082] Please return Figure 2 The magnetic tape drive device 200 includes two reels 201. The first end of the magnetic tape 210 is wound on one reel 201, and the last end of the magnetic tape 210 is wound on the other reel 201.

[0083] During the tape winding process of the magnetic tape 210, in order to prevent the magnetic head from tearing the magnetic tape 210, the roller 202 in the tape drive device 200 can be used to support the tape body of the magnetic tape 210, so that the friction between the magnetic tape 210 and the magnetic head is reduced during the winding process, which is beneficial to improving the service life of the magnetic tape 210.

[0084] Combination Figure 2 and Figure 3 As shown in the provided embodiments, magnetic tape 210 is used to store data, and magnetic tape drive 220 is used to drive magnetic tape 210 for rewinding. The magnetic head in the magnetic tape drive device 200 accesses magnetic tape 210 during the rewinding process. Controller 240 is used to control the speed at which magnetic tape drive 220 drives magnetic tape 210 based on I / O streams, and to control the magnetic head 230 to slide to access areas of magnetic tape 210.

[0085] For example, controller 240 includes at least a processor and memory. The processor is a CPU used to process data access requests (such as I / O requests) from outside the tape drive device 200 (servers or other storage systems), and also to process requests generated internally by the tape drive device 200. For example, when the processor receives write data requests sent by data access devices or hosts through the front-end interface, it temporarily stores the data in these write data requests in memory. When the total amount of data in memory reaches a certain threshold, the processor stores the data in memory to tape 210 for persistent storage through the back-end port.

[0086] Please continue reading. Figure 2 As an optional implementation, the tape drive 220 includes a tape reel motor and a voice coil motor (VCM) motor.

[0087] The tape reel motor is used to drive the magnetic tape 210 to wind along its length. For example, the tape reel motor can be used to drive a drum, causing the magnetic tape wound on the drum to rewind in a first direction, rewind in a second direction, or stop rewinding. The first direction and the second direction are two opposite directions along the length of the magnetic tape.

[0088] The VCM motor is used to drive the magnetic tape 210 to move along the width of the tape 210, so that the magnetic head 230 can access different tracks in the tape 210. The VCM is a direct drive motor, and its working principle includes: a current-carrying coil placed in a magnetic field will generate a force, the magnitude of which is proportional to the current applied to the coil. Based on this principle, the movement of the VCM can be linear or circular.

[0089] Optionally, the tape drive 220 may also include a stepper motor for fine-tuning the winding position or speed of the tape 210 along its length. This stepper motor is a type of electric motor that converts electrical pulse signals into corresponding angular or linear displacements. For each input pulse signal, the rotor rotates by an angle or moves forward one step; the output angular or linear displacement is proportional to the number of input pulses, and the rotational speed is proportional to the pulse frequency. Therefore, a stepper motor is also called a pulse motor.

[0090] It is worth noting that the tape drive 220 described above are merely examples provided in the embodiments of this application and should not be construed as limiting the application. The tape drive 220 may also include devices such as linear motors, hydraulic cylinders, or pneumatic cylinders, which are not limited in this application.

[0091] As an optional implementation, the magnetic head 230 may include one or both of a write head and a read head. The write head records data by magnetizing and changing the magnetic field of the magnetic medium (such as magnetic powder), while the read head reads data from the magnetic medium by sensing its magnetic field.

[0092] In some alternative configurations, the magnetic head 230 may also include a servo head, which may be divided into a write servo head and a read servo head. Taking the read servo head as an example, the read servo head can determine the position information of the tape 210 based on the address in the IO request, and the tape driver 220 can rewind the tape 210 from its current position to the tape area indicated by the position information, thereby allowing the read data head to read the data stored in the tape area indicated by the position information.

[0093] It is understandable that the tape drive device 200 can also deploy applications (APPs) and drivers. Applications are used to obtain data access requests (such as read or write requests) or send access responses to the host, such as write or read responses. For example, after an application triggers a read or write operation, the IO data stream is sent to the firmware corresponding to the tape 210 via the driver. The firmware then issues instructions to control the motor to drive the tape 210 in linear addressing. Once the desired position is reached, the read / write operation is achieved by the read / write head through the ADC / DAC channel for encoding and decoding.

[0094] Regarding the structure of magnetic tape 210, the following will be combined with... Figure 4 Provided as an example, Figure 4 This application provides a schematic diagram of the structure of a magnetic tape 210. In hardware implementation, the magnetic tape 210 may include one or more data bands, such as data band 1 to data band 4. Data bands are data tracks on the magnetic tape 210. Different data bands are separated and positioned by servo tapes, and multiple data bands are arranged side-by-side along the length of the magnetic tape 210. Each data band contains multiple wraps, i.e., data transmission from one end of the magnetic tape 210 to the other. Each wrap includes one or more tracks, and each track is accessed by a read head / write head. The number and size of data bands in the magnetic tape 210 depend on the generation and capacity of the tape. "Wrap" is a term used in magnetic tape terminology; "wrap" refers to the movement of a head on a data band.

[0095] Taking data tape 1 in magnetic tape 210 as an example, data tape 1 includes multiple tracks, such as track 1 and track 2. In magnetic tape 210, different tracks are arranged side-by-side along the width of magnetic tape 210. A track is a magnetic region in the magnetic tape used for recording data. In magnetic tape technology, data storage on magnetic tape 210 is achieved by magnetizing the tracks with a magnetic head 230.

[0096] above Figure 4 The magnetic tape 210 shown is only an optional embodiment provided by this application. Depending on the capacity of the magnetic tape 210 and user needs, the magnetic tape 210 may have more or fewer data tapes, or the magnetic tape 210 may have more or fewer tracks. This application does not limit this.

[0097] The technical solutions provided in this application include: a model training method and an I / O scheduling method for a motor in a magnetic tape drive device. The model training method and the I / O scheduling method are described below.

[0098] The following is in conjunction with the appendix Figure 5 The model training method provided in the embodiments of this application will be described by way of example. Figure 5 A flowchart illustrating a model training method provided in this application. Figure 1 This model training method is applied to tape drive devices, such as the tape drive device 200 described above.

[0099] The model training method provided in this application embodiment can be executed by a controller in a tape drive device, or by other computing devices or training devices communicating with the tape drive device. For example, the training device is used to train a neural network using training data until the loss function in the neural network converges and the loss function value is less than a specific threshold, at which point the neural network training is complete, thereby enabling the neural network to achieve a certain accuracy. Then, the training device configures the trained neural network onto the tape drive device. This training device can be the aforementioned data access device 100, engine 121, controller or control unit 1225 in engine 121, or others. Optionally, the model training method can also be executed by the aforementioned controller 240, which is not limited in this application.

[0100] Please see Figure 5 The embodiments of this application are provided to illustrate the model training method executed by a training device as an example. The model training method includes the following S510 to S530.

[0101] S510, training equipment acquires multiple sets of training data.

[0102] Combination Figure 5 As can be seen, the training dataset includes multiple sets of training data, such as the first set of training data to the Hth set of training data.

[0103] The first set of training data includes: addressing parameters 1 for the motor in the tape drive during use, the initial address for head alignment in the tape drive, multiple access addresses of the tape in the tape drive, and the access latency for each access address. The content of the other sets of training data can be found in the description of the first set of training data below, and will not be repeated hereafter.

[0104] Addressing parameter 1 includes one or more of the following combinations: maximum motor speed, cruising speed, read / write speed, acceleration, deceleration, lane change delay, and U-turn delay. The parameters in the addressing parameters are illustrated below.

[0105] The maximum speed of a motor refers to the maximum speed at which the motor operates, that is, the maximum length of tape that the motor can drive the magnetic tape to wind per unit time. Examples include 10 meters per second (m / s), 20 m / s, or others.

[0106] The cruising speed of an electric motor refers to the speed at which the motor consumes the least power per unit distance. Examples include 4 m / s, 5 m / s, or others.

[0107] The read / write speed of a motor refers to the length of tape that the motor can drive the tape to rewind per unit time in order for the magnetic head to effectively read and write to the tape. Examples include 1 m / s, 0.5 m / s, 4 m / s, 5 m / s, or others.

[0108] Acceleration is used to indicate the ratio between the change in speed of a motor as it accelerates from a lower speed and the change in time. For example, 1 m / s². 2 2m / s 2 3m / s 2 5m / s 2 Or others.

[0109] Deceleration acceleration is used to indicate the ratio between the change in speed of a motor as it decelerates from a higher speed and the change in time. For example, 1 m / s². 2 2m / s 2 3m / s 2 5m / s 2 Or others.

[0110] Track switching delay includes the time it takes for the motor to move the magnetic tape alignment head from one track to another. This can be 1 second (s), 2 seconds, 4 seconds, or other values. Figure 4 For example, the track switching delay refers to the time required for the motor to drive the magnetic head in track 1 of the magnetic tape 210 to align with the magnetic head in track 2.

[0111] The turning delay includes the time it takes for the motor to drive the magnetic tape to switch from a first direction to a second direction, where the first and second directions are consistent with the length direction of the magnetic tape and opposite to each other. Examples include 1s, 2s, 4s, or others.

[0112] In the aforementioned tape drive equipment, the first address of head alignment refers to the address corresponding to the tape area where the head is aligned, which is the current position of head alignment on the tape.

[0113] Multiple access addresses for a tape can be determined based on different I / O requests in one or more I / O streams, with each I / O request including one access address.

[0114] Alternatively, an IO stream can also be called an IO data stream, which includes multiple IO requests, also known as access requests.

[0115] In the first possible example, the IO stream includes multiple IO requests from the same data access device, which can be a host, user equipment, server, or other type of device.

[0116] In the second possible example, the IO stream includes multiple IO requests from the same application.

[0117] For example, the application can be deployed on a single device, such as the host or data access device mentioned above.

[0118] For example, the application can be deployed on a distributed system, which includes multiple devices, each with a complete application deployed on it, or each device with a portion of the application's code deployed on it. Examples of such applications include, but are not limited to, artificial intelligence applications and distributed applications. For instance, a distributed application refers to an application distributed across different computers, working together over a network to complete a task.

[0119] In a third possible example, the IO stream includes multiple IO requests belonging to the same task. For example, the task could be a read task or other data access tasks. This application does not limit the scope of the task; it can be a data access task issued by a single application or data access tasks from multiple applications managed by a single data access interface.

[0120] The above three possible examples are only optional methods of IO stream provided in the embodiments of this application. In the embodiments of this application, the data indicated by multiple IO requests belonging to the same IO stream flows from one storage location to another storage location. The direction of the IO stream can be input (reading data from the target storage device) or output (writing data to the target storage device).

[0121] The access latency of an access address refers to the latency required for the tape drive to process an I / O request containing that access address. Examples include access latency 1 to access latency H.

[0122] S520: The training device inputs multiple sets of training data and the first access address into the initial model and outputs the first sub-prediction delay of the first access address.

[0123] For example, the IO stream includes multiple IO requests, including a first IO request. This first IO request includes the aforementioned first access address, and the multiple access addresses include the first access address. The access latency corresponding to the first access address is the first access latency. This first access latency is the latency for the tape drive device to access the first IO request, also referred to as the actual access latency or true access latency of the first IO request in the tape drive device.

[0124] The initial model can be a pre-trained latency prediction model used to predict the I / O latency of a single I / O request in a tape drive device.

[0125] Optionally, the delay prediction model includes one or a combination of the following: artificial neural network (ANN), convolutional neural network (CNN), and deep neural network (DNN). Among them, ANN is also called neural network.

[0126] Deep neural networks (DNNs), also known as multilayer neural networks, can be understood as neural networks with many hidden layers, though there's no specific metric for "many." DNNs can be categorized into three types based on their layer positions: input layers, hidden layers, and output layers. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. All layers are fully connected, meaning that any neuron in the i-th layer is connected to any neuron in the (i+1)-th layer.

[0127] A Convolutional Neural Network (CNN) is a deep neural network with a convolutional structure. A CNN contains a feature extractor consisting of convolutional layers and subsampling layers. This feature extractor can be viewed as a filter, and the convolution process can be seen as using a trainable filter to convolve with an input image or a convolutional feature map. A convolutional layer is a layer of neurons in a CNN that performs convolution processing on the input signal. In a convolutional layer of a CNN, a neuron may only be connected to some of its neighboring neurons. A convolutional layer typically contains several feature maps, each composed of rectangularly arranged neural units. Neural units within the same feature map share weights, which are the convolutional kernel. Shared weights can be understood as the way image information is extracted regardless of location. The underlying principle is that the statistical information of one part of an image is the same as that of other parts. This means that image information learned in one part can also be used in another part. Therefore, the same learned image information can be used for all locations in an image. In the same convolutional layer, multiple convolutional kernels can be used to extract different image information. Generally, the more convolutional kernels there are, the richer the image information reflected by the convolution operation.

[0128] It is worth noting that more information about ANN, CNN and DNN can be found in the description of common techniques. This application does not limit the specific type of neural network used in the time delay prediction model.

[0129] S530: The training device trains the initial model based on the first access delay and the first sub-prediction delay to obtain the delay prediction model.

[0130] In this embodiment of the application, for a single IO request, the training device corrects the predicted latency of the model based on the actual parameters of the motor (addressing parameters) and the actual access latency of the access address in the IO request (first access latency). That is, the training device updates the latency prediction model based on the latency prediction error and the actual parameters of the motor, which helps to adapt the latency prediction model to the actual application scenario of the motor, improve the scheduling performance of the motor in the tape drive, and reduce the actual read and write latency of the tape drive.

[0131] Regarding the process of executing S530 on the training device, the following is... Figure 5 Based on, combined Figure 6 To illustrate, Figure 6 A flowchart illustrating a model training method provided in this application. Figure 2 The above-mentioned S530 includes the following S531 and S532.

[0132] S531, The training device obtains the difference between the first access delay and the first sub-prediction delay.

[0133] In one alternative example, the difference is obtained by subtracting the first sub-prediction delay from the first access delay.

[0134] In another alternative example, the difference is obtained by subtracting the first access delay from the first sub-prediction delay.

[0135] The two optional examples above are merely optional methods provided by the embodiments of this application and should not be construed as limiting this application. In some optional implementations, the difference in S531 may also refer to the absolute value of the difference between the first access delay and the first sub-prediction delay.

[0136] S532. The training device trains the initial model based on the difference to obtain the time delay prediction model.

[0137] For example, the training device determines whether the difference obtained in S531 is greater than or equal to an error threshold. If the difference obtained in S531 is greater than or equal to the error threshold, the training device updates the initial model according to the error threshold to obtain a time delay prediction model. If the difference obtained in S531 is less than the error threshold, the training device uses the initial model as the time delay prediction model.

[0138] As an optional implementation, for the first IO request, the aforementioned error threshold is 1%, 3%, 5%, or other values ​​of the actual access latency (first access latency) of the first IO request. For example, if the first access latency of the first IO request is 60s, the error threshold could be 0.6s (1%), 1.8s (3%), 3s (5%), or other values.

[0139] In this embodiment, the training device corrects the predicted latency of the model based on the addressing parameters of the motor and the actual access latency (first access latency) in the IO request, so that the error between the predicted latency of the IO request and the actual access latency of the trained latency prediction model is as small as possible or equal to the error threshold. Thus, the latency prediction model is adapted to the actual application scenario of the motor, improving the scheduling performance of the motor in the tape drive and reducing the actual read and write latency of the tape drive.

[0140] Regarding the process of executing S530 on the training device, the following is... Figure 5 Based on, combined Figure 7 To illustrate, Figure 7 A flowchart illustrating a model training method provided in this application. Figure 3 Please see. Figure 7 Prior to S530 above, the model training method provided in this application embodiment also includes S525.

[0141] S525. The training device inputs the first access address into the nominal prediction model and outputs the nominal delay of the first access address.

[0142] The nominal prediction model is trained based on a nominal dataset, which includes: the motor's nominal parameters, the initial address for head alignment, and multiple access addresses of the magnetic tape, with access latencies corresponding to different access addresses, such as access latency of 0. The motor's nominal parameters include one or more combinations of the following: pre-calibrated maximum speed, read / write speed, acceleration, and deceleration. The meaning of each indicator in the nominal parameters can be found in the aforementioned addressing parameters. The difference between nominal parameters and addressing parameters is that nominal parameters are motor parameters preset by the manufacturer, while addressing parameters are parameters collected during actual use of the motor. Figure 7 neutralization Figure 5 The same parts will not be repeated here.

[0143] Please continue reading. Figure 7 The above-mentioned S530 includes the following S5301 to S5303.

[0144] S5301, The training device obtains the first difference between the first access delay and the nominal delay.

[0145] For example, the first difference is the nominal latency minus the first access latency.

[0146] For example, the first difference is the first access delay minus the nominal delay.

[0147] The two optional examples above are merely optional methods provided by the embodiments of this application and should not be construed as limiting this application. In some optional implementations, the first difference in S5301 may also refer to the absolute value of the difference between the first access delay and the nominal delay.

[0148] S5302, The training device obtains the second difference between the first sub-predicted delay and the nominal delay.

[0149] For example, the second difference is the nominal delay minus the first sub-prediction delay.

[0150] For example, the second difference is the first sub-prediction delay minus the nominal delay.

[0151] The two optional examples above are merely optional methods provided by the embodiments of this application and should not be construed as limiting this application. In some optional implementations, the second difference in S5302 may also refer to the absolute value of the difference between the first sub-prediction delay and the nominal delay.

[0152] S5303: The training device obtains the time delay deviation between the first difference and the second difference, and trains the initial model based on the time delay deviation to obtain the time delay prediction model.

[0153] This delay bias is used to calibrate the predicted delay output by the delay prediction model. For example, when the delay bias is greater than or equal to the bias threshold, the training device updates the model parameters in the initial model based on the delay bias to obtain the delay prediction model; when the delay bias is less than the bias threshold, the training device uses the initial model as the delay prediction model. The bias threshold can be 1%, 3%, 5%, or other values ​​of the nominal delay.

[0154] It is worth noting that, adopting Figure 7 When the scheme shown is used to train the latency prediction model, the latency prediction model provided in the embodiments of this application can also be called the latency deviation prediction model.

[0155] In this embodiment, the tape drive device records the actual motor parameters (addressing parameters) during use, and combines the initial address of the head alignment and the access address in the IO request to predict the latency deviation. During model training, the nominal parameters and actual parameters (addressing parameters) of the motor are referenced, so that the latency prediction model can have better adaptability to different tape motors and tape motors in different degradation states during the life cycle, ensuring the accuracy of latency prediction and scheduling performance, and improving the latency performance during the tape life cycle.

[0156] It is worth noting that the above Figures 5 to 7 The model training methods provided in this application are merely optional and should not be construed as limiting the application. In the actual training process, this application may also employ meta-learning strategies to train the initial model. Please refer to [link to relevant documentation]. Figure 8 , Figure 8 A flowchart illustrating a model training method provided in this application. Figure 4 The model training method provided in this application includes the following steps S810 to S830.

[0157] S810, training device to obtain meta-learning dataset.

[0158] The meta-learning dataset includes multiple sets of meta-learning data, such as the first set to the Hth set. These sets of meta-learning data include different addressing parameters of the motor, as well as the initial address, multiple access addresses, and the access delay corresponding to each access address under each set of addressing parameters. Combined with... Figure 8 The first set of learning data in the multi-set learning data is described as an example. The first set of learning data includes: addressing parameter 1, initial address, access address, and access latency 1 corresponding to the access address. For details regarding the other set of learning data, please refer to the description of the first set of learning data; it will not be repeated hereafter.

[0159] The S820 training device trains the initial model using multi-group learning data and multiple access addresses.

[0160] Multiple access addresses can be determined based on different IO requests, as detailed in the description of S510 above, which will not be repeated here.

[0161] Combination Figure 8 As can be seen from the content, during the training of the initial model, different sets of meta-learning data are used to train different gradients in the initial model. For example, after calculating the gradient using the first set of meta-learning data, the gradient 1 in the initial model is updated based on the calculated gradient. Similarly, after calculating the gradient using the second set of meta-learning data, the gradient 2 in the initial model is updated based on the calculated gradient. Other sets of meta-learning data (such as the third set, the Hth set, etc.) are used to train other gradients in the initial model.

[0162] S830: The training device updates the initial model based on the access latency to obtain a latency prediction model.

[0163] In this embodiment, the training device collects the magnetic tape access latency of the motor under different performance parameters (addressing parameters) to construct a meta-learning dataset. The addressing parameters of the motor include, but are not limited to: the motor's cruising speed, maximum speed, read / write speed, acceleration, deceleration, lane change latency, and U-turn latency, etc. The meaning of each parameter can be referred to the description in S510 above, and will not be repeated here.

[0164] For example, in Figure 8 In the illustrated embodiment, the training device trains an initial model as a latency prediction model based on a meta-learning strategy. The inputs to the latency prediction model are: the initial address of the magnetic head and multiple access addresses of the magnetic head to the tape. The latency prediction model is the predicted latency corresponding to each access address. During the use of the tape drive, when motor performance degrades and the prediction error increases, the training device can fine-tune the latency prediction model based on the latency prediction error between the predicted latency of different I / O requests and the actual access latency, thereby further improving the prediction accuracy of the latency prediction model.

[0165] In some optional situations, if adopting Figure 8 The scheme shown is used to train the latency prediction model. The latency prediction model provided in the embodiments of this application can also be called the meta-latency prediction model.

[0166] above Figures 5 to 8 The model training methods provided in this application are merely optional embodiments and should not be construed as limiting this application. The following description, in conjunction with the appendix... Figure 9 The IO scheduling method provided in the embodiments of this application will be described by way of example. Figure 9A flowchart illustrating an I / O scheduling method provided in this application. Figure 1 This I / O scheduling method is applied in a tape drive device, such as the tape drive device 200 described above. Taking the execution of this I / O scheduling method by the controller 240 as an example, the I / O scheduling method provided in this application embodiment includes the following S910 to S930.

[0167] S910, Controller 240 acquires IO streams.

[0168] The IO stream comprises multiple IO requests, such as IO request 1 through IO request 6. Each IO request includes an access address; for example, IO request 1 includes access address 1, IO request 2 includes access address 2, IO request 3 includes access address 3, and IO request 4 includes access address 4. The black pattern in each track represents the access address corresponding to the IO request. Please refer to [link / reference]. Figure 9 Black text on white background 1 represents access address 1, black text on white background 2 represents access address 2, black text on white background 3 represents access address 3, and black text on white background 4 represents access address 4. For explanations of IO streams and IO requests, please refer to the aforementioned embodiments, which will not be repeated here.

[0169] The S920 and controller 240 process the IO stream and the initial address of the magnetic head alignment in the tape based on the delay prediction model to obtain multiple access delays of the motor under various scheduling algorithms.

[0170] The delay prediction model is determined based on the addressing parameters of the motor during operation. These addressing parameters include one or more combinations of the following: maximum motor speed, cruising speed, read / write speed, acceleration, deceleration, lane change delay, and U-turn delay. The process for obtaining the delay prediction model can be found above. Figures 5 to 8 The provided embodiments are not described in detail here.

[0171] In some examples, the initial position of the head alignment in the magnetic tape is also referred to as the current position of the head, the initial position of the head, etc.

[0172] During model training, the access latency and prediction latency of the I / O streams correspond to the same scheduling algorithm. This scheduling algorithm includes one or more of the following combinations: natural ordering, linear ordering of access addresses, greedy algorithm, and elevator algorithm.

[0173] Natural ordering refers to the way tape drive accesses each I / O request sequentially according to the order in which they are received in the I / O stream.

[0174] Linear address sorting refers to the process where, after receiving an I / O stream, the tape drive sorts the access addresses of each I / O request and then accesses each I / O request according to the sorting result. The sorting can be either ascending or descending.

[0175] The greedy algorithm refers to the following: after a tape drive accesses the access address of an IO request in the IO stream, it selects another access address in the IO stream that is closest to that access address to minimize the access latency between two adjacent IO requests.

[0176] The elevator algorithm refers to a method in tape drive equipment where the motor drives the tape in either forward or backward motion, eliminating the need for frequent reversals during I / O scheduling. For example, the motor might first drive the tape forward to one end, during which the read / write head accesses a portion of the I / O requests in the I / O stream. Then, the motor might drive the tape backward to the other end (reverse tape winding), during which the read / write head accesses the remaining I / O requests in the I / O stream, thus reducing the latency caused by frequent motor reversals.

[0177] The following example, using a natural ordering scheduling algorithm, illustrates the predicted latency and access latency of the aforementioned I / O stream: The latency prediction model predicts the access latency for each access address based on multiple access addresses indicated by the I / O stream, and then sums all the access latencies to obtain the predicted latency of the I / O stream. Corresponding to this natural ordering scheduling algorithm, the tape drive accesses the received I / O stream according to the natural ordering scheduling algorithm. The time from when the tape drive receives the first I / O request in the I / O stream to the end time of accessing the last I / O request in the I / O stream is the actual access latency of the I / O stream.

[0178] S930 and controller 240 control the motor to drive the magnetic tape according to the first scheduling algorithm (scheduling algorithm 1) corresponding to the smallest predicted delay (predicted delay 1) among multiple predicted delays, so that the magnetic head accesses the access address corresponding to different IO requests in the magnetic tape.

[0179] For example, the prediction delay 1 corresponding to scheduling algorithm 1 is less than the prediction delay 2 corresponding to scheduling algorithm 2.

[0180] In this embodiment, the latency prediction model is trained based on the addressing parameters of the motor during actual use. The controller uses the trained latency prediction model to predict the access latency of the IO stream under different scheduling algorithms, selects the scheduling algorithm corresponding to the minimum predicted latency to control the motor, so that the motor drives the tape to rewind and the magnetic head accesses the area in the tape. This helps to reduce the latency required for motor scheduling in the tape drive and improve the access efficiency of the tape drive.

[0181] Please see Figure 9 The tape drive includes a motor and a magnetic head. The tape in the tape drive includes tracks 1 to 6. For details on the implementation of the tracks, please refer to the above. Figure 4The content shown will not be repeated here. (Combined) Figure 9 To illustrate the scheduling process of the motor and magnetic head in the I / O scheduling method, consider the following example: Assume the order of I / O requests in the I / O stream is I / O request 1, I / O request 2, I / O request 3, and I / O request 4. The controller in the tape drive controls the motor according to scheduling algorithm 1 (the first scheduling algorithm), causing the motor to drive the tape and move the magnetic head relative to its current position towards access address 1. First, the magnetic head accesses access address 1 corresponding to I / O request 1. After the magnetic head accesses access address 1, the controller drives the motor to move the tape in the width direction (vertical direction) of the tape, changing the tape position aligned with the magnetic head from track 1 to track 2. After the magnetic head aligns with access address 2, it accesses access address 2 on the tape. Similar to the above content from the current position (initial address) to access address 1 and access address 2, the controller continuously sends control commands to the motor, causing the motor to continuously drive the tape to adjust the access address aligned with the magnetic head, thereby realizing the process of the magnetic head accessing the access address of all IO requests in the IO stream. That is, the control method of the motor during the process of the magnetic head accessing all IO requests in the IO stream is the IO scheduling process in the tape drive device.

[0182] The above examples are merely embodiments provided in this application and should not be construed as meaning that the motor can only drive the magnetic tape to align the magnetic head with the access address in the tape. In some alternative methods, the motor can also be used to drive the magnetic head to align the magnetic head with the access address in the tape. During the I / O scheduling process of the tape drive device, whether the motor drives the tape or the magnetic head can be adjusted according to the structure of the tape drive device or user requirements, and this application does not limit this.

[0183] Regarding the process of the controller 240 in the S920 acquiring the predicted latency of IO, the following is a detailed explanation in conjunction with the appendix. Figure 10 To explain, Figure 10 A flowchart illustrating an I / O scheduling method provided in this application. Figure 2 For details regarding the S910 and S930 processes, please refer to [link / reference needed]. Figure 9 As described in the IO scheduling method provided in the embodiments of this application, the above-mentioned S920 includes the following S921 and S922.

[0184] S921, the controller 240 inputs the first IO request and the initial address of the magnetic head alignment in the magnetic tape into the delay prediction model, and outputs the first sub-predicted delay (sub-predicted delay 1) of the first IO request.

[0185] The first IO request is any one of the multiple IO requests included in the IO stream.

[0186] For example, assuming the first IO request is the first IO request among multiple IO requests, the latency prediction model can determine the current position of the read / write head based on the initial address, and the controller 240 can determine the target position of the read / write head based on the access address in the first IO request. The latency prediction model estimates the first sub-predicted latency of the first IO request based on the current position and target position of the read / write head.

[0187] For example, assuming the first IO request is one of the multiple IO requests other than the first IO request (first IO request), the controller 240 can determine the target position of the read / write head based on the access address in the first IO request. Since the latency prediction model is trained based on the addressing parameters of the motor, after the latency prediction model predicts the IO requests before the first IO request, it can determine the initial position of the read / write head before executing the first IO request, and estimate the first sub-predicted latency of the first IO request based on the initial position and the target position determined by the first IO request.

[0188] The two examples above are merely latency prediction methods for a single IO request provided by the embodiments of this application, and should not be construed as limiting this application. In some optional implementations, the sub-predicted latency corresponding to other IO requests in the IO stream can also be determined in the manner provided in the above examples, such as IO request 2 corresponding to sub-predicted latency 2 and IO request 3 corresponding to sub-predicted latency 3, which will not be elaborated here.

[0189] S922 and controller 240 obtain the first predicted delay of the motor under the first scheduling algorithm based on the multiple sub-predicted delays of multiple IO requests in the IO stream.

[0190] In this embodiment of the application, for a single IO request, a latency prediction model is used to predict the latency of a single IO request, and the access latency of the IO stream is determined based on the predicted latency of different IO requests in the IO stream. This helps the controller to select a scheduling algorithm with a smaller access latency to process the IO stream, thereby reducing the access latency of the tape drive and improving the access efficiency of the tape drive.

[0191] To continuously improve the adaptability of the time delay prediction model to tape drive equipment and increase its accuracy, Figure 9 and Figure 10 Based on this, the controller 240 can also optimize and update the delay prediction model according to its usage in the tape drive equipment. The following section combines... Figures 5 to 8 The embodiments described below illustrate the model update methods provided in the embodiments of this application.

[0192] In the first model update method, the controller 240 optimizes the latency prediction model based on the difference between the sub-predicted latency of different IO requests in the IO stream and the actual access latency of the IO request.

[0193] like Figure 11 As shown, Figure 11 A flowchart illustrating an I / O scheduling method provided in this application. Figure 3 Based on the aforementioned S910 to S930, the IO scheduling method provided in this application embodiment further includes the following S941 and S942.

[0194] S941, Controller 240 obtains the first access delay of the tape drive device in processing the first IO request according to the first scheduling algorithm.

[0195] The specific implementation of the first scheduling algorithm can be found in the description of S920 above, and will not be repeated here. This first access latency is also referred to as the actual access latency, real access latency, actual latency, or true latency of the tape drive device processing the first IO request.

[0196] S942, the controller 240 trains the latency prediction model based on the first sub-predicted latency and the first access latency of the first IO request, and obtains the updated latency prediction model.

[0197] For example, controller 240 obtains the difference between the first access delay and the first sub-prediction delay, and trains a delay prediction model based on the obtained difference to obtain an updated delay prediction model. For instance, controller 240 determines whether the difference between the first access delay and the first sub-prediction delay is greater than or equal to an error threshold. If the difference is greater than or equal to the error threshold, controller 240 updates the delay prediction model according to the error threshold to obtain an updated delay prediction model; if the difference is less than the error threshold, controller 240 does not update the delay prediction model.

[0198] During the I / O scheduling process, the tape drive can collect the actual access latency (first access latency) corresponding to the I / O request. The controller then trains and updates the latency prediction model based on the collected actual access latency and the predicted latency (first sub-predicted latency) corresponding to the I / O request. This allows the latency prediction model to be continuously optimized and improved during use, thereby adapting to the degrading motors in the tape drive and improving the scheduling performance of the tape drive and reducing the access latency of the I / O stream.

[0199] In the second model update method, the controller 240 optimizes the latency prediction model based on the sub-predicted latency of different IO requests in the IO stream, the nominal latency of the IO request, and the latency error between the actual access latency of the IO request and the nominal latency.

[0200] like Figure 12 As shown, Figure 12 A flowchart illustrating an I / O scheduling method provided in this application. Figure 4 Based on the aforementioned S910 to S930, the IO scheduling method provided in this application embodiment further includes the following S951 to S954.

[0201] S951, the controller 240 inputs the first IO request and the initial address into the nominal prediction model, and outputs the nominal delay of the first IO request.

[0202] The nominal prediction model is trained based on the motor's nominal parameters, the initial address of the read / write head alignment, and multiple access addresses of the magnetic tape. The motor's nominal parameters include one or more combinations of the following: pre-calibrated maximum speed, read / write speed, acceleration, and deceleration. For details on the specific implementation of the nominal prediction model, please refer to the aforementioned documentation. Figure 7 The relevant details will not be elaborated upon here.

[0203] In this example, the nominal latency of the first IO request refers to the access latency of the first IO request when the actual parameters of the motor in the tape drive are the nominal parameters.

[0204] S952, Controller 240 obtains the first access delay of the first IO request in the IO stream.

[0205] In this example, the first access latency of the first IO request refers to the access latency of the first IO request when the tape drive makes the first IO request based on the actual addressing parameters of the motor. For a detailed implementation of S952, please refer to the foregoing. Figure 5 and Figure 6 The provided embodiments will not be described in detail here.

[0206] S953, the controller 240 obtains the first difference between the first sub-predicted delay and the nominal delay, and obtains the second difference between the first access delay and the nominal delay.

[0207] For details on the implementation of S953, please refer to the aforementioned documentation. Figure 7 The provided embodiments will not be described in detail here.

[0208] S954, Controller 240: The controller obtains the time delay deviation between the first difference and the second difference, and trains the time delay prediction model based on the time delay deviation to obtain the updated time delay prediction model.

[0209] In this embodiment, the tape drive device records the actual motor parameters (addressing parameters) during use, and predicts the latency deviation by combining the initial address of the head alignment and the access address in the IO request. During IO scheduling, the controller can refer to the nominal parameters and actual parameters (addressing parameters) of the motor to train the latency prediction model, so that the latency prediction model can have better adaptability to different tape motors and tape motors in different degradation states during the life cycle, ensuring the accuracy of latency prediction and scheduling performance, and improving the latency performance during the tape life cycle.

[0210] In the third model update method, the controller 240 optimizes the latency prediction model based on the latency error between the sub-predicted latency of different IO requests in the IO stream and the actual access latency of the IO request, as detailed above. Figure 8 The provided embodiments are not described in detail here.

[0211] Regarding the above Figures 9 to 12 The IO scheduling method described above will be discussed in conjunction with the following. Figure 13 A feasible concrete example is provided. Figure 13 A flowchart illustrating an I / O scheduling method provided in this application. Figure 5 .exist Figure 13 In a magnetic tape, there are multiple tracks, such as tracks 1 to 5. Each track contains multiple access addresses, such as track 1 containing access addresses 1 to 6, track 3 containing access addresses 7 to 12, and track 5 containing access addresses 13 to 18.

[0212] In track 1, the distance from the current position (black circle) of the read / write head to access address 2 is S1, the distance from the current position of the read / write head to access address 3 is S2, the distance from the current position of the read / write head to access address 5 is S3, and the distance from the current position of the read / write head to access address 6 is S4.

[0213] In track 3, the distance from the current position (black circle) of the read / write head to access address 8 is S1, the distance from the current position of the read / write head to access address 9 is S2, the distance from the current position of the read / write head to access address 11 is S3, and the distance from the current position of the read / write head to access address 12 is S4.

[0214] In track 5, the distance from the current position (black circle) of the read / write head to access address 14 is S1, the distance from the current position of the read / write head to access address 15 is S2, the distance from the current position of the read / write head to access address 17 is S3, and the distance from the current position of the read / write head to access address 18 is S4.

[0215] Combination Figure 9The predicted latency of IO requests 1 to IO requests 6 shown are determined using the latency functions provided by the following formulas (2) to (7).

[0216]

[0217] Among them, t i Let S be the predicted latency for the i-th I / O request, where i is a positive integer; S is the tape length from the current position to the target position; and v is the predicted latency for the i-th I / O request. r The read / write speed of the motor (in m / s), v s The maximum speed of the motor (in m / s), t h The turning delay of the motor (in seconds), t c The switching time delay of the motor (in seconds), t r The time (in seconds) for the motor to accelerate from 0 to read / write speed. s The time (in seconds) for the motor to accelerate from 0 to the addressing speed, t sr 'a' represents the time it takes for the motor to decelerate from the addressing speed to the read / write speed (in seconds), and 'a' represents the acceleration of the motor driving the magnetic tape during winding (in m / s²). 2 ).

[0218] In summary Figures 9 to 13 As shown in the provided embodiments, in the IO scheduling method provided in this application, the latency prediction model is trained based on the addressing parameters of the motor during actual use. The trained latency prediction model is then used to predict the access latency of the IO stream under different scheduling algorithms. The scheduling algorithm corresponding to the minimum predicted latency is selected to control the motor, enabling the motor to drive the magnetic tape for winding and the magnetic head to access regions within the tape. This helps reduce the latency required for motor scheduling in the tape drive and improves the access efficiency of the tape drive. Furthermore, the latency prediction model can be updated and optimized based on the motor's addressing parameters and the actual access latency of different IO requests. This allows the latency prediction model to adapt to continuously degrading motor parameters, avoiding the problem of reduced latency prediction accuracy due to motor performance degradation, and ultimately improving the IO scheduling efficiency in the tape drive.

[0219] Optionally, the tape drive device may also include a sensor and a security module. The sensor can be used to determine the relative position between the magnetic head and the tape drive, and the security module can be used to encrypt the data stored in the tape drive device. The sensor and the security module may also be electrically connected to the controller via a management bus, which is not limited in this application.

[0220] It is understood that, in order to achieve the functions in the above embodiments, the tape drive device, controller, or training device includes hardware structures and / or software modules corresponding to perform each function. Those skilled in the art should readily recognize that, based on the units and method steps of the various examples described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0221] The above text combines Figures 1 to 13 The present application describes in detail the model training method and IO scheduling method provided according to the embodiments of this application. The following will combine... Figure 14 and Figure 15 The following describes the training device and controller provided according to the embodiments of this application.

[0222] Figure 14 The diagram below shows the structure of the training device 1400 provided in this application. The training device 1400 includes a memory 1410 and at least one processor 1420. The processor 1420 can implement the model training method provided in the above embodiments. The memory 1410 is used to store the software instructions corresponding to the above model training method.

[0223] As an optional implementation, in hardware implementation, the training device 1400 can refer to a chip or chip system that encapsulates one or more processors 1420. For example, when the training device 1400 is used to implement the method steps in the above embodiments, the processor 1420 included in the training device 1400 executes the steps of the training device and its possible sub-steps in the above method. In an optional case, the training device 1400 may also include a communication interface 1430, which can be used to send and receive data. For example, the communication interface 1430 is used to receive IO requests or send IO responses; the communication interface 1430 can be implemented through interface circuitry included in the training device 1400. Therefore, in some examples, the communication interface 1430 can also be referred to as the transceiver of the training device. In the embodiments of this application, the communication interface 1430, the processor 1420, and the memory 1410 can be connected via a bus 1440, which can be divided into an address bus, a data bus, a control bus, etc. Bus 1440 can be a Peripheral Component Interconnect Express (PCIe) bus, or an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), or other types of buses, etc. The training device 1400 provided in this embodiment can be any of the above-mentioned training devices, or other devices with model training capabilities; this application does not limit this. For example, when other devices in the tape drive also have model training capabilities, the training device 1400 can refer to other devices in the aforementioned tape drive, such as the aforementioned controller 240.

[0224] Figure 15The schematic diagram of the controller provided in this application shows that the controller 1500 includes a memory 1510 and at least one processor 1520. The processor 1520 can implement the IO scheduling method provided in the above embodiments, and the memory 1510 is used to store the software instructions corresponding to the IO scheduling method. As an optional implementation, in hardware implementation, the controller 1500 can refer to a chip or chip system that encapsulates one or more processors 1520. For example, when the controller 1500 is used to implement the method steps in the above embodiments, the processor 1520 included in the controller 1500 executes the controller steps and possible sub-steps in the above method. In an optional case, the controller 1500 may also include a communication interface 1530, which can be used to send and receive data. For example, the communication interface 1530 is used to receive IO requests or send IO responses, etc.; the communication interface 1530 can be implemented through the interface circuit included in the controller 1500. Therefore, in some examples, the communication interface 1530 can also be referred to as the transceiver of the controller. In the embodiments of this application, the communication interface 1530, the processor 1520, and the memory 1510 can be connected via a bus 1540, which can be divided into an address bus, a data bus, a control bus, etc. The bus 1540 can be a PCIe bus, or an EISA bus, UB, CXL, CCIX, or other types of buses, etc.

[0225] The controller 1500 provided in this embodiment may be the controller 240 mentioned above, or other devices with IO scheduling functions, and this application does not limit it in this regard. For example, when other devices in the tape drive also have IO scheduling functions, the controller 1500 may refer to the other devices in the aforementioned tape drive.

[0226] This application also provides a storage system. The storage system includes a communication interface, a storage controller, and the tape drive device provided in any of the foregoing embodiments. The tape drive device is used to store data, the communication interface is used to receive data access requests, and the storage controller is used to manage target tape drive devices in the storage system according to data access requests (such as read requests or write requests). The storage system is, for example, a tape library, a tape system, or a computer / server that includes tape drive devices as persistent storage media.

[0227] The storage controller includes one or more processors, which can be a very large-scale integrated circuit. The processor contains an operating system and other software programs, enabling it to access tape drives and various PCIe devices. The processor includes one or more processor cores. These cores can be, for example, CPUs or other ASICs. The processor can also be other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. In practical applications, the storage system may also include multiple controllers.

[0228] Optionally, the storage system may also include, but is not limited to, other storage media: dynamic random access memory (DRAM), static random access memory (SRAM), etc., for caching data from the tape drive for processor processing. Additionally, other storage media may be read-only memory (ROM). For example, read-only memory may be programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), etc. This embodiment does not limit the number or type of other storage media. Furthermore, other storage media can be configured to have power-saving functionality. Power-saving functionality means that when the system experiences a power outage and is then powered on again, the data stored in the memory will not be lost. Storage media with power-saving functionality are called non-volatile memory.

[0229] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0230] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Various equivalent modifications or substitutions can be conceived within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An IO scheduling method, characterized in that, The method is applied to a tape drive device including a magnetic head, a magnetic tape and a motor, and the method comprises: obtaining an IO stream, the IO stream comprising a plurality of IO requests, the IO request comprising an access address; processing the IO stream and an initial address aligned with the magnetic head in the magnetic tape based on a time delay prediction model to obtain a plurality of predicted time delays of the motor under a plurality of scheduling algorithms; wherein the time delay prediction model is determined according to addressing parameters of the motor in use, the addressing parameters comprising one or a combination of the following: maximum speed, cruising speed, read-write speed, acceleration acceleration, deceleration acceleration, lane changing time delay and U-turn time delay of the motor; one scheduling algorithm corresponds to one predicted time delay, and the one scheduling algorithm comprises one or a combination of the following: natural sorting, access address linear sorting, greedy algorithm, elevator algorithm; controlling the motor to drive the magnetic tape according to a first scheduling algorithm corresponding to a minimum predicted time delay in the plurality of predicted time delays, so that the magnetic head accesses the access addresses corresponding to different IO requests in the magnetic tape.

2. The method of claim 1, wherein: the processing of the IO stream and the initial address aligned with the magnetic head in the magnetic tape based on the time delay prediction model to obtain the plurality of predicted time delays of the motor under the plurality of scheduling algorithms comprises: inputting a first IO request and an initial address aligned with the magnetic head in the magnetic tape into the time delay prediction model to output a first sub-predicted time delay of the first IO request; the first IO request is any one of the plurality of IO requests; obtaining a first predicted time delay of the motor under the first scheduling algorithm according to a plurality of sub-predicted time delays of a plurality of IO requests in the IO stream.

3. The method of claim 2, wherein, The method further comprises: obtaining a first access time delay of the first IO request processed by the tape drive device according to the first scheduling algorithm; training the time delay prediction model according to the first sub-predicted time delay of the first IO request and the first access time delay to obtain an updated time delay prediction model.

4. The method of claim 3, wherein, The training of the time delay prediction model according to the first sub-predicted time delay of the first IO request and the first access time delay to obtain the updated time delay prediction model comprises: obtaining a difference between the first access time delay and the first sub-predicted time delay; training the time delay prediction model according to the difference to obtain the updated time delay prediction model.

5. The method of claim 4, wherein, The training of the time delay prediction model according to the difference to obtain the updated time delay prediction model comprises: determining whether the difference is greater than or equal to an error threshold; if the difference is greater than or equal to the error threshold, updating the time delay prediction model according to the error threshold to obtain the updated time delay prediction model.

6. The method of claim 3, wherein: before the training of the time delay prediction model according to the first sub-predicted time delay of the first IO request and the first access time delay to obtain the updated time delay prediction model, the method further comprises: inputting the first IO request and the initial address into a nominal prediction model to output a nominal time delay of the first IO request; The nominal prediction model is obtained by training according to nominal parameters of the motor, an initial address of the head alignment, and a plurality of access addresses of the magnetic tape; and the nominal parameters of the motor include one or a combination of the following: a maximum speed, a read-write speed, an acceleration, and a deceleration of the motor. The training of the delay prediction model according to the first sub-prediction delay and the first access delay comprises: obtaining a first difference between the first sub-prediction delay and the nominal delay; obtaining a second difference between the first access delay and the nominal delay; obtaining a delay deviation between the first difference and the second difference, and training the delay prediction model according to the delay deviation to obtain an updated delay prediction model.

7. The method of any one of claims 1-6, wherein: the track switching delay comprises a time for the motor to drive the magnetic tape to align the head to another track of the magnetic tape; and the turnaround delay comprises a time for the motor to drive the magnetic tape to switch from a first direction to a second direction, the first direction and the second direction being consistent with a length direction of the magnetic tape, and the first direction and the second direction being opposite.

8. The method according to any one of claims 1-7, characterized in that, The delay prediction model comprises one or a combination of the following: an artificial neural network, a convolutional neural network, and a deep neural network.

9. A model training method, comprising: The method comprises: obtaining a plurality of sets of training data, each set of training data comprising: addressing parameters of a motor in a tape drive during use, a first address of a head alignment in the tape drive, a plurality of access addresses of a magnetic tape in the tape drive, and an access delay of each access address, wherein the addressing parameters comprise one or a combination of the following: a maximum speed, a cruise speed, a read-write speed, an acceleration, a deceleration, a track switching delay, and a turnaround delay of the motor; inputting the plurality of sets of training data and a first access address into an initial model to output a first sub-prediction delay of the first access address, the plurality of access addresses comprising the first access address, and the first access address corresponding to a first access delay; training the initial model according to the first access delay and the first sub-prediction delay to obtain a delay prediction model.

10. The method of claim 9, wherein, The training of the initial model according to the first access delay and the first sub-prediction delay to obtain a delay prediction model comprises: obtaining a difference between the first access delay and the first sub-prediction delay; training the initial model according to the difference to obtain the delay prediction model.

11. The method of claim 10, wherein, The training of the initial model according to the difference to obtain the delay prediction model comprises: determining whether the difference is greater than or equal to an error threshold; if the difference is greater than or equal to the error threshold, updating the initial model according to the error threshold to obtain the delay prediction model.

12. The method of claim 9, wherein: Before the training of the initial model according to the first access time delay and the first sub-prediction time delay to obtain a time delay prediction model, the method further comprises: inputting the first access address into a nominal prediction model to output a nominal time delay of the first access address; wherein the nominal prediction model is obtained by training according to nominal parameters of the motor, an initial address of the head alignment, and a plurality of access addresses of the magnetic tape; the nominal parameters of the motor include one or a combination of the following: a maximum speed, a read-write speed, an acceleration acceleration, and a deceleration acceleration of the motor pre-calibrated for the motor; the training of the initial model according to the first access time delay and the first sub-prediction time delay to obtain a time delay prediction model comprises: obtaining a first difference between the first access time delay and the nominal time delay; obtaining a second difference between the first sub-prediction time delay and the nominal time delay; obtaining a time delay deviation between the first difference and the second difference, and training the initial model according to the time delay deviation to obtain the time delay prediction model.

13. A controller characterized by comprising: comprising: a communication interface configured to obtain an IO stream and a first address of the head alignment in a tape drive device; a processor configured to execute the method according to any one of claims 1 to 8 according to the IO stream and the first address.

14. A training device, characterized by comprising: a transceiver configured to obtain a plurality of sets of training data; a processor configured to execute the method according to any one of claims 9 to 12 according to the plurality of sets of training data.

15. A tape drive apparatus, characterized by comprising: a magnetic tape configured to store data; a head configured to access the magnetic tape; a magnetic tape drive comprising a motor configured to drive the magnetic tape to wind the tape; and the controller of claim 13 configured to obtain an IO stream and control the motor to drive the magnetic tape to wind the tape according to the IO stream, so that the head accesses the magnetic tape.

16. A storage system, comprising: comprising: a storage controller and one or more tape drive devices of claim 15; the storage controller configured to manage a target tape drive device in the one or more tape drive devices according to an IO stream.

17. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer instructions; when the computer instructions run in an electronic device, the electronic device executes the method according to any one of claims 1 to 12.

18. A computer program product, characterised in that, When the computer program product runs in an electronic device, the electronic device executes the method according to any one of claims 1 to 12.