CN109257138B - Data transmission control method and related equipment - Google Patents

Data transmission control method and related equipment Download PDF

Info

Publication number
CN109257138B
CN109257138B CN201710570007.0A CN201710570007A CN109257138B CN 109257138 B CN109257138 B CN 109257138B CN 201710570007 A CN201710570007 A CN 201710570007A CN 109257138 B CN109257138 B CN 109257138B
Authority
CN
China
Prior art keywords
data
packet loss
sending
data frame
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710570007.0A
Other languages
Chinese (zh)
Other versions
CN109257138A (en
Inventor
王伟光
李峰
周兴旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710570007.0A priority Critical patent/CN109257138B/en
Publication of CN109257138A publication Critical patent/CN109257138A/en
Application granted granted Critical
Publication of CN109257138B publication Critical patent/CN109257138B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1809Selective-repeat protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application discloses a data transmission control method and related equipment, which are used for improving the flexibility of data transmission control. The method in the embodiment of the application comprises the following steps: the checking equipment receives the data frame sent by the sending equipment; the checking equipment carries out first checking on the data frame; when the first check is failed, the check equipment performs second check on partial data in the data frame; when the second check passes, the check device acquires identification information from the partial data of the data frame; and the verification equipment sends packet loss information to the sending equipment, wherein the packet loss information comprises the identification information, and the identification information is used for indicating that the data packet corresponding to the identification information has packet loss.

Description

Data transmission control method and related equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission control method and a related device.
Background
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 check fails, the data frame is determined to be damaged in the transmission process, the damaged data frame is finally discarded by the network device, and a Transmission Control Protocol (TCP) is determined to be a packet loss event caused by network congestion.
When the data frame is damaged, the network device directly discards the damaged data frame, and at this time, the sending device cannot know that the packet loss event occurs due to the damage of the data frame, but the default is the packet loss event due to network congestion, so that the processing of the network device on data transmission is relatively rigid and inflexible.
Disclosure of Invention
In order to solve the technical problem that processing of data transmission in the prior art is not flexible enough due to the adoption of a default mode, an embodiment of the application provides a data transmission control method, and when a checking device fails to perform first checking on a received data frame and passes second checking on part of data of the data frame, identification information is acquired from part of data of the data frame, and packet loss information carrying the identification information is sent to a sending device, so that the sending device can timely know that a packet loss event occurs according to the packet loss information and know that a corresponding data packet has packet loss according to the identification information, and therefore the data packet corresponding to the identification information is retransmitted, and flexibility of data transmission control is improved. The embodiment of the application also provides related equipment such as a data transmission control device, sending equipment, checking equipment, a computer storage medium and the like.
A first aspect of an embodiment of the present application provides a data transmission control method, which may include: the verification device receives the data frame sent by the sending device, and the verification device may be a network device or a receiving device, that is, the corruption of the data frame may be found on the network device or found 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 forwarded by the sending device. The check device then performs a first check on the received data frame, which may be a Cyclic Redundancy Check (CRC) or a Frame Check Sequence (FCS), etc. When the first check fails, the checking device determines that the data frame has been corrupted. At this time, the verification device performs a second verification on the partial data of the data frame, for example, the partial data of the data frame may include an IP packet header or a TCP packet header, and the like, that is, performing the second verification on the partial data of the data frame may be performing a verification on an IP packet header checksum, and may also perform a verification on a TCP packet header, and the like. When a second check passes on a portion of data of the data frame, the check device determines that the portion of data of the data frame is not corrupted. When the second check passes, the check device obtains identification information from the part of data of the data frame, where the identification information may include a source address, a destination address, and the like, and the identification information may be used to indicate that a packet loss occurs in a data packet corresponding to the identification information. Since part of the data frame is not damaged, the identification information acquired from the part of the data is correct at this time. After obtaining the correct identification information, the verification device may send packet loss information to the sending device, where the packet loss information includes the identification information. Therefore, the sending equipment determines that the data frame is lost according to the packet loss information, and knows that the corresponding data packet is lost according to the identification information, 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.
With reference to the first aspect of the embodiment of the present application, in the first implementation manner 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 may generate the non-congestion packet loss information, where the non-congestion packet loss information is used to indicate a packet loss event caused by the non-network congestion. For example, the data frame is damaged due to hardware failure, signal interference, and the like, and when the data frame is transmitted using a medium with relatively poor link quality, such as a wireless WIFI network, an unshielded twisted pair, or a wireless cellular network, the data frame is also damaged, and these conditions that the data frame is discarded after the data frame is damaged all belong to a packet loss event caused by the reason of non-network congestion. At this time, the checking device may send non-congestion packet loss information to the sending device, so that the sending device determines, according to the non-congestion packet loss information, that the packet loss event is caused by the non-network congestion cause, so that the sending device maintains a current congestion control mechanism, and performs a retransmission operation on a data packet corresponding to the identification information under the congestion control mechanism, where the data packet may be a data packet of a TCP layer or a data packet of a UDP layer. The method avoids the sending equipment from carrying out wrong multiplicative speed reduction, reduces the sending rate by reducing the congestion window so as to reduce the network congestion degree, improves the utilization rate of the network link and improves the throughput of the network.
With reference to the first aspect of the present embodiment or the first implementation manner of the first aspect of the present embodiment, in a second implementation manner of the first aspect of the present embodiment, in order to determine a sending device corresponding to a data frame, identification information obtained by a verification device may include a source IP address, and part of data of the data frame includes an IP packet header, where the source IP address may be obtained from the IP packet header. After obtaining the source IP address from the IP packet header, the calibration device may send packet loss information to the sending device according to the source IP address. Since the second check on the partial data of the data frame may be to check the IP packet header, when the IP packet header passes the check, the check device determines that the IP packet header is not damaged, and at this time, the correct source IP address may be obtained from the IP packet header, so that the check device is convenient to correctly send the packet loss information to the corresponding sending device, and the accuracy of sending the packet loss information by the check device is improved.
With reference to the second implementation manner of the first aspect of the embodiment of the present application, in a third implementation manner of the first aspect of the embodiment of the present application, in order to determine a receiving device corresponding to a data frame, identification information obtained by a verification device may include a destination IP address, where the destination IP address may be obtained from an IP packet header. After obtaining the destination IP address from the IP packet header, the calibration device may send the destination IP address to the sending device according to the source IP address. Since the second check on the partial data of the data frame may be to check the IP packet header, when the IP packet header passes the check, the check device determines that the IP packet header is not damaged, and at this time, the correct destination IP address may be obtained from the IP packet header, thereby improving the accuracy of sending the destination IP address to the sending device by the check device.
With reference to the third implementation manner of the first aspect of the embodiment of the present application, in the fourth implementation manner of the first aspect of the embodiment of the present application, the identification information obtained by the verification device further includes a sequence number, and part of data of the data frame may include an IP packet header or a TCP packet header, and the sequence number may be obtained from the TCP packet header or the IP packet header. When a plurality of data frames may exist on the same data stream, the plurality of data packets corresponding to the identification information, so that the transmitting device can accurately know which data packet has a packet loss event, at this time, the verifying device obtains a sequence number corresponding to the damaged data packet, and transmits the sequence number to the transmitting device, so that the transmitting device can determine the damaged data packet according to the sequence number, accurately retransmit the data packet, and avoid wasting network resources due to retransmission of all data packets.
With reference to the fourth implementation manner of the first aspect of the present application, in a fifth implementation manner of the first aspect of the present application, the identification information obtained by the verification device further includes port information, where the port information may include a source port, a destination port, and the like. When the data frame is a data frame on at least two data streams sent to the receiving device by the sending device and received by the verifying device, in order to enable the sending device to know which data stream the data frame on is damaged, the verifying device may obtain the port information from the TCP packet header, and then send the port information 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 to enable the sending device to accurately know which data frame on which data stream is damaged, the checking device obtains the port information and sends the port information to the sending device, so that the sending device determines the data stream where the damaged data frame is located according to the port information.
With reference to the first aspect of the embodiment of the present application and any one of the first implementation manner to the fifth implementation manner of the first aspect of the embodiment of the present application, in a sixth implementation manner of the first aspect of the embodiment of the present application, the performing, by the checking device, the first check on the data frame may be performed on the data frame at a data link layer, for example, performing, at the data link layer, CRC check or FCS check on the data frame, and taking cyclic redundancy check as an example, the checking device may calculate a cyclic redundancy check code according to the content of the data frame, and compare the cyclic redundancy check code with a check code preset at a tail portion in the data frame. When the cyclic redundancy check code is inconsistent with the check code, the check equipment determines that the check on the data frame is not passed. Therefore, the data frame can be conveniently checked by the checking equipment, and the convenience of checking the data frame by the checking equipment is improved.
With reference to the first aspect of the embodiment of the present application and any one of the first implementation manner to the sixth implementation manner of the first aspect of the embodiment of the present application, in a seventh implementation manner of the first aspect of the embodiment of the present application, the performing, by the checking device, the second check on the partial data in the data frame may be performing, at an IP layer, an IP header check on the partial data in the data frame. For example, the verification device obtains the content in the IP packet header at the IP layer, and calculates the checksum and the verification code according to the content in the IP packet header. And then the check equipment compares the check sum check code with a preset check code in the IP packet header, and when the check sum check code is consistent with the check code, the check equipment determines that the check sum check of the IP packet header passes. Therefore, the verification equipment can conveniently verify partial data of the data frame, and the convenience of the verification equipment in verifying the partial data of the data frame is improved.
With reference to the first aspect of the present embodiment and any one of the first to seventh implementation manners of the first aspect of the present embodiment, in an eighth implementation manner of the first aspect of the present embodiment, when the checking device is a network device or a receiving device corresponding to a data frame, before the checking device sends packet loss information to the sending device, the checking device may expand a packet loss type option in an option field of a preset control message protocol (internet control message protocol, abbreviated as ICMP), and add the packet loss information to the packet loss type option. When the checking equipment sends packet loss information to the sending equipment, the checking equipment sends the ICMP carrying the packet loss information to the sending equipment. Therefore, when the checking equipment is network equipment or receiving equipment, the packet loss information can be conveniently fed back to the sending equipment.
With reference to the first aspect of the embodiment of the present application and any one of the first to seventh implementation manners of the first aspect of the embodiment of the present application, in a ninth implementation manner of the first aspect of the embodiment of the present application, when the verification device is a receiving device corresponding to a data frame, before the verification device sends packet loss information to the sending device, the verification device may extend a packet loss type option in an option field of a preset acknowledgement message protocol (english full name: ACK), and add the packet loss information to the packet loss type option. When the verification device sends packet loss information to the sending device, the verification device sends an ACK carrying the packet loss information to the sending device. Because the ACK is generated at the TCP layer and the network device cannot see the TCP layer, the ACK with the packet loss information can be generated only when the verification device is the receiving device, so that the flexibility of the receiving device feeding back the packet loss information to the sending device is improved.
A second aspect of the embodiments of the present application provides a data transmission control method, which may include: the sending device sends the data frame to a checking device, which may be a network device or a receiving device. For example, the transmitting device transmits a data frame to the network device, or the transmitting device transmits a data frame to the receiving device through the network device. The sending device detects whether packet loss information sent by the checking device is received, the packet loss information is sent when the first checking of the checking device on the data frame fails and the second checking of partial data of the data frame passes, the packet loss information comprises identification information acquired by the checking device from the partial data of the data frame, and the identification information is used for indicating that a packet corresponding to the identification information is lost. If the sending device detects and receives packet loss information sent by the checking device, the sending device determines that the data frame is lost according to the packet loss information, and knows that the corresponding data packet is lost according to the identification information, so that retransmission operation is performed on the data packet corresponding to the identification information, and flexibility of data transmission control is improved.
With reference to the second aspect of the present application, in the first implementation manner of the second aspect 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, and in a process that the sending device performs a retransmission operation on a data packet corresponding to the identification information, the sending device first determines whether the packet loss information includes the non-congestion packet loss information, where the non-congestion packet loss information is used to indicate a packet loss event caused by a non-network congestion reason. For example, the data frame is damaged due to hardware failure, signal interference, and the like, and when the data frame is transmitted using a medium with relatively poor link quality, such as a wireless WIFI network, an unshielded twisted pair, or a wireless cellular network, the data frame is also damaged, and these conditions that the data frame is discarded after the data frame is damaged all belong to a packet loss event caused by the reason of non-network congestion. If the packet loss information contains non-congestion packet loss information, the sending equipment determines that the packet loss event is caused by non-network congestion according to the non-congestion packet loss information, so that the sending equipment maintains the current congestion control mechanism, and performs retransmission operation on the data packet corresponding to the identification information under the 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 perform retransmission operation on the data packet 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 perform retransmission operation on the data packet corresponding to the identification information, and so on. The method avoids the sending equipment from carrying out wrong multiplicative speed reduction, reduces the sending rate by reducing the congestion window so as to reduce the network congestion degree, improves the utilization rate of the network link and improves the throughput of the network.
A third aspect of the embodiments of the present application provides a data transmission control apparatus, which may include: the device comprises 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 is used for receiving the data frame sent by the sending equipment. The first checking unit is configured to perform a first check on the data frame received by the receiving unit, where the first check may be a CRC check or an FCS check, and when the first checking unit determines that the check fails, the second checking unit determines that the data frame is damaged. At this time, the second checking unit performs the second checking on the partial data of the data frame, for example, the partial data of the data frame may include an IP packet header or a TCP packet header, and the second checking on the partial data of the data frame may be checking on the IP packet header or checking on the TCP packet header. When a second check-up pass is performed on partial data of the data frame, the second check-up unit determines that the partial data of the data frame is not corrupted. When the second check unit determines that the second check is passed, the first obtaining unit obtains identification information from the part of data of the data frame, wherein the identification information may include a source address, a destination address and the like, and the identification information may be used for indicating that packet loss occurs to a data packet corresponding to the identification information. Since part of the data frame is not damaged, the identification information acquired 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 packet loss information carrying the identification information to the sending device, so that the sending device determines that the data frame is lost according to the packet loss information, and obtains that the corresponding data packet is lost according to the identification information, thereby performing retransmission operation on the data packet corresponding to the identification information, and improving flexibility of data transmission control.
With reference to the third aspect of the present application, in the first implementation manner of the third aspect 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, where the non-congestion packet loss information is used to indicate a packet loss event caused by non-network congestion. For example, the data frame is damaged due to hardware failure, signal interference, and the like, and when the data frame is transmitted using a medium with relatively poor link quality, such as a wireless WIFI network, an unshielded twisted pair, or a wireless cellular network, the data frame is also damaged, and these conditions that the data frame is discarded after the data frame is damaged all belong to a packet loss event caused by the reason of non-network congestion. At this time, the first sending unit may send non-congestion packet loss information to the sending device, so that the sending device determines, according to the non-congestion packet loss information, that the packet loss event is caused by the non-network congestion reason, so that the sending device maintains a current congestion control mechanism, and performs a retransmission operation on a data packet corresponding to the identification information under the congestion control mechanism. The method avoids the sending equipment from carrying out wrong multiplicative speed reduction, reduces the sending rate by reducing the congestion window so as to reduce the network congestion degree, improves the utilization rate of the network link and improves the throughput of the network.
With reference to the third aspect of the present embodiment or the first implementation manner of the third aspect of the present embodiment, in a second implementation manner of the third aspect of the present embodiment, in order to determine a sending device corresponding to a data frame, the identification information acquired by the first acquiring unit may include a source IP address, and part of data of the data frame includes an IP packet header, where the source IP address may be acquired from the IP packet header by the first acquiring unit. After the first obtaining unit obtains the source IP address from the IP packet header, the first sending unit may send packet loss information to the sending device according to the source IP address obtained by the first obtaining unit. Since the second checking unit may check the IP packet header, when the IP packet header passes the checking, the second checking unit determines that the IP packet header is not damaged, and the first obtaining unit may obtain the correct source IP address from the IP packet header, so that the first sending unit is convenient to correctly send the packet loss information to the corresponding sending device, and the accuracy of sending the packet loss information by the first sending unit is improved.
With reference to the second implementation manner of the third aspect of the embodiment of the present application, in a third implementation manner of the third aspect of the embodiment of the present application, in order to determine a receiving device corresponding to a data frame, the identification information acquired by the first acquiring unit may include a destination IP address, and the destination IP address may be acquired from an 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 check unit performs the second check on the partial data of the data frame, which may be to check the IP packet header, when the IP packet header passes the check, the second check unit determines that the IP packet header is not damaged, and at this time, the first obtaining unit may obtain a correct destination IP address from the IP packet header, thereby improving the accuracy of the first sending unit sending the destination IP address obtained by the first obtaining unit to the sending device.
With reference to the third implementation manner of the third aspect of the present application, in a fourth implementation manner of the third aspect of the present application, the identification information acquired by the first acquiring unit further includes a sequence number, a part of data of the data frame 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. Because a plurality of data packets corresponding to the identification information may exist on the same data stream, in order to enable the sending device to accurately know which data packet has a packet loss event, at this time, the first obtaining unit obtains a sequence number corresponding to the damaged data packet, and the first sending unit sends the sequence 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 sequence number, and accurately retransmits the data packet, thereby avoiding the waste of network resources due to the retransmission of all the data packets.
With reference to the fourth implementation manner of the third aspect of the embodiment of the present application, in a fifth implementation manner of the third aspect of the embodiment of the present application, the identification information acquired by the first acquiring unit further includes port information, where the port information may include a source port, a destination port, and the like. When the data frame is a data frame on at least two data streams sent to the receiving device by the sending device and received by the receiving unit, in order to enable the sending device to know which data stream has a damaged data frame, the first obtaining unit may obtain the port information 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 to enable the sending device to accurately know which data frame on which data stream is damaged, the first obtaining unit obtains the port information and then sends the port information to the sending device by the first sending unit, so that the sending device determines the data stream where the damaged data frame is located according to the port information.
With reference to the third aspect of the embodiment of the present application and any one of the first to fifth implementation manners of the third aspect of the embodiment of the present application, in a sixth implementation manner of the third aspect of the embodiment of the present application, the performing, by the first checking unit, the first check on the data frame may be performing a check on the data frame at a data link layer, for example, performing a CRC check or an FCS check on the data frame at the data link layer, taking a cyclic redundancy check as an example, the first checking unit may calculate a cyclic redundancy check code according to the content of the data frame, and compare the cyclic redundancy check code with a check code preset at a tail portion in 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. Therefore, the first checking unit can conveniently check the data frame, and the convenience of checking the data frame by the first checking unit is improved.
With reference to the third aspect of the present embodiment and any one of the first to sixth implementation manners of the third aspect of the present embodiment, in a seventh implementation manner of the third aspect of the present embodiment, the performing, by the second checking unit, the second check on the partial data in the data frame may be performing, at an IP layer, an IP header check on the partial data in the data frame. For example, the second checking unit obtains the content in the IP packet header at the IP layer, and calculates the checksum according to the content in the IP packet header. And then the second checking unit compares the check sum check code with a preset check code in the IP packet header, and when the check sum check code is consistent with the check code, the second checking unit determines that the check sum check of the IP packet header passes. The second checking unit can conveniently check the partial data of the data frame, and the convenience of checking the partial data of the data frame by the second checking unit is improved.
With reference to the third aspect of the present application and any one of the first implementation manner to the seventh implementation manner of the third aspect of the present application, in an eighth implementation manner of the third aspect of the present application, the data transmission control device further includes a first adding unit, where the first adding unit may extend a packet loss type option in an option field of a 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. The first adding unit conveniently packages the packet loss information to the ICMP, and the first sending unit feeds back the ICMP to the sending equipment, so that the sending equipment can know that the data frame is damaged due to non-network congestion according to the packet loss information carried in the ICMP.
With reference to the third aspect of the present application and any one of the first implementation manner to the seventh implementation manner of the third aspect of the present application, in a ninth implementation manner of the third aspect of the present application, the data transmission control apparatus further includes a second adding unit, where the second adding unit may extend a packet loss type option in an option field of a preset acknowledgement 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, to the sending device, the ACK carrying the packet loss information obtained by the first adding unit. The flexibility of feeding back the packet loss information to the sending equipment by the first sending unit is improved.
A fourth aspect of the present embodiment provides a sending device, which may include a sending unit, a detecting unit, an executing unit, and the like, where the sending unit sends a data frame to a checking device, and the checking device may be a network device or a receiving device. For example, the transmitting unit transmits a data frame to the network device, or the transmitting unit transmits a data frame to the receiving device through the network device. At this time, the detecting unit detects whether packet loss information sent by the verifying device is received, the packet loss information is sent when the verifying device does not perform the first verification on the data frame and performs the second verification on part of the data frame, the packet loss information includes identification information acquired by the verifying device from the part of the data frame, and the identification information is used for indicating that a packet corresponding to the identification information is lost. If the detecting unit detects and receives packet loss information sent by the checking device, the executing unit determines that the data frame is lost according to the packet loss information, and knows that the corresponding data packet is lost according to the identification information, so that retransmission operation is executed on the data packet corresponding to the identification information, and flexibility of data transmission control is improved.
With reference to the fourth aspect of the present application, in the first implementation manner of the fourth aspect of the present application, the executing unit may include a determining subunit and an executing subunit, where 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, and in a process of performing a retransmission operation on a data packet corresponding to the identification information, the executing unit first determines, by the determining subunit, whether the packet loss information includes the non-congestion packet loss information, where the non-congestion packet loss information is used to indicate a packet loss event caused by a non-network congestion reason. For example, the data frame is damaged due to hardware failure, signal interference, and the like, and when the data frame is transmitted using a medium with relatively poor link quality, such as a wireless WIFI network, an unshielded twisted pair, or a wireless cellular network, the data frame is also damaged, and these conditions that the data frame is discarded after the data frame is damaged all belong to a packet loss event caused by the reason of non-network congestion. If the packet loss information contains non-congestion packet loss information, the execution unit determines that the packet loss event is caused by non-network congestion according to the non-congestion packet loss information, so that the execution unit maintains the current congestion control mechanism and executes retransmission operation on the data packet corresponding to the identification information under the congestion control mechanism. 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 execute retransmission operation on the data packet corresponding to the identification information; if the congestion control mechanism of the sending device is in the fast retransmission stage, the execution unit maintains the current fast retransmission congestion control mechanism to perform retransmission operation on the data packet corresponding to the identification information, and so on. The method avoids the sending equipment from carrying out wrong multiplicative speed reduction, reduces the sending rate by reducing the congestion window so as to reduce the network congestion degree, improves the utilization rate of the network link and improves the throughput of the network.
A fifth aspect of the embodiments of the present application provides a verification apparatus, which may include: a processor, a memory, a bus, an input device, and an output device; the memory stores program codes, and the processor executes the data transmission control method according to any one of the first aspect of the embodiment of the present application, the first implementation manner of the first aspect of the embodiment of the present application, and the ninth implementation manner of the first aspect of the embodiment of the present application when calling the program codes in the memory.
A sixth aspect of the present embodiment provides a verification apparatus, which may include: a processor, a memory, a bus, an input device, and an output device; the memory stores program codes, and the processor executes the data transmission control method according to the second aspect of the embodiment of the present application or the first implementation manner of the second aspect of the embodiment of the present application when calling the program codes in the memory.
A seventh aspect of the embodiments of the present application provides a computer program product including instructions, which when run on a computer, causes the computer to execute the data transmission control method according to 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, and the ninth implementation manner of the first aspect of the embodiments of the present application.
An eighth aspect of the embodiments of the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the data transmission control method according to the second aspect of the embodiments of the present application or the first implementation manner of the second aspect of the embodiments of the present application.
A ninth aspect of the embodiments of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes the data transmission control method according to 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, and the ninth implementation manner of the first aspect of the embodiments of the present application.
A tenth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute a data transmission control method according to the second aspect of the embodiments of the present application or the first implementation manner of the second aspect of the embodiments of the present application.
According to the technical scheme, the embodiment of the application has the following advantages:
when the first check of the received data frame is failed and the second check of the partial data of the data frame is passed, the check device indicates that the data frame is damaged but the identification information contained in the partial data of the data frame is not damaged, and at this time, the check device may obtain the identification information from the partial data of the data frame. Then, the checking device sends packet loss information carrying the identification information to the sending device, so that the sending device can timely know that a packet loss event occurs according to the packet loss information and know that a corresponding data packet is lost according to the identification information, and therefore the data packet corresponding to the identification information is retransmitted, and flexibility of data transmission control is improved.
Drawings
Fig. 1 is an architecture diagram of a communication system in an embodiment of the present application;
fig. 2 is a schematic diagram of an embodiment of a data transmission control method in the embodiment of the present application;
fig. 3 is a schematic diagram of another embodiment of a data transmission control method in the embodiment of the present application;
fig. 4 is a schematic diagram of another embodiment of a data transmission control method in the embodiment of the present application;
fig. 5 is a schematic diagram of another embodiment of a data transmission control method in the embodiment of the present application;
fig. 6 is a schematic diagram of an embodiment of a data transmission control device in the embodiment of the present application;
FIG. 7 is a schematic diagram of an embodiment of a sending device in the embodiment of the present application;
FIG. 8 is a schematic diagram of an embodiment of a verification device in an embodiment of the present application;
fig. 9 is a schematic diagram of an embodiment of a terminal in the embodiment of the present application.
Detailed Description
In order to solve the technical problem that processing of data transmission in the prior art is not flexible enough due to the adoption of a default mode, an embodiment of the application provides a data transmission control method, and when a checking device fails to perform first checking on a received data frame and passes second checking on part of data of the data frame, identification information is acquired from part of data of the data frame, and packet loss information carrying the identification information is sent to a sending device, so that the sending device can timely know that a packet loss event occurs according to the packet loss information and know that a corresponding data packet has packet loss according to the identification information, and therefore the data packet corresponding to the identification information is retransmitted, and flexibility of data transmission control is improved. The embodiment of the application also provides related equipment such as a data transmission control device, sending equipment, checking equipment, a computer program product, a computer storage medium and the like.
As shown in fig. 1, in a communication system, a sending device generally needs to send a data frame to a receiving device through a network device, where the sending device includes a terminal such as a mobile phone or a computer, the network device includes a router, a computer, a hub, a switch, or the like, and the receiving device includes a terminal such as a mobile phone or a computer. It is 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, and are not limited herein. The sending device sends a data frame to the receiving device, the data frame can be verified by various verification mechanisms in the network transmission process, and the data frame which is failed in verification is determined to be damaged in the transmission process.
The checking of the data frame may be that the network device checks the received data frame when the transmitting device transmits the data frame to the network device. For example, the verification mechanism may include: when a data frame is transmitted from the physical layer to the data link layer, the content of the data frame is checked at the data link layer, for example, a CRC check or an FCS check, etc., to check whether the data frame is damaged during transmission. When a data frame is transmitted from a data link layer to an 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, for example, the IP header of the data packet is checked and verified, and whether the IP header of the data packet is damaged during transmission is checked. The network device may also include other verification mechanisms for the data packet, which is not limited herein.
The data frame may also be checked by the network device after the data frame is checked by the network device according to the checking mechanism when the data frame is sent to the network device by the sending device, the data frame is determined not to be damaged, the data frame is sent to the receiving device, and the received data frame is checked by the receiving device. For example, the verification mechanism may include: when a data frame is transmitted from the physical layer to the data link layer, the content of the data frame is checked at the data link layer, for example, a CRC check or an FCS check, etc., to check whether the data frame is damaged during transmission. When a data frame is transmitted from a data link layer to an 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, for example, the IP header of the data packet is checked and verified, and whether the IP header of the data packet is damaged during transmission is checked. 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, and whether the corresponding part of the data packet is damaged in the transmission process is checked. It is understood that, in practical applications, when a data packet is transmitted from the IP layer to the TCP layer, the receiving device may check, at the TCP layer, other headers besides the TCP header, for example, check, at the TCP layer, an IP dummy header and a data payload of the data packet, check whether a corresponding portion of the data packet is damaged during transmission, and the like, which is not limited herein.
The data frame can be checked by the sending device directly after the sending device sends the data frame to the receiving device through the network device.
It should be noted that the architecture diagram of the communication system shown in fig. 1 is only an example, the system architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and as a person having ordinary skill in the art knows that as the network architecture evolves and a new service scenario appears, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
For convenience of understanding, a specific flow in the embodiment of the present application is described below, and referring to fig. 2, an embodiment of the data transmission control method in the embodiment of the present application includes:
201. the checking equipment receives the data frame sent by the sending equipment;
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 may also be a receiving device, for example, the network device receives a data frame sent by the sending device, or the receiving device receives a data frame sent by the network device and forwarded by the sending device.
It should be noted that, in practical applications, the data frame may be referred to as data, that is, the checking device receives data sent by the sending device, where the data is referred to as a data frame at the data link layer when the data is transmitted from the physical layer to the data link layer, and the data frame is referred to as a data packet at the IP layer when the data frame is transmitted from the data link layer to the IP layer. The name of the data in the transmission process can be flexibly set according to actual needs, and is not limited in detail here. The names described in the embodiments of the present application are for more clearly illustrating the technical solutions in the embodiments of the present application, and do not limit the technical solutions provided in the embodiments of the present application.
202. The checking equipment carries out first checking on the data frame;
the check device needs to perform a first check on the received data frame, and the check device may be a network device or a receiving device, so that the first check on the data frame may be performed by the network device when the sending device sends the data frame to the network device. The checking of the data frame may also be that, when the sending device sends the data frame to the network device, the network device performs first checking on the data frame, determines that the data frame is not damaged, sends the data frame to the receiving device, and performs first checking on the received data frame by the receiving device. The first check on the data frame may also be performed directly by the receiving device after the transmitting device transmits the data frame to the receiving device through the network device.
The first check may be a CRC check, an FCS check, or the like, for example, in the ethernet, the first check is a CRC check, and in the token ring, the first check is an FCS check. Taking cyclic redundancy check as an example, when the check device performs cyclic redundancy check on a data frame, firstly, when the check device transmits the data frame from the physical layer to the data link layer, the check device performs cyclic redundancy check on the data frame at the data link layer. For example, the mechanism of cyclic redundancy check includes: the check equipment acquires the content in the data frame, calculates according to the content of the data frame to obtain a cyclic redundancy check code, and compares the cyclic redundancy check code with a check code preset at the tail part in the data frame. When the cyclic redundancy check code is inconsistent with the check code, the check equipment determines that the cyclic redundancy check of the data frame fails, namely the cyclic redundancy check of the data frame does not pass; when the cyclic redundancy check code is consistent with the check code, the check equipment determines that the cyclic redundancy check of the data frame passes. It is understood that, in practical applications, the mechanism for cyclic redundancy check may also be other check mechanisms such as CRC32 or CRC64, which is not limited herein.
203. When the first check is failed, the check equipment performs second check on partial data in the data frame;
when the first check of the data frame by the check device fails, the check device determines that the data frame has been damaged. Since the verification device may be a network device or a receiving device, the corruption of the data frame may be found on the network device or the receiving device. When the first check on the data frame fails, the check equipment does not directly discard the data frame, but transmits the data frame from the data link layer to the IP layer, and performs a second check on partial data of the data frame.
When the verification device determines that the data frame is damaged, in order to ensure that the obtained identification information is correct, the verification device further performs a second verification on partial data of the data frame, where the identification information is included in the partial data of the data frame, and the partial data of the data frame may include an IP packet header or a TCP packet header, and the like. In this embodiment, the second checking of the partial data of the data frame may be to check a checksum of an IP packet header at the IP layer when the data frame is transmitted from the data link layer to the IP layer, and it is understood that, in practical applications, in addition to checking the IP packet header, other packet headers may also be checked, for example, when the data frame is transmitted from the IP layer to the TCP layer, the TCP layer checks the IP dummy header, the TCP header, and the data payload, and checks whether a corresponding portion of the data frame is damaged or not during transmission, and the like.
Taking the example of checking the checksum of the IP packet header at the IP layer, when the data frame is transmitted from the data link layer to the IP layer, the checking device obtains the content in the IP packet header at the IP layer, and calculates the checksum check code according to the content of the IP packet header. Then, the check equipment compares the check sum check code with a check code preset in the IP packet head, and when the check sum check code is consistent with the check code, the check equipment determines that the check sum check of the IP packet head is successful, namely, the check sum check of the IP packet head is passed; and when the check sum check code is inconsistent with the check code, the check equipment determines that the IP packet header check sum check fails.
204. When the second check is passed, the check equipment acquires identification information from partial data of the data frame;
when the second check of the data frame passes, the check device determines that part of the data frame is not damaged, and the damage of the data frame occurs in fields of other data frames, at this time, the check device extracts the identification information from the fields storing the identification information in the part of the data frame, wherein the identification information may include a source address, a destination address and the like, and when the identification information is the source address, the identification information may be used to indicate a sending device corresponding to sending the data frame; when the identification information is the destination IP address, it can be used to indicate the receiving device that receives the data frame. The identification information may also be used to indicate that a packet corresponding to the identification information is lost, for example, the identification information may include a sequence number, port information, and the like. Since the header of the data frame is not damaged, the identification information acquired at this time is correct.
205. And the checking equipment sends packet loss information to the sending equipment.
In this embodiment, the packet loss information is used to indicate that a data frame is lost, the packet loss information includes identification information, and the identification information is used to indicate that a packet corresponding to the identification information is lost.
It should be noted that, because the sending device may send one data frame to the receiving device, or send multiple data frames to the receiving device, the verifying device may generate packet loss information of the data frame and send the packet loss information to the sending device when determining that the data frame is lost after completing verification of one data frame. The verifying device may also verify one or more data frames within a preset time period, and when it is determined that the one or more data frames are lost, the verifying device generates packet loss information of the one or more data frames, and sends the packet loss information to the sending device.
After the verification device obtains the correct identification information and generates packet loss information, the verification device may send the packet loss information carrying the identification information to the sending device. And the sending equipment determines that the data frame is lost according to the packet loss information, and knows that the corresponding data packet is lost according to the identification information, so that retransmission operation is performed on the data packet corresponding to the identification information.
In this 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 the partial data of the data frame, it indicates that the data frame is damaged, but identification information included in the partial data of the data frame is not damaged, and at this time, the verification device may obtain the identification information from the partial data of the data frame. Then, the checking device sends packet loss information carrying the identification information to the sending device, so that the sending device can timely know that a packet loss event occurs according to the packet loss information and know that a corresponding data packet is lost according to the identification information, and therefore the data packet corresponding to the identification information is retransmitted, and flexibility of data transmission control is improved.
In addition, in the prior art, after the damaged data frame is discarded by the network device, the TCP generally determines whether a packet loss event occurs in the network by comparing the number of received duplicate acknowledgement messages (e.g., ACKs) with a set threshold, and then determines the congestion of the network 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 the transmitted data frames by adjusting the size of a Congestion Window (CWND), so as to adjust the transmission rate of the data frames. And the sending equipment retransmits the data packet through the adjusted CWND so as to ensure the reliability of the data frame transmission through the network equipment. For example, when receiving three repeated acknowledgement messages for the same data frame, TCP determines that a packet loss event occurs in the data frame in the network through a TCP congestion control mechanism, and further adjusts the CWND to retransmit the data packet. Therefore, in the process of sending a data frame to a receiving device through a network device, when the data frame is damaged, the network device directly discards the damaged data frame, and retransmits the data packet when receiving acknowledgement messages for multiple times, and a long time is needed to wait for receiving multiple acknowledgement messages, so that the sending device cannot know the time of a packet loss event of the data frame, and the sending device only knows that the data frame is lost after the received acknowledgement messages meet certain times, and then retransmits the data packet. The transmitting device delays the retransmission of the data packet and reduces the efficiency of the retransmission of the data packet under the condition that the transmitting device cannot timely know the loss of the data frame. In the embodiment of the application, 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 occurs according to the packet loss information, the sending device is prevented from retransmitting the data packet after waiting for receiving a plurality of acknowledgement messages, and the retransmission efficiency of the data packet corresponding to the identification information is improved.
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, where the non-congestion packet loss information is used to indicate a packet loss event caused by non-network congestion. For example, the data frame is damaged due to hardware failure, signal interference, and the like, and when the data frame is transmitted using a medium with relatively poor link quality, such as a wireless WIFI network, an unshielded twisted pair, or a wireless cellular network, the data frame is also damaged, and these conditions that the data frame is discarded after the data frame is damaged all belong to a packet loss event caused by the reason of non-network congestion. At this time, the checking device may send the non-congestion packet loss information to the sending device. The verifying device may be configured to, after completing verification of one data frame, generate non-congestion packet loss information of the data frame when it is determined that a packet loss event of the data frame is caused by a non-network congestion cause, and send the non-congestion packet loss information to the sending device. The checking device may also be configured to, after checking one or more data frames within a preset time period, generate non-congestion packet loss information of the one or more data frames when a packet loss event caused by a non-network congestion cause of the one or more data frames is determined, and send the non-congestion packet loss information to the sending device.
After receiving the non-congestion packet loss information sent by the verification device, the sending device may determine, according to the non-congestion packet loss information, that the packet loss event is caused by the non-network congestion cause, so that the sending device maintains a current congestion control mechanism, and performs a retransmission operation on a data packet corresponding to the identification information under the congestion control mechanism, where the data packet may be a data packet of a TCP layer or a data packet of a UDP layer. The technical problems that after a sending device determines that a packet loss event occurs, the sending device determines that the current CWND value is reduced by times due to network congestion, so that the sending rate of a data frame is reduced by multiplying in proportion (multiplicative speed reduction for short) to reduce the network congestion degree, and in the process of data packet retransmission, the sending rate of a data packet is slowly increased until the packet loss event occurs again are solved, the situation that the sending device wrongly determines that the packet loss event which is not verified to be generated is blindly carried out by multiplicative speed reduction operation due to the network congestion is avoided, the sending rate is reduced by reducing a congestion window to reduce the network congestion degree blindly, the utilization rate of a network link is improved, and the throughput of a network is improved in the prior art.
In addition, for a scene such as a WIFI network or a cellular network, due to the characteristics of a transmission medium, the RTT value counted by the sending device often changes frequently and severely, so if the sending device determines whether the damage of the current data frame is caused by network congestion by comparing the current RTT value with a preset time threshold, the determination accuracy is very low. In the embodiment of the application, the checking device can perform the first checking on the data frame and perform the second checking on part of the data frame, so that the accurate checking on the data frame is realized, the current congestion control mechanism maintained by the sending device is improved, and the reliability of retransmission operation on the data packet corresponding to the identification information under the current congestion control mechanism is improved.
It will be appreciated that TCP ensures reliable transmission of data in the network by means of a congestion control mechanism, which primarily controls the total amount of data frames that can be sent by the sending device by varying the size of the congestion window CWND, thereby adjusting the data frame sending rate. In addition, the congestion control mechanism also guarantees reliable transmission of data frames by retransmission of lost data frames. The congestion control mechanism comprises a plurality of stages of slow start, congestion avoidance, fast retransmission and fast recovery. Therefore, the sending device maintains the current congestion control mechanism, and the retransmission operation performed on the data packet corresponding to the identification information under the current congestion control mechanism may be: when the sending equipment receives the non-congestion packet loss information sent by the checking equipment, if the congestion control mechanism of the sending equipment is in a slow starting stage, the sending equipment maintains the current slow starting congestion control mechanism to execute retransmission operation on the data packet corresponding to the identification information; if the congestion control mechanism of the sending equipment is in the congestion avoidance stage, the sending equipment maintains the congestion control mechanism of the current congestion avoidance to execute retransmission operation on the data packet corresponding to the identification information; if the congestion control mechanism of the sending equipment is in a fast retransmission stage, the sending equipment maintains the current fast retransmission congestion control mechanism to execute retransmission operation on the data packet corresponding to the identification information; etc., and are not enumerated here.
In this embodiment of the present application, a method for sending packet loss information to a sending device by a checking device includes: the checking device sends an ICMP carrying packet loss information to the sending device, or the checking device sends an ACK carrying packet loss information to the sending device, and the like, which will be described in detail below.
Firstly, the checking equipment sends ICMP carrying packet loss information to the sending equipment.
Referring to fig. 3, when the verification device is a network device, the network device verifies the data frame, and another embodiment of the data transmission control method in the embodiment of the present application includes:
301. the sending equipment sends the data frame to the network equipment;
when the sending device sends the data frame to the receiving device, the data frame needs to be transferred through the network device, that is, the data frame is sent to the network device first.
302. The network equipment carries out first verification on the data frame;
after receiving the data frame, when the data frame is transmitted from the physical layer to the data link layer, the network device performs a first check on the data frame at the data link layer, for example, performs a CRC check or an FCS check on the data frame at the data link layer, and takes a cyclic redundancy check as an example, the network device unpacks the data frame to obtain the content of the data frame, and the network device may calculate a cyclic redundancy check code according to the content of the data frame and compare the cyclic redundancy check code with a check code preset at the tail of the data frame. When the cyclic redundancy check code is inconsistent with the check code, the network equipment determines that the check on the data frame does not pass, namely the first check does not pass; when the cyclic redundancy check code is consistent with the check code, the network device determines that the cyclic redundancy check of the data frame passes, namely the first check passes. It is to be understood that, in practical applications, the mechanism of cyclic redundancy check may also perform check according to other check manners, and is not limited herein.
It should be noted that, after receiving the data frame, the network device may check the preamble of the data frame in the physical layer, check whether a signal of the data frame is damaged in the transmission process, transmit the data frame from the physical layer to the data link layer if the signal of the data frame is not damaged, and perform a first check on the data frame in the data link layer.
When the first check is passed, the data frame is not damaged, and at the moment, the network equipment acquires the destination IP address and sends the data frame to the corresponding receiving equipment according to the destination IP address.
303. When the first check is failed, the network equipment performs a second check on partial data of the data frame;
when the first check of the network device on the data frame is failed, the network device determines that the data frame is damaged, and in order to send packet loss information to the sending device, the network device needs to acquire correct identification information. Since the failure of checking the data frame means that any field of the data frame may have an error code error, and when the network device feeds back the packet loss information to the sending device, it is also necessary to ensure that the identification information obtained from the data frame in which the error code occurs is correct, that is, the field storing the identification information is not damaged. Therefore, the network device does not directly drop the data frame, but needs to further perform a second check on the partial data of the data frame, where the partial data of the data frame stores the identification information, and the partial data of the data frame may include an IP packet header or a TCP packet header, etc.
In this embodiment, the second checking of the partial data of the data frame may be to check a checksum of an IP packet header at the IP layer when the data frame is transmitted from the data link layer to the IP layer, and it is understood that, in practical applications, in addition to checking the IP packet header, other packet headers may also be checked, for example, when the data frame is transmitted from the IP layer to the TCP layer, the TCP layer checks the IP dummy header, the TCP header, and the data payload, and checks whether a corresponding portion of the data frame is damaged or not during transmission, and the like.
When the network device checks the IP packet header of the data frame, the network device may obtain the content in the IP packet header at the IP layer when the data frame is transmitted from the data link layer to the IP layer, and calculate the checksum check code according to the content of the IP packet header. Then the network equipment compares the check sum check code with a check code preset in the IP packet head, and when the check sum check code is consistent with the check code, the network equipment determines that the check sum check of the IP packet head passes, namely the second check passes; when the checksum check code is inconsistent with the check code, the network device determines that the IP packet header check and check do not pass, i.e., the second check does not pass.
304. When the second check is passed, the network equipment generates a control message protocol ICMP carrying packet loss information;
when the partial data of the data frame passes the second check, the network device determines that the packet header of the data frame is not damaged, and at this time, the network device generates packet loss information, expands a packet loss type option in an option field of the ICMP, and adds the packet loss information to the packet loss type option. For example, the network device customizes a type field value of 36 in the ICMP, where the type option of the ICMP corresponding to the type field value of 36 is a packet loss type option, and the packet loss type option stores packet loss information correspondingly.
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-congestion packet loss information, that is, the network device may generate non-congestion packet loss information, where the non-congestion packet loss information is used to indicate a packet loss event caused by a non-network congestion reason. The network device may extend the non-congestion packet loss type option in the option field of the ICMP, and add the non-congestion packet loss information to the non-congestion packet loss type option.
305. The network equipment sends ICMP carrying packet loss information to the sending equipment;
before sending an ICMP carrying packet loss information to a sending device, a network device first obtains identification information from a part of data of a data frame, where the identification information may include a source address, a destination address, and the like, and the identification information and the packet loss information may be sent to the sending device together with the ICMP. It should be noted that, in the IP protocol of the ethernet, the identification information may include a source IP address, a destination IP address, and the like, and in the non-IP protocol such as M2CNP, the identification information may include a corresponding source address, a destination address, and the like.
In order to determine the sending device corresponding to the data frame, the identification information obtained 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 data frame. Since part of the data frame includes the IP header, the source IP address can be obtained from the IP header. After acquiring the source IP address from the IP packet header, the network device may send an ICMP carrying packet loss information to the sending device according to the source IP address. Since the second check on the partial data of the data frame may be to check the IP packet header, when the IP packet header passes the check, the network device determines that the IP packet header is not damaged, and at this time, the correct source IP address may be obtained from the IP packet header, thereby improving the accuracy of the network device in sending the ICMP carrying the packet loss information.
In order to determine the receiving device corresponding to the data frame, the identification information acquired by the network device may include a destination IP address, where the source IP address is used to indicate the receiving device corresponding to the received data frame. Since part of the data frame includes the IP header, the destination IP address can be obtained from the IP header. After acquiring the destination IP address from the IP packet header, the network device may send an ICMP carrying the destination IP address to the sending device according to the source IP address. Since the second check on the partial data of the data frame may be to check the IP packet header, when the IP packet header passes the check, the network device determines that the IP packet header is not damaged, and at this time, the correct destination IP address may be obtained from the IP packet header, thereby improving the accuracy of the network device sending the destination IP address to the sending device.
It should be noted that TCP is a connection-oriented and byte stream-based transport layer communication protocol, and TCP ensures reliable transmission of data frames in a network through a congestion control mechanism. TCP sets a sequence number for each data frame in order to ensure that no packet loss occurs, and the sequence number also ensures the in-sequence reception of data frames transmitted from the transmitting device to the receiving device. Because the sending device may send a plurality of data frames to the receiving device, when the data frames are a plurality of data frames that are received by the network device and sent to the receiving device by the sending device, the identification information corresponds to a plurality of data packets, in order to enable the sending device to accurately know which data packet has a packet loss event, the identification information obtained by the network device further includes a serial number, and an 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 that is sent with the ICMP to the sending device.
Since part of the data frame may include an IP header or a TCP header, the sequence number may 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, the multiple data packets corresponding to the identification information, so that the network device obtains a sequence number corresponding to a damaged data packet and sends the sequence number to the sending device, so that the sending device determines the damaged data packet according to the sequence number, and accurately retransmits the data packet, thereby avoiding wasting network resources due to retransmission of all data packets, in order to enable the sending device to accurately know which data packet has a packet loss event.
Because the sending device may send multiple data streams to the receiving device, when a data frame is a data frame on at least two data streams sent by the sending device to at least two receiving devices and received by the network device, in order to enable the sending device to accurately know which data frame on the data stream is damaged, the identification information obtained by the network device at this time also includes port information, and the port information may include a source port, a destination port, and the like. Because part of data of the data frame may include a TCP header, the network device may obtain 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 the data stream where the damaged data frame is located according to the port information.
It should be noted that the network device may also directly send packets such as an undamaged IP packet header or a TCP packet header to the sending device, and the sending device obtains identification information such as a destination IP address, a sequence number, and port information from the packet header and then retransmits the data packet. For example, the network device adds an uncorrupted IP header and TCP header to the content portion of the ICMP and sends them with the ICMP to the sending device. The sending device may obtain an IP packet header from the received ICMP content portion, extract the destination IP address from the IP packet header, obtain a TCP packet header from the received ICMP content portion, and extract the sequence number from the TCP packet header.
In this embodiment, since the network device may also write five tuples, such as a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol type, into a plurality of fields reserved in the ICMP, convenience for the sending device to conveniently know the flow direction of the data frame according to the five tuples is improved.
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, port information, and the like to the sending device, after checking one or more data frames within a preset time period, it is determined that a packet loss event exists in the one or more data frames, and when part of data of a damaged data frame is not damaged, the network device sends the ICMP carrying information such as packet loss information, source IP address, destination IP address, serial number, port information, and the like to the sending device. If a plurality of data frames are damaged in the time period, the network device associates and adds packet loss information, a source IP address, a destination IP address, a sequence number, port information and other information corresponding to each data frame to the ICMP, and sends the information to the sending device along with the ICMP.
For example, in a certain time period, the network device determines that the data frames with sequence numbers 3 to 6 on the same data stream are damaged, and then the network device sends the ICMP carrying the packet loss information corresponding to the data frames with sequence numbers 3 to 6 to the sending device this time. Or, in a certain time period, the network device determines that the data frames with sequence number 1 on data flow a and sequence number 6 on data flow B are damaged, and then the network device sends the ICMP carrying the packet loss information of the data frames with sequence number 1 on data flow a and sequence number 6 on data flow B to the sending device this time.
It can be understood that, in practical applications, the network device may send the ICMP to the sending device according to a preset time period, and may also be in other sending manners, for example, the network device checks one data frame each time, and when it is determined that a packet loss event is caused and part of data of the data frame is not damaged, the network device sends the ICMP carrying information such as packet loss information, a source IP address, a destination IP address, a sequence number, and port information to the sending device once, which is not limited herein.
When the second check on the partial data of the data frame fails, it is determined that the partial data of the data frame is damaged, and at this time, the network device cannot obtain correct identification information from the partial data of the data frame, and the network device discards the data frame, or performs other operations, which is not limited herein.
306. After receiving the ICMP, the sending equipment determines a data packet corresponding to the identification information to be retransmitted according to the packet loss information carried in the ICMP;
in this embodiment, the sending device determines that the data packet needs to be retransmitted according to the received ICMP carrying the packet loss information, and after receiving the packet loss information, the sending device may further detect whether the packet loss information carries the congestion free packet loss information. If the information carries the non-congestion packet loss information, the sending equipment determines a retransmission mechanism according to the non-congestion packet loss information, wherein the retransmission mechanism is used for maintaining the current congestion control mechanism, and the retransmission of the data packet is executed under the current congestion control mechanism.
307. The transmitting device retransmits the data packet;
and the sending equipment retransmits the data packet after receiving the packet loss information, if the non-congestion packet loss information is received, the sending equipment determines a packet loss event caused by the non-network congestion reason according to the non-congestion packet loss information analyzed from the ICMP after receiving the ICMP, and at the moment, the sending equipment maintains the current congestion control mechanism and executes retransmission of the data packet 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 perform retransmission operation on the data packet corresponding to the identification information; if the congestion control mechanism of the sending equipment is in the congestion avoidance stage, the sending equipment maintains the congestion control mechanism of the current congestion avoidance to execute retransmission operation on the data packet corresponding to the identification information; and if the congestion control mechanism of the sending equipment is in the fast retransmission stage, the sending equipment maintains the current fast retransmission congestion control mechanism to execute retransmission operation on the data packet corresponding to the identification information.
308. The network equipment 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, and the verification mechanism is similar to the verification method for the data frame, which is not described herein again.
309. When the retransmitted data packet passes the check, the network equipment sends the data packet to the receiving equipment;
when the retransmitted data packet passes the check, the data packet is not damaged, and at this time, the network device sends the data packet to the receiving device.
310. And when receiving the retransmitted data packet, the receiving equipment sends a confirmation message to the sending equipment through the network equipment.
When receiving the retransmitted data packet, the receiving device sends an acknowledgement message to the sending device through the network device, where the acknowledgement message is used to indicate that the receiving device has received the retransmitted data packet, and the acknowledgement message may be an ACK, and the ACK carries acknowledgement information that the receiving device has received the data frame.
In order to ensure that a data frame received by a receiving device is not damaged when the receiving device sends a confirmation message to a sending device, and because the data frame may also be damaged in the process of transmission between the network device and the receiving device when the network device transmits the undamaged data frame to the receiving device, the receiving device firstly verifies the retransmitted data packet when receiving the retransmitted data packet, and the verification mechanism is similar to the verification mechanism of the network device for performing first verification on the data frame and performing second verification on partial data of the data frame, and the details are not repeated herein.
And after the receiving equipment retransmits the data packet, if the receiving equipment determines that the retransmitted data packet is not damaged, sending a confirmation message to the sending equipment. After the receiving device retransmits the data packet, if the receiving device determines that the retransmitted data packet is damaged, packet loss information of the retransmitted data packet is generated, and the packet loss information is sent to the sending device.
Referring to fig. 4, another embodiment of the data transmission control method in the embodiment of the present application includes:
401. the sending equipment sends the data frame to the receiving equipment through the network equipment;
402. the receiving equipment carries out first verification on the data frame;
403. when the first check is failed, the receiving equipment carries out second check on partial data of the data frame;
404. when the second check is passed, the receiving equipment generates a control message protocol ICMP carrying packet loss information;
405. the receiving equipment sends ICMP carrying packet loss information to the sending equipment through the network equipment;
406. after receiving the ICMP, the sending equipment determines a data packet corresponding to the identification information to be retransmitted according to the packet loss information carried in the ICMP;
407. the transmitting device retransmits the data packet;
408. the receiving equipment checks the received data packet;
409. and when the retransmitted data packet passes the check, the receiving equipment sends a confirmation message to the sending equipment through the network equipment.
It should be noted that, the processing of checking the data frame and generating the ICMP may be performed by the network device, and may also be performed by the receiving device, and steps 401 to 409 performed by the receiving device in this embodiment are similar to steps 306 to 310 performed by the network device in the embodiment shown in fig. 3, and are not described again here.
And secondly, the checking equipment sends the ACK carrying the packet loss information to the sending equipment.
In this embodiment, the verifying device is a receiving device, and the receiving device verifies the data frame, please refer to fig. 5, another embodiment of the data transmission control method in this embodiment of the present application includes:
501. the sending equipment sends the data frame to the receiving equipment through the network equipment;
502. the receiving equipment carries out first verification on the data frame;
503. when the first check is failed, the receiving equipment carries out second check on partial data of the data frame;
it should be noted that steps 501 to 503 in this embodiment are similar to steps 401 to 403 in the embodiment shown in fig. 4, and detailed description thereof is omitted here.
The data frame received by the receiving device may 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 data frame is sent to the network device by the sending device for verification, the data frame is forwarded to the receiving device by the network device, and the data frame is verified by the receiving device, or the data frame is directly sent to the receiving device by the sending device through the network device and verified by the receiving device along with the data frame.
504. When the second check passes, the receiving equipment generates a control message protocol ACK carrying packet loss information;
when the partial data of the data frame passes the second check, the receiving device determines that the partial data of the data frame is not damaged, and then the receiving device generates packet loss information, expands a packet loss type option in an option field of ACK, and adds the packet loss information to the packet loss type option, where the option field may be a TCP option field.
505. The receiving equipment sends ACK carrying packet loss information to the sending equipment through the network equipment;
506. after receiving the ACK, the sending equipment determines a data packet corresponding to the identification information to be retransmitted according to the packet loss information carried in the ACK;
507. the transmitting device retransmits the data packet;
508. the receiving equipment checks the received data packet;
509. and when the retransmitted data packet passes the check, the receiving equipment sends a confirmation message to the sending equipment through the network equipment.
It should be noted that, in steps 505 to 509 in this embodiment, the sending of the ACK by the receiving device and the retransmission operation of the data frame are similar to the sending of the ICMP by the receiving device and the retransmission operation of the data frame in steps 405 to 409 in the embodiment shown in fig. 4, and are not described again here.
With reference to fig. 6, the data transmission control method in the embodiment of the present application is described above, and a data transmission control device in the embodiment of the present application is described below, where an embodiment of the data transmission control device in the embodiment of the present application includes:
a receiving unit 601, configured to receive a data frame sent by a sending device;
a first checking unit 602, configured to perform a first check on the data frame received by the receiving unit 601;
a second checking unit 603 configured to perform a second check on partial data of the data frame received by the receiving unit 601 when the first checking unit 602 determines that the first check fails;
a first acquiring unit 604 for acquiring identification information from partial data of the data frame when the second check unit 603 determines that the second check passes;
a first sending unit 605, configured to send packet loss information to a sending device according to the identification information obtained by the first obtaining unit 604, where the packet loss information includes the identification information obtained by the first obtaining unit, and the identification information is used to indicate that a packet corresponding to the identification information is lost.
It should be noted that, in this embodiment, the flow executed by each unit in the data transmission control apparatus is similar to the method flow described in the embodiment shown in fig. 2, and is not described again here.
In some embodiments of the present application, the packet loss information includes non-congestion packet loss information, where the non-congestion packet loss information is used to indicate a packet loss event caused by non-network congestion. The first sending unit 605 is specifically configured to send, by the checking device, non-congestion packet loss information to the sending device according to the identification information obtained by the first obtaining unit 604, where the non-congestion packet loss information is used to instruct the sending device to maintain a current congestion control mechanism, and perform a retransmission operation on a data packet corresponding to the identification information under the congestion control mechanism.
In some embodiments of the present application, the identification information includes a source IP address, part of data of the data frame includes an IP packet header, and the first obtaining unit 604 is specifically configured to obtain the source IP address from the IP packet header. The first sending unit 605 is specifically configured to send packet loss information to the sending device according to the source IP address obtained by the first obtaining unit 604.
In some embodiments of the present application, the identification information further includes a destination IP address, and the first obtaining unit 604 is specifically configured to obtain the destination IP address from an IP packet header. The first sending unit 605 is specifically configured to send the destination IP address to the sending device according to the source IP address obtained by the first obtaining unit 604.
In some embodiments of the present application, the identification information further includes a sequence number, the partial data of the data frame further includes a TCP header, and the first obtaining unit 604 is specifically configured to obtain the sequence number from the TCP header or the IP header. The first sending unit 605 is specifically configured to send the sequence number to the sending device according to the source IP address obtained by the first obtaining unit 604.
In some embodiments of the present application, the identification information further includes port information, and the first obtaining unit 604 is specifically configured to obtain the port information from a TCP packet header; the first sending unit 605 is specifically configured to send the port information to the sending device according to the source IP address obtained by the first obtaining unit 604.
In some embodiments of the present application, the first checking unit 602 is specifically configured to check, at a data link layer, the data frame received by the receiving unit 601.
In some embodiments of the present application, the second checking unit 603 is specifically configured to perform, at an IP layer, IP header checking on part of data in the data frame received by the receiving unit 601.
In some embodiments of the present application, the data transmission control apparatus further includes: a first adding unit, configured to add the packet loss information to a packet loss type option of a preset control message protocol ICMP. The first sending unit 605 is specifically configured to send the ICMP carrying the packet loss information obtained by the first adding unit to the sending device.
In some embodiments of the present application, the data transmission control apparatus further includes: and the second adding unit is used for adding the packet loss information to a packet loss type option of a preset response message protocol ACK. The first sending unit 605 is specifically configured to send, to the sending device, the ACK with the packet loss information obtained by the second adding unit.
It should be noted that, in some embodiments of the present application, the flow executed by each unit in the data transmission control apparatus is similar to the method flow described in the embodiments shown in fig. 2 to fig. 5, and is not described again here.
With reference to fig. 7, the data transmission control apparatus in the embodiment of the present application is described above, and a sending device in the embodiment of the present application is described below, where an embodiment of the sending device in the embodiment of the present application includes:
a sending unit 701, configured to send a data frame to a verification device;
a detecting unit 702, configured to detect whether packet loss information sent by the verifying device is received, where the packet loss information is sent by the verifying device when the first verification performed on the data frame sent by the sending unit 701 by the verifying device fails and the second verification performed on the partial data of the data frame passes, where the packet loss information includes identification information obtained by the verifying device from the partial data of the data frame;
the executing unit 703 is configured to, if the detecting unit 702 determines that packet loss information sent by the verification device is received, execute a retransmission operation on a data packet corresponding to the identification information.
In some embodiments of the present application, the execution unit 703 includes: and the judging subunit is used for judging whether the packet loss information contains non-congestion packet loss information, wherein the non-congestion packet loss information is used for representing a packet loss event caused by a non-network congestion reason. And the execution subunit is configured to maintain the current congestion control mechanism if the determining subunit determines that the packet loss information includes the non-congestion packet loss information, and execute a retransmission operation on the data packet corresponding to the identification information under the congestion control mechanism.
It should be noted that, in the embodiments of the present application, the flow executed by each unit in the sending device is similar to the method flow described in the embodiments shown in fig. 2 to fig. 5, and is not described again here.
The data transmission control device and the sending device in the embodiment of the present application are described above from the perspective of the modular functional entity, and the verification device in the embodiment of the present application is described below from the perspective of hardware processing, where an embodiment of the verification device in the embodiment of the present application includes:
an input device 801, an output device 802, a processor 803 and a memory 804 (wherein the number of processors 801 in the network device may be one or more, and one processor 801 is taken as an example in fig. 8). In some embodiments of the present invention, the input device 801, the output device 802, the processor 803 and the memory 804 may be connected by a bus or other means, wherein the bus connection is taken as an example in fig. 8.
The memory 804 stores program codes, and the processor 803 is configured to execute the method according to the embodiment shown in fig. 2 to 5 by calling the program codes stored in the memory 804.
One embodiment of the transmitting device in the embodiment of the present application includes: input means, output means, 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, the output device, the processor, and the memory may be connected by a bus or other means. Wherein, the memory stores program codes, and the processor is used for executing the method of the embodiment shown in the foregoing fig. 2 to fig. 5 by calling the program codes stored in the memory.
In the embodiment of the present application, both the sending device and the receiving device may be terminals, and this embodiment provides a terminal, and for convenience of description, only the parts related to the embodiment of the present application are shown, and specific technical details are not disclosed, please refer to the method part in the embodiment of the present application. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, etc., taking the terminal as the mobile phone as an example:
as shown in fig. 9, fig. 9 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Referring to fig. 9, the handset includes: radio Frequency (RF) circuitry 1110, memory 1120, input unit 1130, display unit 1140, sensors 1150, audio circuitry 1160, wireless fidelity (WiFi) module 1170, processor 1180, and power supply 1190. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 9:
RF circuit 1110 may be used for receiving and transmitting signals during a message transmission or call, and in particular, for receiving downlink messages from a base station and then processing the received downlink messages to processor 1180; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 1110 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 1110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 1120 may be used to store software programs and modules, and the processor 1180 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132. Touch panel 1131, also referred to as a touch screen, can collect touch operations of a user on or near the touch panel 1131 (for example, operations of the user on or near touch panel 1131 by using any suitable object or accessory such as a finger or a stylus pen), and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1131 may include two parts, namely, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1180, and can receive and execute commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented by using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1130 may include other input devices 1132 in addition to the touch panel 1131. In particular, other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1140 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The Display unit 1140 may include a Display panel 1141, and optionally, the Display panel 1141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1131 can cover the display panel 1141, and when the touch panel 1131 detects a touch operation on or near the touch panel, the touch panel is transmitted to the processor 1180 to determine the type of the touch event, and then the processor 1180 provides a corresponding visual output on the display panel 1141 according to the type of the touch event. Although in fig. 9, the touch panel 1131 and the display panel 1141 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1131 and the display panel 1141 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1141 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1141 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 1160, speakers 1161, and microphone 1162 may provide an audio interface between a user and a cell phone. The audio circuit 1160 may transmit the electrical signal converted from the received audio data to the speaker 1161, and convert the electrical signal into a sound signal for output by the speaker 1161; on the other hand, the microphone 1162 converts the collected sound signals into electrical signals, which are received by the audio circuit 1160 and converted into audio data, which are then processed by the audio data output processor 1180, and then transmitted to, for example, another cellular phone via the RF circuit 1110, or output to the memory 1120 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the cell phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 1170, and provides wireless broadband internet access for the user. Although fig. 9 shows the WiFi module 1170, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1180 is a control center of the mobile phone, and is connected to various parts of the whole mobile phone through various interfaces and lines, and executes various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1120 and calling data stored in the memory 1120, thereby performing overall monitoring of the mobile phone. Optionally, processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated within processor 1180.
The phone also includes a power supply 1190 (e.g., a battery) for powering the various components, and preferably, the power supply may be logically connected to the processor 1180 via a power management system, so that the power management system may manage charging, discharging, and power consumption management functions.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In the embodiment of the present application, the processor 1180 included in the terminal further has the following functions: the processor executes the data transmission control method according to the embodiments shown in fig. 2 to 5 when calling the program code in the memory.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (28)

1. A data transmission control method, comprising:
the checking equipment receives the data frame sent by the sending equipment;
the checking equipment carries out first checking on the data frame;
when the first check is failed, the check equipment performs second check on partial data in the data frame;
when the second check passes, the check device acquires identification information from the partial data of the data frame;
and the verification equipment sends packet loss information to the sending equipment, wherein the packet loss information comprises the identification information, and the identification information is used for indicating that the data packet corresponding to the identification information has packet loss.
2. The method according to claim 1, wherein the packet loss information includes non-congestion packet loss information, and the sending, by the verification device, the packet loss information to the sending device includes:
the checking equipment sends non-congestion packet loss information to the sending equipment, wherein the non-congestion packet loss information is used for representing a packet loss event caused by non-network congestion reasons, and the non-congestion packet loss information is used for indicating the sending equipment to maintain a current congestion control mechanism and carrying out retransmission operation on the data packet under the congestion control mechanism.
3. The method of claim 1, wherein the identification information comprises a source IP address, the portion of the data frame comprises an IP packet header, and the verifying device obtaining the identification information from the portion of the data frame comprises:
the verification equipment acquires the source IP address from the IP packet header;
the step of sending packet loss information to the sending device by the checking device includes:
and the checking equipment sends the packet loss information to the sending equipment according to the source IP address.
4. The method of claim 3, wherein the identification information further comprises a destination IP address, and wherein the verifying device obtaining the identification information from the partial data of the data frame further comprises:
the checking equipment acquires the destination IP address from the IP packet header;
the step of sending packet loss information to the sending device by the checking device further includes:
and the checking equipment sends the destination IP address to the sending equipment according to the source IP address.
5. The method of claim 4, wherein the identification information further comprises a sequence number, wherein the partial data of the data frame further comprises a TCP packet header, and wherein the verifying device obtains the identification information from the partial data of the data frame further comprises:
the checking equipment acquires the serial number from the TCP packet header or the IP packet header;
the step of sending packet loss information to the sending device by the checking device further includes:
and the checking equipment sends the serial number to the sending equipment according to the source IP address.
6. The method of claim 5, wherein the identification information further comprises port information, and wherein the verifying device obtaining the identification information from the partial data of the data frame further comprises:
the checking equipment acquires the port information from the TCP packet header;
the step of sending packet loss information to the sending device by the checking device further includes:
and the checking equipment sends the port information to the sending equipment according to the source IP address.
7. The method of any of claims 1 to 6, wherein the first checking of the data frame by the checking device comprises:
and the checking equipment checks the data frame at a data link layer.
8. The method of any of claims 1 to 6, wherein the second checking of the partial data in the data frame by the checking device comprises:
and the checking equipment carries out IP packet header checking on part of data in the data frame at an IP layer.
9. The method according to any one of claims 1 to 6, wherein before the verifying device sends packet loss information to the sending device, the method further comprises:
the verification equipment adds the packet loss information to a packet loss type option of a preset control message protocol ICMP;
the step of sending packet loss information to the sending device by the checking device includes:
and the checking equipment sends the ICMP carrying the packet loss information to the sending equipment.
10. The method according to any one of claims 1 to 6, wherein when the verification device is a receiving device corresponding to the data frame, before the verification device sends packet loss information to the sending device, the method further includes:
the verification equipment adds the packet loss information to a packet loss type option of a preset response message protocol ACK;
the step of sending packet loss information to the sending device by the checking device includes:
and the checking equipment sends the ACK carrying the packet loss information to the sending equipment.
11. A data transmission control method, comprising:
the sending equipment sends the data frame to the checking equipment;
the sending device detects whether packet loss information sent by the checking device is received, the packet loss information is sent when the first checking of the checking device on the data frame is not passed and the second checking of partial data of the data frame is passed, and the packet loss information comprises identification information obtained by the checking device from the partial data of the data frame;
and if so, the sending equipment executes retransmission operation on the data packet corresponding to the identification information.
12. The method of claim 11, wherein the sending device performing a retransmission operation on the data packet corresponding to the identification information comprises:
the sending equipment judges whether the packet loss information contains non-congestion packet loss information or not, wherein the non-congestion packet loss information is used for representing a packet loss event caused by non-network congestion reasons;
if yes, the sending equipment maintains the current congestion control mechanism and executes retransmission operation on the data packet under the congestion control mechanism.
13. A data transmission control apparatus, comprising:
a receiving unit, configured to receive a data frame sent by a sending device;
a first checking unit, configured to perform a first check on the data frame received by the receiving unit;
a second checking unit configured to perform a second check on partial data of the data frame received by the receiving unit when the first checking unit determines that the first check fails;
a first acquiring unit configured to acquire identification information from the partial data of the data frame when the second check unit determines that the second check is passed;
a first sending unit, configured to send packet loss information to the sending device, where the packet loss information includes the identification information obtained by the first obtaining unit, and the identification information is used to indicate that a packet corresponding to the identification information is lost.
14. The apparatus according to claim 13, wherein the packet loss information includes non-congestion packet loss information, the first sending unit is specifically configured to send the non-congestion packet loss information to the sending device, where the non-congestion packet loss information is used to indicate a packet loss event caused by a non-network congestion cause, and the non-congestion packet loss information is used to instruct the sending device to maintain a current congestion control mechanism, and perform a retransmission operation on the data packet under the congestion control mechanism.
15. The data transmission control device according to claim 13, wherein the identification information includes a source IP address, the part of data of the data frame includes an IP packet header, and the first obtaining unit is specifically configured to obtain the source IP address from the IP packet header;
the first sending unit is specifically configured to send the packet loss information to the sending device according to the source IP address obtained by the first obtaining unit.
16. The data transmission control device according to claim 15, wherein the identification information further includes a destination IP address, and the first obtaining unit is specifically configured to obtain the destination IP address from the IP packet header;
the first sending unit is specifically configured to send the destination IP address to the sending device according to the source IP address obtained by the first obtaining unit.
17. The data transmission control device according to claim 16, wherein the identification information further includes a sequence number, the partial data of the data frame further includes a TCP header, and the first obtaining unit is specifically configured to obtain the sequence number from the TCP header or an IP header;
the first sending unit is specifically configured to send the serial number to the sending device according to the source IP address obtained by the first obtaining unit.
18. The data transmission control device according to claim 17, wherein the identification information further includes port information, and the first obtaining unit is specifically configured to obtain the port information from the TCP packet header;
the first sending unit is specifically configured to send the port information to the sending device according to the source IP address obtained by the first obtaining unit.
19. The data transmission control device according to any one of claims 13 to 18, wherein the first checking unit is specifically configured to check the data frame received by the receiving unit at a data link layer.
20. The data transmission control device according to any one of claims 13 to 18, wherein the second checking unit is specifically configured to perform IP header checking on the partial data in the data frame received by the receiving unit at an IP layer.
21. The data transmission control device according to any one of claims 13 to 18, characterized by further comprising:
a first adding unit, configured to add the packet loss information to a packet loss type option of a preset control message protocol ICMP;
the first sending unit is specifically configured to send the ICMP carrying the packet loss information obtained by the first adding unit to the sending device.
22. The data transmission control device according to any one of claims 13 to 18, characterized by further comprising:
a second adding unit, configured to add the packet loss information to a packet loss type option of a preset response packet protocol ACK;
the first sending unit is specifically configured to send, to the sending device, the ACK with the packet loss information obtained by the second adding unit.
23. A transmitting device, comprising:
a sending unit, configured to send a data frame to a verification device;
a detecting unit, configured to detect whether packet loss information sent by the verifying device is received, where the packet loss information is sent by the verifying device when a first verification is performed on the data frame sent by the sending unit, and a second verification is performed on partial data of the data frame, and the packet loss information includes identification information obtained by the verifying device from the partial data of the data frame;
and the executing unit is used for executing retransmission operation on the data packet corresponding to the identification information if the detecting unit determines that the packet loss information sent by the verifying equipment is received.
24. The transmitting device of claim 23, wherein the execution unit comprises:
a determining subunit, configured to determine whether the packet loss information includes non-congestion packet loss information, where the non-congestion packet loss information is used to indicate a packet loss event caused by a non-network congestion reason;
and the execution subunit is configured to, if the determining subunit determines that the packet loss information includes non-congestion packet loss information, maintain a current congestion control mechanism, and execute a retransmission operation on the data packet under the congestion control mechanism.
25. A verification device, comprising:
a processor, a memory, a bus, an input device, and an output device;
the memory has program code stored therein;
the processor, when calling the program code in the memory, executes the data transfer control method of any one of claims 1 to 10.
26. A transmitting device, comprising:
a processor, a memory, a bus, an input device, and an output device;
the memory has program code stored therein;
the processor, when calling program code in the memory, executes the data transfer control method of claim 11 or 12.
27. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to execute the data transmission control method of any one of claims 1 to 10.
28. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to execute the data transmission control method of claim 11 or 12.
CN201710570007.0A 2017-07-13 2017-07-13 Data transmission control method and related equipment Active CN109257138B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710570007.0A CN109257138B (en) 2017-07-13 2017-07-13 Data transmission control method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710570007.0A CN109257138B (en) 2017-07-13 2017-07-13 Data transmission control method and related equipment

Publications (2)

Publication Number Publication Date
CN109257138A CN109257138A (en) 2019-01-22
CN109257138B true CN109257138B (en) 2020-11-17

Family

ID=65051619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710570007.0A Active CN109257138B (en) 2017-07-13 2017-07-13 Data transmission control method and related equipment

Country Status (1)

Country Link
CN (1) CN109257138B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111246312A (en) * 2020-01-15 2020-06-05 安徽文香信息技术有限公司 Packet loss processing method and device
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
CN115238830B (en) * 2022-09-21 2023-03-24 广东柯内特环境科技有限公司 Method for setting running threshold of equipment, monitoring method and monitoring system

Citations (4)

* Cited by examiner, † Cited by third party
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 kind of data transferring method, sending node, receiving node and data communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
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 kind of data transferring method, sending node, receiving node and data communication system
CN105871512A (en) * 2016-05-13 2016-08-17 华为技术有限公司 Data transmission method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《MANET网络TCP非拥塞控制识别序列与恢复》;王雪飞;《计算机工程》;20090205;第35卷(第3期);正文第119页 *

Also Published As

Publication number Publication date
CN109257138A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
CN109257138B (en) Data transmission control method and related equipment
US9247581B2 (en) Multiple-processor wireless mobile communication device
US9832621B2 (en) Method, terminal, server, and system for audio signal transmission
CN111010262B (en) Radio link control transmission method and related product
CN109729544B (en) Packet loss rate calculation method, network device and terminal
CN110234124B (en) Information transmission method and terminal equipment
US8976814B2 (en) Method of transporting data from sending node to destination node
WO2018036026A1 (en) Data transmission method, base station, target terminal, system and storage medium
EP2696621A1 (en) Message processing method, device and system
WO2019218855A1 (en) Measurement method and acquisition method for packet loss rate, terminal, and network device
US10932159B2 (en) Data transmission method, data receiving device, and data sending device
JP2007522704A (en) Acknowledgment message processing at the terminal
EP3709663A1 (en) Video transmission method, apparatus, and system, and computer readable storage medium
EP1934761B1 (en) Dma transfer and hardware acceleration of ppp frame processing
US8159965B2 (en) Method of comparing state variable or packet sequence number for a wireless communications system and related apparatus
TW201547240A (en) Method for determining maximum segment size
WO2018219092A1 (en) Method for processing encapsulated packets and terminal device
CN107104760B (en) Method for transmitting data packet, client and server
CN112612745A (en) Data transmission method and device, electronic equipment and readable storage medium
WO2016045062A1 (en) Data packet transmission device, system and method
US20220015124A1 (en) Downlink assignment index determining method, terminal and network device
WO2020024107A1 (en) Status report sending method and device
CN105792154B (en) A kind of method and apparatus of multi-media SMS transmission
CN112865930A (en) Method, related device and system for sending polling message
CN109117630B (en) Method for reducing log loss, mobile terminal and readable storage medium

Legal Events

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