Access scheduling method, controller, magnetic tape unit equipment and storage system

By optimizing the access scheduling algorithm of the tape drive, and utilizing the spatiotemporal augmented sorting method and the directory bucket-based spatiotemporal augmented sorting method, the tape wear problem caused by the back-and-forth friction of the magnetic head was solved, thereby improving access efficiency and tape life.

CN121597100APending Publication Date: 2026-03-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411118373.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

The greedy strategy employed by the magnetic head during magnetic tape access leads to constant back-and-forth friction, resulting in severe tape wear and shortening its lifespan.

Method used

By employing a spatiotemporal augmented sorting method and a directory bucket-based spatiotemporal augmented sorting method, and combining the inherent characteristics and seek characteristics of magnetic tape, the access scheduling algorithm of the magnetic tape drive is optimized. The scheduling algorithm with the minimum prediction delay is selected to control the motor to drive the magnetic tape, thus avoiding wear caused by greedy strategies.

Benefits of technology

It reduces the latency of motor scheduling in tape drive equipment, improves access efficiency, extends the life of tapes, and enhances the reliability of tape drive equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597100A_ABST
    Figure CN121597100A_ABST
Patent Text Reader

Abstract

The invention discloses an access scheduling method, a controller, magnetic tape unit equipment and a storage system, and relates to the technical field of magnetic tapes. And predicting execution time delays of IO when different scheduling algorithms are adopted, and selecting a target scheduling algorithm corresponding to the target prediction time delay to control the motor, so that the motor drives the magnetic tape to carry out tape winding, and the magnetic head accesses an area in the magnetic tape. The scheduling algorithm comprises a time-space domain augmentation sorting method and a directory bucket-based time-space domain augmentation sorting method, so that the access sequence of a plurality of access addresses closest to the initial address can be confirmed in the time delay prediction process; the problem that the tape is seriously abraded due to the fact that only one access address closest to the initial address is accessed by a greedy strategy is avoided, a better access sequence of access scheduling can be determined in a tape range corresponding to a plurality of access addresses closest to the initial address, and the access scheduling performance of tape unit equipment is improved; and the service life of the tape is prolonged.
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 access scheduling method, controller, magnetic tape drive device and 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, after the motor reaches the target area, a greedy strategy drives the tape to the nearest other area, allowing the head to access that other area. Because the greedy strategy aims to find and read the next nearest area in the batch of data on the tape, the motor needs to control the tape to constantly turn around or change tracks. This constant back-and-forth friction between the head and the tape leads to severe tape wear and a reduced tape lifespan. Summary of the Invention

[0003] This application provides an access scheduling method, controller, tape drive device, and storage system, which solves the problem that the continuous back-and-forth friction between the magnetic head and the tape caused by the greedy strategy for each IO request during the magnetic head accessing the tape leads to severe tape wear and reduced tape life. It improves the access scheduling performance in the tape drive device and helps to extend the life of the tape.

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

[0005] Firstly, this application provides an access scheduling method. This access scheduling method is applied to a tape drive device, which includes a magnetic head, a magnetic tape, and a motor. The method includes: acquiring an I / O stream and obtaining multiple predicted delays for various scheduling algorithms based on the I / O stream and the initial address aligned with the magnetic head in the tape. The I / O stream includes multiple I / O requests, each I / O request including an access address. Each of the aforementioned scheduling algorithms corresponds to a predicted delay, and the scheduling algorithm includes one or more combinations of the following: a full permutation method, a spatiotemporal augmented sorting method, a directory bucket-based spatiotemporal augmented sorting method, and an access address linear sorting method. The spatiotemporal augmented sorting method is used to determine a first access order of the multiple access addresses closest to the initial address, and the directory bucket-based spatiotemporal augmented sorting method is used to determine a second access order of the multiple access addresses closest to the initial address. Furthermore, the predicted delay less than or equal to a delay threshold among the multiple predicted delays is taken as the target predicted delay, and the motor is controlled to drive the magnetic tape according to the target scheduling algorithm corresponding to the target predicted delay, so that the magnetic head accesses the tape according to the access addresses of different I / O requests among the multiple I / O requests.

[0006] In one alternative implementation, the tape drive device further includes a processor, and the access scheduling method provided in the first aspect of this application is executed by the processor within the tape drive device.

[0007] In one alternative implementation, the tape drive is connected to a controller, and the access scheduling method provided in the first aspect of this application is executed by a controller outside the tape drive.

[0008] In one alternative implementation, the access order determined by the spatiotemporal augmented sorting method and the directory bucket-based spatiotemporal augmented sorting method includes some or all of the access addresses included in multiple IO requests.

[0009] In the first aspect of this application, the execution latency of different scheduling algorithms is predicted based on the I / O stream, and the target scheduling algorithm corresponding to the target 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 in the magnetic tape. This helps reduce the latency required for motor scheduling in the tape drive and improves the access efficiency of the tape drive. Furthermore, since the scheduling algorithms include spatiotemporal augmented sorting methods and directory bucket-based spatiotemporal augmented sorting methods, the access order of multiple access addresses closest to the initial address can be confirmed during latency prediction. This avoids the problem of severe tape wear caused by greedy strategies that only access the address closest to the initial address. It helps determine a better access order within the tape range corresponding to the multiple access addresses closest to the initial address, improving the access scheduling performance of the tape drive and extending the lifespan of the magnetic tape.

[0010] In conjunction with the access scheduling method provided in the first aspect, in one optional implementation, the aforementioned target scheduling algorithm is: a scheduling algorithm determined based on the data characteristics of the IO stream from among all the scheduling algorithms corresponding to predicted delays less than or equal to a delay threshold among multiple predicted delays; wherein, the data characteristics of the IO stream include one or more combinations of the following: the number of IO requests in the IO stream, the probability that the access addresses included in different IO requests in the IO stream overlap along the length of the tape, and the distribution characteristics of the access addresses included in different IO requests in the tape. In the first aspect of this application, since the target predicted delay not only satisfies the delay constraint condition (less than or equal to the delay threshold), but the target scheduling algorithm corresponding to the target predicted delay can also be adapted to the data characteristics of the IO stream, the target scheduling algorithm corresponding to the target predicted delay can determine the optimal access order under the delay constraint condition, so that the target scheduling algorithm has good adaptability to the access addresses corresponding to each IO request in the tape, ensuring the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor, which is beneficial to improving the delay performance and service life of the tape during its life cycle.

[0011] In conjunction with the access scheduling method provided in the first aspect, in one optional implementation, the target scheduling algorithm is the scheduling algorithm with the highest priority among all scheduling algorithms corresponding to predicted latencies less than or equal to a latency threshold. The priority of the scheduling algorithms satisfies the following formula: priority of the full permutation method > priority of the spatiotemporal augmented sorting method > priority of the directory bucket-based spatiotemporal augmented sorting method > priority of the access address linear sorting method. In the first aspect of this application, since the target predicted latency not only satisfies the latency constraint condition (less than or equal to the latency threshold) but also the target scheduling algorithm corresponding to the target predicted latency has a high priority, the target scheduling algorithm corresponding to the target predicted latency can determine the optimal access order under the latency constraint condition. This ensures that the target scheduling algorithm has good adaptability to the access addresses corresponding to each IO request in the tape, further guaranteeing the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor, which is beneficial to further improving the latency performance and service life of the tape during its life cycle.

[0012] In conjunction with the access scheduling method provided in the first aspect, in an optional implementation, if the target scheduling algorithm is a spatiotemporal augmented sorting method, then the above-mentioned control of the motor driving the tape according to the selected target scheduling algorithm includes: acquiring the inherent characteristics of the tape and the seek characteristics of the tape drive, and constructing a multi-dimensional seek characteristic profile based on the number of IO requests in the IO stream, the inherent characteristics of the tape, and the seek characteristics. The inherent characteristics of the tape include one or more combinations of the following: tape length, storage capacity, and lifespan; the seek characteristics include one or more combinations of the following: maximum motor speed, cruising speed, read / write speed, acceleration, deceleration, track switching delay, rewind delay, and tape wear level; the aforementioned multi-dimensional seek characteristic profile is used to determine the seek costs of the tape drive in multiple dimensions, which include two or three of the following: seek delay, tape wear level, and motor wear level. Furthermore, multiple seek costs corresponding to the IO stream are obtained based on the multi-dimensional seek characteristic profile and the search breadth of the spatiotemporal augmented sorting method, and the motor driving the tape is controlled according to the access order corresponding to the minimum seek cost among the multiple seek costs. The search breadth is the number of addresses accessed in a single seek, and a seek cost corresponds to an access order of multiple IO requests.

[0013] In one alternative example, the access order corresponding to the minimum seek cost is sequential reads.

[0014] In another alternative example, the access order corresponding to the minimum seek cost is intermittent read.

[0015] Optionally, the track switching delay includes the time it takes for the motor to drive the tape from one track alignment head to another track alignment head. The rewind delay includes the time it takes for the motor to drive the tape to switch from a first direction to a second direction, wherein the first and second directions are aligned with the length direction of the tape and are opposite to each other. The tape wear includes the number of contacts between the tape and the magnetic head.

[0016] In conjunction with the access scheduling method provided in the first aspect, in one optional implementation, the spatiotemporal augmented sorting method includes: a spatiotemporal proximity sorting method and an MPSCAN method. The spatiotemporal proximity sorting method is used to determine the first sub-access order with the shortest seek distance among the multiple access addresses closest to the initial address. The MPSCAN method is used to determine the second sub-access order with the minimum rewind delay and track-changing delay among the multiple access addresses closest to the initial address. The access order corresponding to the aforementioned minimum seek cost is either the first sub-access order or the second sub-access order.

[0017] Combining the access scheduling method provided in the first aspect, in one optional implementation, the multi-dimensional seek feature profile satisfies the following formula (1).

[0018] C=ω1*c seek +ω2*c abrasion +ω3*c motor ,ω1+ω2+ω3=1 Formula (1)

[0019] Where C is the pathfinding cost, c seek The cost corresponding to the seek latency, c abrasion The cost corresponding to the wear and tear of the magnetic tape, c motor The cost corresponding to the degree of wear and tear on the motor, ω1 is c seek The cost weight, ω2 is c abrasion The cost weight, ω3 is c motor Cost weights.

[0020] In conjunction with the access scheduling method provided in the first aspect, in one optional implementation, c seek It is determined based on the following information: tape seek speed, track change delay, rewind delay, the distance the tape travels from the first address to the second address, and the time it takes for the tape to travel from the first address to the second address. abrasion It is determined based on the following information: the seek distance between the first address and the second address, the tape length of the access area corresponding to the second address, the number of tape rewinds, and the number of tracks between the track containing the first address and the track containing the second address. motor It is determined based on the following information: the number of times the motor starts and the running time.

[0021] In the first aspect of this application, the seek cost is evaluated from different dimensions, and the access order determined by the minimum seek cost is used to access the tape during the access scheduling process. This helps to minimize the wear between the tape and the magnetic head or reduce the wear of the motor while meeting the delay constraints, thereby extending the service life of the tape and the motor and improving the reliability of the tape drive equipment.

[0022] In conjunction with the access scheduling method provided in the first aspect, in one optional implementation, the predicted latency of different scheduling algorithms is determined by the latency prediction model. The access scheduling method provided in this application further includes: obtaining the execution latency of the aforementioned target scheduling algorithm, and updating the latency prediction model based on the execution latency and the target predicted latency to obtain the updated latency prediction model.

[0023] In conjunction with the access scheduling method provided in the first aspect, in one optional implementation, the above-mentioned updating of the latency prediction model based on the execution latency and the target predicted latency to obtain the updated latency prediction model includes: obtaining the latency difference between the execution latency and the target predicted latency, and using the latency difference as input to a heuristic strategy to update the latency prediction model to obtain the updated latency prediction model. This heuristic strategy includes one or more combinations of the following: genetic algorithm, ant colony algorithm, and simulated annealing algorithm.

[0024] In the first aspect of this application, the execution delay of the target scheduling algorithm during the access scheduling process of the tape drive is obtained, and the delay prediction model is updated based on the execution delay and the predicted delay of the scheduling algorithm during the access scheduling process. This allows the updated delay prediction model to have better adaptability to different tape motors and tape motors in different degradation states during their life cycle, ensuring delay prediction accuracy and scheduling performance, and improving delay performance during the tape life cycle.

[0025] Secondly, this application provides a controller. The controller is applied to a tape drive device, which includes a magnetic head, a magnetic tape, and a motor. The magnetic tape is used to store data. The controller includes a transceiver and a processor. The transceiver is used to acquire an I / O stream, which includes multiple I / O requests, each I / O request including an access address. The processor is used to: obtain multiple predicted delays for various scheduling algorithms based on the I / O stream and the initial address aligned to the magnetic head in the tape. Each scheduling algorithm corresponds to one predicted delay. A scheduling algorithm includes one or more of the following combinations: a full permutation method, a spatiotemporal augmented sorting method, a directory bucket-based spatiotemporal augmented sorting method, and an access address linear sorting method. The spatiotemporal augmented sorting method is used to determine a first access order for the multiple access addresses closest to the initial address, and the directory bucket-based spatiotemporal augmented sorting method is used to determine a second access order for the multiple access addresses closest to the initial address. The processor is also used to: use the predicted delay less than or equal to a delay threshold among the multiple predicted delays as a target predicted delay, and control the motor to drive the tape according to the target scheduling algorithm corresponding to the target predicted delay, so that the magnetic head accesses the tape according to the access addresses of different I / O requests among the multiple I / O requests.

[0026] Thirdly, this application provides a magnetic tape drive device. The magnetic tape drive device includes: a magnetic tape, a magnetic head, a magnetic tape drive, and a controller. The magnetic tape is used to store data. The magnetic head is used to access the magnetic tape. The magnetic tape drive includes a motor for driving the magnetic tape. The controller is used to acquire an I / O stream and, based on the I / O stream, implement the operational steps of the method provided in the first aspect or any optional implementation of the first aspect. For example, the controller may be the controller provided in the second aspect.

[0027] Fourthly, this application provides a storage system. The storage system includes a controller and one or more tape drive devices. The controller is used to manage a target tape drive device among the one or more tape drive devices, and the controller is also used to acquire I / O streams and implement the operational steps of the method provided in the first aspect or any optional implementation of the first aspect based on the I / O streams. For example, the controller may be the controller provided in the second aspect.

[0028] Fifthly, this application provides a computer-readable storage medium. This computer-readable storage medium includes computer instructions. When the computer instructions are executed in an electronic device, the electronic device implements the operational steps of the method provided in the first aspect or any optional implementation of the first aspect. For example, the electronic device may be a controller provided in the second aspect, a magnetic tape drive provided in the third aspect, or a storage system provided in the fourth aspect.

[0029] Sixthly, this application provides a computer program product. When the computer program product runs on an electronic device, the electronic device implements the operational steps of the method provided in the first aspect or any optional implementation of the first aspect. For example, the electronic device may be a controller provided in the second aspect, a magnetic tape drive provided in the third aspect, or a storage system provided in the fourth aspect.

[0030] The beneficial effects of aspects two through six can be found in the description of aspect one or any of its optional implementations, 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

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

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

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

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

[0035] Figure 5 A software architecture diagram for access scheduling provided in this application.

[0036] Figure 6 A flowchart illustrating an access scheduling method provided in this application. Figure 1 .

[0037] Figure 7A A schematic diagram illustrating the data features provided in this application.

[0038] Figure 7B A flowchart illustrating an access scheduling method provided in this application. Figure 2 .

[0039] Figure 8 A flowchart illustrating an access scheduling method provided in this application. Figure 3 .

[0040] Figure 9 A schematic diagram showing the comparison between continuous reads and interval reads provided in this application.

[0041] Figure 10 A flowchart illustrating an access scheduling method provided in this application. Figure 4 .

[0042] Figure 11 A flowchart illustrating an access scheduling method provided in this application. Figure 5 .

[0043] Figure 12 A flowchart illustrating an access scheduling method provided in this application. Figure 6 .

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

[0045] This application provides an access scheduling method, a tape drive device, and a storage system. A trained latency prediction model is used to predict the execution 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, improving the access efficiency of the tape drive device. The latency prediction model can be determined based on the motor's seek characteristics, such as, but not limited to, the motor's maximum speed, cruising speed, read / write speed, acceleration, deceleration, track switching latency, and rewind latency.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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 (2).

[0050]

[0051] 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 s The 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.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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".

[0056] 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.

[0057] 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.

[0058] 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.

[0059] Figure 1The 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.

[0060] like Figure 1 As shown, engine 121 may have one or more controllers. Figure 1 The 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] like Figure 1As shown, in this system, engine 121 may not have a hard drive slot; the hard drive needs to be placed in disk enclosure 122, and the back-end interface 1214 communicates with disk 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 disk 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.

[0065] 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.

[0066] The disk enclosure 122 includes a control unit 1225 and several hard drives. The control unit 1225 can have various forms. In one case, the disk enclosure 122 is a smart disk enclosure, such as... Figure 1 As shown, the control unit 1225 includes a CPU and memory. The CPU is used to perform 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 is 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 disk drive 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 hard drives in disk enclosure 122; network interface card 1226 can access any hard drive in disk 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.

[0067] 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 5 The embodiments shown are not described in detail here.

[0068] 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 hard drives. 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 hard drives 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 hard drive management device or storage controller.

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

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

[0071] 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.

[0072] 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.

[0073] 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.

[0074] 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.

[0075] 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 processor 240.

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

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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.

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

[0082] 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.

[0083] 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 magnetic tape drive device 200 accesses magnetic tape 210 during the rewinding process. Processor 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.

[0084] For example, processor 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 a data access device or host through a 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 a back-end port.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] 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.

[0090] 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.

[0091] 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 target tape area indicated by the position information, so that the read data head can read the data stored in the target tape area.

[0092] It is understandable that the tape drive device 200 can also deploy applications (APPs) and drivers. Applications can be 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 tape position is reached, the read / write operation is achieved by the read / write head through the ADC / DAC channel for encoding and decoding.

[0093] 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.

[0094] 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.

[0095] 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.

[0096] The following is in conjunction with the appendix Figure 5 The intra-disk I / O scheduling framework provided in the embodiments of this application will be described by way of example. Figure 5 A software architecture diagram for access scheduling provided in this application. Please refer to [link / reference]. Figure 5 The software architecture includes: a spatiotemporal augmented sorting module 200a and a learning-based planning module 200b. In some optional cases, Figure 5 The software architecture for access scheduling shown is also called the in-disk I / O scheduling framework. The disk can refer to the aforementioned disk frame 122 or the tape drive device 200. This application does not limit it to either.

[0097] Specifically, the spatiotemporal augmented sorting module 200a sorts the default request sequence, and the learning-based planning module 200b optimizes the scheduling algorithm corresponding to the recommended request sequence based on the access latency of the recommended request sequence, and updates the optimization result to the spatiotemporal augmented sorting module 200a. Furthermore, the learning-based planning module 200b also optimizes the latency prediction model based on the execution latency of the recommended request sequence generated by the scheduling algorithm, and updates the optimization result to the spatiotemporal augmented sorting module 200a.

[0098] In an optional example, the spatiotemporal augmented sorting module 200a and the learning-based planning module 200b are two processing chips with different functions. These two processing chips can be integrated into the processor 240 of the aforementioned tape drive device 200, or they can be independently disposed on a circuit board outside the processor 240. Furthermore, these two processing chips can also be connected to the processor 240 via electrical or communication connections and are disposed outside the tape drive device 200, rather than inside the tape drive device 200.

[0099] In another alternative example, the spatiotemporal augmented sorting module 200a and the learning-based planning module 200b are two components with different functions. These components can be installed on the processor 240 of the aforementioned tape drive device 200 as software modules or software units, or they can be installed on other processing chips or processing devices electrically or communicatively connected to the tape drive device 200, such as the control unit 1225 in the aforementioned drive frame 122, the controller included in the engine 121, or the engine 122 itself.

[0100] The two optional examples above are merely feasible methods for the spatiotemporal augmented sorting module 200a and the learning planning module 200b provided in the embodiments of this application, and should not be construed as limiting this application.

[0101] The following is combined Figure 5 The functions of the above-mentioned spatiotemporal augmented sorting module 200a and learning planning module 200b are illustrated in (1) to (4).

[0102] (1) The spatiotemporal augmented sorting module 200a determines the multidimensional seek feature profile corresponding to the default request sequence based on information such as the head position, tape seek characteristics and the number of IO requests.

[0103] This default request sequence includes multiple I / O requests, such as... Figure 5 IO requests 1 through IO requests 4. Figure 5 In the diagram, the circles represent different I / O requests. In the default request sequence, these multiple I / O requests have longer access paths and higher access latency; furthermore, the contact distance between the read / write head and the tape is longer, resulting in greater tape wear. This multi-dimensional seek feature profile is used to determine the seek cost of multiple I / O requests under different access orders. For a detailed implementation of the multi-dimensional seek feature profile, please refer to the following... Figure 8 The description of that will not be repeated here.

[0104] (2) Output: After determining the recommended request sequence with the minimum seek cost under different dimensions such as seek delay, tape wear and motor wear, the spatiotemporal augmented sorting module 200a outputs the recommended request sequence.

[0105] This recommended request sequence also includes the aforementioned multiple IO requests, such as... Figure 5 IO requests 1 through IO requests 4 are listed in the recommended request sequence. The recommended request sequence differs from the default request sequence in that the access paths for these multiple IO requests are shorter, resulting in lower access latency; moreover, the contact distance between the read / write head and the tape is shorter, leading to less tape wear.

[0106] (3) Dynamic feedback: The learning planning module 200b obtains the execution latency of generating the recommendation request sequence. This execution process not only meets the latency constraint but also achieves the expected wear target. For example, the latency constraint is a set latency threshold, and the wear target may include, but is not limited to, tape wear or motor wear in tape drive equipment.

[0107] (4) Update: The learning planning module 200b optimizes the scheduling algorithm used to generate the recommendation request sequence and the delay prediction model containing the scheduling algorithm based on the execution delay of the recommendation request sequence, and updates the optimization results to the spatiotemporal augmented sorting module 200a.

[0108] For example, the scheduling algorithm includes one or more of the following combinations: full permutation method, spatiotemporal augmented sorting method, directory bucket-based spatiotemporal augmented sorting method, access address linear sorting method, and first-come-first-service (FCFS) method. Specific implementations of each scheduling algorithm can be found in the description related to S620 below, and will not be elaborated upon here.

[0109] It is worth noting that, Figure 5 The software framework shown is merely an optional approach provided by the embodiments of this application and should not be construed as limiting this application. In some optional implementations, the spatiotemporal augmented sorting module 200a and the learning-based planning module 200b can also be pushed to the tape drive device 200 or a storage system containing the tape drive device 200 through firmware upgrades, application version updates, or subscription services.

[0110] Below Figures 1 to 5 Based on this, the access scheduling method provided in the embodiments of this application will be described by way of example. Figure 6 A flowchart illustrating an access scheduling method provided in this application. Figure 1 This access scheduling method is applied to tape drive devices, such as the tape drive device 200 described above.

[0111] The access scheduling method provided in this application embodiment can be executed by a processor in a tape drive device, or by another computing device communicating with the tape drive device. For example, the other computing device refers to the controller in the storage system (such as a tape system) to which the tape drive device belongs. The controller can be, for example, the controller or engine 121 included in the aforementioned control unit 1225 or engine 121.

[0112] This application provides an example of an access scheduling method executed by a controller. The controller may be equipped with a latency prediction model, or the controller may be able to invoke the latency prediction model through an application programming interface (API). The latency prediction model is used to predict the latency of the I / O stream.

[0113] For example, the time 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.

[0114] 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.

[0115] 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.

[0116] 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.

[0117] As an optional implementation, the delay prediction model can be determined based on information such as the current position of the magnetic head, the inherent characteristics of the tape drive, and its seek characteristics. The specific content of the inherent characteristics and seek characteristics of the tape drive can be found in the following embodiments. Figure 8 The relevant descriptions will not be repeated here.

[0118] Please see Figure 6 The access scheduling method provided in this application includes the following steps S610 to S630.

[0119] S610, the controller acquires the IO stream.

[0120] For example, an IO stream can also be called an IO data stream, which includes multiple IO requests, also known as access requests, such as IO request 1 to IO request 4. Each IO request includes an access address.

[0121] 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.

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

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

[0124] 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.

[0125] 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.

[0126] The three possible examples above are merely optional methods of IO streams provided in the embodiments of this application. Data indicated by multiple IO requests belonging to the same IO stream flows from one storage location to another. 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). In some optional cases, the IO stream may also be called a request sequence, a data request stream, or other names, etc., which are not limited in this application.

[0127] The S620 controller obtains multiple predicted delays for various scheduling algorithms based on the IO stream and the initial address of the magnetic head alignment in the tape.

[0128] The initial address for head alignment on the magnetic tape is the address corresponding to the tape region where the head is aligned, which is the current position of the head alignment on the tape. For example, before the controller receives the I / O stream, the current tape region where the head is aligned is the initial address of the head. In some optional cases, this initial address is also called the current address of head alignment on the tape, the start address, or the starting address, etc., which is not limited in this application. It is worth noting that in some optional methods, the initial address of the head can also refer to the fixed tape region where the head resets after one or more accesses to the tape; this fixed tape region is the initial address of the head.

[0129] In S620, one scheduling algorithm corresponds to one predicted latency. For example... Figure 6 As shown, scheduling algorithm 1 corresponds to predicted latency 1, and scheduling algorithm 2 corresponds to predicted latency 2. In this embodiment, the predicted latency corresponding to the scheduling algorithm refers to the predicted value of the execution latency of the scheduling algorithm. That is, the predicted latency includes the predicted value of the time required to sort the IO requests in the IO stream according to the scheduling algorithm.

[0130] In the embodiments of this application, the scheduling algorithm includes one or more of the following combinations: full permutation method, spatiotemporal augmented sorting method, directory bucket-based spatiotemporal augmented sorting method, access address linear sorting method, and first-in-first-served (FCFS) method.

[0131] The full permutation method refers to analyzing and arranging the access methods of all IO requests in the IO stream based on different dimensions after receiving the stream, in order to determine the optimal access order. It's important to note that the full permutation method is time-consuming when the number of IO requests in the IO stream is large.

[0132] 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.

[0133] The spatiotemporal augmented sorting method is used to determine the first access order of multiple access addresses closest to the initial address. For a detailed implementation of the spatiotemporal augmented sorting method, please refer to the following... Figure 8 and Figure 9 The relevant descriptions will not be repeated here.

[0134] The directory-bucket-based spatiotemporal augmenting sorting method is used to determine the second access order of multiple access addresses closest to the initial address. The difference between the directory-bucket-based spatiotemporal augmenting sorting method and the standard spatiotemporal augmenting sorting method lies in that, when the number of IO requests in the IO stream is large, the controller processes the IO requests in batches to avoid the problem of long processing times caused by a large number of IO requests in a single sorting, thus improving the efficiency of batch IO access. For the specific implementation of the directory-bucket-based spatiotemporal augmenting sorting method, please refer to the description in S632 below, which will not be elaborated here.

[0135] The First-In-First-Served (FCFS) method, also known as the natural ordering method, refers to a tape drive ordering the received I / O requests in the I / O stream according to their time sequence, and then accessing each I / O request in turn. For example, when a tape drive accesses the received I / O stream using a natural ordering scheduling algorithm, the actual access latency of the I / O stream is the time from when the tape drive receives the first I / O request to when the access to the last I / O request in the I / O stream ends.

[0136] S630: The controller takes the predicted delay that is less than or equal to the delay threshold among multiple predicted delays as the target predicted delay, and controls the motor to drive the tape according to the target scheduling algorithm corresponding to the target predicted delay, so that the magnetic head accesses the tape according to the access address of different IO requests among multiple IO requests.

[0137] In the first feasible example, the latency threshold is a user-defined value. For example, the latency threshold could be 1 second, 2 seconds, 5 seconds, 100 seconds, or other values.

[0138] In the second feasible example, the latency threshold is a pre-configured value in the controller. For example, the latency threshold could be 1s, 2s, 10s, 200s, or other values.

[0139] The two feasible examples above are merely optional implementations of the latency threshold provided in the embodiments of this application and should not be construed as limiting this application. The latency threshold can also change depending on the number of IO requests in the IO stream: for example, if the number of IO requests is high, the latency threshold increases; if the number of IO requests is low, the latency threshold decreases. Alternatively, the latency threshold can also change based on differences in the hardware performance of various components in the tape drive device, which will not be elaborated here.

[0140] In the first optional implementation, among the multiple predicted delays, only one predicted delay is less than or equal to the delay threshold. For example, if the predicted delay is 1, the controller takes the predicted delay 1 as the target predicted delay and controls the motor to drive the tape according to the target scheduling algorithm corresponding to the target predicted delay.

[0141] In one possible example, such as Figure 6 In the provided tape drive equipment, a black pattern corresponds to the location of the access address of an I / O request on the tape. For example, access address 1 in I / O request 1 is located on track 1 of the tape, access address 2 in I / O request 2 is located on track 2 of the tape, access address 3 in I / O request 3 is located on track 4 of the tape, and access address 4 in I / O request 4 is located on track 5 of the tape. Figure 6 In the process, the scheduling trajectory of the magnetic head relative to the magnetic tape includes: access address 4 → access address 2 → access address 3 → access address 1. This scheduling trajectory is similar to the one described above. Figure 5 The recommended request sequence shown is consistent. Controlling the motor based on this scheduling trajectory results in shorter access paths and lower access latency for multiple I / O requests in the I / O stream; furthermore, the contact distance between the magnetic head and the tape is shorter, leading to less tape wear.

[0142] In the second optional implementation, multiple predicted latencies exist that are less than or equal to a latency threshold. The controller selects a scheduling algorithm determined based on the data characteristics of the I / O stream from all the scheduling algorithms corresponding to these predicted latencies that are less than or equal to the latency threshold. For example, if the predicted latencies less than or equal to the latency threshold include predicted delay 1 and predicted delay 2, the controller considers both predicted delay 1 and predicted delay 2 as candidates for the target predicted delay, and selects the scheduling algorithm that matches the data characteristics of the I / O stream from the corresponding scheduling algorithms for predicted delay 1 and predicted delay 2 as the target scheduling algorithm.

[0143] The data features include one or more of the following combinations: the number of IO requests in the IO stream, the probability that the access addresses included in any two IO requests overlap along the length of the tape, and the distribution characteristics of the access addresses included in different IO requests on the tape. The number of IO requests, the probability of overlap, and the distribution characteristics are illustrated below.

[0144] The number of IO requests in an IO stream refers to the number of IO requests included in the IO stream.

[0145] The probability that the access addresses included in any two I / O requests overlap along the length of tape 210 includes: each I / O request includes an access address indicating a certain length of tape region along the tape length direction; the access addresses of the two I / O requests are located on different tracks or wraps along the tape width direction, but the access addresses of the two I / O requests may have a certain overlapping area along the tape length direction (the overlap length of the access addresses). The probability that the access addresses of these two I / O requests overlap along the tape length direction is the ratio between the aforementioned overlap length and the tape length indicated by the access address included in one of the I / O requests. The following is combined with... Figure 7A The contents of Table 1 illustrate, for example, the probability that the access addresses of different IO requests overlap along the length of the tape.

[0146] Table 1

[0147] IO request 1 IO request 2 IO request 3 IO request 4 IO request 1 / 0.2 0.3 0 IO request 2 0.2 / 0.1 0 IO request 3 0.3 0.1 / 0 IO request 4 0 0 0 /

[0148] Specifically, 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. Access address 1 indicates the tape region (A1) in track 1, access address 2 indicates the tape region (A2) in track 2, access address 3 indicates the tape region (A3) in track 3, and access address 4 indicates the tape region (A4) in track 4. Along the length of tape 210, different access addresses may have partially overlapping areas. For example, A1 and A2 have an overlapping area 1 along the length of tape 210. Figure 7A (As shown in ①), A1 and A3 have an overlapping region 2 along the length direction of magnetic tape 210. Figure 7A (As shown in ②), A2 and A3 have an overlapping region 3 along the length direction of magnetic tape 210. Figure 7A (As shown in ③), there is no overlap between A4 and the tape regions indicated by other access addresses. In some optional cases, the overlap between tape regions indicated by different access addresses along the length of tape 210 is also called: longitudinal position (LPOS) overlap of different access addresses on the tape.

[0149] The distribution characteristics of access addresses included in different I / O requests on the magnetic tape include: the distribution density of each access address in different regions of the magnetic tape. This distribution characteristic can be obtained through the tape length and the position of the access addresses of each I / O request on the tape. For example, the access addresses of each I / O request are clustered on the magnetic tape, and clustering is used to determine one or more target locations on the tape. The tape areas indicated by the access addresses are concentrated near these target locations. Concentrated distribution means that within a certain distance range from the target location, the tape area indicated by the access addresses is greater than or equal to a certain threshold.

[0150] The data features described above are merely optional methods provided in the embodiments of this application and should not be construed as limiting this application. When the controller matches the target scheduling algorithm by collecting the data features of the IO stream, since the target predicted delay not only meets the delay constraint (less than or equal to the delay threshold) but also the target scheduling algorithm corresponding to the target predicted delay can be adapted to the data features of the IO stream, the target scheduling algorithm corresponding to the target predicted delay can determine the optimal access order under the delay constraint. This ensures that the target scheduling algorithm has good adaptability to the access addresses corresponding to each IO request in the tape, guaranteeing the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor, which is beneficial for improving the delay performance and service life of the tape during its lifespan.

[0151] In the third optional implementation, multiple prediction delays exist that are less than or equal to a delay threshold, such as prediction delay 1 and prediction delay 2. The controller then considers both prediction delay 1 and prediction delay 2 as candidates for the target prediction delay, and selects the prediction delay with the higher priority of the corresponding scheduling algorithm from prediction delay 1 and prediction delay 2 as the target prediction delay. The controller then controls the motor to drive the tape according to the target scheduling algorithm corresponding to the target prediction delay. The following section combines... Figure 7B It provides a feasible implementation method. Figure 7B A flowchart illustrating an access scheduling method provided in this application. Figure 2 .about Figure 7B The hardware structure can be referred to in the above. Figure 6 The descriptions of related embodiments are omitted here. In the access scheduling method provided in the embodiments of this application, the above-described S630 may include the following S631 to S633.

[0152] S631, The controller compares multiple predicted delays with delay thresholds and determines at least one predicted delay that is less than or equal to the delay threshold.

[0153] For example, at least one prediction delay determined in S631 includes: the aforementioned prediction delay 1 and prediction delay 2.

[0154] S632. The controller selects the scheduling algorithm with the highest priority among all scheduling algorithms corresponding to at least one predicted delay determined in S631 as the target scheduling algorithm.

[0155] The prediction delay corresponding to this target scheduling algorithm is the target prediction delay.

[0156] In this embodiment of the application, the target scheduling algorithm is the scheduling algorithm with the highest priority among all the scheduling algorithms corresponding to the predicted delays that are less than or equal to the delay threshold among the aforementioned multiple predicted delays.

[0157] For example, the priorities of the scheduling algorithms include: priority of the full permutation method > priority of the spatiotemporal augmented sorting method > priority of the directory bucket-based spatiotemporal augmented sorting method > priority of the access address linear sorting method. In an optional case, if the predicted delay 1 is the spatiotemporal augmented sorting method and the predicted delay 2 is the directory bucket-based spatiotemporal augmented sorting method, then the controller will use the spatiotemporal augmented sorting method as the target scheduling algorithm.

[0158] It is worth noting that the priority of the scheduling algorithm can be predefined. For example, the user can pre-configure the priorities of different scheduling algorithms in the controller. Alternatively, different priorities of different scheduling algorithms can be configured during the controller's factory setup process. Furthermore, since there are differences in hardware performance between the tape drive and the controller, the priority of the scheduling algorithm can be adjusted according to hardware performance; this application does not limit the specific implementation method of the predefined priority.

[0159] For example, for an I / O stream, the predicted latency for each method includes: full permutation method > 10000s, spatiotemporal augmented sorting method = 1s, directory bucket-based spatiotemporal augmented sorting method = 0.5s, access address linear sorting method = 0.1s, FCFS method = 10s, and the latency threshold is 5s. The methods that the controller determines satisfy the latency constraints include: spatiotemporal augmented sorting method, directory bucket-based spatiotemporal augmented sorting method, and access address linear sorting method. Therefore, based on the priorities of different methods predefined in the above embodiments, the controller selects the spatiotemporal augmented sorting method with the highest priority among those satisfying the latency constraints as the target scheduling algorithm, and determines the search domain to include: {h = 2, k = 2}, where k is the search breadth and h is the search depth. The search breadth is the number of access addresses in a single seek, and the search depth is the number of access sequences for different I / O requests in the I / O stream. This access sequence is used to determine the scheduling trajectory of the read / write head relative to the tape.

[0160] S633: The controller controls the motor to drive the magnetic tape according to the target scheduling algorithm determined in S632.

[0161] For example, the controller sends a control command to the motor, instructing the motor to drive the magnetic tape to wind up relative to the magnetic head. The winding direction can include: forward winding along the length of the tape, backward winding along the length of the tape, or winding along the width of the tape. Refer to the foregoing for information regarding the length and width directions of the magnetic tape. Figure 4 The description of that will not be repeated here.

[0162] In this embodiment, the execution latency of different scheduling algorithms is predicted based on the IO stream, and the target scheduling algorithm corresponding to the target predicted latency is selected to control the motor, enabling the motor to drive the tape to rewind and the magnetic head to access regions in the tape. This helps reduce the latency required for motor scheduling in the tape drive and improves the access efficiency of the tape drive. Since the scheduling algorithms include spatiotemporal augmented sorting methods and directory bucket-based spatiotemporal augmented sorting methods, the access order of multiple access addresses closest to the initial address can be confirmed during latency prediction. This avoids the problem of severe tape wear caused by greedy strategies that only access the access address closest to the initial address. It helps determine a better access order within the tape range corresponding to multiple access addresses closest to the initial address, improving the access scheduling performance of the tape drive and extending the lifespan of the tape.

[0163] Furthermore, in order to adapt to the processing capabilities of the tape drive equipment and the controller, the controller can first impose delay constraints on multiple predicted delays, determine one or more predicted delays that are less than or equal to the delay threshold, and select the target scheduling algorithm with the highest priority from the scheduling algorithms corresponding to these one or more predicted delays.

[0164] In other words, since the target prediction delay not only meets the delay constraint (less than or equal to the delay threshold) but also the target scheduling algorithm corresponding to the target prediction delay has a high priority, the target scheduling algorithm corresponding to the target prediction delay can determine the optimal access order under the delay constraint. This makes the target scheduling algorithm more adaptable to the access addresses corresponding to each IO request in the tape, ensuring the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor. This is beneficial to improving the delay performance and service life of the tape during its life cycle.

[0165] It is worth noting that the second and third optional implementation methods mentioned above can also be combined with each other. The target scheduling algorithm can be determined by first matching the scheduling algorithm based on the data characteristics of the IO stream and then sorting it by priority. Alternatively, the scheduling algorithms can be filtered by priority sorting and then the most suitable target scheduling algorithm can be determined based on the data characteristics of the IO stream. This application does not limit the combination of the second and third optional implementation methods.

[0166] As a feasible implementation, the above S630 will be illustrated below using the spatiotemporal augmented sorting method as the target scheduling algorithm as an example. Figure 8 As shown, Figure 8 A flowchart illustrating an access scheduling method provided in this application. Figure 3 .

[0167] Please see Figure 8 The process of the controller controlling the motor to drive the magnetic tape according to the target scheduling algorithm includes the following steps S810 to S840.

[0168] S810, the controller acquires the inherent characteristics of the magnetic tape and the seek characteristics of the tape drive equipment.

[0169] The inherent characteristics of magnetic tape include one or a combination of the following: tape length, storage capacity, and lifespan. Tape length refers to the distance between the beginning and end of the tape. Storage capacity refers to the maximum amount of data the tape can support, such as 10GB, 1 terabyte (TB), or other capacities. Tape lifespan refers to the maximum number of times the tape is allowed to come into contact with a magnetic head or other magnetic components, or the effective usage time of the tape (e.g., the time from tape manufacturing to tape becoming unusable).

[0170] The seek characteristics of a tape drive include one or a combination of the following: maximum motor speed, cruising speed, read / write speed, acceleration, deceleration, track change delay, rewind delay, and tape wear. The parameters in the seek characteristics are illustrated below.

[0171] 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.

[0172] 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.

[0173] 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.

[0174] 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.

[0175] 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.

[0176] 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, 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.

[0177] The rewind 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. In some optional cases, the rewind delay is also called the tape rewind delay, which is not limited in this application.

[0178] The degree of wear on a magnetic tape includes the number of contacts between the tape and the magnetic head.

[0179] The different parameters in the above-described seek features are merely examples provided in the embodiments of this application and should not be construed as limiting this application. In some optional implementations, the above-described seek features may include more or fewer parameters, which is not limited in this application.

[0180] The S820 controller constructs a multi-dimensional seek characteristic profile based on the number of IO requests in the IO stream, the inherent characteristics of the tape, and seek characteristics.

[0181] This multi-dimensional seek feature profile is used to determine the seek cost of tape drive equipment in multiple dimensions. Seek cost refers to the hardware wear and tear and related information about accessed data in tape drive equipment under different dimensions, such as seek latency or other parameters.

[0182] The aforementioned dimensions include two or three of the following: seek delay, tape wear, and motor wear. Seek delay is the time required for the tape to move from its current head-aligned position to its target position. Tape wear includes the number of contacts between the tape and the head. Motor wear includes the time the motor has been used (or its lifespan), or its expected remaining time (or remaining service life).

[0183] In one alternative implementation, the multidimensional pathfinding feature profile satisfies the following formula (3).

[0184] C=ω1*c seek +ω2*c abrasion +ω3*c motor ,ω1+ω2+ω3=1 Formula (3)

[0185] The descriptions of each parameter in formula (3) are shown in Table 2 below.

[0186] Table 2

[0187] parameter name describe C The Price of Seeking the Way - <![CDATA[c seek ]]> The cost of seek latency - <![CDATA[c abrasion ]]> The cost corresponding to the degree of wear and tear on magnetic tape - <![CDATA[c motor ]]> The cost corresponding to the degree of wear and tear on the motor - <![CDATA[ω1]]> Cost weighting coefficient 1 <![CDATA[c seek Cost weights <![CDATA[ω2]]> Cost weighting coefficient 2 <![CDATA[c abrasion Cost weights <![CDATA[ω3]]> Cost weighting coefficient 3 <![CDATA[c motor Cost weights

[0188] Please refer to Table 2, where C represents the pathfinding cost, c seek The cost corresponding to the seek latency, c abrasion The cost corresponding to the wear and tear of the magnetic tape, c motor The cost corresponding to the degree of wear and tear on the motor, ω1 is c seek The cost weight, ω2 is c abrasion The cost weight, ω3 is c motor Cost weights.

[0189] The following sections, in conjunction with Tables 3 to 5, will discuss c. seek c abrasion and c motor The method for determining this will be illustrated by example.

[0190] In the first feasible example, c seek It is determined based on the following information: tape seek speed, track switching delay, rewind delay, the distance the tape travels from the first address to the second address, and the time the tape travels from the first address to the second address; tape seek speed refers to the speed at which the tape moves during the rewind process, the first address is the access address in the i-th IO request, and the second address is the access address in the j-th IO request. seek It satisfies the following formula (4).

[0191]

[0192] The descriptions of each parameter in formula (4) are shown in Table 3 below.

[0193] Table 3

[0194]

[0195]

[0196] Please refer to Table 3. A key point is a location node on the magnetic tape that the magnetic head can identify during the seek process. Therefore, the distance between two adjacent key points is the minimum seek accuracy for the magnetic head to find the magnetic tape region corresponding to the access address.

[0197] In the second feasible example, c abrasionIt is determined based on the following information: the seek distance between the first address and the second address, the tape length of the access area corresponding to the second address, the number of tape rewinds, and the number of tracks separating the track containing the first address from the track containing the second address. Wherein, the first address is the access address in the i-th IO request, and the second address is the access address in the j-th IO request. abrasion It satisfies the following formula (5).

[0198] c abraston =θ*(β1*l seek +β2*l read +β3*l write +β4*cnt rewind +β5

[0199] *abs(wrap i -wrap j )) Formula (5)

[0200] The descriptions of each parameter in formula (5) are shown in Table 4 below.

[0201] Table 4

[0202] parameter name describe <![CDATA[c abrasion ]]> The cost corresponding to the degree of wear and tear on magnetic tape - <![CDATA[l seek ]]> Distance of Path The distance the magnetic tape travels from the current position of head alignment to the target position. <![CDATA[l read ]]> Reading distance Tape length for reading data segments <![CDATA[l write ]]> Tape write speed / bandwidth Tape length for writing data segments <![CDATA[cnt rewind ]]> Tape rewind time Number of times the tape can be rewound <![CDATA[wrap i ]]> - The i-th wrap <![CDATA[wrap j ]]> - The jth wrap <![CDATA[β1]]> proportionality factor 1 Weights corresponding to seek distance in magnetic tape <![CDATA[β2]]> proportionality factor 2 Weight corresponding to the tape length for reading data <![CDATA[β3]]> Scale factor 3 Weight corresponding to the length of the tape used for writing data <![CDATA[β4]]> Scale factor 4 Weight corresponding to the number of rewinds <![CDATA[β5]]> Scale factor 5 Weight corresponding to the number of track intervals θ magnetic tape wear coefficient

[0203] Please refer to Table 4, abs(wrap) i -wrap j ) refers to the number of wraps between the i-th wrap and the j-th wrap. Where, wrap i It refers to the wrap sequence number corresponding to the access address in the i-th IO request. j It refers to the wrap sequence number corresponding to the access address in the j-th IO request.

[0204] In the third feasible example, c motor It is determined based on the following information: the number of times the motor starts and the duration of operation. motor It satisfies the following formula (6).

[0205] c motor =max(c motorStartup ,c motorRuntime ) = max(α1*startup count ,α2*move) formula (6)

[0206] The descriptions of each parameter in formula (5) are shown in Table 5 below.

[0207] Table 5

[0208] parameter name describe <![CDATA[c motor ]]> The cost corresponding to the degree of wear and tear on the motor - <![CDATA[c motorStartup ]]> magnetic tape motor start-stop life - <![CDATA[c motorRuntime ]]> magnetic tape motor service life - <![CDATA[startup count ]]> Number of motor starts move Motor running distance <![CDATA[α1]]> Motor weighting coefficient 1 The weight of the number of motor starts <![CDATA[α2]]> Motor weighting factor 2 Weight of motor operating distance

[0209] The methods for determining seek costs shown in Tables 2 to 5 above are merely feasible examples provided by the embodiments of this application and should not be construed as limiting this application. Depending on the degree of hardware performance degradation in the tape drive device, different parameters or weights can be adjusted or other parameters can be added to determine the seek cost, which will not be elaborated here.

[0210] Please continue reading. Figure 8 The controller controls the process of the motor driving the tape according to the target scheduling algorithm, and also includes the following S830 and S840.

[0211] The S830 controller obtains multiple seek costs corresponding to the IO stream based on the multi-dimensional seek feature profile and search domain.

[0212] Wherein, the search breadth (k) is the number of addresses accessed in a single search.

[0213] For multiple seek costs, one seek cost corresponds to an access order of multiple I / O requests, which corresponds to the scheduling / movement trajectory of the magnetic head relative to the tape. In the embodiments of this application, the number of seek costs obtained by the I / O stream under the spatiotemporal augmented sorting method is the search depth (h).

[0214] In the embodiments of this application, the search breadth (k) and search depth (h) above determine the size of the search domain in the seek process. The search domain is also referred to as the initial address of the head alignment, the spatiotemporal domain corresponding to the current position of the head, the neighborhood domain, or other names, etc., and this application does not limit the specific name used for it.

[0215] The following example illustrates how an access address in an I / O request corresponds to a data segment on a magnetic tape: For an I / O request r currently being accessed... i (i.e., the i-th IO request) selects the k data segments N with the minimum tape relocation cost under a search breadth k. k ={f1′,f2′,…,f k The seek cost corresponding to these k data segments is C′={c1′,c2′,…,c′}. k At this point, the search depth is h = 1, with N... k Based on this, a breadth-of-k search is performed to obtain k*k costs, which can update the cost function C′. This process is iterated and the costs are updated until the search depth is h. The request corresponding to the minimum cost function is taken as the next I / O request, such as the I / O request r corresponding to the access address of the j-th data segment in the I / O stream. j (i.e., the j-th I / O request). In an alternative implementation, the read / write head can access other I / O requests while accessing the i-th and j-th data segments.

[0216] The S840 controller controls the motor to drive the magnetic tape according to the access order corresponding to the minimum seek cost among multiple seek costs.

[0217] For example, the process of determining the minimum seek cost required from the i-th data segment to the j-th data segment can refer to the following formula (7).

[0218]

[0219] in, Let C′ be the minimum seek cost required to move from the i-th data segment to the j-th data segment, S be the search range (determined based on the search breadth k and search depth h), and R be the search cost function. rest This represents the range of unsearched data segments on the tape.

[0220] In some optional scenarios, the access scheduling within the magnetic tape is based on the data segment corresponding to a single access address. However, reading adjacent data segments with close intervals can cause frequent acceleration and deceleration of the motor, which in turn affects the track seek and head reading strategies. Therefore, in determining the seek cost, continuous reading or interval reading can be considered as a factor in the determination process. The comparison process of seek costs for continuous reading and interval reading can be referred to the following formula (8).

[0221]

[0222] Where, c′ ij For the seek cost benefit of continuous reads, c ij For the seek cost of intermittent reads, The seek cost for consecutive reads between the i-th and j-th data segments, wrap i =wrap j This refers to the i-th data segment and the j-th data segment being located in the same wrap on the magnetic tape.

[0223] In the embodiments of this application, when the seek cost of continuous read is smaller, the continuous read method is given priority to access different IO requests in the IO stream, which helps to reduce the seek cost of the tape drive and improve the access performance of the tape drive.

[0224] The following diagram illustrates the differences between continuous reading and spaced reading. Figure 9 The comparison diagram of continuous reads and interval reads provided in this application is shown in... Figure 9 In the intermittent reading scenario: the motor needs to accelerate and then decelerate between the i-th data segment and the j-th data segment, which causes significant wear on the motor and increases the seek cost.

[0225] exist Figure 9In continuous reading scenarios, during the process of driving the magnetic tape to rewind, the speed of the motor in the i-th and j-th data segments is the motor's read / write speed. Furthermore, the seek speed between the i-th and j-th data segments is consistent with the motor's read / write speed. That is, the motor runs at a constant speed from the beginning of the i-th data segment to the end of the j-th data segment. This results in less wear on the motor and lower seek costs.

[0226] In one optional implementation, the spatiotemporal augmented sorting method includes: a spatiotemporal proximity sorting method and an MPSCAN method. The spatiotemporal proximity sorting method is used to determine the first sub-access order with the shortest seek distance among multiple access addresses closest to the initial address. The MPSCAN method is used to determine the second sub-access order with the minimum rewind delay and track-changing delay among multiple access addresses closest to the initial address. The access order corresponding to the minimum seek cost mentioned above is either the first sub-access order or the second sub-access order. The following section combines... Figure 10 An example is provided to illustrate the spatiotemporal augmented sorting method. Figure 10 A flowchart illustrating an access scheduling method provided in this application. Figure 4 Please see. Figure 10 The access scheduling method provided in this application includes the following steps S1001 to S1022.

[0227] S1001, The controller receives batch I / O requests from the magnetic tape, i.e., I / O streams.

[0228] S1002, The controller calculates the predicted latency of the IO stream under different scheduling algorithms.

[0229] For the specific implementation of S1001 and S1002, please refer to the description of S610 and S620 above, which will not be repeated here.

[0230] S1003. The controller determines whether the prediction delay of the full permutation method is less than or equal to the delay threshold.

[0231] If the prediction delay of the full permutation method is less than or equal to the delay threshold, then execute S1004; if the prediction delay of the full permutation method is greater than the delay threshold, then execute S1008.

[0232] S1004. The controller determines the order of all IO requests based on the full permutation method.

[0233] S1005, The controller calculates the seek cost function for each permutation order among all permutation orders determined in S1004.

[0234] S1006, The controller selects the order of seek costs with the lowest possible seek cost.

[0235] S1007. The controller estimates the seek cost function 1 based on the order of seek costs selected by S1006 with the minimum seek cost.

[0236] S1008. The controller determines whether the prediction delay of the spatiotemporal augmented sorting method is less than or equal to the delay threshold.

[0237] If the prediction delay of the spatiotemporal augmented ranking method is less than or equal to the delay threshold, then execute S1009; if the prediction delay of the spatiotemporal augmented ranking method is greater than the delay threshold, then execute S1014.

[0238] S1009, The controller executes the spatial proximity sorting method.

[0239] S1010, The controller estimates the seek cost function 2 based on the arrangement order determined by the spatiotemporal proximity sorting method.

[0240] In this embodiment, the arrangement order determined by the controller according to the spatiotemporal proximity sorting method includes: a first sub-access order of multiple access addresses closest to the initial address of the read / write head and with the shortest seek distance. For example, the spatiotemporal proximity sorting method is similar to the greedy strategy in that both can find the access address with the shortest seek distance from the initial address; however, the spatiotemporal proximity sorting method differs from the greedy strategy in that the greedy strategy can only find one access address with the shortest seek distance from the initial address, while the spatiotemporal proximity sorting method can find multiple access addresses adjacent to the initial address.

[0241] S1011, The controller executes the MPSCAN method.

[0242] S1012. The controller estimates the seek cost function 3 based on the arrangement order determined by the MPSCAN method.

[0243] In this embodiment, the arrangement order determined by the controller according to the MPSCAN method includes: a second sub-access order that is closest to the initial address of the read / write head and has the smallest rewind delay and lane-changing delay of the motor. For example, the MPSCAN method is similar to the elevator scheduling algorithm in that both can find the access address with the smallest rewind delay and lane-changing delay of the motor; however, the MPSCAN method differs from the elevator scheduling algorithm in that the elevator scheduling algorithm can only find one access address with the smallest rewind delay and lane-changing delay, while the MPSCAN method can find multiple access addresses with the smallest rewind delay and lane-changing delay that are also adjacent to the initial address.

[0244] S1013. The controller compares seek cost function 2 and seek cost function 3 and selects the order in which the seek cost is smaller.

[0245] S1014. The controller determines whether the prediction delay of the directory bucket-based spatiotemporal augmented sorting method is less than or equal to the delay threshold.

[0246] If the prediction delay of the directory bucket-based spatiotemporal augmented sorting method is less than or equal to the delay threshold, then execute S1015; if the prediction delay of the directory bucket-based spatiotemporal augmented sorting method is greater than the delay threshold, then execute S1017.

[0247] S1015, The controller executes granular buckets according to the filename directory corresponding to the batch IO request.

[0248] In this context, granular bucketing refers to the controller dividing the data into buckets based on the filename directories of different I / O requests. A bucket contains multiple I / O requests with the same filename directories, and the data in the I / O requests contained in different buckets can be the same or different. For example, multiple I / O requests in an I / O stream are sorted using a nearest neighbor recommendation method, with a latency threshold of 0.5s for the access scheduling method. The controller calculates the sorting time of the I / O stream, and only the spatiotemporal augmented sorting method based on directory buckets and the linear sorting method based on access addresses meet the latency constraint (predicted latency ≤ 0.5s). Therefore, the spatiotemporal augmented sorting method based on directory buckets is selected first. The controller clusters the filename directories of the data corresponding to multiple I / O requests, grouping similar or identical directories into one category, forming multiple batches of data of a fixed size (such as 2000 or other values). The spatiotemporal augmented sorting method is executed on each batch of data, and the sorted results are concatenated to form the final result, i.e., the access order of the magnetic head on the tape.

[0249] S1016. After the controller performs granular bucket operation on the file name in S1015, the controller determines the order of IO requests corresponding to different buckets and estimates the seek cost function 4.

[0250] S1017, The controller executes the linear sorting method for access addresses.

[0251] Three optional examples are provided below for the process of the controller executing the linear sorting method for access addresses.

[0252] In the first optional example, if the access address in the IO request is a physical address, the controller sorts the access addresses in the IO request (ascending or descending order) and determines the order of each IO request according to the sorting result.

[0253] In the second optional example, if the access address in the I / O request is a virtual address, the controller sorts the virtual addresses in the I / O requests (ascending or descending order) and determines the order of the I / O requests according to the sorting result. During the actual access process of the tape drive, the processor in the tape drive needs to translate the virtual address in the I / O request into a physical address, and the processor in the tape drive controls the motor and read / write head to access the tape based on the physical address.

[0254] In the third optional example, if the access address in the IO request is a virtual address, the controller performs address translation on the access address in the IO request, determines the physical address corresponding to each IO request, sorts the IO requests based on their physical addresses (ascending or descending order), and determines the order of the IO requests according to the sorting result.

[0255] The above three optional examples are merely feasible ways of using the linear sorting method of access addresses provided in the embodiments of this application, and should not be construed as limiting this application.

[0256] S1018. The controller estimates the seek cost function 5 based on the arrangement order determined by the linear sorting method of access addresses.

[0257] As an optional implementation, after S1003, S1008 or S1014 above, the access scheduling method provided in this application embodiment also includes the following S1019 and S1020.

[0258] S1019. The controller determines the target scheduling algorithm from the scheduling algorithms corresponding to all predicted delays that are less than or equal to the delay threshold from multiple predicted delays, based on the data characteristics of the IO stream.

[0259] The method for determining the data characteristics of the IO stream can refer to the second optional implementation method provided by S630 mentioned above, which will not be elaborated here.

[0260] S1020: The controller estimates the seek cost function 6 based on the target scheduling algorithm determined in S1019.

[0261] The seek cost functions 1 predicted by S1007, 2 predicted by S1010, 3 predicted by S1013, 4 predicted by S1016, 5 predicted by S1018, and 6 predicted by S1020 can be determined by the aforementioned formulas (1), (3) to (8), and will not be repeated here.

[0262] Following S1007, S1013, S1016, S1018 or S1020 above, the access scheduling method provided in this application embodiment further includes S1021 and S1022 below.

[0263] S1021. The controller feeds back the determined arrangement order to the host for processing and receives the sorted result returned by the host, such as the result of selecting the seek cost corresponding to multiple arrangement orders.

[0264] S1022. The controller controls the motor according to the sorting result, so that the motor drives the magnetic tape and the magnetic head accesses the magnetic tape.

[0265] It is worth noting that, in Figure 10 In this process, S1019 and S1020 are executed after comparing the predicted delay and delay threshold of different scheduling algorithms. However, in some feasible cases, S1019 and S1020 may also be executed before S1003. This application does not limit this.

[0266] In the access scheduling method provided in this application embodiment, the controller can also update and optimize the latency prediction model based on the access scheduling of the IO stream. Please refer to [link to relevant documentation]. Figure 11 , Figure 11 A flowchart illustrating an access scheduling method provided in this application. Figure 5 In the above Figures 6 to 10 Based on this, the access scheduling method provided in the embodiments of this application further includes the following S1110 and S1120.

[0267] S1110, The controller obtains the execution delay of the target scheduling algorithm in the tape drive device.

[0268] For example, the tape drive accesses multiple I / O requests in the I / O stream according to the access order corresponding to the target scheduling algorithm, and the time when the tape drive receives the I / O stream and the time when it reports the access order of the I / O stream are used as the execution latency of the target scheduling algorithm. In some optional cases, the execution latency of the target scheduling algorithm is also called the execution time of the target scheduling algorithm, the actual execution time, the real execution time, the actual execution latency, the actual execution latency, the access scheduling latency, the computation latency, or other names.

[0269] S1120. The controller updates the latency prediction model based on the execution latency and the target prediction latency, and obtains the updated latency prediction model.

[0270] For example, the controller obtains the latency difference between the execution latency and the target predicted latency, uses this latency difference as input to a heuristic strategy, and updates the latency prediction model to obtain the updated latency prediction model. The heuristic strategy includes one or more of the following combinations: genetic algorithm, ant colony algorithm, and simulated annealing algorithm.

[0271] Genetic Algorithm: For an optimization problem, a certain number of candidate solutions (called individuals) can be abstractly represented as chromosomes, allowing a population containing all individuals to evolve towards better solutions. The solutions of a genetic algorithm are represented in binary (i.e., strings of 0s and 1s), but other representations are also possible. Evolution begins with a population (dataset) of completely random individuals (single data points) and proceeds generation by generation. In each generation, the fitness of the entire population is evaluated, and several individuals are randomly selected from the current population (based on their fitness). Through natural selection and mutation, a new population of life is generated, which becomes the current population in the next iteration of the genetic algorithm.

[0272] Ant colony optimization (ACO) is a probabilistic algorithm used to find optimal paths in a graph. It is inspired by the path-finding behavior of ants searching for food. This algorithm features distributed computation, positive feedback, and heuristic search, and is essentially a heuristic global optimization algorithm within evolutionary algorithms.

[0273] Simulated annealing is a general probabilistic algorithm that approximates the global optimum of a given function. Specifically, it is a metaheuristic algorithm often used to find an approximate global optimum within a large search space in a given time. When there are many local optima, simulated annealing can find the global optimum.

[0274] For more details on the aforementioned genetic algorithms, ant colony algorithms, and simulated annealing algorithms, please refer to the description of general techniques, which will not be elaborated upon here. In some feasible implementations, the training or optimization methods of the latency prediction model can also employ other types of heuristic optimization strategies, which are not limited in this application.

[0275] In this embodiment, the controller calculates the execution delay of the target scheduling algorithm during the access scheduling process of the tape drive device, and updates the delay prediction model based on the execution delay and the predicted delay of the access scheduling process. This allows the updated delay prediction model to have better adaptability to different tape motors and tape motors in different degradation states during their life cycle, ensuring delay prediction accuracy and scheduling performance, and improving delay performance throughout the tape life cycle.

[0276] above Figures 6 to 11 The provided access scheduling method is only a feasible approach provided by the embodiments of this application. The following is in conjunction with... Figure 5The software framework shown represents a set of in-disk I / O requests R = {r1, r2, r3, r4, ..., r...} n The access scheduling process of} will be illustrated with an example. Figure 12 A flowchart illustrating an access scheduling method provided in this application. Figure 6 Suppose there is a batch of disk I / O requests R = {r1, r2, r3, r4, ..., r...} n The starting position of the data segment corresponding to the access address in each I / O request is S = {1, 6, 9, 10, ..., s}. n The end position of the data segment corresponding to the access address in each I / O request is E = {2, 7, 10, 11, ..., e}. n The nearest neighbor recommendation method is used to sort this batch of IO scheduling requests, and the execution time (predicted latency) of the access scheduling method is required to be no more than 5 seconds (latency threshold is 5 seconds).

[0277] Please see Figure 12 The access scheduling method provided in this application includes the following steps S1210 to S1260.

[0278] S1210 The controller calculates the predicted latency of different scheduling algorithms based on computing resources, method complexity, number of requests, and scenario complexity.

[0279] For example, the prediction latency for the full permutation method is >10000s, the prediction latency for the spatiotemporal augmented sorting method is 1s, the prediction latency for the directory bucket-based spatiotemporal augmented sorting method is 0.5s, and the prediction latency for the access address linear sorting method is 0.1s. It is found that the spatiotemporal augmented sorting method meets the time constraint requirements, and the range of the search domain (or spatiotemporal domain) is obtained as {h=2,k=2}, where h is the search depth and k is the search breadth.

[0280] S1220, Search within the search domain at the head position.

[0281] For example, assuming the current head r0 is aligned to position s0 = 7, the features of the head position (s0 = 7) and the features of the data segment positions corresponding to the access addresses in the unsorted I / O requests are input into the multi-dimensional seek feature profile in the spatiotemporal augmented sorting module 200a to obtain the cost C = {6, 1, 2, 3, ...} of moving the head to different data segments. Then, the top k data segments {r2, r3} with the lowest cost are searched among the access addresses corresponding to all unsorted I / O requests.

[0282] S1230, Determine multiple candidate paths for the head position within the search domain.

[0283] For example, starting with requests r2 and r3, the spatiotemporal augmented sorting module 200a sequentially calculates the top k data segments {r3,r4} and {r4,r2} in the remaining unsorted data segments, forming a total of four candidate paths {r0→r2→r3,r0→r2→r4,r0→r3→r4,r0→r3→r2}.

[0284] S1240. Determine the path with the minimum seeking cost from multiple candidate paths.

[0285] For example, the spatiotemporal augmented sorting module 200a, based on the multi-dimensional pathfinding feature profile, calculates the path with the lowest cost among the four paths determined in S1130 as {r0→r3→r4}, with a cost of c′=3. Therefore, the next data segment r3 after r0 is selected (using the nearest neighbor algorithm would select the path {r0→r2→r3}, with a cost of c′=4, which is higher than the latency of the spatiotemporal augmented sorting method).

[0286] S1250, Delay Prediction Model Update.

[0287] For example, in iterations S1220 to S1240, the execution delay (or execution time) of the spatiotemporal augmented sorting method is recorded as 2 seconds, and this execution delay is used to update the delay prediction model. The update process for the delay prediction model can be referred to the foregoing. Figure 11 The description of that will not be repeated here.

[0288] S1260, Send the access sequence corresponding to the path with the lowest seek cost.

[0289] The multi-dimensional seek feature profiling module is used to calculate the overall access latency and send the access sequence corresponding to the path with the minimum seek cost to the tape drive device: {r0→r3→r4→r2→r1→…}.

[0290] In summary, the embodiments of this application comprehensively consider factors such as computational resource overhead and scenario complexity (number of I / O requests, inherent characteristics of tape drive devices, and seek characteristics), ensuring the availability and implementation conditions of the embodiments under limited resources. The embodiments of this application employ a dynamic adaptive scenario adaptation method, which can dynamically adapt to different complex scenarios, giving the embodiments of this application generalizability to different scenarios. Using the access scheduling method provided by the embodiments of this application, in practical application scenarios, tape read latency is reduced by 40% and tape wear is reduced by 30%. Moreover, the access scheduling method given by the embodiments of this application outperforms the scheduling methods provided by conventional technologies and can adaptively select the optimal algorithm, effectively reducing latency and tape wear during tape read and write processes.

[0291] It is understood that, in order to achieve the functions described in the above embodiments, the tape drive device, processor, or controller includes hardware structures and / or software modules corresponding to the execution of 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.

[0292] The above text combines Figures 1 to 12 The following describes in detail the access scheduling method provided according to the embodiments of this application, in conjunction with... Figure 13 The controller provided in the embodiments of this application will be described by way of example.

[0293] Figure 13 The schematic diagram of the controller provided in this application shows that the controller 1300 includes a memory 1310 and at least one processor 1320. The processor 1320 can implement the access scheduling method provided in the above embodiments, and the memory 1310 is used to store the software instructions corresponding to the access scheduling method. As an optional implementation, in hardware implementation, the controller 1300 can refer to a chip or chip system that encapsulates one or more processors 1320. For example, when the controller 1300 is used to implement the method steps in the above embodiments, the processor 1320 included in the controller 1300 executes the controller steps and possible sub-steps in the above method. In an optional case, the controller 1300 may also include a communication interface 1330, which can be used to send and receive data. For example, the communication interface 1330 is used to receive IO requests or send IO responses, etc.; the communication interface 1330 can be implemented through the interface circuit included in the controller 1300. Therefore, in some examples, the communication interface 1330 can also be called the transceiver of the controller. In the embodiments of this application, the communication interface 1330, processor 1320, and memory 1310 can be connected via a bus 1340, which can be divided into an address bus, a data bus, a control bus, etc. The bus 1340 can be a 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.

[0294] The controller 1300 provided in this embodiment may be the processor 240 or control unit 1225, or other devices with access scheduling functions, and this application does not limit it in this regard. For example, when other processing devices in the tape drive also have access scheduling functions, the controller 1300 may refer to the aforementioned drive frame or other processing devices in the tape drive.

[0295] This application also provides a storage system. The storage system includes a communication interface, a 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 (such as I / O requests), and the controller is used to manage target tape drive devices in the storage system according to data access requests (such as I / O read requests or I / O 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.

[0296] 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.

[0297] 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.

[0298] 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).

[0299] 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 access scheduling method, characterized in that, The method is applied to a magnetic tape drive, the magnetic tape drive comprising: a magnetic head, a magnetic tape, and a motor, the method comprising: Obtain an IO stream, wherein the IO stream includes multiple IO requests, and the IO requests include access addresses; Based on the IO stream and the initial address of the head alignment in the magnetic tape, multiple predicted delays for various scheduling algorithms are obtained; One scheduling algorithm corresponds to one predicted latency, and the scheduling algorithm includes one or more of the following combinations: full permutation method, spatiotemporal augmented sorting method, directory bucket-based spatiotemporal augmented sorting method, and access address linear sorting method; the spatiotemporal augmented sorting method is used to determine the first access order of multiple access addresses closest to the initial address, and the directory bucket-based spatiotemporal augmented sorting method is used to determine the second access order of multiple access addresses closest to the initial address. The predicted delay less than or equal to the delay threshold among the multiple predicted delays is taken as the target predicted delay, and the motor is controlled to drive the magnetic tape according to the target scheduling algorithm corresponding to the target predicted delay, so that the magnetic head accesses the magnetic tape according to the access address of different IO requests among the multiple IO requests.

2. The method according to claim 1, characterized in that, The target scheduling algorithm is: among the scheduling algorithms corresponding to all predicted delays that are less than or equal to the delay threshold among the multiple predicted delays, the scheduling algorithm is determined based on the data characteristics of the IO stream; The data features include one or a combination of the following: the number of IO requests in the IO stream, the probability that the access addresses included in any two IO requests among the multiple IO requests overlap along the length direction of the tape, and the distribution characteristics of the access addresses included in different IO requests in the tape.

3. The method according to claim 1 or 2, characterized in that, The target scheduling algorithm is the scheduling algorithm with the highest priority among all the scheduling algorithms corresponding to the predicted delays that are less than or equal to the delay threshold among the multiple predicted delays. The priority of the scheduling algorithm satisfies the following formula: The priority of the full permutation method is greater than the priority of the spatiotemporal augmented sorting method, which is greater than the priority of the directory bucket-based spatiotemporal augmented sorting method, which is greater than the priority of the access address linear sorting method.

4. The method according to any one of claims 1-3, characterized in that, If the target scheduling algorithm is a spatiotemporal augmented sorting method, the step of controlling the motor to drive the magnetic tape according to the selected target scheduling algorithm includes: Obtain the inherent characteristics of the magnetic tape and the seek characteristics of the magnetic tape drive; The inherent characteristics of the magnetic tape include one or more of the following combinations: the length, storage capacity, and lifespan of the magnetic tape; the track seeking characteristics include one or more of the following combinations: the maximum speed of the motor, cruising speed, read / write speed, acceleration, deceleration, track switching delay, rewind delay, and the wear degree of the magnetic tape; Based on the number of IO requests in the IO stream, the inherent characteristics of the tape, and the seek characteristics, a multi-dimensional seek characteristic profile is constructed. The multi-dimensional seek characteristic profile is used to determine the seek cost of the tape drive in multiple dimensions. The multiple dimensions include two or three of the following: seek latency, tape wear, and motor wear. Based on the multidimensional seek feature profile and the search breadth of the spatiotemporal augmented sorting method, multiple seek costs corresponding to the IO stream are obtained; the search breadth is the number of access addresses in a single seek, and one seek cost corresponds to an access order of the multiple IO requests. The motor is controlled to drive the magnetic tape according to the access order corresponding to the minimum seek cost among the multiple seek costs.

5. The method according to claim 4, characterized in that, The access order corresponding to the minimum seek cost is either continuous read or intermittent read.

6. The method according to claim 4, characterized in that, The spatiotemporal augmented sorting method includes a spatiotemporal proximity sorting method and an MPSCAN method. The spatiotemporal proximity sorting method is used to determine the first sub-access order with the shortest seek distance among the multiple access addresses closest to the initial address. The MPSCAN method is used to determine the second sub-access order with the minimum rewind delay and lane change delay of the motor among the multiple access addresses closest to the initial address. The access order corresponding to the minimum seek cost is either the first sub-access order or the second sub-access order.

7. The method according to any one of claims 4-6, characterized in that, The multi-dimensional tracking feature profile satisfies the following formula: C=ω1*c seek +ω2*c abrasion +ω3*c motor ,ω1+ω2+ω3=1 Where C is the pathfinding cost, c seek The cost corresponding to the seek latency, c abrasion The cost corresponding to the wear and tear of the magnetic tape, c motor The cost corresponding to the degree of wear and tear on the motor, ω1 is c seek The cost weight, ω2 is c abrasion The cost weight, ω3 is c motor Cost weights.

8. The method according to claim 7, characterized in that, The c seek It is determined based on the following information: tape seek speed, track switching delay, rewind delay, the distance the tape travels from the first address to the second address, and the time the tape takes to travel from the first address to the second address; The c abrasion It is determined based on the following information: the seek distance between the first address and the second address, the tape length, the tape length of the access area corresponding to the second address, the number of rewinds of the tape, and the number of tracks between the track where the first address is located and the track where the second address is located; The c motor It is determined based on the following information: the number of times the motor is started and the duration of operation.

9. The method according to any one of claims 1-8, characterized in that, The predicted latency of different scheduling algorithms is determined by a latency prediction model, and the method further includes: Obtain the execution delay of the target scheduling algorithm; The latency prediction model is updated based on the execution latency and the target prediction latency to obtain the updated latency prediction model.

10. The method according to claim 9, characterized in that, The step of updating the latency prediction model based on the execution latency and the target prediction latency to obtain the updated latency prediction model includes: Obtain the latency difference between the execution latency and the target prediction latency; The latency difference is used as input to a heuristic strategy to update the latency prediction model, resulting in an updated latency prediction model. The heuristic strategy includes one or more of the following combinations: genetic algorithm, ant colony algorithm, and simulated annealing algorithm.

11. The method according to any one of claims 1-10, characterized in that, The tape drive device further includes a processor, and the method is executed by the processor; Alternatively, the tape drive is connected to a controller, and the method is performed by the controller.

12. A controller, characterized in that, The controller is applied to a magnetic tape drive, which includes a magnetic head, a magnetic tape, and a motor. The magnetic tape is used to store data. The controller includes: A transceiver is used to acquire an IO stream, the IO stream including multiple IO requests, the IO requests including access addresses; The processor is configured to: obtain multiple predicted delays for various scheduling algorithms based on the IO stream and the initial address of the head alignment in the magnetic tape; One scheduling algorithm corresponds to one predicted latency, and the scheduling algorithm includes one or more of the following combinations: full permutation method, spatiotemporal augmented sorting method, directory bucket-based spatiotemporal augmented sorting method, and access address linear sorting method; the spatiotemporal augmented sorting method is used to determine the first access order of multiple access addresses closest to the initial address, and the directory bucket-based spatiotemporal augmented sorting method is used to determine the second access order of multiple access addresses closest to the initial address. The processor is further configured to: take the predicted delay less than or equal to the delay threshold among the plurality of predicted delays as the target predicted delay, and control the motor to drive the magnetic tape according to the target scheduling algorithm corresponding to the target predicted delay, so that the magnetic head accesses the magnetic tape according to the access address of different IO requests among the plurality of IO requests.

13. A magnetic tape drive device, characterized in that, include: magnetic tape, used for storing data; A magnetic head, used to access the magnetic tape; A magnetic tape drive, including a motor, for driving the magnetic tape; And a controller, configured to acquire an I / O stream and execute the method of any one of claims 1-11 based on the I / O stream.

14. A storage system, characterized in that, The storage system includes a controller and one or more magnetic tape drives; The controller is configured to manage a target tape drive device among the one or more tape drive devices, and the controller is configured to acquire an I / O stream and perform the method of any one of claims 1-11 based on the I / O stream.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions; when the computer instructions are executed in an electronic device, the electronic device performs the method of any one of claims 1-11.

16. A computer program product, characterized in that, When the computer program product is run on an electronic device, the electronic device performs the method according to any one of claims 1-11.