CN-121979452-A - Data processing method and system
Abstract
The application relates to the technical field of storage and discloses a data processing method and a system, wherein the method is applied to storage equipment, the method performs copying operation by acquiring a data copying instruction, performs decompression processing on a logic data block, calculates a check value of original data corresponding to the logic data block, generates second protection information based on the check value and a source logic address, compares the first protection information with the second protection information according to protection control information, generates third protection information based on the check value and a destination logic address if the comparison is passed, combines the logic data block and the third protection information to obtain first target data, the first target data is used as data corresponding to the destination address, skips a preset flow and stores the first target data in the storage equipment, and can reduce the calculation step of data decompression so as to improve the processing efficiency of the data.
Inventors
- FANG HAOJUN
- WANG LU
- HUANG YUNXIN
Assignees
- 深圳大普微电子股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (10)
- 1. A data processing method, applied to a storage device, the method comprising: the method comprises the steps of obtaining a data replication instruction to perform replication operation, wherein the data replication instruction comprises a source logic address and protection control information and a destination logic address of a corresponding logic data block, the source logic address corresponds to source data, and the source data comprises the logic data block and first protection information corresponding to the logic data block; Calculating a check value of corresponding original data while performing decompression processing on the logic data block; Generating second protection information based on the check value and the source logic address; comparing the first protection information with the second protection information according to the protection control information, and if the comparison is passed, generating third protection information based on the check value and the destination logical address; And combining the logic data block and the third protection information to obtain first target data, wherein the first target data is used as data corresponding to a destination address, and the first target data is stored in the storage device by skipping a preset flow.
- 2. The method of claim 1, wherein the step of determining the position of the substrate comprises, The generating the second protection information based on the check value and the source logical address includes: and generating second external data protection information and second internal data protection information based on the check value and the source logic address to obtain the second protection information, wherein the second protection information comprises the second external data protection information and the second internal data protection information.
- 3. The method of claim 2, wherein the step of determining the position of the substrate comprises, The first protection information comprises first external data protection information and first internal data protection information; The comparing the first protection information with the second protection information includes: And if the first external data protection information is the same as the second external data protection information and the first internal data protection information is the same as the second internal data protection information, determining that the first protection information and the second protection information pass through in a comparison mode.
- 4. The method of claim 1, wherein the step of determining the position of the substrate comprises, The third protection information comprises third external data protection information and third internal data protection information; the combining the logic data block and the third protection information to obtain first target data includes: combining the logic data block, the third external data protection information and the third internal data protection information to obtain the first target data; The method further comprises the steps of: Generating a skip instruction, skipping a preset flow based on the skip instruction, and directly storing the first target data in the storage device.
- 5. The method of claim 1, wherein the storage device is communicatively coupled to a host, the storage device comprising a source storage device, a target storage device, the method further comprising: The source storage device obtains the data replication instruction, generates a data head based on the first target data, combines the first target data and the data head to obtain second target data, and sends the second target data to the host based on a destination address corresponding to the data replication instruction, wherein the second target data comprises the data head and the first target data; The target storage device acquires the data replication instruction, acquires the data head based on the data replication instruction, and determines the length of data corresponding to the data replication instruction based on the data head so as to acquire the first target data from the host.
- 6. The method of claim 5, wherein the source storage device communicates with the target storage device via a preset protocol, the source storage device including a buffer, the method further comprising: After the source storage device caches the second target data in a buffer area, generating data ready information, and sending the data ready information to the host; the target storage device obtains the data ready information sent by the host, obtains the access address of the buffer area based on the data ready information, obtains the data head, determines the length of the first target data, and directly obtains the first target data from the buffer area based on the length of the first target data.
- 7. A data processing system, wherein the system comprises a host and at least two storage devices, and the storage devices comprise a front-end module, a data processing module and a data storage module; The host is connected with the front-end module and used for generating a data copying instruction; the front-end module is connected with the host and the data processing module and is used for triggering a data copying operation flow based on the data copying instruction, and sending a read-write operation instruction in the data copying instruction to the data processing module, wherein the read-write operation instruction comprises a source logic address and protection control information corresponding to a logic data block corresponding to the source logic address, and a destination logic address, the source logic address corresponds to source data, and the source data comprises the logic data block and protection information corresponding to the logic data block; The data processing module is connected with the front-end module and is used for checking the logic data block according to the protection control information, generating target protection information if the checking is successful, combining the logic data block and the target protection information to obtain third target data, and writing the third target data into the data storage module.
- 8. The system of claim 7, wherein the data processing module comprises a compression module comprising an interface module, a control module, a verification module, a decompression engine, a compression engine; the interface module is connected with the control module and is used for receiving the read-write operation instruction; the control module is connected with the interface module and the verification module and is used for generating a decompression instruction and a data verification instruction and sending the data verification instruction to the verification module; The decompression engine is connected with the control module and the verification module and is used for decompressing the logic data block based on the decompression instruction and sending decompressed data to the verification module; The verification module is connected with the control module and the decompression engine and is used for verifying the logic data block, if the verification is successful, generating target protection information, sending the target protection information to the control module, and combining the logic data block and the target protection information by the control module; the compression engine is connected with the control module and used for compressing data.
- 9. The system of claim 7, wherein the system further comprises a controller configured to control the controller, The host is connected with at least two storage devices and is used for generating a data copying instruction so as to copy the data of one storage device to the other storage device based on the data copying instruction, wherein the data copying instruction comprises a source logic address and a destination logic address, the source logic address corresponds to the source storage device, and the destination logic address corresponds to the destination storage device; The source storage device is configured to generate a data header based on the third target data, and combine the third target data and the data header to obtain fourth target data; The target storage device is configured to obtain, based on the data replication instruction, a header of data corresponding to the data replication instruction from a source storage device, so as to determine, based on the header, a length of data corresponding to the data replication instruction, generate a data acquisition instruction, and obtain, based on the data acquisition instruction, the third target data.
- 10. The system of claim 9, wherein the source storage device comprises a buffer; The source storage device is connected with the host and the target storage device and is used for receiving a data copying instruction sent by the host, buffering the third target data in the buffer area, generating data ready information and sending the data ready information to the target storage device; The target storage device is connected with the host and the source storage device and is used for receiving a data copying instruction sent by the host, acquiring an access address of a buffer area of the source storage device based on the data ready information so as to acquire a data head corresponding to the data copying instruction, determining the length of third target data, and directly acquiring the third target data from the buffer area of the source storage device based on the length of the third target data.
Description
Data processing method and system Technical Field The embodiment of the application relates to the technical field of storage, in particular to a data processing method and system. Background In the technical field of storage, when copying data in storage equipment, a host initiates a copying instruction, and copies the data corresponding to a source logical address to a storage area corresponding to a target logical address so as to store two groups of data in different physical addresses in the storage equipment. Currently, if compressed data is stored, after the compressed data is read from a storage medium, the compressed data is decompressed to obtain the original data, integrity verification is performed based on the original data, protection information and metadata of the original data are updated after verification is passed, then the processed original data is recompressed, the newly generated compressed data is written into a target physical address, and multiple decompression and verification operations are required in the whole process, so that the calculation bandwidth of the storage device is increased. When the compressed data is copied among a plurality of storage devices, the same problems exist that the source storage device needs to read the compressed data and decompress the compressed data firstly, the original data is transmitted to the host, the host transmits the original data to the target storage device, the target storage device compresses the original data again after receiving the original data and updates the protection information, the target physical address can be written in, the whole copying process needs to go through the process of decompressing twice and recompressing, uncompressed data is transmitted between the host and the storage device, the time of transmitting and copying the data across the devices is prolonged, and the overall performance of the system is reduced. Disclosure of Invention In order to solve the above technical problems, embodiments of the present application provide a data processing method and system, which can reduce calculation steps of data decompression, so as to improve data processing efficiency. In order to solve the technical problems, the embodiment of the application provides the following technical scheme: in a first aspect, an embodiment of the present application provides a data processing method, applied to a storage device, where the method includes: The method comprises the steps of obtaining a data replication instruction to perform replication operation, wherein the data replication instruction comprises a source logic address, protection control information of a corresponding logic data block and a target logic address, the source logic address corresponds to source data, and the source data comprises the logic data block and first protection information corresponding to the logic data block; Calculating a check value of original data corresponding to the logic data block while performing decompression processing on the logic data block; generating second protection information based on the check value and the source logic address; comparing the first protection information with the second protection information according to the protection control information, and if the comparison is passed, generating third protection information based on the check value and the destination logical address; and combining the logic data block and the third protection information to obtain first target data, wherein the first target data is used as data corresponding to the destination address, and the first target data is stored in the storage device by skipping a preset flow. In some embodiments, generating the second protection information based on the check value, the source logical address, includes: And generating second external data protection information and second internal data protection information based on the check value and the source logic address to obtain second protection information, wherein the second protection information comprises the second external data protection information and the second internal data protection information. In some embodiments, the first protection information includes first external data protection information, first internal data protection information; Comparing the first protection information with the second protection information, comprising: If the first external data protection information is the same as the second external data protection information and the first internal data protection information is the same as the second internal data protection information, determining that the first protection information and the second protection information pass through in a comparison mode. In some embodiments, the third protection information includes third external data protection information, third internal data protection information; Combining the logic data block and the third protection i