[go: up one dir, main page]

CN118642883A - Data processing method, device, equipment and readable storage medium based on network card - Google Patents

Data processing method, device, equipment and readable storage medium based on network card Download PDF

Info

Publication number
CN118642883A
CN118642883A CN202411097861.6A CN202411097861A CN118642883A CN 118642883 A CN118642883 A CN 118642883A CN 202411097861 A CN202411097861 A CN 202411097861A CN 118642883 A CN118642883 A CN 118642883A
Authority
CN
China
Prior art keywords
storage
unit
message
messages
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202411097861.6A
Other languages
Chinese (zh)
Other versions
CN118642883B (en
Inventor
施路
周肇勋
刘杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202411097861.6A priority Critical patent/CN118642883B/en
Publication of CN118642883A publication Critical patent/CN118642883A/en
Application granted granted Critical
Publication of CN118642883B publication Critical patent/CN118642883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data processing method, a device, equipment and a readable storage medium based on a network card, wherein the method comprises the following steps: dividing an initial block storage message into N unit storage messages with target storage lengths based on the unit storage lengths, generating redundancy check values of each unit storage message, generating N access block storage messages according to the N unit storage messages and the N redundancy check values, and converting the message format of the unit storage messages in the N access block storage messages through a remote direct access protocol to obtain N unit network messages, and generating N transmission network messages according to the N unit network messages and the N redundancy check values; the storage length of the N unit network messages is equal to the target storage length; and sending the N transmission network messages to the second equipment so that the second equipment writes the N transmission network messages into the node storage component. By adopting the application, the processing efficiency of the network card storage service can be improved, and the consumption of computing resources can be reduced.

Description

基于网卡的数据处理方法、装置、设备及可读存储介质Data processing method, device, equipment and readable storage medium based on network card

技术领域Technical Field

本申请涉及计算机技术领域,尤其涉及一种基于网卡的数据处理方法、装置、设备及可读存储介质。The present application relates to the field of computer technology, and in particular to a data processing method, device, equipment and readable storage medium based on a network card.

背景技术Background Art

目前网卡在存储业务上,多个组件都是各自保证数据正确性的,网卡需要将前端设备在块存储设备的块存储(block)报文卸载到网卡的逻辑电路组件中,逻辑电路组件在得到块存储报文后,会生成块存储报文的正确性校验值,并将块存储报文及其校验值转发至片上系统组件(System On Chip,SOC)中的存储开发组件(Storage PerformanceDevelopment Kit,SPDK)中,由存储开发组件校验块存储报文及其正确性校验值的正确性,如果正确,继续将块存储报文及其正确性校验值传递至内核处理组件(KernelTransmission Control Protocol,Kernel TCP)。Currently, in the storage business of the network card, multiple components each ensure data correctness. The network card needs to unload the block storage (block) message of the front-end device in the block storage device to the logic circuit component of the network card. After receiving the block storage message, the logic circuit component will generate a correctness check value for the block storage message, and forward the block storage message and its check value to the storage development component (Storage Performance Development Kit, SPDK) in the system on chip component (System On Chip, SOC). The storage development component verifies the correctness of the block storage message and its correctness check value. If correct, it will continue to pass the block storage message and its correctness check value to the kernel processing component (Kernel Transmission Control Protocol, Kernel TCP).

在内核处理组件中,也会对块存储报文及其正确性校验值进行校验,在正确时,通过TCP协议将块存储报文转换为网络(net)报文,由于TCP协议支持的网络报文的最大传输单元(Maximum Transmission Unit,MTU)远小于块存储报文,因此需要将块存储报文划分为多个报文分片,并且为每个报文分片生成完整性校验值(TCP协议中的checksum)和正确性校验值,将全部报文分片以及对应的完整性校验值和正确性校验值发送至报文发送组件。报文发送组件对完整性校验值进行校验,确定多个报文分片的完整性,对正确性校验值进行校验,确定多个报文分片的正确性,在所有报文分片校验均通过时,将多个报文分片、及其多个报文分片分别对应的完整性校验值和正确性校验值发送至后端设备,每个组件都需要耗费资源去进行数据一致性检查,每个组件都需要去实现错误之后的异常处理,导致网卡的存储业务的整体链路处理时延高,处理效率低,计算资源消耗大。In the kernel processing component, the block storage message and its correctness check value are also checked. If correct, the block storage message is converted into a network (net) message through the TCP protocol. Since the maximum transmission unit (Maximum Transmission Unit, MTU) of the network message supported by the TCP protocol is much smaller than the block storage message, the block storage message needs to be divided into multiple message fragments, and an integrity check value (checksum in the TCP protocol) and correctness check value are generated for each message fragment, and all message fragments and the corresponding integrity check value and correctness check value are sent to the message sending component. The message sending component verifies the integrity check value to determine the integrity of multiple message fragments, and verifies the correctness check value to determine the correctness of multiple message fragments. When all message fragments pass the verification, the multiple message fragments and the integrity check values and correctness check values corresponding to the multiple message fragments are sent to the back-end device. Each component needs to consume resources to perform data consistency checks, and each component needs to implement exception handling after errors, resulting in high overall link processing latency, low processing efficiency, and high computing resource consumption for the storage service of the network card.

发明内容Summary of the invention

本申请实施例提供了一种基于网卡的数据处理方法、装置、设备及可读存储介质,可以提高网卡存储业务的处理效率,降低计算资源的消耗。The embodiments of the present application provide a data processing method, device, equipment and readable storage medium based on a network card, which can improve the processing efficiency of the network card storage service and reduce the consumption of computing resources.

本申请实施例一方面提供了一种基于网卡的数据处理方法,该方法应用于网卡中,网卡包括逻辑电路组件和片上系统组件;该方法包括:On the one hand, an embodiment of the present application provides a data processing method based on a network card, the method is applied to the network card, the network card includes a logic circuit component and a system-on-chip component; the method includes:

通过逻辑电路组件获取第一设备中块存储组件传输的初始块存储报文,基于第二设备的节点存储组件的单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文,生成每个单位存储报文的冗余校验值,根据N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至片上系统组件;N为正整数;一个访问块存储报文包括一个单位存储报文和所对应的冗余校验值;目标存储长度小于单位存储长度;Obtaining an initial block storage message transmitted by a block storage component in the first device through a logic circuit component, dividing the initial block storage message into N unit storage messages with a target storage length based on a unit storage length of a node storage component of the second device, generating a redundant check value for each unit storage message, generating N access block storage messages according to the N unit storage messages and the N redundant check values, and transmitting the N access block storage messages to the on-chip system component; N is a positive integer; an access block storage message includes a unit storage message and a corresponding redundant check value; the target storage length is less than the unit storage length;

在片上系统组件中,通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,根据N个单位网络报文以及N个冗余校验值生成N个传输网络报文;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文的存储长度均等于目标存储长度;N个传输网络报文的存储长度均小于或等于单位存储长度;In the system-on-chip component, the unit storage messages in the N access block storage messages are converted into message formats through a remote direct access protocol to obtain N unit network messages, and N transmission network messages are generated according to the N unit network messages and N redundant check values; one transmission network message includes one unit network message and an associated redundant check value; the storage lengths of the N unit network messages are all equal to the target storage length; the storage lengths of the N transmission network messages are all less than or equal to the unit storage length;

将N个传输网络报文发送至第二设备,以使第二设备通过节点存储组件对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。N transmission network messages are sent to the second device so that the second device verifies each transmission network message through the node storage component, and when all N transmission network messages pass the verification, the N transmission network messages are written into the node storage component.

其中,还包括:Among them, it also includes:

获取第二设备的节点存储组件的单位存储长度,确定与远程直接访问协议相关联的报文头信息的存储长度,获取针对冗余校验值的预设存储长度;Obtaining a unit storage length of a node storage component of the second device, determining a storage length of message header information associated with a remote direct access protocol, and obtaining a preset storage length for a redundancy check value;

基于单位存储长度、报文头信息的存储长度和预设存储长度确定目标存储长度。The target storage length is determined based on the unit storage length, the storage length of the message header information, and the preset storage length.

其中,生成每个单位存储报文的冗余校验值,包括:The redundant check value of each unit storage message is generated, including:

基于业务运算值的位长P,对单位存储报文进行后补位处理,得到补位存储报文,基于业务运算值,对补位存储报文进行异或除法运算,得到业务冗余值;P为正整数;业务运算值是基于针对冗余校验值的预设存储长度所确定的;Based on the bit length P of the business operation value, the unit storage message is post-padded to obtain the padded storage message, and based on the business operation value, the padded storage message is XOR-divided to obtain the business redundancy value; P is a positive integer; the business operation value is determined based on the preset storage length for the redundancy check value;

若业务冗余值的位长满足前补位条件,则对业务冗余值进行前补位处理,将前补位处理后的业务冗余值确定为冗余校验值;If the bit length of the service redundancy value meets the front-filling condition, the service redundancy value is front-filled, and the service redundancy value after the front-filling is determined as the redundancy check value;

若业务冗余值的位长未满足前补位条件,则将业务冗余值确定为冗余校验值。If the bit length of the service redundancy value does not meet the leading bit filling condition, the service redundancy value is determined as the redundancy check value.

其中,补位存储报文包括M个单位比特值,M为正整数;基于业务运算值,对补位存储报文进行异或除法运算,得到业务冗余值,包括:The padding storage message includes M unit bit values, where M is a positive integer. Based on the service operation value, an XOR division operation is performed on the padding storage message to obtain a service redundancy value, including:

基于业务运算值的位长P,在补位存储报文的M个单位比特值中,将以目标比特位为起始位置的连续P个单位比特值确定为单位运算数据,基于业务运算值,对单位运算数据进行异或运算,得到单位冗余值;目标比特位是指补位存储报文中单位比特值为1的比特位中的最高比特位;Based on the bit length P of the service operation value, among the M unit bit values of the padding storage message, the continuous P unit bit values starting from the target bit are determined as unit operation data, and based on the service operation value, the unit operation data are XOR-operated to obtain a unit redundancy value; the target bit refers to the highest bit among the bits whose unit bit value is 1 in the padding storage message;

将M个单位比特值中除P个单位比特值之外的单位比特值,确定为Q个待补位比特值,基于业务运算值的位长P以及Q个待补位比特值,对单位冗余值进行后补位处理,得到与业务运算值具有相同位长的新的单位运算数据,继续基于业务运算值对新的单位运算数据进行异或运算,得到新的单位冗余值,直至Q个待补位比特值均用于完成后补位处理时,将最后得到的单位冗余值确定为业务冗余值;Q为M与P之间的差值。The unit bit values other than P unit bit values among the M unit bit values are determined as Q to-be-filled bit values, and post-fill processing is performed on the unit redundant value based on the bit length P of the business operation value and the Q to-be-filled bit values to obtain new unit operation data with the same bit length as the business operation value, and XOR operation is continued to be performed on the new unit operation data based on the business operation value to obtain a new unit redundant value, until the Q to-be-filled bit values are all used to complete the post-fill processing, and the finally obtained unit redundant value is determined as the business redundant value; Q is the difference between M and P.

其中,在片上系统组件中,通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,根据N个单位网络报文以及N个冗余校验值生成N个传输网络报文,包括:Among them, in the system-on-chip component, the unit storage messages in the N access block storage messages are converted into message formats through the remote direct access protocol to obtain N unit network messages, and N transmission network messages are generated according to the N unit network messages and N redundant check values, including:

通过片上系统组件获取N个访问块存储报文中的单位存储报文,通过远程直接访问协议对N个单位存储报文进行报文格式转化,得到N个单位网络报文,生成每个单位网络报文分别对应的报文头信息;Obtain unit storage messages from N access block storage messages through the on-chip system component, convert the message formats of the N unit storage messages through the remote direct access protocol to obtain N unit network messages, and generate message header information corresponding to each unit network message;

将N个单位网络报文、N个单位网络报文分别对应的报文头信息和N个冗余校验值,分别封装为N个传输网络报文;一个传输网络报文是通过一个单位网络报文、所对应的报文头信息和所关联的冗余校验值封装得到的。N unit network messages, the message header information corresponding to the N unit network messages, and N redundant check values are respectively encapsulated into N transmission network messages; a transmission network message is obtained by encapsulating a unit network message, the corresponding message header information, and the associated redundant check value.

其中,片上系统组件包括协议栈组件;将N个传输网络报文发送至第二设备,包括:The system-on-chip component includes a protocol stack component; sending N transmission network messages to the second device includes:

将N个传输网络报文发送至协议栈组件;Send N transport network messages to the protocol stack component;

在协议栈组件中,获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值;In the protocol stack component, a unit network message in each transmission network message and a redundant check value associated with the unit network message are obtained;

基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则通过协议栈组件将N个传输网络报文发送至第二设备。Based on N unit network messages, N target check values are generated. If the target check value corresponding to each unit network message is the same as the associated redundant check value, the N transmission network messages are sent to the second device through the protocol stack component.

其中,还包括:Among them, it also includes:

通过片上系统组件,获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件;Obtaining, through the system-on-chip component, N transmission network messages sent by the second device through the node storage component, verifying each transmission network message, and sending the N transmission network messages to the logic circuit component when all the N transmission network messages pass the verification;

在逻辑电路组件中,通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;In the logic circuit component, a unit network message in the N transmission network messages is converted into a message format through a remote direct access protocol to obtain N unit storage messages, and based on message header information respectively associated with the N unit storage messages, the N unit storage messages are reassembled into an initial block storage message;

将初始块存储报文传输至第一设备。The initial block storage message is transmitted to the first device.

本申请实施例一方面提供了另一种基于网卡的数据处理方法,该方法应用于网卡中,网卡包括逻辑电路组件和片上系统组件;该方法包括:On the one hand, an embodiment of the present application provides another data processing method based on a network card, the method is applied to the network card, the network card includes a logic circuit component and a system-on-chip component; the method includes:

通过片上系统组件,获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件;N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所对应的冗余校验值;Obtain N transmission network messages sent by the second device through the node storage component through the on-chip system component, verify each transmission network message, and send the N transmission network messages to the logic circuit component when all the N transmission network messages pass the verification; the storage lengths of the N transmission network messages are less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and a corresponding redundancy check value;

在逻辑电路组件中,通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;In the logic circuit component, the unit network messages in the N transmission network messages are converted into message formats through a remote direct access protocol to obtain N unit storage messages, and the N unit storage messages are reorganized into initial block storage messages based on message header information respectively associated with the N unit storage messages; the storage lengths of the N unit network messages and the storage lengths of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

将初始块存储报文传输至第一设备。The initial block storage message is transmitted to the first device.

本申请实施例一方面提供了另一种基于网卡的数据处理方法,该方法应用于第二设备中,第二设备通过网卡与第一设备进行数据交互;该方法包括:On the one hand, an embodiment of the present application provides another data processing method based on a network card, which is applied to a second device, and the second device interacts with a first device through the network card; the method includes:

获取第一设备通过网卡发送的N个传输网络报文;N为正整数,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文是由网卡通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化得到,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值;N个单位存储报文是基于单位存储长度对初始块存储报文划分得到;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;Obtain N transmission network messages sent by the first device through the network card; N is a positive integer, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and an associated redundant check value; the N unit network messages are obtained by the network card performing message format conversion on the unit storage messages in the N access block storage messages through the remote direct access protocol, and an access block storage message includes a unit storage message and a redundant check value generated for the unit storage message; the N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length; the storage lengths of the N unit network messages and the storage lengths of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。Obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, generate N target check values based on N unit network messages, and if the target check value corresponding to each unit network message is the same as the associated redundant check value, store each transmission network message separately in the node storage component.

其中,将每个传输网络报文分别存储至节点存储组件,包括:Wherein, each transmission network message is stored in a node storage component respectively, including:

获取N个传输网络报文中的报文头信息,基于N个报文头信息中的划分排序值,确定N个传输网络报文分别对应的存储地址,基于N个存储地址,将每个传输网络报文存储至节点存储组件中关联的存储地址所对应的存储单元。Obtain message header information from N transmission network messages, determine storage addresses corresponding to the N transmission network messages based on the division and sorting values in the N message header information, and based on the N storage addresses, store each transmission network message in the storage unit corresponding to the associated storage address in the node storage component.

其中,还包括:Among them, it also includes:

当获取到第一设备发送的存储业务读取请求时,从节点存储组件中获取所存储的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至网卡,以使网卡通过N个传输网络报文获取N个单位存储报文,基于N个单位存储报文生成初始块存储报文;初始块存储报文用于传输至第一设备。When a storage service read request sent by the first device is obtained, N stored transmission network messages are obtained from the node storage component, each transmission network message is verified, and when all N transmission network messages are verified, the N transmission network messages are sent to the network card, so that the network card obtains N unit storage messages through the N transmission network messages, and generates an initial block storage message based on the N unit storage messages; the initial block storage message is used for transmission to the first device.

本申请实施例一方面提供了一种网卡,包括:An embodiment of the present application provides a network card, including:

逻辑电路组件,用于获取第一设备中块存储组件传输的初始块存储报文,基于第二设备的节点存储组件的单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文,生成每个单位存储报文的冗余校验值,根据N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至片上系统组件;N为正整数;一个访问块存储报文包括一个单位存储报文和所对应的冗余校验值;目标存储长度小于单位存储长度;A logic circuit component, configured to obtain an initial block storage message transmitted by a block storage component in a first device, divide the initial block storage message into N unit storage messages with a target storage length based on a unit storage length of a node storage component of a second device, generate a redundant check value for each unit storage message, generate N access block storage messages according to the N unit storage messages and the N redundant check values, and transmit the N access block storage messages to an on-chip system component; N is a positive integer; an access block storage message includes a unit storage message and a corresponding redundant check value; the target storage length is less than the unit storage length;

片上系统组件,用于通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,根据N个单位网络报文以及N个冗余校验值生成N个传输网络报文;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文的存储长度均等于目标存储长度;N个传输网络报文的存储长度均小于或等于单位存储长度;A system-on-chip component is used to convert the message format of the unit storage messages in the N access block storage messages through a remote direct access protocol to obtain N unit network messages, and generate N transmission network messages according to the N unit network messages and N redundant check values; one transmission network message includes one unit network message and an associated redundant check value; the storage lengths of the N unit network messages are all equal to the target storage length; the storage lengths of the N transmission network messages are all less than or equal to the unit storage length;

片上系统组件,还用于将N个传输网络报文发送至第二设备,以使第二设备通过节点存储组件对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。The system-on-chip component is also used to send N transmission network messages to the second device, so that the second device verifies each transmission network message through the node storage component, and when the N transmission network messages are all verified, the N transmission network messages are written into the node storage component.

其中,逻辑电路组件,还用于获取第二设备的节点存储组件的单位存储长度,确定与远程直接访问协议相关联的报文头信息的存储长度,获取针对冗余校验值的预设存储长度;The logic circuit component is further used to obtain the unit storage length of the node storage component of the second device, determine the storage length of the message header information associated with the remote direct access protocol, and obtain the preset storage length for the redundancy check value;

逻辑电路组件,还用于基于单位存储长度、报文头信息的存储长度和预设存储长度确定目标存储长度。The logic circuit component is also used to determine the target storage length based on the unit storage length, the storage length of the message header information and the preset storage length.

其中,逻辑电路组件,具体用于基于业务运算值的位长P,对单位存储报文进行后补位处理,得到补位存储报文,基于业务运算值,对补位存储报文进行异或除法运算,得到业务冗余值;P为正整数;业务运算值是基于针对冗余校验值的预设存储长度所确定的;The logic circuit component is specifically used to perform post-placement processing on the unit storage message based on the bit length P of the business operation value to obtain the place-padded storage message, and perform XOR division operation on the place-padded storage message based on the business operation value to obtain the business redundancy value; P is a positive integer; the business operation value is determined based on the preset storage length for the redundancy check value;

逻辑电路组件,具体用于若业务冗余值的位长满足前补位条件,则对业务冗余值进行前补位处理,将前补位处理后的业务冗余值确定为冗余校验值;The logic circuit component is specifically used for performing a front-filling process on the service redundancy value if the bit length of the service redundancy value meets the front-filling condition, and determining the service redundancy value after the front-filling process as the redundancy check value;

逻辑电路组件,具体用于若业务冗余值的位长未满足前补位条件,则将业务冗余值确定为冗余校验值。The logic circuit component is specifically used to determine the service redundancy value as the redundancy check value if the bit length of the service redundancy value does not meet the leading bit filling condition.

其中,补位存储报文包括M个单位比特值,M为正整数;The padding storage message includes M unit bit values, where M is a positive integer;

逻辑电路组件,具体用于基于业务运算值的位长P,在补位存储报文的M个单位比特值中,将以目标比特位为起始位置的连续P个单位比特值确定为单位运算数据,基于业务运算值,对单位运算数据进行异或运算,得到单位冗余值;目标比特位是指补位存储报文中单位比特值为1的比特位中的最高比特位;The logic circuit component is specifically used to determine, based on the bit length P of the business operation value, the continuous P unit bit values starting from the target bit in the M unit bit values of the bit-padded storage message as unit operation data, and perform an XOR operation on the unit operation data based on the business operation value to obtain a unit redundancy value; the target bit refers to the highest bit among the bits whose unit bit values are 1 in the bit-padded storage message;

逻辑电路组件,具体用于将M个单位比特值中除P个单位比特值之外的单位比特值,确定为Q个待补位比特值,基于业务运算值的位长P以及Q个待补位比特值,对单位冗余值进行后补位处理,得到与业务运算值具有相同位长的新的单位运算数据,继续基于业务运算值对新的单位运算数据进行异或运算,得到新的单位冗余值,直至Q个待补位比特值均用于完成后补位处理时,将最后得到的单位冗余值确定为业务冗余值;Q为M与P之间的差值。A logic circuit component is specifically used to determine the unit bit values other than P unit bit values among M unit bit values as Q to-be-filled bit values, perform post-fill processing on the unit redundant value based on the bit length P of the business operation value and the Q to-be-filled bit values, obtain new unit operation data with the same bit length as the business operation value, continue to perform XOR operation on the new unit operation data based on the business operation value to obtain a new unit redundant value, until the Q to-be-filled bit values are all used to complete the post-fill processing, and the finally obtained unit redundant value is determined as the business redundant value; Q is the difference between M and P.

其中,片上系统组件,具体用于获取N个访问块存储报文中的单位存储报文,通过远程直接访问协议对N个单位存储报文进行报文格式转化,得到N个单位网络报文,生成每个单位网络报文分别对应的报文头信息;The system-on-chip component is specifically used to obtain unit storage messages from N access block storage messages, convert the message formats of the N unit storage messages through a remote direct access protocol to obtain N unit network messages, and generate message header information corresponding to each unit network message;

片上系统组件,具体用于将N个单位网络报文、N个单位网络报文分别对应的报文头信息和N个冗余校验值,分别封装为N个传输网络报文;一个传输网络报文是通过一个单位网络报文、所对应的报文头信息和所关联的冗余校验值封装得到的。The system-on-chip component is specifically used to encapsulate N unit network messages, the message header information corresponding to the N unit network messages, and N redundant check values into N transmission network messages; a transmission network message is obtained by encapsulating a unit network message, the corresponding message header information, and the associated redundant check value.

其中,片上系统组件包括存储开发组件和协议栈组件;Among them, the system-on-chip components include storage development components and protocol stack components;

存储开发组件,用于将N个传输网络报文发送至协议栈组件;A storage development component is used to send N transmission network messages to the protocol stack component;

协议栈组件,用于获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值;A protocol stack component, used for obtaining a unit network message in each transmitted network message and a redundant check value associated with the unit network message;

协议栈组件,还用于基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则通过协议栈组件将N个传输网络报文发送至第二设备。The protocol stack component is also used to generate N target check values based on N unit network messages. If the target check value corresponding to each unit network message is the same as the associated redundant check value, the N transmission network messages are sent to the second device through the protocol stack component.

其中,in,

片上系统组件,还用于获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件;The system-on-chip component is further used to obtain N transmission network messages sent by the second device through the node storage component, verify each transmission network message, and send the N transmission network messages to the logic circuit component when all the N transmission network messages pass the verification;

逻辑电路组件,还用于通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;The logic circuit component is further used to convert the message format of the unit network message in the N transmission network messages through the remote direct access protocol to obtain N unit storage messages, and reorganize the N unit storage messages into an initial block storage message based on the message header information respectively associated with the N unit storage messages;

逻辑电路组件,还用于将初始块存储报文传输至第一设备。The logic circuit component is further used to transmit the initial block storage message to the first device.

本申请实施例一方面提供了另一种网卡,包括:On the one hand, an embodiment of the present application provides another network card, including:

片上系统组件,用于获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文中的冗余校验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件;N个传输网络报文的存储长度均小于或等于节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所对应的冗余校验值;The system-on-chip component is used to obtain N transmission network messages sent by the second device through the node storage component, verify the redundant check value in each transmission network message, and send the N transmission network messages to the logic circuit component when the N transmission network messages are all verified; the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component; and one transmission network message includes one unit network message and the corresponding redundant check value;

逻辑电路组件,用于通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;A logic circuit component is used to convert the message format of the unit network messages in the N transmission network messages through a remote direct access protocol to obtain N unit storage messages, and reorganize the N unit storage messages into an initial block storage message based on message header information respectively associated with the N unit storage messages; the storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

逻辑电路组件,还用于将初始块存储报文传输至第一设备。The logic circuit component is further used to transmit the initial block storage message to the first device.

本申请实施例一方面提供了一种数据处理装置,包括:An embodiment of the present application provides a data processing device, including:

报文获取模块,用于获取第一设备通过网卡发送的N个传输网络报文;N为正整数,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文是由网卡通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化得到,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值;N个单位存储报文是基于单位存储长度对初始块存储报文划分得到;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;A message acquisition module, used for acquiring N transmission network messages sent by the first device through the network card; N is a positive integer, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and an associated redundant check value; the N unit network messages are obtained by the network card performing message format conversion on the unit storage messages in the N access block storage messages through the remote direct access protocol, and an access block storage message includes a unit storage message and a redundant check value generated for the unit storage message; the N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length; the storage lengths of the N unit network messages and the storage lengths of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

报文校验模块,用于获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。The message verification module is used to obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, and generate N target check values based on N unit network messages. If the target check value corresponding to each unit network message is the same as the associated redundant check value, each transmission network message is stored in the node storage component respectively.

在一种可能的实现方式中,报文校验模块用于将每个传输网络报文分别存储至节点存储组件时,具体用于执行以下操作:In a possible implementation, when the message verification module is used to store each transmission network message in the node storage component, it is specifically used to perform the following operations:

获取N个传输网络报文中的报文头信息,基于N个报文头信息中的划分排序值,确定N个传输网络报文分别对应的存储地址,基于N个存储地址,将每个传输网络报文存储至节点存储组件中关联的存储地址所对应的存储单元。Obtain message header information from N transmission network messages, determine storage addresses corresponding to the N transmission network messages based on the division and sorting values in the N message header information, and based on the N storage addresses, store each transmission network message in the storage unit corresponding to the associated storage address in the node storage component.

在一种可能的实现方式中,报文校验模块还用于执行以下操作:In a possible implementation, the message checking module is further configured to perform the following operations:

当获取到第一设备发送的存储业务读取请求时,从节点存储组件中获取所存储的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至网卡,以使网卡通过N个传输网络报文获取N个单位存储报文,基于N个单位存储报文生成初始块存储报文;初始块存储报文用于传输至第一设备。When a storage service read request sent by the first device is obtained, N stored transmission network messages are obtained from the node storage component, each transmission network message is verified, and when all N transmission network messages are verified, the N transmission network messages are sent to the network card, so that the network card obtains N unit storage messages through the N transmission network messages, and generates an initial block storage message based on the N unit storage messages; the initial block storage message is used to be transmitted to the first device.

本申请实施例一方面提供了一种计算机设备,包括:处理器、存储器以及网络接口;On the one hand, an embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface;

处理器与存储器、网络接口相连,其中,网络接口用于提供数据通信功能,存储器用于存储计算机程序,计算机程序被处理器执行时,使得该计算机设备执行本申请实施例提供的方法。The processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication function, and the memory is used to store computer programs. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.

本申请实施例一方面提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,该计算机程序适于由处理器加载并执行,以使得具有该处理器的计算机设备执行本申请实施例提供的方法。On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.

本申请实施例一方面提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机程序,处理器执行该计算机程序,使得该计算机设备执行本申请实施例提供的方法。In one aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in the embodiment of the present application.

本申请实施例通过结合节点存储组件的单位存储长度、块存储报文的最大传输单元以及网络报文的最大传输单位的特点,通过小于或等于单位存储长度的目标存储长度,在逻辑电路组件中对块存储组件传输的初始块存储报文进行划分,得到N个具有目标存储长度的单位存储报文,生成每个单位存储报文的冗余校验值,根据N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至片上系统组件,访问块存储报文可以是一种添加校验值等报文信息得到的网络报文,单位存储报文可以是块存储报文格式的报文分片。目标存储长度可以小于或等于远程直接访问协议中单位网络报文的最大传输单位,使得单位存储报文在片上系统组件中通过远程直接访问协议进行报文格式转化后,得到的单位网络报文的存储长度与单位存储报文的存储长度相同。可以让单位存储报文在逻辑电路组件以及片上系统组件之间进行传输时,无需因为块存储报文的最大传输单元以及网络报文的最大传输单位的差异进行报文分片,也无需因为块存储报文和网络报文的冗余校验值不同而进行多次正确性校验,更无需对报文分片进行完整性校验。通过N个单位网络报文以及N个冗余校验值生成N个传输网络报文,一个传输网络报文包括一个单位网络报文和所关联的冗余校验值,N个单位网络报文的存储长度均等于目标存储长度,N个传输网络报文的存储长度均小于或等于单位存储长度,传输网络报文可以是报文格式符合远程直接访问协议的网络报文。将N个传输网络报文发送至第二设备,第二设备通过节点存储组件对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。由于单位网络报文的存储长度与单位存储报文的存储长度相同,所以单位网络报文所生成的冗余校验值与单位存储报文所生成的冗余校验值也相同,可以将逻辑电路组件生成的冗余校验值携带至网卡的末端,降低了片上系统组件的计算资源消耗,减少整体链路的时延,提高了网卡存储业务的处理效率。The embodiment of the present application combines the characteristics of the unit storage length of the node storage component, the maximum transmission unit of the block storage message, and the maximum transmission unit of the network message, and divides the initial block storage message transmitted by the block storage component in the logic circuit component by a target storage length that is less than or equal to the unit storage length, obtains N unit storage messages with the target storage length, generates a redundant check value for each unit storage message, generates N access block storage messages according to the N unit storage messages and the N redundant check values, and transmits the N access block storage messages to the on-chip system component. The access block storage message can be a network message obtained by adding message information such as a check value, and the unit storage message can be a message fragment in the block storage message format. The target storage length can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol, so that after the unit storage message is converted into a message format in the on-chip system component through the remote direct access protocol, the storage length of the unit network message obtained is the same as the storage length of the unit storage message. It allows the unit storage message to be transmitted between the logic circuit component and the system-on-chip component without the need to fragment the message due to the difference between the maximum transmission unit of the block storage message and the maximum transmission unit of the network message, nor is it necessary to perform multiple correctness checks due to the different redundant check values of the block storage message and the network message, and there is no need to perform integrity checks on the message fragments. N transmission network messages are generated through N unit network messages and N redundant check values, one transmission network message includes a unit network message and the associated redundant check value, the storage length of the N unit network messages is equal to the target storage length, the storage length of the N transmission network messages is less than or equal to the unit storage length, and the transmission network message can be a network message whose message format conforms to the remote direct access protocol. The N transmission network messages are sent to the second device, and the second device verifies each transmission network message through the node storage component. When the N transmission network messages are all verified, the N transmission network messages are written into the node storage component. Since the storage length of a unit network message is the same as the storage length of a unit storage message, the redundant check value generated by the unit network message is also the same as the redundant check value generated by the unit storage message. The redundant check value generated by the logic circuit component can be carried to the end of the network card, reducing the computing resource consumption of the on-chip system components, reducing the overall link latency, and improving the processing efficiency of the network card storage service.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

图1是本申请实施例提供的一种网络架构示意图;FIG1 is a schematic diagram of a network architecture provided in an embodiment of the present application;

图2是本申请实施例提供的一种数据处理场景示意图一;FIG2 is a schematic diagram of a data processing scenario provided in an embodiment of the present application;

图3是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图一;FIG3 is a flow chart of a data processing method based on a network card provided in an embodiment of the present application;

图4是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图二;FIG4 is a second flow chart of a data processing method based on a network card provided in an embodiment of the present application;

图5是本申请实施例提供的一种数据处理场景示意图二;FIG5 is a second schematic diagram of a data processing scenario provided in an embodiment of the present application;

图6是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图三;6 is a flowchart diagram of a data processing method based on a network card provided in an embodiment of the present application;

图7是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图四;7 is a flowchart of a data processing method based on a network card according to an embodiment of the present application;

图8是本申请实施例提供的一种网卡的结构示意图一;FIG8 is a structural diagram 1 of a network card provided in an embodiment of the present application;

图9是本申请实施例提供的一种网卡的结构示意图二;FIG9 is a second structural diagram of a network card provided in an embodiment of the present application;

图10是本申请实施例提供的一种数据处理装置的结构示意图;FIG10 is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

图11是本申请实施例提供的一种计算机设备的结构示意图。FIG. 11 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

请参见图1,图1是本申请实施例提供的一种网络架构示意图。如图1所示,该网络架构可以包括第一设备100、网卡200和第二设备300,其中,第一设备100与网卡200之间存在通信连接,网卡200与第二设备300之间存在通信连接。其中,上述通信连接不限定连接方式,可以通过有线通信方式进行直接或间接地连接,也可以通过无线通信方式进行直接或间接地连接,还可以通过其它方式,本申请在此不做限制。Please refer to Figure 1, which is a schematic diagram of a network architecture provided by an embodiment of the present application. As shown in Figure 1, the network architecture may include a first device 100, a network card 200, and a second device 300, wherein there is a communication connection between the first device 100 and the network card 200, and there is a communication connection between the network card 200 and the second device 300. Among them, the above-mentioned communication connection does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or directly or indirectly connected through a wireless communication method, or through other methods, and the present application does not limit it here.

应该理解,第一设备100可以通过网卡200与第二设备300进行数据交互,网卡200可以与第一设备100集成一体,或者网卡200也可以是独立设备,本申请实施例在此不做限制。当网卡200为独立设备时,该网卡200可以通过外设部件互连标准(PeripheralComponent Interconnect Express,PCIE)总线与第一设备100相连接。第二设备300中与可以配置有与网卡200对应的网络接入设备,第二设备300可以通过该网络接入设备与第一设备100进行数据交互。可选的,该网络架构可以包括一个或者多个第一设备,这一个或者多个第一设备均与网卡200相连接,通过网卡200与第二设备300进行数据交互。It should be understood that the first device 100 can exchange data with the second device 300 through the network card 200, the network card 200 can be integrated with the first device 100, or the network card 200 can also be an independent device, which is not limited in the embodiment of the present application. When the network card 200 is an independent device, the network card 200 can be connected to the first device 100 through a peripheral component interconnect standard (Peripheral Component Interconnect Express, PCIE) bus. The second device 300 can be configured with a network access device corresponding to the network card 200, and the second device 300 can exchange data with the first device 100 through the network access device. Optionally, the network architecture may include one or more first devices, and the one or more first devices are connected to the network card 200, and exchange data with the second device 300 through the network card 200.

其中,第一设备100可以包括:智能手机、平板电脑、笔记本电脑、台式计算机、智能语音交互设备、智能家电(例如,智能电视)、可穿戴设备、车载终端、飞行器等具有数据处理功能的智能终端。其中,车载终端可以为智慧交通场景和辅助驾驶场景下的终端设备。应当理解,如图1所示的终端设备集群中的每个终端设备均可以安装有具备数据处理功能的应用客户端,当应用客户端运行于各终端设备中时,可以分别与上述图1所示的第二设备300之间进行数据交互。Among them, the first device 100 may include: smart phones, tablet computers, laptops, desktop computers, intelligent voice interaction devices, smart home appliances (for example, smart TVs), wearable devices, vehicle terminals, aircraft and other smart terminals with data processing functions. Among them, the vehicle terminal can be a terminal device in a smart traffic scenario and an assisted driving scenario. It should be understood that each terminal device in the terminal device cluster shown in Figure 1 can be installed with an application client with data processing functions. When the application client runs in each terminal device, it can interact with the second device 300 shown in Figure 1 above.

其中,应用客户端具体可以包括:车载客户端、智能家居客户端、娱乐客户端(例如,游戏客户端)、多媒体客户端(例如,视频客户端)、社交客户端以及资讯类客户端(例如,新闻客户端)等。其中,本申请实施例中的应用客户端可以集成在某客户端(例如,社交客户端)中,也可以为独立的客户端(例如,新闻客户端),本申请实施例不对应用客户端的类型进行限定。The application client may specifically include: a vehicle client, a smart home client, an entertainment client (e.g., a game client), a multimedia client (e.g., a video client), a social client, and an information client (e.g., a news client), etc. The application client in the embodiment of the present application may be integrated in a client (e.g., a social client) or may be an independent client (e.g., a news client). The embodiment of the present application does not limit the type of the application client.

其中,第二设备300可以为应用客户端对应的服务器,第二设备300可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)、以及大数据和人工智能平台等基础云计算服务的云服务器。Among them, the second device 300 can be a server corresponding to the application client. The second device 300 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

其中,云技术是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。云技术基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源,如视频网站、图片类网站和更多的门户网站。伴随着互联网行业的高度发展和应用,将来每个物品都有可能存在自己的识别标志,都需要传输到后台系统进行逻辑处理,不同程度级别的数据将会分开处理,各类行业数据皆需要强大的系统后盾支撑,以能通过云计算来实现。Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support to be realized through cloud computing.

如图1所示,第一设备100可以包括块存储组件,网卡200可以包括逻辑电路组件和片上系统组件(SOC),第二设备300可以包括节点存储组件(Cell)。其中,第一设备100可以是前端设备,也可以称之为主机(host),网卡200可以是智能网卡(Smart NetworkInterface Card,SNIC),一种以网络处理器为核心的高性能网络接入卡,可以用于处理从主机中的各种网络协议或存储协议。块存储组件可以是如硬盘驱动器(HDD,Hard DiskDrive)、固态驱动器(SSD,Solid State Drive)等以固定大小的数据块(Block)为基本存储单元的设备组件。逻辑电路组件可以由ASIC(Application-Specific IntegratedCircuit,专用集成电路)或者FPGA(Field-Programmable Gate Array,可编程逻辑阵列)实现。第二设备300可以是提供存储业务服务的后端设备。As shown in FIG1 , the first device 100 may include a block storage component, the network card 200 may include a logic circuit component and a system-on-chip component (SOC), and the second device 300 may include a node storage component (Cell). Among them, the first device 100 may be a front-end device, which may also be referred to as a host, and the network card 200 may be a Smart Network Interface Card (SNIC), a high-performance network access card with a network processor as the core, which can be used to process various network protocols or storage protocols from the host. The block storage component may be a device component such as a hard disk drive (HDD, Hard Disk Drive), a solid state drive (SSD, Solid State Drive), etc., which uses a fixed-size data block (Block) as the basic storage unit. The logic circuit component may be implemented by an ASIC (Application-Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array, Programmable Logic Array). The second device 300 may be a back-end device that provides storage business services.

可以理解,第一设备100可以设置有多个虚拟机(Virtual Machine,VM),每个虚拟机中可以运行有一个或多个虚拟功能(Virtual Function,VF),每个虚拟功能可以对应一个或多个协议队列(queue),多个协议队列包括存储业务读取队列和存储业务写入队列,存储业务读取队列可以用于执行存储业务的读取任务,存储业务写入队列可以用于执行存储业务的写入任务,多个协议队列可以存储至块存储组件中。It can be understood that the first device 100 can be provided with multiple virtual machines (VM), each of which can run one or more virtual functions (VF), each of which can correspond to one or more protocol queues (queues), and the multiple protocol queues include a storage service read queue and a storage service write queue. The storage service read queue can be used to execute the read task of the storage service, and the storage service write queue can be used to execute the write task of the storage service. The multiple protocol queues can be stored in the block storage component.

为便于理解,以存储业务的写入任务为例,第一设备100可以将块存储组件中的初始块存储报文卸载(offload)至网卡200,由网卡200基于远程直接访问协议(RemoteDirect Memory Access,RDMA),将初始块存储报文封装为传输网络报文发送至第二设备300,完成存储业务的写入。其中,初始块存储报文可以是操作系统中针对块存储(block)组件的IO(Input/Output Access Message)访问报文,即BLK报文。传输网络报文可以是报文格式符合RDMA协议的网络(net)报文,即NET-RDMA报文。卸载可以包括针对RDMA协议卸载、用户数据报协议(User Datagram Protocol,UDP)卸载、删码(Erasure Coding,EC)卸载等,本申请实施例在此不做限制。卸载可以是指将主机中的各种网络协议和存储协议分离出来由网卡进行执行。For ease of understanding, taking the writing task of the storage service as an example, the first device 100 can offload the initial block storage message in the block storage component to the network card 200, and the network card 200 encapsulates the initial block storage message into a transmission network message based on the remote direct access protocol (RDMA) and sends it to the second device 300 to complete the writing of the storage service. Among them, the initial block storage message can be an IO (Input/Output Access Message) access message for the block storage (block) component in the operating system, that is, a BLK message. The transmission network message can be a network (net) message whose message format conforms to the RDMA protocol, that is, a NET-RDMA message. Offloading can include offloading for the RDMA protocol, offloading for the User Datagram Protocol (UDP), offloading for Erasure Coding (EC), etc., which is not limited in the embodiments of the present application. Offloading can refer to separating various network protocols and storage protocols in the host and executing them by the network card.

本申请实施例通过网卡处理第一设备分离的各种网络协议和存储协议,网卡具备独立的计算单元,如逻辑电路组件、片上系统组件等,可以完成存储业务读取队列和存储业务写入队列的执行等,可以大大减少第一设备的计算资源消耗,能够通过专用的处理器执行密集型的存储业务,提高报文传输的速度,提高存储业务的网络性能和效率。The embodiment of the present application processes various network protocols and storage protocols separated by the first device through a network card. The network card has an independent computing unit, such as a logic circuit component, an on-chip system component, etc., which can complete the execution of a storage service read queue and a storage service write queue, etc., which can greatly reduce the computing resource consumption of the first device, and can execute intensive storage services through a dedicated processor, thereby increasing the speed of message transmission and improving the network performance and efficiency of storage services.

请参见图2,图2是本申请实施例提供的一种数据处理的场景示意图。如图2所示,第一设备可以包括块存储组件,第一设备可以是如图1所示的第一设备100,网卡可以包括逻辑电路组件和片上系统组件,网卡可以是如图1所示的网卡200,其中片上系统组件可以包括存储开发组件(SPDK)和协议栈组件(Protocol Stack),第二设备300可以包括节点存储组件(Cell)。Please refer to Figure 2, which is a schematic diagram of a data processing scenario provided by an embodiment of the present application. As shown in Figure 2, the first device may include a block storage component, the first device may be the first device 100 as shown in Figure 1, the network card may include a logic circuit component and a system-on-chip component, the network card may be the network card 200 as shown in Figure 1, wherein the system-on-chip component may include a storage development component (SPDK) and a protocol stack component (Protocol Stack), and the second device 300 may include a node storage component (Cell).

为便于理解,以存储业务的写入任务为例,第一设备可以将块存储组件中的初始块存储报文卸载至网卡,网卡通过逻辑电路组件获取第一设备传输的初始块存储报文。其中,初始块存储报文可以是操作系统中针对块存储组件的IO访问报文,即BLK报文。For ease of understanding, taking the write task of the storage service as an example, the first device can unload the initial block storage message in the block storage component to the network card, and the network card obtains the initial block storage message transmitted by the first device through the logic circuit component. Among them, the initial block storage message can be an IO access message for the block storage component in the operating system, that is, a BLK message.

网卡的逻辑电路组件可以获取第二设备的节点存储组件的单位存储长度,单位存储长度可以是节点存储组件中存储单元的最大存储长度。逻辑电路组件可以基于单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文,其中,单位存储报文可以是BLK格式的报文分片,目标存储长度可以小于单位存储长度。逻辑电路组件可以生成每个单位存储报文的冗余校验值(Cyclic Redundancy Check,CRC,也可以称之为循环冗余校验)。逻辑电路组件可以通过N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至网卡的片上系统组件。其中,访问块存储报文可以是一种添加校验值等报文信息得到的BLK报文,一个访问块存储报文可以包括一个单位存储报文和所对应的冗余校验值。目标存储长度可以小于或等于远程直接访问协议(RDMA)中单位网络报文的最大传输单位。The logic circuit component of the network card can obtain the unit storage length of the node storage component of the second device, and the unit storage length can be the maximum storage length of the storage unit in the node storage component. The logic circuit component can divide the initial block storage message into N unit storage messages with a target storage length based on the unit storage length, wherein the unit storage message can be a message fragment in a BLK format, and the target storage length can be less than the unit storage length. The logic circuit component can generate a redundant check value (Cyclic Redundancy Check, CRC, also known as cyclic redundancy check) for each unit storage message. The logic circuit component can generate N access block storage messages through N unit storage messages and N redundant check values, and transmit the N access block storage messages to the on-chip system component of the network card. Among them, the access block storage message can be a BLK message obtained by adding message information such as a check value, and an access block storage message can include a unit storage message and a corresponding redundant check value. The target storage length can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol (RDMA).

在片上系统组件中,存储开发组件可以通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,其中,远程直接访问协议是一种基于消息的数据传输协议,用于高性能网络通信的技术。单位网络报文可以是操作系统中网络设备的报文,即NET报文。存储开发组件可以通过N个单位网络报文以及N个冗余校验值生成N个传输网络报文,存储开发组件可以将N个传输网络报文传递至片上系统组件中的协议栈组件。其中,传输网络报文可以是报文格式符合RDMA协议的NET报文,即NET-RDMA报文。一个传输网络报文可以包括一个单位网络报文和所关联的冗余校验值,N个单位网络报文的存储长度均等于目标存储长度,N个传输网络报文的存储长度均小于或等于单位存储长度。In the system-on-chip component, the storage development component can convert the message format of the unit storage message in the N access block storage messages through the remote direct access protocol to obtain N unit network messages, wherein the remote direct access protocol is a message-based data transmission protocol, a technology used for high-performance network communication. The unit network message can be a message of a network device in the operating system, that is, a NET message. The storage development component can generate N transmission network messages through N unit network messages and N redundant check values, and the storage development component can pass the N transmission network messages to the protocol stack component in the system-on-chip component. Among them, the transmission network message can be a NET message whose message format conforms to the RDMA protocol, that is, a NET-RDMA message. A transmission network message can include a unit network message and an associated redundant check value, the storage lengths of the N unit network messages are all equal to the target storage length, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length.

协议栈组件可以使用RDMA API(Application Programming Interface,应用程序编程接口),例如可以通过libibverbs库来创建与第二设备的RDMA连接,其中,libibverbs库是一种提供了一系列的RDMA接口的规范库,用于执行RDMA操作,包括但不限于内存注册、发送和接收数据、执行RDMA读写等。协议栈组件可以在第二设备的节点存储组件中进行存储区域的注册,将N个传输网络报文发送至第二设备,第二设备通过节点存储组件对每个传输网络报文中的冗余校验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。The protocol stack component can use the RDMA API (Application Programming Interface), for example, to create an RDMA connection with the second device through the libibverbs library, wherein the libibverbs library is a standard library that provides a series of RDMA interfaces for performing RDMA operations, including but not limited to memory registration, sending and receiving data, performing RDMA read and write, etc. The protocol stack component can register the storage area in the node storage component of the second device, send N transmission network messages to the second device, and the second device verifies the redundant check value in each transmission network message through the node storage component, and writes the N transmission network messages into the node storage component when all the N transmission network messages are verified.

存储业务的读取任务与存储业务的写入任务可以是一个逆向过程,在存储业务的读取任务中,第二设备可以从节点存储组件获取所存储的N个传输网络报文,对每个传输网络报文中的冗余校验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至网卡,网卡可以通过协议栈组件接收N个传输网络报文,将N个传输网络报文传递至存储开发组件,由存储开发组件对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,将N个单位存储报文传递至逻辑电路组件,由逻辑电路组件将N个单位存储报文重组为初始块存储报文,将初始块存储报文发送至第一设备中的块存储组件进行存储。The reading task of the storage service and the writing task of the storage service can be a reverse process. In the reading task of the storage service, the second device can obtain the N stored transmission network messages from the node storage component, and check the redundant check value in each transmission network message. When the N transmission network messages are all checked and passed, the N transmission network messages are sent to the network card. The network card can receive the N transmission network messages through the protocol stack component, and pass the N transmission network messages to the storage development component. The storage development component converts the message format of the unit network message in the N transmission network messages to obtain N unit storage messages, and passes the N unit storage messages to the logic circuit component. The logic circuit component reorganizes the N unit storage messages into an initial block storage message, and sends the initial block storage message to the block storage component in the first device for storage.

可以理解,本申请实施例所提出的网卡可以应用于云硬盘(Cloud Block Store,CBS),允许用户在云环境中创建和管理持久化的块存储卷,为云服务器(Cloud VirtualMachine,CVM)提供持久高可靠性性强的数据块级存储服务。可以通过网卡提供正确性存储校验和RDMA网络功能卸载,提高了第二设备的存储的性能,可以提供安全可靠的存储服务。网卡还可以用于执行防火墙规则、安全检测和预防系统(Intrusion Detection andPrevention System,IDPS)以及其他安全协议,提高存储服务的安全性。支持软件定义网络(Software-Defined Networking,SDN)和网络功能虚拟化(Network FunctionsVirtualization,NFV),提高数据传输速率。It can be understood that the network card proposed in the embodiment of the present application can be applied to a cloud hard disk (Cloud Block Store, CBS), allowing users to create and manage persistent block storage volumes in a cloud environment, and provide a persistent, highly reliable data block-level storage service for a cloud server (Cloud Virtual Machine, CVM). The network card can provide correctness storage verification and RDMA network function offloading, improve the storage performance of the second device, and provide safe and reliable storage services. The network card can also be used to execute firewall rules, security detection and prevention systems (Intrusion Detection and Prevention System, IDPS) and other security protocols to improve the security of storage services. Support software-defined networking (Software-Defined Networking, SDN) and network function virtualization (Network Functions Virtualization, NFV) to increase data transmission rates.

本申请实施例通过结合节点存储组件的单位存储长度、块存储报文的最大传输单元以及网络报文的最大传输单位的特点,通过小于或等于单位存储长度的目标存储长度,在逻辑电路组件中对块存储组件传输的初始块存储报文进行划分,得到N个具有目标存储长度的单位存储报文,单位存储报文可以是块存储报文格式的报文分片。目标存储长度可以小于或等于远程直接访问协议中单位网络报文的最大传输单位,使得单位存储报文在片上系统组件中通过远程直接访问协议进行报文格式转化后,得到的单位网络报文的存储长度与单位存储报文的存储长度相同。由于单位网络报文的存储长度与单位存储报文的存储长度相同,所以单位网络报文所生成的冗余校验值与单位存储报文所生成的冗余校验值也相同,可以将逻辑电路组件生成的冗余校验值携带至网卡的末端,降低了片上系统组件的计算资源消耗,减少整体链路的时延,提高了网卡存储业务的处理效率。The embodiment of the present application combines the characteristics of the unit storage length of the node storage component, the maximum transmission unit of the block storage message, and the maximum transmission unit of the network message, and divides the initial block storage message transmitted by the block storage component in the logic circuit component through the target storage length that is less than or equal to the unit storage length, and obtains N unit storage messages with the target storage length, and the unit storage message can be a message fragmentation in the block storage message format. The target storage length can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol, so that after the unit storage message is converted into a message format through the remote direct access protocol in the on-chip system component, the storage length of the unit network message obtained is the same as the storage length of the unit storage message. Since the storage length of the unit network message is the same as the storage length of the unit storage message, the redundant check value generated by the unit network message is also the same as the redundant check value generated by the unit storage message, and the redundant check value generated by the logic circuit component can be carried to the end of the network card, reducing the computing resource consumption of the on-chip system component, reducing the overall link delay, and improving the processing efficiency of the network card storage service.

请参见图3,图3是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图一,该数据处理方法可以由网卡执行,网卡可以是如图1所示的网卡200。以下将以本数据处理方法由网卡执行为例进行说明。其中,该数据处理方法至少可以包括以下步骤S101-步骤S103:Please refer to FIG. 3, which is a flowchart of a data processing method based on a network card provided in an embodiment of the present application. The data processing method can be executed by a network card, and the network card can be the network card 200 shown in FIG. 1. The following will take the data processing method executed by the network card as an example for description. The data processing method may include at least the following steps S101-S103:

步骤S101,通过逻辑电路组件获取第一设备中块存储组件传输的初始块存储报文,基于第二设备的节点存储组件的单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文,生成每个单位存储报文的冗余校验值,根据N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至片上系统组件;N为正整数;一个访问块存储报文包括一个单位存储报文和所对应的冗余校验值;目标存储长度小于单位存储长度;Step S101, obtaining an initial block storage message transmitted by a block storage component in a first device through a logic circuit component, dividing the initial block storage message into N unit storage messages with a target storage length based on a unit storage length of a node storage component of a second device, generating a redundant check value for each unit storage message, generating N access block storage messages according to the N unit storage messages and the N redundant check values, and transmitting the N access block storage messages to an on-chip system component; N is a positive integer; an access block storage message includes a unit storage message and a corresponding redundant check value; the target storage length is less than the unit storage length;

具体的,网卡可以包括逻辑电路组件和片上系统组件,第一设备可以通过网卡与第二设备建立通信连接进行数据交互。其中,第一设备可以是前端设备,也可以称之为主机。第一设备可以包括块存储设备。网卡可以是智能网卡,一种以网络处理器为核心的高性能网络接入卡,可以用于处理从主机中的各种网络协议或存储协议。块存储组件可以是如硬盘驱动器、固态驱动器等以固定大小的数据块为基本存储单元的设备组件。逻辑电路组件可以由ASIC或者FPGA实现。第二设备可以是提供存储业务服务的后端设备。Specifically, the network card may include a logic circuit component and a system-on-chip component, and the first device may establish a communication connection with the second device through the network card to exchange data. Among them, the first device may be a front-end device, which may also be referred to as a host. The first device may include a block storage device. The network card may be an intelligent network card, a high-performance network access card with a network processor as the core, which can be used to process various network protocols or storage protocols from the host. The block storage component may be a device component such as a hard disk drive, a solid-state drive, etc. that uses a fixed-size data block as the basic storage unit. The logic circuit component may be implemented by an ASIC or an FPGA. The second device may be a back-end device that provides storage business services.

第一设备可以运行有多个协议队列,多个协议队列包括存储业务读取队列和存储业务写入队列,存储业务读取队列可以用于执行存储业务的读取任务,存储业务写入队列可以用于执行存储业务的写入任务,多个协议队列可以存储至块存储组件中。The first device may run multiple protocol queues, including a storage service read queue and a storage service write queue. The storage service read queue may be used to execute storage service read tasks, and the storage service write queue may be used to execute storage service write tasks. The multiple protocol queues may be stored in a block storage component.

在存储业务的写入任务中,第一设备可以将块存储组件中的初始块存储报文卸载至网卡,网卡通过逻辑电路组件获取第一设备传输的初始块存储报文。其中,初始块存储报文可以是操作系统中针对块存储组件的IO访问报文,即BLK报文。网卡的逻辑电路组件可以获取第二设备的节点存储组件的单位存储长度,单位存储长度可以是节点存储组件中存储单元的最大存储长度。卸载可以包括针对RDMA协议卸载、UDP协议卸载、删码卸载等,本申请实施例在此不做限制。卸载可以是指将主机中的各种网络协议和存储协议分离出来由网卡进行执行。In the write task of the storage service, the first device can unload the initial block storage message in the block storage component to the network card, and the network card obtains the initial block storage message transmitted by the first device through the logic circuit component. Among them, the initial block storage message can be an IO access message for the block storage component in the operating system, that is, a BLK message. The logic circuit component of the network card can obtain the unit storage length of the node storage component of the second device, and the unit storage length can be the maximum storage length of the storage unit in the node storage component. Unloading can include unloading for RDMA protocol, UDP protocol unloading, code deletion unloading, etc., which is not limited in the embodiments of the present application. Unloading can refer to separating various network protocols and storage protocols in the host and executing them by the network card.

逻辑电路组件可以基于单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文,其中,目标存储长度可以小于单位存储长度,目标存储长度可以小于或等于远程直接访问协议(RDMA)中单位网络报文的最大传输单位。单位存储报文可以是BLK格式的报文分片。逻辑电路组件可以生成每个单位存储报文的冗余校验值(CRC)。逻辑电路组件可以通过N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至网卡的片上系统组件。其中,访问块存储报文可以是一种添加校验值等报文信息得到的BLK报文,一个访问块存储报文可以包括一个单位存储报文和所对应的冗余校验值。冗余校验值也可以称之为循环冗余校验,是通信领域常用的校验码,包括一系列移位、相除等数据编码规则。常用的编码方法有CRC-32、CRC-16等。The logic circuit component can divide the initial block storage message into N unit storage messages with target storage lengths based on the unit storage length, wherein the target storage length can be less than the unit storage length, and the target storage length can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol (RDMA). The unit storage message can be a message fragment in BLK format. The logic circuit component can generate a redundant check value (CRC) for each unit storage message. The logic circuit component can generate N access block storage messages through N unit storage messages and N redundant check values, and transmit the N access block storage messages to the on-chip system component of the network card. Among them, the access block storage message can be a BLK message obtained by adding message information such as a check value, and an access block storage message can include a unit storage message and a corresponding redundant check value. The redundant check value can also be called a cyclic redundancy check, which is a commonly used check code in the communication field, including a series of data encoding rules such as shift and division. Commonly used encoding methods include CRC-32, CRC-16, etc.

步骤S102,在片上系统组件中,通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,根据N个单位网络报文以及N个冗余校验值生成N个传输网络报文;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文的存储长度均等于目标存储长度;N个传输网络报文的存储长度均小于或等于单位存储长度;Step S102, in the system-on-chip component, the unit storage messages in the N access block storage messages are converted into message formats through the remote direct access protocol to obtain N unit network messages, and N transmission network messages are generated according to the N unit network messages and the N redundant check values; one transmission network message includes one unit network message and the associated redundant check value; the storage lengths of the N unit network messages are all equal to the target storage length; the storage lengths of the N transmission network messages are all less than or equal to the unit storage length;

具体的,片上系统组件可以通过远程直接访问协议(RDMA)对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,其中,远程直接访问协议是一种基于消息的数据传输协议,用于高性能网络通信的技术。单位网络报文可以是操作系统中网络设备的报文,即NET报文。片上系统组件可以通过N个单位网络报文以及N个冗余校验值生成N个传输网络报文,片上系统组件可以将N个传输网络报文传递至片上系统组件中的协议栈组件。其中,传输网络报文可以是报文格式符合RDMA协议的NET报文,即NET-RDMA报文。一个传输网络报文可以包括一个单位网络报文和所关联的冗余校验值,N个单位网络报文的存储长度均等于目标存储长度,N个传输网络报文的存储长度均小于或等于单位存储长度。Specifically, the system-on-chip component may convert the message format of the unit storage message in the N access block storage messages through the remote direct access protocol (RDMA) to obtain N unit network messages, wherein the remote direct access protocol is a message-based data transmission protocol and a technology for high-performance network communication. The unit network message may be a message of a network device in an operating system, namely, a NET message. The system-on-chip component may generate N transmission network messages through the N unit network messages and the N redundant check values, and the system-on-chip component may transmit the N transmission network messages to the protocol stack component in the system-on-chip component. Among them, the transmission network message may be a NET message whose message format complies with the RDMA protocol, namely, a NET-RDMA message. A transmission network message may include a unit network message and an associated redundant check value, the storage lengths of the N unit network messages are all equal to the target storage length, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length.

步骤S103,将N个传输网络报文发送至第二设备,以使第二设备通过节点存储组件对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。Step S103, sending N transmission network messages to the second device, so that the second device verifies each transmission network message through the node storage component, and when the N transmission network messages are all verified, the N transmission network messages are written into the node storage component.

具体的,片上系统组件可以将N个传输网络报文发送至第二设备,第二设备通过节点存储组件对每个传输网络报文中的冗余校验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。Specifically, the on-chip system component can send N transmission network messages to the second device, and the second device verifies the redundant check value in each transmission network message through the node storage component. When all N transmission network messages are verified, the N transmission network messages are written into the node storage component.

本申请实施例通过结合节点存储组件的单位存储长度、块存储报文的最大传输单元以及网络报文的最大传输单位的特点,通过小于或等于单位存储长度的目标存储长度,在逻辑电路组件中对块存储组件传输的初始块存储报文进行划分,得到N个具有目标存储长度的单位存储报文,生成每个单位存储报文的冗余校验值,根据N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至片上系统组件,访问块存储报文可以是一种添加校验值等报文信息得到的网络报文,单位存储报文可以是块存储报文格式的报文分片。目标存储长度可以小于或等于远程直接访问协议中单位网络报文的最大传输单位,使得单位存储报文在片上系统组件中通过远程直接访问协议进行报文格式转化后,得到的单位网络报文的存储长度与单位存储报文的存储长度相同。可以让单位存储报文在逻辑电路组件以及片上系统组件之间进行传输时,无需因为块存储报文的最大传输单元以及网络报文的最大传输单位的差异进行报文分片,也无需因为块存储报文和网络报文的冗余校验值不同而进行多次正确性校验,更无需对报文分片进行完整性校验。通过N个单位网络报文以及N个冗余校验值生成N个传输网络报文,一个传输网络报文包括一个单位网络报文和所关联的冗余校验值,N个单位网络报文的存储长度均等于目标存储长度,N个传输网络报文的存储长度均小于或等于单位存储长度,传输网络报文可以是报文格式符合远程直接访问协议的网络报文。将N个传输网络报文发送至第二设备,第二设备通过节点存储组件对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。由于单位网络报文的存储长度与单位存储报文的存储长度相同,所以单位网络报文所生成的冗余校验值与单位存储报文所生成的冗余校验值也相同,可以将逻辑电路组件生成的冗余校验值携带至网卡的末端,降低了片上系统组件的计算资源消耗,减少整体链路的时延,提高了网卡存储业务的处理效率。The embodiment of the present application combines the characteristics of the unit storage length of the node storage component, the maximum transmission unit of the block storage message, and the maximum transmission unit of the network message, and divides the initial block storage message transmitted by the block storage component in the logic circuit component by a target storage length that is less than or equal to the unit storage length, obtains N unit storage messages with the target storage length, generates a redundant check value for each unit storage message, generates N access block storage messages according to the N unit storage messages and the N redundant check values, and transmits the N access block storage messages to the on-chip system component. The access block storage message can be a network message obtained by adding message information such as a check value, and the unit storage message can be a message fragment in the block storage message format. The target storage length can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol, so that after the unit storage message is converted into a message format in the on-chip system component through the remote direct access protocol, the storage length of the unit network message obtained is the same as the storage length of the unit storage message. It allows the unit storage message to be transmitted between the logic circuit component and the system-on-chip component without the need to fragment the message due to the difference between the maximum transmission unit of the block storage message and the maximum transmission unit of the network message, nor is it necessary to perform multiple correctness checks due to the different redundant check values of the block storage message and the network message, and there is no need to perform integrity checks on the message fragments. N transmission network messages are generated through N unit network messages and N redundant check values, one transmission network message includes a unit network message and the associated redundant check value, the storage length of the N unit network messages is equal to the target storage length, the storage length of the N transmission network messages is less than or equal to the unit storage length, and the transmission network message can be a network message whose message format conforms to the remote direct access protocol. The N transmission network messages are sent to the second device, and the second device verifies each transmission network message through the node storage component. When the N transmission network messages are all verified, the N transmission network messages are written into the node storage component. Since the storage length of a unit network message is the same as the storage length of a unit storage message, the redundant check value generated by the unit network message is also the same as the redundant check value generated by the unit storage message. The redundant check value generated by the logic circuit component can be carried to the end of the network card, reducing the computing resource consumption of the on-chip system components, reducing the overall link latency, and improving the processing efficiency of the network card storage service.

请参见图4,图4是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图二,该数据处理方法可以由网卡执行,网卡可以是如图1所示的网卡200。以下将以本数据处理方法由网卡执行为例进行说明。其中,该数据处理方法至少可以包括以下步骤S201-步骤S207:Please refer to FIG. 4, which is a flow chart of a data processing method based on a network card provided in an embodiment of the present application. The data processing method can be executed by a network card, and the network card can be the network card 200 shown in FIG. 1. The following will take the data processing method executed by the network card as an example for description. The data processing method may include at least the following steps S201-S207:

步骤S201,通过逻辑电路组件获取第一设备中块存储组件传输的初始块存储报文;Step S201, obtaining an initial block storage message transmitted by a block storage component in a first device through a logic circuit component;

具体的,可以参见上述图3对应实施例的步骤S101的具体描述,本申请实施例在此不再赘述。For details, please refer to the detailed description of step S101 in the embodiment corresponding to FIG. 3 above, which will not be described in detail in the embodiment of the present application.

步骤S202,获取第二设备的节点存储组件的单位存储长度,确定与远程直接访问协议相关联的报文头信息的存储长度,获取针对冗余校验值的预设存储长度;基于单位存储长度、报文头信息的存储长度和预设存储长度确定目标存储长度。Step S202, obtain the unit storage length of the node storage component of the second device, determine the storage length of the message header information associated with the remote direct access protocol, and obtain the preset storage length for the redundant check value; determine the target storage length based on the unit storage length, the storage length of the message header information and the preset storage length.

具体的,网卡可以获取第二设备的节点存储组件的单位存储长度,单位存储长度可以是节点存储组件中存储单元的最大存储长度。网卡可以确定与远程直接访问协议(RDMA)相关联的报文头信息的存储长度,以及获取针对冗余校验值的预设存储长度。冗余校验值的存储长度是基于生成冗余校验值的业务运算值所确定的,冗余校验值的存储长度可以是业务运算值的位长P-1。Specifically, the network card can obtain the unit storage length of the node storage component of the second device, and the unit storage length can be the maximum storage length of the storage unit in the node storage component. The network card can determine the storage length of the message header information associated with the remote direct access protocol (RDMA), and obtain the preset storage length for the redundant check value. The storage length of the redundant check value is determined based on the business operation value for generating the redundant check value, and the storage length of the redundant check value can be the bit length P-1 of the business operation value.

可以理解,单位存储长度、报文头信息的存储长度和预设存储长度均是预设的数值信息,网卡可以将单位存储长度与报文头信息的存储长度和预设存储长度之间的差值确定为可存储长度,基于可存储长度确定目标存储长度。其中,目标存储长度可以小于或者等于目标存储长度。It can be understood that the unit storage length, the storage length of the message header information and the preset storage length are all preset numerical information, and the network card can determine the difference between the unit storage length and the storage length of the message header information and the preset storage length as the storable length, and determine the target storage length based on the storable length. Among them, the target storage length can be less than or equal to the target storage length.

步骤S203,基于第二设备的节点存储组件的单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文;Step S203, based on the unit storage length of the node storage component of the second device, dividing the initial block storage message into N unit storage messages with a target storage length;

具体的,再请一并参见图5,图5是本申请实施例提出的一种数据处理场景示意图二,如图5所示,逻辑电路组件可以基于单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文。目标存储长度可以小于或等于远程直接访问协议(RDMA)中单位网络报文的最大传输单位。单位存储报文可以是BLK格式的报文分片,N个单位存储报文可以包括单位存储报文1、单位存储报文2、……、单位存储报文N。其中,目标存储长度可以小于单位存储长度。例如,初始块存储报文的存储长度可以是12KB(Kilo Byte),目标存储长度可以是4KB,那么,逻辑电路组件可以将初始块存储报文划分为3个存储长度为4KB的单位存储报文。Specifically, please refer to Figure 5, which is a second schematic diagram of a data processing scenario proposed in an embodiment of the present application. As shown in Figure 5, the logic circuit component can divide the initial block storage message into N unit storage messages with a target storage length based on the unit storage length. The target storage length may be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol (RDMA). The unit storage message may be a message fragment in BLK format, and the N unit storage messages may include unit storage message 1, unit storage message 2, ..., unit storage message N. Among them, the target storage length may be less than the unit storage length. For example, the storage length of the initial block storage message may be 12KB (Kilo Byte), and the target storage length may be 4KB. Then, the logic circuit component may divide the initial block storage message into 3 unit storage messages with a storage length of 4KB.

当初始块存储报文的存储长度与目标存储长度不对齐时,例如,初始块存储报文的存储长度为15KB,目标存储长度为4KB,逻辑电路组件可以将初始块存储报文划分为目标存储报文以及与目标存储长度对齐的待划分报文,其中,待划分报文的存储长度可以是12KB,目标存储报文可以是3KB,那么,逻辑电路组件可以将待划分报文划分为3个存储长度为4KB的单位存储报文,将目标存储报文确定为与目存储长度不对齐的报文,或者将目标存储长度补位至目标存储长度,在后续过程中,对目标存储报文进行与单位存储报文相同的处理。When the storage length of the initial block storage message is not aligned with the target storage length, for example, the storage length of the initial block storage message is 15KB, and the target storage length is 4KB, the logic circuit component can divide the initial block storage message into the target storage message and the message to be divided that is aligned with the target storage length, wherein the storage length of the message to be divided can be 12KB, and the target storage message can be 3KB, then, the logic circuit component can divide the message to be divided into 3 unit storage messages with a storage length of 4KB, determine the target storage message as a message that is not aligned with the target storage length, or fill the target storage length to the target storage length, and in the subsequent process, the target storage message is processed in the same way as the unit storage message.

步骤S204,基于业务运算值的位长P,对单位存储报文进行后补位处理,得到补位存储报文,基于业务运算值,对补位存储报文进行异或除法运算,得到业务冗余值;P为正整数;业务运算值是基于针对冗余校验值的预设存储长度所确定的;若业务冗余值的位长满足前补位条件,则对业务冗余值进行前补位处理,将前补位处理后的业务冗余值确定为冗余校验值;若业务冗余值的位长未满足前补位条件,则将业务冗余值确定为冗余校验值。Step S204, based on the bit length P of the business operation value, post-padded processing is performed on the unit storage message to obtain a padded storage message, and based on the business operation value, an XOR division operation is performed on the padded storage message to obtain a business redundancy value; P is a positive integer; the business operation value is determined based on a preset storage length for the redundant check value; if the bit length of the business redundancy value meets the front-padded condition, the business redundancy value is front-padded, and the business redundancy value after the front-padded processing is determined as the redundant check value; if the bit length of the business redundancy value does not meet the front-padded condition, the business redundancy value is determined as the redundant check value.

具体的,再请一并参见图5,如图5所示,逻辑电路组件可以生成每个单位存储报文的冗余校验值(CRC),例如可以生成单位存储报文1对应的冗余校验值CRC_1、单位存储报文2对应的冗余校验值CRC_2、……、单位存储报文N对应的冗余校验值CRC_N,冗余检验值的生成方式可以包括CRC-8,CRC-16和CRC-32等,CRC-8,CRC-16和CRC-32具有不同的检验值长度和复杂性的方式,为便于理解,以CRC-8为例进行说明,CRC-8的业务运算值可以是基于针对冗余校验值的预设存储长度所确定的固定值,业务运算值可以为二进制数11001,业务运算值的位长P为5。Specifically, please refer to Figure 5. As shown in Figure 5, the logic circuit component can generate a redundant check value (CRC) for each unit storage message. For example, it can generate a redundant check value CRC_1 corresponding to unit storage message 1, a redundant check value CRC_2 corresponding to unit storage message 2, ..., a redundant check value CRC_N corresponding to unit storage message N. The redundant check value generation method may include CRC-8, CRC-16 and CRC-32, etc. CRC-8, CRC-16 and CRC-32 have different check value lengths and complexities. For ease of understanding, CRC-8 is used as an example for explanation. The business operation value of CRC-8 can be a fixed value determined based on a preset storage length for the redundant check value. The business operation value can be a binary number 11001, and the bit length P of the business operation value is 5.

以N个单位存储报文中的某一单位存储报文为二进制数11010011为例,逻辑电路组件可以基于业务运算值的位长P,在该单位存储报文后补位P-1个比特值0,得到补位存储报文,补位存储报文为二进制数110100110000,逻辑电路组件可以基于业务运算值,对补位存储报文进行异或除法运算,得到业务冗余值。Taking the example that one of the N unit storage messages is the binary number 11010011, the logic circuit component can, based on the bit length P of the business operation value, fill in P-1 bits of value 0 after the unit storage message to obtain a filled storage message. The filled storage message is the binary number 110100110000. The logic circuit component can perform an XOR division operation on the filled storage message based on the business operation value to obtain a business redundancy value.

对补位存储报文进行异或除法运算的过程可以是:基于业务运算值的位长P,在补位存储报文的M个单位比特值中,将以目标比特位为起始位置的连续P个单位比特值确定为单位运算数据,基于业务运算值,对单位运算数据进行异或运算,得到单位冗余值;目标比特位是指补位存储报文中单位比特值为1的比特位中的最高比特位;将M个单位比特值中除P个单位比特值之外的单位比特值,确定为Q个待补位比特值,基于业务运算值的位长P以及Q个待补位比特值,对单位冗余值进行后补位处理,得到与业务运算值具有相同位长的新的单位运算数据,继续基于业务运算值对新的单位运算数据进行异或运算,得到新的单位冗余值,直至Q个待补位比特值均用于完成后补位处理时,将最后得到的单位冗余值确定为业务冗余值;Q为M与P之间的差值。The process of performing an XOR division operation on the padding storage message may be: based on the bit length P of the business operation value, among the M unit bit values of the padding storage message, P consecutive unit bit values starting at the target bit are determined as unit operation data, and based on the business operation value, an XOR operation is performed on the unit operation data to obtain a unit redundancy value; the target bit refers to the highest bit among the bits whose unit bit values in the padding storage message are 1; the unit bit values other than the P unit bit values among the M unit bit values are determined as Q to-be-padded bit values, and based on the bit length P of the business operation value and the Q to-be-padded bit values, the unit redundancy value is post-padded to obtain new unit operation data having the same bit length as the business operation value, and the new unit operation data is continued to be XORed based on the business operation value to obtain a new unit redundancy value, until the Q to-be-padded bit values are all used to complete the post-padded processing, and the finally obtained unit redundancy value is determined as the business redundancy value; Q is the difference between M and P.

具体的,逻辑电路组件可以基于业务运算值的位长P,在补位存储报文的M个单位比特值中,将以目标比特位为起始位置的连续P个单位比特值确定为单位运算数据,其中,目标比特位是指补位存储报文中单位比特值为1的比特位中的最高比特位,单位运算数据的位长与业务运算值的位长相同,单位运算数据可以是二进制数10110。Specifically, the logic circuit component can determine the consecutive P unit bit values starting from the target bit as unit operation data among the M unit bit values of the padding storage message based on the bit length P of the business operation value, wherein the target bit refers to the highest bit among the bits with unit bit value of 1 in the padding storage message, and the bit length of the unit operation data is the same as the bit length of the business operation value, and the unit operation data can be the binary number 10110.

逻辑电路组件可以对单位运算数据10110与业务运算值11001进行异或(XOR)运算,得到单位冗余值,单位冗余值为二进制数1111(即异或运算的运算结果01111),逻辑电路组件可以将M个单位比特值中除P个单位比特值之外的单位比特值,确定为Q个待补位比特值,Q为M与P之间的差值,Q个待补位比特值可以是指二进制数0110000,逻辑电路组件可以基于业务运算值的位长P以及Q个待补位比特值,对单位冗余值进行后补位处理,得到与业务运算值具有相同位长的新的单位运算数据,新的单位运算数据可以是二进制数11110,逻辑电路组件可以继续基于业务运算值11001对单位运算数据11110进行异或运算,得到单位冗余值111,基于Q个待补位比特值中未被用于补位处理的比特值,对单位冗余值111进行后补位处理,得到与业务运算值具有相同位长的单位运算数据11111,对单位运算数据11111与业务运算值11001进行异或运算,得到单位冗余值110,基于Q个待补位比特值中未被用于补位处理的比特值,对单位冗余值110进行后补位处理,得到与业务运算值具有相同位长的单位运算数据11000,对单位运算数据11000与业务运算值11001进行异或运算,得到单位冗余值1,基于Q个待补位比特值中未被用于补位处理的比特值,对单位冗余值1进行后补位处理,得到单位冗余值100,此时,Q个待补位比特值均用于完成后补位处理,逻辑电路组件可以将最后得到的单位冗余值100确定为业务冗余值100。The logic circuit component can perform an exclusive OR (XOR) operation on the unit operation data 10110 and the business operation value 11001 to obtain a unit redundant value, and the unit redundant value is a binary number 1111 (that is, the operation result of the exclusive OR operation is 01111). The logic circuit component can determine the unit bit values except P unit bit values among the M unit bit values as Q to-be-filled bit values, where Q is the difference between M and P, and the Q to-be-filled bit values can refer to the binary number 0110000. The logic circuit component can perform post-fill processing on the unit redundant value based on the bit length P of the business operation value and the Q to-be-filled bit values to obtain a new unit operation data with the same bit length as the business operation value. The new unit operation data can be a binary number 11110. The logic circuit component can continue to perform an exclusive OR operation on the unit operation data 11110 based on the business operation value 11001 to obtain a unit redundant value 111. Based on the Q to-be-filled bit ratio Based on the bit values in the Q bit values to be filled that are not used for the filling process, the unit redundant value 111 is post-filled to obtain unit operation data 11111 having the same bit length as the business operation value, the unit operation data 11111 and the business operation value 11001 are XORed to obtain unit redundant value 110, based on the bit values in the Q bit values to be filled that are not used for the filling process, the unit redundant value 110 is post-filled to obtain unit operation data 11000 having the same bit length as the business operation value, the unit operation data 11000 is XORed to obtain unit redundant value 1, based on the bit values in the Q bit values to be filled that are not used for the filling process, the unit redundant value 1 is post-filled to obtain unit redundant value 100, at this time, the Q bit values to be filled are all used to complete the post-filling process, and the logic circuit component can determine the finally obtained unit redundant value 100 as the business redundant value 100.

若业务冗余值的位长满足前补位条件,则逻辑电路组件可以对业务冗余值进行前补位处理,将前补位处理后的业务冗余值0100确定为冗余校验值0100,其中,前补位条件是指业务冗余值的位长小于P-1。若业务冗余值的位长未满足前补位条件,则逻辑电路组件可以将业务冗余值直接确定为冗余校验值。通过基于前补位条件对业务冗余值进行判断,可以统一冗余检验值的位长为P-1。If the bit length of the service redundancy value meets the front-filling condition, the logic circuit component can perform front-filling processing on the service redundancy value, and determine the service redundancy value 0100 after the front-filling processing as the redundancy check value 0100, wherein the front-filling condition means that the bit length of the service redundancy value is less than P-1. If the bit length of the service redundancy value does not meet the front-filling condition, the logic circuit component can directly determine the service redundancy value as the redundancy check value. By judging the service redundancy value based on the front-filling condition, the bit length of the redundancy check value can be unified to P-1.

步骤S205,根据N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至片上系统组件;Step S205, generating N access block storage messages according to the N unit storage messages and the N redundant check values, and transmitting the N access block storage messages to the on-chip system component;

具体的,再请一并参见图5,如图5所示,逻辑电路组件可以对每个单位存储报文添加BLK报文的报文头信息,并且与所关联的冗余校验值一起生成一个访问块存储报文,将N个访问块存储报文传输至网卡的片上系统组件。其中,访问块存储报文可以是一种添加校验值等报文信息得到的BLK报文,一个访问块存储报文可以包括一个BLK报文的报文头信息、一个单位存储报文和所对应的冗余校验值。BLK报文的报文头信息的具体内容本申请实施例在此不做限制。Specifically, please refer to Figure 5. As shown in Figure 5, the logic circuit component can add the message header information of the BLK message to each unit storage message, and generate an access block storage message together with the associated redundant check value, and transmit N access block storage messages to the on-chip system component of the network card. Among them, the access block storage message can be a BLK message obtained by adding message information such as a check value, and an access block storage message can include the message header information of a BLK message, a unit storage message and the corresponding redundant check value. The specific content of the message header information of the BLK message is not limited in the embodiments of the present application.

步骤S206,通过片上系统组件获取N个访问块存储报文中的单位存储报文,通过远程直接访问协议对N个单位存储报文进行报文格式转化,得到N个单位网络报文,生成每个单位网络报文分别对应的报文头信息;将N个单位网络报文、N个单位网络报文分别对应的报文头信息和N个冗余校验值,分别封装为N个传输网络报文;一个传输网络报文是通过一个单位网络报文、所对应的报文头信息和所关联的冗余校验值封装得到的。Step S206, obtain the unit storage messages in N access block storage messages through the on-chip system component, convert the message format of the N unit storage messages through the remote direct access protocol to obtain N unit network messages, and generate message header information corresponding to each unit network message; encapsulate the N unit network messages, the message header information corresponding to the N unit network messages, and the N redundant check values into N transmission network messages respectively; a transmission network message is obtained by encapsulating a unit network message, the corresponding message header information and the associated redundant check value.

具体的,片上系统组件可以包括存储开发组件和协议栈组件,存储开发组件可以获取N个访问块存储报文中的单位存储报文,通过远程直接访问协议(RDMA)对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,生成每个单位网络报文分别对应的RDMA协议的报文头信息,其中,RDMA协议的报文头信息可以包括路由信息(Route Header,RH)、基础传输信息(Base Transport Header, BTH)和RDMA协议信息,路由信息可以包括报文在各个系统中的源地址和目标地址,基础传输信息包括报文的类型、序列号等,RDMA协议信息可以包括RDMA操作的详细信息,如RDMA读取或写入操作、后端存储地址、前端存储地址等。远程直接访问协议是一种基于消息的数据传输协议,用于高性能网络通信的技术。单位网络报文可以是操作系统中网络设备的报文,即NET报文。Specifically, the system-on-chip component may include a storage development component and a protocol stack component. The storage development component may obtain a unit storage message in N access block storage messages, convert the message format of the unit storage message in the N access block storage messages through a remote direct access protocol (RDMA), obtain N unit network messages, and generate RDMA protocol message header information corresponding to each unit network message, wherein the RDMA protocol message header information may include routing information (Route Header, RH), base transport information (Base Transport Header, BTH) and RDMA protocol information, the routing information may include the source address and destination address of the message in each system, the base transport information includes the type and sequence number of the message, etc., and the RDMA protocol information may include detailed information of the RDMA operation, such as RDMA read or write operation, backend storage address, frontend storage address, etc. The remote direct access protocol is a message-based data transmission protocol, a technology used for high-performance network communication. The unit network message may be a message of a network device in an operating system, namely, a NET message.

存储开发组件可以将N个单位网络报文、N个单位网络报文分别对应的报文头信息和N个冗余校验值,分别封装为N个传输网络报文。其中,传输网络报文可以是报文格式符合RDMA协议的NET报文,即NET-RDMA报文。一个传输网络报文可以包括一个RDMA协议的报文头信息、一个单位网络报文和所关联的冗余校验值,N个单位网络报文的存储长度均等于目标存储长度,N个传输网络报文的存储长度均小于或等于单位存储长度。The storage development component can encapsulate N unit network messages, the message header information corresponding to the N unit network messages, and N redundant check values into N transmission network messages. Among them, the transmission network message can be a NET message whose message format conforms to the RDMA protocol, that is, a NET-RDMA message. A transmission network message can include a message header information of an RDMA protocol, a unit network message, and the associated redundant check value. The storage length of the N unit network messages is equal to the target storage length, and the storage length of the N transmission network messages is less than or equal to the unit storage length.

步骤S207,将N个传输网络报文发送至协议栈组件;在协议栈组件中,获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值;基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则通过协议栈组件将N个传输网络报文发送至第二设备。Step S207, sending N transmission network messages to the protocol stack component; in the protocol stack component, obtaining the unit network message in each transmission network message and the redundant check value associated with the unit network message; based on the N unit network messages, generating N target check values, if the target check value corresponding to each unit network message is the same as the associated redundant check value, then sending the N transmission network messages to the second device through the protocol stack component.

具体的,存储开发组件可以将N个传输网络报文传递至片上系统组件中的协议栈组件,协议栈组件可以对报文格式转化得到的传输网络报文中的单位网络报文的正确性进行校验。Specifically, the storage development component may transmit N transmission network messages to the protocol stack component in the system-on-chip component, and the protocol stack component may verify the correctness of the unit network message in the transmission network message obtained by message format conversion.

协议栈组件可以获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,对业务运算值和N个单位网络报文进行异或除法运算,得到N个目标校验值。若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则协议栈组件中可以通过集成的用户态通信组件(RDMA),对每个传输网络报文进行内核旁路处理(Bypass Kernel),内核旁路处理允许报文绕过内核处理组件(Kernel),通过RDMA协议直接远程访问第二设备的节点存储器。The protocol stack component can obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, perform XOR division operation on the business operation value and N unit network messages, and obtain N target check values. If the target check value corresponding to each unit network message is the same as the associated redundant check value, the protocol stack component can perform kernel bypass processing (Bypass Kernel) on each transmission network message through the integrated user-mode communication component (RDMA). Kernel bypass processing allows the message to bypass the kernel processing component (Kernel) and directly access the node storage of the second device remotely through the RDMA protocol.

可以理解,通过内核旁路处理,传输网络报文无需进行内核处理组件,可以减少了报文在不同系统组件之间复制和校验的开销,减少处理时延。It can be understood that through kernel bypass processing, the transmission of network messages does not need to be processed by kernel processing components, which can reduce the overhead of copying and verifying messages between different system components and reduce processing delays.

协议栈组件可以使用RDMA API(Application Programming Interface,应用程序编程接口),例如可以通过libibverbs库来创建与第二设备的RDMA连接,其中,libibverbs库是一种提供了一系列的RDMA接口的规范库,用于执行RDMA操作,包括但不限于内存注册、发送和接收数据、执行RDMA读写等。协议栈组件可以在第二设备的节点存储组件中进行存储区域的注册,将N个传输网络报文发送至第二设备,第二设备通过节点存储组件对每个传输网络报文中的冗余校验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。The protocol stack component can use the RDMA API (Application Programming Interface), for example, to create an RDMA connection with the second device through the libibverbs library, wherein the libibverbs library is a standard library that provides a series of RDMA interfaces for performing RDMA operations, including but not limited to memory registration, sending and receiving data, performing RDMA read and write, etc. The protocol stack component can register the storage area in the node storage component of the second device, send N transmission network messages to the second device, and the second device verifies the redundant check value in each transmission network message through the node storage component, and writes the N transmission network messages into the node storage component when all the N transmission network messages are verified.

可以理解,存储业务的读取任务与存储业务的写入任务可以是一个逆向过程,存储业务的读取任务的过程可以是:通过片上系统组件,获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文中的冗余检验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件;在逻辑电路组件中,通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;将初始块存储报文传输至第一设备。It can be understood that the reading task of the storage service and the writing task of the storage service can be a reverse process. The process of the reading task of the storage service can be: through the on-chip system component, obtain N transmission network messages sent by the second device through the node storage component, and verify the redundant check value in each transmission network message. When the N transmission network messages are all verified, the N transmission network messages are sent to the logic circuit component; in the logic circuit component, the unit network messages in the N transmission network messages are converted into message formats through the remote direct access protocol to obtain N unit storage messages, and based on the message header information respectively associated with the N unit storage messages, the N unit storage messages are reorganized into an initial block storage message; the initial block storage message is transmitted to the first device.

具体的,第二设备可以从节点存储组件获取所存储的N个传输网络报文,对每个传输网络报文中的冗余校验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至网卡,网卡可以通过协议栈组件接收N个传输网络报文,将N个传输网络报文传递至存储开发组件,由存储开发组件对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,将N个单位存储报文传递至逻辑电路组件,由逻辑电路组件将N个单位存储报文重组为初始块存储报文,将初始块存储报文发送至第一设备中的块存储组件进行存储。Specifically, the second device can obtain the N stored transmission network messages from the node storage component, check the redundant check value in each transmission network message, and when the N transmission network messages are all checked and passed, send the N transmission network messages to the network card. The network card can receive the N transmission network messages through the protocol stack component, pass the N transmission network messages to the storage development component, and the storage development component converts the message format of the unit network message in the N transmission network messages to obtain N unit storage messages. The N unit storage messages are passed to the logic circuit component, and the logic circuit component reorganizes the N unit storage messages into an initial block storage message, and sends the initial block storage message to the block storage component in the first device for storage.

本申请实施例通过结合节点存储组件的单位存储长度、BLK报文的最大传输单元以及NET报文的最大传输单位的特点,在网卡的源头处,通过小于或等于单位存储长度的目标存储长度,对块存储组件传输的初始块存储报文进行划分,得到N个具有目标存储长度的单位存储报文,使得单位存储报文的存储长度可以小于或等于远程直接访问协议中单位网络报文的最大传输单位,单位存储报文在片上系统组件中通过远程直接访问协议进行报文格式转化后,得到的单位网络报文的存储长度与单位存储报文的存储长度相同,从而可以通过单位存储报文的冗余检验值对单位网络报文的正确性进行校验,可以让单位存储报文在逻辑电路组件以及片上系统组件之间进行传输时,无需因为BLK报文的最大传输单元以及NET报文的最大传输单位的差异进行报文分片,也无需因为BLK报文和NET报文的冗余校验值不同而进行多次正确性校验,更无需对报文分片进行完整性校验。通过N个单位网络报文以及N个冗余校验值生成N个传输网络报文,一个传输网络报文包括一个单位网络报文和所关联的冗余校验值,N个单位网络报文的存储长度均等于目标存储长度,N个传输网络报文的存储长度均小于或等于单位存储长度,传输网络报文可以是报文格式符合RDMA协议的NET报文,即NET-RDMA报文。将N个传输网络报文发送至第二设备,第二设备通过节点存储组件对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。由于单位网络报文的存储长度与单位存储报文的存储长度相同,所以单位网络报文所生成的冗余校验值与单位存储报文所生成的冗余校验值也相同,可以将逻辑电路组件生成的冗余校验值携带至网卡的末端,降低了片上系统组件的计算资源消耗,减少整体链路的时延,提高了网卡存储业务的处理效率。The embodiment of the present application combines the characteristics of the unit storage length of the node storage component, the maximum transmission unit of the BLK message, and the maximum transmission unit of the NET message. At the source of the network card, the initial block storage message transmitted by the block storage component is divided by a target storage length that is less than or equal to the unit storage length, and N unit storage messages with the target storage length are obtained, so that the storage length of the unit storage message can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol. After the unit storage message is converted into a message format through the remote direct access protocol in the on-chip system component, the storage length of the obtained unit network message is the same as the storage length of the unit storage message, so that the correctness of the unit network message can be verified by the redundant check value of the unit storage message, so that when the unit storage message is transmitted between the logic circuit component and the on-chip system component, there is no need to perform message fragmentation due to the difference in the maximum transmission unit of the BLK message and the maximum transmission unit of the NET message, nor is there any need to perform multiple correctness checks due to the different redundant check values of the BLK message and the NET message, and there is no need to perform integrity checks on the message fragments. N transmission network messages are generated through N unit network messages and N redundant check values, one transmission network message includes a unit network message and an associated redundant check value, the storage length of the N unit network messages is equal to the target storage length, the storage length of the N transmission network messages is less than or equal to the unit storage length, and the transmission network message can be a NET message whose message format conforms to the RDMA protocol, that is, a NET-RDMA message. The N transmission network messages are sent to the second device, and the second device verifies each transmission network message through the node storage component. When the N transmission network messages are all verified, the N transmission network messages are written into the node storage component. Since the storage length of the unit network message is the same as the storage length of the unit storage message, the redundant check value generated by the unit network message is also the same as the redundant check value generated by the unit storage message. The redundant check value generated by the logic circuit component can be carried to the end of the network card, which reduces the computing resource consumption of the on-chip system component, reduces the overall link delay, and improves the processing efficiency of the network card storage service.

另一方面,网卡的不同组件之间无需进行多次冗余检验值的校验,因而无需每个组件都需要去实现错误之后的异常处理,减少异常处理的处理成本,同时由于统一了冗余检验值,第一设备和第二设备之间的校验算法可以一致,方便代码复用、实现与验证。通过可以实现RDMA协议的协议栈组件对报文进行内核旁路处理,可以避免由于内核处理组件失效、链路错误等因素导致的数据错误问题,并且通过内核旁路处理,传输网络报文无需进行内核处理组件,可以减少了报文在不同系统组件之间复制和校验的开销,减少处理时延。On the other hand, there is no need to perform multiple redundant check value checks between different components of the network card, so each component does not need to implement exception handling after an error, reducing the processing cost of exception handling. At the same time, due to the unified redundant check value, the verification algorithm between the first device and the second device can be consistent, which is convenient for code reuse, implementation and verification. By implementing kernel bypass processing of messages by the protocol stack component that can implement the RDMA protocol, data errors caused by factors such as kernel processing component failure and link errors can be avoided. In addition, through kernel bypass processing, the transmission of network messages does not require kernel processing components, which can reduce the overhead of copying and verifying messages between different system components and reduce processing delays.

请参见图6,图6是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图三,该数据处理方法可以由网卡执行,网卡可以是如图1所示的网卡200。以下将以本数据处理方法由网卡执行为例进行说明。其中,该数据处理方法至少可以包括以下步骤S301-步骤S303:Please refer to FIG. 6, which is a flow chart of a data processing method based on a network card provided in an embodiment of the present application. The data processing method can be executed by a network card, and the network card can be the network card 200 shown in FIG. 1. The following will take the data processing method executed by the network card as an example for description. The data processing method may include at least the following steps S301-S303:

步骤S301,通过片上系统组件,获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件;N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所对应的冗余校验值;Step S301, obtaining N transmission network messages sent by the second device through the node storage component through the on-chip system component, verifying each transmission network message, and sending the N transmission network messages to the logic circuit component when all the N transmission network messages are verified; the storage lengths of the N transmission network messages are less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and a corresponding redundancy check value;

具体的,网卡可以包括逻辑电路组件和片上系统组件,第一设备可以通过网卡与第二设备建立通信连接进行数据交互。其中,第一设备可以是前端设备,也可以称之为主机,网卡可以是智能网卡,一种以网络处理器为核心的高性能网络接入卡,可以用于处理从主机中的各种网络协议或存储协议。逻辑电路组件可以由ASIC或者FPGA实现。第二设备可以是提供存储业务服务的后端设备。Specifically, the network card may include a logic circuit component and a system-on-chip component, and the first device may establish a communication connection with the second device through the network card to exchange data. The first device may be a front-end device, also known as a host, and the network card may be an intelligent network card, a high-performance network access card with a network processor as the core, which may be used to process various network protocols or storage protocols from the host. The logic circuit component may be implemented by ASIC or FPGA. The second device may be a back-end device that provides storage business services.

第一设备可以运行有多个协议队列,多个协议队列包括存储业务读取队列和存储业务写入队列,存储业务读取队列可以用于执行存储业务的读取任务,存储业务写入队列可以用于执行存储业务的写入任务,多个协议队列可以存储至块存储组件中。The first device may run multiple protocol queues, including a storage service read queue and a storage service write queue. The storage service read queue may be used to execute storage service read tasks, and the storage service write queue may be used to execute storage service write tasks. The multiple protocol queues may be stored in a block storage component.

在存储业务的读取任务中,网卡可以通过片上系统组件,获取第二设备通过节点存储组件发送的N个传输网络报文,其中,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度,单位存储长度可以是节点存储组件中存储单元的最大存储长度,传输网络报文可以是报文格式符合RDMA协议的NET报文,即NET-RDMA报文。一个传输网络报文可以包括一个单位网络报文和所关联的冗余校验值。单位网络报文可以是操作系统中网络设备的报文,即NET报文。N个传输网络报文的具体生成过程可以参见上述图4对应实施例的步骤S201至步骤S207的描述,本申请实施例在此不再赘述。In the reading task of the storage service, the network card can obtain N transmission network messages sent by the second device through the node storage component through the on-chip system component, wherein the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device, the unit storage length can be the maximum storage length of the storage unit in the node storage component, and the transmission network message can be a NET message whose message format conforms to the RDMA protocol, i.e., a NET-RDMA message. A transmission network message may include a unit network message and an associated redundant check value. The unit network message may be a message of a network device in an operating system, i.e., a NET message. The specific generation process of the N transmission network messages can refer to the description of steps S201 to S207 of the embodiment corresponding to FIG. 4 above, and the embodiments of the present application will not be repeated here.

片上系统组件可以获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,对业务运算值和N个单位网络报文进行异或除法运算,得到N个目标校验值。若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将N个传输网络报文发送至逻辑电路组件。The system-on-chip component can obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, perform XOR division operation on the service operation value and N unit network messages, and obtain N target check values. If the target check value corresponding to each unit network message is the same as the associated redundant check value, the N transmission network messages are sent to the logic circuit component.

步骤S302,在逻辑电路组件中,通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;Step S302, in the logic circuit component, the unit network messages in the N transmission network messages are converted into message formats through the remote direct access protocol to obtain N unit storage messages, and based on the message header information respectively associated with the N unit storage messages, the N unit storage messages are reorganized into initial block storage messages; the storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

具体的,逻辑电路组件可以通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文。其中,远程直接访问协议是一种基于消息的数据传输协议,用于高性能网络通信的技术。单位存储报文可以是BLK格式的报文分片,逻辑电路组件可以基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文。初始块存储报文可以是操作系统中针对块存储组件的IO访问报文,即BLK报文。Specifically, the logic circuit component can convert the message format of the unit network message in the N transmission network messages through the remote direct access protocol to obtain N unit storage messages. Among them, the remote direct access protocol is a message-based data transmission protocol, a technology used for high-performance network communication. The unit storage message can be a message fragment in BLK format, and the logic circuit component can reorganize the N unit storage messages into an initial block storage message based on the message header information respectively associated with the N unit storage messages. The initial block storage message can be an IO access message for the block storage component in the operating system, that is, a BLK message.

步骤S303,将初始块存储报文传输至第一设备。Step S303: Transmit the initial block storage message to the first device.

具体的,逻辑电路组件可以将初始块存储报文传输至第一设备,第一设备可以通过块存储组件对初始块存储报文进行存储。其中,块存储组件可以是如硬盘驱动器、固态驱动器等以固定大小的数据块为基本存储单元的设备组件。Specifically, the logic circuit component can transmit the initial block storage message to the first device, and the first device can store the initial block storage message through the block storage component. The block storage component can be a device component such as a hard disk drive, a solid state drive, etc. that uses a fixed-size data block as a basic storage unit.

本申请实施例通过片上系统组件,获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件。其中,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所对应的冗余校验值。在逻辑电路组件中,通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文。其中,N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度,将初始块存储报文传输至第一设备。通过结合节点存储组件的单位存储长度、BLK报文的最大传输单元以及NET报文的最大传输单位的特点,通过小于或等于单位存储长度的目标存储长度,对初始块存储报文进行划分,得到N个具有目标存储长度的单位存储报文,使得单位存储报文的存储长度可以小于或等于远程直接访问协议中单位网络报文的最大传输单位,单位存储报文在片上系统组件中通过远程直接访问协议进行报文格式转化后,得到的单位网络报文的存储长度与单位存储报文的存储长度相同,且单位网络报文所生成的冗余校验值与单位存储报文所生成的冗余校验值也相同,实现了逻辑电路组件统一的校验算法,实现了从第一设备前端到第二设备后端的端到端的数据保护,提高了存储业务的安全性。The embodiment of the present application obtains N transmission network messages sent by the second device through the node storage component through the on-chip system component, verifies each transmission network message, and sends the N transmission network messages to the logic circuit component when the N transmission network messages are all verified. Among them, the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and a corresponding redundant check value. In the logic circuit component, the message format of the unit network message in the N transmission network messages is converted through the remote direct access protocol to obtain N unit storage messages, and based on the message header information respectively associated with the N unit storage messages, the N unit storage messages are reorganized into an initial block storage message. Among them, the storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length, and the initial block storage message is transmitted to the first device. By combining the characteristics of the unit storage length of the node storage component, the maximum transmission unit of the BLK message, and the maximum transmission unit of the NET message, the initial block storage message is divided by a target storage length that is less than or equal to the unit storage length, and N unit storage messages with the target storage length are obtained, so that the storage length of the unit storage message can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol. After the unit storage message is converted into a message format through the remote direct access protocol in the on-chip system component, the storage length of the obtained unit network message is the same as the storage length of the unit storage message, and the redundant check value generated by the unit network message is also the same as the redundant check value generated by the unit storage message, thereby realizing a unified check algorithm for the logic circuit component, realizing end-to-end data protection from the front end of the first device to the back end of the second device, and improving the security of the storage business.

请参见图7,图7是本申请实施例提供的一种基于网卡的数据处理方法的流程示意图四,该数据处理方法可以由第二设备执行,第二设备可以是如图1所示的第二设备300。以下将以本数据处理方法由网卡执行为例进行说明。其中,该数据处理方法至少可以包括以下步骤S401-步骤S403:Please refer to FIG. 7, which is a flowchart diagram 4 of a data processing method based on a network card provided in an embodiment of the present application. The data processing method can be executed by a second device, and the second device can be the second device 300 shown in FIG. 1. The following will take the data processing method executed by the network card as an example for description. The data processing method can at least include the following steps S401-S403:

步骤S401,获取第一设备通过网卡发送的N个传输网络报文;N为正整数,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文是由网卡通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化得到,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值;N个单位存储报文是基于单位存储长度对初始块存储报文划分得到;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;Step S401, obtaining N transmission network messages sent by the first device through the network card; N is a positive integer, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and an associated redundant check value; the N unit network messages are obtained by the network card performing message format conversion on the unit storage messages in the N access block storage messages through the remote direct access protocol, and an access block storage message includes a unit storage message and a redundant check value generated for the unit storage message; the N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length; the storage lengths of the N unit network messages and the storage lengths of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

具体的,第一设备可以通过网卡与第二设备建立通信连接进行数据交互。其中,第一设备可以是前端设备,也可以称之为主机。网卡可以是智能网卡,一种以网络处理器为核心的高性能网络接入卡,可以用于处理从主机中的各种网络协议或存储协议。第二设备可以是提供存储业务服务的后端设备。Specifically, the first device can establish a communication connection with the second device through a network card to exchange data. The first device can be a front-end device, which can also be called a host. The network card can be an intelligent network card, a high-performance network access card with a network processor as the core, which can be used to process various network protocols or storage protocols from the host. The second device can be a back-end device that provides storage business services.

第二设备可以通过节点存储组件获取第一设备通过网卡发送的N个传输网络报文。其中,传输网络报文可以是报文格式符合RDMA协议的NET报文,即NET-RDMA报文。N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度。一个传输网络报文可以包括一个单位网络报文和所关联的冗余校验值,N个单位网络报文可以是由网卡通过远程直接访问协议(RDMA)对N个访问块存储报文中的单位存储报文进行报文格式转化得到的,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值(CRC),单位存储报文可以是BLK格式的报文分片。冗余校验值也可以称之为循环冗余校验,是通信领域常用的校验码,包括一系列移位、相除等数据编码规则。常用的编码方法有CRC-32、CRC-16等。The second device can obtain N transmission network messages sent by the first device through the network card through the node storage component. Among them, the transmission network message can be a NET message whose message format conforms to the RDMA protocol, that is, a NET-RDMA message. The storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device. A transmission network message can include a unit network message and an associated redundant check value. The N unit network messages can be obtained by the network card through the remote direct access protocol (RDMA) to convert the message format of the unit storage message in the N access block storage messages. An access block storage message includes a unit storage message and a redundant check value (CRC) generated for the unit storage message. The unit storage message can be a message fragment in the BLK format. The redundant check value can also be called a cyclic redundancy check, which is a commonly used check code in the communication field, including a series of data encoding rules such as shift and division. Common encoding methods include CRC-32, CRC-16, etc.

N个单位存储报文是基于单位存储长度对初始块存储报文划分得到,初始块存储报文可以是操作系统中针对块存储组件的IO访问报文,即BLK报文。N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度。N个传输网络报文的具体生成过程可以参见上述图4对应实施例的步骤S201至步骤S207的描述,本申请实施例在此不再赘述。The N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length. The initial block storage message can be an IO access message for the block storage component in the operating system, that is, a BLK message. The storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length. The specific generation process of the N transmission network messages can refer to the description of steps S201 to S207 of the embodiment corresponding to Figure 4 above, and the embodiment of the present application will not be repeated here.

步骤S402,获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。Step S402, obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, generate N target check values based on N unit network messages, if the target check value corresponding to each unit network message is the same as the associated redundant check value, then store each transmission network message separately in the node storage component.

具体的,节点存储组件可以获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,对业务运算值和N个单位网络报文进行异或除法运算,得到N个目标校验值。若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。Specifically, the node storage component can obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, perform XOR division operation on the business operation value and N unit network messages, and obtain N target check values. If the target check value corresponding to each unit network message is the same as the associated redundant check value, each transmission network message is stored in the node storage component respectively.

可以理解,N个单位网络报文在网卡与第二设备的传输过程中可能会发生乱序,节点存储组件可以对每个传输网络报文进行排序后再进行存储,其过程可以是:获取N个传输网络报文中的报文头信息,基于N个报文头信息中的划分排序值,确定N个传输网络报文分别对应的存储地址,基于N个存储地址,将每个传输网络报文存储至节点存储组件中关联的存储地址所对应的存储单元。It can be understood that N unit network messages may be out of order during the transmission process between the network card and the second device. The node storage component can sort each transmission network message before storing it. The process can be: obtaining the message header information in the N transmission network messages, and based on the division and sorting values in the N message header information, determining the storage addresses corresponding to the N transmission network messages respectively, and based on the N storage addresses, storing each transmission network message in the storage unit corresponding to the associated storage address in the node storage component.

具体的,节点存储组件可以获取N个传输网络报文中的报文头信息,其中,RDMA协议的报文头信息可以包括路由信息(Route Header,RH)、基础传输信息(Base TransportHeader, BTH)、RDMA协议信息和划分排序值,路由信息可以包括报文在各个系统中的源地址和目标地址,基础传输信息包括报文的类型、序列号等,RDMA协议信息可以包括RDMA操作的详细信息,如RDMA读取或写入操作、后端存储地址、前端存储地址等。划分排序值可以确定初始块存储报文划分得到N个单位存储报文时,N个单位存储报文之间的排列顺序。Specifically, the node storage component can obtain the message header information in N transmission network messages, wherein the message header information of the RDMA protocol may include routing information (Route Header, RH), basic transmission information (Base Transport Header, BTH), RDMA protocol information and partition sorting value, routing information may include the source address and destination address of the message in each system, basic transmission information includes the type and sequence number of the message, etc., and RDMA protocol information may include detailed information of RDMA operations, such as RDMA read or write operations, backend storage address, frontend storage address, etc. The partition sorting value may determine the arrangement order between N unit storage messages when the initial block storage message is divided to obtain N unit storage messages.

节点存储组件可以基于N个报文头信息中的划分排序值,确定N个传输网络报文分别对应的存储地址,基于N个存储地址,将每个传输网络报文存储至节点存储组件中关联的存储地址所对应的存储单元。The node storage component can determine the storage addresses corresponding to N transmission network messages based on the division and sorting values in the N message header information, and based on the N storage addresses, store each transmission network message in the storage unit corresponding to the associated storage address in the node storage component.

步骤S403,当获取到第一设备发送的存储业务读取请求时,从节点存储组件中获取所存储的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至网卡,以使网卡通过N个传输网络报文获取N个单位存储报文,基于N个单位存储报文生成初始块存储报文;初始块存储报文用于传输至第一设备。Step S403, when a storage service read request sent by the first device is obtained, the N stored transmission network messages are obtained from the node storage component, each transmission network message is verified, and when the N transmission network messages are all verified, the N transmission network messages are sent to the network card, so that the network card obtains N unit storage messages through the N transmission network messages, and generates an initial block storage message based on the N unit storage messages; the initial block storage message is used for transmission to the first device.

具体的,当网卡获取到第一设备发送的存储业务读取请求时,第二设备可以从节点存储组件获取所存储的N个传输网络报文,对每个传输网络报文中的冗余校验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至网卡,网卡可以通过协议栈组件接收N个传输网络报文,将N个传输网络报文传递至存储开发组件,由存储开发组件对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,将N个单位存储报文传递至逻辑电路组件,由逻辑电路组件将N个单位存储报文重组为初始块存储报文,将初始块存储报文发送至第一设备中的块存储组件进行存储。Specifically, when the network card obtains the storage service read request sent by the first device, the second device can obtain the N stored transmission network messages from the node storage component, and check the redundant check value in each transmission network message. When the N transmission network messages are all checked, the N transmission network messages are sent to the network card. The network card can receive the N transmission network messages through the protocol stack component, and pass the N transmission network messages to the storage development component. The storage development component converts the message format of the unit network message in the N transmission network messages to obtain N unit storage messages. The N unit storage messages are passed to the logic circuit component. The logic circuit component reorganizes the N unit storage messages into an initial block storage message, and sends the initial block storage message to the block storage component in the first device for storage.

本申请实施例获取第一设备通过网卡发送的N个传输网络报文;N为正整数,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文是由网卡通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化得到,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值;N个单位存储报文是基于单位存储长度对初始块存储报文划分得到;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。通过结合节点存储组件的单位存储长度、BLK报文的最大传输单元以及NET报文的最大传输单位的特点,通过小于或等于单位存储长度的目标存储长度,对初始块存储报文进行划分,得到N个具有目标存储长度的单位存储报文,使得单位存储报文的存储长度可以小于或等于远程直接访问协议中单位网络报文的最大传输单位,单位存储报文在片上系统组件中通过远程直接访问协议进行报文格式转化后,得到的单位网络报文的存储长度与单位存储报文的存储长度相同,且单位网络报文所生成的冗余校验值与单位存储报文所生成的冗余校验值也相同,实现了逻辑电路组件统一的校验算法,实现了从第一设备前端到第二设备后端的端到端的数据保护,提高了存储业务的安全性。并且通过报文头信息实现对N个单位网络报文在网卡与第二设备的传输过程的排序,提高了存储业务的可行性。The embodiment of the present application obtains N transmission network messages sent by the first device through the network card; N is a positive integer, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and an associated redundant check value; the N unit network messages are obtained by the network card through the remote direct access protocol to convert the message format of the unit storage message in the N access block storage messages, and an access block storage message includes a unit storage message and a redundant check value generated for the unit storage message ; N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length; the storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length; obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, and generate N target check values based on the N unit network messages. If the target check value corresponding to each unit network message is the same as the associated redundant check value, each transmission network message is stored in the node storage component respectively. By combining the characteristics of the unit storage length of the node storage component, the maximum transmission unit of the BLK message, and the maximum transmission unit of the NET message, the initial block storage message is divided by the target storage length that is less than or equal to the unit storage length, and N unit storage messages with the target storage length are obtained, so that the storage length of the unit storage message can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol. After the unit storage message is converted into a message format by the remote direct access protocol in the on-chip system component, the storage length of the unit network message obtained is the same as the storage length of the unit storage message, and the redundant check value generated by the unit network message is also the same as the redundant check value generated by the unit storage message, thereby realizing a unified check algorithm for the logic circuit component, realizing end-to-end data protection from the front end of the first device to the back end of the second device, and improving the security of the storage business. In addition, the transmission process of the N unit network messages in the network card and the second device is sorted by the message header information, thereby improving the feasibility of the storage business.

请参见图8,图8是本申请实施例提供的一种网卡的结构示意图一。如图8所示,该网卡1包括逻辑电路组件510和片上系统组件520,其中,片上系统组件520包括存储开发组件521和协议栈组件522。Please refer to Figure 8, which is a schematic diagram of the structure of a network card provided by an embodiment of the present application. As shown in Figure 8, the network card 1 includes a logic circuit component 510 and a system-on-chip component 520, wherein the system-on-chip component 520 includes a storage development component 521 and a protocol stack component 522.

逻辑电路组件510,用于获取第一设备中块存储组件传输的初始块存储报文,基于第二设备的节点存储组件的单位存储长度,将初始块存储报文划分为N个具有目标存储长度的单位存储报文,生成每个单位存储报文的冗余校验值,根据N个单位存储报文以及N个冗余校验值生成N个访问块存储报文,将N个访问块存储报文传输至片上系统组件520;N为正整数;一个访问块存储报文包括一个单位存储报文和所对应的冗余校验值;目标存储长度小于单位存储长度;The logic circuit component 510 is used to obtain an initial block storage message transmitted by the block storage component in the first device, divide the initial block storage message into N unit storage messages with a target storage length based on the unit storage length of the node storage component of the second device, generate a redundant check value for each unit storage message, generate N access block storage messages according to the N unit storage messages and the N redundant check values, and transmit the N access block storage messages to the on-chip system component 520; N is a positive integer; an access block storage message includes a unit storage message and a corresponding redundant check value; the target storage length is less than the unit storage length;

片上系统组件520,用于通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化,得到N个单位网络报文,根据N个单位网络报文以及N个冗余校验值生成N个传输网络报文;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文的存储长度均等于目标存储长度;N个传输网络报文的存储长度均小于或等于单位存储长度;The system-on-chip component 520 is used to convert the message format of the unit storage messages in the N access block storage messages through the remote direct access protocol to obtain N unit network messages, and generate N transmission network messages according to the N unit network messages and the N redundant check values; one transmission network message includes one unit network message and the associated redundant check value; the storage lengths of the N unit network messages are all equal to the target storage length; the storage lengths of the N transmission network messages are all less than or equal to the unit storage length;

片上系统组件520,还用于将N个传输网络报文发送至第二设备,以使第二设备通过节点存储组件对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文写入节点存储组件。The on-chip system component 520 is also used to send N transmission network messages to the second device, so that the second device verifies each transmission network message through the node storage component, and when the N transmission network messages are all verified, the N transmission network messages are written into the node storage component.

其中,in,

逻辑电路组件510,还用于获取第二设备的节点存储组件的单位存储长度,确定与远程直接访问协议相关联的报文头信息的存储长度,获取针对冗余校验值的预设存储长度;The logic circuit component 510 is further used to obtain a unit storage length of a node storage component of the second device, determine a storage length of message header information associated with a remote direct access protocol, and obtain a preset storage length for a redundancy check value;

逻辑电路组件510,还用于基于单位存储长度、报文头信息的存储长度和预设存储长度确定目标存储长度。The logic circuit component 510 is further used to determine the target storage length based on the unit storage length, the storage length of the message header information and the preset storage length.

其中,in,

逻辑电路组件510,具体用于基于业务运算值的位长P,对单位存储报文进行后补位处理,得到补位存储报文,基于业务运算值,对补位存储报文进行异或除法运算,得到业务冗余值;P为正整数;业务运算值是基于针对冗余校验值的预设存储长度所确定的;The logic circuit component 510 is specifically used to perform post-padding processing on the unit storage message based on the bit length P of the business operation value to obtain the padded storage message, and perform an XOR division operation on the padded storage message based on the business operation value to obtain the business redundancy value; P is a positive integer; the business operation value is determined based on the preset storage length for the redundancy check value;

逻辑电路组件510,具体用于若业务冗余值的位长满足前补位条件,则对业务冗余值进行前补位处理,将前补位处理后的业务冗余值确定为冗余校验值;The logic circuit component 510 is specifically used to perform a front-filling process on the service redundancy value if the bit length of the service redundancy value meets the front-filling condition, and determine the service redundancy value after the front-filling process as the redundancy check value;

逻辑电路组件510,具体用于若业务冗余值的位长未满足前补位条件,则将业务冗余值确定为冗余校验值。The logic circuit component 510 is specifically configured to determine the service redundancy value as a redundancy check value if the bit length of the service redundancy value does not meet the leading bit padding condition.

其中,补位存储报文包括M个单位比特值,M为正整数;The padding storage message includes M unit bit values, where M is a positive integer;

逻辑电路组件510,具体用于基于业务运算值的位长P,在补位存储报文的M个单位比特值中,将以目标比特位为起始位置的连续P个单位比特值确定为单位运算数据,基于业务运算值,对单位运算数据进行异或运算,得到单位冗余值;目标比特位是指补位存储报文中单位比特值为1的比特位中的最高比特位;The logic circuit component 510 is specifically used to determine, based on the bit length P of the service operation value, among the M unit bit values of the bit-padded storage message, the continuous P unit bit values starting at the target bit as the unit operation data, and perform an XOR operation on the unit operation data based on the service operation value to obtain a unit redundancy value; the target bit refers to the highest bit among the bits whose unit bit values are 1 in the bit-padded storage message;

逻辑电路组件510,具体用于将M个单位比特值中除P个单位比特值之外的单位比特值,确定为Q个待补位比特值,基于业务运算值的位长P以及Q个待补位比特值,对单位冗余值进行后补位处理,得到与业务运算值具有相同位长的新的单位运算数据,继续基于业务运算值对新的单位运算数据进行异或运算,得到新的单位冗余值,直至Q个待补位比特值均用于完成后补位处理时,将最后得到的单位冗余值确定为业务冗余值;Q为M与P之间的差值。The logic circuit component 510 is specifically used to determine the unit bit values other than P unit bit values among the M unit bit values as Q to-be-filled bit values, perform post-fill processing on the unit redundant value based on the bit length P of the business operation value and the Q to-be-filled bit values, and obtain new unit operation data with the same bit length as the business operation value, and continue to perform XOR operation on the new unit operation data based on the business operation value to obtain a new unit redundant value, until the Q to-be-filled bit values are all used to complete the post-fill processing, and the finally obtained unit redundant value is determined as the business redundant value; Q is the difference between M and P.

其中,in,

片上系统组件520,具体用于获取N个访问块存储报文中的单位存储报文,通过远程直接访问协议对N个单位存储报文进行报文格式转化,得到N个单位网络报文,生成每个单位网络报文分别对应的报文头信息;The system-on-chip component 520 is specifically used to obtain the unit storage message in the N access block storage messages, convert the message format of the N unit storage messages through the remote direct access protocol to obtain N unit network messages, and generate message header information corresponding to each unit network message;

片上系统组件520,具体用于将N个单位网络报文、N个单位网络报文分别对应的报文头信息和N个冗余校验值,分别封装为N个传输网络报文;一个传输网络报文是通过一个单位网络报文、所对应的报文头信息和所关联的冗余校验值封装得到的。The on-chip system component 520 is specifically used to encapsulate N unit network messages, the message header information corresponding to the N unit network messages, and N redundant check values into N transmission network messages; a transmission network message is obtained by encapsulating a unit network message, the corresponding message header information and the associated redundant check value.

其中,片上系统组件520包括存储开发组件521和协议栈组件522;Among them, the system-on-chip component 520 includes a storage development component 521 and a protocol stack component 522;

存储开发组件521,用于将N个传输网络报文发送至协议栈组件522;The storage development component 521 is used to send N transmission network messages to the protocol stack component 522;

协议栈组件522,用于获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值;The protocol stack component 522 is used to obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message;

协议栈组件522,还用于基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则通过协议栈组件522将N个传输网络报文发送至第二设备。The protocol stack component 522 is also used to generate N target check values based on N unit network messages. If the target check value corresponding to each unit network message is the same as the associated redundant check value, the N transmission network messages are sent to the second device through the protocol stack component 522.

其中,in,

片上系统组件520,还用于获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件510;The system-on-chip component 520 is further used to obtain N transmission network messages sent by the second device through the node storage component, verify each transmission network message, and send the N transmission network messages to the logic circuit component 510 when all the N transmission network messages pass the verification;

逻辑电路组件510,还用于通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;The logic circuit component 510 is further used to convert the message format of the unit network message in the N transmission network messages through the remote direct access protocol to obtain N unit storage messages, and reorganize the N unit storage messages into an initial block storage message based on the message header information respectively associated with the N unit storage messages;

逻辑电路组件510,还用于将初始块存储报文传输至第一设备。The logic circuit component 510 is further configured to transmit the initial block storage message to the first device.

请参见图9,图9是本申请实施例提供的一种网卡的结构示意图二。如图9所示,该网卡2包括片上系统组件610和逻辑电路组件620。Please refer to Fig. 9, which is a second structural diagram of a network card provided by an embodiment of the present application. As shown in Fig. 9, the network card 2 includes a system-on-chip component 610 and a logic circuit component 620.

片上系统组件610,用于获取第二设备通过节点存储组件发送的N个传输网络报文,对每个传输网络报文中的冗余检验值进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至逻辑电路组件620;N个传输网络报文的存储长度均小于或等于节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所对应的冗余校验值;The system-on-chip component 610 is used to obtain N transmission network messages sent by the second device through the node storage component, verify the redundant check value in each transmission network message, and send the N transmission network messages to the logic circuit component 620 when the N transmission network messages are all verified; the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component; a transmission network message includes a unit network message and a corresponding redundant check value;

逻辑电路组件620,用于通过远程直接访问协议对N个传输网络报文中的单位网络报文进行报文格式转化,得到N个单位存储报文,基于N个单位存储报文分别关联的报文头信息,将N个单位存储报文重组为初始块存储报文;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;The logic circuit component 620 is used to convert the message format of the unit network message in the N transmission network messages through the remote direct access protocol to obtain N unit storage messages, and reorganize the N unit storage messages into an initial block storage message based on the message header information respectively associated with the N unit storage messages; the storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

逻辑电路组件620,还用于将初始块存储报文传输至第一设备。The logic circuit component 620 is further configured to transmit the initial block storage message to the first device.

请参见图10,图10是本申请实施例提供的一种数据处理装置的结构示意图。如图10所示,该数据处理装置1包括报文获取模块710和报文校验模块720。Please refer to Fig. 10, which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. As shown in Fig. 10, the data processing device 1 includes a message acquisition module 710 and a message verification module 720.

报文获取模块710,用于获取第一设备通过网卡发送的N个传输网络报文;N为正整数,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文是由网卡通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化得到,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值;N个单位存储报文是基于单位存储长度对初始块存储报文划分得到;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;The message acquisition module 710 is used to acquire N transmission network messages sent by the first device through the network card; N is a positive integer, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and an associated redundant check value; the N unit network messages are obtained by the network card performing message format conversion on the unit storage messages in the N access block storage messages through the remote direct access protocol, and an access block storage message includes a unit storage message and a redundant check value generated for the unit storage message; the N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length; the storage lengths of the N unit network messages and the storage lengths of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

报文校验模块720,用于获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。The message verification module 720 is used to obtain the unit network message in each transmission network message and the redundant verification value associated with the unit network message, and generate N target verification values based on N unit network messages. If the target verification value corresponding to each unit network message is the same as the associated redundant verification value, each transmission network message is stored in the node storage component respectively.

在一种可能的实现方式中,报文校验模块720用于将每个传输网络报文分别存储至节点存储组件时,具体用于执行以下操作:In a possible implementation, when the message checking module 720 is used to store each transmission network message in the node storage component, it is specifically used to perform the following operations:

获取N个传输网络报文中的报文头信息,基于N个报文头信息中的划分排序值,确定N个传输网络报文分别对应的存储地址,基于N个存储地址,将每个传输网络报文存储至节点存储组件中关联的存储地址所对应的存储单元。Obtain message header information from N transmission network messages, determine storage addresses corresponding to the N transmission network messages based on the division and sorting values in the N message header information, and based on the N storage addresses, store each transmission network message in the storage unit corresponding to the associated storage address in the node storage component.

在一种可能的实现方式中,报文校验模块720还用于执行以下操作:In a possible implementation, the message checking module 720 is further configured to perform the following operations:

当获取到第一设备发送的存储业务读取请求时,从节点存储组件中获取所存储的N个传输网络报文,对每个传输网络报文进行校验,在N个传输网络报文均校验通过时,将N个传输网络报文发送至网卡,以使网卡通过N个传输网络报文获取N个单位存储报文,基于N个单位存储报文生成初始块存储报文;初始块存储报文用于传输至第一设备。When a storage service read request sent by the first device is obtained, N stored transmission network messages are obtained from the node storage component, each transmission network message is verified, and when all N transmission network messages are verified, the N transmission network messages are sent to the network card, so that the network card obtains N unit storage messages through the N transmission network messages, and generates an initial block storage message based on the N unit storage messages; the initial block storage message is used for transmission to the first device.

本申请实施例获取第一设备通过网卡发送的N个传输网络报文;N为正整数,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文是由网卡通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化得到,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值;N个单位存储报文是基于单位存储长度对初始块存储报文划分得到;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。通过结合节点存储组件的单位存储长度、BLK报文的最大传输单元以及NET报文的最大传输单位的特点,通过小于或等于单位存储长度的目标存储长度,对初始块存储报文进行划分,得到N个具有目标存储长度的单位存储报文,使得单位存储报文的存储长度可以小于或等于远程直接访问协议中单位网络报文的最大传输单位,单位存储报文在片上系统组件中通过远程直接访问协议进行报文格式转化后,得到的单位网络报文的存储长度与单位存储报文的存储长度相同,且单位网络报文所生成的冗余校验值与单位存储报文所生成的冗余校验值也相同,实现了逻辑电路组件统一的校验算法,实现了从第一设备前端到第二设备后端的端到端的数据保护,提高了存储业务的安全性。并且通过报文头信息实现对N个单位网络报文在网卡与第二设备的传输过程的排序,提高了存储业务的可行性。The embodiment of the present application obtains N transmission network messages sent by the first device through the network card; N is a positive integer, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and an associated redundant check value; the N unit network messages are obtained by the network card through the remote direct access protocol to convert the message format of the unit storage message in the N access block storage messages, and an access block storage message includes a unit storage message and a redundant check value generated for the unit storage message ; N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length; the storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length; obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, and generate N target check values based on the N unit network messages. If the target check value corresponding to each unit network message is the same as the associated redundant check value, each transmission network message is stored in the node storage component respectively. By combining the characteristics of the unit storage length of the node storage component, the maximum transmission unit of the BLK message, and the maximum transmission unit of the NET message, the initial block storage message is divided by the target storage length that is less than or equal to the unit storage length, and N unit storage messages with the target storage length are obtained, so that the storage length of the unit storage message can be less than or equal to the maximum transmission unit of the unit network message in the remote direct access protocol. After the unit storage message is converted into a message format by the remote direct access protocol in the on-chip system component, the storage length of the unit network message obtained is the same as the storage length of the unit storage message, and the redundant check value generated by the unit network message is also the same as the redundant check value generated by the unit storage message, thereby realizing a unified check algorithm for the logic circuit component, realizing end-to-end data protection from the front end of the first device to the back end of the second device, and improving the security of the storage business. In addition, the transmission process of the N unit network messages in the network card and the second device is sorted by the message header information, thereby improving the feasibility of the storage business.

本申请实施例中,术语“模块”或“单元”是指有预定功能的计算机程序或计算机程序的一部分,并与其他相关部分一起工作以实现预定目标,并且可以通过使用软件、硬件(如处理电路或存储器)或其组合来全部或部分实现。同样的,一个处理器(或多个处理器或存储器)可以用来实现一个或多个模块或单元。此外,每个模块或单元都可以是包含该模块或单元功能的整体模块或单元的一部分。In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

请参见图11,图11是本申请实施例提供的一种计算机设备的结构示意图。如图11所示,该计算机设备1000可以包括:处理器1001,网络接口1004和存储器1005,此外,上述计算机设备1000还可以包括:用户接口1003,和至少一个通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。其中,用户接口1003可以包括显示屏(Display)、键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图11所示,作为一种计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。Please refer to Figure 11, which is a structural diagram of a computer device provided in an embodiment of the present application. As shown in Figure 11, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also be at least one storage device located away from the aforementioned processor 1001. As shown in Figure 11, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

在如图11所示的计算机设备1000中,网络接口1004可提供网络通讯网元;而用户接口1003主要用于为用户提供输入的接口;而处理器1001可以用于调用存储器1005中存储的设备控制应用程序,以实现:In the computer device 1000 shown in FIG. 11 , the network interface 1004 can provide a network communication element; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

获取第一设备通过网卡发送的N个传输网络报文,将N个传输网络报文传输至节点存储组件;N为正整数,N个传输网络报文的存储长度均小于或等于第二设备中的节点存储组件的单位存储长度;一个传输网络报文包括一个单位网络报文和所关联的冗余校验值;N个单位网络报文是由网卡通过远程直接访问协议对N个访问块存储报文中的单位存储报文进行报文格式转化得到,一个访问块存储报文包括一个单位存储报文以及针对单位存储报文所生成的冗余校验值;N个单位存储报文是基于单位存储长度对初始块存储报文划分得到;N个单位网络报文的存储长度和N个单位存储报文的存储长度均等于目标存储长度,目标存储长度小于单位存储长度;Obtain N transmission network messages sent by the first device through the network card, and transmit the N transmission network messages to the node storage component; N is a positive integer, and the storage lengths of the N transmission network messages are all less than or equal to the unit storage length of the node storage component in the second device; a transmission network message includes a unit network message and an associated redundant check value; the N unit network messages are obtained by the network card performing message format conversion on the unit storage messages in the N access block storage messages through the remote direct access protocol, and an access block storage message includes a unit storage message and a redundant check value generated for the unit storage message; the N unit storage messages are obtained by dividing the initial block storage message based on the unit storage length; the storage length of the N unit network messages and the storage length of the N unit storage messages are both equal to the target storage length, and the target storage length is less than the unit storage length;

获取每个传输网络报文中的单位网络报文以及单位网络报文关联的冗余校验值,基于N个单位网络报文,生成N个目标校验值,若每个单位网络报文对应的目标校验值与所关联的冗余校验值均相同,则将每个传输网络报文分别存储至节点存储组件。Obtain the unit network message in each transmission network message and the redundant check value associated with the unit network message, generate N target check values based on N unit network messages, and if the target check value corresponding to each unit network message is the same as the associated redundant check value, store each transmission network message separately in the node storage component.

应当理解,本申请实施例中所描述的计算机设备1000可执行前文图7任一个所对应实施例中对该数据处理方法的描述,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。It should be understood that the computer device 1000 described in the embodiment of the present application can execute the description of the data processing method in any of the embodiments corresponding to FIG. 7 above, which will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated.

此外,这里需要指出的是:本申请实施例还提供了一种计算机可读存储介质,且上述计算机可读存储介质中存储有计算机程序,当上述处理器执行上述计算机程序时,能够执行前文图7任一个所对应实施例中对上述数据处理方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机可读存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the above-mentioned computer-readable storage medium stores a computer program. When the above-mentioned processor executes the above-mentioned computer program, it can execute the description of the above-mentioned data processing method in any of the embodiments corresponding to Figure 7 above, so it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

上述计算机可读存储介质可以是前述任一实施例提供的数据处理装置或者上述计算机设备的内部存储单元,例如计算机设备的硬盘或内存。该计算机可读存储介质也可以是该计算机设备的外部存储设备,例如该计算机设备上配备的插接式硬盘,智能存储卡(smart media card,SMC),安全数字(secure digital,SD)卡,闪存卡(flash card)等。进一步地,该计算机可读存储介质还可以既包括该计算机设备的内部存储单元也包括外部存储设备。该计算机可读存储介质用于存储该计算机程序以及该计算机设备所需的其他程序和数据。该计算机可读存储介质还可以用于暂时地存储已经显示或者将要显示的数据。The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been displayed or is to be displayed.

此外,这里需要指出的是:本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机程序,处理器执行该计算机程序,使得该计算机设备执行前文图7任一个所对应实施例提供的方法。In addition, it should be pointed out here that: the embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided by any of the embodiments corresponding to Figure 7 above.

本申请实施例的说明书和权利要求书及附图中的术语“第一”、“第二”等是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、装置、产品或设备没有限定于已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、装置、产品或设备固有的其他步骤单元。The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variation thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment comprising a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other step units inherent to these processes, methods, devices, products, or equipment.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照网元一般性地描述了各示例的组成及步骤。这些网元究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的网元,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will 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 terms of network elements in the above description. Whether these network elements are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described network elements for each specific application, but such implementation should not be considered to be beyond the scope of this application.

本申请实施例提供的方法及相关装置是参照本申请实施例提供的方法流程图和/或结构示意图来描述的,具体可由计算机程序指令实现方法流程图和/或结构示意图的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。这些计算机程序指令可提供到通用计算机、专用计算机、嵌入式处理机或其他可编程设备的处理器以产生一个机器,使得通过计算机或其他可编程设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或结构示意图一个方框或多个方框中指定的功能的装置。这些计算机程序指令也可存储在能引导计算机或其他可编程设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或结构示意图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或结构示意一个方框或多个方框中指定的功能的步骤。The method and related device provided by the embodiment of the present application are described with reference to the method flow chart and/or structural diagram provided by the embodiment of the present application, and can be specifically implemented by computer program instructions for each process and/or box of the method flow chart and/or structural diagram, and the combination of the process and/or box in the flow chart and/or block diagram. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable device to produce a machine, so that the instructions executed by the processor of the computer or other programmable device produce a device for realizing the function specified in one process or multiple processes of the flow chart and/or one box or multiple boxes of the structural diagram. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, and the instruction device realizes the function specified in one process or multiple processes of the flow chart and/or one box or multiple boxes of the structural diagram. These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the structure diagram.

本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

本申请实施例装置中的模块可以根据实际需要进行合并、划分和删减。The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims (17)

1. The data processing method based on the network card is characterized in that the method is applied to the network card, and the network card comprises a logic circuit component and a system-on-chip component; the method comprises the following steps:
The method comprises the steps that an initial block storage message transmitted by a block storage component in first equipment is obtained through a logic circuit component, the initial block storage message is divided into N unit storage messages with target storage lengths based on unit storage lengths of a node storage component of second equipment, redundancy check values of each unit storage message are generated, N access block storage messages are generated according to the N unit storage messages and the N redundancy check values, and the N access block storage messages are transmitted to a system-on-chip component; n is a positive integer; an access block storage message comprises a unit storage message and a corresponding redundancy check value; the target storage length is smaller than the unit storage length;
In the system-on-chip component, converting a message format of a unit storage message in the N access block storage messages through a remote direct access protocol to obtain N unit network messages, and generating N transmission network messages according to the N unit network messages and the N redundancy check values; a transport network message comprising a unit network message and an associated redundancy check value; the storage length of the N unit network messages is equal to the target storage length; the storage length of the N transmission network messages is smaller than or equal to the unit storage length;
And sending the N transmission network messages to the second equipment so that the second equipment checks each transmission network message through the node storage component, and writing the N transmission network messages into the node storage component when all the N transmission network messages pass the check.
2. The method as recited in claim 1, further comprising:
Acquiring unit storage length of a node storage component of the second equipment, determining storage length of message header information associated with a remote direct access protocol, and acquiring preset storage length aiming at a redundancy check value;
and determining a target storage length based on the unit storage length, the storage length of the message header information and the preset storage length.
3. The method of claim 1, wherein generating the redundancy check value for each unit storage message comprises:
Performing post-bit filling processing on the unit storage message based on the bit length P of the service operation value to obtain a bit filling storage message, and performing exclusive OR division operation on the bit filling storage message based on the service operation value to obtain a service redundancy value; p is a positive integer; the service operation value is determined based on a preset storage length for the redundancy check value;
If the bit growth of the service redundancy value meets the pre-bit-supplementing condition, performing pre-bit-supplementing processing on the service redundancy value, and determining the service redundancy value after the pre-bit-supplementing processing as the redundancy check value;
And if the bit length of the service redundancy value does not meet the pre-bit supplementing condition, determining the service redundancy value as the redundancy check value.
4. The method of claim 3, wherein the bit-fill memory message comprises M unit bit values, M being a positive integer; the exclusive or division operation is performed on the bit-filling storage message based on the service operation value to obtain a service redundancy value, which comprises the following steps:
Based on the bit length P of the service operation value, determining continuous P unit bit values taking a target bit as a starting position in M unit bit values of the bit-supplementing storage message as unit operation data, and performing exclusive OR operation on the unit operation data based on the service operation value to obtain a unit redundancy value; the target bit refers to the highest bit in the bit with the unit bit value of 1 in the bit-filling storage message;
Determining the unit bit values except the P unit bit values in the M unit bit values as Q bit values to be complemented, performing post-complementation processing on the unit redundancy values based on the bit length P of a service operation value and the Q bit values to be complemented to obtain new unit operation data with the same bit length as the service operation value, and continuously performing exclusive OR operation on the new unit operation data based on the service operation value to obtain a new unit redundancy value until the Q bit values to be complemented are all used for finishing the post-complementation processing, and determining the finally obtained unit redundancy value as a service redundancy value; q is the difference between M and P.
5. The method of claim 1, wherein in the system-on-chip component, performing message format conversion on unit storage messages in the N access block storage messages by using a remote direct access protocol to obtain N unit network messages, and generating N transport network messages according to the N unit network messages and the N redundancy check values includes:
Obtaining unit storage messages in the N access block storage messages through the system-on-chip component, converting the message format of the N unit storage messages through a remote direct access protocol to obtain N unit network messages, and generating message header information corresponding to each unit network message respectively;
Respectively encapsulating the N unit network messages, the message header information corresponding to the N unit network messages and the N redundancy check values into N transmission network messages; a transport network message is encapsulated by a unit network message, corresponding header information and associated redundancy check values.
6. The method of claim 1, wherein the system on chip component comprises a protocol stack component; the sending the N transport network packets to the second device includes:
transmitting N transmission network messages to the protocol stack assembly;
In the protocol stack assembly, obtaining a unit network message in each transmission network message and a redundancy check value associated with the unit network message;
generating N target check values based on N unit network messages, and if the target check value corresponding to each unit network message is the same as the associated redundancy check value, transmitting the N transmission network messages to the second equipment through the protocol stack assembly.
7. The method as recited in claim 1, further comprising:
acquiring N transmission network messages sent by the second equipment through the node storage component through the system-on-chip component, checking each transmission network message, and sending the N transmission network messages to the logic circuit component when all the N transmission network messages pass the check;
In the logic circuit assembly, converting a message format of a unit network message in the N transmission network messages through a remote direct access protocol to obtain N unit storage messages, and recombining the N unit storage messages into the initial block storage message based on message header information respectively associated with the N unit storage messages;
and transmitting the initial block storage message to the first device.
8. The data processing method based on the network card is characterized in that the method is applied to the network card, and the network card comprises a logic circuit component and a system-on-chip component; the method comprises the following steps:
acquiring N transmission network messages sent by a second device through a node storage component through the system-on-chip component, checking redundancy check values in each transmission network message, and sending the N transmission network messages to the logic circuit component when all the N transmission network messages pass the check; the storage length of the N transmission network messages is smaller than or equal to the unit storage length of the node storage component; a transmission network message comprises a unit network message and a corresponding redundancy check value;
In the logic circuit assembly, converting a message format of a unit network message in the N transmission network messages through a remote direct access protocol to obtain N unit storage messages, and recombining the N unit storage messages into an initial block storage message based on message header information respectively associated with the N unit storage messages; the storage length of the N unit network messages and the storage length of the N unit storage messages are equal to a target storage length, and the target storage length is smaller than the unit storage length;
and transmitting the initial block storage message to the first device.
9. The data processing method based on the network card is characterized in that the method is applied to second equipment, and the second equipment performs data interaction with first equipment through the network card; the method comprises the following steps:
Acquiring N transmission network messages sent by the first equipment through the network card; n is a positive integer, and the storage lengths of the N transmission network messages are smaller than or equal to the unit storage length of the node storage component in the second equipment; a transport network message comprising a unit network message and an associated redundancy check value; the N unit network messages are obtained by converting the message format of unit storage messages in N access block storage messages through a remote direct access protocol by the network card, wherein one access block storage message comprises one unit storage message and a redundancy check value generated for the unit storage message; the N unit storage messages are obtained by dividing the initial block storage messages based on the unit storage length; the storage length of the N unit network messages and the storage length of the N unit storage messages are equal to a target storage length, and the target storage length is smaller than the unit storage length;
and acquiring unit network messages in each transmission network message and redundancy check values associated with the unit network messages, generating N target check values based on the N unit network messages, and if the target check values corresponding to each unit network message are the same as the associated redundancy check values, respectively storing each transmission network message into the node storage component.
10. The method of claim 9, wherein storing each transport network message to the node storage component comprises:
And acquiring message header information in N transmission network messages, determining storage addresses respectively corresponding to the N transmission network messages based on the dividing and sorting values in the N message header information, and storing each transmission network message to a storage unit corresponding to the associated storage address in the node storage component based on the N storage addresses.
11. The method as recited in claim 9, further comprising:
When a storage service reading request sent by the first device is obtained, obtaining N stored transmission network messages from the node storage component, checking each transmission network message, and when all the N transmission network messages pass the check, sending the N transmission network messages to the network card so that the network card obtains the N unit storage messages through the N transmission network messages, and generating the initial block storage message based on the N unit storage messages; the initial block storage message is used for being transmitted to the first device.
12. A network card, comprising:
The logic circuit component is used for acquiring an initial block storage message transmitted by the block storage component in the first equipment, dividing the initial block storage message into N unit storage messages with target storage lengths based on the unit storage length of the node storage component of the second equipment, generating a redundancy check value of each unit storage message, generating N access block storage messages according to the N unit storage messages and the N redundancy check values, and transmitting the N access block storage messages to the system-on-chip component; n is a positive integer; an access block storage message comprises a unit storage message and a corresponding redundancy check value; the target storage length is smaller than the unit storage length;
The system-on-chip component is configured to perform message format conversion on unit storage messages in the N access block storage messages through a remote direct access protocol to obtain N unit network messages, and generate N transport network messages according to the N unit network messages and the N redundancy check values; a transport network message comprising a unit network message and an associated redundancy check value; the storage length of the N unit network messages is equal to the target storage length; the storage length of the N transmission network messages is smaller than or equal to the unit storage length;
the system-on-chip component is further configured to send the N transport network messages to the second device, so that the second device checks each transport network message through the node storage component, and when all of the N transport network messages pass the check, writes the N transport network messages into the node storage component.
13. A network card, comprising:
The system-on-chip component is used for acquiring N transmission network messages sent by the second equipment through the node storage component, checking the redundancy check value in each transmission network message, and sending the N transmission network messages to the logic circuit component when all the N transmission network messages pass the check; the storage length of the N transmission network messages is smaller than or equal to the unit storage length of the node storage component; a transmission network message comprises a unit network message and a corresponding redundancy check value;
The logic circuit component is configured to perform message format conversion on unit network messages in the N transport network messages through a remote direct access protocol to obtain N unit storage messages, and recombine the N unit storage messages into the initial block storage message based on header information respectively associated with the N unit storage messages; the storage length of the N unit network messages and the storage length of the N unit storage messages are equal to a target storage length, and the target storage length is smaller than the unit storage length;
the logic circuit component is further configured to transmit the initial block storage packet to the first device.
14. A data processing apparatus, the data processing apparatus being applied to a second device, the data processing apparatus comprising:
The message acquisition module is used for acquiring N transmission network messages sent by the first equipment through the network card; n is a positive integer, and the storage lengths of the N transmission network messages are smaller than or equal to the unit storage length of the node storage component in the second equipment; a transport network message comprising a unit network message and an associated redundancy check value; the N unit network messages are obtained by converting the message format of unit storage messages in N access block storage messages through a remote direct access protocol by the network card, wherein one access block storage message comprises one unit storage message and a redundancy check value generated for the unit storage message; the N unit storage messages are obtained by dividing the initial block storage messages based on the unit storage length; the storage length of the N unit network messages and the storage length of the N unit storage messages are equal to a target storage length, and the target storage length is smaller than the unit storage length;
and the message check module is used for acquiring the unit network messages in each transmission network message and the redundancy check values associated with the unit network messages, generating N target check values based on the N unit network messages, and respectively storing each transmission network message into the node storage component if the target check value corresponding to each unit network message is the same as the associated redundancy check value.
15. A computer device, comprising: a processor, a memory, and a network interface;
The processor is connected to the memory and the network interface, wherein the network interface is configured to provide a data communication function, the memory is configured to store a computer program, and the processor is configured to invoke the computer program to cause the computer device to perform the method of any of claims 9-11.
16. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any of claims 9-11.
17. A computer program product, characterized in that the computer program product comprises a computer program stored in a computer readable storage medium and adapted to be read and executed by a processor to cause a computer device with the processor to perform the method of any of claims 9-11.
CN202411097861.6A 2024-08-12 2024-08-12 Data processing method, device and equipment based on network card and readable storage medium Active CN118642883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411097861.6A CN118642883B (en) 2024-08-12 2024-08-12 Data processing method, device and equipment based on network card and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411097861.6A CN118642883B (en) 2024-08-12 2024-08-12 Data processing method, device and equipment based on network card and readable storage medium

Publications (2)

Publication Number Publication Date
CN118642883A true CN118642883A (en) 2024-09-13
CN118642883B CN118642883B (en) 2024-11-05

Family

ID=92669851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411097861.6A Active CN118642883B (en) 2024-08-12 2024-08-12 Data processing method, device and equipment based on network card and readable storage medium

Country Status (1)

Country Link
CN (1) CN118642883B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040123013A1 (en) * 2002-12-19 2004-06-24 Clayton Shawn Adam Direct memory access controller system
US20200233881A1 (en) * 2019-01-22 2020-07-23 EMC IP Holding Company LLC Storage system with data consistency checking in synchronous replication using active snapshot set
CN113746744A (en) * 2020-05-30 2021-12-03 华为技术有限公司 Method, device, equipment, system and storage medium for controlling network congestion
CN115529106A (en) * 2021-06-25 2022-12-27 华为技术有限公司 A communication method and related equipment
CN116954523A (en) * 2023-09-20 2023-10-27 苏州元脑智能科技有限公司 A storage system, data storage method, data reading method and storage medium
CN117579555A (en) * 2023-10-13 2024-02-20 超聚变数字技术有限公司 Data transmission method, computing device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040123013A1 (en) * 2002-12-19 2004-06-24 Clayton Shawn Adam Direct memory access controller system
US20200233881A1 (en) * 2019-01-22 2020-07-23 EMC IP Holding Company LLC Storage system with data consistency checking in synchronous replication using active snapshot set
CN113746744A (en) * 2020-05-30 2021-12-03 华为技术有限公司 Method, device, equipment, system and storage medium for controlling network congestion
CN115529106A (en) * 2021-06-25 2022-12-27 华为技术有限公司 A communication method and related equipment
CN116954523A (en) * 2023-09-20 2023-10-27 苏州元脑智能科技有限公司 A storage system, data storage method, data reading method and storage medium
CN117579555A (en) * 2023-10-13 2024-02-20 超聚变数字技术有限公司 Data transmission method, computing device and system

Also Published As

Publication number Publication date
CN118642883B (en) 2024-11-05

Similar Documents

Publication Publication Date Title
US10659254B2 (en) Access node integrated circuit for data centers which includes a networking unit, a plurality of host units, processing clusters, a data network fabric, and a control network fabric
US12212600B2 (en) Offload of decryption operations
CN113490927B (en) RDMA transport with hardware integration and out-of-order placement
US9934065B1 (en) Servicing I/O requests in an I/O adapter device
CN104579695B (en) A kind of data forwarding device and method
US11068412B2 (en) RDMA transport with hardware integration
US20210089492A1 (en) Rdma data sending and receiving methods, electronic device, and readable storage medium
US10936404B2 (en) Technologies for error detection in compressed data streams
CN111327603A (en) Data transmission method, device and system
CN104580011A (en) Data forwarding device and method
US20220321491A1 (en) Microservice data path and control path processing
US20070242697A1 (en) Method and apparatus for processing data at physical layer
US10049001B1 (en) Dynamic error correction configuration
CN118642883B (en) Data processing method, device and equipment based on network card and readable storage medium
CN115878140A (en) Application upgrading method and device, network card and equipment
CN110958216B (en) Secure online network packet transmission
US12093571B1 (en) Accelerating request/response protocols
CN117793038A (en) Message processing method, device, electronic equipment, computer-readable storage medium
CN119071310A (en) Cloud storage processing method, device, storage medium and system
US11568089B2 (en) Offloading operations from a primary processing device to a secondary processing device
US8868674B2 (en) Streaming and bulk data transfer transformation with context switching
US11863318B2 (en) Error correction for network packets
US11212349B1 (en) Switching between network protocols for a data storage system
US12197938B1 (en) Data migration with metadata
US20240111587A1 (en) Circuitry to perform partial decompression operations

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant