CN104184543B - A kind of methods, devices and systems of data transmission - Google Patents
A kind of methods, devices and systems of data transmission Download PDFInfo
- Publication number
- CN104184543B CN104184543B CN201310198792.3A CN201310198792A CN104184543B CN 104184543 B CN104184543 B CN 104184543B CN 201310198792 A CN201310198792 A CN 201310198792A CN 104184543 B CN104184543 B CN 104184543B
- Authority
- CN
- China
- Prior art keywords
- data
- ecc
- transmitted
- error
- data packet
- 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.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 102
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000012937 correction Methods 0.000 claims abstract description 128
- 238000001514 detection method Methods 0.000 claims abstract description 101
- 230000015654 memory Effects 0.000 claims description 14
- 238000005538 encapsulation Methods 0.000 claims description 13
- 238000013461 design Methods 0.000 claims description 3
- 238000013481 data capture Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 15
- 238000004891 communication Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 238000013524 data verification Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Detection And Prevention Of Errors In Transmission (AREA)
Abstract
本发明提供一种数据传输的方法、装置和系统,能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。具体方式为:获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。本发明用于数据传输。
The present invention provides a data transmission method, device and system, which can reduce the repetition of data detection in link transmission, reduce the link transmission overhead caused by retransmission, and improve the working efficiency of the system. The specific method is: obtain the data to be transmitted, the data to be transmitted includes the information of the sending target, and determine the sending target according to the information of the sending target; encapsulate the data packet header for the data to be transmitted, and calculate the error detection for the data packet header Error correction code, send data with data packet header; when receiving data, receive the encapsulated data, decapsulate the data containing error detection and error correction code, and detect the received data, when there is an error, according to the detection The parity bit of the error correction code performs error correction on the data, and if the error correction of the data cannot be completed by the error detection and error correction code, then request data retransmission according to the preset error tolerance setting. The invention is used for data transmission.
Description
技术领域technical field
本发明涉及计算机领域,尤其涉及一种数据传输的方法、装置和系统。The present invention relates to the field of computers, in particular to a data transmission method, device and system.
背景技术Background technique
通常在链路传输中,对所要传输的数据使用循环冗余码校验(CRC,CyclicRedundancy Check)方式进行保护。但由于CRC只有检错功能,而没有纠错功能,因此,在使用CRC的同时,还需要采取重传机制来保证所要传输数据的准确性。在服务器中,内存的数据传输会使用检错纠错码(ECC,Error Correction Code)来检测数据的准确性,并可以对错误进行一定的修复。Usually, in link transmission, a cyclic redundancy check (CRC, Cyclic Redundancy Check) method is used to protect the data to be transmitted. However, since the CRC only has an error detection function but not an error correction function, a retransmission mechanism is also required to ensure the accuracy of the data to be transmitted while using the CRC. In the server, the data transmission of the memory will use the error detection and correction code (ECC, Error Correction Code) to detect the accuracy of the data, and can repair the error to a certain extent.
现有链路传输技术中,待发送的数据从存储器到节点计算机的发送端口的过程中,使用ECC作为数据的保护措施;而从发送节点计算机到接收节点计算机的传输过程中,使用CRC的方式来检测数据传输的正确性。这样同时使用CRC和ECC的传输方式加大了数据检测的重复性,同时由于CRC保护的是整体的一个数据包,当检测到数据包中有错误时,只能通过重传数据包达到消除错误的目的,这样会使整个链路传输的开销增大,严重降低了系统的工作效率。In the existing link transmission technology, in the process of data to be sent from the memory to the sending port of the node computer, ECC is used as a data protection measure; while in the transmission process from the sending node computer to the receiving node computer, CRC is used To check the correctness of data transmission. In this way, the transmission method of using CRC and ECC at the same time increases the repeatability of data detection. At the same time, because CRC protects a whole data packet, when an error is detected in the data packet, the error can only be eliminated by retransmitting the data packet. This will increase the transmission overhead of the entire link and seriously reduce the working efficiency of the system.
发明内容Contents of the invention
本发明提供一种数据传输的方法、装置和系统,能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。The present invention provides a data transmission method, device and system, which can reduce the repetition of data detection in link transmission, reduce the link transmission overhead caused by retransmission, and improve the working efficiency of the system.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,提供一种数据传输方法,所述方法包括:In a first aspect, a data transmission method is provided, the method comprising:
获取待传输的数据,所述待传输的数据包含发送目标的信息;Obtaining data to be transmitted, where the data to be transmitted includes information about a sending target;
根据所述发送目标的信息,确定所述待传输的数据的发送目标;determining the sending destination of the data to be transmitted according to the information of the sending destination;
为所述待传输的数据封装数据包头,并为所述数据包头计算检错纠错码ECC,发送带有数据包头ECC的数据。Encapsulate a data packet header for the data to be transmitted, calculate an error detection and correction code (ECC) for the data packet header, and send the data with the data packet header ECC.
在第一种可能的实现方式中,结合第一方面,所述为所述待传输的数据封装数据包头,并为所述数据包头计算ECC,发送带有数据包头ECC的数据包括:In a first possible implementation manner, in combination with the first aspect, encapsulating a data packet header for the data to be transmitted, and calculating an ECC for the data packet header, and sending the data with the data packet header ECC includes:
当所述待传输的数据需要发送至远程计算机时,为所述待传输的数据封装数据包头,并计算所述数据包头ECC;When the data to be transmitted needs to be sent to a remote computer, encapsulate the data packet header for the data to be transmitted, and calculate the ECC of the data packet header;
发送包括所述数据包头ECC的数据。Send the data including the ECC of the data packet header.
第二方面,提供一种数据传输方法,所述方法包括;In a second aspect, a data transmission method is provided, the method comprising;
当转发节点接收到所述带有ECC的数据包头时,若转发的目的节点有能够存储所述数据包头的数据包时,则将所述数据包直接进行转发。When the forwarding node receives the data packet header with ECC, if the forwarding destination node has a data packet capable of storing the data packet header, it will directly forward the data packet.
第三方面,提供一种数据传输的方法,所述方法包括:In a third aspect, a method for data transmission is provided, the method comprising:
接收封装后包括检错纠错码ECC的数据,所述封装后的数据包括数据包头检错纠错码HECC;Receiving encapsulated data including error detection and correction code ECC, the encapsulated data includes packet header error detection and correction code HECC;
根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测;Decapsulating the data containing ECC according to the HECC, and detecting the received data according to the ECC;
若所述接收的数据存在错误,则根据所述ECC的校验位对所述数据进行纠错,若通过ECC不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。If there is an error in the received data, the data is corrected according to the parity bit of the ECC, and if the error correction of the data cannot be completed through the ECC, the data is requested through the preset error tolerance setting Retransmission.
在第一种可能的实现方式中,结合第二方面,所述根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测包括:In a first possible implementation manner, in combination with the second aspect, the decapsulating the data containing the ECC according to the HECC, and detecting the received data according to the ECC includes:
通过解封所述HECC,确定所述接收到的数据为发送端发送的数据;By decapsulating the HECC, it is determined that the received data is the data sent by the sending end;
解封所述接收的数据中的ECC,并根据所述ECC对所述将数据的正确性进行检测。Decapsulating the ECC in the received data, and checking the correctness of the received data according to the ECC.
在第二种可能的实现方式中,结合第二方面,所述若所述接收的数据存在错误,则通过ECC进行纠错包括:In a second possible implementation manner, in combination with the second aspect, if the received data has an error, performing error correction through ECC includes:
若通过检错运算得到所述接收的数据存在错误,则根据ECC的校验位,进行纠错运算。If it is found that the received data has errors through the error detection operation, an error correction operation is performed according to the check bit of the ECC.
在第三种可能的实现方式中,结合第二方面,所述若通过ECC不能完成纠正错误,则通过容错设计请求数据重传包括:In the third possible implementation manner, in combination with the second aspect, if the error cannot be corrected through ECC, requesting data retransmission through fault-tolerant design includes:
当通过所述ECC的校验位不能完成所述数据的纠错,则通过预设的容错设定,向发送端请求数据重传。When the error correction of the data cannot be completed through the check bit of the ECC, the sender is requested to retransmit the data through a preset error tolerance setting.
第四方面,提供一种数据传送的装置,基于发送节点计算机,所述装置包括:In a fourth aspect, a device for data transmission is provided, based on a sending node computer, the device includes:
数据获取单元,用于获取待传输的数据,所述待传输的数据包含发送目标的信息;a data acquisition unit, configured to acquire data to be transmitted, where the data to be transmitted includes the information of the sending target;
目标确定单元,用于根据所述发送目标的信息,确定所述待传输的数据的发送目标;a target determining unit, configured to determine a sending target of the data to be transmitted according to the information of the sending target;
数据发送单元,用于为所述待传输的数据封装数据包头,并为所述数据包头计算检错纠错码ECC,发送带有数据包头ECC的数据。The data sending unit is configured to encapsulate a data packet header for the data to be transmitted, calculate an error detection and correction code (ECC) for the data packet header, and send the data with the data packet header ECC.
在第一种可能的实现方式中,结合第三方面,所述数据发送单元包括:In a first possible implementation manner, with reference to the third aspect, the data sending unit includes:
包头封装单元,用于当所述待传输的数据需要发送至远程计算机时,为所述待传输的数据封装数据包头,并计算所述数据包头ECC;A packet header encapsulation unit, configured to encapsulate a data packet header for the data to be transmitted when the data to be transmitted needs to be sent to a remote computer, and calculate the ECC of the data packet header;
数据发送单元,用于发送包括所述数据包头ECC的数据。A data sending unit, configured to send data including the ECC of the data packet header.
第五方面,提供一种数据传输的装置,所述装置包括:In a fifth aspect, a device for data transmission is provided, the device comprising:
转发单元,用于当转发节点接收到所述带有ECC的数据包头时,若转发的目的节点有能够存储所述数据包头的数据包时,则将所述数据包直接进行转发。The forwarding unit is configured to, when the forwarding node receives the data packet header with ECC, if the forwarding destination node has a data packet capable of storing the data packet header, then directly forward the data packet.
第六方面,提供一种数据传输的装置,所述装置包括:In a sixth aspect, a device for data transmission is provided, the device comprising:
数据接收单元,用于接收封装后包括检错纠错码ECC的数据,所述封装后的数据包括数据包头检错纠错码HECC;The data receiving unit is used to receive the data including the error detection and correction code ECC after encapsulation, and the data after the encapsulation includes the data packet header error detection and error correction code HECC;
数据检测单元,用于根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测;a data detection unit, configured to decapsulate the data containing ECC according to the HECC, and detect the received data according to the ECC;
错误处理单元,若所述接收的数据存在错误,则根据所述ECC的校验位对所述数据进行纠错,若通过ECC不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。An error processing unit, if there is an error in the received data, then correct the data according to the parity bit of the ECC, if the error correction of the data cannot be completed through the ECC, then use the preset error tolerance setting Make sure to retransmit the requested data.
在第一种可能的实现方式中,结合第四方面,所述数据检测单元用于:In a first possible implementation manner, with reference to the fourth aspect, the data detection unit is configured to:
通过解封所述HECC,确定所述接收到的数据为发送端发送的数据;By decapsulating the HECC, it is determined that the received data is the data sent by the sending end;
解封所述接收的数据中的ECC,并根据所述ECC对所述将数据的正确性进行检测。Decapsulating the ECC in the received data, and checking the correctness of the received data according to the ECC.
在第二种可能的实现方式中,结合第四方面,所述错误处理单元用于:In a second possible implementation manner, in combination with the fourth aspect, the error handling unit is configured to:
若通过检错运算得到所述接收的数据存在错误,则根据ECC的校验位,进行纠错运算。If it is found that the received data has errors through the error detection operation, an error correction operation is performed according to the check bit of the ECC.
在第三种可能的实现方式中,结合第四方面,所述错误处理单元还用于:In a third possible implementation manner, in combination with the fourth aspect, the error handling unit is further configured to:
当通过所述ECC的校验位不能完成所述数据的纠错,则通过预设的容错设定,向发送端请求数据重传。When the error correction of the data cannot be completed through the check bit of the ECC, the sender is requested to retransmit the data through a preset error tolerance setting.
第七方面,提供一种数据传输的系统,所述系统包括;In a seventh aspect, a system for data transmission is provided, and the system includes;
如第一方面和第四方面所述的发送端;The sending end as described in the first aspect and the fourth aspect;
如第二方面和第五方面所述的转发单元;The forwarding unit as described in the second aspect and the fifth aspect;
如第三方面和第六方面所述的接收端。The receiving end as described in the third aspect and the sixth aspect.
本发明实施例提供一种数据传输的方法、装置和系统,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。Embodiments of the present invention provide a method, device, and system for data transmission. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and according to the information of the sending target, the sending target is determined; it is the data to be transmitted Encapsulate the data packet header, and calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and When there is an error, the data is corrected according to the parity bit of the error detection and error correction code. If the error correction of the data cannot be completed through the error detection and error correction code, then the preset Request data retransmission with fault-tolerant settings. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例提供的一种数据传输的方法的示意图;FIG. 1 is a schematic diagram of a data transmission method provided by an embodiment of the present invention;
图2为本发明实施例又提供的一种数据传输的方法的示意图;FIG. 2 is a schematic diagram of a data transmission method provided by an embodiment of the present invention;
图3为本发明实施例提供的一种数据传输的方法的示意图;FIG. 3 is a schematic diagram of a data transmission method provided by an embodiment of the present invention;
图4为本发明实施例提供的封装前后数据包格式的对比图;Fig. 4 is a comparison diagram of data packet formats before and after encapsulation provided by the embodiment of the present invention;
图5为本发明实施例提供的数据包格式修改前的PCI-E总线的通信数据包中的具体内容;Fig. 5 is the specific content in the communication packet of the PCI-E bus before the data packet format that the embodiment of the present invention provides;
图6为本发明实施例提供的数据包格式修改后的PCI-E总线的通信数据包中的具体内容;Fig. 6 is the specific content in the communication packet of the PCI-E bus after the data packet format that the embodiment of the present invention provides;
图7为本发明实施例提供一种数据传输的方法的示意图;FIG. 7 is a schematic diagram of a data transmission method provided by an embodiment of the present invention;
图8为本发明实施例提供一种数据传输的方法的示意图;FIG. 8 is a schematic diagram of a data transmission method provided by an embodiment of the present invention;
图9为本发明实施例提供一种数据传输的具体方法的示意图;FIG. 9 is a schematic diagram of a specific method for data transmission provided by an embodiment of the present invention;
图10为本发明另一实施例提供一种数据传输的装置的结构示意图;FIG. 10 is a schematic structural diagram of a device for data transmission according to another embodiment of the present invention;
图11为本发明另一实施例提供一种数据传输的装置的结构示意图;FIG. 11 is a schematic structural diagram of a data transmission device according to another embodiment of the present invention;
图12为本发明另一实施例提供一种数据传输的装置的结构示意图;FIG. 12 is a schematic structural diagram of a data transmission device according to another embodiment of the present invention;
图13为本发明另一实施例提供一种数据传输的装置的结构示意图;FIG. 13 is a schematic structural diagram of a data transmission device according to another embodiment of the present invention;
图14为本发明实施例提供一种数据传输的系统的示意图;FIG. 14 is a schematic diagram of a data transmission system provided by an embodiment of the present invention;
图15为本发明实施例提供一种数据传输的装置的结构示意图;FIG. 15 is a schematic structural diagram of a device for data transmission provided by an embodiment of the present invention;
图16为本发明实施例提供一种数据传输的装置的结构示意图;FIG. 16 is a schematic structural diagram of a device for data transmission provided by an embodiment of the present invention;
图17本发明实施例提供一种数据传输的装置的结构示意图。FIG. 17 is a schematic structural diagram of a device for data transmission provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明实施例提供一种数据传输的方法,如图1所示,该方法包括:An embodiment of the present invention provides a method for data transmission, as shown in Figure 1, the method includes:
101、获取待传输的数据,所述待传输的数据包含发送目标的信息。101. Acquire data to be transmitted, where the data to be transmitted includes information about a sending target.
102、根据所述发送目标的信息,确定所述待传输的数据的发送目标。102. Determine a sending destination of the data to be transmitted according to the information about the sending destination.
103、为所述待传输的数据封装数据包头,并为所述数据包头计算检错纠错码ECC,发送带有数据包头ECC的数据。103. Encapsulate a data packet header for the data to be transmitted, calculate an error detection and correction code (ECC) for the data packet header, and send data with the data packet header ECC.
与此相对应的,本发明实施例又提供一种数据传输的方法,如图2所示,该方法包括:Correspondingly, the embodiment of the present invention provides a data transmission method, as shown in FIG. 2, the method includes:
201、接收封装后包括检错纠错码ECC的数据,所述封装后的数据包括数据包头检错纠错码HECC。201. Receive encapsulated data including an error detection and correction code ECC, where the encapsulated data includes a data packet header error detection and correction code HECC.
202、根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测。202. Decapsulate the data containing the ECC according to the HECC, and detect the received data according to the ECC.
203、若所述接收的数据存在错误,则根据所述ECC的校验位对所述数据进行纠错,若通过ECC不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。203. If there is an error in the received data, perform error correction on the data according to the parity bit of the ECC, and if the error correction on the data cannot be completed through the ECC, perform error correction through the preset error tolerance setting Request data retransmission.
本发明实施例提供一种数据传输的方法,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。An embodiment of the present invention provides a data transmission method. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and determining the sending target according to the information of the sending target; encapsulating a data packet header for the data to be transmitted, And calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and detect the received data , when there is an error, the data is corrected according to the parity bit of the error detection and error correction code, if the error correction of the data cannot be completed through the error detection and error correction code, then the preset error tolerance setting Perform request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
为了使本领域技术人员能够更清楚地理解本发明实施例提供的技术方案,下面通过具体的实施例,对本发明实施例提供的一种数据传输的方法进行详细说明,该方法包括:In order to enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present invention, a method for data transmission provided by the embodiments of the present invention will be described in detail below through specific embodiments. The method includes:
301、获取待传输的数据,所述待传输的数据包含发送目标的信息。301. Acquire data to be transmitted, where the data to be transmitted includes information about a sending target.
302、根据所述发送目标的信息,确定所述待传输的数据的发送目标。302. Determine a sending destination of the data to be transmitted according to the information about the sending destination.
303、为所述待传输的数据封装数据包头,并为所述数据包头计算检错纠错码ECC,发送带有数据包头ECC的数据。303. Encapsulate a data packet header for the data to be transmitted, calculate an error detection and correction code (ECC) for the data packet header, and send data with the data packet header ECC.
其中,如图3所示,步骤303具体包括:Wherein, as shown in FIG. 3, step 303 specifically includes:
3031、当所述待传输的数据需要发送至远程计算机时,为所述待传输的数据封装数据包头,并计算所述数据包头ECC。3031. When the data to be transmitted needs to be sent to a remote computer, encapsulate a data packet header for the data to be transmitted, and calculate the ECC of the data packet header.
3032、发送包括所述数据包头ECC的数据。3032. Send the data including the ECC of the data packet header.
具体的,原始使用CRC时的数据包格式与封装HECC后的修改后的数据包的对比如图4所示,在图4中可以明确看出,相比原始使用CRC的数据包,修改后的数据包在使用ECC保护的数据前添加了HECC的部分,这样使得在接收时,可以首先通过HECC部分识别数据包的封装格式,保证对数据包中使用ECC保护部分的数据的正确读取。Specifically, the comparison between the original data packet format when using CRC and the modified data packet after encapsulating HECC is shown in Figure 4. It can be clearly seen in Figure 4 that compared with the original data packet using CRC, the modified The HECC part is added before the ECC-protected data in the data packet, so that when receiving, the encapsulation format of the data packet can be identified first through the HECC part to ensure correct reading of the data in the ECC-protected part of the data packet.
在图4中,序号部分的作用是检验数据包在点到点传输中是否存在丢包,若在传输过程中存在丢包现象,则激活点到点的数据重传;In Figure 4, the function of the serial number part is to check whether there is packet loss in the point-to-point transmission of the data packet, and if there is a packet loss phenomenon in the transmission process, the point-to-point data retransmission is activated;
示例性的,对数据包格式进行修改的过程如图5和图6所示。Exemplarily, the process of modifying the data packet format is shown in Fig. 5 and Fig. 6 .
在图5中,是没有进行数据包格式修改前的PCI-E总线的通信数据包中的具体内容。In FIG. 5 , it shows the specific content in the communication data packet of the PCI-E bus before the data packet format is modified.
相应的,在图6中,是添加了ECC保护字段后的PCI-E总线数据包,可以明显看出,在阴影区域中添加了包头保护的字段,当包头保护字段中的数值为11的时候,说明该数据包头要进行保护,具体的,在数据包中增加阴影部分的DW ECC字段。Correspondingly, in Figure 6, it is the PCI-E bus data packet after adding the ECC protection field. It can be clearly seen that the header protection field is added in the shaded area. When the value in the header protection field is 11 , indicating that the data packet header needs to be protected. Specifically, the DW ECC field in the shaded part is added to the data packet.
该步骤的具体实现方式为:The specific implementation of this step is:
若所述待传输的数据发送到远程节点计算机,则不对所述待传输的数据进行解封,直接将所述待传输的数据发送至发送端口;If the data to be transmitted is sent to the remote node computer, the data to be transmitted is not unpacked, and the data to be transmitted is directly sent to the sending port;
若所述待传输的数据发送至节点计算机本身的其他模块,则将所述待传输的数据进行解封后,发送至缓存中,以便将所述待传输的数据发送至所述其他模块。If the data to be transmitted is sent to other modules of the node computer itself, the data to be transmitted is decapsulated and then sent to the cache, so as to send the data to be transmitted to the other modules.
进一步的,若所述待传输的数据发送到远程节点计算机,则不对所述待传输的数据进行解封,直接将所述待传输的数据发送至发送端口包括:Further, if the data to be transmitted is sent to a remote node computer, directly sending the data to be transmitted to the sending port without decapsulating the data to be transmitted includes:
若所述待传输的数据时发送到远程节点计算机,则If the data to be transmitted is sent to the remote node computer, then
将所述待传输的数据发送至发送端口。Send the data to be transmitted to a sending port.
若所述待传输的数据发送至节点计算机本身的其他模块,则将所述待传输的数据进行解封后,发送至缓存中,以便将所述待传输的数据发送至所述其他模块包括:If the data to be transmitted is sent to other modules of the node computer itself, after the data to be transmitted is decapsulated, it is sent to the cache, so that sending the data to be transmitted to the other modules includes:
若所述待传输的数据是发送至节点计算机本身的其他模块,则If the data to be transmitted is sent to other modules of the node computer itself, then
解封所述待传输的数据中的ECC,并得到解封后的数据;Unpack the ECC in the data to be transmitted, and obtain the unpacked data;
将所述解封后的数据发送至所述节点计算机的缓存,进而发送至所述节点计算机本身的其他模块。The decapsulated data is sent to the cache of the node computer, and then sent to other modules of the node computer itself.
更进一步的,将所述待传输的数据进行封装,在计算ECC后,发送所述待传输的数据包括:Further, the data to be transmitted is encapsulated, and after calculating the ECC, sending the data to be transmitted includes:
为所述待传输的数据的包头计算ECC;calculating ECC for the packet header of the data to be transmitted;
将所述待传输的数据进行封装,并发送所述封装后的数据。Encapsulate the data to be transmitted, and send the encapsulated data.
本发明实施例提供一种数据传输的方法,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。An embodiment of the present invention provides a method for data transmission. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and determining the sending target according to the information of the sending target; encapsulating a data packet header for the data to be transmitted, And calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and detect the received data , when there is an error, the data is corrected according to the parity bit of the error detection and error correction code, if the error correction of the data cannot be completed through the error detection and error correction code, then the preset error tolerance setting Perform request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例提供一种数据传输的方法,该方法包括:An embodiment of the present invention provides a data transmission method, the method comprising:
401、接收封装后包括检错纠错码ECC的数据,所述封装后的数据包括数据包头检错纠错码HECC。401. Receive encapsulated data that includes an error detection and correction code ECC, where the encapsulated data includes a header error detection and correction code HECC.
402、根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测。402. Decapsulate the data containing the ECC according to the HECC, and detect the received data according to the ECC.
403、若所述接收的数据存在错误,则根据所述ECC的校验位对所述数据进行纠错,若通过ECC不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。403. If there is an error in the received data, perform error correction on the data according to the parity bit of the ECC, and if the error correction on the data cannot be completed through the ECC, perform error correction through the preset error tolerance setting Request data retransmission.
其中,如图7所示,步骤402包括:Wherein, as shown in FIG. 7, step 402 includes:
4021、通过解封所述HECC,确定所述接收到的数据为发送端发送的数据。4021. Determine that the received data is data sent by the sender by decapsulating the HECC.
4022、解封所述接收的数据中的ECC,并根据所述ECC对所述将数据的正确性进行检测。4022. Decapsulate the ECC in the received data, and check the correctness of the data according to the ECC.
如图8所示,步骤403包括:As shown in Figure 8, step 403 includes:
4031、若通过检错运算得到所述接收的数据存在错误,则根据ECC的校验位,进行纠错运算。4031. If it is found that the received data has an error through an error detection operation, perform an error correction operation according to the check bit of the ECC.
4032、当通过所述ECC的校验位不能完成所述数据的纠错,则通过预设的容错设定,向发送端请求数据重传。4032. When the error correction of the data cannot be completed through the check bit of the ECC, request data retransmission from the sender through a preset error tolerance setting.
示例性的,按照上述步骤,进行一次完整的数据传输的过程可以用以下实施例表示,具体步骤如图9所示:Exemplarily, according to the above steps, the process of performing a complete data transmission can be represented by the following embodiment, and the specific steps are shown in Figure 9:
501、接收本地计算机其他模块或远程计算机发送的数据请求,使内存控制器从ECC内存中读取含有ECC的数据,所述含有ECC的数据包含发送目标的信息。501. Receive a data request sent by another module of the local computer or a remote computer, so that the memory controller reads data containing ECC from the ECC memory, and the data containing ECC includes information of a sending target.
502、内存控制器根据所述发送目标的信息判断对所述含有ECC数据的处理方式。502. The memory controller judges a processing manner for the data containing ECC according to the information of the sending destination.
503、当所述发送目标为本地计算机的其他模块时,则将所述含有ECC的数据在内存控制器中将ECC解封,并将解封后的数据存储在共享缓存或系统内存中,以便相应的模块直接获取需要的数据。503. When the sending target is other modules of the local computer, unpack the ECC-containing data in the memory controller, and store the unpacked data in the shared cache or system memory, so that The corresponding modules directly obtain the required data.
504、当所述发送目标为其他远程计算机时,则将所述含有ECC的数据发送至发送端口,在发送端口中封装数据包头,并在发送端口中的ECC生成器中为数据包头添加ECC,最终,将封装有ECC数据包头的数据发送至相应的远程计算机。504. When the sending target is another remote computer, send the data containing ECC to the sending port, encapsulate the data packet header in the sending port, and add ECC to the data packet header in the ECC generator in the sending port, Finally, the data encapsulated with the ECC header is sent to the corresponding remote computer.
505、远程计算机的接收端口在接收到发送端发送的数据包后,在接收端口的ECC生成器中对含有数据包头ECC的数据进行解封。505. After receiving the data packet sent by the sending end, the receiving port of the remote computer decapsulates the data containing the ECC of the data packet header in the ECC generator of the receiving port.
506、根据解封后数据中的ECC进行数据校验,当发现存在错误时,则根据ECC中的数据进行纠错。506. Perform data verification according to the ECC in the unpacked data, and perform error correction according to the data in the ECC when an error is found.
507、当根据ECC中的数据无法进行纠错时,则向数据发送端发送数据重传请求,以便重新获得数据。507. When error correction cannot be performed according to the data in the ECC, send a data retransmission request to the data sending end, so as to retrieve the data.
本发明实施例提供一种数据传输的方法,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。An embodiment of the present invention provides a method for data transmission. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and determining the sending target according to the information of the sending target; encapsulating a data packet header for the data to be transmitted, And calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and detect the received data , when there is an error, the data is corrected according to the parity bit of the error detection and error correction code, if the error correction of the data cannot be completed through the error detection and error correction code, then the preset error tolerance setting Perform request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例提供一种数据传输的装置01,如图10所示,该装置01包括:An embodiment of the present invention provides a data transmission device 01, as shown in Figure 10, the device 01 includes:
数据获取单元011,用于获取待传输的数据,所述待传输的数据包含发送目标的信息。The data acquiring unit 011 is configured to acquire data to be transmitted, where the data to be transmitted includes the information of the sending target.
目标确定单元012,用于根据所述发送目标的信息,确定所述待传输的数据的发送目标。The target determining unit 012 is configured to determine the sending target of the data to be transmitted according to the information of the sending target.
数据发送单元013,用于为所述待传输的数据封装数据包头,并为所述数据包头计算检错纠错码ECC,发送带有数据包头ECC的数据。The data sending unit 013 is configured to encapsulate a data packet header for the data to be transmitted, calculate an error detection and correction code (ECC) for the data packet header, and send the data with the data packet header ECC.
其中,如图11所示,数据发送单元013包括:Wherein, as shown in Figure 11, the data sending unit 013 includes:
包头封装单元0131,用于当所述待传输的数据需要发送至远程计算机时,为所述待传输的数据封装数据包头,并计算所述数据包头ECC。A packet header encapsulation unit 0131, configured to encapsulate a data packet header for the data to be transmitted when the data to be transmitted needs to be sent to a remote computer, and calculate the ECC of the data packet header.
数据发送单元0132,用于发送包括所述数据包头ECC的数据。A data sending unit 0132, configured to send data including the ECC of the data packet header.
本发明实施例提供一种数据传输的装置,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。An embodiment of the present invention provides a device for data transmission. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and determining the sending target according to the information of the sending target; encapsulating a data packet header for the data to be transmitted, And calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and detect the received data , when there is an error, the data is corrected according to the parity bit of the error detection and error correction code, if the error correction of the data cannot be completed through the error detection and error correction code, then the preset error tolerance setting Perform request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例提供一种数据传输的装置02,如图12所示,所述装置02包括:An embodiment of the present invention provides a data transmission device 02, as shown in Figure 12, the device 02 includes:
转发单元021,用于当转发节点接收到所述带有ECC的数据包头时,若转发的目的节点有能够存储所述数据包头的数据包时,则将所述数据包直接进行转发。The forwarding unit 021 is configured to directly forward the data packet when the forwarding node receives the data packet header with ECC and if the forwarding destination node has a data packet capable of storing the data packet header.
本发明实施例提供一种数据传输的装置,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。An embodiment of the present invention provides a device for data transmission. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and determining the sending target according to the information of the sending target; encapsulating a data packet header for the data to be transmitted, And calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and detect the received data , when there is an error, the data is corrected according to the parity bit of the error detection and error correction code, if the error correction of the data cannot be completed through the error detection and error correction code, then the preset error tolerance setting Perform request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例提供一种数据传输的装置03,如图13所示,所述装置03包括:The embodiment of the present invention provides a data transmission device 03, as shown in Figure 13, the device 03 includes:
数据接收单元031,用于接收封装后包括检错纠错码ECC的数据,所述封装后的数据包括数据包头检错纠错码HECC。The data receiving unit 031 is configured to receive encapsulated data including an error detection and correction code ECC, and the encapsulated data includes an error detection and correction code HECC of a data packet header.
数据检测单元032,用于根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测。The data detection unit 032 is configured to decapsulate the data containing the ECC according to the HECC, and detect the received data according to the ECC.
错误处理单元033,若所述接收的数据存在错误,则根据所述ECC的校验位对所述数据进行纠错,若通过ECC不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。The error processing unit 033, if there is an error in the received data, then perform error correction on the data according to the parity bit of the ECC, if the error correction to the data cannot be completed through the ECC, then use the preset error tolerance Set to request data retransmission.
其中,所述数据检测单元032用于:Wherein, the data detection unit 032 is used for:
通过解封所述HECC,确定所述接收到的数据为发送端发送的数据;By decapsulating the HECC, it is determined that the received data is the data sent by the sending end;
解封所述接收的数据中的ECC,并根据所述ECC对所述将数据的正确性进行检测。Decapsulating the ECC in the received data, and checking the correctness of the received data according to the ECC.
进一步的,所述错误处理单元033用于:Further, the error handling unit 033 is used for:
若通过检错运算得到所述接收的数据存在错误,则根据ECC的校验位,进行纠错运算。If it is found that the received data has errors through the error detection operation, an error correction operation is performed according to the check bit of the ECC.
所述错误处理单元033还用于:The error handling unit 033 is also used for:
当通过所述ECC的校验位不能完成所述数据的纠错,则通过预设的容错设定,向发送端请求数据重传。When the error correction of the data cannot be completed through the check bit of the ECC, the sender is requested to retransmit the data through a preset error tolerance setting.
本发明实施例提供一种数据传输的装置,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。An embodiment of the present invention provides a device for data transmission. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and determining the sending target according to the information of the sending target; encapsulating a data packet header for the data to be transmitted, And calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and detect the received data , when there is an error, the data is corrected according to the parity bit of the error detection and error correction code, if the error correction of the data cannot be completed through the error detection and error correction code, then the preset error tolerance setting Perform request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例还提供一种数据传输的系统04,如图14所示,该系统包括:The embodiment of the present invention also provides a data transmission system 04, as shown in Figure 14, the system includes:
如实施例中装置01所述的发送端041。Such as the sending end 041 described in the device 01 in the embodiment.
如实施例中装置02所述的转发单元042。Forwarding unit 042 as described in device 02 in the embodiment.
如实施例中装置03所述的接收端043。The receiver 043 as described in the device 03 in the embodiment.
本发明实施例提供一种数据传输的系统,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。An embodiment of the present invention provides a system for data transmission. By acquiring the data to be transmitted, the data to be transmitted includes the information of the sending target, and determining the sending target according to the information of the sending target; encapsulating the data packet header for the data to be transmitted, And calculate the error detection and correction code for the data packet header, and send the data with the data packet header; when receiving the data, receive the encapsulated data, decapsulate the data containing the error detection and error correction code, and detect the received data , when there is an error, the data is corrected according to the parity bit of the error detection and error correction code, if the error correction of the data cannot be completed through the error detection and error correction code, then the preset error tolerance setting Perform request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例还提供一种数据传输的装置05,如图15所示,该装置05包括:总线051;以及连接到总线051的处理器052、存储器053、发射器054和接收器055,其中存储器053用于存储指令,该处理器052用于获取待传输的数据,所述待传输的数据包含发送目标的信息;该处理器052用于根据所述发送目标的信息,确定所述待传输的数据的发送目标;该处理器052用于为所述待传输的数据封装数据包头,并为所述数据包头计算检错纠错码ECC,发送带有数据包头ECC的数据。The embodiment of the present invention also provides a device 05 for data transmission. As shown in FIG. The memory 053 is used to store instructions, and the processor 052 is used to obtain data to be transmitted, and the data to be transmitted includes the information of the sending target; the processor 052 is used to determine the data to be transmitted according to the information of the sending target The sending target of the data; the processor 052 is used for encapsulating a data packet header for the data to be transmitted, and calculating an error detection and correction code (ECC) for the data packet header, and sending the data with the data packet header ECC.
在本发明实施例中,可选的,该处理器执行该指令用于为所述待传输的数据封装数据包头,并为所述数据包头计算ECC,发送带有数据包头ECC的数据包括:In the embodiment of the present invention, optionally, the processor executes the instruction to encapsulate a data packet header for the data to be transmitted, and calculate an ECC for the data packet header, and sending the data with the data packet header ECC includes:
当所述待传输的数据需要发送至远程计算机时,为所述待传输的数据封装数据包头,并计算所述数据包头ECC;When the data to be transmitted needs to be sent to a remote computer, encapsulate the data packet header for the data to be transmitted, and calculate the ECC of the data packet header;
发送包括所述数据包头ECC的数据。Send the data including the ECC of the data packet header.
因此,本发明实施例数据传输的装置,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。Therefore, the device for data transmission in the embodiment of the present invention obtains the data to be transmitted, the data to be transmitted includes the information of the sending target, and determines the sending target according to the information of the sending target; encapsulates the data packet header for the data to be transmitted, and calculating an error detection and correction code for the data packet header, and sending the data with the data packet header; when receiving the data, receiving the encapsulated data, unpacking the data containing the error detection and error correction code, and detecting the received data, When there is an error, the data is corrected according to the parity bit of the error detection and error correction code. If the error correction of the data cannot be completed through the error detection and error correction code, then the error correction is performed through the preset error tolerance setting. Request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例还提供一种数据传输的装置06,如图16所示,该装置06包括:总线061;以及连接到总线061的处理器062、存储器063、发射器064和接收器065,其中存储器063用于存储指令,该处理器062用于当转发节点接收到所述带有检错纠错码ECC的数据包头时,若转发的目的节点有能够存储所述数据包头的数据包时,则将所述数据包直接进行转发。The embodiment of the present invention also provides a device 06 for data transmission. As shown in FIG. The memory 063 is used for storing instructions, and the processor 062 is used for when the forwarding node receives the data packet header with the error detection and correction code ECC, if the forwarding destination node has a data packet capable of storing the data packet header, Then the data packet is directly forwarded.
因此,本发明实施例数据传输的装置,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。Therefore, the device for data transmission in the embodiment of the present invention obtains the data to be transmitted, the data to be transmitted includes the information of the sending target, and determines the sending target according to the information of the sending target; encapsulates the data packet header for the data to be transmitted, and calculating an error detection and correction code for the data packet header, and sending the data with the data packet header; when receiving the data, receiving the encapsulated data, unpacking the data containing the error detection and error correction code, and detecting the received data, When there is an error, the data is corrected according to the parity bit of the error detection and error correction code. If the error correction of the data cannot be completed through the error detection and error correction code, then the error correction is performed through the preset error tolerance setting. Request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
本发明实施例还提供一种数据传输的装置07,如图17所示,该装置07包括:总线071;以及连接到总线071的处理器072、存储器073、发射器074和接收器075,其中存储器073用于存储指令,该处理器072用于接收封装后包括检错纠错码ECC的数据,所述封装后的数据包括数据包头检错纠错码HECC;该处理器072用于根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测;该处理器072用于若所述接收的数据存在错误,则根据所述ECC的校验位对所述数据进行纠错,若通过ECC不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。The embodiment of the present invention also provides a device 07 for data transmission. As shown in FIG. The memory 073 is used to store instructions, and the processor 072 is used to receive the data including the error detection and correction code ECC after packaging, and the data after the packaging includes the data packet header error detection and correction code HECC; The HECC decapsulates the data containing the ECC, and detects the received data according to the ECC; the processor 072 is configured to check the ECC according to the check bit of the ECC if there is an error in the received data Error correction is performed on the data, and if the error correction of the data cannot be completed through ECC, data retransmission is requested through a preset error tolerance setting.
在本发明实施例中,可选的,该处理器执行该指令用于根据所述HECC解封所述含有ECC的数据,并根据所述ECC对所述接收的数据进行检测包括:In the embodiment of the present invention, optionally, the processor executes the instruction to decapsulate the data containing ECC according to the HECC, and detecting the received data according to the ECC includes:
通过解封所述HECC,确定所述接收到的数据为发送端发送的数据;By decapsulating the HECC, it is determined that the received data is the data sent by the sending end;
解封所述接收的数据中的ECC,并根据所述ECC对所述将数据的正确性进行检测。Decapsulating the ECC in the received data, and checking the correctness of the received data according to the ECC.
在本发明实施例中,可选的,该处理器执行该指令用于所述若所述接收的数据存在错误,则通过ECC进行纠错包括:In the embodiment of the present invention, optionally, the processor executing the instruction is used to perform error correction through ECC if the received data has an error:
若通过检错运算得到所述接收的数据存在错误,则根据ECC的校验位,进行纠错运算。If it is found that the received data has errors through the error detection operation, an error correction operation is performed according to the check bit of the ECC.
在本发明实施例中,可选的,该处理器执行该指令用于若通过ECC不能完成纠正错误,则通过容错设计请求数据重传包括:In the embodiment of the present invention, optionally, the processor executes the instruction to request data retransmission through fault-tolerant design if the error cannot be corrected through ECC, including:
当通过所述ECC的校验位不能完成所述数据的纠错,则通过预设的容错设定,向发送端请求数据重传。When the error correction of the data cannot be completed through the check bit of the ECC, the sender is requested to retransmit the data through a preset error tolerance setting.
因此,本发明实施例数据传输的装置,通过获取待传输的数据,所述待传输的数据包含发送目标的信息,根据发送目标的信息,确定发送目标;为待传输的数据封装数据包头,并为所述数据包头计算检错纠错码,发送带有数据包头的数据;在接收数据时,接收封装后的数据,解封含有检错纠错码的数据,并对接收的数据进行检测,当存在错误时,则根据检错纠错码的校验位对所述数据进行纠错,若通过检错纠错码不能完成对所述数据的纠错,则通过预设的容错设定进行请求数据重传。能够减小链路传输中数据检测的重复性,降低了由于重传导致的链路传输开销,提高了系统的工作效率。Therefore, the device for data transmission in the embodiment of the present invention obtains the data to be transmitted, the data to be transmitted includes the information of the sending target, and determines the sending target according to the information of the sending target; encapsulates the data packet header for the data to be transmitted, and calculating an error detection and correction code for the data packet header, and sending the data with the data packet header; when receiving the data, receiving the encapsulated data, unpacking the data containing the error detection and error correction code, and detecting the received data, When there is an error, the data is corrected according to the parity bit of the error detection and error correction code. If the error correction of the data cannot be completed through the error detection and error correction code, then the error correction is performed through the preset error tolerance setting. Request data retransmission. The repeatability of data detection in link transmission can be reduced, the link transmission overhead caused by retransmission can be reduced, and the working efficiency of the system can be improved.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), magnetic disk or optical disk, etc., which can store program codes. medium.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310198792.3A CN104184543B (en) | 2013-05-24 | 2013-05-24 | A kind of methods, devices and systems of data transmission |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310198792.3A CN104184543B (en) | 2013-05-24 | 2013-05-24 | A kind of methods, devices and systems of data transmission |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104184543A CN104184543A (en) | 2014-12-03 |
CN104184543B true CN104184543B (en) | 2018-10-30 |
Family
ID=51965316
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310198792.3A Active CN104184543B (en) | 2013-05-24 | 2013-05-24 | A kind of methods, devices and systems of data transmission |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104184543B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106372026B (en) * | 2015-07-22 | 2020-01-31 | 深圳市中兴微电子技术有限公司 | A link detection method and receiving device |
CN110121850B (en) * | 2017-12-05 | 2022-05-31 | 深圳市汇顶科技股份有限公司 | Data transmission method, transmitting terminal equipment and receiving terminal equipment |
CN110515646B (en) * | 2019-07-26 | 2022-03-25 | 华为技术有限公司 | Differential upgrading method and related equipment |
CN111427832B (en) * | 2020-04-17 | 2023-04-25 | 展讯通信(上海)有限公司 | Data transmission method and communication device of serial bus |
CN111541518A (en) * | 2020-04-17 | 2020-08-14 | 展讯通信(上海)有限公司 | Data transmission method and communication device of serial bus |
CN113918487B (en) * | 2021-10-22 | 2024-11-19 | 北京灵汐科技有限公司 | Data packet processing method and data packet processing device |
CN115567167B (en) * | 2022-12-06 | 2023-03-31 | 芯动微电子科技(珠海)有限公司 | Bus transmission data error correction method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01223844A (en) * | 1988-03-03 | 1989-09-06 | Ricoh Co Ltd | Data transmission system |
CN1813412A (en) * | 2003-02-19 | 2006-08-02 | 哈里公司 | Mobile ad-hoc network (manet) including forward error correction (fec), interleaving, and multi-route communication features and related methods |
CN101312387A (en) * | 2007-05-24 | 2008-11-26 | 富士施乐株式会社 | Data transmission apparatus, data transmission device, data reception device and data transmission system |
CN101675706A (en) * | 2007-12-12 | 2010-03-17 | 松下电器产业株式会社 | Data transceiving system, terminal, relay device, and data transmitting method |
CN103036646A (en) * | 2012-12-05 | 2013-04-10 | 清华大学 | ECC (error correction code) decoding controlling method used for data communication |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7774684B2 (en) * | 2006-06-30 | 2010-08-10 | Intel Corporation | Reliability, availability, and serviceability in a memory device |
TWI357733B (en) * | 2008-03-25 | 2012-02-01 | Ralink Technology Corp | Method for error-correcting code selection for mim |
-
2013
- 2013-05-24 CN CN201310198792.3A patent/CN104184543B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01223844A (en) * | 1988-03-03 | 1989-09-06 | Ricoh Co Ltd | Data transmission system |
CN1813412A (en) * | 2003-02-19 | 2006-08-02 | 哈里公司 | Mobile ad-hoc network (manet) including forward error correction (fec), interleaving, and multi-route communication features and related methods |
CN101312387A (en) * | 2007-05-24 | 2008-11-26 | 富士施乐株式会社 | Data transmission apparatus, data transmission device, data reception device and data transmission system |
CN101675706A (en) * | 2007-12-12 | 2010-03-17 | 松下电器产业株式会社 | Data transceiving system, terminal, relay device, and data transmitting method |
CN103036646A (en) * | 2012-12-05 | 2013-04-10 | 清华大学 | ECC (error correction code) decoding controlling method used for data communication |
Also Published As
Publication number | Publication date |
---|---|
CN104184543A (en) | 2014-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104184543B (en) | A kind of methods, devices and systems of data transmission | |
KR102173089B1 (en) | Interface circuit and packet transmission method thereof | |
JP4985565B2 (en) | Transmission / reception circuit, reception circuit, and control method for transmission / reception circuit | |
US10346344B2 (en) | Method, client device and data forwarding device for transmitting data through serial port | |
US8484396B2 (en) | Method and system for conditional interrupts | |
JP2007300619A (en) | Method, apparatus, and program for maintaining integrity of data in case of switching between different data protection method | |
US9191030B2 (en) | Memory controller, data storage device, and memory controlling method | |
CN104866454B (en) | Message prediction processing method and processing device is write towards plate level high-speed bus | |
TW201447902A (en) | Memory device having error correction logic | |
EP3065323B1 (en) | Transmission method and device based on management data input/output multi-source agreements | |
CN109450912B (en) | Data transmission method, device and equipment | |
WO2021134418A1 (en) | Data checking method and apparatus | |
CN105897689B (en) | Embedded system and method thereof | |
KR20110003726A (en) | CRM Management Method in the SATA Interface and Data Storage Device Implementing the Same | |
WO2015165202A1 (en) | Hamming code-based data access method and integrated random access memory | |
CN113179216A (en) | Remote configuration method of register, computer equipment and storage medium | |
CN104780123B (en) | A kind of network pack receiving and transmitting processing unit and its design method | |
US7526574B2 (en) | Method for communicating data transfer requests between data transfer protocols | |
CN117215995B (en) | Remote direct memory access method, distributed storage system and electronic equipment | |
CN112463067A (en) | Data protection method and equipment in NVMe-oF scene | |
CN109800202B (en) | PCIE (peripheral component interface express) -based data transmission system, method and device | |
CN113034873A (en) | Sensor communication method, device and system | |
CN104468128B (en) | Type of network interface extensively adapter system for Embedded Network Processor | |
CN218941111U (en) | A microcontroller, electronic device and vehicle | |
US12105658B2 (en) | Intra-chip and inter-chip data protection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |