Data interaction method and device, equipment and storage medium
By multiplexing the same Admin processing function in the solid-state drive to process the in-band and out-of-band sending commands of NVMe Admin Commands, the code redundancy problem is solved and efficient data interaction processing is achieved.
Patent Information
- Application Number
- CN202510002233.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the in-band and out-of-band transmission command processing of NVMe Admin Commands has code redundancy, making it difficult to reuse the same Admin processing function for data processing.
By extracting the target data sending commands from the preset in-band or out-of-band Admin processing linked list based on serialization processing methods in a solid state hard disk, and multiplexing the same Admin processing function, the data sending commands sent in-band and out-of-band are processed.
The multiplexing of in-band and out-of-band Admin commands is realized, avoiding code redundancy and improving the efficiency and reliability of data interaction.
Smart Images

Figure CN119829052A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a data interaction method, device, equipment and storage medium. Background Art
[0002] NVMe Admin Commands are a series of management commands for NVMe (Non Volatile Memory Express, a communication interface) SSD (Solid State Disk, solid state disk) subsystems defined in the NVM Express Base Specification. The host software manages NVMe SSD devices in-band through these commands. The NVM Express Management Interface Specification is a supplement to the NVM Express Base Specification protocol, which defines a management interface that supports communication with NVMe SSD devices out-of-band. The protocol describes the mechanism for sending certain NVMe Admin Commands out-of-band, expanding the NVMe out-of-band management capabilities.
[0003] At present, when data is transmitted, the function of sending data in-band and out-band is usually implemented separately in the manner specified by the protocol. Since the functions of in-band and out-band Admin commands overlap, it is inevitable that code redundancy will occur. Therefore, finding a method to reuse the in-band Admin command processing function to implement the out-band Admin function and reduce code redundancy is a problem that needs to be solved. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a data interaction method, device, equipment and storage medium, which can reuse the same Admin processing function for data processing and solve the problem of code redundancy. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a data interaction method, which is applied to a solid state drive, comprising:
[0006] Extracting a target data sending command from a preset target Admin processing linked list based on a serialized processing method; wherein the preset target Admin processing linked list is a preset in-band Admin processing linked list or a preset out-band Admin processing linked list, and the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively store data sending commands for in-band sending and out-band sending, and the data sending commands for in-band sending and out-band sending both reuse the same target Admin processing function;
[0007] Acquire the target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command;
[0008] The target Admin processing function is called, a target response message corresponding to the target data is generated according to the target sending mode and the target Admin processing function, and the target response message is sent to the target host that generates the target data sending command.
[0009] Optionally, before extracting the target data from the preset target Admin processing linked list based on the serial processing method and sending the command, the method further includes:
[0010] The target data sending command sent out-of-band is formatted to obtain a converted data sending command, and the target data carried in the target data sending command sent out-of-band is stored in a buffer corresponding to the converted data sending command.
[0011] Optionally, before extracting the target data from the preset target Admin processing linked list based on the serial processing method and sending the command, the method further includes:
[0012] The data sending command sent in-band and the data sending command sent out-band are obtained, and the data sending command sent in-band and the data sending command sent out-band are stored in the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively.
[0013] Optionally, acquiring the target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command includes:
[0014] If the target sending mode corresponding to the target data sending command is out-of-band sending, the target data contained in the target data sending command is copied to a target buffer to obtain the target data corresponding to the target data sending command.
[0015] Optionally, acquiring the target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command includes:
[0016] If the target sending mode corresponding to the target data sending command is in-band sending, the target data on the memory of the target host is moved using the target data sending command and direct storage access technology to obtain the target data corresponding to the target data sending command.
[0017] Optionally, generating a target response message corresponding to the target data according to the target sending mode and the target Admin processing function includes:
[0018] If the target sending mode is in-band sending, the target response information corresponding to the target data is generated by using the target Admin processing function;
[0019] If the target sending mode is out-of-band sending, the target Admin processing function is fine-tuned, initial response information is generated according to the fine-tuned processing function, and the format of the initial response information is converted to obtain the target response information corresponding to the target data.
[0020] In a second aspect, the present application provides a data interaction method, applied to a target host, comprising:
[0021] Generate a target data sending command; the target data sending command is a data sending command for in-band sending or out-of-band sending, and both the in-band sending and the out-of-band sending data sending commands reuse the same target Admin processing function;
[0022] Send the target data sending command to the solid state drive, so that the solid state drive obtains the target data corresponding to the target data sending command according to the target data sending command and the sending method of the target data sending command, and generates a target response message corresponding to the target data by using the target Admin processing function;
[0023] Receive the target response message sent by the solid state drive.
[0024] In a third aspect, the present application provides a data interaction device, applied to a solid state drive, comprising:
[0025] A command extraction module is used to extract a target data sending command from a preset target Admin processing linked list based on a serialized processing method; wherein the preset target Admin processing linked list is a preset in-band Admin processing linked list or a preset out-band Admin processing linked list, and the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively store data sending commands for in-band sending and out-band sending, and the data sending commands for in-band sending and out-band sending both reuse the same target Admin processing function;
[0026] A target data acquisition module, used for acquiring target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command;
[0027] A response message sending module is used to call the target Admin processing function, generate a target response message corresponding to the target data according to the target sending method and the target Admin processing function, and send the target response message to the target host that generates the target data sending command.
[0028] In a fourth aspect, the present application provides an electronic device, including:
[0029] Memory, used to store computer programs;
[0030] A processor is used to execute the computer program to implement the aforementioned data interaction method.
[0031] In a fifth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the aforementioned data interaction method when executed by a processor.
[0032] In the present application, the solid-state hard disk first extracts the target data sending command from the preset target Admin processing linked list based on the serialized processing method; wherein the preset target Admin processing linked list is a preset in-band Admin processing linked list or a preset out-of-band Admin processing linked list, and the preset in-band Admin processing linked list and the preset out-of-band Admin processing linked list respectively store the data sending commands for in-band sending and out-of-band sending, and the data sending commands for in-band sending and out-of-band sending both reuse the same target Admin processing function, and then obtain the target data corresponding to the target data sending command according to the target data sending command and the target sending method corresponding to the target data sending command, and finally call the target Admin processing function, generate the target response message corresponding to the target data according to the target sending method and the target Admin processing function, and send the target response message to the target host that generates the target data sending command. It can be seen that the present application uses the same Admin processing function to process the data sending commands with the sending methods of in-band sending and out-of-band sending respectively, thereby avoiding the use of different data sending methods to process the data sending commands for in-band sending and out-of-band sending, thereby solving the problem of code redundancy. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0034] Figure 1A flow chart of a data interaction method provided for this application;
[0035] Figure 2 A flow chart of a specific data interaction method provided for this application;
[0036] Figure 3 A flow chart of a data interaction method provided for this application;
[0037] Figure 4 A schematic diagram of the structure of a data interaction device provided in this application;
[0038] Figure 5 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] At present, different processing methods are used to process the Admin commands sent in-band and the Admin commands sent out-of-band, and this data processing method has the problem of code redundancy in the system. To this end, the present application provides a data interaction method, which uses the same Admin processing function to process the data sending commands sent in-band and out-of-band, respectively, avoiding the problem of code redundancy.
[0041] See also Figure 1 As shown, an embodiment of the present invention discloses a data interaction method, which is applied to a solid state drive, including:
[0042] Step S11, extracting the target data sending command from the preset target Admin processing linked list based on the serial processing method; wherein, the preset target Admin processing linked list is a preset in-band Admin processing linked list or a preset out-of-band Admin processing linked list, and the preset in-band Admin processing linked list and the preset out-of-band Admin processing linked list respectively store the data sending commands for in-band sending and out-of-band sending, and the data sending commands for in-band sending and out-of-band sending both reuse the same target Admin processing function.
[0043] In this embodiment, before extracting the target data sending command from the preset target Admin processing linked list, it also includes: formatting the target data sending command sent out-of-band to obtain a converted data sending command, and storing the target data carried in the target data sending command sent out-of-band in a buffer corresponding to the converted data sending command; specifically, for the Admin command sent out-of-band, that is, the data sending command sent out-of-band, when the MI (ManagementInterface) module receives the Admin command sent out-of-band, it parses the command message, assembles the command message into a standard Admin SQE (Submission Queue Entry) format, and places the data carried in the out-of-band Admin command, that is, the target data, in the buffer. It should be noted that the above-mentioned buffer is applied for by the MI module, and the size and address of the buffer are borrowed from the SGL field (Scatter Gather) in the DTPR (DataPointer) bit in the Admin SQE message format. List, that is, the above buffer is described by the address and length of the SGL field (address represents the address of the storage buffer, and length represents the size of the storage buffer). It should be noted that the data carried in the out-of-band Admin command can also be stored using the PRP (Physical Region Page) field in the DTPR bit.
[0044] In this embodiment, before extracting the target data sending command from the preset target Admin processing linked list, it also includes: obtaining the data sending command sent in-band and the data sending command sent out-band, and storing the data sending command sent in-band and the data sending command sent out-band to the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively; the above storage process is the responsibility of the in-band Admin processing module, that is, the in-band Admin processing module receives the Admin command message sent by MI, and puts the commands from MI, that is, the target data sending command sent out-band and the Admin command sent in-band, that is, the target data sending command sent in-band, into different processing linked lists in sequence, that is, the preset in-band Admin processing linked list and the preset out-of-band Admin processing linked list.
[0045] In this embodiment, a serial processing method is used when extracting the target data from the target Admin processing linked list to send the command, such as Figure 2As shown, each task scheduling loop only processes one Admin command message, and processes the Admin commands in different linked lists in turn; when processing a specific Admin command, the same set of command processing functions, namely the target Admin processing function, is called; when processing commands, the target data sending commands can be extracted from the in-band Admin processing linked list and the out-of-band Admin processing linked list in turn according to the order in which the commands are received.
[0046] It should be noted that the functions of Admin commands implemented by in-band sending and Admin commands implemented by out-of-band sending are completely overlapping, but the calling channels are different. The MI protocol defines the request message format for sending Admin commands out-of-band, where the contents of bytes 8-27 correspond to the NVMe in-band command format Submission Queue Entry Dword 1-5, bytes 44-67 correspond to the NVMe in-band command format Submission Queue Entry Dword 10-15, and bytes 68 and the following fields define the data that may be carried by the Admin command. The difference is that the Admin command sent using the out-of-band mechanism in the MI protocol sends the data that may be carried as part of the command message, rather than using the PRP list or SGL segment transmission (two ways of transmitting data using the in-band mechanism), that is, the data carried by the in-band Admin command is transmitted through DMA (Direct Memory Access, i.e. direct storage access technology). The SSD device obtains the specific address of the data in the Host memory through the DTPR field in the SQE and moves the data through DMA; the data carried by the out-of-band Admin command is transmitted as part of the command message; and the in-band Admin SQE defines two addressing modes for DMA: PRP and SGL. The essential difference between PRP and SGL is that PRP must be physically page aligned, while SGL can represent any physical space; and the Admin command sent out-of-band can carry target data. When the host does not need to transfer data to the SSD, the command may not carry target data; in the MI request message field, that is, the Admin command sent out-of-band, the DPTR and MPTR (Memory Pointer) fields in the command, that is, the SGL field, are reserved and unused. Since the command format sent in-band overlaps with the command format sent out-of-band, the same set of command processing functions can be used for processing. By storing commands in different processing linked lists according to the sending method of the Admin command, the reliability of data classification is improved.
[0047] Step S12: acquiring target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command.
[0048] In this embodiment, the method of obtaining the target data is determined by the target sending method corresponding to the target data sending command. In a specific implementation, if the target sending method corresponding to the target data sending command is out-of-band sending, the target data contained in the target data sending command is copied to the target buffer to obtain the target data corresponding to the target data sending command; in another specific implementation, if the target sending method corresponding to the target data sending command is in-band sending, the target data on the memory of the target host is moved using the target data sending command and the direct storage access technology to obtain the target data corresponding to the target data sending command, that is, if the host has data to send to the SSD, the in-band processing method is to move it from the host memory through DMA, and because the out-of-band data is directly packaged in the MI request data structure, that is, the data sending command sent out-of-band, the processing method needs to be modified accordingly. If it is determined that the command is from the MI out-of-band channel, the DMA moving process is skipped, and the data is copied from the MCTP (Management Component Transport Protocol) message, that is, the target data sending command sent out-of-band to the target buffer of the DMA read. It should be noted that if the SSD has data to send to the host, the in-band data is also moved through DMA, and the out-of-band message is directly packaged in the response message, and does not need DMA movement. By using the target sending method corresponding to the target data sending command, the target data is obtained by different data acquisition methods, which improves the rationality of the data interaction process.
[0049] Step S13, calling the target Admin processing function, generating a target response message corresponding to the target data according to the target sending mode and the target Admin processing function, and sending the target response message to the target host that generates the target data sending command.
[0050] In this embodiment, the process of generating a target response message corresponding to the target data according to the target sending mode and the target Admin processing function specifically includes: if the target sending mode is in-band sending, the target response information corresponding to the target data is generated by using the target Admin processing function; if the target sending mode is out-of-band sending, the target Admin processing function is fine-tuned, and the initial response information is generated according to the fine-tuned processing function, and the format of the initial response information is converted to obtain the target response information corresponding to the target data; it should be noted that the above-mentioned target Admin processing function is a processing function corresponding to the target data sending command sent in-band. If the sending mode corresponding to the target data sending command is in-band sending, the target Admin processing function can be used to directly generate the target response message corresponding to the target data; if the target The sending mode corresponding to the target data sending command is out-of-band sending. Since the target Admin processing function is the processing function corresponding to the target data sending command sent in-band, the target Admin processing function needs to be fine-tuned so that the fine-tuned function can process the target data sending command sent out-of-band. It should be noted that the response message generated by the fine-tuned function is an initial response message that does not have the corresponding format of the out-of-band sending mode; after the fine-tuned target Admin processing function generates the initial response message, it will store the initial response message in the buffer. When it is necessary to return a response message to the host, the initial response message is obtained from the buffer, and the initial response message is assembled into a target response message. The relevant content of the response message is provided to the MI module through shared memory, and the MI module sends the CQE (Completion The present application innovatively utilizes the SGL field for data transmission. Specifically, when the out-of-band Admin command carries target data, the MI module passes the target data to the Admin processing module through the SGL field, and the Admin processing module transmits the response message back to the MI module through the buffer corresponding to the SGL field. When the response message carries data that needs to be transmitted to the host, the MI module uses the SGL field to pass the buffer to the Admin processing module, and the Admin processing module uses the buffer to pass the response message and the data to be transmitted to the MI module. When the host does not need to transmit data to the solid-state drive, it is still necessary to use the MI module to apply for the creation of the above buffer and pass the empty buffer to the Admin processing module so that the Admin processing module can pass the response message to the MI module. Moreover, in addition to reusing the same Admin processing function, the present embodiment also reuses the same set of Admin command processing framework.It is understandable that, in the process of receiving out-of-band Admin commands, the SGL buffer, i.e., the above buffer, is used to store the additional data in the request message; after processing the Admin command, the buffer corresponding to the SGL field stores the CQE message and the additional data in the initial response message; therefore, when applying for the buffer, it is necessary to ensure that the buffer size can accommodate the CQE data structure. By reusing the same Admin processing function and Admin command processing framework, the problem of interference between the Admin commands sent in-band and the Admin commands sent out-of-band during processing is solved.
[0051] It can be seen that the present application utilizes the same Admin processing function and command processing framework to process data sending commands with in-band sending and out-of-band sending modes respectively, thereby avoiding the use of different data sending modes to process in-band sending and out-of-band sending commands respectively, thereby solving the problem of code redundancy; by utilizing a serialized processing method, a target data sending command is extracted from the target Admin processing linked list each time, and by reusing the same Admin processing function and command processing framework, the problem of command interference caused by different callers of in-band and out-of-band Admin commands is solved.
[0052] Based on the above embodiments, it can be seen that the present application describes the specific work of the solid state drive part during the data interaction process. In order to make the technical solution of the present application more complete, the present application will next describe the work of the target host during the data interaction process. Figure 3 As shown, the embodiment of the present application provides a data interaction process, which is applied to a target host and includes:
[0053] Step S21, generating a target data sending command; the target data sending command is a data sending command for in-band sending or out-of-band sending, and both the data sending commands for in-band sending and out-of-band sending reuse the same target Admin processing function.
[0054] Step S22, sending the target data sending command to the solid state drive, so that the solid state drive obtains the target data corresponding to the target data sending command according to the target data sending command and the sending method of the target data sending command, and uses the target Admin processing function to generate a target response message corresponding to the target data.
[0055] Step S23: receiving the target response message sent by the solid state drive.
[0056] It can be seen that the present application utilizes the same Admin processing function to process data sending commands with in-band sending and out-of-band sending modes respectively, thereby avoiding using different data sending modes to process in-band sending and out-of-band sending commands respectively, thereby solving the problem of code redundancy.
[0057] See also Figure 4 As shown, the embodiment of the present application discloses a data interaction device, which is applied to a solid state drive, including:
[0058] The command extraction module 11 is used to extract the target data sending command from the preset target Admin processing chain table based on the serial processing method; wherein the preset target Admin processing chain table is a preset in-band Admin processing chain table or a preset out-band Admin processing chain table, and the preset in-band Admin processing chain table and the preset out-band Admin processing chain table respectively store the data sending commands for in-band sending and out-band sending, and the data sending commands for in-band sending and out-band sending both reuse the same target Admin processing function;
[0059] A target data acquisition module 12, configured to acquire target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command;
[0060] The response message sending module 13 is used to call the target Admin processing function, generate a target response message corresponding to the target data according to the target sending mode and the target Admin processing function, and send the target response message to the target host that generates the target data sending command.
[0061] It can be seen that the present application utilizes the same Admin processing function to process data sending commands with in-band sending and out-of-band sending modes respectively, thereby avoiding using different data sending modes to process in-band sending and out-of-band sending commands respectively, thereby solving the problem of code redundancy.
[0062] In some specific implementations, the command extraction module 11 further includes:
[0063] The data storage unit is used to convert the format of the target data sending command sent out of band to obtain a converted data sending command, and store the target data carried in the target data sending command sent out of band into a buffer corresponding to the converted data sending command.
[0064] In some specific implementations, the command extraction module 11 further includes:
[0065] The command storage unit is used to obtain the data sending command sent in-band and the data sending command sent out-band, and store the data sending command sent in-band and the data sending command sent out-band in the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively.
[0066] In some specific implementations, the target data acquisition module 12 specifically includes:
[0067] The first data acquisition unit is used to copy the target data contained in the target data sending command to a target buffer if the target sending mode corresponding to the target data sending command is out-of-band sending, so as to obtain the target data corresponding to the target data sending command.
[0068] In some specific implementations, the target data acquisition module 12 specifically includes:
[0069] The second data acquisition unit is used to move the target data on the memory of the target host by using the target data sending command and direct storage access technology if the target sending mode corresponding to the target data sending command is in-band sending, so as to obtain the target data corresponding to the target data sending command.
[0070] In some specific implementations, the response message sending module 13 specifically includes:
[0071] a response message generating unit, configured to generate the target response information corresponding to the target data by using the target Admin processing function if the target sending mode is in-band sending;
[0072] A function fine-tuning unit is used to fine-tune the target Admin processing function if the target sending mode is out-of-band sending, generate initial response information according to the fine-tuned processing function, and convert the format of the initial response information to obtain the target response information corresponding to the target data.
[0073] Furthermore, the present application also discloses an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0074] Figure 5A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data interaction method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0075] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0076] In addition, the memory 22 as a carrier for storing resources may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0077] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the data interaction method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0078] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed data interaction method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0079] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0080] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0081] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0082] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0083] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data interaction method, characterized in that: Applied to solid state drives, including: Extracting a target data sending command from a preset target Admin processing linked list based on a serialized processing method; wherein the preset target Admin processing linked list is a preset in-band Admin processing linked list or a preset out-band Admin processing linked list, and the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively store data sending commands for in-band sending and out-band sending, and the data sending commands for in-band sending and out-band sending both reuse the same target Admin processing function; Acquire the target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command; The target Admin processing function is called, a target response message corresponding to the target data is generated according to the target sending mode and the target Admin processing function, and the target response message is sent to the target host that generates the target data sending command.
2. The data interaction method according to claim 1, characterized in that: Before extracting the target data from the preset target Admin processing linked list based on the serial processing method and sending the command, it also includes: The format of the target data sending command sent out-of-band is converted to obtain a converted data sending command, and the target data carried in the target data sending command sent out-of-band is stored in a buffer corresponding to the converted data sending command.
3. The data interaction method according to claim 1, characterized in that: Before extracting the target data from the preset target Admin processing linked list based on the serial processing method and sending the command, it also includes: The data sending command sent in-band and the data sending command sent out-band are obtained, and the data sending command sent in-band and the data sending command sent out-band are stored in the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively.
4. The data interaction method according to claim 1, characterized in that: The acquiring the target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command comprises: If the target sending mode corresponding to the target data sending command is out-of-band sending, the target data contained in the target data sending command is copied to a target buffer to obtain the target data corresponding to the target data sending command.
5. The data interaction method according to claim 1, characterized in that: The acquiring the target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command comprises: If the target sending mode corresponding to the target data sending command is in-band sending, the target data on the memory of the target host is moved using the target data sending command and direct storage access technology to obtain the target data corresponding to the target data sending command.
6. The data interaction method according to any one of claims 1 to 5, characterized in that: The generating a target response message corresponding to the target data according to the target sending mode and the target Admin processing function includes: If the target sending mode is in-band sending, the target response information corresponding to the target data is generated by using the target Admin processing function; If the target sending mode is out-of-band sending, the target Admin processing function is fine-tuned, initial response information is generated according to the fine-tuned processing function, and the format of the initial response information is converted to obtain the target response information corresponding to the target data.
7. A data interaction method, characterized in that: Applied to the target host, including: Generate a target data sending command; the target data sending command is a data sending command for in-band sending or out-of-band sending, and both the in-band sending and the out-of-band sending data sending commands reuse the same target Admin processing function; Send the target data sending command to the solid state drive, so that the solid state drive obtains the target data corresponding to the target data sending command according to the target data sending command and the sending method of the target data sending command, and generates a target response message corresponding to the target data by using the target Admin processing function; Receive the target response message sent by the solid state drive.
8. A data interaction device, characterized in that: Applied to solid state drives, including: A command extraction module is used to extract a target data sending command from a preset target Admin processing linked list based on a serialized processing method; wherein the preset target Admin processing linked list is a preset in-band Admin processing linked list or a preset out-band Admin processing linked list, and the preset in-band Admin processing linked list and the preset out-band Admin processing linked list respectively store data sending commands for in-band sending and out-band sending, and the data sending commands for in-band sending and out-band sending both reuse the same target Admin processing function; A target data acquisition module, used for acquiring target data corresponding to the target data sending command according to the target data sending command and the target sending mode corresponding to the target data sending command; A response message sending module is used to call the target Admin processing function, generate a target response message corresponding to the target data according to the target sending method and the target Admin processing function, and send the target response message to the target host that generates the target data sending command.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the data interaction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the data interaction method according to any one of claims 1 to 7.