Data processing method, system and device

By reserving a second storage area in the optical storage system to recover damaged data, the problem of low reading efficiency caused by data damage after the optical disc is finalized is solved, and efficient data reading and reliability are improved.

CN120669899APending Publication Date: 2025-09-19HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410313428.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In optical storage systems, only data can be read after the disc is sealed. If the data is damaged, it needs to be restored, which increases the reading difficulty and reduces the data reading efficiency.

Method used

A second storage area is reserved in the optical storage system for storing recovered data. The damaged data is recovered using the undamaged data and the check data, and the recovered data is written into the second storage area, avoiding data recovery during each read.

Benefits of technology

It improves the data reading efficiency and reliability of the optical storage system, reduces processing overhead, ensures that data can be fed back to users in a timely manner, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120669899A_ABST
    Figure CN120669899A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method, system and device, and relates to the technical field of storage. In the method, a memory in the optical storage system can be provided with a first storage area and a second storage area. When the data in the first storage area is damaged, the data can be recovered, and the recovered data is written into the second storage area. Therefore, data recovery does not need to be carried out every time the damaged data is read, the processing amount of the storage system is reduced, and the data reading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, system, and device. Background Art

[0002] Optical storage systems use optical storage media (such as optical discs) as their storage medium. To prevent data tampering, the disc is sealed after it is full. After sealing, the disc can only support data reads. If the data on the disc becomes corrupted, the damaged data can only be restored each time the disc is read, based on intact data and verification data. This undoubtedly increases the difficulty of data reading and reduces the data read efficiency of the optical storage system. Summary of the Invention

[0003] The present application provides a data processing method, system and device for improving the efficiency of reading data in an optical storage system.

[0004] In a first aspect, embodiments of the present application provide a data processing method. The method is applicable to an optical storage system, or a component thereof (such as a controller), without limitation. The optical storage system includes a first memory, the first memory including a first storage area and a second storage area, the first storage area storing at least one data item and verification data corresponding to the at least one data item. The method includes: if first data item among the at least one data item is damaged, recovering the first data item based on undamaged data item among the at least one data item and the verification data to obtain second data item; and writing the second data item into the second storage area.

[0005] In this embodiment of the present application, because the first memory device reserves a second storage area, the recovered second data can be written to the second storage area. This allows the optical storage system to read the second data from the second storage area. This eliminates the need to perform the first data recovery process each time the first data is read, thereby improving data reading efficiency. Furthermore, the optical storage system can read data more quickly, providing timely data feedback to the user, thereby enhancing the user experience.

[0006] In one possible implementation, the second storage area is a storage area reserved in the first memory, and the second storage area is used for data recovery. It can also be described as the second storage area being an area pre-configured in the first memory for storing recovered data.

[0007] In a possible implementation, the optical storage system further includes a second memory storing metadata of the first data; and the method further includes: updating the metadata of the first data in the second memory to metadata of the second data.

[0008] In this way, the optical storage system can directly read the second data based on the metadata of the second data, so as to find the second data more quickly.

[0009] In a possible implementation, the first memory further includes a third storage area, and the third storage area stores metadata of the first data; the method further includes: updating the metadata of the first data in the third storage area to the second metadata.

[0010] This facilitates the optical storage system to directly read the second data based on its metadata, facilitating faster search of the second data. Furthermore, if the metadata of the second data in one of the second memory or the third storage area is abnormal, the second data can be read from the metadata of the second data in the other second memory or the third storage area, thereby facilitating smooth reading of the second data and improving the reliability of data storage in the optical storage system.

[0011] In one possible implementation, the metadata of the second data includes or indicates a location of the second data in the second storage area.

[0012] In this way, it is convenient to clarify the storage location of the second data based on the metadata of the second data, which helps to improve the efficiency of reading the second data.

[0013] In a possible implementation, the method further includes: receiving a first read request, the first read request being used to request reading of the first data; and reading the second data from the second storage space according to the location in response to the first read request.

[0014] In a possible implementation, the data size of the first data is smaller than or equal to the size of the second storage space.

[0015] In this way, it is ensured that the second storage space can accommodate the second data, and it is ensured that the second data can be successfully stored in the second storage space.

[0016] In a possible implementation, the ratio of the size of the second storage area to the size of the storage space provided by the first memory is a first value. Optionally, the first value is, for example, 0.01 (or 1%).

[0017] In the above implementation, the first value may be pre-stored in the optical storage system, or may be determined by the optical storage system itself, which is not limited.

[0018] In this way, the larger the storage space provided by the first memory, the larger the size of the second storage area is, so that the size of the second storage area corresponding to different memories can be flexibly set.

[0019] In a possible implementation, the method further includes: if the second storage area is full, setting the state of the first storage to a non-writable state. Optionally, the first storage area is also full.

[0020] In this way, the data in the first memory can be prevented from being tampered with, thereby ensuring the security of the data in the first memory.

[0021] In a second aspect, embodiments of the present application provide a data processing system. The system includes a controller and a first memory, the first memory including a first storage area and a second storage area, the first storage area storing at least one data item and verification data corresponding to the at least one data item; if first data item in the at least one data item is damaged, the controller is configured to recover the first data item based on undamaged data item in the at least one data item and the verification data to obtain second data item; and the controller is configured to write the second data item into the second storage area.

[0022] In a possible implementation, the second storage area is a storage area reserved in the first memory, and the second storage area is used for data recovery.

[0023] In a possible implementation, the controller is further configured to, before obtaining the second data, determine that the size of the first data is smaller than or equal to the size of the second storage area.

[0024] In one possible embodiment, the system also includes at least one third memory and a fourth memory; if the size of the first data is larger than the size of the second storage area, the controller is also used to recover the first data based on the data in the at least one third memory, obtain the third data, and write the third data, at least one data other than the first data, and the verification data into the fourth memory.

[0025] In a possible implementation, the system further includes a second memory storing metadata of the first data; and the method further includes: updating the metadata of the first data in the second memory to the metadata of the second data.

[0026] In a possible implementation, the first memory further includes a third storage area, and the third storage area stores metadata of the first data; the method further includes: updating the metadata of the first data in the third storage area to metadata of the second data.

[0027] In a possible implementation, the metadata of the second data includes a location of the second data in the second storage area.

[0028] In a possible implementation, the method further includes: receiving a first read request, the first read request being used to request reading of the first data; and reading the second data from the second storage space according to the location in response to the first read request.

[0029] In a possible implementation, the data size of the first data is smaller than or equal to the size of the second storage space.

[0030] In a possible implementation, a ratio of the size of the second storage area to the size of the storage space provided by the first memory is a first value.

[0031] In a possible implementation, the method further includes: if the second storage area is full, setting the state of the first memory to a non-writable state.

[0032] In a third aspect, embodiments of the present application provide a data processing device. The device may be the optical storage system described in the first aspect, or a component (such as a controller or chip) provided in the optical storage system. The data processing device includes corresponding means or modules for executing the first aspect or any possible implementation method described above. For example, the data processing device includes a processing module (sometimes also referred to as a processing unit). Optionally, the data recovery device also includes a communication module (sometimes also referred to as a communication unit).

[0033] For example, if first data in at least one data is damaged, the processing module is used to restore the first data based on undamaged data in the at least one data and the check data, obtain second data, and write the second data into the second storage area.

[0034] The data processing device can also execute any possible implementation of the first aspect above, which will not be listed one by one here.

[0035] In a fourth aspect, an embodiment of the present application provides a data processing device (or may also be referred to as a data processing apparatus). The data processing device includes: a processor, which may be used to implement any of the methods described in the first aspect above. Optionally, the data processing device further includes a memory, the memory being used to store one or more computer programs, the one or more computer programs including computer-executable instructions, and when the data processing apparatus is running, the processor executes the one or more computer programs stored in the memory, so that the data processing device performs the method as described in the first aspect or any possible embodiment. Optionally, the memory may be the internal memory of the data processing device.

[0036] Optionally, the data processing device further includes other components, such as an antenna, an input / output module, an interface, etc. These components may be hardware, software, or a combination of software and hardware.

[0037] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store computer programs or instructions, and when the computer-readable storage medium is executed, implements the method described in the first aspect or any possible implementation method.

[0038] In a sixth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, implements the method described in the first aspect or any possible implementation manner.

[0039] Regarding the beneficial effects of any technical solution in the second to sixth aspects above, reference may be made to the discussion of the beneficial effects of the corresponding technical solution in the first aspect, and the repeated parts will not be listed again. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic structural diagram of an optical storage system applicable to embodiments of the present application;

[0041] Figure 2 A schematic structural diagram of another optical storage system applicable to embodiments of the present application;

[0042] Figure 3 A schematic structural diagram of another optical storage system applicable to the embodiments of the present application;

[0043] Figure 4 This is a schematic diagram of the principle of an inter-disk data recovery mechanism;

[0044] Figure 5 A schematic diagram of the principle of a disk data recovery mechanism;

[0045] Figure 6 A schematic diagram of the structure of an optical storage system provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of a data processing method provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of at least one data provided in an embodiment of the present application;

[0048] Figure 9 A schematic diagram of a process for writing second data provided in an embodiment of the present application;

[0049] Figure 10 A schematic diagram of another data processing method provided in an embodiment of the present application;

[0050] Figure 11 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0051] Figure 12A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

[0053] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0054] 1. Redundant recovery code (RRC) technology is used in data storage systems. It provides data redundancy and fault tolerance to address data corruption. The basic principle of RRC technology is to introduce redundant information to the original data. This redundant information, along with part of the original data, can be used to recover another part of the original data.

[0055] Erasure coding (EC) is a typical RRC technology. With EC, a checksum algorithm can be used to calculate checksum data for the original data. If part of the original data is corrupted, the corrupted data can be restored using another part of the original data and the checksum data. EC-based checksum algorithms include array erasure codes, Reed-Solomon (RS) erasure codes, and low-density parity check (LDPC) erasure codes, among others, though these are not limited.

[0056] Under EC verification, the original data and verification data can be stored in a stripe. The stripe includes multiple stripe units, which can also be called strips or stripe units. The size of any two stripe units in the multiple stripe units is the same. A part of the multiple stripe units is used to store data, and this part of the stripe units used to store data can also be called data units, data stripes, or data stripe units, etc. Another part of the multiple stripe units is used to store verification data corresponding to the data, and this part of the stripe units used to store verification data can also be called verification units, verification stripes, or verification stripe units, etc.

[0057] In one possible design, the storage space provided by stripes is provided by memory in a storage system, or can be described as mapping the physical storage space (or logical storage space) in the memory into stripes. The memory includes optical discs or storage nodes with storage functions. For example, a storage node can be one or more optical discs, or a server or other device with communication and storage functions, without specific limitation.

[0058] 2. Disk sealing: After a storage device (such as an optical disc) executes the disk sealing command, it can only support reading, not writing. Optionally, after the storage device is full, the disk sealing command is executed, rendering it in a non-writable state. Disk sealing prevents data in the storage device from being tampered with. Disk sealing can also be understood as rendering the storage device in a non-writable (or non-appendable) state.

[0059] 3. Data refers to stored raw data. The data may be in the form of at least one of text, images, audio, video, or files. The Xth data (e.g., first data) involved in the embodiments of the present application may be part or all of the raw data. For example, if the raw data is in the form of a file, then the first data may be at least one data block corresponding to the file, without limitation.

[0060] 4. Metadata, also known as metadata information, is used to describe the characteristic information of data. Metadata is used to describe (or indicate) the storage information and / or attribute information of data. Storage information includes, for example, the location of the data (i.e., the location where the data is stored), the size (or length) of the data, and the offset of the data. Attribute information includes, for example, at least one item such as the size of the data, the name of the data, or the permissions of the data. The location of the data includes, for example, at least two of the starting position, the ending position, or the size of the data block. The location of the data can also be represented in other ways, which are not specifically limited. The offset of the data can be, for example, the offset of the data relative to the starting data of the original data where the data is located, or it can be the offset of the data relative to a reference position. For example, if the data is the 2nd megabyte (MB) of the original data, then the offset of the data can be 2MB. The permissions of the data include, for example, the permission to access the data. For example, the original data includes a file, and the metadata of the file includes the file name, permissions, and other attributes, as well as the location of the file.

[0061] In the embodiments of the present application, the number of nouns, unless otherwise specified, means "singular noun or plural noun", that is, "one or more". "At least one" means one or more, and "plural" means two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. For example, A / B means: A or B. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c means: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0062] The solutions provided in the embodiments of this application are applicable to optical storage systems that involve data recovery or reconstruction. An optical storage system is a system that uses optical technology to store data. The following, combined with the accompanying drawings, describes the schematic architecture of an optical storage system applicable to the embodiments of this application.

[0063] Please refer to Figure 1 , is a schematic diagram of the architecture of an optical storage system applicable to an embodiment of the present application. Figure 1 It can also be regarded as a centralized optical storage system. Figure 1 As shown, the optical storage system includes at least one controller, at least one optical drive, at least one robot and at least one memory. Figure 1 In addition to illustrating the optical storage system, application servers and switches are also illustrated. Figure 1 It illustrates that the number of controllers is 1, the number of optical drives is 3, the number of robots is 1, the number of storages is 3, the number of application servers is 2, and the number of switches is 2. In practice, there is no limit on the number of these components or devices.

[0064] Users can use application servers to store (or write) data to and / or read data from optical storage systems. An application server is a device that runs an application program that provides storage services. Application servers are sometimes also referred to as hosts or user devices. Application servers typically have communication and processing capabilities, such as servers or terminal devices. Terminal devices include desktop computers, laptops, in-vehicle devices, mobile devices, and wearable devices.

[0065] The application server can access the optical storage system via a network to store and / or retrieve data. The network includes a wired network or a wireless network. Alternatively, the application server can access the optical storage system via a switch. The switch can be, for example, a fiber optic switch or an Ethernet switch, and is not specifically limited thereto.

[0066] For example, an application server initiates a write request to an optical storage system. The write request requests the optical storage system to write data. After receiving the write request, the optical storage system controls at least one memory device through a controller to store the data. During the data write process, the controller can optionally control a robotic arm to move the memory device to a corresponding optical drive. The controller then uses the optical drive to store the data in the memory device. After writing the data, the controller can also control the robotic arm to move the memory device back to its original location.

[0067] For another example, an application server initiates a read request to an optical storage system. This read request is used to request data from the optical storage system. After the optical storage system receives the read request, it can read the data from at least one memory device through a controller. During the data read process, the controller can control a robotic arm to move the memory device to a corresponding optical drive. The controller then reads the data from the memory device through the optical drive. After reading the data, the controller can also control the robotic arm to move the memory device back to its original location.

[0068] The controller includes a central processing unit (CPU). Optionally, the controller also includes memory. The CPU can process external or internal data write requests or data read requests, etc. Memory refers to a memory storage device that can directly exchange data with the CPU. The CPU can perform write operations or read operations on the memory. For example, the memory can cache data, and a subsequent controller can quickly read the data from the memory. The memory can include one or more types of memory, and the embodiments of the present application do not limit the number and type of memory.

[0069] At least one memory may be a persistent memory. At least one memory may be a storage medium or a storage node. The storage medium may be an optical storage medium or other types of storage medium, such as a CD, a digital versatile disc (DVD), or a Blu-ray disc (BD), etc., which is not limited in the embodiments of the present application. A storage node refers to a device having a storage function, such as a server or server cluster having a storage function.

[0070] Part or all of the at least one memory can be used for persistent storage of data and verification data. This part or all of the memory can be referred to as optical memory. This part or all of the memory can be an optical storage medium or a storage node including an optical storage medium. Optionally, the optical storage system can include one or more memory cartridges, which can be used to accommodate this part or all of the memory. One or more memories can be accommodated in one of the memory cartridges.

[0071] In the case where a portion of the at least one memory can be used for persistent storage of data and verification data, another portion of the at least one memory can optionally be used to store metadata for the data. This other portion of the memory can be referred to as a second memory. The second memory can be an optical memory or other type of memory, without limitation. For example, the second memory can be a hard disk drive (HDD) or a solid-state drive (SSD).

[0072] Please refer to Figure 2 , is a schematic diagram of the architecture of another optical storage system applicable to an embodiment of the present application. Figure 2 It can also be regarded as a separate optical storage system. Figure 2 As shown, the optical storage system includes a management server and a storage cabinet. Figure 2 It is shown that the number of management servers is 1 and the number of storage cabinets is 1. In practice, there is no limit on the number of management servers and storage cabinets.

[0073] The management server is used to manage the storage cabinet. The management server includes a controller and a memory (for the sake of distinction, the memory included in the management server is referred to as the second memory). The implementation of the second memory can refer to Figure 1 The contents of the second memory involved will not be listed again where they are repeated. Figure 2 The number of controllers and the number of second memories are shown as one, but the number of controllers and second memories is not limited. The controller is used to control metadata, etc., of data stored in the second memory. The controller can also control the memory in the memory cabinet to store data and / or read data from the memory in the memory cabinet.

[0074] The storage cabinet includes at least one optical drive, at least one storage, such as Figure 2 The first memory, the third memory and the fourth memory, at least one control unit and at least one manipulator, etc. are shown. Figure 2 It illustrates that the number of optical drives is 3, the number of memories is 3, the number of control units is 1, and the number of manipulators is 1, but there is no actual limit on the number of these components.

[0075] The control unit receives instructions from the controller and controls the manipulator to execute corresponding processes. For example, the controller may send a data write instruction to the control unit. After receiving the instruction, the control unit may move one of the at least one memories to the corresponding optical drive. The control unit then writes the data to the memory via the optical drive. For another example, the controller may send a data read instruction to the control unit. After receiving the instruction, the control unit may control the manipulator to move a memory to the corresponding optical drive. The control unit then reads the data from the memory via the optical drive.

[0076] Figure 2 In addition to the optical storage system, the application server and switch are also shown. The content of the application server and switch can be referred to Figure 1 The content of application servers and switches discussed here will not be listed again.

[0077] Optionally, the optical storage system may include one or more memory cartridges, and part or all of the at least one memory may be disposed in one or more memory cartridges.

[0078] Optional, Figure 2 The control units and controllers involved can be used as Figure 1 An example of a controller involved. In other words, Figure 2 The control units and controllers involved are equivalent to realizing Figure 1 Functionality of the controllers involved.

[0079] Figure 3 This is a schematic diagram of the architecture of another optical storage system applicable to the embodiments of the present application. Figure 3 Can be regarded as Figure 2 An example of the optical storage system involved, specifically, Figure 3 by Figure 2 The storage cabinet involved is an optical disk cabinet as an example, and Figure 3 Therefore Figure 2 The memory involved is an optical disc as an example. Figure 3 The optical storage system shown includes a management server and an optical disk cabinet.

[0080] For the content of the management server, please refer to the previous article Figure 2 The content of the management server discussed is not listed here. The CD cabinet includes at least one CD drive, at least one CD, a manipulator and a control unit. The CD can be used as Figure 2 Optionally, the at least one optical disc may also be arranged in one or more optical disc cartridges.

[0081] above Figures 1 to 3This is an example of an optical storage system applicable to the embodiments of the present application, and does not actually limit the optical storage system to which the embodiments of the present application can be applied.

[0082] Below Figure 3 Taking the optical storage system shown in FIG. 1 as an example, two data recovery mechanisms involved in the optical storage system are introduced.

[0083] The first data recovery mechanism is the inter-disk data recovery mechanism. The basic principle of the inter-disk data recovery mechanism is to use the data stored on multiple optical discs to recover the damaged data on a certain optical disc.

[0084] For example, if some data on a disc is corrupted, the data on that disc can be restored using intact data from other discs and verification data, and the restored data can be stored on a new disc. Because discs are sealed when full, even if only a portion of the data on a disc is corrupted, the entire disc must be restored and migrated. This data recovery mechanism is quite expensive.

[0085] Figure 4 A schematic diagram illustrating the principle of an inter-disk data recovery mechanism. Figure 4 It can also be seen as a distribution diagram of the storage layer of the optical storage system. Figure 4 For example, an optical storage system includes four optical discs. The storage space of each of these four discs can be divided into multiple blocks. Some blocks from the four discs can correspond to (or be mapped to) data units, which are used to store data. Some blocks from the four discs can also correspond to (or be mapped to) check units, which are used to store data verification data.

[0086] For example, some data on a disc is damaged (such as Figure 4 If the data in the first data unit from left to right in the disc is damaged), it is necessary to use the data in the data units in the remaining three discs (such as Figure 4 The data in the second data unit to the fourth data unit from left to right in the data unit), and the check data in the check unit (such as Figure 4 The data in the optical disc can be restored by using the verification data in the first verification unit and the second verification unit from left to right in FIG.

[0087] In order to reduce the data recovery cost, a second data recovery mechanism is introduced, namely the on-disk data recovery mechanism. The basic principle of the on-disk data recovery mechanism is to use the data stored in a disc to recover the damaged data on the disc.

[0088] For example, if some data on an optical disc is corrupted, the data on that disc can be restored using the intact data on that disc and the checksum data. Since optical discs are sealed when full, even if data on that disc is corrupted, data recovery can only be performed when reading data from that disc. In other words, data recovery is required every time corrupted data is read. This requires more processing time for the optical storage system to read data, reducing the system's efficiency.

[0089] Figure 5 This diagram illustrates the principle of a data recovery mechanism within a disc. Alternatively, it can be viewed as a schematic diagram of the storage layer distribution of an optical storage system. The storage space of an optical disc can be divided into multiple blocks. Some blocks within the disc can correspond to (or be mapped to) data units, which are used to store data. Some blocks within the disc can also correspond to (or be mapped to) check units, which are used to store checksum data.

[0090] For example, some of the data in this CD (such as Figure 5 If the data in the first data unit from left to right in the disc is damaged, it is necessary to use the data in the remaining data units in the disc (such as Figure 5 The data in the second data unit from left to right, and the data in the third data unit), and the check data in the check unit (such as Figure 5 The data in the optical disc is restored based on the verification data in the first verification unit from left to right and the verification data in the second verification unit.

[0091] In view of this, an embodiment of the present application provides a data processing method. In this method, any memory in an optical storage system (such as a first memory) includes a first storage area and a second storage area. The first storage area is used to store data, and the second storage area is a reserved storage area for storing recovered data. When data in the first memory is damaged, the damaged data can be restored using undamaged data and verification data in the memory, and the restored data can be written to the second storage area. On the one hand, since the entire memory does not need to be reconstructed when recovering data, processing overhead is reduced. On the other hand, when reading data, the corresponding data can be read from the second storage area based on the restored data. This eliminates the need to restore data each time data is read, reducing the processing load of the optical storage system and improving the efficiency of data reading by the optical storage system. Furthermore, since the second storage area and the first storage area are both located in the same memory, the difficulty of data reading by the optical storage system is reduced, which also helps to improve data reading efficiency.

[0092] Please refer to Figure 6 , which is a schematic diagram of the distribution of the storage space of the memory provided in an embodiment of the present application. Figure 6 The memory is indicated. Figure 6 The memory involved can be, for example, Figure 1 The memory involved, Figure 2 The first memory involved, Figures 3 to 5 Any of the CDs involved. Figure 6 As shown, the memory includes a first storage area and a second storage area. The first storage area may also be referred to as a first storage area or a data area, etc., and is used to store data. Optionally, the first storage area is also used to store verification data of the data. The second storage area may be referred to as a second storage area or a reserved area, etc., and is a reserved storage area for recovering data (or described as being used to store recovered data).

[0093] In the event that the data in the first storage area is damaged, the optical storage system can use part or all of the undamaged data in the first storage area and the verification data to restore the data and write the restored data into the second storage area. In this way, the restored data is still stored in the memory.

[0094] In a possible design, the memory further includes a third storage area. The third storage area can be called a third storage region or a metadata area, etc., which is used to store metadata corresponding to the data.

[0095] The first storage area, the second storage area, and the third storage area may all be physical storage space concepts. For example, the first storage area, the second storage area, and the third storage area are obtained by dividing the physical storage space of the memory. Alternatively, the first storage area, the second storage area, and the third storage area may all be logical storage space concepts. For example, the first storage area, the second storage area, and the third storage area are obtained by dividing the logical storage space of the memory.

[0096] In a possible design, at least one of the first storage area, the second storage area, and the third storage area may be a continuous storage space (such as a physical storage space or a logical storage space). Figure 6 As shown in (1), the first storage area, the second storage area and the third storage area are all continuous storage spaces (such as physical storage spaces or logical storage spaces). Alternatively, at least one of the first storage area, the second storage area and the third storage area may also include K discontinuous storage spaces, which is not specifically limited. K is an integer greater than 1, such as 2, 3 or 4. Figure 6 As shown in (2), the first storage area and the second storage area each include two discontinuous storage spaces.

[0097] Optionally, the size relationship between the first storage area, the second storage area, and the third storage area can be arbitrary. For example, the size of the first storage area can be larger than the size of the second storage area and the size of the third storage area. The size of the second storage area can be smaller than, larger than, or equal to the size of the third storage area, and this is not specifically limited.

[0098] Of course, the memory may include other storage areas in addition to the first storage area, the second storage area, and the third storage area, which is not specifically limited. In other words, the sum of the sizes of the first storage area, the second storage area, and the third storage area may be less than or equal to the storage space that the memory can provide.

[0099] The above is an example introduction to some optical storage systems applicable to the embodiments of the present application, and does not actually limit the optical storage systems to which the embodiments of the present application can be applied.

[0100] The method provided in the embodiments of the present application is described below with reference to the accompanying drawings.

[0101] In the accompanying drawings corresponding to the various embodiments of the present application, all steps indicated by dotted lines are optional steps. Also, the application server described in the various embodiments of the present application may be, for example, Figure 1 、 Figure 2 or Figure 3 The application server involved, the optical storage system is for example Figures 1 to 5 In any optical storage system, the controller may be, for example, Figure 1 、 Figure 2 or Figure 3 The controller involved, the first memory is for example Figure 1 The memory involved, Figure 2 The first memory involved, Figures 3 to 5 Any of the optical discs involved, the second memory is, for example, Figures 1 to 3 Any of the second memory and the third memory involved is, for example, Figure 1 Any memory involved, Figure 2 Any third memory involved, Figures 3 to 5 In any of the optical discs involved, the fourth memory is, for example, Figure 1 Any memory involved, Figure 2 Any fourth memory involved, Figures 3 to 5 Any of the optical discs involved, and the first storage area, the second storage area and the third storage area are, for example, Figure 6 The first storage area, the second storage area and the third storage area involved. The devices and components in the various embodiments of the present application may have other names or functions, which are not specifically limited.

[0102] Please refer to Figure 7, which is a schematic diagram of a data processing method provided in an embodiment of the present application. Figure 7 The embodiment discussed here takes the optical storage system as an example to introduce the data processing method. In fact, the data processing method provided in the embodiment of the present application can be executed by a device (such as a management server) or a component (such as a controller or a control unit) in the optical storage system, and there is no specific limitation on this. Figure 7 The following are the steps shown in the figure.

[0103] S701: If first data in at least one data is damaged, the optical storage system recovers the first data according to undamaged data in the at least one data and verification data to obtain second data.

[0104] The optical storage system can divide the storage space of the first memory into a first storage area and a second storage area when initializing the first memory. The first memory is any memory used for data storage in the optical storage system. For example, if the optical storage system includes multiple optical discs, then the first memory can be one of the multiple optical discs. For example, the controller in the optical storage system (such as the controller in the management server) can divide the storage space of the first memory. Alternatively, the first memory is divided into a first storage area and a second storage area by default when it leaves the factory. In short, the first memory includes a first storage area and a second storage area. The first storage area is used to store data and data verification data, etc. The second storage area is a reserved storage area for storing recovered data. Optionally, the first memory also includes a third storage area. The third storage area is used to store data metadata.

[0105] In one possible design, the ratio of the size of the second storage area to the size of the storage space that can be provided by the first memory can be a first value. The first value can be, for example, 1% (or 0.01) or 2% (or 0.02). In this way, the larger the storage space that can be provided by the first memory, the larger the size of the second storage area is, so that the size of the second storage area corresponding to different memories can be flexibly set.

[0106] Alternatively, the optical storage system may use part or all of the storage space of the first storage device except the second storage device as the first storage device. Alternatively, the optical storage system may divide part or all of the storage space of the first storage device except the second storage device into the first storage device and the third storage device.

[0107] When storing data in the first memory, the optical storage system may use a redundant recovery code technology to store at least one data. The form of the at least one data may refer to the form of the data discussed above and is not specifically limited thereto.

[0108] Exemplarily, the optical storage system can calculate (or determine) verification data for at least one data item based on a first verification algorithm. The verification data can be considered redundant data calculated based on the at least one data item and used for data recovery. The first verification algorithm can be, for example, the verification algorithm discussed above, and the specific implementation of the first verification algorithm is not limited. The optical storage system can store the at least one data item and the verification data in a first storage area of ​​a first memory. Accordingly, the at least one data item and the verification data can be understood as data stored based on redundant recovery code technology.

[0109] Optionally, the first storage area may include or correspond to one or more stripes, and at least one data and verification data are stored or written in a stripe. Among them, at least one data can be regarded as the stored original data. For example, at least one data is stored in a data unit included in a stripe of the first storage area, and the verification data is stored in a verification unit included in a stripe of the first storage area. In this case, the first value can be greater than or equal to the size of a data unit, for example, the first value is the size of a positive integer number of data units. The first storage area may also store other data and verification data of other data, etc., which is not limited.

[0110] For example, if file A is 992 MB in size, the optical storage system may divide file A into 31 data blocks, each of which is 32 MB in size. The optical storage system may store the file in a 31+1 redundant format, meaning it may store 31 data blocks and one check data block corresponding to each of the 31 data blocks. The 31 data blocks may be considered an example of at least one data block in accordance with an embodiment of the present application, and the one check data block may be considered an example of check data.

[0111] During or after storing at least one data item, the optical storage system may record metadata for the at least one data item. For example, the optical storage system may store the metadata for the at least one data item in the second memory. The metadata for the at least one data item indicates (or includes) a location where the at least one data item is stored. The location where the at least one data item is stored is also the location of the at least one data item in the first storage area.

[0112] For example, the metadata of one of the at least one data includes at least two items: the starting position, ending position, or size of the data in the first storage area, where the at least two items represent the location of the data. Optionally, the metadata of the at least one data also includes an offset and / or attributes of the data relative to the starting position of the at least one data. The offset of the data relative to the starting data of the at least one data and the size of the data are used to represent the location of the data. Attributes include names.

[0113] In one possible design, the optical storage system can also store metadata for at least one data item in a third storage area. This allows the optical storage system to obtain metadata for at least one data item from the other of the second or third storage areas, even if an abnormality occurs in the second or third storage area, or if metadata for at least one data item in one of the second or third storage areas is damaged. This improves the optical storage system's data read success rate and enhances its reliability.

[0114] In addition to recording metadata for the at least one data item, the optical storage system may optionally also record metadata for verification data for the at least one data item. For example, the optical storage system may store the verification data for the at least one data item in a second memory. Optionally, the optical storage system may also store the metadata for the verification data for the at least one data item in a third storage area. The content of the metadata for the verification data may refer to the content of the metadata for the at least one data item and is not further detailed here.

[0115] For example, see Figure 8 , which is a schematic diagram of at least one data provided in an embodiment of the present application. Figure 8 At least one data includes eight data blocks from data block 1 to data block 8 (specifically, Figure 8 The data blocks 1-1, 1-2, 1-3, 1-4, 1-5, 1-6, 1-7 and 1-8 shown in FIG, and the check data are 1 check block corresponding to these 8 data blocks (specifically as shown in FIG. Figure 8 Take the check block 1-1) shown as an example.

[0116] like Figure 8 As shown, the metadata corresponding to data block 1-1 includes that the offset of data block 1-1 is 0MB, the position is position 1, and the size is 2MB. The metadata corresponding to data block 1-2 includes that the offset of data block 1-2 is 2MB, the position is position 2, and the size is 1MB. The metadata corresponding to data block 1-3 includes that the offset of data block 1-3 is 3MB, the position is position 3, and the size is 5MB, and so on.

[0117] By analogy, the optical storage system can fill the first storage area. In other words, the first storage area is full. The first storage area is full when the storage space that can be provided by the first storage area is filled with data and verification data, or when the remaining storage space in the first storage area is less than or equal to the first threshold. After the first storage area is full, or even if the first storage area is not full, the optical storage system can detect in real time or periodically whether part or all of at least one data is damaged. The embodiment of the present application is introduced by taking the damage of the first data as an example. The damage of the first data means that the optical storage system cannot read the first data correctly or cannot read the first data at all. The damage of the first data includes the first data being abnormal, being unable to be read normally, or the first data being lost. The following introduces the way in which the optical storage system determines the damage of the first data.

[0118] Exemplarily, if the optical storage system records metadata for the first data but the first storage area does not contain the first data, then the first data is lost, indicating that the first data is corrupted. Alternatively, if the optical storage system determines that it cannot correctly read the first data, then the first data is abnormal, indicating that the first data is corrupted. Alternatively, the optical storage system calculates check data based on at least one data stored in the first storage area. If the calculated check data is inconsistent with the check data stored in the first storage area, then the optical storage system may determine that the first data in the at least one data is corrupted. The optical storage system can determine that the first data is corrupted in a variety of ways, which are not specifically limited.

[0119] If the first data is damaged, the optical storage system can restore the first data based on the undamaged (or uncorrupted) data in the at least one data set and the verification data. For example, the optical storage system can perform corresponding calculations on the undamaged data in the at least one data set and the verification data based on a first verification algorithm to restore the first data. For ease of distinction, in this embodiment of the application, the restored data is referred to as the second data. The first data can be considered the original data previously stored, and the second data can be considered the data restored from the first data. The content of the second data is the same as or similar to that of the first data.

[0120] S702: The optical storage system writes the second data into the second storage area of ​​the first memory.

[0121] After the second data is written to the second storage area, determine whether the second storage area is full. For example, if the size of the second data is equal to the remaining storage space of the second storage area, then after the second data is written to the second storage area, the second storage area is full. The size of the remaining storage space of the second storage area may be less than or equal to the size of the storage space that the second storage area can provide. For example, before the second data is written to the second storage area, the second storage area does not store other recovered data, then the remaining storage space of the second storage area is equal to the storage space that the second storage area can provide. Alternatively, before the second data is written to the second storage area, the second storage area stores other recovered data, then the size of the remaining storage space of the second storage area is less than the size of the storage space that the second storage area can provide.

[0122] If both the second storage area and the first storage area are full, the optical storage system can set the first storage area to a non-writable state. In other words, the first storage area cannot support further writing of data, or cannot support additional writing of data. This prevents data tampering in the first storage area, thereby ensuring data security.

[0123] Before the storage system writes the second data into the second storage area, the optical storage system may determine a relationship between the size of the second data and the size of the remaining storage space in the second storage area.

[0124] If the size of the second data is less than or equal to the size of the remaining storage space of the second storage area, the optical storage system may write the second data into the second storage area of ​​the first memory.

[0125] If the size of the second data is larger than the remaining storage space in the second storage area, the optical storage system may write the second data, the at least one first data, and the verification data into the fourth storage area, thereby reconstructing the first storage area. Alternatively, the optical storage system may utilize an inter-disk recovery mechanism to recover the first data and reconstruct the first storage area. For example, the optical storage system may recover the first data based on data in some or all of the remaining storage areas (e.g., the at least one third storage area) other than the first storage area to obtain third data, and then write the third data, the at least one data item other than the first data, and the verification data into the fourth storage area.

[0126] For example, see Figure 9 , is a schematic diagram of a process of writing second data provided by an embodiment of the present application. Figure 9 As shown, the first storage area stores 9 copies of data, such as data 1 to data 9 (such as Figure 9Data 1 in these nine copies specifically includes data blocks 1-1 to 1-8, and check blocks 1-1 corresponding to data blocks 1-1 to 1-8. Data 1 can be considered an example of at least one piece of data and at least one corresponding check data. Data blocks 1-1 to 1-8 can be considered an example of at least one piece of data. Check block 1-1 can be considered an example of check data.

[0127] The optical storage system detects that data blocks 1-3 are damaged (at Figure 9 If data blocks are damaged (indicated by "×" in the figure), the optical storage system can use data blocks 1-1, 1-2, 1-4 to 1-8, and check block 1-1 to recover data block 1-3, thereby obtaining recovered data block 1-3. Data blocks 1-1, 1-2, 1-4 to 1-8 can be considered as examples of undamaged data in the at least one data block.

[0128] The restored data blocks 1-3 can be regarded as an example of the second data. The optical storage system can write the restored data blocks 1-3 into the second storage area.

[0129] To facilitate reading of the second data, the optical storage system may record metadata for the second data during or after writing the second data to the second storage area. The metadata for the second data indicates the location where the second data is stored, i.e., the location of the second data in the second storage area. For example, the metadata for the second data includes at least two items: a starting position and an ending position of the second data in the second storage area, or a size of the second data, wherein these at least two items characterize the location of the second data. Optionally, the metadata for the second data also includes an offset of the second data relative to a starting data item in the at least one data item.

[0130] In one possible design, the optical storage system may store the metadata of the second data in the second memory. Alternatively, the optical storage system may also store the metadata of the second data in a third storage area. In this way, if the optical storage system cannot read the metadata of the second data from the second memory, it can read the second data based on the metadata of the second data in the third storage area.

[0131] In another possible design, the optical storage system may directly update the metadata of the first data to the metadata of the second data, for example, by overwriting the metadata of the second data with the metadata of the first data.

[0132] For example, if metadata for the first data is stored in the second memory, the optical storage system can update the metadata for the first data in the second memory with the metadata for the second data. If metadata for the first data is stored in the third memory area, the optical storage system can update the metadata for the first data in the third memory area with the metadata for the second data. When reading the first data, the optical storage system can read the second data based on the metadata for the second data. This eliminates the need for the optical storage system to attempt to read the first data based on the metadata for the first data, thereby improving the efficiency of the optical storage system in reading data.

[0133] For example, taking the first data as Figure 8 Taking the data block 1-3 shown as an example, if the recovered metadata of the data block 1-3 is at position 4, then position 3 of the data block 1-3 can be updated to position 4, which is equivalent to restoring the metadata of the first data to the metadata of the second data.

[0134] The following combination Figure 10 The schematic diagram of the data processing method shown is Figure 7 The interaction between various devices in the optical storage system is introduced by way of example. Figure 10 The three stages of data processing are illustrated, including stage 1 (data writing stage), stage 2 (data recovery stage) and stage 3 (data reading stage). Each stage is introduced below.

[0135] Phase 1, the data writing phase, includes steps S1001 to S1004, which are described below respectively.

[0136] S1001: An application server sends a first write request to a controller. Correspondingly, the controller receives the first write request from the application server. The first write request is used to request writing at least one data.

[0137] Optionally, the first write request carries at least one data, and the at least one data is used to request writing at least one data. The content of the at least one data can refer to the above. Figure 7 The content of at least one data discussed is not listed here.

[0138] S1002: The controller determines verification data of at least one data.

[0139] The controller can determine the verification data of at least one data according to the first verification algorithm and at least one data. The content of the first verification algorithm and the content of the verification data can refer to the above text respectively. Figure 7 The content of the first verification algorithm and the content of the verification data discussed are not listed here again.

[0140] S1003: The controller writes at least one data and verification data into the first storage area of ​​the first memory.

[0141] In the case where the optical storage system further includes a control unit, the controller can control the optical drive to write at least one data and verification data to the first storage area of ​​the first memory through the control unit. In the case where the optical storage system does not include a control unit, the controller controls the optical drive to write at least one data and verification data to the first storage area of ​​the first memory. The contents of the first memory and the contents of the first storage area can be respectively referred to in the above text. Figure 7 The contents of the first memory and the contents of the first storage area are discussed, and the repeated parts are not listed again.

[0142] S1004: The controller writes metadata of at least one data into the second memory.

[0143] In the case where the second memory belongs to an optical storage medium, the way in which the controller writes metadata of at least one data into the second memory can refer to the way in which at least one data and verification data are written into the content of the first storage area. In the case where the second memory belongs to other storage media, the controller can write metadata of at least one data into the second memory.

[0144] In a possible design, the controller can also write metadata of at least one data into the third storage area of ​​the first memory. The content of the third storage area can refer to the above Figure 7 The contents of the third storage area discussed above will not be listed here.

[0145] Optionally, the controller may further send a first write response to the application server. The first write response indicates that at least one data item has been written. The first write response may carry an identifier of each data item in the at least one data item, or an identifier of at least one data item.

[0146] The controller may have stored at least one data before, or the optical storage system may have multiple ways of writing at least one data. In these cases, it may not be necessary to perform steps S1001 to S1004, that is, S1001 to S1004 are optional steps. Figure 10 Indicated by dotted line.

[0147] Phase 2, data recovery phase, includes steps S1005 to S1007, which are described below.

[0148] S1005: If the first data is damaged, the controller restores the first data and obtains the second data.

[0149] For details on the first data damage, the first data recovery, and the second data, please refer to the previous section. Figure 7The contents of the first data damage, the first data recovery and the second data are discussed, and the repeated parts are not listed again.

[0150] S1006: The controller writes the second data into the second storage area of ​​the first memory.

[0151] The controller writes the second data into the second storage area of ​​the first memory, which can refer to the controller writing at least one data and verification data into the first storage area of ​​the first memory discussed above, and is not listed here. Figure 7 The content of the discussion will not be listed here.

[0152] S1007: The controller updates the metadata of the first data in the second memory to the metadata of the second data.

[0153] The content of updating the metadata of the first data to the metadata of the second data can refer to the above Figure 7 The content of updating the metadata of the first data to the metadata of the second data discussed above will not be listed here again.

[0154] In another possible implementation, the controller may store the metadata of the second data in the second memory. Alternatively, the controller may also store the metadata of the second data in the third storage area. In this case, step S1007 may not be performed, that is, step S1007 is an optional step. Figure 10 Indicated by dotted lines.

[0155] Phase 3, the data reading phase, includes steps S1008 to S1011, which are introduced below.

[0156] S1008: The application server sends a first read request to the controller. Correspondingly, the controller receives the first read request from the application server. The first read request is used to request to read the first data.

[0157] Optionally, the first read request carries an identifier of the first data, and the identifier of the first data is used to request reading the first data.

[0158] S1009: The controller obtains the location of the second data from the second memory.

[0159] The controller may determine metadata corresponding to the second data from metadata stored in the second memory based on the identifier of the first data to obtain the location of the second data.

[0160] S1010: The controller obtains second data from a second storage area.

[0161] The controller can read the second data based on the position of the second data, which is equivalent to reading the first data.

[0162] S1011: The controller sends second data to the application server. Correspondingly, the application server receives the second data from the controller.

[0163] For example, the controller may send a first read response to the application server, where the first read response carries the second data.

[0164] S1008 to S1011 are a method for the controller to read the second data, which are optional steps. Figure 10 Indicated by dotted line.

[0165] The embodiment of the present application provides a data processing system. Figure 7 or Figure 10 The data processing method discussed. The data processing system includes a controller and a first memory. Optionally, the controller is, for example, Figure 1 、 Figure 2 or Figure 3 The controller involved. The first memory is, for example, Figure 1 The memory involved, Figure 2 The first memory involved, Figures 3 to 5 Any optical disc involved. The first memory includes a first storage area and a second storage area. The first storage area is used to store data and verification data, and the second storage area is used to store recovered data. The controller can implement the above Figure 7 or Figure 10 The steps performed by the controller involved, and the first memory can realize the above Figure 7 or Figure 10 The contents of the first storage area and the second storage area can refer to the above content. Figure 7 or Figure 10 The contents of the first storage area and the second storage area involved are not listed here.

[0166] Optionally, the data processing system further includes at least one of a second memory, at least one third memory, or a fourth memory. The second memory can implement the aforementioned Figure 7 or Figure 10 At least one third memory can implement the steps performed by the second memory involved. Figure 7 or Figure 10 The fourth memory can implement the steps performed by at least one third memory. Figure 7 or Figure 10 The steps performed by the fourth memory involved.

[0167] The present invention provides a data processing device. Figure 11A schematic diagram of the structure of a data processing device 1100 is shown. The data processing device 1100 may be, for example, the Figures 1 to 5 Any of the optical storage systems involved, or may be Figures 1 to 5 Any controller in the optical storage system involved, or the controller that implements the above Figures 1 to 5 The data processing device 1100 can implement the method provided in the embodiment of the present application, such as implementing Figure 7 or Figure 10 The data processing method involved; the data processing device 1100 may also be capable of supporting the optical storage system to implement Figure 7 or Figure 10 The data processing device 1100 may be a hardware structure, a software module, or a combination of a hardware structure and a software module. The data processing device 1100 may be implemented as a chip system. In the embodiments of the present application, the chip system may be composed of a chip or may include a chip and other discrete components.

[0168] The data processing device 1100 may include a processing module 1110 . Optionally, the data processing device 1100 may further include a communication module 1120 .

[0169] The processing module 1110 can be used to perform the following steps: Figure 7 or Figure 10 The methods discussed can also be used to support other processes of the technology described herein. The communication module 1120 is used for the data processing device 1100 to communicate with other modules. It can be a circuit, a device, an interface, a bus, a software module, a transceiver or any other device that can achieve communication. The processing module 1110 is also used to execute Figure 7 or Figure 10 The various steps in the illustrated embodiment may also be used to support other processes of the technology described herein.

[0170] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0171] The division of modules in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional modules in the various embodiments of the present application may be integrated into a single processor, or may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules.

[0172] The present application provides a data processing device. Figure 12The data processing device 1200 is a schematic diagram showing a structure of the data processing device 1200. The data processing device 1200 may be, for example, the Figures 1 to 5 Any of the components (such as controller) in the optical storage system involved, or can be implemented as described above Figures 1 to 5 The data processing device 1200 can implement the functions of the storage system in the method provided in the embodiment of the present application; the data processing device 1200 can also be a device that can support the storage system to implement the functions of the storage system in the method provided in the embodiment of the present application. The data processing device 1200 can be a hardware structure, a software module, or a hardware structure and a software module. The data processing device 1200 can be implemented as a chip system. In the embodiment of the present application, the chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0173] The data processing device 1200 includes at least one processor 1210, configured to implement or support the data processing device 1200 to implement Figure 7 or Figure 10 For the specific steps of the method discussed, please refer to the detailed description in the method example and will not be repeated here.

[0174] Optionally, data processing device 1200 may further include a communication interface 1220 and at least one memory 1230. Communication interface 1220 communicates with other devices via a transmission medium, thereby enabling communication between data processing device 1200 and other devices. For example, the other device may be a server. Processor 1210 may use communication interface 1220 to send and receive data.

[0175] At least one memory 1230 is used to store program instructions and / or data. The memory 1230 is coupled to the processor 1210. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 1210 may operate in conjunction with the memory 1230. The memory 1230 may be the internal memory of the data processing device 1200, which is not limited. The processor 1210 may execute the program instructions stored in the memory 1230. At least one of the at least one memory 1230 may be included in the processor 1210. When the processor 1210 executes the program instructions in the memory 1230, it can be achieved Figure 7 or Figure 10 The methods involved, or can be implemented Figure 11 The functions of the data processing device 1100 involved.

[0176] The specific connection medium between the communication interface 1220, the processor 1210 and the memory 1230 is not limited in the embodiment of the present application. Figure 12 The communication interface 1220, the processor 1210 and the memory 1230 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus and the like.

[0177] In the embodiment of the present application, the processor 1210 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiment of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The communication interface 1220 can be, for example, a component or chip with communication functions, and the communication interface 1220 can be, for example, a network card.

[0178] In an embodiment of the present application, the memory 1230 may be a non-volatile memory, such as a hard disk or a solid-state drive, or a volatile memory, such as a random-access memory (RAM). A memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in an embodiment of the present application may also be a circuit or any other device that can implement a storage function, for storing program instructions and / or data.

[0179] The embodiment of the present application provides a computer readable storage medium. The computer readable storage medium is used to store a computer program, which, when executed on a computer, enables the computer to execute a Figure 7 or Figure 10 The methods involved.

[0180] The embodiment of the present application provides a computer program product. The computer program product stores a computer program, which includes program instructions. When the program instructions are executed by a computer, the computer executes Figure 7 or Figure 10 The methods involved.

[0181] The embodiment of the present application provides a chip system. The chip system includes a processor and may also include a memory for implementing Figure 7 or Figure 10 The chip system may be composed of a chip or may include a chip and other discrete devices.

[0182] The methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, they may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., an SSD), etc.

[0183] In the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0184] The various numbers used in the embodiments of this application are for ease of description and are not intended to limit the scope of the embodiments of this application. The order of the sequence numbers of the above processes does not necessarily indicate the order in which they are executed. The order in which the processes are executed should be determined by their functions and internal logic.

Claims

1. A data processing method, characterized in that: The method is applied to an optical storage system, the optical storage system including a first memory, the first memory including a first storage area and a second storage area, the first storage area storing at least one data and verification data corresponding to the at least one data; and comprising: If first data among the at least one data is damaged, restoring the first data according to undamaged data among the at least one data and the check data to obtain second data; The second data is written into the second storage area.

2. The method according to claim 1, characterized in that The second storage area is a storage area reserved in the first memory, and the second storage area is used for data recovery.

3. The method according to claim 1 or 2, characterized in that The optical storage system further includes a second memory, wherein the second memory stores metadata of the first data; and the method further includes: The metadata of the first data in the second memory is updated to the metadata of the second data.

4. The method according to any one of claims 1 to 3, characterized in that The first memory further includes a third storage area, wherein the third storage area stores metadata of the first data; and the method further includes: The metadata of the first data in the third storage area is updated to the metadata of the second data.

5. The method according to claim 3 or 4, characterized in that The metadata of the second data includes a location of the second data in the second storage area.

6. The method according to claim 5, characterized in that The method further comprises: receiving a first read request, where the first read request is used to request reading the first data; In response to the first read request, the second data is read from the second storage space according to the position.

7. The method according to any one of claims 1 to 6, characterized in that The data size of the first data is smaller than or equal to the size of the second storage space.

8. The method according to any one of claims 1 to 7, characterized in that The ratio of the size of the second storage area to the size of the storage space provided by the first memory is a first value.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: If the second storage area is full, the state of the first memory is set to a non-writable state.

10. A data processing system, characterized in that: The system comprises a controller and a first memory, wherein the first memory comprises a first storage area and a second storage area, and the first storage area stores at least one data and verification data corresponding to the at least one data; If first data among the at least one data is damaged, the controller is configured to restore the first data according to undamaged data among the at least one data and the check data to obtain second data; The controller is configured to write the second data into the second storage area.

11. The system according to claim 10, wherein: The second storage area is a storage area reserved in the first memory, and the second storage area is used for data recovery.

12. The system according to claim 10 or 11, characterized in that The controller is further configured to determine, before obtaining the second data, that the size of the first data is smaller than or equal to the size of the second storage area.

13. The system according to claim 12, wherein: The system further comprises at least a third memory and a fourth memory; If the size of the first data is larger than the size of the second storage area, the controller is also used to recover the first data based on the data in the at least one third memory, obtain third data, and write the third data, the data in the at least one data except the first data, and the verification data into the fourth memory.

14. The system according to any one of claims 10 to 13, characterized in that: The system further includes a second memory storing metadata of the first data; The controller is further configured to update the metadata of the first data in the second memory to the metadata of the second data.

15. The system according to any one of claims 10 to 14, characterized in that: The first memory further includes a third storage area, wherein the third storage area stores metadata of the first data; The controller is further configured to update the metadata of the first data in the third storage area to the metadata of the second data.

16. The system according to claim 14 or 15, characterized in that The metadata of the second data includes a location of the second data in the second storage area.

17. The system according to claim 16, wherein: The controller is further configured to receive a first read request, where the first read request is configured to request reading of the first data; The controller is further configured to respond to the first read request and read the second data from the second storage space according to the position.

18. The system according to any one of claims 10 to 15, characterized in that: The data size of the first data is smaller than or equal to the size of the second storage space.

19. The system according to any one of claims 10 to 18, characterized in that: The ratio of the size of the second storage area to the size of the storage space provided by the first memory is a first value.

20. The system according to any one of claims 10 to 19, characterized in that: If the second storage area is full, the controller is further configured to set the state of the first memory to a non-writable state.

21. A data processing device, characterized in that: include: A module for executing the method according to any one of claims 1 to 9.

22. A data processing device, characterized in that: include: Memory, for storing computer instructions; At least one processor, configured to cause the device to execute the method according to any one of claims 1 to 9 by executing the computer instructions.

23. A computer program product comprising instructions, characterized in that When the instructions are executed by a computer, the method according to any one of claims 1 to 9 is performed.

24. A computer-readable storage medium, characterized in that The storage medium stores a computer program or instruction, and when the computer program or instruction is executed by the processor, the method according to any one of claims 1 to 9 is executed.