Data transmission method and device, equipment and storage medium
By introducing additional data into the data path of the solid-state drive for integrity verification, the problem of data errors in the data transmission of the solid-state drive is solved, and the accuracy and consistency of data transmission is improved.
Patent Information
- Application Number
- CN202411079710.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Solid-state drives often encounter data error problems during data transmission. It is difficult for the existing technology to quickly identify the cause of errors, resulting in inaccurate data transmission.
By introducing additional data into the data path, including source module identification, destination module identification and redundant data, integrity verification is performed to ensure the accuracy of data transmission. The specific method is to determine whether integrity verification is performed when obtaining input data, and generate additional data when necessary to protect data transmission until it is transmitted to the destination module for verification.
It improves the accuracy of data transmission, reduces the difficulty of error analysis, and ensures the consistency of data during reading and writing.
Smart Images

Figure CN119200957A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state hard disks, and in particular to a data transmission method, device, equipment and storage medium. Background Art
[0002] A solid state drive (SSD) is a computer storage device that uses flash memory technology as a storage medium. Data errors are often encountered in the process of writing data to or reading data from an SSD. For example, in the process of writing data, if the data is wrong in a module and the subsequent module does not perceive or parse the physical meaning of the data in the previous module, the erroneous data of the previous module is output to the subsequent module. For the subsequent module, the erroneous data of the previous module is still a legal input. Therefore, the subsequent module performs a predetermined subsequent action based on the erroneous data, which eventually causes the erroneous data to be carried all the way to the storage medium, and then the data is not found to be incorrect until the data is touched during the reading process.
[0003] In order to solve the problem of data errors in the SSD data transmission process, the existing technology usually needs to read the residual data in the data path management module (Data Path Management, DM) for analysis. However, in actual applications, considering the concurrency of IO, the mixture of reading and writing, and the mixture of multiple data formats, it is difficult for the existing technology to quickly identify the cause of the error of the residual data, and thus cannot ensure the accuracy of data transmission during the data reading and writing process. Summary of the invention
[0004] The main purpose of the present invention is to provide a data transmission method, device, equipment and storage medium, aiming to solve the technical problem of how to improve the accuracy of data transmission during data reading and writing.
[0005] A first aspect of the present invention provides a data transmission method, which is applied to a data path of a solid state drive, wherein the data path has a plurality of modules having a relatively superior-subordinate relationship, and the data transmission method comprises:
[0006] Acquire first input data of any current-level module, where the first input data is original data to be transmitted or first output data of an upper-level module, and the first output data includes the original data to be transmitted and a plurality of first additional data;
[0007] If the first input data is the first output data, determining whether to perform integrity check on the first input data in a module at this level based on the first data in each of the first additional data;
[0008] If an integrity check is performed, based on the second data in the corresponding first additional data, an integrity check is performed on the first input data in the current level module and the corresponding first additional data is deleted;
[0009] If the integrity check is completed or no integrity check is performed, determining whether the module at this level is the last module of the data path;
[0010] If the module at this level is not the last module of the data path, the second additional data corresponding to the module at this level is generated and used together with the first input data as the second output data of the module at this level, and the second output data is the second input data of the lower module.
[0011] Optionally, in a first implementation manner of the first aspect of the present invention, the first additional data and the second additional data adopt the same data structure, and the data structure includes: a source module identifier, a destination module identifier, redundant data generated by the source module, and a destination module identifier for integrity verification;
[0012] Among them, the source module identifier and the destination module identifier are used to identify the data transmission path in the data path, the redundant data generated by the source module is used to protect the data to be transmitted in the data transmission path, and the destination module identifier for integrity verification is used to identify the module for performing integrity verification on the data to be transmitted.
[0013] Optionally, in a second implementation manner of the first aspect of the present invention, if the first input data is the first output data, determining whether to perform integrity check on the first input data in a current-level module based on the first data in each of the first additional data includes:
[0014] If the first input data is the first output data, determining whether the destination module identifier for integrity verification in each of the first additional data matches the module identifier of the current level module;
[0015] If they match, it is determined that the integrity check of the first input data is performed in the module at this level.
[0016] Optionally, in a third implementation manner of the first aspect of the present invention, if an integrity check is performed, then based on the second data in the corresponding first additional data, performing an integrity check on the first input data in the current level module and deleting the corresponding first additional data includes:
[0017] If an integrity check is performed, determining several check methods used for the integrity check based on the redundant data generated by the source module corresponding to the first additional data;
[0018] Call each of the verification methods in sequence to perform integrity verification on the first input data in the current level module until the integrity verification is completed, wherein, when each integrity verification is completed and there is no destination module identifier for which integrity verification has not been performed in the first additional data, the corresponding first additional data is deleted.
[0019] Optionally, in a fourth implementation of the first aspect of the present invention, the data transmission method further includes:
[0020] When there is an integrity check that fails, a check failure message is generated and stored in a status register or memory for real-time reporting of the current data transmission status;
[0021] The verification failure information includes a source module identifier for transmitting the first input data, a destination module identifier, redundant data generated by the source module, and actual redundant data currently generated.
[0022] Optionally, in a fifth implementation of the first aspect of the present invention, the data path includes a read data path and a write data path;
[0023] When the data path is a read data path, the original data to be transmitted is first transmission data read from a storage medium; when the data path is a write data path, the original data to be transmitted is second transmission data obtained from a host.
[0024] Optionally, in a sixth implementation of the first aspect of the present invention, the output of any module M in the data path is defined as:
[0025] OM=IM+SM+DN+PM+VN;
[0026] Among them, OM represents the output data of module M, OM is the data to be transmitted in the data path that needs to be transmitted to the lower module, IM represents the input data of module M, and IM is the output data of the upper module; SM and DN respectively represent the source module M and the destination module N corresponding to the data to be transmitted; PM represents the redundant data generated by the source module M; VN represents the integrity check in the destination module N.
[0027] The present invention further provides a data transmission device, which is applied to a data path of a solid state hard disk. The data path has a plurality of modules with a relatively superior-subordinate relationship. The data transmission device comprises:
[0028] An acquisition module, used for acquiring first input data of any current-level module, wherein the first input data is original data to be transmitted or first output data of an upper-level module, and the first output data includes the original data to be transmitted and a plurality of first additional data;
[0029] a first judgment module, configured to judge whether to perform integrity check on the first input data in a current-level module based on the first data in each of the first additional data if the first input data is the first output data;
[0030] a verification module, configured to, if an integrity check is to be performed, perform an integrity check on the first input data in a current level module based on the second data in the first additional data and delete the first additional data corresponding to the first input data;
[0031] A second judgment module, configured to judge whether the module at this level is the last module of the data path if the integrity check is completed or not;
[0032] A generation module is used to generate second additional data corresponding to the module of this level if the module of this level is not the last module of the data path, and use the second additional data together with the first input data as the second output data of the module of this level, and the second output data is the second input data of the lower-level module.
[0033] Optionally, in a first implementation manner of the third aspect of the present invention, the first additional data and the second additional data adopt the same data structure, and the data structure includes: a source module identifier, a destination module identifier, redundant data generated by the source module, and a destination module identifier for integrity verification;
[0034] Among them, the source module identifier and the destination module identifier are used to identify the data transmission path in the data path, the redundant data generated by the source module is used to protect the data to be transmitted in the data transmission path, and the destination module identifier for integrity verification is used to identify the module for performing integrity verification on the data to be transmitted.
[0035] Optionally, in a second implementation of the third aspect of the present invention, the first determination module is specifically configured to:
[0036] If the first input data is the first output data, determine whether the destination module identifier for integrity verification in each of the first additional data matches the module identifier of the current level module; if they match, determine to perform integrity verification on the first input data in the current level module.
[0037] Optionally, in a third implementation of the third aspect of the present invention, the verification module is specifically used to:
[0038] If an integrity check is performed, several verification methods used for the integrity check are determined based on the redundant data generated by the source module in the first additional data; each of the verification methods is called in turn to perform an integrity check on the first input data in the module at this level until the integrity check is completed, wherein, when each integrity check is completed and there is no destination module identifier for which the integrity check has not been performed in the first additional data, the corresponding first additional data is deleted.
[0039] Optionally, in a fourth implementation of the third aspect of the present invention, the data transmission device further includes:
[0040] A status reporting module is used to generate verification failure information and store it in a status register or memory when there is a failed integrity check, so as to report the current data transmission status in real time; wherein the verification failure information includes the source module identifier, the destination module identifier, the redundant data generated by the source module, and the actual redundant data currently generated for transmitting the first input data.
[0041] Optionally, in a fifth implementation of the second aspect of the present invention, the data path includes a read data path and a write data path;
[0042] When the data path is a read data path, the original data to be transmitted is first transmission data read from a storage medium; when the data path is a write data path, the original data to be transmitted is second transmission data obtained from a host.
[0043] Optionally, in a sixth implementation of the second aspect of the present invention, the output of any module M in the data path is defined as:
[0044] OM=IM+SM+DN+PM+VN;
[0045] Among them, OM represents the output data of module M, OM is the data to be transmitted in the data path that needs to be transmitted to the lower module, IM represents the input data of module M, and IM is the output data of the upper module; SM and DN respectively represent the source module M and the destination module N corresponding to the data to be transmitted; PM represents the redundant data generated by the source module M; VN represents the integrity check in the destination module N.
[0046] A fifth aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned data transmission method.
[0047] A sixth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned data transmission method.
[0048] The present invention provides a data transmission method applied to a solid-state hard disk data path, in which the data transmitted in the data path includes not only the original data to be transmitted that is read or written, but also the additional data generated by the module. Based on the direction of data transmission, the modules form a relative superior-subordinate relationship, that is, the module through which the data is transmitted may be the superior module of other modules or the subordinate module of another module, and the output data of the superior module will be used as the input data of the subordinate module. When the transmitted data passes through any module, the input data of any current module is first obtained, and the input data includes the original data to be transmitted and the additional data correspondingly generated by the multiple upper modules. The additional data can be used to determine whether the input data is integrity checked and the verification method used in the current module. At the same time, after the integrity check is completed or when the integrity check is not performed, the additional data corresponding to the current module will be generated, and together with the input data, it will be used as the output data of the current module, and the output data of the current module will be used as the input data of the subordinate module, thereby realizing a data transmission method with integrity protection for the solid-state hard disk data. Through the data transmission method of the present invention, the accuracy of data transmission during the data reading process or writing process is ensured, and the difficulty of analyzing the transmission data error is also reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of an embodiment of conventional data transmission;
[0050] Figure 2 It is a schematic diagram of modules showing the relative superior-subordinate relationship of a data path in an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of a data structure used for data transmission in an embodiment of the present invention;
[0052] Figure 4 This is a schematic diagram of a first embodiment of a data transmission method in an embodiment of the present invention;
[0053] Figure 5 1 is a flow chart of a second embodiment of a data transmission method according to an embodiment of the present invention;
[0054] Figure 6 This is a functional module diagram of an embodiment of a data transmission device in an embodiment of the present invention;
[0055] Figure 7 FIG. 1 is a schematic diagram of an embodiment of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0057] To facilitate a better understanding of the present invention, the data path of the solid state drive and each module in the data path in the embodiment of the present invention are described below by way of example.
[0058] The data path of the SSD refers to the data transmission path formed by data transmission when reading data from the SSD or writing data to the SSD. Reading data corresponds to reading data from the medium Nand and transmitting the read data to the external host Host through the data path of the SSD, and writing data corresponds to receiving data from the external host Host and writing the received data to the medium Nand through the data path of the SSD.
[0059] The device or module involved in data transmission of the present invention includes:
[0060] (1) Host, which is used to implement human-computer interaction, such as issuing write commands or read commands;
[0061] (2) SSD controller, which is used to manage and control the data read and write operations within the SSD, as well as the communication with other system components. It is specifically responsible for the communication and data transmission between the SSD and the host (such as a computer), receiving and parsing I / O requests from the host, and maintaining the request queue; managing the data read and write operations within the SSD, including data encoding, decoding, error correction, etc., to ensure the accuracy and reliability of the data; internal module management: configuring the working mode of the SSD, and managing the communication and data flow between various modules (such as flash memory chips, cache, etc.).
[0062] (3) Nand, usually refers to NAND Flash Memory, which is a non-volatile memory that can retain stored data after power failure. NAND flash memory is widely used in various storage devices, such as USB flash drives, memory cards, solid-state drives, etc.
[0063] In this embodiment, the data path of the solid state drive does not include the Host and Nand. The data path of the solid state drive specifically implements data transmission through various functional modules in the SSD controller.
[0064] In one embodiment, the SSD controller specifically includes the following modules:
[0065] 2.1) PCIe / NVMe module: PCIe module is mainly responsible for the transmission and communication of physical links and physical data packets, while NVMe module is mainly responsible for the parsing, sending and receiving, command caching and sorting of Host commands. PCIe module and NVMe module must be tightly coupled and cannot work independently from each other.
[0066] PCIe module, namely PCI Express (Peripheral Component Interconnect Express), is a hardware component based on the high-speed serial computer expansion bus standard. NVMe module is a module or component related to NVMe (Non-Volatile Memory Express) technology. NVMe is a high-performance, low-latency storage protocol based on PCIe, designed for non-volatile memory such as SSD (solid state drive).
[0067] 2.2) DPM module (Data Path Management) is used for data path management, priority control, command state conversion, data encryption and decryption conversion, etc.
[0068] 2.3) DM module (Data Management) is used for caching user data and system internal data, format conversion, and scheduling of various data paths.
[0069] 2.4) LDPC module (Low-Density Parity-Check) is used to encode, decode, scramble and construct data that adapts to the characteristics of NAND Flash media.
[0070] The LDPC module is a hardware or software module based on low-density parity-check codes, which is widely used in communication and storage systems to enhance the reliability and efficiency of data transmission.
[0071] 2.5) Flash Controller module, used for Flash media management, media command sequence generation, media bandwidth, IO throughput management, etc.
[0072] Based on the modules of the above data path, the existing data transmission process is described below by way of example. Figure 1As shown, Figure 1 A schematic diagram of an embodiment of conventional data transmission is shown.
[0073] (I) When data is transmitted from Host to Nand, it corresponds to write data transmission. As shown in the figure, the existing write data transmission process includes:
[0074] W1: Host sends an IO command, in which the protocol field in the IO command indicates that the IO is a write command, as well as the starting LBA, LBA length and other necessary command information.
[0075] W2: The NVMe module receives the WriteCommand and dispatches it to the DPM for priority scheduling, path confirmation, data encryption, and other actions;
[0076] W3: Data is output to the DM module and cached in the DM module;
[0077] W4: DM gives the original user data to the LDPC module for LDPC encoding;
[0078] W5: The LDPC module sends the encoded and scrambled data back to the DM.
[0079] W6: Flash Controller obtains the encoded and scrambled data that meets NAND requirements from DM according to the constructed NAND Program command sequence;
[0080] W7: Data is sent to NAND Flash media for Program operation;
[0081] The above are the various data stages in the write command processing process. The write data transmission is briefly described as WD, which is composed of multiple data transmission paths, and the specific transmission paths include W1-W7.
[0082] (II) When data is transmitted from Nand to Host, it corresponds to read data transmission. As shown in the figure, the existing read data transmission process includes:
[0083] R1: Host sends an IO command. The protocol field in the IO command contains necessary information such as the read command, the start LBA, and the LBA length.
[0084] R2: The software searches the internal mapping table to determine the physical location to be read, and the Flash Controller reads the target physical location;
[0085] R3: medium data output to LDPC module;
[0086] R4: The LDPC module prepares for decoding and requests buffer space from the DM to store the data after subsequent decoding;
[0087] R5: DM tells the LDPC decoded data where to store the data and receives the decoded data;
[0088] R6: DM outputs the successfully decoded user data to the DPM module according to the path information;
[0089] R7: DPM outputs the target data read by the Host to the Host through PCIe and NVMe;
[0090] The above are the various data stages in the process of processing a read command. The read data transmission is briefly described as RD, which is composed of multiple data transmission paths, and the specific transmission paths include R1-R7.
[0091] By the above Figure 1 It can be seen from the write data transmission process and the read data transmission process described in that different operations of multiple modules are involved in the data transmission process, so data errors are prone to occur. For example, in the process of writing data, if the data is wrong in a certain module and the subsequent module does not perceive or parse the physical meaning of the data of the previous module, the erroneous data of the previous module is output to the subsequent module. For the subsequent module, the erroneous data of the previous module is still a legal input. Therefore, the subsequent module performs a predetermined subsequent action based on the erroneous data, which eventually causes the erroneous data to be carried all the way to the storage medium, and then it is not until the data is touched during the reading process that it is discovered that the data is incorrect. In order to solve the problem of data errors in the data transmission process of a solid-state hard disk, an embodiment of the present invention provides a data transmission method for realizing integrity protection of data transmission of a solid-state hard disk, thereby ensuring accuracy during the data reading and writing process.
[0092] See also Figure 2 , Figure 2 Schematic diagram of the modules of the relative hierarchical relationship of the data path in the embodiment of the present invention. Figure 1 Each module in the SSD controller (such as PCIe / NVMe module, DPM module, DM module, LDPC module and Flash Controller module) is abstracted as a module with a relative superior-subordinate relationship, and the input and output of the module are redefined, that is, the data transmitted in the data path is redefined.
[0093] like Figure 2As shown, module M and module N are any two modules in the data path that have a data transmission superior-subordinate relationship. Among them, the module input is Input, the module output is Output, the input of module M is IM, the output is OM, the input of module N is IN, and the output is ON. Since the two are in a relative superior-subordinate relationship, the rule that the output of the previous module is the input of the lower module is satisfied, that is, OM = IN.
[0094] This embodiment does not change the unit module composition of the traditional SSD controller, but redesigns the composition of the information packet and the information structure transmitted between modules, thereby realizing the integrity check of the data to be transmitted in the data path, thereby ensuring the accuracy of the transmitted data. The specific information structure design is described as follows:
[0095] (1) Source module: Source, which indicates the source module of the data to be transmitted, that is, the data output terminal. Assuming that the data to be transmitted is output by the M module, the M module is taken as the source module and is denoted as SM, similar to SN.
[0096] (2) Destination module: Destination refers to the destination module of the data to be transmitted, that is, the data receiving end. Assuming that the data to be transmitted is received by module N, module N is taken as the destination module and is denoted as DN, similar to DM.
[0097] (3) Redundant data: Parity is used to protect the data to be transmitted. For example, CRC (Cyclic Redundancy Check) and ECC (Error Correction Code) are used to protect the data to be transmitted. The redundant data added by the M module is recorded as PM, and the redundant data added by the N module is recorded as PN.
[0098] (4) Verify position: Verify refers to the control enable bit for integrity checking of the data to be transmitted in the specified destination module. Assuming that the integrity check of the data to be transmitted is performed in module N, it is recorded as VN. For example, the data in the write direction can be specified to be integrity checked at the end of the LDPC encoding, or at both the LDPC encoding and the Flash controller entry.
[0099] Below Figure 2 Taking the module M in the figure as an example, the above design method is further explained.
[0100] In this embodiment, the output of module M is defined as:
[0101] OM=IM+SM+DN+PM+VN
[0102] Among them, OM represents the output data of module M, which is also the data to be transmitted to the lower-level module in the data path; IM represents the input data of module M, which is also the output data of the upper-level module; SM and DN represent the source module M and the destination module N corresponding to the data to be transmitted respectively; PM represents the redundant data generated by the source module M; VN represents the integrity check in the destination module N. For the convenience of subsequent description, SM+DN+PM+VN are combined and referred to as Meta information.
[0103] See also Figure 3 , Figure 3 This is a schematic diagram of the data structure used for data transmission in the embodiment of the present invention. Figure 3 The meaning of the fields involved is explained.
[0104] (1) IO direction: This is related to the type of IO command issued by the host. For example, the IO direction of an IO write command is the write direction, while the IO direction of an IO read command is the read direction.
[0105] (2) Local module refers to the starting module of data transmission. The local module is not fixed, but depends on different nodes of data transmission. Different data nodes can serve as local modules. The local module is only for data transmission, so the local module can include Host and Nand.
[0106] (3) The peer module, relative to the local module, refers to the module that receives the data transmitted by the local module. The peer module is not fixed, but is determined relative to the local module. Different data nodes can serve as peer modules. The peer module is only for data transmission, so the peer module can include Host and Nand.
[0107] (4) Input refers to the input data of the local module, UserData refers to the user data, Output_Host refers to the output data of the Host, and other data are similar; RawData refers to the original data stored in the medium.
[0108] (5) Source, refers to the source module;
[0109] (6) Destination: refers to the destination module. The integrity check of data transmitted between different modules is performed in the destination module.
[0110] (7) Parity, which refers to redundant data. This field is of Option type, which means that one or more integrity check methods can be selected, such as Parity Option 1 = CRC, Parity Option 2 = ECC, etc.
[0111] (8) Verify refers to the verification position. This field can be configured with one or more verification positions (that is, the target module for verification). Verify can be in the form of a combination of multiple bit segments, such as a lower-level module or multiple lower-level modules, so as to achieve layer-by-layer verification or layer-by-layer multiple verification effects.
[0112] In addition, it should be noted that Null represents a null value, and Source, Destination, Parity, and Verify are all null values, indicating that the corresponding local module does not need to generate additional data, that is, no Meta information is generated. For example, when writing data, redundant data is not generated in the Host and Flash Controller modules, and when reading data, redundant data is not generated in the Nand and PCIe / NVMe modules.
[0113] For ease of understanding, the specific process of the data transmission method embodiment of the present invention is described below based on the above design of the present invention. Figure 4 , Figure 4 1 is a flow chart of the first embodiment of the data transmission method in the embodiment of the present invention. This embodiment is specifically applied to the read data path of the solid state drive, that is, the data transmission direction is Nand->Host, and the data obtained from Nand is the first transmission data, specifically the original data RawData stored in the Nand medium. The data transmission method of this embodiment includes:
[0114] 401. Obtain first input data of any current-level module, where the first input data is first transmission data or first output data of an upper-level module, and the first output data includes the first transmission data and a plurality of first additional data;
[0115] This embodiment is specifically applied to the read data transmission of the solid-state hard disk, that is, the data transmission direction is Nand—>Host, and the module at this level is the output module of the data to be transmitted. Therefore, the module at this level can be any one of the Flash Controller module, LDPC module, DM module, DPM module, and PCIe / NVMe module. When the module at this level is a Flash Controller module, it does not have an upper-level module. Other modules have upper-level modules, for example, the upper-level module of the LDPC module is the Flash Controller module, the upper-level module of the DM module is the LDPC module, the upper-level module of the DPM module is the DM module, and the upper-level module of the PCIe / NVMe module is any one of the DPM modules.
[0116] For example, assuming that the module at this level is a Flash Controller module, the input Input of the Flash Controller module is the output Output_Nand of Nand, that is, the RawData data (that is, the original data) read from Nand. For another example, assuming that the module at this level is an LDPC module, the input Input of the LDPC module is the output Output_Flash Controller of the upper-level module Flash Controller module. Other modules are similar, so they will not be described in detail.
[0117] In this embodiment, when the module at this level is the first module in the read data path, such as the Flash Controller module, the input data of the module at this level is the original data; when the module at this level is not the first module in the read data path, such as the LDPC module, DM module, DPM module or PCIe / NVMe module, the input data of the module at this level is the output data of the upper module, and the output data of the upper module specifically includes the original data and some additional data. Among them, each module (except the last module in the read data path) passed through during the data transmission process will generate corresponding additional data (that is, the Meta information described in the above embodiment), and the more modules the data transmission passes through, the more additional data will be included in the output data of the module.
[0118] In one embodiment, the first additional data in the output data of the upper module adopts the following data structure:
[0119] (1) Source module identifier (SM), which is used to identify the source module of the data to be transmitted. For example, SM = LDPC, which means that the data to be transmitted comes from the LDPC module.
[0120] (2) Destination module identifier (DN), which is used to identify the destination module of the data to be transmitted. For example, DN = DM indicates that the destination module of the data to be transmitted is DM.
[0121] (3) Redundant data (PM) generated by the source module is used to protect the current data to be transmitted by generating redundant data, such as generating redundant data of the current data to be transmitted PM=CRC, or PM=ECC, or PM=CRC+ECC.
[0122] (4) The destination module identifier (VN) for integrity check is used to specify the location for integrity check of the data to be transmitted, that is, in which destination module the check is performed. For example, if VN = LDPC, integrity check is required when data is transmitted to LDPC.
[0123] In this embodiment, the source module identifier SM and the destination module identifier DN are used to identify the data transmission path in the data path. For example, if SM=LDPC and DN=DM, the corresponding data transmission path is from LDPC to DM. If the data integrity check fails, the data transmission error position can be quickly located. The redundant data PM generated by the source module is used to protect the data to be transmitted in the data transmission path (SM—>DN), such as generating redundant data CRC and ECC of the data to be transmitted. The destination module identifier VN for integrity check is used to identify the module for integrity check of the data to be transmitted. For example, if VN=LDPC+DM, integrity check is required when the data is transmitted to LDPC and DM.
[0124] 402. If the first input data is the first output data, determine whether to perform integrity check on the first input data in a current-level module based on the first data in each of the first additional data;
[0125] It can be seen from the above step 401 that the first input data of the module at this level is the original data or the first output data of the upper-level module, and the first output data of the upper-level module includes the original data and some first additional data. Since the original data does not contain the first additional data (that is, Meta information), there is no need to perform integrity check and the next step 404 is directly executed.
[0126] In this embodiment, in the first output data output by the upper module, each first additional data includes the first data, and the first data can be used to determine whether to perform integrity check on the first input data in the current module. In this embodiment, the specific form of the first data is not limited and can be set according to actual needs.
[0127] In one embodiment, the first additional data adopts the data structure designed by the present invention. If the first data adopts the destination module identifier VN for integrity verification, the above step 402 further includes:
[0128] 4021. If the first input data is the first output data, determine whether the destination module identifier for integrity verification in each of the first additional data matches the module identifier of the current level module;
[0129] 4022. If there is a match, determine to perform integrity check on the first input data in the module at this level; if there is a match, determine not to perform integrity check in the module at this level, and execute step 404.
[0130] In this embodiment, when data is transmitted to the module at this level, if the first input data is the first output data of the upper-level module, the first additional data in the first input data (that is, the Meta information designed by the present invention) is extracted, and then the destination module identifier VN for integrity verification in the first additional data is obtained, and then VN is compared to see whether it matches the module at this level. If they match, it is determined that the integrity of the first input data is to be verified in the module at this level.
[0131] For example, in the input data of the current level module, the destination module identifier VN=LDPC for integrity check in the corresponding first additional data, and the current level module is an LDPC module, then it is determined that the two match, that is, it is necessary to perform integrity check on the currently transmitted input data in the LDPC module.
[0132] 403. If an integrity check is to be performed, based on the second data in the first additional data, an integrity check is performed on the first input data in the module at this level and the first additional data is deleted;
[0133] In this embodiment, when it is determined through step 402 that the integrity of the currently transmitted data needs to be checked in the module at this level, the second data in the first additional data that needs to be checked for integrity is used to perform an integrity check on the first input data in the module at this level, wherein the verification method used for the integrity check is determined by the second data in the first additional data.
[0134] In one embodiment, the above step 403 further includes:
[0135] 4031. If an integrity check is performed, determine several check methods used for the integrity check based on the redundant data generated by the source module corresponding to the first additional data;
[0136] 4032. Call each of the verification methods in sequence to perform integrity verification on the first input data in the module at this level until the integrity verification is completed, wherein, when each integrity verification is completed and there is no destination module identifier for which integrity verification has not been performed in the first additional data, the corresponding first additional data is deleted.
[0137] In this embodiment, it can be seen from the above embodiments that the redundant data generated by the source module is used to protect the integrity of the input data, so the verification method used for integrity verification can be determined by the redundant data generated by the source module in the first additional data. The same additional data can generate multiple redundant data, and different redundant data need to use different verification methods for integrity verification.
[0138] For example, the module at this level is DPM, and the first output data of its upper-level module DM includes the first additional data generated by the Flash Controller module and the LDPC module respectively, that is, two copies of Meta information, wherein VN=PCIe / NVMe in the Meta information corresponding to the Flash Controller module, and VN=DPM in the Meta information corresponding to the LDPC module. Then, through module identifier matching, it is determined that the data protected by the LDPC module in the transmitted data needs to be integrity checked in the module DPM at this level.
[0139] Assuming that PM=ECC in the Meta information corresponding to the LDPC module, in the current-level module DPM, an ECC verification method is used to perform integrity verification on the data protected by the LDPC module in the first input data.
[0140] In this embodiment, in the data reading process (Nand—>Host), in order to ensure the accuracy of data transmission, it is necessary to add corresponding Meta information in the data transmission process to perform integrity verification. Since the data finally transmitted to the Host no longer needs to be integrity verified, that is, the data finally given to the Host is the original data. Therefore, when each integrity check is completed and there is a destination module identifier for which the integrity check is not performed in the first additional data (Meta information), the corresponding first additional data (Meta information) can be retained. If there is no destination module identifier for which the integrity check is not performed in the first additional data (Meta information), the corresponding first additional data (Meta information) is deleted.
[0141] In one embodiment, in order to facilitate the rapid location of data transmission anomalies, when there is a failed integrity check, verification failure information is generated and stored in a status register or memory for real-time reporting of the current data transmission status; wherein the verification failure information includes the source module identifier for transmitting the first input data, the destination module identifier, the redundant data generated by the source module, and the actual redundant data currently generated.
[0142] In this embodiment, integrity checking can promptly detect erroneous data during data transmission. Specifically, when performing integrity checking, if the integrity check fails, check failure information is generated and stored in a status register or memory, thereby realizing real-time reporting of the current data transmission abnormal status.
[0143] 404. If the integrity check is completed or the integrity check is not performed, determine whether the module at this level is the last module of the data path;
[0144] In this embodiment, considering that when the data read from Nand is transmitted to the Host, it is not necessary to perform integrity check in the Host, therefore, the last module in the data path (that is, the module adjacent to the Host) does not need to generate additional data (that is, Meta information). Therefore, when the integrity check is completed or not, it is necessary to determine whether the module at this level is the last module in the data path, so as to determine whether to generate the corresponding second additional data in the module at this level.
[0145] When all integrity checks that need to be performed in the current level module have been completed, for example, the data transmitted from the LDPC module, DM module and DPM module are all specified to be checked in the PCIe / NVMe module, then when all integrity checks are completed in the PCIe / NVMe module, it is necessary to determine whether the current level module is the last module in the data path; or when the integrity check is not specified to be performed in the current level module or the current level module is the first module in the data path, no integrity check is required, so it is necessary to determine whether the current level module is the last module in the data path.
[0146] Since the order of the modules in the data path is fixed, the order of each module can be predetermined, so as to be used to determine whether the module at this level is the last module of the data path.
[0147] 405. If the module at this level is not the last module of the data path, generate second additional data corresponding to the module at this level and use the second additional data together with the first input data as the second output data of the module at this level, and the second output data is the second input data of the next level module.
[0148] In this embodiment, except for the last module of the data path, whether integrity check is performed or not, the second additional data (Meta information) corresponding to the input data will be generated in other modules, that is, Meta=SM+DN+PM+VN. Among them, SM and DN are specifically determined according to the module corresponding to the data transmission. For example, if the current data needs to be transmitted from the LDPC module to the DM module, then SM=LDPC and DN=DM. PM and VN are used to perform integrity check on the transmitted data. The check method used for integrity check can be configured according to the actual application scenario. Any one or more check methods can be configured, such as PM=ECC, PM=CRC, or PM=ECC+CRC, etc. In addition, the location for integrity check can also be configured according to the actual application scenario. Any one or more modules in the data transmission direction can be configured, such as VN=DM, VN=DPM, VN=PCIe / NVMe, VN=DM+DPM, VN=DM+PCIe / NVMe, VN=DPM+PCIe / NVMe, or VN=DM+DPM+PCIe / NVMe.
[0149] In this embodiment, module output OM = module input IM + additional data Meta, assuming that data is transmitted from the LDPC module to the DM module, the input of the LDPC module is input1, the output is output1, and the additional data is meta1 (used to protect the input data input1), the input of the DM module is input2, the output is output2, and the additional data is meta2 (used to protect the input data input2), the output of the upper module is the input of the lower module: output1 = input2, output1 = input1 + meta1, output2 = input2 + meta2, then output2 = input2 + meta2 = (input1 + meta1) + meta2, it can be seen that the more modules the data to be transmitted passes through, the more additional data is included in the data to be transmitted, and each time the integrity check is completed, the corresponding additional data will be deleted accordingly. For example, VN = DMP in the above meta2, when the data is transmitted to the DMP module, it is necessary to perform an integrity check on the transmitted data in the DMP module, and delete meta2 after the check is completed.
[0150] In this embodiment, the second additional data generated in the current level module will be transmitted to the lower level module together with the first input data as the second output data of the current level module, and as the second input data of the lower level module, and then each node (that is, each module) on the subsequent data transmission path will execute the above steps 401-405 upon receiving new input data, thereby completing data transmission through each node on the transmission path, realizing integrity protection of the solid state drive data, and improving data accuracy.
[0151] See also Figure 5 , Figure 5 1 is a flow chart of a second embodiment of the data transmission method in an embodiment of the present invention. This embodiment is specifically applied to the write data path of the solid state drive, that is, the data transmission direction is Host—>Nand, and the data obtained from the Host is the second transmission data, specifically the user data UserData received by the Host. The data transmission method of this embodiment includes:
[0152] 501. Acquire third input data of any current-level module, where the third input data is the second transmission data or the third output data of the upper-level module, and the third output data includes the second transmission data and some third additional data;
[0153] This embodiment is specifically applied to the write data transmission of the solid-state hard disk, that is, the data transmission direction is Host—>Nand, and the module at this level is the output module of the data to be transmitted. Therefore, the module at this level can be any one of the PCIe / NVMe module, DPM module, DM module, LDPC module and Flash Controller module. When the module at this level is a PCIe / NVMe module, it does not have an upper-level module. Other modules have upper-level modules, for example, the upper-level module of the DPM module is the PCIe / NVMe module, the upper-level module of the DM module is the DPM module, the upper-level module of the LDPC module is the DM module, and the upper-level module of the Flash Controller module is any one of the LDPC modules.
[0154] For example, assuming that the module at this level is a PCIe / NVMe module, the input Input of the PCIe / NVMe module is the output Output_Host of the Host, that is, the user data UserData obtained from the Host. For another example, assuming that the module at this level is an LDPC module, the input Input of the LDPC module is the output Output_DM of the upper module DM module. Other modules are similar, so I will not go into details.
[0155] In this embodiment, when the module at this level is the first module in the write data path, such as a PCIe / NVMe module, the input data of the module at this level is user data; when the module at this level is not the first module in the write data path, such as a DPM module, a DM module, an LDPC module or a Flash Controller module, the input data of the module at this level is the output data of the upper module, and the output data of the upper module specifically includes user data and some additional data. Among them, each module (except the last module in the write data path) passed through during the data transmission process will generate corresponding additional data (that is, the Meta information described in the above embodiment), and the more modules the data transmission passes through, the more additional data will be included in the output data of the module.
[0156] In this embodiment, the third additional data in the output data of the upper-level module adopts the same data structure as the first and second additional data, that is, the source module identifier (SM) + the destination module identifier (DN) + the redundant data (PM) generated by the source module + the destination module identifier (VN) for integrity verification. For specific instructions, please refer to the above embodiment, so no further details will be given.
[0157] 502. If the third input data is the third output data, determine whether to perform integrity check on the third input data in the current level module based on the third data in each of the third additional data;
[0158] When the module at this level is the first module on the data transmission path, such as the Host module, it does not have an upper-level module, that is, it does not have the third additional data, and therefore, there is no need to perform integrity check.
[0159] It can be seen from the above step 501 that the third input data of the current level module is user data or the third output data of the upper level module, and the third output data of the upper level module includes user data and some third additional data. Since the original data does not contain the third additional data (that is, Meta information), there is no need to perform integrity check and directly execute the next step 504.
[0160] In this embodiment, in the third output data output by the upper module, each third additional data includes the third data, and the third data can be used to determine whether to perform integrity check on the third input data in the current module. In this embodiment, the specific form of the third data is not limited and can be set according to actual needs.
[0161] In one embodiment, the third additional data adopts the data structure designed by the present invention. If the third data adopts the destination module identifier VN for integrity verification, the above step 502 further includes:
[0162] 5021. If the third input data is the third output data, determine whether the destination module identifier for integrity verification in each of the third additional data matches the module identifier of the current level module;
[0163] 5022. If there is a match, determine to perform integrity check on the third input data in the module at this level; if there is a match, determine not to perform integrity check in the module at this level, and execute step 504.
[0164] In this embodiment, when data is transmitted to the module at this level, if the third input data is the third output data, the third additional data in the third input data (that is, the Meta information designed by the present invention) is extracted, and then the destination module identifier VN for integrity verification in the third additional data is obtained, and then VN is compared to see whether it matches the module at this level. If they match, it is determined to perform integrity verification on the third input data in the module at this level.
[0165] For example, in the input data of the current level module, the destination module identifier VN=LDPC for integrity check in the corresponding third additional data, and the current level module is an LDPC module, then it is determined that the two match, that is, it is necessary to perform integrity check on the currently transmitted input data in the LDPC module.
[0166] 503. If an integrity check is to be performed, based on the fourth data corresponding to the third additional data, an integrity check is performed on the third input data in the current level module and the corresponding third additional data is deleted;
[0167] In this embodiment, when it is determined through step 502 that the integrity of the currently transmitted data needs to be checked in the current level module, the fourth data in the third additional data that needs to be checked for integrity is used to perform an integrity check on the third input data in the current level module, wherein the verification method used for the integrity check is determined by the fourth data in the third additional data.
[0168] In one embodiment, the above step 503 further includes:
[0169] 5031. If an integrity check is performed, determining several check methods used for the integrity check based on the redundant data generated by the source module corresponding to the third additional data;
[0170] 5032. Call each of the verification methods in sequence to perform integrity verification on the third input data in the current level module until the integrity verification is completed, wherein, when each integrity verification is completed and there is no destination module identifier for which integrity verification has not been performed in the third additional data, the corresponding third additional data is deleted.
[0171] It can be seen from the above embodiments that the redundant data generated by the source module is used to protect the integrity of the input data, so the verification method used for integrity verification can be determined by the redundant data generated by the source module in the third additional data. The same additional data can generate multiple redundant data, and different redundant data need to use different verification methods for integrity verification.
[0172] For example, the module at this level is LDPC, and the third output data of its upper-level module DM includes the third additional data generated by the PCIe / NVMe module and the DPM module respectively, that is, two copies of Meta information, wherein VN=DPM in the Meta information corresponding to the PCIe / NVMe module, and VN=LDPC in the Meta information corresponding to the DPM module. Then, through module identifier matching, it is determined that it is necessary to perform integrity check on the data protected by the DPM module in the transmitted data in the LDPC module (that is, the module at this level).
[0173] Assuming that PM=ECC in the Meta information corresponding to the DPM module, in the current-level module LDPC, an ECC verification method is used to perform integrity verification on the data protected by the DPM module in the third input data.
[0174] In this embodiment, in the data writing process (Host—>Nand), in order to ensure the accuracy of data transmission, it is necessary to add corresponding Meta information in the data transmission process for integrity verification. Since the data finally written to Nand no longer needs to be checked for integrity, that is, the data finally written to Nand is user data, when each integrity verification is completed, if there is a destination module identifier that has not been checked for integrity in the third additional data (Meta information), the corresponding third additional data (Meta information) can be retained. If there is no destination module identifier that has not been checked for integrity in the third additional data (Meta information), the corresponding third additional data (Meta information) can be deleted.
[0175] In one embodiment, in order to facilitate the rapid location of data transmission anomalies, when there is a failed integrity check, check failure information is generated and stored in a status register or memory for real-time reporting of the current data transmission status; wherein the check failure information includes the source module identifier for transmitting the third input data, the destination module identifier, the redundant data generated by the source module, and the actual redundant data currently generated.
[0176] In this embodiment, integrity checking can promptly detect erroneous data during data transmission. Specifically, when performing integrity checking, if the integrity check fails, check failure information is generated and stored in a status register or memory, thereby realizing real-time reporting of the current data transmission abnormal status.
[0177] 504. If the integrity check is completed or the integrity check is not performed, determine whether the module at this level is the last module of the data path;
[0178] In this embodiment, considering that when the data obtained from the Host is written into the Nand, it is not necessary to perform an integrity check in the Nand, therefore, the corresponding last module in the data path (that is, the module adjacent to the Nand) does not need to generate additional data (that is, Meta information). Therefore, when the integrity check is completed or not, it is necessary to determine whether the module at this level is the last module in the data path, so as to determine whether to generate the corresponding fourth additional data in the module at this level.
[0179] When all integrity checks that need to be performed on the current level module have been completed, for example, the data transmitted from the PCIe / NVMe module, DPM module, DM module and LDPC module are all specified to be checked in the LDPC module, then when all integrity checks are completed in the LDPC module, it is necessary to determine whether the current level module is the last module in the data path; or when the integrity check is not specified to be performed on the current level module or the current level module is the first module in the data path, no integrity check is required, so it is necessary to determine whether the current level module is the last module in the data path.
[0180] Since the order of the modules in the data path is fixed, the order of each module can be predetermined, so as to be used to determine whether the current module is the last module of the data path.
[0181] 505. If the module at this level is not the last module of the data path, generate fourth additional data corresponding to the module at this level and use it together with the third input data as fourth output data of the module at this level, and the fourth output data is the fourth input data of the lower level module.
[0182] In this embodiment, except for the last module of the data path, whether integrity check is performed or not, the fourth additional data (Meta information) corresponding to the input data will be generated in other modules, that is, Meta=SM+DN+PM+VN. Among them, SM and DN are specifically determined according to the module corresponding to the data transmission. For example, if the current data needs to be transmitted from the PCIe / NVMe module to the DPM module, then SM=PCIe / NVMe and DN=DPM. PM and VN are used to perform integrity check on the transmitted data. The check method used for integrity check can be configured according to the actual application scenario. Any one or more check methods can be configured, such as PM=ECC, PM=CRC, or PM=ECC+CRC, etc. The position of the integrity check can also be configured according to the actual application scenario. Any one or more modules in the data transmission direction can be configured, such as VN=DPM, or VN=DM, or VN=LDPC, or VN=DPM+DM, or VN=DPM+LDPC, or VN=DM+LDPC, or VN=DPM+DM+LDPC.
[0183] In this embodiment, module output OM=module input IM+additional data Meta. Assuming that data is transmitted from the PCIe / NVMe module to the DPM module, the input of the PCIe / NVMe module is input3, the output is output3, and the additional data is meta3 (used to protect the input data input3), the input of the DPM module is input4, the output is output4, and the additional data is meta4 (used to protect the input data input4), and the output of the upper-level module is the input of the lower-level module: output3=input4, output3=input3+meta3, output4=input4+meta4, then output4=input4+meta4=(input3+mata3)+meta4. It can be seen that the more modules the data to be transmitted passes through, the more additional data is included in the data to be transmitted, and the corresponding additional data can be deleted or retained after each integrity check. For example, if VN=DM in the above meta4, then when the data is transmitted to the DM module, it is necessary to perform an integrity check on the transmitted data in the DM module, and meta4 is deleted after the check is completed; if VN=DM+LDPC in meta4, then when the data is transmitted to the DM module, it is necessary to perform an integrity check on the transmitted data in the DM module, and meta4 is retained after the integrity check is completed (it needs to be deleted after the integrity check is completed in the LDPC module).
[0184] In this embodiment, the fourth additional data generated in the current level module will be transmitted to the lower level module together with the third input data as the fourth output data of the current level module, and as the fourth input data of the lower level module, and then each node (that is, each module) on the subsequent data transmission path will execute the above steps 501-505 upon receiving new input data, thereby completing data transmission through each node on the transmission path, realizing integrity protection of the solid state drive data, and improving data accuracy.
[0185] The above describes the data transmission method in the embodiment of the present invention. The following describes the data transmission device in the embodiment of the present invention. The data transmission device in the embodiment of the present invention is applied to the data path of the solid state drive. The data path has multiple modules with a relatively superior and subordinate relationship. Figure 6 , an embodiment of the data transmission device in the embodiment of the present invention includes:
[0186] An acquisition module 601 is used to acquire first input data of any current-level module, where the first input data is original data to be transmitted or first output data of an upper-level module, and the first output data includes the original data to be transmitted and a plurality of first additional data;
[0187] A first judgment module 602 is configured to judge whether to perform integrity check on the first input data in a current-level module based on the first data in each of the first additional data if the first input data is the first output data;
[0188] A verification module 603, configured to, if an integrity check is to be performed, perform an integrity check on the first input data in a current level module based on the second data in the first additional data and delete the first additional data corresponding to the first input data;
[0189] A second determination module 604, configured to determine whether the module at this level is the last module of the data path if the integrity check is completed or not;
[0190] Generation module 605 is used to generate second additional data corresponding to the current level module if the current level module is not the last module of the data path, and use the second additional data together with the first input data as the second output data of the current level module, and the second output data is the second input data of the lower level module.
[0191] Optionally, in one embodiment, the first additional data and the second additional data adopt the same data structure, and the data structure includes: a source module identifier, a destination module identifier, redundant data generated by the source module, and a destination module identifier for integrity verification;
[0192] Among them, the source module identifier and the destination module identifier are used to identify the data transmission path in the data path, the redundant data generated by the source module is used to protect the data to be transmitted in the data transmission path, and the destination module identifier for integrity verification is used to identify the module for performing integrity verification on the data to be transmitted.
[0193] Optionally, in one embodiment, the first determining module 602 is specifically configured to:
[0194] Determine whether the destination module identifier for integrity check in each of the first additional data matches the module identifier of the current level module; if they match, determine to perform integrity check on the first input data in the current level module.
[0195] Optionally, in one embodiment, the verification module 603 is specifically used for:
[0196] If an integrity check is performed, several verification methods used for the integrity check are determined based on the redundant data generated by the source module in the first additional data; each of the verification methods is called in turn to perform an integrity check on the first input data in the module at this level until the integrity check is completed, wherein, when each integrity check is completed and there is no destination module identifier for which the integrity check has not been performed in the first additional data, the corresponding first additional data is deleted.
[0197] Optionally, in one embodiment, the data transmission device further includes:
[0198] The status reporting module 606 is used to generate verification failure information and store it in a status register or memory when there is a failed integrity check, so as to report the current data transmission status in real time; wherein the verification failure information includes the source module identifier of the first input data transmitted, the destination module identifier, the redundant data generated by the source module, and the actual redundant data currently generated.
[0199] Optionally, in one embodiment, the data path includes a read data path and a write data path;
[0200] When the data path is a read data path, the original data to be transmitted is first transmission data read from a storage medium; when the data path is a write data path, the original data to be transmitted is second transmission data obtained from a host.
[0201] Optionally, in one embodiment, the output of any module M in the data path is defined as:
[0202] OM=IM+SM+DN+PM+VN;
[0203] Among them, OM represents the output data of module M, OM is the data to be transmitted in the data path that needs to be transmitted to the lower module, IM represents the input data of module M, and IM is the output data of the upper module; SM and DN respectively represent the source module M and the destination module N corresponding to the data to be transmitted; PM represents the redundant data generated by the source module M; VN represents the integrity check in the destination module N.
[0204] Since the embodiments of the device part correspond to the embodiments of the above-mentioned method, please refer to the above-mentioned method embodiments for the introduction of the data transmission device provided by the present invention. The present invention will not be repeated here, and it has the same beneficial effects as the above-mentioned data transmission method.
[0205] above Figure 6 The data transmission device in the embodiment of the present invention is described in detail from the perspective of modular functional entities, and the computer device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0206] Figure 7 7 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. The computer device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 710 (for example, one or more processors) and a memory 720, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 733 or data 732. Among them, the memory 720 and the storage medium 730 can be temporary storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device 700. Furthermore, the processor 710 can be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the computer device 700.
[0207] The computer device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and / or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 7 The illustrated computer device structure does not constitute a limitation on the computer device, and may include more or fewer components than illustrated, or combine certain components, or arrange the components differently.
[0208] The present invention also provides a computer device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the data transmission method in the above embodiments.
[0209] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the data transmission method.
[0210] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0211] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0212] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data transmission method, applied to a data path of a solid state drive, wherein the data path has a plurality of modules with a relatively superior-subordinate relationship, characterized in that: The data transmission method comprises: Acquire first input data of any current-level module, where the first input data is original data to be transmitted or first output data of an upper-level module, and the first output data includes the original data to be transmitted and a plurality of first additional data; If the first input data is the first output data, determining whether to perform integrity check on the first input data in a module at this level based on the first data in each of the first additional data; If an integrity check is performed, based on the second data in the corresponding first additional data, an integrity check is performed on the first input data in the current level module and the corresponding first additional data is deleted; If the integrity check is completed or no integrity check is performed, determining whether the module at this level is the last module of the data path; If the module at this level is not the last module of the data path, the second additional data corresponding to the module at this level is generated and used together with the first input data as the second output data of the module at this level, and the second output data is the second input data of the lower-level module.
2. The data transmission method according to claim 1, characterized in that: The first additional data and the second additional data adopt the same data structure, and the data structure includes: a source module identifier, a destination module identifier, redundant data generated by the source module, and a destination module identifier for integrity verification; Among them, the source module identifier and the destination module identifier are used to identify the data transmission path in the data path, the redundant data generated by the source module is used to protect the data to be transmitted in the data transmission path, and the destination module identifier for integrity verification is used to identify the module for performing integrity verification on the data to be transmitted.
3. The data transmission method according to claim 2, characterized in that: If the first input data is the first output data, judging whether to perform integrity check on the first input data in the current level module based on the first data in each of the first additional data includes: If the first input data is the first output data, determining whether the destination module identifier for integrity verification in each of the first additional data matches the module identifier of the current level module; If they match, it is determined that the integrity check of the first input data is performed in the module at this level.
4. The data transmission method according to claim 2, characterized in that: If the integrity check is performed, then based on the second data in the corresponding first additional data, in the current level module, the integrity check is performed on the first input data and the corresponding first additional data is deleted, including: If an integrity check is performed, determining several check methods used for the integrity check based on the redundant data generated by the source module corresponding to the first additional data; Call each of the verification methods in sequence to perform integrity verification on the first input data in the current level module until the integrity verification is completed, wherein, when each integrity verification is completed and there is no destination module identifier for which integrity verification has not been performed in the first additional data, the corresponding first additional data is deleted.
5. The data transmission method according to claim 4, characterized in that: The data transmission method further comprises: When there is an integrity check that fails, a check failure message is generated and stored in a status register or memory for real-time reporting of the current data transmission status; The verification failure information includes a source module identifier for transmitting the first input data, a destination module identifier, redundant data generated by the source module, and actual redundant data currently generated.
6. The data transmission method according to claim 1, characterized in that: The data path includes a read data path and a write data path; When the data path is a read data path, the original data to be transmitted is first transmission data read from a storage medium; when the data path is a write data path, the original data to be transmitted is second transmission data obtained from a host.
7. The data transmission method according to claim 2, characterized in that: The output of any module M in the data path is defined as: OM=IM+SM+DN+PM+VN; Among them, OM represents the output data of module M, OM is the data to be transmitted in the data path that needs to be transmitted to the lower module, IM represents the input data of module M, and IM is the output data of the upper module; SM and DN respectively represent the source module M and the destination module N corresponding to the data to be transmitted; PM represents the redundant data generated by the source module M; VN represents the integrity check in the destination module N.
8. A data transmission device, applied to a data path of a solid state hard disk, wherein the data path has a plurality of modules with a relatively superior-subordinate relationship, characterized in that: The data transmission device comprises: An acquisition module, used for acquiring first input data of any current-level module, wherein the first input data is original data to be transmitted or first output data of an upper-level module, and the first output data includes the original data to be transmitted and a plurality of first additional data; a first judgment module, configured to judge whether to perform integrity check on the first input data in a current-level module based on the first data in each of the first additional data if the first input data is the first output data; a verification module, configured to, if an integrity check is to be performed, perform an integrity check on the first input data in a current level module based on the second data in the first additional data and delete the first additional data corresponding to the first input data; A second judgment module, configured to judge whether the module at this level is the last module of the data path if the integrity check is completed or not; A generation module is used to generate second additional data corresponding to the module of this level if the module of this level is not the last module of the data path, and use the second additional data together with the first input data as the second output data of the module of this level, and the second output data is the second input data of the lower-level module.
9. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to execute the data transmission method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Database backup verification method and device
CN107193683A
Verification method and apparatus for integrity of immediate data
CN108304214A
Method and device for improving reliability of data path of solid state disk, computer equipment and storage medium
CN111625199A
Method for secure data transfer
US20100287442A1
Data synchronization using redundancy detection
US20160378844A1
