








技术领域technical field
本申请涉及通信技术领域,尤其涉及一种数据传输控制方法以及相关设备。The present application relates to the field of communication technologies, and in particular, to a data transmission control method and related equipment.
背景技术Background technique
在通信系统中,在数据传输的过程中,当发送设备通过网络设备向接收设备发送数据帧时,网络设备需要对数据帧是否损坏进行校验。当校验不通过时,该数据帧将会被判定在传输的过程中已被损坏,最终已损坏的该数据帧被网络设备丢弃,并且传输控制协议(英文全称:transmission control protocol,英文缩写:TCP)判定为由于网络拥塞造成的丢包事件。In a communication system, in the process of data transmission, when a sending device sends a data frame to a receiving device through a network device, the network device needs to check whether the data frame is damaged. When the verification fails, the data frame will be judged to have been damaged during transmission, and the damaged data frame will be discarded by the network device, and the transmission control protocol (full name in English: transmission control protocol, English abbreviation: TCP) is determined as a packet loss event due to network congestion.
由于当数据帧被损坏时,网络设备直接将该被损坏的数据帧丢弃,此时发送设备无法获知是因为数据帧损坏发生了丢包事件,而默认是由于网络拥塞造成的丢包事件,因此导致网络设备对数据传输的处理比较刻板,不够灵活。Because when the data frame is damaged, the network device directly discards the damaged data frame. At this time, the sending device cannot know that the packet loss event occurred because of the damage to the data frame, and the default is the packet loss event caused by network congestion. Therefore, As a result, the processing of data transmission by network devices is relatively rigid and not flexible enough.
发明内容SUMMARY OF THE INVENTION
为了解决现有技术中对数据传输的处理采用默认方式而不够灵活的技术问题,本申请实施例提供了一种数据传输控制方法,校验设备在对接收到的数据帧进行第一校验不通过,且对数据帧的部分数据进行第二校验通过时,从该数据帧的部分数据中获取标识信息,以及向发送设备发送携带有该标识信息的丢包信息,以使得发送设备根据该丢包信息及时获知已发生丢包事件,并且根据该标识信息获知对应的数据包发生了丢包,从而对该标识信息对应的数据包进行重传,提高了对数据传输控制的灵活性。本申请实施例还提供了数据传输控制装置、发送设备、校验设备及计算机存储介质等相关设备。In order to solve the technical problem that the default method is used for data transmission processing in the prior art, which is not flexible enough, an embodiment of the present application provides a data transmission control method. Pass, and when the second check is passed on part of the data of the data frame, the identification information is obtained from the part of the data of the data frame, and the packet loss information carrying the identification information is sent to the sending device, so that the sending device is based on the identification information. The packet loss information is used to know that a packet loss event has occurred in time, and according to the identification information, it is known that the corresponding data packet has been lost, so that the data packet corresponding to the identification information is retransmitted, and the flexibility of data transmission control is improved. The embodiments of the present application also provide related devices such as a data transmission control device, a sending device, a verification device, and a computer storage medium.
本申请实施例第一方面提供了一种数据传输控制方法,可包括:校验设备接收发送设备发送的数据帧,该校验设备可以是网络设备,也可以是接收设备,即数据帧的损坏可以是在网络设备上发现的,也可以是在接收设备上发现的,例如,网络设备接收发送设备发送的数据帧,或者是接收设备接收网络设备转发发送设备发送的数据帧。然后,校验设备对接收到的数据帧进行第一校验,该第一校验可以是循环冗余校验(cyclic redundancycheck,CRC)或帧校验(frame check sequence,FCS)等。当第一校验不通过时,校验设备确定数据帧已被损坏。此时,校验设备对数据帧的部分数据进行第二校验,例如,该数据帧的部分数据可以包括IP包头或TCP包头等,即对数据帧的部分数据进行第二校验可以是对IP包头校验和进行校验,还可以对TCP包头进行校验等。当对数据帧的部分数据进行第二校验通过时,校验设备确定数据帧的该部分数据未被损坏。在第二校验通过时,校验设备从数据帧的该部分数据中获取标识信息,该标识信息可包括源地址和目的地址等,该标识信息可以用于指示与该标识信息对应的数据包发生了丢包。由于数据帧的部分数据未被损坏,此时从该部分数据获取到的标识信息是正确的。在得到正确的标识信息后,校验设备可以向发送设备发送丢包信息,该丢包信息包括该标识信息。以使得发送设备根据该丢包信息确定数据帧已丢失,并且根据该标识信息获知对应的数据包发生了丢包,从而对标识信息对应的数据包执行重传操作,提高了对数据传输控制的灵活性。A first aspect of an embodiment of the present application provides a data transmission control method, which may include: a verification device receives a data frame sent by a sending device, and the verification device may be a network device or a receiving device, that is, damage to the data frame It may be found on the network device or on the receiving device. For example, the network device receives the data frame sent by the sending device, or the receiving device receives the data frame sent by the network device and forwards the sending device. Then, the check device performs a first check on the received data frame, where the first check may be a cyclic redundancy check (cyclic redundancy check, CRC) or a frame check sequence (FCS), or the like. When the first check fails, the check device determines that the data frame has been damaged. At this time, the verification device performs a second verification on part of the data of the data frame. For example, part of the data in the data frame may include an IP packet header or a TCP packet header, that is, the second verification of part of the data in the data frame may be correct The IP packet header checksum can be verified, and the TCP packet header can also be verified. When the second check is passed on the partial data of the data frame, the checking device determines that the partial data of the data frame is not damaged. When the second verification is passed, the verification device obtains identification information from the part of the data in the data frame, the identification information may include source address and destination address, etc., and the identification information may be used to indicate the data packet corresponding to the identification information Packet loss occurred. Since part of the data of the data frame is not damaged, the identification information obtained from the part of the data is correct at this time. After obtaining correct identification information, the verification device may send packet loss information to the sending device, where the packet loss information includes the identification information. In order to make the sending device determine that the data frame has been lost according to the packet loss information, and know that the corresponding data packet has been lost according to the identification information, so as to perform a retransmission operation on the data packet corresponding to the identification information, which improves the control of data transmission. flexibility.
结合本申请实施例第一方面,在本申请实施例第一方面的第一种实施方式中,当数据帧不是由于网络拥塞造成的丢包事件时,该丢包信息可包括非拥塞丢包信息,即校验设备可以生成非拥塞丢包信息,该非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。例如,硬件故障、信号干扰等原因造成数据帧的损坏,以及在使用无线WIFI网络、非屏蔽双绞线或无线蜂窝网等链路质量相对较差的介质进行数据帧的传输时,也会造成数据帧损坏,这些造成数据帧损坏后将数据帧丢弃的情况均属于由非网络拥塞原因引起的丢包事件。此时,校验设备可以向发送设备发送非拥塞丢包信息,以使得发送设备根据该非拥塞丢包信息确定是由非网络拥塞原因引起的丢包事件,从而发送设备维持当前的拥塞控制机制,以及在拥塞控制机制下对标识信息对应的数据包执行重传操作,该数据包可以是TCP层的数据包,或者是UDP层的数据包。避免发送设备进行错误的乘性降速行为,相对于盲目通过缩小拥塞窗口来降低发送速率以减轻网络拥塞程度,提高了网络链路的利用率,以及提高了网络的吞吐量。With reference to the first aspect of the embodiment of the present application, in the first implementation of the first aspect of the embodiment of the present application, when the data frame is not a packet loss event caused by network congestion, the packet loss information may include non-congestion packet loss information , that is, the verification device can generate non-congested packet loss information, and the non-congested packet loss information is used to indicate packet loss events caused by non-network congestion reasons. For example, hardware failure, signal interference and other reasons cause damage to data frames, and when using media with relatively poor link quality such as wireless WIFI networks, unshielded twisted-pair cables, or wireless cellular networks to transmit data frames, it will also cause damage to data frames. The data frame is damaged, and the data frame is discarded after the data frame is damaged, which are all packet loss events caused by non-network congestion. At this time, the verification device can send the non-congested packet loss information to the sending device, so that the sending device can determine the packet loss event caused by non-network congestion according to the non-congested packet loss information, so that the sending device maintains the current congestion control mechanism , and perform a retransmission operation on the data packet corresponding to the identification information under the congestion control mechanism, and the data packet may be a data packet of the TCP layer or a data packet of the UDP layer. It avoids the wrong multiplicative deceleration behavior of the sending device. Compared with blindly reducing the sending rate by narrowing the congestion window to reduce the degree of network congestion, the utilization rate of the network link is improved, and the throughput of the network is improved.
结合本申请实施例第一方面或在本申请实施例第一方面的第一种实施方式,在本申请实施例第一方面的第二种实施方式中,为了确定数据帧对应的发送设备,校验设备获取到的标识信息可包括源IP地址,数据帧的部分数据包括IP包头,该源IP地址可以从IP包头中获取到。校验设备从IP包头中获取源IP地址后,可以根据该源IP地址向发送设备发送丢包信息。由于对数据帧的部分数据进行第二校验可以是对IP包头进行校验,因此,当对IP包头校验通过时,校验设备确定IP包头未被损坏,此时可从IP包头中获取正确的源IP地址,方便校验设备将丢包信息正确发送至对应的发送设备,提高了校验设备对丢包信息进行发送的准确性。In combination with the first aspect of the embodiment of the present application or the first implementation of the first aspect of the embodiment of the present application, in the second implementation of the first aspect of the embodiment of the present application, in order to determine the sending device corresponding to the data frame, the calibration The identification information obtained by the testing device may include a source IP address, and part of the data of the data frame includes an IP header, and the source IP address may be obtained from the IP header. After the verification device obtains the source IP address from the IP packet header, it can send packet loss information to the sending device according to the source IP address. Since the second verification of part of the data of the data frame may be to verify the IP packet header, therefore, when the verification of the IP packet header is passed, the verification device determines that the IP packet header is not damaged, and can be obtained from the IP packet header at this time. The correct source IP address is convenient for the verification device to correctly send the packet loss information to the corresponding sending device, which improves the accuracy of the packet loss information sent by the verification device.
结合本申请实施例第一方面的第二种实施方式,在本申请实施例第一方面的第三种实施方式中,为了确定数据帧对应的接收设备,校验设备获取到的标识信息可包括目的IP地址,该目的IP地址可以从IP包头中获取到。校验设备从IP包头中获取目的IP地址后,可以根据源IP地址向发送设备发送该目的IP地址。由于对数据帧的部分数据进行第二校验可以是对IP包头进行校验,因此,当对IP包头校验通过时,校验设备确定IP包头未被损坏,此时可从IP包头中获取正确的目的IP地址,提高了校验设备向发送设备发送目的IP地址的准确性。In combination with the second implementation of the first aspect of the embodiment of the present application, in the third implementation of the first aspect of the embodiment of the present application, in order to determine the receiving device corresponding to the data frame, the identification information obtained by the verification device may include: Destination IP address, which can be obtained from the IP header. After the verification device obtains the destination IP address from the IP packet header, it can send the destination IP address to the sending device according to the source IP address. Since the second verification of part of the data of the data frame may be to verify the IP packet header, therefore, when the verification of the IP packet header is passed, the verification device determines that the IP packet header is not damaged, and can be obtained from the IP packet header at this time. The correct destination IP address improves the accuracy of the destination IP address sent by the verification device to the sending device.
结合本申请实施例第一方面的第三种实施方式,在本申请实施例第一方面的第四种实施方式中,校验设备获取到的标识信息还包括序列号,数据帧的部分数据可包括IP包头或TCP包头,该序列号可以从TCP包头或IP包头中获取到。由于当同一数据流上可能存在多个数据帧时,该标识信息对应的多个数据包,因此为了让发送设备准确获知是哪个数据包出现了丢包事件,此时校验设备获取已被损坏的数据包对应的序列号,将该序列号发送给发送设备,以使得发送设备根据该序列号确定已损坏的数据包,对该数据包进行准确重传,避免将所有数据包都进行重传而浪费网络资源。In combination with the third implementation of the first aspect of the embodiment of the present application, in the fourth implementation of the first aspect of the embodiment of the present application, the identification information obtained by the verification device further includes a serial number, and part of the data of the data frame can be Including the IP header or the TCP header, the sequence number can be obtained from the TCP header or the IP header. Because when there may be multiple data frames on the same data stream, there are multiple data packets corresponding to the identification information, so in order for the sending device to know exactly which data packet has a packet loss event, the verification device obtains corrupted data at this time. The serial number corresponding to the data packet is sent to the sending device, so that the sending device can determine the damaged data packet according to the serial number, and accurately retransmit the data packet to avoid retransmission of all data packets. And waste network resources.
结合本申请实施例第一方面的第四种实施方式,在本申请实施例第一方面的第五种实施方式中,校验设备获取到的标识信息还包括端口信息,该端口信息可以包括源端口和目的端口等。当数据帧为校验设备接收到的发送设备发送给接收设备的至少两条数据流上的数据帧时,为了使得发送设备获知是哪条数据流上的数据帧已损坏,校验设备可以从TCP包头中获取端口信息,然后根据源IP地址向发送设备发送该端口信息。由于发送设备可能是向接收设备发送多条数据流,因此为了让发送设备准确获知是哪条数据流上的数据帧出现了损坏,此时校验设备获取端口信息发送给发送设备,以使得发送设备根据端口信息确定已损坏的数据帧所在的数据流。With reference to the fourth implementation manner of the first aspect of the embodiments of the present application, in the fifth implementation manner of the first aspect of the embodiments of the present application, the identification information obtained by the verification device further includes port information, and the port information may include source information. port and destination port, etc. When the data frame is a data frame on at least two data streams received by the verification device and sent by the transmitting device to the receiving device, in order for the transmitting device to know which data frame has been damaged, the verification device can The port information is obtained from the TCP packet header, and then the port information is sent to the sending device according to the source IP address. Since the sending device may send multiple data streams to the receiving device, in order for the sending device to know exactly which data stream has corrupted data frames, the verification device obtains the port information and sends it to the sending device, so that the sending device can send The device determines the data stream in which the corrupted data frame is located based on the port information.
结合本申请实施例第一方面、本申请实施例第一方面的第一种实施方式至第五种实施方式中任意一种,在本申请实施例第一方面的第六种实施方式中,校验设备对数据帧进行第一校验可以是在数据链路层对数据帧进行校验,例如,在数据链路层对数据帧进行CRC校验或FCS校验等,以循环冗余校验为例,校验设备可以根据数据帧的内容计算得到循环冗余校验码,并将循环冗余校验码与数据帧中尾部预置的校验码进行比较。当循环冗余校验码与该校验码不一致时,校验设备确定对数据帧的校验不通过。使得校验设备可以方便地对数据帧进行校验,提高了校验设备对数据帧进行校验的便捷性。In combination with the first aspect of the embodiments of the present application and any one of the first to fifth embodiments of the first aspect of the embodiments of the present application, in the sixth implementation of the first aspect of the embodiments of the present application, the The first check performed by the inspection device on the data frame may be to check the data frame at the data link layer, for example, perform CRC check or FCS check on the data frame at the data link layer to check the cyclic redundancy. For example, the verification device can calculate and obtain the cyclic redundancy check code according to the content of the data frame, and compare the cyclic redundancy check code with the check code preset at the end of the data frame. When the cyclic redundancy check code is inconsistent with the check code, the verification device determines that the verification of the data frame fails. The verification device can conveniently verify the data frame, and the convenience of verifying the data frame by the verification device is improved.
结合本申请实施例第一方面、本申请实施例第一方面的第一种实施方式至第六种实施方式中任意一种,在本申请实施例第一方面的第七种实施方式中,校验设备对数据帧中的部分数据进行第二校验可以是,在IP层对数据帧中的部分数据进行IP包头校验。例如,校验设备在IP层获取IP包头中的内容,根据IP包头中的内容计算得到校验和校验码。然后校验设备将校验和校验码与IP包头中预置的校验码进行比较,当该校验和校验码与该校验码一致时,校验设备确定IP包头校验和校验通过。使得校验设备可以方便地对数据帧的部分数据进行校验,提高了校验设备对数据帧的部分数据进行校验的便捷性。In combination with the first aspect of the embodiments of the present application and any one of the first to sixth embodiments of the first aspect of the embodiments of the present application, in the seventh implementation of the first aspect of the embodiments of the present application, the The second check performed by the inspection device on the partial data in the data frame may be to perform IP packet header checking on the partial data in the data frame at the IP layer. For example, the verification device obtains the content in the IP packet header at the IP layer, and calculates the checksum check code according to the content in the IP packet header. Then the verification device compares the checksum verification code with the verification code preset in the IP packet header, and when the checksum verification code is consistent with the verification code, the verification device determines the IP packet header checksum verification code Pass the test. The verification device can conveniently verify the partial data of the data frame, which improves the convenience of verifying the partial data of the data frame by the verification device.
结合本申请实施例第一方面、本申请实施例第一方面的第一种实施方式至第七种实施方式中任意一种,在本申请实施例第一方面的第八种实施方式中,当校验设备为网络设备或对应数据帧的接收设备时,校验设备向发送设备发送丢包信息之前,校验设备可以在预置的控制报文协议(英文全称:internet control message protocol,英文缩写:ICMP)的选项字段中扩展丢包类型选项,将丢包信息添加至该丢包类型选项。在校验设备向发送设备发送丢包信息时,校验设备向发送设备发送携带有丢包信息的ICMP。使得当校验设备为网络设备或接收设备时,均可便捷将丢包信息向发送设备反馈。With reference to the first aspect of the embodiments of the present application and any one of the first to seventh embodiments of the first aspect of the embodiments of the present application, in the eighth embodiment of the first aspect of the embodiments of the present application, when When the verification device is a network device or a receiving device corresponding to a data frame, before the verification device sends the packet loss information to the sending device, the verification device can use the preset control message protocol (full name in English: internet control message protocol, English abbreviation). : Expand the packet loss type option in the option field of ICMP), and add the packet loss information to the packet loss type option. When the verification device sends the packet loss information to the sending device, the verification device sends the ICMP carrying the packet loss information to the sending device. So that when the verification device is a network device or a receiving device, the packet loss information can be easily fed back to the sending device.
结合本申请实施例第一方面、本申请实施例第一方面的第一种实施方式至第七种实施方式中任意一种,在本申请实施例第一方面的第九种实施方式中,当校验设备为对应数据帧的接收设备时,在校验设备向发送设备发送丢包信息之前,校验设备可以在预置的应答报文协议(英文全称:acknowledgement,英文缩写:ACK)的选项字段中扩展丢包类型选项,将丢包信息添加至该丢包类型选项。在校验设备向发送设备发送丢包信息时,校验设备向发送设备发送携带有丢包信息的ACK。由于ACK是在TCP层生成的,而网络设备无法看到TCP层,因此只有校验设备为接收设备时,才能够生成携带有丢包信息ACK,提高了接收设备向发送设备反馈丢包信息的灵活性。In combination with the first aspect of the embodiments of the present application and any one of the first to seventh embodiments of the first aspect of the embodiments of the present application, in the ninth embodiment of the first aspect of the embodiments of the present application, when When the verification device is the receiving device of the corresponding data frame, before the verification device sends the packet loss information to the sending device, the verification device can use the preset response message protocol (full name: acknowledgement, English abbreviation: ACK) option Expand the packet loss type option in the field, and add the packet loss information to the packet loss type option. When the verification device sends the packet loss information to the sending device, the verification device sends an ACK carrying the packet loss information to the sending device. Since the ACK is generated at the TCP layer, and the network device cannot see the TCP layer, the ACK that carries the packet loss information can only be generated when the verification device is the receiving device, which improves the ability of the receiving device to feed back the packet loss information to the sending device. flexibility.
本申请实施例第二方面提供了一种数据传输控制方法,可包括:发送设备向校验设备发送数据帧,该校验设备可以是网络设备,也可以是接收设备。例如,发送设备向网络设备发送数据帧,或者是,发送设备通过网络设备向接收设备发送数据帧。发送设备侦测是否接收到校验设备发送的丢包信息,该丢包信息由校验设备对数据帧进行第一校验不通过,且对数据帧的部分数据进行第二校验通过时发送,该丢包信息包括校验设备从数据帧的部分数据中获取到的标识信息,该标识信息用于指示与其对应的数据包发生了丢包。若发送设备侦测接收到校验设备发送的丢包信息,则发送设备根据该丢包信息确定数据帧已丢失,并且根据该标识信息获知对应的数据包发生了丢包,从而对标识信息对应的数据包执行重传操作,提高了对数据传输控制的灵活性。A second aspect of the embodiments of the present application provides a data transmission control method, which may include: a sending device sends a data frame to a verification device, where the verification device may be a network device or a receiving device. For example, the sending device sends the data frame to the network device, or the sending device sends the data frame to the receiving device through the network device. The sending device detects whether it has received the packet loss information sent by the verification device. The packet loss information is sent when the verification device fails the first verification of the data frame and passes the second verification of part of the data frame. , the packet loss information includes identification information obtained by the verification device from the partial data of the data frame, and the identification information is used to indicate that the corresponding data packet is lost. If the sending device detects and receives the packet loss information sent by the verification device, the sending device determines that the data frame has been lost according to the packet loss information, and learns that the corresponding data packet is lost according to the identification information, so as to correspond to the identification information. The data packets are retransmitted, which improves the flexibility of data transmission control.
结合本申请实施例第二方面,在本申请实施例第二方面的第一种实施方式中,当数据帧不是由于网络拥塞造成的丢包事件时,该丢包信息可包括非拥塞丢包信息,发送设备对标识信息对应的数据包执行重传操作的过程中,发送设备首先判断丢包信息中是否包含非拥塞丢包信息,该非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。例如,硬件故障、信号干扰等原因造成数据帧的损坏,以及在使用无线WIFI网络、非屏蔽双绞线或无线蜂窝网等链路质量相对较差的介质进行数据帧的传输时,也会造成数据帧损坏,这些造成数据帧损坏后将数据帧丢弃的情况均属于由非网络拥塞原因引起的丢包事件。若丢包信息中包含非拥塞丢包信息,则发送设备根据该非拥塞丢包信息确定是由非网络拥塞原因引起的丢包事件,从而发送设备维持当前的拥塞控制机制,以及在拥塞控制机制下对标识信息对应的数据包执行重传操作。例如,若发送设备的拥塞控制机制处于慢启动阶段,则发送设备维持当前慢启动的拥塞控制机制对标识信息对应的数据包执行重传操作;若发送设备的拥塞控制机制处于快速重传阶段,则发送设备维持当前快速重传的拥塞控制机制对标识信息对应的数据包执行重传操作,等等。避免发送设备进行错误的乘性降速行为,相对于盲目通过缩小拥塞窗口来降低发送速率以减轻网络拥塞程度,提高了网络链路的利用率,以及提高了网络的吞吐量。With reference to the second aspect of the embodiment of the present application, in the first implementation manner of the second aspect of the embodiment of the present application, when the data frame is not a packet loss event caused by network congestion, the packet loss information may include non-congestion packet loss information , in the process that the sending device performs a retransmission operation on the data packet corresponding to the identification information, the sending device first determines whether the packet loss information contains non-congested packet loss information, and the non-congested packet loss information is used to indicate the cause of non-network congestion. packet loss event. For example, hardware failure, signal interference and other reasons cause damage to data frames, and when using media with relatively poor link quality such as wireless WIFI networks, unshielded twisted-pair cables, or wireless cellular networks to transmit data frames, it will also cause damage to data frames. The data frame is damaged, and the data frame is discarded after the data frame is damaged, which are all packet loss events caused by non-network congestion. If the packet loss information includes non-congested packet loss information, the sending device determines that the packet loss event is caused by non-network congestion according to the non-congested packet loss information, so that the sending device maintains the current congestion control mechanism, and in the congestion control mechanism Next, perform a retransmission operation on the data packet corresponding to the identification information. For example, if the congestion control mechanism of the sending device is in the slow-start stage, the sending device maintains the current slow-start congestion control mechanism to retransmit the data packets corresponding to the identification information; if the congestion control mechanism of the sending device is in the fast retransmission stage, Then, the sending device maintains the current fast retransmission congestion control mechanism to perform retransmission operations on the data packets corresponding to the identification information, and so on. It avoids the wrong multiplicative deceleration behavior of the sending device. Compared with blindly reducing the sending rate by narrowing the congestion window to reduce the degree of network congestion, the utilization rate of the network link is improved, and the throughput of the network is improved.
本申请实施例第三方面提供了一种数据传输控制装置,可包括:接收单元、第一校验单元、第二校验单元、第一获取单元及第一发送单元等,其中,接收单元用于,接收发送设备发送的数据帧。第一校验单元用于,对接收单元接收到的数据帧进行第一校验,该第一校验可以是CRC校验或FCS校验等,在第一校验单元确定校验不通过时,第二校验单元确定数据帧已损坏。此时,第二校验单元对数据帧的部分数据进行第二校验,例如,该数据帧的部分数据可以包括IP包头或TCP包头等,即对数据帧的部分数据进行第二校验可以是对IP包头校验和进行校验,还可以对TCP包头进行校验等。当对数据帧的部分数据进行第二校验通过时,第二校验单元确定数据帧的该部分数据未被损坏。在第二校验单元确定第二校验通过时,第一获取单元从数据帧的该部分数据中获取标识信息,该标识信息可包括源地址和目的地址等,该标识信息可以用于指示与该标识信息对应的数据包发生了丢包。由于数据帧的部分数据未被损坏,此时从该部分数据获取到的标识信息是正确的。在第一获取单元得到正确的标识信息后,第一发送单元可以向发送设备发送携带有标识信息的丢包信息,以使得发送设备根据该丢包信息确定数据帧已丢失,并且根据该标识信息获知对应的数据包发生了丢包,从而对标识信息对应的数据包执行重传操作,提高了对数据传输控制的灵活性。A third aspect of the embodiments of the present application provides a data transmission control device, which may include: a receiving unit, a first checking unit, a second checking unit, a first obtaining unit, a first sending unit, and the like, wherein the receiving unit uses to receive the data frame sent by the sending device. The first check unit is used to perform a first check on the data frame received by the receiving unit, and the first check may be a CRC check or an FCS check, etc. When the first check unit determines that the check fails , the second check unit determines that the data frame is damaged. At this time, the second verification unit performs a second verification on part of the data of the data frame. For example, part of the data in the data frame may include an IP packet header or a TCP packet header, that is, the second verification on part of the data in the data frame may It is to check the IP header checksum, and it can also check the TCP header. When the second check is passed on the partial data of the data frame, the second check unit determines that the partial data of the data frame is not damaged. When the second verification unit determines that the second verification is passed, the first acquisition unit acquires identification information from the part of the data in the data frame, where the identification information may include a source address and a destination address, and the identification information may be used to indicate the The data packet corresponding to the identification information is lost. Since part of the data of the data frame is not damaged, the identification information obtained from the part of the data is correct at this time. After the first obtaining unit obtains the correct identification information, the first sending unit may send the packet loss information carrying the identification information to the sending device, so that the sending device determines according to the packet loss information that the data frame has been lost, and according to the identification information It is known that the corresponding data packet is lost, so that the retransmission operation is performed on the data packet corresponding to the identification information, and the flexibility of data transmission control is improved.
结合本申请实施例第三方面,在本申请实施例第三方面的第一种实施方式中,当数据帧不是由于网络拥塞造成的丢包事件时,该丢包信息可包括非拥塞丢包信息,该非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。例如,硬件故障、信号干扰等原因造成数据帧的损坏,以及在使用无线WIFI网络、非屏蔽双绞线或无线蜂窝网等链路质量相对较差的介质进行数据帧的传输时,也会造成数据帧损坏,这些造成数据帧损坏后将数据帧丢弃的情况均属于由非网络拥塞原因引起的丢包事件。此时,第一发送单元可以向发送设备发送非拥塞丢包信息,以使得发送设备根据该非拥塞丢包信息确定是由非网络拥塞原因引起的丢包事件,从而发送设备维持当前的拥塞控制机制,以及在拥塞控制机制下对标识信息对应的数据包执行重传操作。避免发送设备进行错误的乘性降速行为,相对于盲目通过缩小拥塞窗口来降低发送速率以减轻网络拥塞程度,提高了网络链路的利用率,以及提高了网络的吞吐量。With reference to the third aspect of the embodiment of the present application, in the first implementation manner of the third aspect of the embodiment of the present application, when the data frame is not a packet loss event caused by network congestion, the packet loss information may include non-congestion packet loss information , the non-congestion packet loss information is used to indicate packet loss events caused by non-network congestion reasons. For example, hardware failure, signal interference and other reasons cause damage to data frames, and when using media with relatively poor link quality such as wireless WIFI networks, unshielded twisted-pair cables, or wireless cellular networks to transmit data frames, it will also cause damage to data frames. The data frame is damaged, and the data frame is discarded after the data frame is damaged, which are all packet loss events caused by non-network congestion. At this time, the first sending unit may send the non-congested packet loss information to the sending device, so that the sending device determines the packet loss event caused by non-network congestion according to the non-congested packet loss information, so that the sending device maintains the current congestion control mechanism, and perform a retransmission operation on the data packet corresponding to the identification information under the congestion control mechanism. It avoids the wrong multiplicative deceleration behavior of the sending device. Compared with blindly reducing the sending rate by narrowing the congestion window to reduce the degree of network congestion, the utilization rate of the network link is improved, and the throughput of the network is improved.
结合本申请实施例第三方面或在本申请实施例第三方面的第一种实施方式,在本申请实施例第三方面的第二种实施方式中,为了确定数据帧对应的发送设备,第一获取单元获取到的标识信息可包括源IP地址,数据帧的部分数据包括IP包头,该源IP地址可以由第一获取单元从IP包头中获取到。第一获取单元从IP包头中获取源IP地址后,第一发送单元可以根据第一获取单元获取到的该源IP地址向发送设备发送丢包信息。由于第二校验单元对数据帧的部分数据进行第二校验可以是对IP包头进行校验,因此,当对IP包头校验通过时,第二校验单元确定IP包头未被损坏,此时第一获取单元可从IP包头中获取正确的源IP地址,方便第一发送单元将丢包信息正确发送至对应的发送设备,提高了第一发送单元对丢包信息进行发送的准确性。In combination with the third aspect of the embodiment of the present application or the first implementation of the third aspect of the embodiment of the present application, in the second implementation of the third aspect of the embodiment of the present application, in order to determine the sending device corresponding to the data frame, the The identification information acquired by an acquisition unit may include a source IP address, part of the data of the data frame includes an IP header, and the source IP address may be acquired from the IP header by the first acquisition unit. After the first obtaining unit obtains the source IP address from the IP packet header, the first sending unit may send the packet loss information to the sending device according to the source IP address obtained by the first obtaining unit. Since the second verification unit performs the second verification on the partial data of the data frame, the IP packet header may be verified. Therefore, when the IP packet header verification is passed, the second verification unit determines that the IP packet header is not damaged. At the same time, the first obtaining unit can obtain the correct source IP address from the IP packet header, which facilitates the first sending unit to correctly send the packet loss information to the corresponding sending device, and improves the accuracy of sending the packet loss information by the first sending unit.
结合本申请实施例第三方面的第二种实施方式,在本申请实施例第三方面的第三种实施方式中,为了确定数据帧对应的接收设备,第一获取单元获取到的标识信息可包括目的IP地址,该目的IP地址可以由第一获取单元从IP包头中获取到。第一获取单元从IP包头中获取目的IP地址后,第一发送单元可以根据第一获取单元获取到的源IP地址向发送设备发送第一获取单元获取到的该目的IP地址。由于第二校验单元对数据帧的部分数据进行第二校验可以是对IP包头进行校验,因此,当对IP包头校验通过时,第二校验单元确定IP包头未被损坏,此时第一获取单元可从IP包头中获取正确的目的IP地址,提高了第一发送单元向发送设备发送第一获取单元获取到的目的IP地址的准确性。In combination with the second implementation of the third aspect of the embodiment of the present application, in the third implementation of the third aspect of the embodiment of the present application, in order to determine the receiving device corresponding to the data frame, the identification information acquired by the first acquisition unit may be: Including the destination IP address, the destination IP address can be acquired from the IP packet header by the first acquiring unit. After the first obtaining unit obtains the destination IP address from the IP packet header, the first sending unit may send the destination IP address obtained by the first obtaining unit to the sending device according to the source IP address obtained by the first obtaining unit. Since the second verification unit performs the second verification on the partial data of the data frame, the IP packet header may be verified. Therefore, when the IP packet header verification is passed, the second verification unit determines that the IP packet header is not damaged. In this case, the first obtaining unit can obtain the correct destination IP address from the IP packet header, which improves the accuracy of the first sending unit sending the destination IP address obtained by the first obtaining unit to the sending device.
结合本申请实施例第三方面的第三种实施方式,在本申请实施例第三方面的第四种实施方式中,第一获取单元获取到的标识信息还包括序列号,数据帧的部分数据可包括IP包头或TCP包头,该序列号可以由第一获取单元从TCP包头或IP包头中获取到。由于同一数据流上可能存在与该标识信息对应的多个数据包,因此为了让发送设备准确获知是哪个数据包出现了丢包事件,此时第一获取单元获取已被损坏的数据包对应的序列号,由第一发送单元根据第一获取单元获取到的源IP地址向发送设备发送该序列号,以使得发送设备根据该序列号确定已损坏的数据包,对该数据包进行准确重传,避免将所有数据包都进行重传而浪费网络资源。In combination with the third implementation of the third aspect of the embodiment of the present application, in the fourth implementation of the third aspect of the embodiment of the present application, the identification information acquired by the first acquisition unit further includes a serial number, part of the data of the data frame. It may include an IP packet header or a TCP packet header, and the sequence number may be acquired from the TCP packet header or the IP packet header by the first acquiring unit. Since there may be multiple data packets corresponding to the identification information on the same data stream, in order to let the sending device know exactly which data packet has the packet loss event, the first acquisition unit acquires the corresponding data packet of the damaged data packet. Serial number, the first sending unit sends the serial number to the sending device according to the source IP address obtained by the first obtaining unit, so that the sending device determines the damaged data packet according to the serial number, and accurately retransmits the data packet , to avoid wasting network resources by retransmitting all data packets.
结合本申请实施例第三方面的第四种实施方式,在本申请实施例第三方面的第五种实施方式中,第一获取单元获取到的标识信息还包括端口信息,该端口信息可以包括源端口和目的端口等。当数据帧为接收单元接收到的发送设备发送给接收设备的至少两条数据流上的数据帧时,为了使得发送设备获知是哪条数据流上的数据帧已损坏,第一获取单元可以从TCP包头中获取端口信息,然后由第一发送单元根据第一获取单元获取到的源IP地址向发送设备发送第一获取单元获取到的该端口信息。由于发送设备可能是向接收设备发送多条数据流,因此为了让发送设备准确获知是哪条数据流上的数据帧出现了损坏,此时第一获取单元获取端口信息后由第一发送单元发送给发送设备,以使得发送设备根据端口信息确定已损坏的数据帧所在的数据流。With reference to the fourth implementation manner of the third aspect of the embodiments of the present application, in the fifth implementation manner of the third aspect of the embodiments of the present application, the identification information acquired by the first acquiring unit further includes port information, and the port information may include source port and destination port, etc. When the data frame is a data frame on at least two data streams received by the receiving unit and sent by the sending device to the receiving device, in order for the sending device to know which data frame on which data stream is damaged, the first obtaining unit can obtain data from the data frame. The port information is obtained from the TCP packet header, and then the first sending unit sends the port information obtained by the first obtaining unit to the sending device according to the source IP address obtained by the first obtaining unit. Since the sending device may send multiple data streams to the receiving device, in order for the sending device to know exactly which data stream has damaged data frames, the first obtaining unit will send the port information after obtaining the port information. to the sending device, so that the sending device can determine the data stream where the damaged data frame is located according to the port information.
结合本申请实施例第三方面、本申请实施例第三方面的第一种实施方式至第五种实施方式中任意一种,在本申请实施例第三方面的第六种实施方式中,第一校验单元对数据帧进行第一校验可以是在数据链路层对数据帧进行校验,例如,在数据链路层对数据帧进行CRC校验或FCS校验等,以循环冗余校验为例,第一校验单元可以根据数据帧的内容计算得到循环冗余校验码,将循环冗余校验码与数据帧中尾部预置的校验码进行比较。当循环冗余校验码与该校验码不一致时,第一校验单元确定对数据帧的校验不通过。使得第一校验单元可以方便地对数据帧进行校验,提高了第一校验单元对数据帧进行校验的便捷性。With reference to the third aspect of the embodiments of the present application and any one of the first to fifth embodiments of the third aspect of the embodiments of the present application, in the sixth embodiment of the third aspect of the embodiments of the present application, the The first check performed by a check unit on the data frame may be to check the data frame at the data link layer, for example, perform CRC check or FCS check on the data frame at the data link layer, so as to avoid cyclic redundancy Taking the verification as an example, the first verification unit can calculate and obtain the cyclic redundancy check code according to the content of the data frame, and compare the cyclic redundancy check code with the check code preset at the end of the data frame. When the cyclic redundancy check code is inconsistent with the check code, the first check unit determines that the check on the data frame fails. The first check unit can conveniently check the data frame, which improves the convenience for the first check unit to check the data frame.
结合本申请实施例第三方面、本申请实施例第三方面的第一种实施方式至第六种实施方式中任意一种,在本申请实施例第三方面的第七种实施方式中,第二校验单元对数据帧中的部分数据进行第二校验可以是,在IP层对数据帧中的部分数据进行IP包头校验。例如,第二校验单元在IP层获取IP包头中的内容,根据IP包头中的内容计算得到校验和校验码。然后第二校验单元将校验和校验码与IP包头中预置的校验码进行比较,当该校验和校验码与该校验码一致时,第二校验单元确定IP包头校验和校验通过。使得第二校验单元可以方便地对数据帧的部分数据进行校验,提高了第二校验单元对数据帧的部分数据进行校验的便捷性。In combination with the third aspect of the embodiments of the present application and any one of the first to sixth embodiments of the third aspect of the embodiments of the present application, in the seventh embodiment of the third aspect of the embodiments of the present application, the The second check performed by the second check unit on the partial data in the data frame may be that the IP packet header check is performed on the partial data in the data frame at the IP layer. For example, the second check unit obtains the content in the IP packet header at the IP layer, and calculates and obtains the checksum check code according to the content in the IP packet header. Then the second check unit compares the checksum check code with the check code preset in the IP header, and when the checksum check code is consistent with the check code, the second check unit determines the IP header Checksum verification passed. The second check unit can conveniently check the partial data of the data frame, which improves the convenience for the second check unit to check the partial data of the data frame.
结合本申请实施例第三方面、本申请实施例第三方面的第一种实施方式至第七种实施方式中任意一种,在本申请实施例第三方面的第八种实施方式中,数据传输控制装置还包括第一添加单元,该第一添加单元可以在预置的控制报文协议ICMP的选项字段中扩展丢包类型选项,将丢包信息添加至该丢包类型选项。在第一发送单元向发送设备发送丢包信息时,第一发送单元可以向发送设备发送第一添加单元得到的携带有丢包信息的ICMP。方便了第一添加单元将丢包信息进行便捷打包至ICMP,并由第一发送单元向发送设备反馈ICMP,使得发送设备根据ICMP中携带的丢包信息获知数据帧的损坏是非网络拥塞造成的。With reference to the third aspect of the embodiments of the present application and any one of the first to seventh embodiments of the third aspect of the embodiments of the present application, in the eighth embodiment of the third aspect of the embodiments of the present application, the data The transmission control apparatus further includes a first adding unit, which can extend the packet loss type option in the option field of the preset control message protocol ICMP, and add packet loss information to the packet loss type option. When the first sending unit sends the packet loss information to the sending device, the first sending unit may send the ICMP carrying the packet loss information obtained by the first adding unit to the sending device. It is convenient for the first adding unit to conveniently package the packet loss information into ICMP, and the first sending unit feeds back ICMP to the sending device, so that the sending device learns that the damage of the data frame is not caused by network congestion according to the packet loss information carried in the ICMP.
结合本申请实施例第三方面、本申请实施例第三方面的第一种实施方式至第七种实施方式中任意一种,在本申请实施例第三方面的第九种实施方式中,数据传输控制装置还包括第二添加单元,该第二添加单元可以在预置的应答报文协议ACK的选项字段中扩展丢包类型选项,将丢包信息添加至该丢包类型选项。在第一发送单元向发送设备发送丢包信息时,第一发送单元可以向发送设备发送第一添加单元得到的携带有丢包信息的ACK。提高了第一发送单元向发送设备反馈丢包信息的灵活性。With reference to the third aspect of the embodiments of the present application and any one of the first to seventh embodiments of the third aspect of the embodiments of the present application, in the ninth implementation of the third aspect of the embodiments of the present application, the data The transmission control apparatus further includes a second adding unit, which can extend the packet loss type option in the option field of the preset response message protocol ACK, and add packet loss information to the packet loss type option. When the first sending unit sends the packet loss information to the sending device, the first sending unit may send the ACK carrying the packet loss information obtained by the first adding unit to the sending device. The flexibility of the first sending unit to feed back the packet loss information to the sending device is improved.
本申请实施例第四方面提供了一种发送设备,可包括发送单元、侦测单元及执行单元等,其中,发送单元向校验设备发送数据帧,该校验设备可以是网络设备,也可以是接收设备。例如,发送单元向网络设备发送数据帧,或者是,发送单元通过网络设备向接收设备发送数据帧。此时侦测单元侦测是否接收到校验设备发送的丢包信息,该丢包信息由校验设备对数据帧进行第一校验不通过,且对数据帧的部分数据进行第二校验通过时发送,该丢包信息包括校验设备从数据帧的部分数据中获取到的标识信息,该标识信息用于指示与其对应的数据包发生了丢包。若侦测单元侦测接收到校验设备发送的丢包信息,则执行单元根据该丢包信息确定数据帧已丢失,并且根据该标识信息获知对应的数据包发生了丢包,从而对标识信息对应的数据包执行重传操作,提高了对数据传输控制的灵活性。A fourth aspect of the embodiments of the present application provides a sending device, which may include a sending unit, a detection unit, an execution unit, and the like, wherein the sending unit sends a data frame to a verification device, and the verification device may be a network device or is the receiving device. For example, the sending unit sends the data frame to the network device, or the sending unit sends the data frame to the receiving device through the network device. At this time, the detection unit detects whether the packet loss information sent by the verification device is received. The packet loss information is not passed by the verification device when the first verification of the data frame is performed, and the second verification is carried out on part of the data of the data frame. Sent when passed, the packet loss information includes the identification information obtained by the verification device from the partial data of the data frame, and the identification information is used to indicate that the corresponding data packet is lost. If the detection unit detects and receives the packet loss information sent by the verification device, the execution unit determines that the data frame has been lost according to the packet loss information, and learns that the corresponding data packet is lost according to the identification information, so as to determine the identification information. The corresponding data packet performs a retransmission operation, which improves the flexibility of data transmission control.
结合本申请实施例第四方面,在本申请实施例第四方面的第一种实施方式中,执行单元可包括判断子单元和执行子单元,其中,当数据帧不是由于网络拥塞造成的丢包事件时,该丢包信息可包括非拥塞丢包信息,执行单元对标识信息对应的数据包执行重传操作的过程中,首先由判断子单元判断丢包信息中是否包含非拥塞丢包信息,该非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。例如,硬件故障、信号干扰等原因造成数据帧的损坏,以及在使用无线WIFI网络、非屏蔽双绞线或无线蜂窝网等链路质量相对较差的介质进行数据帧的传输时,也会造成数据帧损坏,这些造成数据帧损坏后将数据帧丢弃的情况均属于由非网络拥塞原因引起的丢包事件。若丢包信息中包含非拥塞丢包信息,则执行单元根据该非拥塞丢包信息确定是由非网络拥塞原因引起的丢包事件,从而执行单元维持当前的拥塞控制机制,以及在拥塞控制机制下对标识信息对应的数据包执行重传操作。例如,若发送设备的拥塞控制机制处于慢启动阶段,则执行单元维持当前慢启动的拥塞控制机制对标识信息对应的数据包执行重传操作;若发送设备的拥塞控制机制处于快速重传阶段,则执行单元维持当前快速重传的拥塞控制机制对标识信息对应的数据包执行重传操作,等等。避免发送设备进行错误的乘性降速行为,相对于盲目通过缩小拥塞窗口来降低发送速率以减轻网络拥塞程度,提高了网络链路的利用率,以及提高了网络的吞吐量。With reference to the fourth aspect of the embodiment of the present application, in the first implementation manner of the fourth aspect of the embodiment of the present application, the execution unit may include a judgment subunit and an execution subunit, wherein when the data frame is not due to network congestion caused by packet loss In the event of an event, the packet loss information may include non-congested packet loss information. In the process of performing the retransmission operation on the data packet corresponding to the identification information by the execution unit, the judgment subunit first determines whether the non-congested packet loss information is included in the packet loss information, The non-congestion packet loss information is used to indicate packet loss events caused by reasons other than network congestion. For example, hardware failure, signal interference and other reasons cause damage to data frames, and when using media with relatively poor link quality such as wireless WIFI networks, unshielded twisted-pair cables, or wireless cellular networks to transmit data frames, it will also cause damage to data frames. The data frame is damaged, and the data frame is discarded after the data frame is damaged, which are all packet loss events caused by non-network congestion. If the packet loss information includes non-congested packet loss information, the execution unit determines that the packet loss event is caused by non-network congestion reasons according to the non-congested packet loss information, so that the execution unit maintains the current congestion control mechanism, and in the congestion control mechanism Next, perform a retransmission operation on the data packet corresponding to the identification information. For example, if the congestion control mechanism of the sending device is in the slow-start stage, the execution unit maintains the current slow-start congestion control mechanism to retransmit the data packet corresponding to the identification information; if the congestion control mechanism of the sending device is in the fast retransmission stage, Then, the execution unit maintains the current fast retransmission congestion control mechanism to perform a retransmission operation on the data packet corresponding to the identification information, and so on. It avoids the wrong multiplicative deceleration behavior of the sending device. Compared with blindly reducing the sending rate by narrowing the congestion window to reduce the degree of network congestion, the utilization rate of the network link is improved, and the throughput of the network is improved.
本申请实施例第五方面提供了一种校验设备,可包括:处理器、存储器、总线、输入装置以及输出装置;其中,该存储器中存储有程序代码,处理器调用存储器中的程序代码时执行如前述本申请实施例第一方面、本申请实施例第一方面的第一种实施方式至本申请实施例第一方面的第九种实施方式中的任一种实施方式所述的数据传输控制方法。A fifth aspect of the embodiments of the present application provides a verification device, which may include: a processor, a memory, a bus, an input device, and an output device; wherein, the memory stores program codes, and when the processor calls the program codes in the memory Execute the data transmission described in any one of the first aspect of the embodiments of the present application, the first implementation manner of the first aspect of the embodiments of the present application to the ninth implementation manner of the first aspect of the embodiments of the present application. Control Method.
本申请实施例第六方面提供了一种校验设备,可包括:处理器、存储器、总线、输入装置以及输出装置;其中,该存储器中存储有程序代码,处理器调用存储器中的程序代码时执行如前述本申请实施例第二方面或本申请实施例第二方面的第一种实施方式所述的数据传输控制方法。A sixth aspect of the embodiments of the present application provides a verification device, which may include: a processor, a memory, a bus, an input device, and an output device; wherein, the memory stores program codes, and when the processor calls the program codes in the memory The data transmission control method described in the second aspect of the foregoing embodiments of the present application or the first implementation manner of the second aspect of the embodiments of the present application is executed.
本申请实施例第七方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如前述本申请实施例第一方面、本申请实施例第一方面的第一种实施方式至本申请实施例第一方面的第九种实施方式中的任一种实施方式所述的数据传输控制方法。A seventh aspect of the embodiments of the present application provides a computer program product including instructions, which, when run on a computer, enables the computer to execute the first aspect of the foregoing embodiments of the present application and the first aspect of the first aspect of the embodiments of the present application. The data transmission control method described in any one of the implementation manner to the ninth implementation manner of the first aspect of the embodiments of this application.
本申请实施例第八方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如前述本申请实施例第二方面或本申请实施例第二方面的第一种实施方式所述的数据传输控制方法。An eighth aspect of the embodiments of the present application provides a computer program product including instructions, which, when running on a computer, cause the computer to execute the second aspect of the foregoing embodiments of the present application or the first aspect of the second aspect of the embodiments of the present application. The data transmission control method described in the embodiment.
本申请实施例第九方面提供了一种计算机可读存储介质,该计算机存储介质中存储有指令,当其在计算机上运行时,使得计算机执行时执行如前述本申请实施例第一方面、本申请实施例第一方面的第一种实施方式至本申请实施例第一方面的第九种实施方式中的任一种实施方式所述的数据传输控制方法。A ninth aspect of an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer storage medium, and when the computer storage medium runs on a computer, the computer executes the first aspect and the present invention when executed. The data transmission control method described in any one of the first implementation manner of the first aspect of the application embodiments to the ninth implementation manner of the first aspect of the application examples.
本申请实施例第十方面提供了一种计算机可读存储介质,该计算机存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如前述本申请实施例第二方面或本申请实施例第二方面的第一种实施方式所述的数据传输控制方法。A tenth aspect of the embodiments of the present application provides a computer-readable storage medium, where instructions are stored in the computer storage medium, and when the computer storage medium runs on a computer, the computer is made to execute the second aspect of the foregoing embodiments of the present application or the implementation of the present application. An example is the data transmission control method described in the first implementation manner of the second aspect.
从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
校验设备在对接收到的数据帧进行第一校验不通过,且对数据帧的部分数据进行第二校验通过时,说明该数据帧已损坏,但该数据帧的部分数据中包含的标识信息未被损坏,此时,校验设备可以从该数据帧的部分数据中获取标识信息。然后,校验设备向发送设备发送携带有该标识信息的丢包信息,以使得发送设备根据该丢包信息及时获知已发生丢包事件,并且根据该标识信息获知对应的数据包发生了丢包,从而对该标识信息对应的数据包进行重传,提高了对数据传输控制的灵活性。When the verification device fails the first verification on the received data frame and passes the second verification on part of the data frame, it means that the data frame is damaged, but the data contained in the part of the data frame does not pass. The identification information is not damaged. At this time, the verification device can obtain the identification information from the partial data of the data frame. Then, the verification device sends the packet loss information carrying the identification information to the sending device, so that the sending device can timely know that a packet loss event has occurred according to the packet loss information, and learn that the corresponding data packet has been lost according to the identification information. , so that the data packet corresponding to the identification information is retransmitted, and the flexibility of data transmission control is improved.
附图说明Description of drawings
图1为本申请实施例中通信系统的架构图;1 is an architectural diagram of a communication system in an embodiment of the application;
图2为本申请实施例中数据传输控制方法一个实施例示意图;FIG. 2 is a schematic diagram of an embodiment of a data transmission control method in an embodiment of the present application;
图3为本申请实施例中数据传输控制方法另一实施例示意图;FIG. 3 is a schematic diagram of another embodiment of a data transmission control method in an embodiment of the present application;
图4为本申请实施例中数据传输控制方法另一实施例示意图;FIG. 4 is a schematic diagram of another embodiment of a data transmission control method in an embodiment of the present application;
图5为本申请实施例中数据传输控制方法另一实施例示意图;FIG. 5 is a schematic diagram of another embodiment of a data transmission control method in an embodiment of the present application;
图6为本申请实施例中数据传输控制装置一个实施例示意图;FIG. 6 is a schematic diagram of an embodiment of a data transmission control apparatus in an embodiment of the present application;
图7为本申请实施例中发送设备一个实施例示意图;FIG. 7 is a schematic diagram of an embodiment of a sending device in an embodiment of the present application;
图8为本申请实施例中校验设备一个实施例示意图;FIG. 8 is a schematic diagram of an embodiment of the verification device in the embodiment of the application;
图9为本申请实施例中终端一个实施例示意图。FIG. 9 is a schematic diagram of an embodiment of a terminal in an embodiment of the present application.
具体实施方式Detailed ways
为了解决现有技术中对数据传输的处理采用默认方式而不够灵活的技术问题,本申请实施例提供了一种数据传输控制方法,校验设备在对接收到的数据帧进行第一校验不通过,且对数据帧的部分数据进行第二校验通过时,从该数据帧的部分数据中获取标识信息,以及向发送设备发送携带有该标识信息的丢包信息,以使得发送设备根据该丢包信息及时获知已发生丢包事件,并且根据该标识信息获知对应的数据包发生了丢包,从而对该标识信息对应的数据包进行重传,提高了对数据传输控制的灵活性。本申请实施例还提供了数据传输控制装置、发送设备、校验设备、计算机程序产品及计算机存储介质等相关设备。In order to solve the technical problem that the default method is used for data transmission processing in the prior art, which is not flexible enough, an embodiment of the present application provides a data transmission control method. Pass, and when the second check is passed on part of the data of the data frame, the identification information is obtained from the part of the data of the data frame, and the packet loss information carrying the identification information is sent to the sending device, so that the sending device is based on the identification information. The packet loss information is used to know that a packet loss event has occurred in time, and according to the identification information, it is known that the corresponding data packet has been lost, so that the data packet corresponding to the identification information is retransmitted, and the flexibility of data transmission control is improved. The embodiments of the present application also provide related equipment such as a data transmission control device, a sending device, a verification device, a computer program product, and a computer storage medium.
如图1所示,在通信系统中,一般情况下,发送设备需要通过网络设备向接收设备发送数据帧,该发送设备包括手机或电脑等终端,该网络设备包括路由器、计算机、集线器或交换机等,该接收设备包括手机或电脑等终端。可以理解的是,在实际应用中,发送设备、网络设备及接收设备的类型还可以是其他类型的设备,具体此处不作限定。发送设备在向接收设备发送数据帧,数据帧在网络进行传输的过程中,可以经过多种校验机制的校验,校验失败的数据帧被确定该数据帧在传输过程中被损坏。As shown in Figure 1, in a communication system, in general, a sending device needs to send data frames to a receiving device through a network device, the sending device includes a terminal such as a mobile phone or a computer, and the network device includes a router, a computer, a hub or a switch, etc. , the receiving device includes a terminal such as a mobile phone or a computer. It can be understood that, in practical applications, the types of the sending device, the network device and the receiving device may also be other types of devices, which are not specifically limited here. The sending device sends a data frame to the receiving device. During the transmission of the data frame in the network, it can be verified by various verification mechanisms. If the verification fails, it is determined that the data frame is damaged during the transmission process.
对数据帧的校验可以是发送设备在将数据帧发送给网络设备时,由网络设备对接收到的数据帧进行校验。例如,其校验机制可包括:在数据帧从物理层向数据链路层传输时,在数据链路层对数据帧的内容进行校验,例如,CRC校验或FCS校验等,以检查数据帧在传输过程中是否被损坏。在数据帧从数据链路层向IP层传输时,在IP层对数据帧剥离数据链路层头部得到IP数据包,在IP层对得到的数据包进行校验,例如,对数据包的IP头部进行校验和校验,检查数据包的IP头部在传输过程中是否被损坏。网络设备对数据包的校验机制还可以包括其他的校验,具体此处不作限定。The verification of the data frame may be that when the sending device sends the data frame to the network device, the network device performs verification on the received data frame. For example, the check mechanism may include: when the data frame is transmitted from the physical layer to the data link layer, check the content of the data frame at the data link layer, for example, CRC check or FCS check, etc., to check Whether the data frame is damaged during transmission. When the data frame is transmitted from the data link layer to the IP layer, the data link layer header is stripped from the data frame at the IP layer to obtain an IP data packet, and the obtained data packet is checked at the IP layer. The IP header is checked and verified to check whether the IP header of the packet is damaged during transmission. The verification mechanism for the data packet by the network device may also include other verifications, which are not specifically limited here.
对数据帧的校验还可以是发送设备在将数据帧发送给网络设备时,由网络设备按照其校验机制校验后,确定数据帧没有被损坏,将数据帧发送给接收设备,由接收设备对接收到的数据帧进行校验。例如,其校验机制可包括:在数据帧从物理层向数据链路层传输时,在数据链路层对数据帧的内容进行校验,例如,CRC校验或FCS校验等,以检查数据帧在传输过程中是否被损坏。在数据帧从数据链路层向IP层传输时,在IP层对数据帧剥离数据链路层头部得到IP数据包,在IP层对得到的数据包进行校验,例如,对数据包的IP头部进行校验和校验,检查数据包的IP头部在传输过程中是否被损坏。在数据包从IP层向TCP层传输时,在TCP层对数据包的TCP头部进行校验,检查数据包相应部分在传输过程中是否被损坏。可以理解的是,在实际应用中,在数据包从IP层向TCP层传输时,接收设备在TCP层除了可以对TCP头部进行校验之外,还可以是对其他头部进行校验,例如,在TCP层对数据包的IP伪头部、数据载荷进行校验,检查数据包相应部分在传输过程中是否被损坏等,具体此处不作限定。The verification of the data frame can also be that when the sending device sends the data frame to the network device, after the network device checks according to its verification mechanism, it determines that the data frame is not damaged, and sends the data frame to the receiving device. The device checks the received data frame. For example, the check mechanism may include: when the data frame is transmitted from the physical layer to the data link layer, check the content of the data frame at the data link layer, for example, CRC check or FCS check, etc., to check Whether the data frame is damaged during transmission. When the data frame is transmitted from the data link layer to the IP layer, the data link layer header is stripped from the data frame at the IP layer to obtain an IP data packet, and the obtained data packet is checked at the IP layer. The IP header is checked and verified to check whether the IP header of the packet is damaged during transmission. When the data packet is transmitted from the IP layer to the TCP layer, the TCP header of the data packet is checked at the TCP layer to check whether the corresponding part of the data packet is damaged during the transmission process. It can be understood that, in practical applications, when the data packet is transmitted from the IP layer to the TCP layer, the receiving device can check other headers in addition to the TCP header at the TCP layer. For example, the IP pseudo-header and data payload of the data packet are checked at the TCP layer to check whether the corresponding part of the data packet is damaged during transmission, etc., which is not specifically limited here.
对数据帧的校验还可以发送设备通过网络设备将数据帧发送给接收设备后,直接由接收设备对接收到的数据帧进行校验。The verification of the data frame can also be performed by the receiving device after the sending device sends the data frame to the receiving device through the network device, and the receiving device directly checks the received data frame.
需要说明的是,图1所示的通信系统的架构图仅仅是一个示例,本申请实施例描述的系统架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It should be noted that the architecture diagram of the communication system shown in FIG. 1 is only an example, and the system architecture and business scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a For the limitations of the technical solutions provided by the application embodiments, those skilled in the art know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
为便于理解,下面对本申请实施例中的具体流程进行描述,请参阅图2,本申请实施例中数据传输控制方法的一个实施例包括:For ease of understanding, the specific process in the embodiment of the present application is described below, referring to FIG. 2 , an embodiment of the data transmission control method in the embodiment of the present application includes:
201、校验设备接收发送设备发送的数据帧;201. The verification device receives the data frame sent by the sending device;
本实施例中,发送设备向校验设备发送数据帧,校验设备接收发送设备发送的该数据帧。该校验设备可以是网络设备,也可以是接收设备,例如,网络设备接收发送设备发送的数据帧,或者是接收设备接收网络设备转发发送设备发送的数据帧。In this embodiment, the sending device sends a data frame to the verification device, and the verification device receives the data frame sent by the sending device. The verification device may be a network device or a receiving device. For example, the network device receives a data frame sent by the sending device, or the receiving device receives the data frame sent by the network device and forwards the sending device.
需要说明的是,在实际应用中,该数据帧可以称之为数据,即校验设备接收发送设备发送的数据,该数据在从物理层向数据链路层传输时,在数据链路层该数据被称为数据帧,该数据帧从数据链路层向IP层传输时,在IP层被称为数据包。该数据在传输过程中的名称可以根据实际需要进行灵活设置,具体此处不作限定。本申请实施例描述的名称是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定。It should be noted that, in practical applications, the data frame can be called data, that is, the verification device receives the data sent by the sending device. When the data is transmitted from the physical layer to the data link layer, the data Data is called a data frame, and when the data frame is transmitted from the data link layer to the IP layer, it is called a data packet at the IP layer. The name of the data in the transmission process can be flexibly set according to actual needs, which is not limited here. The names described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application.
202、校验设备对数据帧进行第一校验;202. The verification device performs a first verification on the data frame;
校验设备需要对接收到的数据帧进行第一校验,由于校验设备可以是网络设备,也可以是接收设备,因此,对数据帧的第一校验可以是发送设备在将数据帧发送给网络设备时,由网络设备对接收到的数据帧进行第一校验。对数据帧的校验也可以是发送设备在将数据帧发送给网络设备时,由网络设备对数据帧进行第一校验后,确定数据帧没有被损坏,将数据帧发送给接收设备,由接收设备对接收到的数据帧进行第一校验。对数据帧的第一校验还可以是发送设备通过网络设备将数据帧发送给接收设备后,直接由接收设备对接收到的数据帧进行第一校验。The verification device needs to perform the first verification on the received data frame. Since the verification device can be a network device or a receiving device, the first verification of the data frame can be that the sending device is sending the data frame. When sent to the network device, the network device performs a first check on the received data frame. The verification of the data frame can also be that when the sending device sends the data frame to the network device, after the first verification of the data frame is performed by the network device, it is determined that the data frame is not damaged, and the data frame is sent to the receiving device. The receiving device performs a first check on the received data frame. The first check on the data frame may also be that after the sending device sends the data frame to the receiving device through the network device, the receiving device directly performs the first check on the received data frame.
该第一校验可以是CRC校验或FCS校验等,例如,在以太网中,第一校验为CRC校验,在令牌环网中,第一校验为FCS校验。以循环冗余校验为例,校验设备对数据帧进行循环冗余校验时,首先,校验设备在数据帧从物理层向数据链路层传输时,在数据链路层对数据帧进行循环冗余校验。例如,循环冗余校验的机制包括:校验设备获取数据帧中的内容,根据数据帧内容计算得到循环冗余校验码,并将循环冗余校验码与数据帧中尾部预置的校验码进行比较。当循环冗余校验码与该校验码不一致时,校验设备确定对数据帧的循环冗余校验失败,即对数据帧的循环冗余校验不通过;当循环冗余校验码与该校验码一致时,校验设备确定对数据帧的循环冗余校验通过。可以理解的是,在实际应用中,循环冗余校验的机制还可以为CRC32或CRC64等其他的校验机制,具体此处不作限定。The first check may be a CRC check or an FCS check. For example, in an Ethernet, the first check is a CRC check, and in a token ring network, the first check is an FCS check. Taking the cyclic redundancy check as an example, when the verification device performs the cyclic redundancy check on the data frame, first, when the data frame is transmitted from the physical layer to the data link layer, the verification device verifies the data frame at the data link layer. Perform a cyclic redundancy check. For example, the mechanism of the cyclic redundancy check includes: the verification device obtains the content in the data frame, calculates the cyclic redundancy check code according to the content of the data frame, and compares the cyclic redundancy check code with the preset value at the end of the data frame. Checksum for comparison. When the cyclic redundancy check code is inconsistent with the check code, the verification device determines that the cyclic redundancy check of the data frame fails, that is, the cyclic redundancy check of the data frame fails; When it is consistent with the check code, the checking device determines that the cyclic redundancy check on the data frame is passed. It can be understood that, in practical applications, the cyclic redundancy check mechanism may also be other check mechanisms such as CRC32 or CRC64, which is not specifically limited here.
203、当第一校验不通过时,校验设备对数据帧中的部分数据进行第二校验;203. When the first verification fails, the verification device performs a second verification on part of the data in the data frame;
当校验设备对数据帧的第一校验不通过时,校验设备确定数据帧已被损坏。由于校验设备可以是网络设备,也可以是接收设备,因此数据帧的损坏可以是在网络设备上发现的,也可以是在接收设备上发现的。在对数据帧的第一校验失败时,校验设备不直接将该数据帧丢弃,而是将数据帧从数据链路层向IP层传输,对数据帧的部分数据进行第二校验。When the first verification of the data frame by the verification device fails, the verification device determines that the data frame has been damaged. Since the verification device can be a network device or a receiving device, the corruption of the data frame can be found on the network device or on the receiving device. When the first verification of the data frame fails, the verification device does not directly discard the data frame, but transmits the data frame from the data link layer to the IP layer, and performs the second verification on part of the data frame.
当校验设备确定数据帧损坏时,为了保证获取到的标识信息是正确的,此时校验设备进一步对数据帧的部分数据进行第二校验,该标识信息包含于数据帧的该部分数据,该数据帧的部分数据可包括IP包头或TCP包头等。本实施例中,对数据帧的部分数据进行第二校验可以是在数据帧从数据链路层向IP层传输时,在IP层对IP包头校验和进行校验,可以理解的是,在实际应用中,除了可以对IP包头进行校验之外,还可以是对其他包头进行校验,例如,在数据帧从IP层向TCP层传输时,在TCP层对IP伪头部、TCP头部和数据载荷进行校验,检查数据帧相应部分在传输过程中是否被损坏等,具体此处不作限定。When the verification device determines that the data frame is damaged, in order to ensure that the acquired identification information is correct, the verification device further performs a second verification on part of the data in the data frame, and the identification information is included in the part of the data in the data frame. , and part of the data of the data frame may include an IP header or a TCP header. In this embodiment, the second check on part of the data of the data frame may be to check the IP packet header checksum at the IP layer when the data frame is transmitted from the data link layer to the IP layer. It can be understood that, In practical applications, in addition to verifying the IP packet header, other packet headers can also be verified. For example, when the data frame is transmitted from the IP layer to the TCP layer, the IP pseudo-header, TCP The header and the data payload are checked to check whether the corresponding part of the data frame is damaged during transmission, etc., which is not specifically limited here.
以在IP层对IP包头校验和进行校验为例,在数据帧从数据链路层向IP层传输时,校验设备在IP层获取IP包头中的内容,根据IP包头的内容计算得到校验和校验码。然后校验设备将校验和校验码与IP包头中预置的校验码进行比较,当该校验和校验码与该校验码一致时,校验设备确定IP包头校验和校验成功,即确定IP包头校验和校验通过;当该校验和校验码与该校验码不一致时,校验设备确定IP包头校验和校验不通过。Taking the verification of the IP packet header checksum at the IP layer as an example, when the data frame is transmitted from the data link layer to the IP layer, the verification device obtains the content in the IP packet header at the IP layer, and calculates it according to the content of the IP packet header. Checksum check code. Then the verification device compares the checksum verification code with the verification code preset in the IP packet header, and when the checksum verification code is consistent with the verification code, the verification device determines the IP packet header checksum verification code If the verification is successful, it is determined that the checksum of the IP packet header is passed; when the checksum verification code is inconsistent with the verification code, the verification device determines that the IP packet header checksum verification fails.
204、当第二校验通过时,校验设备从数据帧的部分数据中获取标识信息;204. When the second verification is passed, the verification device obtains identification information from part of the data of the data frame;
当对数据帧的第二校验通过时,校验设备确定数据帧的部分数据未被损坏,而数据帧的损坏是出现在其他数据帧的字段,此时校验设备从数据帧的部分数据中存储标识信息的字段内提取出该标识信息,该标识信息可包括源地址和目的地址等,当该标识信息为源地址时,可以用于指示发送该数据帧对应的发送设备;当该标识信息为目的IP地址时,可以用于指示接收该数据帧对应的接收设备。该标识信息还可以用于指示与该标识信息对应的数据包发生了丢包,例如,该标识信息可以包括序列号、端口信息等。由于数据帧的包头未被损坏,此时获取到的标识信息是正确的。When the second check of the data frame is passed, the check device determines that part of the data of the data frame is not damaged, and the damage of the data frame occurs in the fields of other data frames. At this time, the check device determines from the partial data of the data frame The identification information is extracted from the field where the identification information is stored in the . When the information is the destination IP address, it can be used to indicate the receiving device corresponding to the data frame. The identification information may also be used to indicate that the data packet corresponding to the identification information is lost. For example, the identification information may include serial number, port information, and the like. Since the packet header of the data frame is not damaged, the identification information obtained at this time is correct.
205、校验设备向发送设备发送丢包信息。205. The verification device sends packet loss information to the sending device.
本实施例中,丢包信息用于表示数据帧已丢失,丢包信息包括标识信息,标识信息用于指示与标识信息对应的数据包发生了丢包。In this embodiment, the packet loss information is used to indicate that the data frame has been lost, the packet loss information includes identification information, and the identification information is used to indicate that the data packet corresponding to the identification information is lost.
需要说明的是,由于发送设备可以是向接收设备发送一个数据帧,也可以是向接收设备发送多个数据帧,因此校验设备可以是每校验完成一个数据帧之后,确定是该数据帧丢失时,校验设备生成该数据帧的丢包信息,并将该丢包信息发送给发送设备。校验设备也可以是在预设时间周期内对一个或多个数据帧进行校验后,确定该一个或多个数据帧丢失时,校验设备生成该一个或多个数据帧的丢包信息,并将该丢包信息发送给发送设备。It should be noted that since the sending device can send one data frame to the receiving device, or it can send multiple data frames to the receiving device, the verification device can determine that the data frame is the data frame after each verification is completed. When lost, the verification device generates packet loss information of the data frame, and sends the packet loss information to the sending device. The verification device may also generate packet loss information of the one or more data frames when it is determined that the one or more data frames are lost after verifying one or more data frames within a preset time period. , and send the packet loss information to the sending device.
校验设备在得到正确的标识信息及生成丢包信息后,校验设备可以向发送设备发送携带有该标识信息的丢包信息。以使得发送设备根据该丢包信息确定数据帧已丢失,并且根据该标识信息获知对应的数据包发生了丢包,从而对标识信息对应的数据包执行重传操作。After the verification device obtains the correct identification information and generates the packet loss information, the verification device may send the packet loss information carrying the identification information to the sending device. So that the sending device determines that the data frame has been lost according to the packet loss information, and learns that the corresponding data packet is lost according to the identification information, so as to perform a retransmission operation on the data packet corresponding to the identification information.
本申请实施例中校验设备在对接收到的数据帧进行第一校验不通过,且对数据帧的部分数据进行第二校验通过时,说明该数据帧已损坏,但该数据帧的部分数据中包含的标识信息未被损坏,此时,校验设备可以从该数据帧的部分数据中获取标识信息。然后,校验设备向发送设备发送携带有该标识信息的丢包信息,以使得发送设备根据该丢包信息及时获知已发生丢包事件,并且根据该标识信息获知对应的数据包发生了丢包,从而对该标识信息对应的数据包进行重传,提高了对数据传输控制的灵活性。In the embodiment of the present application, when the verification device fails to perform the first verification on the received data frame and passes the second verification on part of the data frame, it means that the data frame is damaged, but the data frame is damaged. The identification information contained in the partial data is not damaged. In this case, the verification device can obtain the identification information from the partial data of the data frame. Then, the verification device sends the packet loss information carrying the identification information to the sending device, so that the sending device can timely know that a packet loss event has occurred according to the packet loss information, and learn that the corresponding data packet has been lost according to the identification information. , so that the data packet corresponding to the identification information is retransmitted, and the flexibility of data transmission control is improved.
另外,由于现有技术中当已损坏的该数据帧被网络设备丢弃后,TCP通常通过收到的重复确认报文(例如,ACK)的数量,然后将该确认报文的数量与设定的阈值进行比较,来判断网络中是否发生丢包事件,进而依据网络丢包事件的发生来判定网络的拥塞。在丢包事件发生后,TCP拥塞控制机制通过调整拥塞窗口(英文全称:congestion window,英文缩写:CWND)的大小来控制发送的数据帧的总量,进而调节数据帧的发送速率。发送设备通过调整后的CWND对数据包进行重传,以保证数据帧通过网络设备传输的可靠性。例如,TCP通过TCP拥塞控制机制在针对同一数据帧收到三次重复的确认报文时,就判定网络中该数据帧发生了丢包事件,进而调整CWND对数据包进行重传。因此,发送设备在通过网络设备向接收设备发送数据帧的过程中,当数据帧被损坏时,网络设备直接将该被损坏的数据帧丢弃,并在多次收到确认报文时才会重传数据包,而要接收到多个确认报文需要等待较长时间,因此,发送设备无法获知数据帧的丢包事件的时机,需要等到接收到的确认报文满足一定次数后,发送设备才获知数据帧丢失,然后对数据包进行重传。发送设备在无法及时获知数据帧丢失的情况下,延迟了对数据包的重传,降低了对数据包重传的效率。而本申请实施例中,校验设备向发送设备发送携带有该标识信息的丢包信息,可以使得发送设备根据该丢包信息及时获知已发生丢包事件,避免发送设备一直等待接收到多个确认报文后才对数据包进行重传,提高了对标识信息对应的数据包的重传效率。In addition, because in the prior art, after the damaged data frame is discarded by the network device, TCP usually passes the number of received repeated acknowledgment packets (for example, ACK), and then matches the number of acknowledgment packets with the set number of acknowledgment packets. The thresholds are compared to determine whether a packet loss event occurs in the network, and then the network congestion is determined according to the occurrence of the network packet loss event. After a packet loss event occurs, the TCP congestion control mechanism controls the total amount of data frames sent by adjusting the size of the congestion window (full name: congestion window, English abbreviation: CWND), and then adjusts the sending rate of data frames. The sending device retransmits the data packet through the adjusted CWND to ensure the reliability of the data frame transmission through the network device. For example, when TCP receives three repeated acknowledgments for the same data frame through the TCP congestion control mechanism, it determines that a packet loss event has occurred in the data frame in the network, and then adjusts CWND to retransmit the data packet. Therefore, in the process of sending the data frame to the receiving device through the network device, when the data frame is damaged, the network device directly discards the damaged data frame, and will only replay the data frame when it receives the confirmation message multiple times. It takes a long time to receive multiple acknowledgment packets. Therefore, the sending device cannot know the timing of the packet loss event of the data frame. It needs to wait until the received acknowledgment packets meet a certain number of times before the sending device. Know that the data frame is lost, and then retransmit the data packet. When the sending device cannot know the loss of the data frame in time, the retransmission of the data packet is delayed, and the efficiency of the retransmission of the data packet is reduced. However, in the embodiment of the present application, the verification device sends the packet loss information carrying the identification information to the sending device, so that the sending device can be informed in time that a packet loss event has occurred according to the packet loss information, so as to avoid the sending device from waiting to receive multiple packets. The data packet is retransmitted only after the message is confirmed, which improves the retransmission efficiency of the data packet corresponding to the identification information.
本申请实施例中,为了区分数据帧的丢失是否是由于网络拥塞造成的丢包事件,当数据帧不是由于网络拥塞造成的丢包事件时,该丢包信息可包括非拥塞丢包信息,该非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。例如,硬件故障、信号干扰等原因造成数据帧的损坏,以及在使用无线WIFI网络、非屏蔽双绞线或无线蜂窝网等链路质量相对较差的介质进行数据帧的传输时,也会造成数据帧损坏,这些造成数据帧损坏后将数据帧丢弃的情况均属于由非网络拥塞原因引起的丢包事件。此时,校验设备可以向发送设备发送非拥塞丢包信息。校验设备可以是每校验完成一个数据帧之后,确定是该数据帧由非网络拥塞原因引起的丢包事件时,校验设备生成该数据帧的非拥塞丢包信息,并将该非拥塞丢包信息发送给发送设备。校验设备也可以是在预设时间周期内对一个或多个数据帧进行校验后,确定该一个或多个数据帧由非网络拥塞原因引起的丢包事件时,校验设备生成该一个或多个数据帧的非拥塞丢包信息,并将该非拥塞丢包信息发送给发送设备。In this embodiment of the present application, in order to distinguish whether the loss of the data frame is a packet loss event caused by network congestion, when the data frame is not a packet loss event caused by network congestion, the packet loss information may include non-congestion packet loss information, the Non-congestion packet loss information is used to indicate packet loss events caused by reasons other than network congestion. For example, hardware failure, signal interference and other reasons cause damage to data frames, and when using media with relatively poor link quality such as wireless WIFI networks, unshielded twisted-pair cables, or wireless cellular networks to transmit data frames, it will also cause damage to data frames. The data frame is damaged, and the data frame is discarded after the data frame is damaged, which are all packet loss events caused by non-network congestion. At this time, the verification device can send the non-congested packet loss information to the sending device. The verification device can generate the non-congested packet loss information of the data frame when it is determined that the data frame is a packet loss event caused by a non-network congestion cause after completing the verification of each data frame, and send the non-congested packet loss information to the data frame. Packet loss information is sent to the sending device. The verification device may also generate the one or more data frames after verifying one or more data frames within a preset time period and determine that the one or more data frames are packet loss events caused by reasons other than network congestion. or the non-congested packet loss information of multiple data frames, and send the non-congested packet loss information to the sending device.
发送设备在接收到校验设备发送的非拥塞丢包信息后,发送设备可以根据该非拥塞丢包信息确定是由非网络拥塞原因引起的丢包事件,从而发送设备维持当前的拥塞控制机制,以及在拥塞控制机制下对标识信息对应的数据包执行重传操作,该数据包可以是TCP层的数据包,或者是UDP层的数据包。解决了现有技术中发送设备确定丢包事件的发生后,判定为由于网络拥塞造成的,将会成倍的减少当前的CWND值,从而按比例乘性降低数据帧的发送速率(简称乘性降速)以减轻网络拥塞程度,以及在数据包重传的过程中,缓慢增加数据包的发送速率,直至丢包事件再次发生的技术问题,避免了发送设备将校验不通过产生的丢包事件错误地判定为由于网络拥塞造成而盲目进行乘性降速操作,相对于盲目通过缩小拥塞窗口来降低发送速率以减轻网络拥塞程度,提高了网络链路的利用率,以及提高了网络的吞吐量。After the sending device receives the non-congested packet loss information sent by the verification device, the sending device can determine the packet loss event caused by non-network congestion according to the non-congested packet loss information, so that the sending device maintains the current congestion control mechanism, And under the congestion control mechanism, a retransmission operation is performed on the data packet corresponding to the identification information, and the data packet may be a data packet of the TCP layer or a data packet of the UDP layer. It solves the problem that in the prior art, after the sending device determines the occurrence of the packet loss event, it is determined that it is caused by network congestion, and the current CWND value will be doubled, thereby reducing the transmission rate of the data frame proportionally (referred to as multiplicative). Slow down) to reduce network congestion, and in the process of data packet retransmission, slowly increase the transmission rate of data packets until the packet loss event occurs again. The event is wrongly determined to blindly perform multiplication speed-down operation due to network congestion. Compared with blindly reducing the transmission rate by narrowing the congestion window to reduce the degree of network congestion, the utilization rate of network links is improved, and the network throughput is improved. quantity.
另外,对于在WIFI网络或蜂窝网等场景,由于传输介质的特性,发送设备统计的RTT值往往变化频繁且剧烈,因此若发送设备通过比较当前RTT值与预先设置的时间阈值,来判断当前的数据帧的损坏是否为网络拥塞造成的,则其判断的准确率很低。而本申请实施例中校验设备在可以对数据帧进行第一校验及对数据帧的部分数据进行第二校验,实现了对数据帧的准确校验,提高了发送设备维持当前的拥塞控制机制,以及在当前的拥塞控制机制下对标识信息对应的数据包执行重传操作的可靠性。In addition, for scenarios such as WIFI network or cellular network, due to the characteristics of the transmission medium, the RTT value counted by the sending device often changes frequently and drastically. Therefore, if the sending device compares the current RTT value with the preset time threshold to determine the current Whether the damage to the data frame is caused by network congestion, the accuracy of its judgment is very low. However, in the embodiment of the present application, the verification device can perform the first verification on the data frame and the second verification on the partial data of the data frame, so as to realize the accurate verification of the data frame and improve the ability of the sending device to maintain the current congestion. The control mechanism, and the reliability of performing the retransmission operation on the data packet corresponding to the identification information under the current congestion control mechanism.
可以理解的是,TCP通过拥塞控制机制来保证数据在网络中的可靠传输,由于拥塞控制机制主要是通过改变拥塞窗口CWND的大小来控制发送设备可以发送的数据帧的总量,进而调节数据帧发送速率。另外,拥塞控制机制还通过对丢失的数据帧的重传,来保证数据帧的可靠传输。拥塞控制机制包括慢启动、拥塞避免、快速重传和快速恢复等多个阶段。因此,发送设备维持当前的拥塞控制机制,以及在当前的拥塞控制机制下对标识信息对应的数据包执行重传操作可以是:当发送设备接收到校验设备发送的非拥塞丢包信息时,若发送设备的拥塞控制机制处于慢启动阶段,则发送设备维持当前慢启动的拥塞控制机制对标识信息对应的数据包执行重传操作;若发送设备的拥塞控制机制处于拥塞避免阶段,则发送设备维持当前拥塞避免的拥塞控制机制对标识信息对应的数据包执行重传操作;若发送设备的拥塞控制机制处于快速重传阶段,则发送设备维持当前快速重传的拥塞控制机制对标识信息对应的数据包执行重传操作;等等,此处不再进行一一枚举。It is understandable that TCP uses the congestion control mechanism to ensure the reliable transmission of data in the network. Because the congestion control mechanism mainly controls the total amount of data frames that the sending device can send by changing the size of the congestion window CWND, and then adjusts the data frames. send rate. In addition, the congestion control mechanism also ensures reliable transmission of data frames by retransmitting lost data frames. The congestion control mechanism includes multiple stages such as slow start, congestion avoidance, fast retransmission and fast recovery. Therefore, the sending device maintains the current congestion control mechanism, and performs a retransmission operation on the data packet corresponding to the identification information under the current congestion control mechanism: when the sending device receives the non-congested packet loss information sent by the verification device, If the congestion control mechanism of the sending device is in the slow-start stage, the sending device maintains the current slow-start congestion control mechanism to retransmit the data packets corresponding to the identification information; if the congestion control mechanism of the sending device is in the congestion avoidance stage, the sending device The congestion control mechanism that maintains the current congestion avoidance performs a retransmission operation on the data packets corresponding to the identification information; if the congestion control mechanism of the sending device is in the fast retransmission stage, the sending device maintains the current fast retransmission congestion control mechanism to the corresponding identification information. The packet performs a retransmission operation; wait, no enumeration is performed here.
本申请实施例中,校验设备向发送设备发送丢包信息的方式包括:校验设备向发送设备发送携带有丢包信息的ICMP,或者校验设备向发送设备发送携带有丢包信息的ACK等,以下将分别进行详细描述。In this embodiment of the present application, the manner in which the verification device sends the packet loss information to the sending device includes: the verification device sends an ICMP carrying the packet loss information to the sending device, or the verification device sends an ACK carrying the packet loss information to the sending device etc., which will be described in detail below.
一、校验设备向发送设备发送携带有丢包信息的ICMP。1. The verification device sends an ICMP with packet loss information to the sending device.
(一)当校验设备为网络设备时,由网络设备对数据帧进行校验,请参阅图3,本申请实施例中数据传输控制方法的另一实施例包括:(1) When the verification device is a network device, the data frame is verified by the network device. Referring to FIG. 3, another embodiment of the data transmission control method in the embodiment of the present application includes:
301、发送设备向网络设备发送数据帧;301. The sending device sends a data frame to a network device;
当发送设备向接收设备发送数据帧时,需要通过网络设备作为中转,即先将数据帧发送给网络设备。When a sending device sends a data frame to a receiving device, it needs to pass through the network device as a relay, that is, send the data frame to the network device first.
302、网络设备对数据帧进行第一校验;302. The network device performs a first check on the data frame;
网络设备在接收到数据帧后,在数据帧从物理层向数据链路层传输时,在数据链路层对数据帧进行第一校验,例如,在数据链路层对数据帧进行CRC校验或FCS校验等,以循环冗余校验为例,网络设备对数据帧进行解包,获取数据帧的内容,网络设备可以根据数据帧的内容计算得到循环冗余校验码,并将循环冗余校验码与数据帧中尾部预置的校验码进行比较。当循环冗余校验码与该校验码不一致时,网络设备确定对数据帧的校验不通过,即第一校验不通过;当循环冗余校验码与该校验码一致时,网络设备确定对数据帧的循环冗余校验通过,即第一校验通过。可以理解的是,在实际应用中,循环冗余校验的机制还可以按照其他的校验方式进行校验,具体此处不作限定。After the network device receives the data frame, when the data frame is transmitted from the physical layer to the data link layer, the first check is performed on the data frame at the data link layer, for example, the CRC check is performed on the data frame at the data link layer. Take cyclic redundancy check as an example, the network device unpacks the data frame to obtain the content of the data frame, the network device can calculate the cyclic redundancy check code according to the content of the data frame, and use the The cyclic redundancy check code is compared with the check code preset at the end of the data frame. When the cyclic redundancy check code is inconsistent with the check code, the network device determines that the verification of the data frame fails, that is, the first check fails; when the cyclic redundancy check code is consistent with the check code, The network device determines that the cyclic redundancy check on the data frame passes, that is, the first check passes. It can be understood that, in practical applications, the cyclic redundancy check mechanism can also be checked according to other check methods, which is not specifically limited here.
需要说明的是,网络设备在接收到数据帧后,可以先在物理层对数据帧的前导码进行校验,检查数据帧的信号在传输过程中是否被损坏,若未被损坏,则将数据帧从物理层向数据链路层传输,并在数据链路层对数据帧进行第一校验。It should be noted that after receiving the data frame, the network device can first check the preamble of the data frame at the physical layer to check whether the signal of the data frame is damaged during transmission. The frame is transmitted from the physical layer to the data link layer, and the first check is performed on the data frame at the data link layer.
当第一校验通过时,说明数据帧没有被损坏,此时网络设备获取目的IP地址,根据目的IP地址向对应的接收设备发送该数据帧。When the first check is passed, it means that the data frame is not damaged. At this time, the network device obtains the destination IP address, and sends the data frame to the corresponding receiving device according to the destination IP address.
303、当第一校验不通过时,网络设备对数据帧的部分数据进行第二校验;303. When the first check fails, the network device performs a second check on part of the data of the data frame;
当网络设备对数据帧的第一校验不通过时,网络设备确定数据帧损坏,为了将丢包信息发送给发送设备,网络设备需要获取正确的标识信息。由于对数据帧的校验失败意味着数据帧的任意字段都可能存在误码错误,而网络设备在将丢包信息反馈给发送设备时,还需要保证从发生误码的数据帧中获得的标识信息是正确的,即存储标识信息的字段未被损坏。因此,网络设备不直接将该数据帧丢弃,而是需要进一步对数据帧的分部数据进行第二校验,该数据帧的部分数据存储有标识信息,该数据帧的部分数据可包括IP包头或TCP包头等。When the first check of the data frame by the network device fails, the network device determines that the data frame is damaged. In order to send the packet loss information to the sending device, the network device needs to obtain correct identification information. Since the verification of the data frame fails, it means that any field of the data frame may have bit errors. When the network device feeds back the packet loss information to the sending device, it also needs to ensure that the identifier obtained from the data frame where the bit error occurred. The information is correct, i.e. the field storing the identifying information is not corrupted. Therefore, the network device does not directly discard the data frame, but needs to further perform a second check on the partial data of the data frame. The partial data of the data frame stores identification information, and the partial data of the data frame may include the IP header. or TCP headers, etc.
本实施例中,对数据帧的部分数据进行第二校验可以是在数据帧从数据链路层向IP层传输时,在IP层对IP包头校验和进行校验,可以理解的是,在实际应用中,除了可以对IP包头进行校验之外,还可以是对其他包头进行校验,例如,在数据帧从IP层向TCP层传输时,在TCP层对IP伪头部、TCP头部和数据载荷进行校验,检查数据帧相应部分在传输过程中是否被损坏等,具体此处不作限定。In this embodiment, the second check on part of the data of the data frame may be to check the IP packet header checksum at the IP layer when the data frame is transmitted from the data link layer to the IP layer. It can be understood that, In practical applications, in addition to verifying the IP packet header, other packet headers can also be verified. For example, when the data frame is transmitted from the IP layer to the TCP layer, the IP pseudo-header, TCP The header and the data payload are checked to check whether the corresponding part of the data frame is damaged during transmission, etc., which is not specifically limited here.
网络设备在对数据帧的IP包头进行校验时,可以在数据帧从数据链路层向IP层传输时,网络设备在IP层获取IP包头中的内容,根据IP包头的内容计算得到校验和校验码。然后网络设备将校验和校验码与IP包头中预置的校验码进行比较,当该校验和校验码与该校验码一致时,网络设备确定IP包头校验和校验通过,即第二校验通过;当该校验和校验码与该校验码不一致时,网络设备确定IP包头校验和校验不通过,即第二校验不通过。When the network device verifies the IP packet header of the data frame, when the data frame is transmitted from the data link layer to the IP layer, the network device can obtain the content in the IP packet header at the IP layer, and calculate and obtain the verification according to the content of the IP packet header. and check code. Then the network device compares the checksum check code with the check code preset in the IP packet header. When the checksum check code is consistent with the check code, the network device determines that the IP packet header checksum verification is passed. , that is, the second check passes; when the checksum check code is inconsistent with the check code, the network device determines that the IP packet header checksum check fails, that is, the second check fails.
304、当第二校验通过时,网络设备生成携带有丢包信息的控制报文协议ICMP;304. When the second check is passed, the network device generates a control message protocol ICMP that carries packet loss information;
当对数据帧的部分数据进行第二校验通过时,网络设备确定数据帧的包头未被损坏,此时网络设备生成丢包信息,并在ICMP的选项字段中扩展丢包类型选项,将丢包信息添加至该丢包类型选项。例如,网络设备在ICMP中自定义一个类型字段值为36,该类型字段值为36对应的ICMP的类型选项为丢包类型选项,该丢包类型选项对应存储的是丢包信息。When the second check is passed on part of the data of the data frame, the network device determines that the packet header of the data frame is not damaged. At this time, the network device generates packet loss information, and expands the packet loss type option in the option field of ICMP. Packet information is added to this packet loss type option. For example, the network device defines a type field value of 36 in ICMP, and the type option of the ICMP corresponding to the type field value of 36 is the packet loss type option, and the packet loss type option correspondingly stores packet loss information.
需要说明的是,当数据帧不是由于网络拥塞造成的丢包事件时,该丢包信息可包括非拥塞丢包信息,即网络设备可以生成非拥塞丢包信息,该非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。网络设备可以在ICMP的选项字段中扩展非拥塞丢包类型选项,将非拥塞丢包信息添加至该非拥塞丢包类型选项。It should be noted that when the data frame is not a packet loss event caused by network congestion, the packet loss information may include non-congested packet loss information, that is, the network device may generate non-congested packet loss information, and the non-congested packet loss information is used for Indicates packet loss events caused by reasons other than network congestion. The network device may extend the non-congestion packet loss type option in the option field of the ICMP, and add non-congestion packet loss information to the non-congestion packet loss type option.
305、网络设备向发送设备发送携带有丢包信息的ICMP;305. The network device sends the ICMP carrying the packet loss information to the sending device;
网络设备在将携带有丢包信息的ICMP发送给发送设备之前,首先网络设备从数据帧的部分数据中获取标识信息,该标识信息可包括源地址和目的地址等,该标识信息与丢包信息可以随ICMP一起发送给发送设备。需要说明的是,在以太网的IP协议中,该标识信息可包括源IP地址和目的IP地址等,在M2CNP等非IP协议中该标识信息可包括相应源地址和目的地址等。Before the network device sends the ICMP carrying the packet loss information to the sending device, the network device first obtains identification information from part of the data in the data frame, the identification information may include source address and destination address, etc., the identification information and packet loss information. Can be sent to the sending device along with ICMP. It should be noted that, in the Ethernet IP protocol, the identification information may include source IP address and destination IP address, etc., and in non-IP protocols such as M2CNP, the identification information may include corresponding source address and destination address.
为了确定数据帧对应的发送设备,网络设备获取到的标识信息可包括源IP地址,该源IP地址用于指示发送数据帧对应的发送设备。由于数据帧的部分数据包括IP包头,因此该源IP地址可以从IP包头中获取到。网络设备从IP包头中获取源IP地址后,可以根据该源IP地址向发送设备发送携带有丢包信息的ICMP。由于对数据帧的部分数据进行第二校验可以是对IP包头进行校验,因此,当对IP包头校验通过时,网络设备确定IP包头未被损坏,此时可从IP包头中获取正确的源IP地址,提高了网络设备对携带有丢包信息的ICMP进行发送的准确性。In order to determine the sending device corresponding to the data frame, the identification information acquired by the network device may include a source IP address, where the source IP address is used to indicate the sending device corresponding to the sending data frame. Since part of the data of the data frame includes the IP header, the source IP address can be obtained from the IP header. After obtaining the source IP address from the IP packet header, the network device can send the ICMP carrying the packet loss information to the sending device according to the source IP address. Since the second verification of part of the data of the data frame may be to verify the IP packet header, therefore, when the IP packet header verification is passed, the network device determines that the IP packet header is not damaged, and can obtain the correct information from the IP packet header at this time. source IP address, which improves the accuracy of network devices sending ICMP with packet loss information.
为了确定数据帧对应的接收设备,网络设备获取到的标识信息可包括目的IP地址,该源IP地址用于指示接收数据帧对应的接收设备。由于数据帧的部分数据包括IP包头,因此该目的IP地址可以从IP包头中获取到。网络设备从IP包头中获取目的IP地址后,可以根据源IP地址向发送设备发送携带有该目的IP地址的ICMP。由于对数据帧的部分数据进行第二校验可以是对IP包头进行校验,因此,当对IP包头校验通过时,网络设备确定IP包头未被损坏,此时可从IP包头中获取正确的目的IP地址,提高了网络设备向发送设备发送目的IP地址的准确性。In order to determine the receiving device corresponding to the data frame, the identification information obtained by the network device may include a destination IP address, and the source IP address is used to indicate the receiving device corresponding to the received data frame. Since part of the data of the data frame includes the IP header, the destination IP address can be obtained from the IP header. After obtaining the destination IP address from the IP packet header, the network device can send the ICMP carrying the destination IP address to the sending device according to the source IP address. Since the second verification of part of the data of the data frame may be to verify the IP packet header, therefore, when the IP packet header verification is passed, the network device determines that the IP packet header is not damaged, and can obtain the correct information from the IP packet header at this time. This improves the accuracy of the destination IP address sent by the network device to the sending device.
需要说明的是,TCP是一种面向连接及基于字节流的传输层通信协议,TCP通过拥塞控制机制来保证数据帧在网络中的可靠传输。TCP为了保证不发生丢包,就给每个数据帧设定一个序列号,同时该序列号也保证了数据帧从发送设备传输到接收设备的数据帧的按序接收。由于发送设备可能是向接收设备发送多个数据帧,因此当数据帧为网络设备接收到的发送设备发送给接收设备的多个数据帧时,该标识信息对应多个数据包,为了让发送设备准确获知是哪个数据包出现了丢包事件,此时网络设备获取到的标识信息还包括序列号,根据源IP地址向发送设备发送携带有该序列号的ICMP。例如,网络设备可以将序列号添加入ICMP的内容部分,随ICMP发送给发送设备。It should be noted that TCP is a connection-oriented and byte stream-based transport layer communication protocol, and TCP uses a congestion control mechanism to ensure reliable transmission of data frames in the network. In order to ensure that no packet loss occurs, TCP sets a sequence number for each data frame, and the sequence number also ensures the sequential reception of data frames transmitted from the sending device to the receiving device. Since the sending device may send multiple data frames to the receiving device, when the data frames are multiple data frames received by the network device and sent by the sending device to the receiving device, the identification information corresponds to multiple data packets. Accurately know which data packet has the packet loss event. At this time, the identification information obtained by the network device also includes the serial number, and the ICMP carrying the serial number is sent to the sending device according to the source IP address. For example, the network device may add a sequence number to the content portion of the ICMP and send it to the sending device along with the ICMP.
由于数据帧的部分数据可包括IP包头或TCP包头,因此该序列号可以从TCP包头或IP包头中获取到。本实施例中,由于当同一数据流上可能存在多个数据帧时,该标识信息对应的多个数据包,因此为了让发送设备准确获知是哪个数据包出现了丢包事件,此时网络设备获取已被损坏的数据包对应的序列号,将该序列号发送给发送设备,以使得发送设备根据该序列号确定已损坏的数据包,对该数据包进行准确重传,避免将所有数据包都进行重传而浪费网络资源。Since part of the data of the data frame may include an IP header or a TCP header, the sequence number can be obtained from the TCP header or the IP header. In this embodiment, when there may be multiple data frames on the same data stream, there are multiple data packets corresponding to the identification information. Therefore, in order for the sending device to know exactly which data packet has a packet loss event, at this time, the network device Obtain the serial number corresponding to the damaged data packet, and send the serial number to the sending device, so that the sending device can determine the damaged data packet according to the serial number, and accurately retransmit the data packet to avoid sending all data packets. All retransmissions are performed and network resources are wasted.
由于发送设备可能是向接收设备发送多条数据流,因此当数据帧为网络设备接收到的发送设备发送给至少两个接收设备的至少两条数据流上的数据帧时,为了让发送设备准确获知是哪条数据流上的数据帧出现了损坏,此时网络设备获取到的标识信息还包括端口信息,该端口信息可以包括源端口和目的端口等。由于数据帧的部分数据可以包括TCP包头,因此网络设备可以从TCP包头中获取端口信息,然后根据源IP地址向发送设备发送携带有该端口信息的ICMP,以使得发送设备根据端口信息确定已损坏的数据帧所在的数据流。Since the sending device may send multiple data streams to the receiving device, when the data frame is the data frame on at least two data streams received by the network device and sent by the sending device to at least two receiving devices, in order to make the sending device accurate It is known which data frame on which data stream is damaged, and the identification information obtained by the network device at this time also includes port information, and the port information may include source port and destination port. Since part of the data of the data frame can include the TCP header, the network device can obtain the port information from the TCP header, and then send the ICMP carrying the port information to the sending device according to the source IP address, so that the sending device determines according to the port information that it has been damaged. The data stream in which the data frame is located.
需要说明的是,网络设备还可以直接将未损坏的IP包头或TCP包头等包头发送给发送设备,由发送设备从包头中获取目的IP地址、序列号及端口信息等标识信息,再对数据包进行重传。例如,网络设备将未损坏的IP包头和TCP包头添加入ICMP的内容部分,并随ICMP发送至发送设备。发送设备可以从接收到的ICMP的内容部分获取IP包头,再从IP包头中提取目的IP地址,以及从接收到的ICMP的内容部分获取TCP包头,再从TCP包头中提取序列号。It should be noted that the network device can also directly send the undamaged IP header or TCP header and other headers to the sending device. retransmit. For example, a network device adds undamaged IP headers and TCP headers to the content portion of ICMP and sends it to the sending device with ICMP. The sending device can obtain the IP header from the received ICMP content, extract the destination IP address from the IP header, obtain the TCP header from the received ICMP content, and then extract the sequence number from the TCP header.
本实施例中,由于网络设备还可以在ICMP预留的多个字段中写入源IP地址、源端口、目的IP地址、目的端口和传输层协议类型等五元组,因此提高了发送设备根据该五元组便捷获知数据帧流向的便捷性。In this embodiment, since the network device can also write quintuple such as the source IP address, source port, destination IP address, destination port, and transport layer protocol type in multiple fields reserved by ICMP, it improves the efficiency of the sending device according to the The quintuple is convenient for knowing the flow direction of the data frame.
可以理解的是,网络设备在向发送设备发送携带有丢包信息、源IP地址、目的IP地址、序列号及端口信息等信息的ICMP时,可以是在预设时间周期内对一个或多个数据帧进行校验后,确定该一个或多个数据帧中存在丢包事件,且已损坏的数据帧的部分数据未被损坏时,网络设备将携带有丢包信息、源IP地址、目的IP地址、序列号及端口信息等信息的ICMP发送给发送设备。如果该时间周期内存在多个数据帧被损坏时,网络设备将每个数据帧对应的丢包信息、源IP地址、目的IP地址、序列号及端口信息等信息进行关联添加至ICMP,随ICMP一起发送给发送设备。It can be understood that when the network device sends the ICMP carrying information such as packet loss information, source IP address, destination IP address, serial number, and port information to the sending device, it may send one or more packets within a preset time period. After the data frame is verified, if it is determined that there is a packet loss event in the one or more data frames, and part of the data of the damaged data frame is not damaged, the network device will carry the packet loss information, source IP address, and destination IP address. ICMP of information such as address, serial number, and port information is sent to the sending device. If multiple data frames are damaged within the time period, the network device associates the packet loss information, source IP address, destination IP address, serial number, and port information corresponding to each data frame to ICMP, and adds them with ICMP. sent together to the sending device.
例如,在某个时间周期内,网络设备确定同一数据流上序列号为3至6的数据帧已损坏,则此次网络设备将携带有序列号为3至6的数据帧对应的丢包信息的ICMP发送给发送设备。或者是,在某个时间周期内,网络设备确定数据流A上序列号为1和数据流B上序列号为6的数据帧已损坏,则此次网络设备将携带有数据流A上序列号为1和数据流B上序列号为6的数据帧的丢包信息的ICMP发送给发送设备。For example, within a certain period of time, the network device determines that the data frames with sequence numbers 3 to 6 on the same data stream are damaged, then the network device will carry the packet loss information corresponding to the data frames with sequence numbers 3 to 6 this time. ICMP sent to the sending device. Or, within a certain period of time, the network device determines that the data frame with the sequence number 1 on the data stream A and the sequence number 6 on the data stream B is damaged, then the network device will carry the sequence number on the data stream A this time. The ICMP of the packet loss information of the data frame with sequence number 6 on data stream B and 1 is sent to the sending device.
可以理解的是,在实际应用中,网络设备除了按照预设时间周期向发送设备发送ICMP之外,还可以是其他的发送方式,例如,网络设备每校验一个数据帧,当确定引起丢包事件,且数据帧的部分数据未被损坏时,网络设备就向发送设备发一次携带有丢包信息、源IP地址、目的IP地址、序列号及端口信息等信息的ICMP,具体此处不作限定。It can be understood that, in practical applications, in addition to sending ICMP to the sending device according to a preset time period, the network device can also use other sending methods. When the event occurs and part of the data in the data frame is not damaged, the network device sends an ICMP containing packet loss information, source IP address, destination IP address, serial number and port information to the sending device, which is not limited here. .
当对数据帧的部分数据进行第二校验不通过时,说明数据帧的部分数据已被损坏,此时网络设备无法从数据帧的部分数据中获取正确的标识信息,网络设备将数据帧丢弃,或者执行其他操作,具体此处不作限定。When the second check on part of the data in the data frame fails, it means that part of the data in the data frame has been damaged. At this time, the network device cannot obtain correct identification information from part of the data in the data frame, and the network device discards the data frame. , or perform other operations, which are not specifically limited here.
306、发送设备在接收到ICMP后,根据ICMP中携带有丢包信息确定需要重传标识信息对应的数据包;306. After receiving the ICMP, the sending device determines, according to the packet loss information carried in the ICMP, that the data packet corresponding to the identification information needs to be retransmitted;
本实施例中,发送设备根据接收到的ICMP中携带有丢包信息确定需要重传数据包,在接收到丢包信息后,发送设备还可以进一步检测丢包信息是否携带有非拥塞丢包信息。若携带有非拥塞丢包信息,则发送设备根据非拥塞丢包信息确定重传机制,该重传机制为维持当前的拥塞控制机制,以及在当前的拥塞控制机制下执行重传数据包。In this embodiment, the sending device determines that the data packet needs to be retransmitted according to the packet loss information carried in the received ICMP, and after receiving the packet loss information, the sending device can further detect whether the packet loss information carries non-congested packet loss information . If the non-congested packet loss information is carried, the sending device determines a retransmission mechanism according to the non-congested packet loss information, and the retransmission mechanism is to maintain the current congestion control mechanism and retransmit the data packets under the current congestion control mechanism.
307、发送设备重传数据包;307. The sending device retransmits the data packet;
发送设备在接收到丢包信息后重传数据包,若接收到非拥塞丢包信息,则发送设备在接收到ICMP后,根据从ICMP中解析出非拥塞丢包信息确定由非网络拥塞原因引起的丢包事件,此时发送设备维持当前的拥塞控制机制,并在当前的拥塞控制机制下执行重传数据包。例如,若发送设备的拥塞控制机制处于慢启动阶段,则发送设备维持当前慢启动的拥塞控制机制对标识信息对应的数据包执行重传操作;若发送设备的拥塞控制机制处于拥塞避免阶段,则发送设备维持当前拥塞避免的拥塞控制机制对标识信息对应的数据包执行重传操作;若发送设备的拥塞控制机制处于快速重传阶段,则发送设备维持当前快速重传的拥塞控制机制对标识信息对应的数据包执行重传操作。The sending device retransmits the data packet after receiving the packet loss information. If it receives the non-congested packet loss information, the sending device determines that it is caused by non-network congestion according to the non-congested packet loss information parsed from ICMP after receiving the ICMP. In this case, the sending device maintains the current congestion control mechanism and retransmits the data packets under the current congestion control mechanism. For example, if the congestion control mechanism of the sending device is in the slow-start stage, the sending device maintains the current slow-start congestion control mechanism to retransmit the data packets corresponding to the identification information; if the congestion control mechanism of the sending device is in the congestion avoidance stage, then The sending device maintains the current congestion control mechanism of congestion avoidance to retransmit the data packets corresponding to the identification information; if the congestion control mechanism of the sending device is in the fast retransmission stage, the sending device maintains the current fast retransmission congestion control mechanism to the identification information. The corresponding data packet performs a retransmission operation.
308、网络设备对接收到的数据包进行校验;308. The network device checks the received data packet;
发送设备通过网络设备向接收设备重传的数据包时,网络设备对接收到重传的数据包进行校验,其校验机制与前述对数据帧的校验方式类似,此处不再赘述。When the sending device retransmits the data packet to the receiving device through the network device, the network device verifies the received retransmitted data packet.
309、当对重传的数据包校验通过时,网络设备将数据包发送给接收设备;309. When the verification of the retransmitted data packet is passed, the network device sends the data packet to the receiving device;
当对重传的数据包进行校验通过时,说明数据包未被损坏,此时网络设备将数据包发送给接收设备。When the verification of the retransmitted data packet is passed, it indicates that the data packet is not damaged, and the network device sends the data packet to the receiving device at this time.
310、接收设备在接收到重传的数据包时,通过网络设备向发送设备发送确认报文。310. When receiving the retransmitted data packet, the receiving device sends an acknowledgment packet to the sending device through the network device.
接收设备在接收到重传的数据包时,通过网络设备向发送设备发送确认报文,该确认报文用于指示接收设备已经接收到重传的数据包,该确认报文可以是ACK,该ACK携带有接收设备已接收到数据帧的确认信息。When the receiving device receives the retransmitted data packet, it sends an acknowledgment message to the sending device through the network device, and the acknowledgment message is used to indicate that the receiving device has received the retransmitted data packet. ACK carries confirmation that the receiving device has received the data frame.
为了保证接收设备向发送设备发送确认报文时,接收设备接收到的数据帧是未损坏的,而由于网络设备在将未损坏的数据帧传输给接收设备的过程中,数据帧也可能会在网络设备与接收设备之间传输的过程中被损坏,因此,接收设备在接收到重传的数据包时,首先对接收到重传的数据包进行校验,其校验机制与前述网络设备对数据帧进行第一校验、以及对数据帧的部分数据进行第二校验等校验的校验机制类似,具体此处不再赘述。In order to ensure that when the receiving device sends an acknowledgment message to the sending device, the data frame received by the receiving device is undamaged. Since the network device transmits the undamaged data frame to the receiving device, the data frame may also be in the The network device and the receiving device are damaged during the transmission process. Therefore, when the receiving device receives the retransmitted data packet, it first checks the received retransmitted data packet, and its verification mechanism is the same as that of the aforementioned network device. The verification mechanisms for performing the first verification on the data frame and performing the second verification on part of the data in the data frame are similar, and details are not repeated here.
当接收设备重传的数据包后,若接收设备确定重传的数据包未被损坏,则向发送设备发送确认报文。当接收设备重传的数据包后,若接收设备确定重传的数据包已被损坏,则生成重传的数据包的丢包信息,并向发送设备发送该丢包信息。After receiving the data packet retransmitted by the device, if the receiving device determines that the retransmitted data packet is not damaged, it sends an acknowledgment message to the sending device. After receiving the data packet retransmitted by the device, if the receiving device determines that the retransmitted data packet has been damaged, it generates packet loss information of the retransmitted data packet, and sends the packet loss information to the sending device.
(二)当校验设备为接收设备时,由接收设备对数据帧进行校验,请参照图4,本申请实施例中数据传输控制方法的另一实施例包括:(2) When the verification device is a receiving device, the data frame is verified by the receiving device. Referring to FIG. 4 , another embodiment of the data transmission control method in the embodiment of the present application includes:
401、发送设备通过网络设备向接收设备发送数据帧;401. The sending device sends a data frame to the receiving device through the network device;
402、接收设备对数据帧进行第一校验;402. The receiving device performs a first check on the data frame;
403、当第一校验不通过时,接收设备对数据帧的部分数据进行第二校验;403. When the first check fails, the receiving device performs a second check on part of the data of the data frame;
404、当第二校验通过时,接收设备生成携带有丢包信息的控制报文协议ICMP;404. When the second check is passed, the receiving device generates a control message protocol ICMP that carries the packet loss information;
405、接收设备通过网络设备向发送设备发送携带有丢包信息的ICMP;405. The receiving device sends the ICMP carrying the packet loss information to the sending device through the network device;
406、发送设备在接收到ICMP后,根据ICMP中携带有丢包信息确定需要重传标识信息对应的数据包;406. After receiving the ICMP, the sending device determines, according to the packet loss information carried in the ICMP, that the data packet corresponding to the identification information needs to be retransmitted;
407、发送设备重传数据包;407. The sending device retransmits the data packet;
408、接收设备对接收到的数据包进行校验;408. The receiving device checks the received data packet;
409、当对重传的数据包校验通过时,接收设备通过网络设备向发送设备发送确认报文。409. When the verification of the retransmitted data packet is passed, the receiving device sends a confirmation message to the sending device through the network device.
需要说明的是,对数据帧进行校验及生成ICMP等处理可以由网络设备执行之外,还可以由接收设备执行,本实施例中接收设备执行的步骤401至步骤409与前述图3所示实施例中网络设备执行的步骤306至步骤310类似,此处不再赘述。It should be noted that the processing of verifying the data frame and generating ICMP can be performed by the receiving device in addition to the network device. In this embodiment, steps 401 to 409 performed by the receiving device are the same as those shown in FIG. Steps 306 to 310 performed by the network device in the embodiment are similar, and are not repeated here.
二、校验设备向发送设备发送携带有丢包信息的ACK。2. The verification device sends an ACK carrying the packet loss information to the sending device.
本实施例中,该校验设备为接收设备,由接收设备对数据帧进行校验,请参照图5,本申请实施例中数据传输控制方法的另一实施例包括:In this embodiment, the verification device is a receiving device, and the data frame is verified by the receiving device. Referring to FIG. 5 , another embodiment of the data transmission control method in the embodiment of the present application includes:
501、发送设备通过网络设备向接收设备发送数据帧;501. The sending device sends a data frame to the receiving device through the network device;
502、接收设备对数据帧进行第一校验;502. The receiving device performs a first check on the data frame;
503、当第一校验不通过时,接收设备对数据帧的部分数据进行第二校验;503. When the first check fails, the receiving device performs a second check on part of the data of the data frame;
需要说明的是,本实施例中的步骤501至步骤503与前述图4所示实施例中的步骤401至步骤403类似,具体此处不再赘述。It should be noted that, steps 501 to 503 in this embodiment are similar to steps 401 to 403 in the foregoing embodiment shown in FIG. 4 , and details are not repeated here.
接收设备接收到的数据帧,可以是已经被网络设备校验过的数据帧,也可以是未经网络设备校验的数据帧,即发送设备将数据帧发送给网络设备进行检验后,由网络设备转发给接收设备,接收设备再对数据帧进行校验,或者是发送设备直接将数据帧通过网络设备发送给接收设备,由接收设备随数据帧进行校验。The data frame received by the receiving device can be a data frame that has been verified by the network device, or a data frame that has not been verified by the network device, that is, after the sending device sends the data frame to the network device for verification, the network The device forwards it to the receiving device, and the receiving device verifies the data frame, or the sending device directly sends the data frame to the receiving device through the network device, and the receiving device verifies along with the data frame.
504、当第二校验通过时,接收设备生成携带有丢包信息的控制报文协议ACK;504. When the second check is passed, the receiving device generates a control packet protocol ACK carrying the packet loss information;
当对数据帧的部分数据进行第二校验通过时,接收设备确定数据帧的该部分数据未被损坏,此时接收设备生成丢包信息,以及在ACK的选项字段中扩展丢包类型选项,将丢包信息添加至该丢包类型选项,该选项字段可以是TCP选项字段。When the second check is passed on part of the data in the data frame, the receiving device determines that the part of the data in the data frame is not damaged. At this time, the receiving device generates packet loss information, and expands the packet loss type option in the option field of the ACK, Add packet loss information to the packet loss type option, the option field may be a TCP option field.
505、接收设备通过网络设备向发送设备发送携带有丢包信息的ACK;505. The receiving device sends an ACK carrying the packet loss information to the sending device through the network device;
506、发送设备在接收到ACK后,根据ACK中携带有丢包信息确定需要重传标识信息对应的数据包;506. After receiving the ACK, the sending device determines, according to the packet loss information carried in the ACK, that the data packet corresponding to the identification information needs to be retransmitted;
507、发送设备重传数据包;507. The sending device retransmits the data packet;
508、接收设备对接收到的数据包进行校验;508. The receiving device checks the received data packet;
509、当对重传的数据包校验通过时,接收设备通过网络设备向发送设备发送确认报文。509. When the verification of the retransmitted data packet is passed, the receiving device sends an acknowledgement message to the sending device through the network device.
需要说明的是,本实施例中的步骤505至步骤509中接收设备发送ACK,以及对数据帧的重传操作,与前述图4所示实施例中的步骤405至步骤409中接收设备发送ICMP,以及对数据帧的重传操作类似,此处不再赘述。It should be noted that the sending of ACK by the receiving device in steps 505 to 509 in this embodiment and the retransmission of the data frame are the same as the sending of ICMP by the receiving device in steps 405 to 409 in the aforementioned embodiment shown in FIG. 4 . , and the retransmission operation of the data frame is similar, and will not be repeated here.
上面对本申请实施例中的数据传输控制方法进行了描述,下面对本申请实施例中的数据传输控制装置进行描述,请参阅图6,本申请实施例中数据传输控制装置一个实施例包括:The data transmission control method in the embodiment of the present application has been described above, and the data transmission control device in the embodiment of the present application is described below. Referring to FIG. 6, an embodiment of the data transmission control device in the embodiment of the present application includes:
接收单元601,用于接收发送设备发送的数据帧;a receiving
第一校验单元602,用于对接收单元601接收到的数据帧进行第一校验;a
第二校验单元603,用于当第一校验单元602确定第一校验不通过时,对接收单元601接收到的数据帧的部分数据进行第二校验;The
第一获取单元604,用于当第二校验单元603确定第二校验通过时,从数据帧的部分数据中获取标识信息;The first obtaining
第一发送单元605,用于根据第一获取单元604获取到的标识信息向发送设备发送丢包信息,该丢包信息包括第一获取单元获取到的标识信息,该标识信息用于指示与其对应的数据包发生了丢包。The
需要说明的是,本实施例中,数据传输控制装置中各个单元所执行的流程与前述图2所示的实施例中描述的方法流程类似,此处不再赘述。It should be noted that, in this embodiment, the process performed by each unit in the data transmission control apparatus is similar to the method process described in the embodiment shown in FIG. 2 , which is not repeated here.
本申请实施例的一些实施例中,丢包信息包括非拥塞丢包信息,非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。第一发送单元605具体用于,校验设备根据第一获取单元604获取到的标识信息向发送设备发送非拥塞丢包信息,非拥塞丢包信息用于指示发送设备维持当前的拥塞控制机制,以及在拥塞控制机制下对标识信息对应的数据包执行重传操作。In some embodiments of the embodiments of the present application, the packet loss information includes non-congestion packet loss information, and the non-congestion packet loss information is used to indicate a packet loss event caused by a cause other than network congestion. The
本申请实施例的一些实施例中,标识信息包括源IP地址,数据帧的部分数据包括IP包头,第一获取单元604具体用于,从IP包头中获取源IP地址。第一发送单元605具体用于,根据第一获取单元604获取到的源IP地址向发送设备发送丢包信息。In some embodiments of the embodiments of the present application, the identification information includes a source IP address, and part of the data of the data frame includes an IP packet header. The first obtaining
本申请实施例的一些实施例中,标识信息还包括目的IP地址,第一获取单元604具体用于,从IP包头中获取目的IP地址。第一发送单元605具体用于,根据第一获取单元604获取到的源IP地址向发送设备发送目的IP地址。In some embodiments of the embodiments of the present application, the identification information further includes a destination IP address, and the first obtaining
本申请实施例的一些实施例中,标识信息还包括序列号,数据帧的部分数据还包括TCP包头,第一获取单元604具体用于,从TCP包头或IP包头中获取序列号。第一发送单元605具体用于,根据第一获取单元604获取到的源IP地址向发送设备发送序列号。In some embodiments of the embodiments of the present application, the identification information further includes a sequence number, and part of the data of the data frame further includes a TCP header. The first obtaining
本申请实施例的一些实施例中,标识信息还包括端口信息,第一获取单元604具体用于,从TCP包头中获取端口信息;第一发送单元605具体用于,根据第一获取单元604获取到的源IP地址向发送设备发送端口信息。In some embodiments of the embodiments of the present application, the identification information further includes port information, and the first obtaining
本申请实施例的一些实施例中,第一校验单元602具体用于,在数据链路层对接收单元601接收到的数据帧进行校验。In some embodiments of the embodiments of the present application, the
本申请实施例的一些实施例中,第二校验单元603具体用于,在IP层对接收单元601接收到的数据帧中的部分数据进行IP包头校验。In some embodiments of the embodiments of the present application, the
本申请实施例的一些实施例中,数据传输控制装置还包括:第一添加单元,用于将丢包信息添加至预置的控制报文协议ICMP的丢包类型选项。第一发送单元605具体用于,向发送设备发送第一添加单元得到的携带有丢包信息的ICMP。In some embodiments of the embodiments of the present application, the data transmission control apparatus further includes: a first adding unit, configured to add the packet loss information to the preset packet loss type option of the control message protocol ICMP. The
本申请实施例的一些实施例中,数据传输控制装置还包括:第二添加单元,用于将丢包信息添加至预置的应答报文协议ACK的丢包类型选项。第一发送单元605具体用于,向发送设备发送第二添加单元得到的携带有丢包信息的ACK。In some embodiments of the embodiments of the present application, the data transmission control apparatus further includes: a second adding unit, configured to add the packet loss information to the preset packet loss type option of the response packet protocol ACK. The
需要说明的是,在本申请实施例的一些实施例中,数据传输控制装置中各个单元所执行的流程与前述图2至图5所示的实施例中描述的方法流程类似,此处不再赘述。It should be noted that, in some embodiments of the embodiments of the present application, the process performed by each unit in the data transmission control device is similar to the method process described in the embodiments shown in the foregoing FIG. 2 to FIG. 5 , which is not repeated here. Repeat.
上面对本申请实施例中的数据传输控制装置进行了描述,下面对本申请实施例中的发送设备进行描述,请参阅图7,本申请实施例中发送设备一个实施例包括:The data transmission control apparatus in the embodiment of the present application has been described above, and the sending device in the embodiment of the present application is described below. Referring to FIG. 7, an embodiment of the sending device in the embodiment of the present application includes:
发送单元701,用于向校验设备发送数据帧;A sending
侦测单元702,用于侦测是否接收到校验设备发送的丢包信息,丢包信息由校验设备对发送单元701发送的数据帧进行第一校验不通过,且对数据帧的部分数据进行第二校验通过时发送,该丢包信息包括校验设备从数据帧的部分数据中获取到的标识信息;The
执行单元703,用于若侦测单元702确定接收到校验设备发送的丢包信息,则对标识信息对应的数据包执行重传操作。The
本申请实施例的一些实施例中,执行单元703包括:判断子单元,用于判断丢包信息中是否包含非拥塞丢包信息,非拥塞丢包信息用于表示由非网络拥塞原因引起的丢包事件。执行子单元,用于若判断子单元确定丢包信息中包含非拥塞丢包信息,则维持当前的拥塞控制机制,以及在拥塞控制机制下对标识信息对应的数据包执行重传操作。In some embodiments of the embodiments of the present application, the
需要说明的是,在本申请实施例的实施例中,发送设备中各个单元所执行的流程与前述图2至图5所示的实施例中描述的方法流程类似,此处不再赘述。It should be noted that, in the embodiments of the embodiments of the present application, the processes performed by each unit in the sending device are similar to the method processes described in the foregoing embodiments shown in FIG. 2 to FIG. 5 , and are not repeated here.
上面从模块化功能实体的角度对本申请实施例中的数据传输控制装置及发送设备进行描述,下面从硬件处理的角度对本申请实施例中的校验设备进行描述,本申请实施例中的校验设备一个实施例包括:The data transmission control device and the sending device in the embodiments of the present application are described above from the perspective of modular functional entities, and the verification device in the embodiments of the present application is described below from the perspective of hardware processing. One embodiment of the device includes:
输入装置801、输出装置802、处理器803和存储器804(其中网络设备中的处理器801的数量可以一个或多个,图8中以一个处理器801为例)。在本发明的一些实施例中,输入装置801、输出装置802、处理器803和存储器804可通过总线或其它方式连接,其中,图8中以通过总线连接为例。An
其中,存储器804中存储有程序代码,通过调用存储器804存储的程序代码,处理器803用于执行如前述图2至图5所示实施例的方法。The
本申请实施例中的发送设备一个实施例包括:输入装置、输出装置、处理器和存储器(其中网络设备中的处理器的数量可以一个或多个)。在本发明的一些实施例中,输入装置、输出装置、处理器和存储器可通过总线或其它方式连接。其中,存储器中存储有程序代码,通过调用存储器存储的程序代码,处理器用于执行如前述图2至图5所示实施例的方法。An embodiment of the sending device in this embodiment of the present application includes: an input device, an output device, a processor, and a memory (wherein the number of processors in the network device may be one or more). In some embodiments of the invention, the input device, output device, processor and memory may be connected by a bus or otherwise. Wherein, program codes are stored in the memory, and by calling the program codes stored in the memory, the processor is configured to execute the methods of the embodiments shown in the foregoing FIG. 2 to FIG. 5 .
本申请实施例中,发送设备及接收设备均可以是终端,本实施例提供了一种终端,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该终端可以为包括手机、平板电脑、PDA(Personal DigitalAssistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端设备,以终端为手机为例:In this embodiment of the present application, both the sending device and the receiving device may be terminals. This embodiment provides a terminal. For convenience of description, only the parts related to the embodiments of the present application are shown. If the specific technical details are not disclosed, please Refer to the method section of the embodiment of the present application. The terminal can be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales, a sales terminal), a vehicle-mounted computer, etc. The terminal is a mobile phone as an example:
如图9所示,图9示出的是与本申请实施例提供的终端相关的手机的部分结构的框图。参考图9,手机包括:射频(Radio Frequency,RF)电路1110、存储器1120、输入单元1130、显示单元1140、传感器1150、音频电路1160、无线保真(wireless fidelity,WiFi)模块1170、处理器1180、以及电源1190等部件。本领域技术人员可以理解,图9中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 9 , FIG. 9 shows a block diagram of a partial structure of a mobile phone related to a terminal provided by an embodiment of the present application. Referring to FIG. 9 , the mobile phone includes: a radio frequency (RF)
下面结合图9对手机的各个构成部件进行具体的介绍:Below in conjunction with Figure 9, each component of the mobile phone will be introduced in detail:
RF电路1110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1180处理;另外,将设计上行的数据发送给基站。通常,RF电路1110包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(LowNoiseAmplifier,LNA)、双工器等。此外,RF电路1110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GlobalSystem of Mobile communication,GSM)、通用分组无线服务(General Packet RadioService,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The
存储器1120可用于存储软件程序以及模块,处理器1180通过运行存储在存储器1120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The
输入单元1130可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1130可包括触控面板1131以及其他输入设备1132。触控面板1131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1131上或在触控面板1131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1180,并能接收处理器1180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1131。除了触控面板1131,输入单元1130还可以包括其他输入设备1132。具体地,其他输入设备1132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The
显示单元1140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1140可包括显示面板1141,可选的,可以采用液晶显示器(LiquidCrystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1141。进一步的,触控面板1131可覆盖显示面板1141,当触控面板1131检测到在其上或附近的触摸操作后,传送给处理器1180以确定触摸事件的类型,随后处理器1180根据触摸事件的类型在显示面板1141上提供相应的视觉输出。虽然在图9中,触控面板1131与显示面板1141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1131与显示面板1141集成而实现手机的输入和输出功能。The
手机还可包括至少一种传感器1150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1141的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The cell phone may also include at least one
音频电路1160、扬声器1161,传声器1162可提供用户与手机之间的音频接口。音频电路1160可将接收到的音频数据转换后的电信号,传输到扬声器1161,由扬声器1161转换为声音信号输出;另一方面,传声器1162将收集的声音信号转换为电信号,由音频电路1160接收后转换为音频数据,再将音频数据输出处理器1180处理后,经RF电路1110以发送给比如另一手机,或者将音频数据输出至存储器1120以便进一步处理。The
WiFi属于短距离无线传输技术,手机通过WiFi模块1170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图9示出了WiFi模块1170,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the
处理器1180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1120内的软件程序和/或模块,以及调用存储在存储器1120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1180可包括一个或多个处理单元;优选的,处理器1180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1180中。The
手机还包括给各个部件供电的电源1190(比如电池),优选的,电源可以通过电源管理系统与处理器1180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 1190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may also include a camera, a Bluetooth module, and the like, which will not be repeated here.
在本申请实施例中,该终端所包括的处理器1180还具有以下功能:处理器调用存储器中的程序代码时执行如前述图2至图5所示实施例的数据传输控制方法。In this embodiment of the present application, the
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus 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 may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions recorded in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710570007.0ACN109257138B (en) | 2017-07-13 | 2017-07-13 | Data transmission control method and related equipment |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710570007.0ACN109257138B (en) | 2017-07-13 | 2017-07-13 | Data transmission control method and related equipment |
| Publication Number | Publication Date |
|---|---|
| CN109257138A CN109257138A (en) | 2019-01-22 |
| CN109257138Btrue CN109257138B (en) | 2020-11-17 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710570007.0AActiveCN109257138B (en) | 2017-07-13 | 2017-07-13 | Data transmission control method and related equipment |
| Country | Link |
|---|---|
| CN (1) | CN109257138B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111246312A (en)* | 2020-01-15 | 2020-06-05 | 安徽文香信息技术有限公司 | Packet loss processing method and device |
| CN113936670B (en)* | 2020-06-28 | 2025-06-24 | 腾讯科技(深圳)有限公司 | Packet loss retransmission method, system, device, computer-readable storage medium and equipment |
| CN111741013B (en)* | 2020-07-21 | 2021-02-26 | 炬芯科技股份有限公司 | Data transmission method and device |
| CN113133031B (en)* | 2021-03-22 | 2022-08-19 | 厦门亿联网络技术股份有限公司 | Signal diagnosis method, system, equipment and storage medium |
| CN113329429B (en)* | 2021-06-08 | 2022-06-21 | 安科讯(福建)科技有限公司 | Rate scheduling method and terminal |
| CN114520710B (en)* | 2022-01-27 | 2024-12-27 | 络源(上海)半导体科技有限公司 | USB2.0 protocol five-bit cyclic redundancy check method, device and equipment |
| CN115238830B (en)* | 2022-09-21 | 2023-03-24 | 广东柯内特环境科技有限公司 | Method for setting running threshold of equipment, monitoring method and monitoring system |
| CN115865280A (en)* | 2022-11-07 | 2023-03-28 | 武汉智慧地铁科技有限公司 | MAC layer-based data packet loss retransmission method and transceiver communication device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8724449B2 (en)* | 2009-06-10 | 2014-05-13 | Cisco Technology, Inc. | Failure protection for access ring topology |
| CN104518853A (en)* | 2013-09-27 | 2015-04-15 | 北京新媒传信科技有限公司 | Data retransmission method, receiving end and system |
| CN105871512A (en)* | 2016-05-13 | 2016-08-17 | 华为技术有限公司 | Data transmission method and device |
| CN106878191A (en)* | 2015-12-14 | 2017-06-20 | 华为技术有限公司 | A data transmission method, a sending node, a receiving node and a data transmission system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8724449B2 (en)* | 2009-06-10 | 2014-05-13 | Cisco Technology, Inc. | Failure protection for access ring topology |
| CN104518853A (en)* | 2013-09-27 | 2015-04-15 | 北京新媒传信科技有限公司 | Data retransmission method, receiving end and system |
| CN106878191A (en)* | 2015-12-14 | 2017-06-20 | 华为技术有限公司 | A data transmission method, a sending node, a receiving node and a data transmission system |
| CN105871512A (en)* | 2016-05-13 | 2016-08-17 | 华为技术有限公司 | Data transmission method and device |
| Title |
|---|
| 《MANET网络TCP非拥塞控制识别序列与恢复》;王雪飞;《计算机工程》;20090205;第35卷(第3期);正文第119页* |
| Publication number | Publication date |
|---|---|
| CN109257138A (en) | 2019-01-22 |
| Publication | Publication Date | Title |
|---|---|---|
| CN109257138B (en) | Data transmission control method and related equipment | |
| US9247581B2 (en) | Multiple-processor wireless mobile communication device | |
| CN113411313B (en) | Data transmission method, device and system | |
| CN111010262B (en) | Radio link control transmission method and related products | |
| KR102046792B1 (en) | Method of transporting data from sending node to destination node | |
| WO2019001406A1 (en) | Data transmission method, user equipment and network device | |
| WO2014079382A1 (en) | Voice transmission method, terminal, voice server and voice transmission system | |
| CN110234124B (en) | Information transmission method and terminal equipment | |
| WO2018036026A1 (en) | Data transmission method, base station, target terminal, system and storage medium | |
| EP1934761B1 (en) | Dma transfer and hardware acceleration of ppp frame processing | |
| US20240405929A1 (en) | Method, apparatus, device, and medium for transmitting data | |
| CN112612745A (en) | Data transmission method and device, electronic equipment and readable storage medium | |
| AU2017412432B2 (en) | Data re-transmission control method and related product | |
| CN107342979A (en) | Method and terminal device for processing packets | |
| CN117573596A (en) | Multi-chip communication method, system and storage medium | |
| CN105684383A (en) | Device, system and method for data packet transmission | |
| CN113572569B (en) | A transmission rate switching method and related devices | |
| CN115915217A (en) | Method and device for monitoring data transmission fault | |
| WO2020024107A1 (en) | Status report sending method and device | |
| WO2020156473A1 (en) | Transmission method and terminal | |
| CN109117630B (en) | Method for reducing log loss, mobile terminal and readable storage medium | |
| CN105792154A (en) | Multimedia message transmission method and device | |
| CN119210659A (en) | Communication method, device and electronic device | |
| CN112865930A (en) | Method, related device and system for sending polling message | |
| CN119583405A (en) | Method, client device and storage medium for managing data loss rate |
| 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 |