CD driver distribution method and device, storage medium and program product

By calculating the used duration and data reading and writing requirements of the optical drive, and determining the target optical drive, the problem of unbalanced usage duration of the optical drive in the optical storage system is solved, and the system performance and data reading and writing accuracy are improved.

CN120428908APending Publication Date: 2025-08-05HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410160242.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-04
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In optical storage systems, the uneven usage time of the optical drive in the prior art leads to premature damage to the hot spot optical drive, affecting the system performance.

Method used

By obtaining the used duration of the optical drive and the data read and write requirements, calculate the usage duration of the optical drive, determine the target optical drive to balance the usage duration of the optical drive, and avoid the occurrence of hot-spot optical drives.

Benefits of technology

It realizes balanced allocation of optical drive usage time, avoids premature damage to hot spot optical drives, and improves system performance and data reading and writing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428908A_ABST
    Figure CN120428908A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an optical drive allocation method and device, a storage medium and a program product, relates to the technical field of data storage, realizes balanced allocation of used duration among a plurality of optical drives, avoids the occurrence of hot-spot optical drives which are damaged too early, and improves the performance and reliability of a system. The method comprises the steps that a data read-write request is obtained, the data read-write request comprises the size of first data, and the first data are data needing to be read and written by a CD driver; according to the size of the first data and the bandwidth of read-write data of the CD-ROM, determining the CD-ROM use duration required for reading and writing the first data; and determining a target CD driver from the at least two CD drivers according to the respective used durations of the at least two CD drivers and the CD driver use duration, the target CD driver being the CD driver allocated for reading and writing the first data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage technology, and in particular to an optical drive allocation method, device, storage medium, and program product. Background Art

[0002] With the development of the internet, data growth is accelerating, placing high demands on storage systems. Optical storage systems, which use optical discs as storage media, offer a highly cost-effective storage solution. These systems typically consist of a management server and an optical disc cabinet. These systems typically include multiple optical disc magazines and optical drives to achieve superior read and write performance.

[0003] Currently, when allocating a target optical drive from multiple idle optical drives to perform data reading and writing tasks, random allocation is often adopted. This allocation method will result in uneven allocation times for each optical drive, which may cause the hot optical drive to be quickly damaged, thereby affecting the performance of the optical storage system. Summary of the Invention

[0004] The embodiments of the present application provide an optical drive allocation method, device, storage medium and program product, which can determine the target optical drive to read and write data based on the usage time of the optical drive and the time required for the optical drive to read and write the data, so that the target optical drives allocated to the data that needs to be read and written by the optical drive each time will not be concentrated on a certain optical drive or several optical drives, thereby avoiding the problem of a certain optical drive or several optical drives becoming hot optical drives, and the problem of hot optical drives being quickly damaged due to the rapid expiration of their service life due to the usage time. In this way, the usage time of each optical drive is made as balanced as possible, avoiding frequent replacement of optical drives that have reached the end of their service life, thereby improving the performance of the optical storage system.

[0005] In a first aspect, an embodiment of the present application provides an optical drive allocation method, the method comprising: obtaining a data read and write request, the data read and write request including the size of first data, the first data being data that needs to be read and written by the optical drive; determining the optical drive usage time required to read and write the first data based on the size of the first data and the bandwidth of the optical drive for reading and writing data; determining a target optical drive from at least two optical drives based on the respective usage time of at least two optical drives and the optical drive usage time, the target optical drive being the optical drive allocated for reading and writing the first data.

[0006] It can be understood that by determining the target optical drive for reading and writing the first data based on the respective usage time of at least two optical drives and the calculated optical drive usage time, the usage time of multiple optical drives can be kept balanced, and premature damage of hot spot optical drives can be avoided, thereby improving system performance.

[0007] In one possible implementation, a target optical drive is determined from at least two optical drives based on the respective usage time of the at least two optical drives and the optical drive usage time, including: determining an estimated usage time of each of the at least two optical drives, where the estimated usage time is the sum of the usage time and the optical drive usage time; and determining the target optical drive from at least two optical drives according to the respective estimated usage time of the at least two optical drives.

[0008] It can be understood that by calculating the estimated usage time of each of at least two optical drives, the accuracy of evenly distributing the usage time of multiple optical drives can be improved.

[0009] In one possible implementation, a target optical drive is determined from at least two optical drives according to the respective estimated usage times of the at least two optical drives, including: determining the shortest estimated usage time from the respective estimated usage times of the at least two optical drives; and determining the optical drive corresponding to the shortest estimated usage time as the target optical drive.

[0010] It can be understood that by determining the optical drive corresponding to the shortest expected usage time as the target optical drive, the gap between the usage time of the optical drive and the usage time of other optical drives can be shortened, the emergence of hot spots can be avoided, and the usage time of multiple optical drives can be more balanced.

[0011] In one possible implementation, a target optical drive is determined from at least two optical drives according to their respective estimated usage times, including: if a first type of optical drive exists, the optical drive of the first type that is estimated to have the longest usage time is determined as the target optical drive; wherein the first type of optical drive refers to an optical drive whose usage time is not less than a first usage time threshold and whose estimated usage time is not greater than a second usage time threshold; the first usage time threshold and the second usage time threshold are both pre-set, and the first usage time threshold is not greater than the second usage time threshold.

[0012] It can be understood that by presetting the first usage time threshold and the second usage time threshold, it is possible to accurately determine whether a first type of optical drive exists among multiple optical drives, and by determining the optical drive of the first type of optical drive with the longest estimated usage time as the target optical drive, the usage time of the first type of optical drive is increased within a controllable range, thereby avoiding the situation where a large number of optical drives are damaged in a concentrated manner, and ensuring the smooth progress of data reading and other services.

[0013] In one possible implementation, a target optical drive is determined from at least two optical drives according to the estimated usage time of each of the at least two optical drives, including: if a second type of optical drive exists, the target optical drive is determined from the at least two optical drives excluding the second type of optical drive; wherein the second type of optical drive refers to an optical drive whose estimated usage time is greater than a second usage time threshold.

[0014] It can be understood that avoiding determining an optical drive whose estimated usage time is greater than the second usage time threshold as the target optical drive can avoid the situation where the optical drive reaches its service life during data reading and writing and generates too many bit errors, thereby improving the accuracy of data reading and writing and ensuring the quality of data reading and writing.

[0015] In one possible implementation, determining a target optical drive from at least two optical drives according to their respective estimated usage times includes determining an optical drive whose respective estimated usage times of the at least two optical drives are less than or equal to a specified time threshold as the target optical drive.

[0016] It can be understood that by determining the optical drive whose estimated usage time is less than or equal to the specified time threshold as the target optical drive, it is possible to achieve balanced allocation of optical drives whose estimated usage time is not greater than the specified time threshold, thereby improving the flexibility and precision in balanced allocation of optical drive usage time.

[0017] In one possible implementation, a target optical drive is determined from at least two optical drives based on the respective usage times of the at least two optical drives and the usage times of the optical drives, including: when n data read and write requests are obtained, determining n optical drives with the shortest usage times, where n is a positive integer; and determining the target optical drives corresponding to the n first data according to the usage times of the optical drives corresponding to the n first data; wherein the usage times of the optical drives corresponding to the n first data are negatively correlated with the usage times allocated to the target optical drives corresponding to the n first data.

[0018] It can be understood that the n optical drives with the shortest usage time are distributed according to the negative correlation between the usage time of their respective optical drives and the usage time of the target optical drives corresponding to the n first data. This can improve the response speed of the system while achieving a balanced distribution of the usage time of multiple optical drives, avoiding the occurrence of hot spots and improving system performance.

[0019] In one possible implementation, the method further includes: recording the allocation time and corresponding recycling time of at least two optical drives; determining the time interval between the allocation time and the corresponding recycling time in the allocation record as the read / write duration; and updating the used duration of at least two optical drives according to the read / write duration.

[0020] It can be understood that updating the usage time of the optical drive based on the time interval between the allocation time and the corresponding recovery time of the optical drive recorded by the computing device can avoid the computing device reading relevant data from the optical drive for updating the usage time of the optical drive, thereby reducing the communication frequency between the computing device and the optical drive, thereby reducing the system delay and improving the system response speed.

[0021] In a possible implementation, the method further includes: if there is an optical drive for which the difference between the read / write time and the corresponding optical drive usage time is greater than a preset error threshold, displaying fault reminder information for the optical drive.

[0022] It can be understood that based on the difference between the read and write time and the corresponding optical drive usage time, as well as the preset error threshold, it is possible to accurately determine whether the current system has a fault, improve the accuracy of displaying fault warning information, and thus improve the reliability of the system.

[0023] In a possible implementation, the method further includes: if there is an optical drive whose usage time reaches a preset second usage time threshold, displaying replacement reminder information for the optical drive.

[0024] It can be understood that displaying a replacement reminder message for an optical drive that has been used for a preset second usage time threshold can promptly remind the user to replace the optical drive. The preset second usage time threshold improves the accuracy of the timing of displaying the replacement reminder message, which contributes to the normal operation of the system and the smooth progress of the business.

[0025] In a possible implementation, the method further includes: obtaining usage time of at least two optical drives at preset time intervals; and determining a sorting result of the at least two optical drives according to the usage time in ascending order or descending order.

[0026] It is understandable that periodically determining the sorting results of at least two optical drives can improve the efficiency of evenly allocating multiple optical drives.

[0027] In a possible implementation, the method further includes: determining a sorting result of the at least two optical drives based on the usage time of the at least two optical drives and a preset sorting rule; and updating the sorting result when an optical drive read / write completion signal is detected.

[0028] It is understandable that timely updating of the sorting results after the optical drive reads and writes are completed can improve the efficiency of evenly allocating data to multiple optical drives.

[0029] In a second aspect, an embodiment of the present application provides an optical drive allocation device, which is used to execute any one of the optical drive allocation methods provided in the first aspect.

[0030] In one possible implementation, the embodiment of the present application may divide the optical drive allocation device into functional modules according to the method provided in the first aspect above. For example, each functional module may be divided according to each function, or two or more functions may be integrated into a processing module. Exemplarily, the embodiment of the present application may divide the optical drive allocation device into an acquisition module, a first determination module, and a second determination module, etc., according to the function. The description of the possible technical solutions and beneficial effects executed by each of the above-mentioned divided functional modules can refer to the technical solutions provided in the first aspect above or its corresponding possible implementation, and will not be repeated here.

[0031] In a third aspect, an embodiment of the present application provides a computing device, which includes a processor and a memory, wherein the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computing device to implement the optical drive allocation method described in the above aspects.

[0032] In a fourth aspect, embodiments of the present application provide a computer program product, comprising computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform the optical drive allocation method provided in various optional implementations of the first aspect.

[0033] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores at least one computer program instruction, and the computer program instruction is loaded and executed by a processor to implement the optical drive allocation method as described in the above aspects.

[0034] For the specific descriptions of the second to fifth aspects and their various implementations in this application, reference can be made to the detailed descriptions in the first aspect and its various implementations; and for the beneficial effects of the second to fifth aspects and their various implementations, reference can be made to the analysis of the beneficial effects in the first aspect and its various implementations, which will not be repeated here.

[0035] These and other aspects of the present application will become more readily apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of the composition of an optical storage system provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0038] Figure 3A schematic flow chart of an optical drive allocation method provided in an embodiment of the present application;

[0039] Figure 4 This is a schematic diagram of an interface for setting a usage time threshold involved in an embodiment of the present application;

[0040] Figure 5 This is a schematic diagram of an optical drive chain involved in an embodiment of the present application;

[0041] Figure 6 A schematic diagram of an optical drive balanced distribution effect involved in an embodiment of the present application;

[0042] Figure 7 A flowchart of balanced allocation of optical drives provided in an embodiment of the present application;

[0043] Figure 8 This is a schematic diagram of an optical drive sorting result involved in an embodiment of the present application;

[0044] Figure 9 This is a schematic diagram of balanced allocation of optical drives involved in an embodiment of the present application;

[0045] Figure 10 This is a schematic diagram of an updated optical drive sorting result involved in an embodiment of the present application;

[0046] Figure 11 A schematic structural diagram of an optical drive allocation device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0048] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0049] Furthermore, in the description of the embodiments of the present application, unless otherwise specified, "a plurality" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0050] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0051] First, the application scenarios of the embodiments of the present application are exemplarily introduced.

[0052] With the development of the internet, the volume of network data has grown exponentially. Within this vast amount of data, aside from a small amount of popular data, a significant amount remains that is accessed relatively infrequently. Currently, when archiving this limited-access data is necessary for various reasons, such as data security, optical storage systems often utilize optical discs as the storage medium. This is because, compared to other storage media, optical discs can store data more securely and for longer periods of time, and operating optical storage systems requires fewer resources than other methods.

[0053] Optical storage systems generally include two major units: management server and optical disk cabinet. Figure 1 As shown, Figure 1 A schematic diagram of the composition of an optical storage system provided in an embodiment of the present application is shown.

[0054] The optical storage system 1000 includes a management server 1100, a plurality of optical disk cabinets such as an optical disk cabinet 1200 and an optical disk cabinet 1300. The management server 1100 is equipped with corresponding management software, which may include, for example, Figure 1 Based on the functional modules shown, such as the optical disc management module 1110 , the optical drive management module 1120 , the cache management module 1130 and the input / output scheduling module 1140 , the management server 1100 can manage multiple optical disc cabinets such as the optical disc cabinet 1200 and the optical disc cabinet 1300 .

[0055] Specifically, the optical disc management module 1110 is used to record or obtain data of each optical disc in each optical disc cabinet, such as data on the used space and the remaining available space of the optical disc. Then, the optical disc management module 1110 can manage each optical disc based on the data. For example, when receiving a data read request, it determines the target optical disc for storing the data to be read. For example, when receiving a data write request, it determines the target optical disc with appropriate remaining available space based on the size of the data to be written.

[0056] The optical drive management module 1120 is used to determine a target optical disc for storing the data to be read when receiving a data read request. For example, when receiving a data write request, it determines a target optical disc with suitable remaining available space based on the size of the data to be written.

[0057] The cache management module 1130 is mainly used to cache data to be written, so that when the optical drive and optical disc for writing data are determined, the optical drive can obtain the data to be written from the cache management module 1130 and write it into the optical disc.

[0058] The input / output scheduling module 1140 is mainly used to issue instructions to the corresponding optical disc cabinet according to the target optical disc indicated by the optical disc management module 1110 and the target optical drive indicated by the optical drive management module 1120, such as a disc moving instruction to instruct the target optical disc to be moved into the target optical drive or to move the target optical disc out of the target optical drive.

[0059] An optical disc cabinet generally includes several optical disc cartridges, optical disc drives, manipulators, and control units. For example, Figure 1 The optical disc cabinet 1200 includes optical drives such as optical drive A and optical drive B, optical disc trays such as optical disc tray A and optical disc tray B, a robot A and a corresponding control unit 1210; the optical disc cabinet 1300 includes optical drives such as optical drive C and optical drive D, optical disc trays such as optical disc tray C and optical disc tray D, a robot B and a corresponding control unit 1310.

[0060] The control unit 1210 and the control unit 1310 are mainly used to respond to instructions from the management server 1100 and control the robot to complete corresponding instructions, such as the above-mentioned disk moving instructions.

[0061] Furthermore, a disc cartridge may contain multiple discs, and the robot may be used to move the discs between the optical drive and the disc cartridge, for example, to put the disc into the optical drive, take the disc out of the optical drive and put it back into the disc cartridge.

[0062] When using the above-mentioned optical storage system to read and write data, the process is usually that the management server first sends a data read and write command to the control unit in the target optical disc cabinet. After receiving the read and write command, the control unit will first issue a disc move instruction to control the robot to take the specified optical disc out of its optical disc magazine and move it to the target optical drive position and then place it in the target optical disc drive; then the control unit will issue a read and write instruction to the optical drive, and write data to the optical disc through the target optical drive or read data from the optical disc through the target optical drive. After determining that the optical drive has finished reading and writing data, the robot will move the optical disc back to the original optical disc magazine.

[0063] However, the maximum usage time of the optical drive used for data reading and writing in current optical storage systems generally ranges from 5,000 to 10,000 hours. When the cumulative usage time of the optical drive for reading and writing data exceeds its corresponding maximum usage time, the bit error rate of the optical drive when reading and writing data will increase significantly. In this state, the optical drive is obviously no longer usable and needs to be replaced in a timely manner.

[0064] In actual applications, in order to increase the total bandwidth of an optical disk cabinet, a plurality of optical disk drives are usually configured in an optical disk cabinet. Currently, there are two optical disk drive allocation schemes when allocating data to multiple idle optical disk drives in response to data processing requests.

[0065] The first option: randomly assign a free optical drive.

[0066] In this scheme, due to the uncertainty of random allocation, the usage time of each optical drive will be uneven, that is, a hot spot optical drive will be quickly damaged, thereby affecting the overall performance of the optical storage system.

[0067] Compared with the completely random allocation mode of the first scheme, the second scheme will divide the data to be processed according to the grouping of multiple optical drives when reading and writing data, and allocate the corresponding optical drive group to read and write the data to be processed. For example, 12 optical drives are evenly divided into 2 groups, that is, each 6 optical drives are 1 group. In this way, each time data is read and written, the data to be processed is evenly divided into 6 parts, where each part of the data uses an optical drive in an optical drive group. It can be understood that in this scheme, the usage time of each optical drive within each optical drive group is balanced. However, since the scheme adopts random allocation when allocating optical drive groups, this leads to the problem of uneven usage time between different optical drive groups, affecting the overall performance of the optical storage system.

[0068] Furthermore, in the field of non-volatile memory (NVM), such as storage media like solid state drives (SSDs), since SSDs have a limited number of erase / write cycles, data blocks are typically allocated to data to be read or written based on the erase / write cycles of each SSD to achieve wear balancing across multiple SSDs. However, since optical discs do not have such a concept as erase / write cycles, and the number of times an optical disc has been allocated for data reading and writing does not reflect its usage duration, a disc that has been allocated for data reading and writing more times does not necessarily have a longer usage duration than one that has been allocated for data reading and writing less frequently. Clearly, this approach of calculating the erase / write cycles of storage media to achieve balanced allocation is not applicable to the aforementioned optical storage system.

[0069] It can be seen that none of the above-mentioned related technologies have solved the problem of uneven usage time among multiple optical drives. Therefore, in the optical storage system based on the above-mentioned technology, there will always be a situation where one or a group of optical drives are damaged prematurely due to expiration of their service life, which reduces the bandwidth of the optical storage system for reading and writing data, and thus affects the performance of the optical storage system.

[0070] In view of this, the embodiment of the present application determines the target optical drive for reading the first data based on the usage time of at least two optical drives and the required processing time corresponding to the first data to be read and written, and provides multiple allocation rules, which can not only achieve balanced distribution of usage time among multiple optical drives, avoid premature damage of hot spot optical drives, but also avoid concentrated damage of large quantities of optical drives, improve the overall performance of the system, and ensure the smooth progress of data reading and other services.

[0071] Next, the system architecture of the embodiment of the present application is exemplarily introduced.

[0072] Figure 2 A schematic structural diagram of a computing device provided in an embodiment of the present application is shown. Figure 2 The computing device 100 may be the above Figure 1 The optical storage system 1000 in the embodiment may also be the above-mentioned Figure 1 The optical drive management module 1120 in Figure 2As shown, in terms of hardware, the computing device 100 may include a processor 101, a memory 102, etc. The computing device may also be connected to a display terminal 110, wherein the processor 101 may include a central processing unit (CPU). In terms of software, the computing device 100 may have the function of determining a target optical drive from at least two optical drives and controlling the target optical drive to read and write data. That is, the computing device 100 may obtain a data read and write request, wherein the data read and write request includes the size of first data, and the first data is data that needs to be read and written by the optical drive; determine the optical drive usage time required to read and write the first data based on the size of the first data and the bandwidth of the optical drive for reading and writing data; determine the target optical drive from the at least two optical drives based on the respective usage time of the at least two optical drives and the optical drive usage time, wherein the target optical drive is the optical drive assigned to read and write the first data, and the bandwidth of the optical drive for reading and writing data may be obtained by the processor 101 from the memory 102.

[0073] It should be noted that the computing device 100 described in the following embodiments executing a certain step (such as S101 to S103 below) can be understood as: the processor 101 executes the step.

[0074] The memory 102 may store logic codes corresponding to a step executed by the computing device 100 as described in the following embodiments.

[0075] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0076] For ease of understanding, the optical drive allocation method provided by this application is exemplarily introduced below with reference to the accompanying drawings. The optical drive allocation method is applicable to Figure 2 The computing device shown.

[0077] Figure 3 A schematic flow chart of a method for assigning optical drives provided in an embodiment of the present application is shown. The method for assigning optical drives includes the following steps:

[0078] S101, a computing device obtains a data read / write request.

[0079] The data read / write request may include the size of the first data, and the first data may be data that needs to be read / written by the optical drive.

[0080] Data read and write requests can be specifically divided into data read requests and data write requests.

[0081] The data read request may include storage location information of the data to be read, for example, the data to be read is in the optical disc A in the optical disc tray A in the optical disc cabinet A, and may also include attribute information such as the name of the data file and the size of the data.

[0082] The data write request may include attribute information such as the size of the data to be written, the storage location of the current data, and in some cases may also include a specified target optical disc, for example, writing the data to be written to optical disc B in optical disc tray B in optical disc cabinet B.

[0083] S102: The computing device determines the usage time of the optical drive required for reading and writing the first data according to the size of the first data and the bandwidth of the optical drive for reading and writing data.

[0084] The bandwidth of the optical drive for reading and writing data may include the bandwidth of the optical drive for reading the first data from the optical disc, also known as the reading speed, and the bandwidth of the optical drive for writing the first data to the optical disc, also known as the burning speed.

[0085] The computing device can be Figure 1 The optical drive management module 1120 obtains the reading speed and / or burning speed of the optical drive.

[0086] In one possible implementation, the computing device determines the ratio of the size of the first data to the reading speed as the optical drive usage time required to read the first data, or determines the ratio of the size of the first data to the burning speed as the optical drive usage time required to write the first data.

[0087] For example, the computing device obtains that the size of the first data is 6000 megabytes, and the burning speed of optical drive A is 30 megabytes per second. The computing device determines the ratio of 6000 megabytes to 30 megabytes per second, that is, 200 seconds, as the optical drive usage time required to write the first data.

[0088] In one possible implementation, if there are different bandwidths for reading and writing data, the computing device determines the optical drive usage time required for each optical drive to read and write the first data based on the size of the first data and the bandwidth of the optical drives for reading and writing data.

[0089] For example, the size of the first data is 3000 megabytes, the bandwidth of optical drive A for reading and writing data is 10 megabytes per second, the bandwidth of optical drive B for reading and writing data is 20 megabytes per second, and the bandwidth of optical drive C for reading and writing data is 30 megabytes per second. The computing device determines based on the above data that the optical drive usage time required for optical drive A to read and write the first data is 300 seconds, the optical drive usage time required for optical drive B to read and write the first data is 150 seconds, and the optical drive usage time required for optical drive C to read and write the first data is 100 seconds.

[0090] Based on the above implementation, the computing device can accurately determine the optical drive usage time required for each optical drive to read and write the first data, thereby improving the accuracy of evenly distributing the usage time of each optical drive.

[0091] S103: The computing device determines a target optical drive from the at least two optical drives according to the respective usage durations of the at least two optical drives and the optical drive usage duration.

[0092] In one possible implementation, when the computing device executes the above step S103, it can first sum up the usage time of each of the at least two optical drives and the usage time of the optical drives, so as to determine the estimated usage time of each of the at least two optical drives, and then the computing device determines the target optical drive from the at least two optical drives according to the estimated usage time of each of the at least two optical drives.

[0093] For example, if the usage time of optical drive A is 5 hours and the usage time of the optical drive is 1 hour, the computing device will sum up the above usage time and the usage time of the optical drive, and obtain the estimated usage time of optical drive A to be 6 hours; correspondingly, the usage time of optical drive B is 10 hours and the usage time of the optical drive is 1 hour, then the estimated usage time of optical drive B is 11 hours, and then the computing device determines the target optical drive based on the estimated usage time of optical drive A and optical drive B.

[0094] Based on the above implementation, the computing device determines the target optical drive according to the calculated estimated usage time of at least two optical drives, which can improve the accuracy of evenly distributing the usage time of multiple optical drives.

[0095] Furthermore, when the computing device determines a target optical drive from at least two optical drives according to the respective estimated usage durations of the at least two optical drives, the embodiment of the present application provides the following five possible situations.

[0096] In a first possible case, the computing device may determine the shortest estimated usage time from the respective estimated usage time of the at least two optical drives; and determine the optical drive corresponding to the shortest estimated usage time as the target optical drive.

[0097] For example, the estimated usage time of optical drive A is 8 hours, the estimated usage time of optical drive B is 4 hours, and the estimated usage time of optical drive C is 10 hours. The computing device can determine that the shortest estimated usage time is 4 hours, and then determine the optical drive B corresponding to the shortest estimated usage time of 4 hours as the target optical drive.

[0098] Since the computing device determines the optical drive with the shortest estimated usage time as the target optical drive, the difference in usage time between the optical drive with the shortest estimated usage time and other optical drives can be shortened, thereby achieving balanced distribution.

[0099] Furthermore, the computing device may also sort the at least two optical drives according to their respective estimated usage time, and determine the target optical drive from a specified number of optical drives with shorter usage time in the sorting result.

[0100] For example, the specified number is 2, the estimated usage time of optical drive A is 6 hours, the estimated usage time of optical drive B is 4 hours, and the estimated usage time of optical drive C is 5 hours. The computing device can sort the above optical drives in order of usage time from short to long, and determine the target optical drive from the two optical drives with shorter usage time in the sorting results, namely, optical drive B and optical drive C.

[0101] Since the computing device can determine the target optical drive from a specified number of optical drives that have been used for a shorter period of time, the flexibility of balanced allocation can be improved.

[0102] In a second possible scenario, if there is a first type of optical drive, the computing device determines the optical drive of the first type of optical drives that is expected to have been used for the longest time as the target optical drive.

[0103] Among them, the first type of optical drive refers to an optical drive whose usage time is not less than a first usage time threshold and whose estimated usage time is not greater than a second usage time threshold; the first usage time threshold and the second usage time threshold are both pre-set, and the first usage time threshold is not greater than the second usage time threshold.

[0104] That is to say, while achieving a balanced usage time of multiple optical drives, it may also bring about a problem: multiple optical drives reach the end of their service life at the same time, which may lead to a large number of optical drives in the system being damaged in a certain period of time. This will seriously affect the performance of the system and the replacement of optical drives in batches will affect business operations, and may even cause the system to be unable to read and write data for a certain period of time. In the second possible case, the computing device can solve the above problem.

[0105] Specifically, if Figure 4 As shown, Figure 4 This is a schematic diagram of a usage time threshold setting interface involved in an embodiment of the present application. Users can set the upper limit of the optical drive's service life. Figure 4 The second usage time threshold 20 in Figure 4 The first usage time threshold 10 is set to a specified usage time not greater than the second usage time threshold 20 (for example, 80% of the upper limit of the service life), and the corresponding configuration is saved by clicking the "Save" control, and the corresponding configuration is applied by clicking the "Apply" control.

[0106] In this way, by accelerating the wear and tear of the first type of optical drive, that is, giving priority to allocating data read and write requests to optical drives whose usage time is not less than the first usage time threshold of 10 and whose estimated usage time is not more than the second usage time threshold of 20, in other words, hotspot optical drives are created within the specified range, and the hotspot optical drives are made to reach the upper limit of their service life first, thereby avoiding concentrated damage to the optical drives.

[0107] For example, the upper limit of the service life of optical drive A, optical drive B, and optical drive C is all 1005 hours, the first usage time threshold 10 is pre-set to 800 hours, and the second usage time threshold 20 is pre-set to 1000 hours, among which, the usage time of optical drive A is 600 hours, and the estimated usage time is 605 hours; the usage time of optical drive B is 900 hours, and the estimated usage time is 905 hours; the usage time of optical drive C is 850 hours, and the estimated usage time is 855 hours. Then, optical drive B and optical drive C both meet the first type of optical drive. Because the usage time of optical drive B is the longest, the computing device determines optical drive B as the target optical drive.

[0108] By setting the first usage time threshold 10 and the second usage time threshold 20, the computing device determines the first type of optical drive and accelerates the wear of the first type of optical drive, especially accelerates the wear of the optical drive of the first type that is expected to have the longest usage time, thereby avoiding concentrated damage to the optical drives and ensuring the smooth progress of the business.

[0109] Furthermore, since the upper limit of the service life of different optical drives may be different, users can Figure 4 The specific optical drive 30 setting interface shown in the figure sets the first usage time threshold 10 and / or the second usage time threshold 20 corresponding to the specific optical drive to achieve a more targeted accelerated loss effect and avoid concentrated damage to the optical drive.

[0110] If the computing device does not display the Figure 4 The “Specific CD-ROM Drive” setting interface shown in the dotted box, or the user does not Figure 4 The specific optical drive 10 setting interface shown in the dotted box is set, and the computing device can use the default settings, such as the first usage time threshold and the second usage time threshold are effective for all optical drives.

[0111] In a third possible case, if the second type optical drive exists, the computing device determines the target optical drive from the at least two optical drives excluding the second type optical drive.

[0112] The second type of optical drive refers to an optical drive whose estimated usage time is greater than a second usage time threshold of 20.

[0113] For example, the second usage time threshold 20 is pre-set to 1000 hours, the estimated usage time of optical drive A is 605 hours, the estimated usage time of optical drive B is 905 hours, and the estimated usage time of optical drive C is 1005 hours. Then, optical drive C meets the second type of optical drive, and the computing device will determine the target optical drive from optical drive A and optical drive B except optical drive C.

[0114] That is, the user can set the second usage time threshold 20 to the upper limit of the optical drive's service life to avoid data reading and writing errors caused by the target optical drive reaching its upper limit during data reading and writing, thereby improving the accuracy of data reading and writing.

[0115] In a fourth possible scenario, the computing device determines the optical drives of at least two optical drives, each of which has an estimated usage time that is less than or equal to a specified usage time threshold, as target optical drives.

[0116] Among them, the specified time threshold can be pre-set by the user, or calculated by the computing device based on the estimated usage time of at least two optical drives. For example, the average of the estimated usage time of at least two optical drives is calculated as the specified time threshold, or the median of the estimated usage time of at least two optical drives is calculated as the specified time threshold.

[0117] For example, the specified duration threshold is 500 hours preset by the user, the estimated usage duration of optical drive A is 700 hours, and the estimated usage duration of optical drive B is 400 hours, then the computing device determines optical drive A as the target optical drive.

[0118] In this way, the computing device can determine the specified time threshold through user settings or calculation based on the estimated usage time of at least two optical drives, so as to give priority to the optical drives whose estimated usage time is not greater than the specified time threshold, thereby improving the effect of balanced distribution.

[0119] Based on the above steps S101-S103, the computing device can determine the target optical drive from at least two optical drives according to the respective usage time of the at least two optical drives and the usage time of the optical drive required for the first data, thereby achieving balanced distribution of the usage time among multiple optical drives, avoiding premature damage of hot optical drives, and thus improving the performance of the system. In addition, different allocation rules can be implemented for different optical drives based on the settings of the first usage time threshold, the second usage time threshold, and the specified usage time threshold, thereby avoiding concentrated damage to the optical drives and improving the response speed of the system.

[0120] The above implementation methods are all described for a data reading request obtained by a computing device. In actual applications, the computing device may obtain multiple data reading requests at the same time. Accordingly, the embodiment of the present application provides a possible implementation method, which can specifically include the following two possible situations.

[0121] In a first possible case, when n data read and write requests are obtained, the computing device determines n optical drives with the shortest usage time, where n is a positive integer.

[0122] When managing the optical drives, the computing device may determine an optical drive sorting result based on the recorded usage time of each optical drive, wherein the computing device may record the optical drive sorting result based on a data structure such as a linked list.

[0123] Taking the linked list as an example, each node on the linked list can record the name of the optical drive and the corresponding usage time, such as Figure 5 As shown, Figure 5 This is a schematic diagram of an optical drive chain involved in an embodiment of the present application, wherein the first node records "Optical Drive B" and its usage time: 1 hour; the second node records "Optical Drive D" and its usage time: 2 hours; the third node records "Optical Drive A" and its usage time: 4 hours; the fourth node records "Optical Drive C" and its usage time: 5 hours; the fifth node records "Optical Drive E" and its usage time: 6 hours.

[0124] For example, when the computing device obtains three data read and write requests, it can Figure 5 The optical drive list in the 3 optical drives with the shortest usage time is determined as follows: Figure 5 As shown in the dotted boxes in , the optical drives determined by the computing device are optical drive B, optical drive D and optical drive A respectively.

[0125] It should be noted that the above-mentioned n optical drives with the shortest usage time refer to the first n optical drives indicated by the results of sorting the usage time of each optical drive from short to long, or refer to the last n optical drives indicated by the results of sorting the usage time of each optical drive from long to short. In the embodiment of the present application, it is not strictly limited to the n optical drives with the shortest usage time having equal and shortest usage time, but refers to the usage time of these n optical drives not greater than the usage time of the optical drives other than these n optical drives. That is to say, among the n optical drives with the shortest usage time, their respective corresponding usage time may also be different.

[0126] Furthermore, in a possible implementation, the computing device may obtain the usage time of at least two optical drives at preset time intervals; and determine the sorting results of the at least two optical drives according to the usage time in ascending order or descending order.

[0127] Exemplarily, the computing device obtains the usage time of optical drive A, optical drive B, and optical drive C every 5 minutes at a preset time interval, and determines the sorting results of optical drive A, optical drive B, and optical drive C in order from small to large or from large to small.

[0128] In this way, the computing device can regularly determine the sorting results of at least two optical drives, thereby improving the efficiency of evenly allocating multiple optical drives.

[0129] In a possible implementation, the computing device may also determine the sorting results of the at least two optical drives based on the usage time of the at least two optical drives and a preset sorting rule, and update the sorting results when an optical drive read / write completion signal is detected.

[0130] In this way, the computing device updates the sorting result in time after the optical drive finishes reading and writing, which can improve the efficiency of balanced allocation.

[0131] In a second possible scenario, the computing device determines the target optical drives corresponding to the n first data according to the usage durations of the optical drives corresponding to the n first data.

[0132] The usage time of the optical drive corresponding to each of the n first data is negatively correlated with the usage time of the target optical drive allocated to each of the n first data.

[0133] For example, Figure 6 As shown, Figure 6 This is a schematic diagram of the effect of balanced distribution of optical drives involved in an embodiment of the present application. The four optical drives with the shortest usage time determined by the computing device are: optical drive A, which has been used for 5 hours; optical drive B, which has been used for 6 hours; optical drive C, which has been used for 8 hours; and optical drive D, which has been used for 9 hours. The usage time of the optical drives corresponding to the four first data are: the usage time of the optical drive corresponding to the first data A is 1 hour, the usage time of the optical drive corresponding to the first data B is 2 hours, the usage time of the optical drive corresponding to the first data C is 4 hours, and the usage time of the optical drive corresponding to the first data D is 5 hours.

[0134] Based on the above data, the computing device assigns the optical drive A with the shortest usage time among the four optical drives to the first data D with the longest usage time among the four first data, and assigns the optical drive B with the second shortest usage time among the four optical drives to the first data C with the second longest usage time among the four first data, in accordance with the negative correlation between the usage time and the usage time of the optical drives. Similarly, the optical drive C is assigned to the first data B, and the optical drive D is assigned to the first data A.

[0135] It can be understood that before allocation, the variance of the usage time of the above four optical drives is 2.5, while after allocation, the usage time of the above four optical drives after reading and writing their respective first data will reach 10 hours, and the variance is 0. Obviously, based on the above implementation method, balanced distribution among multiple optical drives can be achieved, avoiding the occurrence of hot spots, thereby improving the performance of the system.

[0136] In a possible implementation, the computing device may determine the optical drive having the shortest usage time among the at least two optical drives as the target optical drive.

[0137] For example, the optical drive A has been used for 3 hours, and the optical drive B has been used for 2 hours. The computing device determines the optical drive A as the target optical drive.

[0138] Based on the above implementation method, the computing device can quickly determine the target optical drive after receiving a data read and write request, without obtaining the bandwidth of the optical drive to read and write data, nor does it need to calculate the optical drive usage time required to read and write the first data, thereby reducing the system's response delay and speeding up the response speed.

[0139] In one possible implementation, a computing device records the allocation time and the corresponding reclaim time of a target optical drive; determines the time interval between the allocation time and the corresponding reclaim time in the allocation record as the read / write duration; and updates the used duration of the target optical drive according to the read / write duration.

[0140] For example, the computing device records the allocation time of the target optical drive A as 2024 / 01 / 01 17:00:00, the corresponding recycling time is 2024 / 01 / 01 17:10:00, and the usage time is 30 minutes. The computing device can then determine that the read and write time of the target optical drive A is 10 minutes, and the updated usage time of the target optical drive A is 40 minutes; the allocation time of the target optical drive B is 2024 / 01 / 01 17:02:00, the corresponding recycling time is 2024 / 01 / 01 17:08:00, and the usage time is 50 minutes. The computing device can then determine that the read and write time of the target optical drive B is 6 minutes, and the updated usage time of the target optical drive B is 56 minutes.

[0141] In this way, the computing device updates the usage time of the optical drive based on the time interval between the allocation time and the corresponding recovery time of the optical drive recorded by it, which can avoid the computing device reading relevant data from the optical drive for updating the usage time of the optical drive, reducing the communication frequency between the computing device and the optical drive, thereby reducing the system delay and improving the system response speed.

[0142] Furthermore, in a possible implementation, if there is an optical drive for which the difference between the read and write time and the corresponding optical drive usage time is greater than a preset error threshold, the computing device displays fault reminder information for the optical drive through the display terminal to which it is connected.

[0143] For example, the preset error threshold is 10 minutes, and the computing device calculates that the usage time of the optical drive is 60 minutes based on the bandwidth of the target optical drive A and the size of the first data. The computing device records that the allocation time of the target optical drive A is 2024 / 01 / 01 12:00:00, and the corresponding recycling time is 2024 / 01 / 01 13:30:00. Therefore, the read and write time of the target optical drive A is 90 minutes, which is greater than the preset error threshold. The computing device displays a fault reminder message such as "Optical drive A may have a fault, please check it in time" through the display terminal to which it is connected.

[0144] Based on the above implementation, the computing device can promptly remind the user to detect the optical drive if the difference between the read / write time and the corresponding optical drive usage time is greater than a preset error threshold, thereby improving the reliability of the system.

[0145] In a possible implementation, if there is an optical drive whose usage time reaches a preset second usage time threshold, the computing device displays replacement reminder information for the optical drive through a display terminal to which it is connected.

[0146] Exemplarily, the preset second usage time threshold is 1000 hours, the usage time of optical drive A is 1000 hours, and the computing device displays "Optical drive A has reached the specified usage time, please replace it in time" through the display terminal to which it is connected.

[0147] Based on the above implementation method, the user can set the second usage time threshold according to the upper limit of the service life of the optical drive, so that the computing device can promptly remind the user to replace the optical drive that has reached the upper limit of its service life. When such an optical drive exists in the system, if it is not used for data reading and writing, the system bandwidth will be reduced. If such an optical drive is used for data reading and writing, data reading and writing errors will occur, reducing the data reading and writing quality of the system. Therefore, promptly reminding the user to replace the optical drive that has been used for a period of time that has reached the preset second usage time threshold can improve the reliability of the system.

[0148] The following uses a specific application scenario to illustrate the optical drive allocation method in the embodiment of the present disclosure. In an optical storage system, it can generally be divided into a management server and an optical disk cabinet. The management server can send the size of the data to be read or written to the optical drive management module in the optical disk cabinet through the input / output (I / O) module. In the embodiment of the present application, the optical drive management module responds to the data read or write request and executes the following optical drive allocation process, such as Figure 7 As shown, Figure 7 This is a flowchart of an optical drive balanced allocation provided by an embodiment of the present application, specifically including:

[0149] Before S201, the optical drive management module can maintain the total time of each optical drive having recorded and read, and sort them, such as Figure 8 As shown, Figure 8 This is a schematic diagram of the optical drive sorting results involved in an embodiment of the present application. Specifically, the optical drive management module sorts the optical drives in order from short to long according to the usage time of each optical drive, including: optical drive A with a usage time of 5 hours, optical drive B with a usage time of 6 hours, optical drive C with a usage time of 8 hours, optical drive D with a usage time of 9 hours, and optical drive E with a usage time of 995 hours.

[0150] The following steps S201-S206 are based on Figure 8 The data of optical drive AE is explained in detail.

[0151] S201: The optical drive management module receives a data read / write request.

[0152] In this step, the optical drive management module may receive a data read / write request from the I / O module, wherein the data read / write request at least includes the size of first data, and the first data is data that needs to be read / written by the optical drive.

[0153] S202: The optical drive management module determines the optical drive usage time required for each data to be read or written.

[0154] In this step, the optical drive management module may obtain the bandwidth of each optical drive for reading and writing data, and determine the optical drive usage time required for each first data in combination with the size of the first data in the data read and write request.

[0155] Exemplarily, the optical drive management module receives three data read and write requests from the I / O module, and then obtains that the bandwidth of the optical drive AE for reading and writing data is 100,000 megabytes per hour, wherein the size of the first data A in the data read and write request is 100,000 megabytes, the size of the first data B is 500,000 megabytes, and the size of the first data C is 600,000 megabytes. The optical drive management module then calculates that the optical drive usage time required for the optical drive AE to read and write the first data A, the first data B, and the first data C are: 1 hour, 5 hours, and 6 hours, respectively.

[0156] S203: The optical drive management module determines whether there is a first type optical drive.

[0157] Among them, the first type of optical drive refers to an optical drive whose usage time is not less than a first usage time threshold and whose estimated usage time is not greater than a second usage time threshold. The estimated usage time is the sum of the optical drive usage time and the usage time.

[0158] In this step, the optical drive management module determines whether there is a first type optical drive according to the first usage time threshold and the second usage time threshold, and if so, executes step S204; if not, executes step S205.

[0159] Exemplarily, the second usage time threshold preset by the user is 1000 hours, and the first usage time threshold is 800 hours. The optical drive management module can determine that when the optical drive E is assigned to the first data A or the first data B, the optical drive E meets the first type of optical drive, and when the optical drive E is assigned to the first data C, it does not meet the first type of optical drive because the estimated usage time of the optical drive E is 1001 hours, which is greater than the second usage time threshold, and executes step S204.

[0160] S204: The optical drive management module preferentially allocates the first type of optical drives.

[0161] In this step, when the optical drive management module prioritizes the first type of optical drives, it may specifically prioritize the optical drive of the first type that is expected to have been in use the longest.

[0162] For example, if optical drive E is assigned to the first data A, the estimated usage time is 996 hours; if optical drive E is assigned to the first data B, the estimated usage time is 1000 hours. Based on this, the optical drive management module can determine to assign optical drive E to the first data B.

[0163] After assigning optical drive E to the first data B, since the first data A and the first data C have not been processed, the optical drive management module can repeat step S201, or since when continuing to assign optical drives AD, none of the optical drives AD meet the first type of optical drive, the optical drive management module can skip S204 and execute step S205.

[0164] S205: The optical drive management module determines the target optical drive according to the balanced allocation principle.

[0165] In this step, the optical drive management module can determine the target optical drive according to the negative correlation between the optical drive usage time and the actual usage time. In other words, the optical drive management module assigns the optical drive with the shortest usage time to the first data with the longest optical drive usage time, and assigns the optical drive with the longest usage time to the first data with the shortest optical drive usage time.

[0166] Exemplarily, the optical drive management module assigns optical drive A with the shortest usage time among optical drives AD to first data A with the longest usage time, and assigns optical drive B with the second shortest usage time among optical drives AD to first data B with the second longest usage time.

[0167] After the allocation process based on the above steps S203-S205, the allocation relationship between each optical drive and the first data is as follows: Figure 9 As shown, Figure 9 An embodiment of the present application involves a schematic diagram of balanced allocation of optical drives, wherein optical drive A is allocated to first data A, optical drive B is allocated to first data C, and optical drive E is allocated to first data B.

[0168] S206: The optical drive management module updates the usage time of the optical drives and reorders them.

[0169] The optical drive management module can also record the allocation time of each optical drive, and after the optical drive processes the data, record the return time of each optical drive, and use the time difference between the allocation time of each optical drive and the corresponding return time as the actual usage time to update the above sorting results, and can also remove the optical drives that reach the second usage time threshold from the sorting results.

[0170] For example, the updated sorting result corresponding to the optical drive AE is as follows: Figure 10 As shown, Figure 10 This is a schematic diagram of the updated optical drive sorting results involved in an embodiment of the present application, which includes, in sequence: optical drive B with a usage time of 7 hours, optical drive C with a usage time of 8 hours, optical drive D with a usage time of 9 hours, and optical drive A with a usage time of 10 hours. Among them, since the usage time of optical drive E after the update is 1000 hours, which reaches the second usage time threshold, the updated sorting result does not include optical drive E.

[0171] Based on the above steps S201-206, the optical drive management module achieves balanced distribution of multiple optical drives according to the usage time of the optical drives and the usage time of the optical drives of the first data, avoids the emergence of hot optical drives, improves system performance, and accelerates the loss of the first type of optical drives, thereby avoiding concentrated damage to multiple optical drives and improving system reliability.

[0172] The above mainly introduces the scheme of the embodiment of the present application from the perspective of method. It can be understood that, in order to realize the above functions, the optical drive allocation device includes at least one of the hardware structure and software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.

[0173] In the embodiments of the present application, the optical drive allocation device can be divided into functional units according to the above-mentioned method examples. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into a single processing unit. The above-mentioned integrated units can be implemented in the form of hardware or software functional units. It should be noted that the division of units in the embodiments of the present application is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.

[0174] For example, Figure 11 FIG2 shows a schematic diagram of the structure of an optical drive allocation device provided by an exemplary embodiment of the present application. The optical drive allocation device 1100 is applied to a computing device, or the optical drive allocation device 1100 can be a computing device. The optical drive allocation device 1100 includes:

[0175] An acquisition module 1110 is configured to acquire a data read / write request, wherein the data read / write request includes a size of first data, and the first data is data that needs to be read / written by the optical drive;

[0176] A first determining module 1120 is configured to determine a usage time of the optical drive required to read and write the first data according to a size of the first data and a bandwidth of the optical drive for reading and writing data;

[0177] The second determining module 1130 is configured to determine a target optical drive from the at least two optical drives according to respective usage durations of the at least two optical drives and the usage duration of the optical drive, where the target optical drive is the optical drive allocated for reading and writing the first data.

[0178] The acquisition module 1110, the first determination module 1120, and the second determination module 1130 can all be implemented via software or hardware. For example, the implementation of the acquisition module 1110 will be described below using the acquisition module 1110 as an example. Similarly, the implementation of the first determination module 1120 and the second determination module 1130 can refer to the implementation of the acquisition module 1110.

[0179] In one possible implementation, the second determination module is further used to determine the estimated usage time of each of the at least two optical drives, where the estimated usage time is the sum of the usage time and the usage time of the optical drive; and to determine the target optical drive from the at least two optical drives according to the estimated usage time of each of the at least two optical drives.

[0180] In a possible implementation, the second determination module is further configured to determine the shortest estimated usage time from the respective estimated usage time of the at least two optical drives; and determine the optical drive corresponding to the shortest estimated usage time as the target optical drive.

[0181] In one possible implementation, the second determination module is further configured to, if a first type of optical drive exists, determine the optical drive of the first type with the longest estimated usage time as the target optical drive; wherein the first type of optical drive refers to an optical drive whose usage time is not less than a first usage time threshold and whose estimated usage time is not greater than a second usage time threshold; the first usage time threshold and the second usage time threshold are both pre-set, and the first usage time threshold is not greater than the second usage time threshold.

[0182] In one possible implementation, the second determination module is further configured to determine the target optical drive from among the at least two optical drives excluding the second type of optical drive, if a second type of optical drive exists; wherein the second type of optical drive refers to an optical drive whose estimated usage time is greater than a second usage time threshold.

[0183] In a possible implementation, the second determining module is further configured to determine, as the target optical drive, an optical drive of each of the at least two optical drives for which the estimated usage time is less than or equal to a specified usage threshold.

[0184] In a possible implementation, the second determination module is further configured to, when n data read and write requests are obtained, determine the n optical drives with the shortest usage time, where n is a positive integer; and determine the target optical drives corresponding to the n first data according to the usage time of the optical drives corresponding to each of the n first data; wherein the usage time of the optical drives corresponding to each of the n first data is negatively correlated with the usage time allocated to the target optical drives corresponding to each of the n first data.

[0185] In one possible implementation, the device also includes an update module, which is used to record the allocation time and corresponding recycling time of the at least two optical drives; determine the time interval between the allocation time and the corresponding recycling time as the read and write duration; and update the usage time of the at least two optical drives according to the read and write duration.

[0186] In a possible implementation, it further includes a display module, which is used to display fault reminder information for an optical drive if there is an optical drive for which the difference between the read and write time and the corresponding optical drive usage time is greater than a preset error threshold.

[0187] In a possible implementation, the display module is further configured to display replacement reminder information for an optical drive if there is an optical drive whose usage time reaches a preset second usage time threshold.

[0188] As an example, combined with Figure 11The functions implemented in part or in whole by the acquisition module 1110, the first determination module 1120 and the second determination module 1130 in the optical drive allocation device can be realized by Figure 2 The computing device 100 in the embodiment of the present invention is executed, the acquisition module 1110, the first determination module 1120 and the second determination module 1130 can be performed by Figure 2 The processor 101, memory 102 of the computing device 100 and the display terminal 110 connected to the computing device 100 execute in collaboration.

[0189] Among them, the connection method between the computing device 100 and the display terminal 110 can be through a wired communication method such as a High Definition Multimedia Interface (HDMI) data cable, or through a wireless communication method such as Bluetooth and Wireless Fidelity (Wi-Fi), and the present disclosure does not impose any restrictions on this.

[0190] In an exemplary embodiment, a computer-readable storage medium is further provided, configured to store at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement all or part of the steps in the above-mentioned memory fault prediction method. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.

[0191] In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions, the computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computing device performs the above-mentioned Figure 3 All or part of the steps of the method shown in any embodiment.

[0192] In some embodiments, the methods shown in the embodiments of the present application may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or encoded on other non-transitory media or products.

[0193] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0194] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0195] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0196] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0197] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0198] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for allocating optical drives, characterized in that: The method is executed by a computing device that supports controlling an optical drive to read and write data, and the method includes: Obtaining a data read / write request, where the data read / write request includes a size of first data, where the first data is data that needs to be read / written by the optical drive; determining a usage time of the optical drive required to read and write the first data according to a size of the first data and a bandwidth of the optical drive for reading and writing data; A target optical drive is determined from the at least two optical drives according to respective usage durations of the at least two optical drives and the usage duration of the optical drive, where the target optical drive is the optical drive allocated for reading and writing the first data.

2. The method according to claim 1, characterized in that The step of determining a target optical drive from the at least two optical drives according to respective usage durations of the at least two optical drives and the usage duration of the optical drive includes: Determining an estimated usage time of each of the at least two optical drives, where the estimated usage time is the sum of the usage time and the usage time of the optical drive; The target optical drive is determined from the at least two optical drives according to the estimated usage time of each of the at least two optical drives.

3. The method according to claim 2, characterized in that The determining the target optical drive from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives includes: determining a shortest estimated usage time from the estimated usage time of each of the at least two optical drives; The optical drive corresponding to the shortest estimated usage time is determined as the target optical drive.

4. The method according to claim 2, characterized in that The determining the target optical drive from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives includes: If a first type of optical drive exists, determining the optical drive of the first type of optical drive with the longest estimated usage time as the target optical drive; Among them, the first type of optical drive refers to an optical drive whose usage time is not less than a first usage time threshold and whose estimated usage time is not more than a second usage time threshold; the first usage time threshold and the second usage time threshold are both pre-set, and the first usage time threshold is not more than the second usage time threshold.

5. The method according to claim 2, characterized in that The determining the target optical drive from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives includes: If a second type of optical drive exists, determining the target optical drive from the at least two optical drives excluding the second type of optical drive; The second type of optical drive refers to an optical drive whose estimated usage time is greater than a second usage time threshold.

6. The method according to claim 2, characterized in that The determining the target optical drive from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives includes: The optical disc drive of each of the at least two optical disc drives whose estimated usage time is less than or equal to a specified usage threshold is determined as the target optical disc drive.

7. The method according to claim 1, characterized in that The step of determining a target optical drive from the at least two optical drives according to respective usage durations of the at least two optical drives and the usage duration of the optical drive includes: When n data read and write requests are obtained, determining the n optical drives with the shortest usage time, where n is a positive integer; determining the target optical drives corresponding to the n first data respectively according to usage durations of the optical drives corresponding to the n first data respectively; The usage time of the optical drive corresponding to each of the n first data is negatively correlated with the usage time allocated to the target optical drive corresponding to each of the n first data.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Recording allocation time and corresponding recycling time of the at least two optical drives; Determine the time interval between the allocation time and the corresponding recovery time as the read / write duration; The usage durations of the at least two optical drives are updated according to the read and write durations.

9. The method according to claim 8, characterized in that The method further comprises: If there is an optical drive for which the difference between the read / write time and the corresponding usage time of the optical drive is greater than a preset error threshold, fault reminder information for the optical drive is displayed.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: If there is an optical drive whose usage time reaches the preset second usage time threshold, replacement reminder information for the optical drive is displayed.

11. An optical drive allocation device, characterized in that: The device comprises: an acquisition module, configured to acquire a data read / write request, wherein the data read / write request includes a size of first data, and the first data is data that needs to be read / written by the optical drive; a first determining module, configured to determine a usage time of the optical drive required to read and write the first data according to a size of the first data and a bandwidth of the optical drive for reading and writing data; The second determining module is configured to determine a target optical drive from the at least two optical drives according to respective usage durations of the at least two optical drives and the usage duration of the optical drive, where the target optical drive is the optical drive allocated for reading and writing the first data.

12. The optical drive allocation device according to claim 11, wherein: The target optical drive is determined from the at least two optical drives according to respective usage durations of the at least two optical drives and the usage duration of the optical drive, wherein the second determining module is configured to: Determining an estimated usage time of each of the at least two optical drives, where the estimated usage time is the sum of the usage time and the usage time of the optical drive; The target optical drive is determined from the at least two optical drives according to the estimated usage time of each of the at least two optical drives.

13. The optical drive allocation device according to claim 12, wherein: The target optical drive is determined from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives, wherein the second determining module is configured to: determining a shortest estimated usage time from the estimated usage time of each of the at least two optical drives; The optical drive corresponding to the shortest estimated usage time is determined as the target optical drive.

14. The optical drive allocation device according to claim 12, wherein: The target optical drive is determined from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives, wherein the second determining module is configured to: If a first type of optical drive exists, determining the optical drive of the first type of optical drive with the longest estimated usage time as the target optical drive; Among them, the first type of optical drive refers to an optical drive whose usage time is not less than a first usage time threshold and whose estimated usage time is not more than a second usage time threshold; the first usage time threshold and the second usage time threshold are both pre-set, and the first usage time threshold is not more than the second usage time threshold.

15. The optical drive allocation device according to claim 12, wherein: The target optical drive is determined from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives, wherein the second determining module is configured to: If a second type of optical drive exists, determining the target optical drive from the at least two optical drives excluding the second type of optical drive; The second type of optical drive refers to an optical drive whose estimated usage time is greater than a second usage time threshold.

16. The optical drive allocation device according to claim 12, wherein: The target optical drive is determined from the at least two optical drives according to the respective estimated usage durations of the at least two optical drives, wherein the second determining module is configured to: The optical disc drive of each of the at least two optical disc drives whose estimated usage time is less than or equal to a specified usage threshold is determined as the target optical disc drive.

17. The optical drive allocation device according to claim 11, wherein: The target optical drive is determined from the at least two optical drives according to respective usage durations of the at least two optical drives and the usage duration of the optical drive, wherein the second determining module is configured to: When n data read and write requests are obtained, determining the n optical drives with the shortest usage time, where n is a positive integer; determining the target optical drives corresponding to the n first data respectively according to usage durations of the optical drives corresponding to the n first data respectively; The usage time of the optical drive corresponding to each of the n first data is negatively correlated with the usage time allocated to the target optical drive corresponding to each of the n first data.

18. The optical drive allocation device according to any one of claims 11 to 17, wherein: It also includes an update module, which is used to: Recording allocation time and corresponding recycling time of the at least two optical drives; Determine the time interval between the allocation time and the corresponding recovery time as the read / write duration; The usage durations of the at least two optical drives are updated according to the read and write durations.

19. The optical drive allocation device according to claim 18, wherein: It also includes a display module, which is used to: If there is an optical drive for which the difference between the read / write time and the corresponding usage time of the optical drive is greater than a preset error threshold, fault reminder information for the optical drive is displayed.

20. The optical drive allocation device according to any one of claims 11 to 19, wherein: The display module is used to: If there is an optical drive whose usage time reaches the preset second usage time threshold, replacement reminder information for the optical drive is displayed.

21. A computing device, characterized in that The computing device includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the computing device to implement the optical drive allocation method according to any one of claims 1 to 10.

22. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed by a computing device cluster, the computing device cluster executes the optical drive allocation method according to any one of claims 1 to 10.

23. A computer-readable storage medium, characterized in that The optical drive allocation method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the optical drive allocation method according to any one of claims 1 to 10.