CN106230619B - Data sending and receiving method and device, and data transmission method and system - Google Patents

Data sending and receiving method and device, and data transmission method and system Download PDF

Info

Publication number
CN106230619B
CN106230619B CN201610579401.6A CN201610579401A CN106230619B CN 106230619 B CN106230619 B CN 106230619B CN 201610579401 A CN201610579401 A CN 201610579401A CN 106230619 B CN106230619 B CN 106230619B
Authority
CN
China
Prior art keywords
message
sequence number
sequence
serial number
mark
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
CN201610579401.6A
Other languages
Chinese (zh)
Other versions
CN106230619A (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.)
Hunan Zhuo Zhuo Innovation Chengdu Westone Information Industry Inc
Original Assignee
Hunan Zhuo Zhuo Innovation Chengdu Westone Information Industry Inc
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 Hunan Zhuo Zhuo Innovation Chengdu Westone Information Industry Inc filed Critical Hunan Zhuo Zhuo Innovation Chengdu Westone Information Industry Inc
Priority to CN201610579401.6A priority Critical patent/CN106230619B/en
Publication of CN106230619A publication Critical patent/CN106230619A/en
Application granted granted Critical
Publication of CN106230619B publication Critical patent/CN106230619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

the invention discloses a data sending method, which is used for a shunting device to send data to an analysis device through a TCP channel and comprises the following steps: s11: sending the message with the sequence number to an analysis device; s12: monitoring whether a mark serial number fed back by the analysis equipment is received; s13: when the mark serial number fed back by the analysis equipment is received, recording the mark serial number; s14: judging whether the shunting equipment is connected to new analysis equipment again; if yes, executing the next step, otherwise, repeatedly executing the step S11; s15: determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time; s16: and sending the message to a new analysis device according to the starting sequence number. The invention sends the message by the marking serial number, thereby ensuring the integrity of message sequence sending, preventing data loss and improving the working efficiency of the analysis equipment.

Description

Data sending and receiving method and device, and data transmission method and system
Technical Field
The present invention relates to the field of data transmission, and in particular, to a method and an apparatus for transmitting and receiving data, and a method and a system for transmitting data.
background
In many network processing environments, since the bandwidth of the input network interface is greater than the processing capacity of a single backend analysis device, it is necessary to divide the input traffic into a plurality of analysis devices for processing according to the processing capacity of the backend analysis device. The shunting device transmits the acquired data to the analysis device, and the acquired data is mainly TCP data flow. For the collected TCP data stream, the analysis is performed based on a complete interactive sequence, and the complete interactive sequence contains a plurality of TCP messages. Therefore, when performing analysis, it is necessary to ensure that multiple TCP packets in a complete sequence enter the same analysis device, otherwise, analysis failure may be caused.
The traditional method is that data is directly sent out from a network card in the form of Ethernet messages, and the analysis equipment receives the Ethernet messages by itself and performs packet analysis. However, such a message reception will cause the performance of the analysis device to be low, and the message is easily lost.
in the prior art, the defects are improved, a TCP client module is added in the shunting device, a TCP service module is added in the analysis device, and the bypass TCP data collected by the front end is transmitted by establishing a TCP channel between the shunting device and the analysis device. Although the improved method ensures that the data message is not lost, the TCP client module is almost implemented in a software form, that is, the offloading process of the network device is mostly implemented in a driver of the device. This implementation may increase the load on the network device, affect the processing capacity of other services, have limited speed, and have limited performance.
At present, a network device starts to use hardware to implement a part of TCP functions, that is, a TCP client of a high-speed offloading device is implemented in hardware (or a main body is based on hardware), so that the device can be offloaded in real time under the condition that all interface traffic is fully loaded, and the transmission speed is accelerated.
however, the hardware TCP client has two disadvantages, one is that TCP cannot process response information of a complex analysis device, and the other is that TCP cannot understand which messages can form a complete analysis sequence by itself, and it can only send some continuous (TCP) information streams to the same analysis device. Therefore, if the running analysis device is dead or the software crashes, the shunting device does not know where to start transmitting data when performing migration, that is, when connecting another analysis device, and there is a high possibility that analysis content, that is, a part of the complete analysis sequence is transmitted to the crashed device and another part is transmitted to a new analysis device, resulting in analysis failure. Meanwhile, if the software processing is slow, the more data accumulated by the shunting equipment is, the more data is lost.
disclosure of Invention
In order to solve the technical problems, the invention provides a data sending and receiving method and device, a data transmission method and system, which can ensure the integrity in the data transmission process and realize the load balance of shunting equipment.
the technical scheme provided by the invention is as follows:
The invention discloses a data sending method, which is used for a shunting device to send data to an analysis device through a TCP channel and comprises the following steps: s11: sending the message with the sequence number to an analysis device; s12: monitoring whether a mark serial number fed back by the analysis equipment is received; s13: when the mark serial number fed back by the analysis equipment is received, recording the mark serial number; s14: judging whether the shunting equipment is connected to new analysis equipment again; if yes, executing the next step, otherwise, repeatedly executing the step S11; s15: determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time; s16: and sending the message to a new analysis device according to the starting sequence number.
Further preferably, the method further comprises the following steps: s10: and according to a preset rule, arranging continuous serial numbers of the messages in the message sequence.
Further preferably, the step S15 "determining the starting sequence number of the next message to be sent according to the tag sequence number recorded last time" specifically includes the steps of: s151: and taking the mark serial number recorded last time as the starting serial number of the next message to be sent according to a preset rule.
Further preferably, after the step S13 "the shunting device records the mark serial number", the method further includes the steps of: s131: and releasing the space corresponding to the message with the sequence number arranged in front of the marked sequence number.
The invention also discloses a data receiving method, which is used for the analysis equipment to receive the data sent by the shunting equipment through the TCP channel and comprises the following steps: s21: receiving a message with a sequence number sent by a shunting device; s22: judging whether the received message forms a complete message sequence or not; if so, executing the next step, otherwise, repeatedly executing the step S21; s23: and when the received message forms a complete message sequence, feeding back a mark serial number to the shunting equipment.
further preferably, the step S23 "feeding back a mark serial number to the shunting device" includes the steps of: s231: and feeding back the next sequence number of the last message in the currently formed complete message sequence to the shunting equipment as the marked sequence number.
the invention also discloses a data transmission method, which is used for transmitting data between the shunting device and the analysis device through the TCP channel and comprises the following steps: s11: the shunting equipment sends the message with the sequence number to the analysis equipment; s12: the shunting equipment monitors whether a mark serial number fed back by the analysis equipment is received; s21: the analysis equipment receives a message with a sequence number sent by the shunting equipment; s22: the analysis equipment judges whether the received message forms a complete message sequence or not; if so, executing the next step, otherwise, repeatedly executing the step S21; s23: when the received message forms a complete message sequence, the analysis equipment feeds back a mark serial number to the shunting equipment; s13: when the shunting equipment receives the marking serial number fed back by the analysis equipment, recording the marking serial number; s14: the shunting device judges whether to be connected to a new analysis device again; if yes, executing the next step, otherwise, repeatedly executing the step S11; s15: the shunting equipment determines the starting sequence number of the next message to be sent according to the mark sequence number recorded last time; s16: and the shunting equipment sends the message to new analysis equipment according to the starting sequence number.
further preferably, the method further comprises the following steps: s10: and according to a preset rule, arranging continuous serial numbers of the messages in the message sequence.
further preferably, the step S23 "feeding back a mark serial number to the shunting device" includes the steps of: s231: and feeding back the next sequence number of the last message in the currently formed complete message sequence to the shunting equipment as the marked sequence number.
Further preferably, the step S15 "determining the starting sequence number of the next message to be sent according to the tag sequence number recorded last time" specifically includes the steps of: s151: and taking the mark serial number recorded last time as the starting serial number of the next message to be sent according to a preset rule.
further preferably, after the step S13 "the shunting device records the mark serial number", the method further includes the steps of: s131: and releasing the space corresponding to the message with the sequence number arranged in front of the marked sequence number.
the invention discloses a data sending device, which is used for sending data to an analysis device through a TCP channel and comprises a shunting device, wherein the shunting device specifically comprises: the sending module is used for sending the message with the sequence number to the analysis equipment; the monitoring module is used for monitoring whether the mark serial number fed back by the analysis equipment is received; the recording module is used for recording the mark serial number fed back by the analysis equipment when receiving the mark serial number fed back by the analysis equipment; the connection judging module is used for judging whether the shunting equipment is connected to new analysis equipment again; the determining module is used for determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time when the shunting device is reconnected to the new analysis device; and the sending module is also used for sending the message to new analysis equipment according to the starting sequence number.
further preferably, the method further comprises the following steps: and the numbering module is used for numbering continuous serial numbers of the messages in the message sequence according to a preset rule.
Further preferably, the determining module is specifically configured to use the tag sequence number recorded last time as a starting sequence number of a next message to be sent according to a preset rule.
Further preferably, the method further comprises the following steps: and the releasing module is used for releasing the space corresponding to the message with the serial number arranged in front of the marked serial number.
The invention also discloses a data receiving device, which is used for receiving the data sent by the shunting equipment through the TCP channel and comprises analysis equipment, wherein the analysis equipment specifically comprises: the receiving module is used for receiving the message with the sequence number sent by the shunting equipment; the message sequence judging module is used for judging whether the received messages form a complete message sequence or not; and the feedback module is used for feeding back a marking serial number to the shunting equipment when the received message forms a complete message sequence.
preferably, the feedback module is specifically configured to feed back a next sequence number of a last packet in a currently formed complete packet sequence to the shunting device as the tag sequence number.
the invention also discloses a data transmission system, which is used for transmitting data through the TCP channel and comprises a data transmitting device and a data receiving device, wherein the data transmitting device comprises a shunting device; the shunting device specifically comprises: the sending module is used for sending the message with the sequence number to the analysis equipment; the monitoring module is used for monitoring whether the mark serial number fed back by the analysis equipment is received; the recording module is used for recording the mark serial number fed back by the analysis equipment when receiving the mark serial number fed back by the analysis equipment; the connection judging module is used for judging whether the shunting equipment is connected to new analysis equipment again; the determining module is used for determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time when the shunting device is reconnected to the new analysis device; the sending module is further configured to send the message to a new analysis device according to the start sequence number; the data receiving device comprises an analysis device, and the analysis device specifically comprises: the receiving module is used for receiving the message with the sequence number sent by the shunting equipment; the message sequence judging module is used for judging whether the received messages form a complete message sequence or not; and the feedback module is used for feeding back a marking serial number to the shunting equipment when the received message forms a complete message sequence.
Further preferably, the flow dividing apparatus further includes: and the numbering module is used for numbering continuous serial numbers of the messages in the message sequence according to a preset rule.
further preferably, the determining module is specifically configured to use the tag sequence number recorded last time as a starting sequence number of a next message to be sent according to a preset rule.
preferably, the feedback module is specifically configured to feed back a next sequence number of a last packet in a currently formed complete packet sequence to the shunting device as the tag sequence number.
further preferably, the flow dividing apparatus further includes: and the releasing module is used for releasing the space corresponding to the message sequence of the message with the sequence number arranged before the marked sequence number.
Compared with the prior art, the invention ensures the integrity of the message sending sequence between the shunting device and the analysis device by arranging the continuous serial numbers of the messages. If the device is disconnected or the software crashes, the shunt device is connected with new analysis equipment, or the analysis equipment is slow, so that more and more messages are accumulated by the shunt device, the shunt device is actively disconnected, the shunt device is connected with the new analysis equipment, and the messages can be retransmitted from the mark serial number fed back by the analysis equipment last time, so that the integrity of the message sequence for analysis is ensured.
drawings
The present invention will be further described in the following detailed description of preferred embodiments, which is to be read in connection with the accompanying drawings.
Fig. 1 is a schematic diagram illustrating main steps of a data transmission method according to the present invention;
Fig. 2 is a schematic diagram illustrating serial numbers of messages in a data transmission method according to the present invention;
FIG. 3 is a diagram illustrating the steps of a data transmission method according to the present invention;
FIG. 4 is a schematic diagram illustrating steps of a data receiving method according to the present invention;
FIG. 5 is a schematic diagram of the main steps of a data transmission method according to the present invention;
FIG. 6 is a schematic diagram of the main components of a data transmission apparatus according to the present invention;
FIG. 7 is a schematic diagram of a data receiving apparatus according to the present invention;
FIG. 8 is a schematic diagram of the main components of a data transmission system according to the present invention;
fig. 9 is a diagram illustrating the complete components of a data transmission system according to the present invention.
the reference numbers illustrate:
110. the system comprises a shunting device, a sending module, a monitoring module, a recording module, a connection judging module, a determining module, a numbering module, a releasing module, a sending module, a monitoring module, a recording module, a connection judging module, a determining module, a numbering module and a releasing module, wherein the shunting device comprises 111, the sending module, 112;
220. The analysis equipment comprises 221 a receiving module, 222 a message sequence judging module, 223 a feedback module;
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
for the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
Fig. 1 is a schematic diagram of main steps of a data sending method according to the present invention, and as a specific embodiment of the present invention, as shown in fig. 1, a data sending method is used for a offloading device 110 to send data to an analysis device 220 through a TCP channel, and includes the steps of: s11: sending the message with the sequence number to the analysis device 220; s12: monitoring whether the mark serial number fed back by the analysis equipment 220 is received; s13: when the mark serial number fed back by the analysis equipment 220 is received, recording the mark serial number; s14: determining whether the shunting device 110 is reconnected to a new analysis device 220; if yes, executing the next step, otherwise, repeatedly executing the step S11; s15: determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time; s16: and sending the message to the new analysis device 220 according to the starting sequence number.
Specifically, the data transmission method of the present invention is established between the offloading device 110 and the analysis device 220, where the offloading device 110 and the analysis device 220 establish a TCP channel and transmit a TCP packet sequence. By sequencing a plurality of messages in a complete message sequence and then analyzing the tag sequence number fed back by the analyzing device 220, the TCP client of the offloading device 110 can determine the sequence number of the message in the message sequence that needs to be sent when reconnecting. The message is sent by the marked serial number, so that the integrity of message sequence sending is ensured, data loss is prevented, and the working efficiency of the analysis equipment 220 is improved.
preferably, the method further comprises the steps of: s10: and according to a preset rule, arranging continuous serial numbers of the messages in the message sequence. Specifically, fig. 2 is a schematic diagram of sequence number arrangement of messages in a data transmission method according to the present invention, as shown in fig. 2, the messages have different lengths, each message has a number, and the messages can be rolled back by arranging the sequence numbers of the messages from message 1. The message sequence numbers are consecutive, as shown, from sequence number 3 to sequence number 12. If the message is 16 bits, the next message sequence number is 0 after 0 xffff.
The above embodiments are modified to provide preferred embodiments. Fig. 3 is a diagram illustrating the steps of a data transmission method according to the present invention. As a specific embodiment of the present invention, as shown in fig. 3, a data transmission method includes the steps of: s10: according to a preset rule, serial numbers of messages in a message sequence are numbered continuously; s11: sending the message with the sequence number to the analysis device 220; s12: monitoring whether the mark serial number fed back by the analysis equipment 220 is received; s13: when the mark serial number fed back by the analysis equipment 220 is received, recording the mark serial number; s14: determining whether the shunting device 110 is reconnected to a new analysis device 220; if yes, executing the next step, otherwise, repeatedly executing the step S11; s151: taking the mark serial number recorded last time as the starting serial number of the next message to be sent according to a preset rule; s16: and sending the message to the new analysis device 220 according to the starting sequence number.
specifically, the present invention can determine whether a complete message sequence is completely sent or not by analyzing the tag sequence number fed back by the device 220, and can determine the message sequence number to be sent next when the distribution device 110 is reconnected to a new analyzing device 220, thereby avoiding that a message in a message sequence is sent to a different analyzing device 220, which causes incomplete message and fails to analyze the message sequence.
preferably, after the step S13 "the shunting device 110 records the mark serial number", the method further includes the steps of: s131: and releasing the space corresponding to the message with the sequence number arranged in front of the marked sequence number. Specifically, the present invention obtains the complete message sequence by marking the serial number, and timely clears the space corresponding to the complete message sequence that has been sent and received, so as to reduce the storage space occupied by the cached data and improve the processing speed of the shunting device 110.
Fig. 4 is a schematic step diagram of a data receiving method according to another embodiment of the present invention, and as shown in fig. 4, a data receiving method is used for an analysis device 220 to receive data sent by a offload device 110 through a TCP channel, and includes the steps of: s21: receiving a message with a sequence number sent by the shunting device 110; s22: judging whether the received message forms a complete message sequence or not; if so, executing the next step, otherwise, repeatedly executing the step S21; s23: when the received message forms a complete message sequence, a tag serial number is fed back to the shunting device 110.
Specifically, the data receiving method of the present invention is established between the distribution device 110 and the analysis device 220, where the distribution device 110 and the analysis device 220 establish a TCP channel to receive a TCP packet sequence. The analyzing device 220 of the present invention feeds back a tag serial number to the shunting device 110 when the received messages with sequence numbers form a complete message sequence. Because the TCP client of the shunting device 110 only has the capability of sending data, cannot process the response information of the complex analysis device 220, and cannot understand which messages can form a complete analysis sequence by itself, the data receiving method of the present invention can inform, by feeding back a tag sequence number, whether the message sequence sent by the shunting device 110 is complete and which message sequence is sent in detail.
Preferably, the step S23 "feeding back a mark serial number to the shunting device 110" specifically includes the step S231: the next sequence number of the last message in the currently formed complete message sequence is fed back to the shunting device 110 as the marked sequence number. Specifically, the marked sequence number in the present invention may represent a complete message sequence, and the sequence number of the last message in the received complete message sequence may be used as the marked sequence number, or the next sequence number of the last message in the complete message sequence may be used as the marked sequence number and fed back to the shunting device 110. The mark number is not particularly limited and may be set by itself.
Fig. 5 is a schematic diagram of main steps of a data transmission method of the present invention, and as a specific embodiment of the present invention, as shown in fig. 5, a data transmission method is used for transmitting data between a offloading device 110 and an analysis device 220 through a TCP channel, and includes the steps of: s11: the shunting device 110 sends a message with the sequence number to the analysis device 220; s12: the shunting device 110 monitors whether the mark serial number fed back by the analysis device 220 is received; s21: the analysis device 220 receives the message with the sequence number sent by the shunting device 110; s22: the analysis device 220 determines whether the received message forms a complete message sequence; if so, executing the next step, otherwise, repeatedly executing the step S21; s23: when the received message forms a complete message sequence, the analysis device 220 feeds back a tag serial number to the distribution device 110; s13: when the shunting device 110 receives the marking serial number fed back by the analysis device 220, recording the marking serial number; s14: the shunting device 110 determines whether to reconnect to a new analysis device 220; if yes, executing the next step, otherwise, repeatedly executing the step S11; s15: the shunting device 110 determines a starting sequence number of a next message to be sent according to the mark sequence number recorded last time; s16: the shunting device 110 sends the packet to the new analysis device 220 according to the start sequence number.
specifically, the data transmission method of the present invention is established between the shunting device 110 and the analysis device 220, and includes the data transmission method and the data reception method described above. The shunting device 110 and the analyzing device 220 establish a TCP channel to transmit a TCP packet sequence. The shunting device 110 performs the sequence numbering on a plurality of messages in a complete message sequence and sends the messages to the analysis device 220, and the analysis device 220 feeds back a tag sequence number to the shunting device 110 when the messages form a complete message sequence. When the distribution device 110 reconnects to the new analysis device 220, the sequence number of the message sequence that needs to be sent can be determined according to the marked sequence number. The sequence number of the mark ensures the integrity of message sequence transmission, prevents data loss, and improves the working efficiency of the analysis device 220.
Preferably, the method further comprises the following steps: s10: and according to a preset rule, arranging continuous serial numbers of the messages in the message sequence.
preferably, the step S23 "feeding back a mark serial number to the shunting device 110" specifically includes the steps of: s231: the next sequence number of the last message in the currently formed complete message sequence is fed back to the shunting device 110 as the marked sequence number.
Preferably, the step S15 "determining the starting sequence number of the next message to be sent according to the tag sequence number recorded last time" specifically includes the steps of: s151: and taking the mark serial number recorded last time as the starting serial number of the next message to be sent according to a preset rule.
preferably, after the step S13 "the shunting device 110 records the mark serial number", the method further includes the steps of: s131: and releasing the space corresponding to the message with the sequence number arranged in front of the marked sequence number.
The following describes in detail a transmission flow of a data transmission method according to the present invention with reference to fig. 2.
As shown in fig. 2, the distribution device 110 transmits the messages 3, 4, 5, 6, and 7 to the analysis device 220, and the analysis device 220 receives the messages successfully.
The analyzing device 220 feeds back the serial number of the tag to be 6 to the shunting device 110, which indicates that the message before the serial number 6 has become a complete sequence and the analysis is completed. The shunting device 110 may release the space corresponding to the message before the sequence number 6, and the next analyzed message sequence will start with the message with the sequence number 6.
the shunting device 110 continues to transmit the messages 8 and 9 to the analysis device 220, and the analysis device 220 receives the messages successfully.
the analyzing device 220 feeds back the marked serial number 10 to the shunting device 110, which indicates that the message before the serial number 10 has become a complete sequence, and after the analysis is completed, the shunting device 110 may release the space corresponding to the message before 10, and the next analyzed message sequence will start from 10.
The shunting device 110 continues to transmit the messages 10 and 11 to the analysis device 220, and the analysis device 220 receives the messages successfully.
The analysis device 220 has a problem (device dropped or software crashes).
The shunting device 110 reconnects to the new analyzing device 220, and starts to continue to transmit the messages 10, 11, and 12 from the last time the analyzing device 220 feedbacks the marked serial number, i.e. 10, and the analyzing device 220 succeeds in receiving.
The analysis device 220 feeds back the tag serial number 12 to the distribution device 110, which indicates that the message before the serial number 12 has become a complete sequence, and after the analysis is completed, the distribution device 110 may release the space corresponding to the message before the serial number 12, and the next analysis sequence will start from the serial number 12.
Fig. 6 is a schematic diagram of the main components of a data transmission apparatus according to the present invention. As a specific embodiment of the present invention, as shown in fig. 6, a data sending apparatus is used for sending data to an analysis device 220 through a TCP channel, and includes a offloading device 110, where the offloading device 110 specifically includes: the sending module 111 is configured to send a message with a sequence number to the analysis device 220; a monitoring module 112, configured to monitor whether the tag serial number fed back by the analysis device 220 is received; the recording module 113 is configured to record the tag serial number fed back by the analysis device 220 when receiving the tag serial number fed back by the analysis device 220; a connection judging module 114, configured to judge whether the shunting device 110 is reconnected to a new analysis device 220; a determining module 115, configured to determine a starting sequence number of a next message to be sent according to the tag sequence number recorded last time when the shunting device 110 is reconnected to a new analysis device 220; the sending module 111 is further configured to send the message to a new analysis device 220 according to the start sequence number.
Preferably, the device further includes a numbering module 116, configured to list consecutive sequence numbers for the messages in the message sequence according to a preset rule.
Preferably, the determining module 115 is specifically configured to use the mark sequence number recorded last time as a starting sequence number of a next message to be sent according to a preset rule.
preferably, the method further comprises the following steps: and the releasing module 117 is configured to release a space corresponding to the packet with the sequence number arranged before the marked sequence number.
it should be noted that the information interaction, execution process, and other contents between the modules in the apparatus are based on the same concept as the data transmission method embodiment, and specific contents may refer to the description in the data transmission method embodiment of the present invention, and are not described herein again.
Fig. 7 is a schematic diagram of the main components of a data receiving device according to the present invention. As a specific embodiment of the present invention, as shown in fig. 7, a data receiving apparatus is configured to receive data sent by a offloading device 110 through a TCP channel, and includes an analysis device 220, where the analysis device 220 specifically includes: a receiving module 221, configured to receive a message with a sequence number sent by the offloading device 110; a message sequence determining module 222, configured to determine whether the received message forms a complete message sequence; the feedback module 233 is configured to feed back a tag serial number to the offloading device 110 when the received message forms a complete message sequence.
Preferably, the feedback module 233 is specifically configured to feedback the next sequence number of the last message in the currently formed complete message sequence to the shunting device 110 as the marked sequence number.
It should be noted that the information interaction, execution process, and other contents between the modules in the apparatus are based on the same concept as the data receiving method embodiment, and specific contents may refer to the description in the data receiving method embodiment of the present invention, and are not described herein again.
Fig. 8 is a schematic diagram of the main components of a data transmission system according to the present invention, and as an embodiment of the present invention, as shown in fig. 8, the data transmission system is used for transmitting data through a TCP channel, and includes a data transmitting apparatus and a data receiving apparatus, where the data transmitting apparatus includes a shunting device 110; the shunting device 110 specifically includes: the sending module 111 is configured to send a message with a sequence number to the analysis device 220; a monitoring module 112, configured to monitor whether the tag serial number fed back by the analysis device 220 is received; the recording module 113 is configured to record the tag serial number fed back by the analysis device 220 when receiving the tag serial number fed back by the analysis device 220; a connection judging module 114, configured to judge whether the shunting device 110 is reconnected to a new analysis device 220; a determining module 115, configured to determine a starting sequence number of a next message to be sent according to the tag sequence number recorded last time when the shunting device 110 is reconnected to a new analysis device 220; the sending module 111 is further configured to send the message to a new analysis device 220 according to the start sequence number; the data receiving apparatus includes an analyzing device 220, and the analyzing device 220 specifically includes: a receiving module 221, configured to receive a message with a sequence number sent by the offloading device 110; a message sequence determining module 222, configured to determine whether the received message forms a complete message sequence; the feedback module 233 is configured to feed back a tag serial number to the offloading device 110 when the received message forms a complete message sequence.
Fig. 9 is a diagram illustrating the complete components of a data transmission system according to the present invention. As a specific embodiment of the present invention, as shown in fig. 9, the shunting device 110 further includes: and the numbering module 116 is configured to list consecutive sequence numbers of the messages in the message sequence according to a preset rule.
Preferably, the determining module 115 is specifically configured to use the mark sequence number recorded last time as a starting sequence number of a next message to be sent according to a preset rule.
preferably, the feedback module 233 is specifically configured to feedback the next sequence number of the last message in the currently formed complete message sequence to the shunting device 110 as the marked sequence number.
preferably, as shown in fig. 9, the shunt device 110 further includes: and the releasing module 117 is configured to release a space corresponding to a packet sequence in which the packet with the sequence number before the marked sequence number is located.
The data transmission system of the present invention is established between the shunting device 110 and the analyzing device 220, and includes the data transmitting apparatus and the data receiving apparatus described above. The shunting device 110 and the analyzing device 220 establish a TCP channel to transmit a TCP packet sequence. The shunting device 110 performs the sequence numbering on a plurality of messages in a complete message sequence and sends the messages to the analysis device 220, and the analysis device 220 feeds back a tag sequence number to the shunting device 110 when the messages form a complete message sequence. When the distribution device 110 reconnects to the new analysis device 220, the sequence number of the message sequence that needs to be sent can be determined according to the marked sequence number. The sequence number of the mark ensures the integrity of message sequence transmission, prevents data loss, and improves the working efficiency of the analysis device 220.
It should be noted that, the information interaction, execution process, and other contents between the modules in the system are based on the same concept as the method embodiment, and specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (13)

1. a data sending method is used for a shunting device to send data to an analysis device through a TCP channel, and is characterized by comprising the following steps:
s11: sending the message with the sequence number to an analysis device;
S12: monitoring whether a mark serial number fed back by the analysis equipment is received; the fed back mark sequence number is the sequence number of the last message in the complete message sequence received by the analysis equipment or the next sequence number of the last message;
S13: when the mark serial number fed back by the analysis equipment is received, recording the mark serial number;
S14: judging whether the shunting equipment is connected to new analysis equipment again; if yes, executing the next step, otherwise, repeatedly executing the step S11;
s15: determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time;
S16: sending the message to a new analysis device according to the starting sequence number;
Wherein, step S15 includes:
When the mark serial number recorded last time is the serial number of the last message in the complete message sequence, taking the next serial number of the recorded mark serial number as the starting serial number of the next message to be sent;
and when the mark serial number recorded last time is the next serial number of the last message in the complete message sequence, taking the recorded mark serial number as the starting serial number of the next message to be sent.
2. the data transmission method as claimed in claim 1, further comprising the steps of: s10: and according to a preset rule, arranging continuous serial numbers of the messages in the message sequence.
3. The data transmission method according to claim 2, wherein the step S13, after the shunting device recording the mark sequence number, further comprises the steps of:
S131: and releasing the space corresponding to the message with the sequence number arranged in front of the marked sequence number.
4. A data transmission method is used for transmitting data between a shunting device and an analysis device through a TCP channel, and is characterized by comprising the following steps:
S11: the shunting equipment sends the message with the sequence number to the analysis equipment;
S12: the shunting equipment monitors whether a mark serial number fed back by the analysis equipment is received;
S21: the analysis equipment receives a message with a sequence number sent by the shunting equipment;
S22: the analysis equipment judges whether the received message forms a complete message sequence or not; if so, executing the next step, otherwise, repeatedly executing the step S21;
S23: when the received message forms a complete message sequence, the analysis equipment feeds back a mark serial number to the shunting equipment; the fed back marked sequence number is the sequence number of the last message in the complete message sequence received by the analysis equipment or the next sequence number of the last message;
s13: when the shunting equipment receives the marking serial number fed back by the analysis equipment, recording the marking serial number;
S14: the shunting device judges whether to be connected to a new analysis device again; if yes, executing the next step, otherwise, repeatedly executing the step S11;
s15: the shunting equipment determines the starting sequence number of the next message to be sent according to the mark sequence number recorded last time;
s16: the shunting equipment sends the message to new analysis equipment according to the starting sequence number;
Wherein, step S15 includes:
When the mark serial number recorded last time is the serial number of the last message in the complete message sequence, the shunt device takes the next serial number of the recorded mark serial number as the starting serial number of the next message to be sent;
and when the mark serial number recorded last time is the next serial number of the last message in the complete message sequence, the shunt device takes the recorded mark serial number as the starting serial number of the next message to be sent.
5. The data transmission method of claim 4, further comprising the steps of: s10: and according to a preset rule, arranging continuous serial numbers of the messages in the message sequence.
6. The data transmission method according to claim 5, wherein the step S15 "determining the starting sequence number of the next message to be sent according to the tag sequence number recorded last time" specifically includes the steps of:
S151: and taking the mark serial number recorded last time as the starting serial number of the next message to be sent according to a preset rule.
7. the data transmission method according to claim 6, wherein the step S13, after the shunting device recording the mark sequence number, further comprises the steps of:
s31: and releasing the space corresponding to the message with the sequence number arranged in front of the marked sequence number.
8. A data sending device is used for sending data to an analysis device through a TCP channel, and is characterized by comprising a shunting device, wherein the shunting device specifically comprises:
The sending module is used for sending the message with the sequence number to the analysis equipment;
The monitoring module is used for monitoring whether the mark serial number fed back by the analysis equipment is received; the fed back mark sequence number is the sequence number of the last message in the complete message sequence received by the analysis equipment or the next sequence number of the last message;
the recording module is used for recording the mark serial number fed back by the analysis equipment when receiving the mark serial number fed back by the analysis equipment;
The connection judging module is used for judging whether the shunting equipment is connected to new analysis equipment again;
The determining module is used for determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time when the shunting device is reconnected to the new analysis device;
the sending module is further configured to send the message to a new analysis device according to the start sequence number;
The determining module is further configured to, when the last recorded tag sequence number is the sequence number of the last message in the complete message sequence, use the next sequence number of the recorded tag sequence number as the starting sequence number of the next message to be sent; and when the mark serial number recorded last time is the next serial number of the last message in the complete message sequence, taking the recorded mark serial number as the starting serial number of the next message to be sent.
9. The data transmission apparatus according to claim 8, further comprising:
and the numbering module is used for numbering continuous serial numbers of the messages in the message sequence according to a preset rule.
10. The data transmission apparatus according to claim 9, further comprising:
and the releasing module is used for releasing the space corresponding to the message with the serial number arranged in front of the marked serial number.
11. A data transmission system is used for transmitting data through a TCP channel and comprises a data transmitting device and a data receiving device, wherein the data transmitting device comprises a shunting device; the shunting device specifically comprises:
The sending module is used for sending the message with the sequence number to the analysis equipment;
The monitoring module is used for monitoring whether the mark serial number fed back by the analysis equipment is received;
The recording module is used for recording the mark serial number fed back by the analysis equipment when receiving the mark serial number fed back by the analysis equipment;
The connection judging module is used for judging whether the shunting equipment is connected to new analysis equipment again;
the determining module is used for determining the starting sequence number of the next message to be sent according to the mark sequence number recorded last time when the shunting device is reconnected to the new analysis device;
The sending module is further configured to send the message to a new analysis device according to the start sequence number;
the determining module is further configured to, when the last recorded tag sequence number is the sequence number of the last message in the complete message sequence, use the next sequence number of the recorded tag sequence number as the starting sequence number of the next message to be sent; when the mark serial number recorded last time is the next serial number of the last message in the complete message sequence, taking the recorded mark serial number as the starting serial number of the next message to be sent;
The data receiving device comprises an analysis device, and the analysis device specifically comprises:
the receiving module is used for receiving the message with the sequence number sent by the shunting equipment;
The message sequence judging module is used for judging whether the received messages form a complete message sequence or not;
the feedback module is used for feeding back a marking serial number to the shunting equipment when the received message forms a complete message sequence; the fed back marked sequence number is the sequence number of the last message in the complete message sequence received by the analysis equipment or the next sequence number of the last message.
12. The data transmission system of claim 11, wherein the offloading device further comprises: and the numbering module is used for numbering continuous serial numbers of the messages in the message sequence according to a preset rule.
13. the data transmission system of claim 12, wherein the offloading device further comprises:
And the releasing module is used for releasing the space corresponding to the message sequence of the message with the sequence number arranged before the marked sequence number.
CN201610579401.6A 2016-07-21 2016-07-21 Data sending and receiving method and device, and data transmission method and system Active CN106230619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610579401.6A CN106230619B (en) 2016-07-21 2016-07-21 Data sending and receiving method and device, and data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610579401.6A CN106230619B (en) 2016-07-21 2016-07-21 Data sending and receiving method and device, and data transmission method and system

Publications (2)

Publication Number Publication Date
CN106230619A CN106230619A (en) 2016-12-14
CN106230619B true CN106230619B (en) 2019-12-17

Family

ID=57532365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610579401.6A Active CN106230619B (en) 2016-07-21 2016-07-21 Data sending and receiving method and device, and data transmission method and system

Country Status (1)

Country Link
CN (1) CN106230619B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109428801A (en) * 2017-08-23 2019-03-05 北京华为数字技术有限公司 File transmitting method and device
CN114584843A (en) * 2020-11-30 2022-06-03 华为技术有限公司 Communication method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050088942A (en) * 2005-07-19 2005-09-07 한국정보통신대학교 산학협력단 Method for providing efficient loss recovery of packet transmission in wireless network system
WO2008134897A1 (en) * 2007-05-08 2008-11-13 Technologies Ezoom Exponentiel Inc. Method and system for quality service enhancement in networks for media streaming

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI19992470A (en) * 1999-11-17 2001-05-18 Nokia Mobile Phones Ltd Communication
CN100542132C (en) * 2005-04-28 2009-09-16 华为技术有限公司 voice transmission method based on transmission control protocol
CN102594694B (en) * 2012-03-06 2016-01-06 北京中创信测科技股份有限公司 Data distribution method and equipment
CN103888364A (en) * 2012-12-24 2014-06-25 华为技术有限公司 Message shunting method and device
US20140153580A1 (en) * 2013-02-15 2014-06-05 Comtech Ef Data Corp. Reference encoding and decoding for improving network header compression throughput for noisy channels
CN107005341B (en) * 2014-12-12 2020-10-23 瑞典爱立信有限公司 Out-of-order delivery of SDUs in a radio device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050088942A (en) * 2005-07-19 2005-09-07 한국정보통신대학교 산학협력단 Method for providing efficient loss recovery of packet transmission in wireless network system
WO2008134897A1 (en) * 2007-05-08 2008-11-13 Technologies Ezoom Exponentiel Inc. Method and system for quality service enhancement in networks for media streaming

Also Published As

Publication number Publication date
CN106230619A (en) 2016-12-14

Similar Documents

Publication Publication Date Title
CN110418376A (en) Data transmission method and device
US9712464B2 (en) Multichannel gateway, multiplex transmission line communication system, multiplex transmission line communication method and computer-readable recording medium storing program
CN106612284B (en) Streaming data transmission method and device
US10237152B2 (en) Packet loss detection method, apparatus, and system
CN105119926B (en) A kind of multichannel duplex signaling method based on Socket connections
CN103457956B (en) HTTP streaming media live broadcasting method and system based on multiple TCP links
CN115514682B (en) Data transmission method, device, equipment and storage medium
CN106230619B (en) Data sending and receiving method and device, and data transmission method and system
JP5050357B2 (en) Logging information management method, logging information management system, and logging information management means
US10320616B2 (en) Method and a system for sideband server management
CN109257335A (en) It keeps back the method for source link, return source method, relevant apparatus and storage medium
CN107948217B (en) Switch system and communication method
CN105763375B (en) A kind of data packet sending method, method of reseptance and microwave station
US8849994B2 (en) Method and apparatus to determine the amount of delay in the transfer of data associated with a TCP zero window event or set of TCP zero window events
CN103873443A (en) Information processing method, local proxy server and network proxy server
US7783784B1 (en) Method and apparatus for adaptive selection of algorithms to load and spread traffic on an aggregation of network interface cards
CN111404842A (en) Data transmission method, device and computer storage medium
Ekiz et al. Transport layer reneging
JP2013030944A (en) Packet capture processing method and device
US20070198218A1 (en) Protocol analyser arrangement, analyser module, and method of managing resources
CN115604089A (en) Network fault positioning method and device
CN106209666B (en) Link multiplexing method and system based on load balancer
US9306854B2 (en) Method and apparatus for diagnosing interface oversubscription and microbursts
WO2011048740A1 (en) Data transmission system, transmission rate controlling method, receiving terminal and transmitting terminal
CN111106977B (en) Data stream detection method, device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 410000 floor 5, building 101, No. 348, tongzipo West Road, high tech Development Zone, Changsha City, Hunan Province

Applicant after: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY CO.,LTD.

Address before: 410000 Hunan province Changsha Wenxuan High-tech Development Zone, Road No. 27 Building 5 layer Yuyuan Lu Valley venture 505.

Applicant before: HUNAN ZHIZHUO INNOVATION FINANCIAL ELECTRONICS CO.,LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data transmitting and receiving method and device, data transmitting method and system

Effective date of registration: 20210629

Granted publication date: 20191217

Pledgee: Huarong Xiangjiang Bank Co.,Ltd. Xiangjiang New Area Branch

Pledgor: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY Co.,Ltd.

Registration number: Y2021430000026

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220714

Granted publication date: 20191217

Pledgee: Huarong Xiangjiang Bank Co.,Ltd. Xiangjiang New Area Branch

Pledgor: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY CO.,LTD.

Registration number: Y2021430000026

PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data sending and receiving method and device, data transmission method and system

Effective date of registration: 20220721

Granted publication date: 20191217

Pledgee: Huarong Xiangjiang Bank Co.,Ltd. Xiangjiang New Area Branch

Pledgor: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY CO.,LTD.

Registration number: Y2022430000060

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230629

Granted publication date: 20191217

Pledgee: Huarong Xiangjiang Bank Co.,Ltd. Xiangjiang New Area Branch

Pledgor: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY CO.,LTD.

Registration number: Y2022430000060

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data transmission and reception methods and devices, data transmission methods and systems

Effective date of registration: 20230705

Granted publication date: 20191217

Pledgee: Hunan Bank Co.,Ltd. Xiangjiang New Area Branch

Pledgor: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY CO.,LTD.

Registration number: Y2023430000019

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20191217

Pledgee: Hunan Bank Co.,Ltd. Xiangjiang New Area Branch

Pledgor: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY CO.,LTD.

Registration number: Y2023430000019

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data transmission and reception methods and devices, data transmission methods and systems

Granted publication date: 20191217

Pledgee: Hunan Bank Co.,Ltd. Xiangjiang New Area Branch

Pledgor: HUNAN ZHIZHUO INNOVATION INFORMATION INDUSTRY CO.,LTD.

Registration number: Y2024980032525

PE01 Entry into force of the registration of the contract for pledge of patent right