CN114785462A - Communication method for preventing packet loss - Google Patents
Communication method for preventing packet loss Download PDFInfo
- Publication number
- CN114785462A CN114785462A CN202210384367.2A CN202210384367A CN114785462A CN 114785462 A CN114785462 A CN 114785462A CN 202210384367 A CN202210384367 A CN 202210384367A CN 114785462 A CN114785462 A CN 114785462A
- Authority
- CN
- China
- Prior art keywords
- data packet
- server
- copy
- client
- 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.)
- Pending
Links
- 230000006854 communication Effects 0.000 title claims abstract description 27
- 238000004891 communication Methods 0.000 title claims abstract description 26
- 238000000034 method Methods 0.000 title claims abstract description 17
- 238000012795 verification Methods 0.000 claims abstract description 11
- 238000001514 detection method Methods 0.000 claims abstract description 4
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 abstract description 2
- 230000001419 dependent effect Effects 0.000 abstract description 2
- 230000000694 effects Effects 0.000 description 3
- 230000002265 prevention Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012432 intermediate storage Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements 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/18—Automatic repetition systems, e.g. Van Duuren systems
- H04L1/1867—Arrangements specially adapted for the transmitter end
- H04L1/188—Time-out mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements 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/1607—Details of the supervisory signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
- H04L67/145—Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a communication method for preventing packet loss, which comprises the following steps: a client initiates a connection request to a server through communication equipment; the server responds to the connection request, and the client maintains long connection with the server through heartbeat; the client sends a copy of the pre-detection data packet to the server and stores the copy of the data packet; the server receives and verifies the data packet copy; after the data packet copy passes the verification, the client sends a data packet original to the server; the server receives, stores and verifies the positive copy of the data packet; the positive copy of the data packet passes the verification, and the data packet is successfully received; the client deletes the packet copy. The communication method for preventing packet loss provided by the invention can guarantee the communication quality, ensure the accurate transmission of data, ensure the communication-dependent equipment and service, reduce the dependence of network quality and reduce the faults and errors caused by network problems.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a packet loss prevention communication method.
Background
In the wireless network communication process, due to the influence of external factors, the wireless network communication system is often easily interfered and packet loss is easily caused, so that equipment, services and the like depending on network communication are out of control, effective instructions cannot be obtained, and faults are caused.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a communication method for preventing packet loss, which can ensure the communication quality, ensure the accurate transmission of data, ensure communication-dependent equipment and services, reduce the dependence on network quality and reduce faults and errors caused by network problems.
The technical scheme of the invention is as follows:
a communication method for preventing lost packets comprises the following steps:
a client initiates a connection request to a server through communication equipment;
the server responds to the connection request, and the client maintains long connection with the server through heartbeat;
the client sends a copy of the pre-detection data packet to the server and stores the copy of the data packet;
the server receives and verifies the data packet copy;
after the data packet copy passes the verification, the client sends a data packet original to the server;
the server receives, stores and verifies the original copy of the data packet;
the positive copy of the data packet passes the verification, and the data packet is successfully received;
the client deletes the packet copy.
The client and the server are connected based on a TCP communication protocol.
The data packet is based on hexadecimal bytes, the position and data of the data packet where each byte is located, and the client and the server have corresponding dictionary conversion and analysis.
Wherein, the duplicate of the data packet and the original of the data packet adopt the same checking algorithm.
If the data packet copy check fails, the client cannot send the data packet original to the server.
And if the data packet original copy check is overtime, the client sends the data packet original copy to the server again.
If the data packet is not verified, the server does not reply.
Compared with the prior art, the invention has the beneficial effects that:
1. the client maintains long connection with the server through heartbeat based on a TCP communication protocol, so that a handshake mechanism for fussy TCP connection can be reduced;
2. the data packets are simplified, the data packets are based on hexadecimal bytes, the position and data of the data packet where each byte is located are converted and analyzed by a corresponding dictionary, and the client and the server both have corresponding dictionary conversion and analysis, so that the data packets with simple bytes can be converted into more complex semantics through the dictionaries for logic processing, the transmitted data volume is greatly reduced, and the dependence of the data packets on good network states can be relieved;
3. the duplicate data packet and the original data packet adopt the same checking algorithm, so that whether the data packet is complete or not can be checked;
4. the client sends the data packet copy before sending the data packet original, stores the data packet copy, sends the data packet original to the server after the data packet original passes the verification, the server receives, stores and verifies the data packet original, and the client can release the data packet copy after the data packet original passes the verification, so that the effect of preventing the data packet from being lost is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In order to illustrate the technical means of the present invention, the following description is given by way of specific examples.
Examples
Referring to fig. 1, the present embodiment provides a packet loss prevention communication method, including the following steps:
a client initiates a TCP connection request to a server through communication equipment;
the server responds to the TCP connection request, and the client maintains long connection with the server through heartbeat;
the client sends a copy of the pre-detection data packet to the server and stores the copy of the data packet;
the server receives and verifies the data packet copy;
after the data packet copy is verified, the client sends the data packet original to the server, and if the data packet copy is not verified, the client cannot send the data packet original to the server;
the server receives, stores and verifies the data packet original, and if the data packet original is over-time, the client sends the data packet original to the server again;
if the positive data packet is verified to be passed, the data packet is successfully received, and if the positive data packet is not verified to be passed, the server does not reply;
and after the data packet is successfully received, the client deletes the data packet copy.
The method is based on a TCP communication protocol, and achieves the effect of packet loss prevention by adopting long connection, data packet simplification, data packet verification, intermediate storage and repeated receiving confirmation.
The principle is as follows:
1. the client maintains long connection with the server through heartbeat based on a TCP communication protocol, so that a complicated handshaking mechanism of TCP connection can be reduced;
2. the data packets are simplified, the data packets are based on hexadecimal bytes, the position and data of the data packet where each byte is located are converted and analyzed by a corresponding dictionary, and the client and the server both have corresponding dictionary conversion and analysis, so that the data packets with simple bytes can be converted into more complex semantics through the dictionaries for logic processing, the transmitted data volume is greatly reduced, and the dependence of the data packets on good network states can be relieved;
3. the duplicate data packet and the original data packet adopt the same checking algorithm, so that whether the data packet is complete or not can be checked;
4. the client side sends the data packet copy before sending the data packet original, stores the data packet copy, sends the data packet original to the server after the data packet original passes the verification, the server receives, stores and verifies the data packet original, and the client side can release the data packet copy after the data packet original passes the verification, so that the effect of preventing the data packet from being lost is achieved.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalents and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (7)
1. A communication method for preventing packet loss is characterized by comprising the following steps:
a client initiates a connection request to a server through communication equipment;
the server responds to the connection request, and the client maintains long connection with the server through heartbeat;
the client sends a copy of the pre-detection data packet to the server and stores the copy of the data packet;
the server receives and verifies the data packet copy;
after the data packet copy passes the verification, the client sends a data packet original to the server;
the server receives, stores and verifies the original copy of the data packet;
the data packet is successfully received after the positive copy of the data packet passes the verification;
the client deletes the packet copy.
2. The communication method for preventing the lost packet according to claim 1, wherein the connection between the client and the server is based on a TCP communication protocol.
3. The method of claim 1, wherein the data packets are based on hexadecimal bytes, the location and data of the data packet where each byte is located, and corresponding dictionary conversion and parsing are provided for the client and the server.
4. The method according to claim 1, wherein the duplicate of the data packet and the original of the data packet both use the same checking algorithm.
5. The method of claim 1, wherein if the duplicate of the data packet fails to be checked, the client is unable to send the original data packet to the server.
6. The method according to claim 1, wherein the client resends the packet original to the server if the packet original check times out.
7. The method of claim 1, wherein if the data packet's true copy is not verified, the server does not reply.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210384367.2A CN114785462A (en) | 2022-04-13 | 2022-04-13 | Communication method for preventing packet loss |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210384367.2A CN114785462A (en) | 2022-04-13 | 2022-04-13 | Communication method for preventing packet loss |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114785462A true CN114785462A (en) | 2022-07-22 |
Family
ID=82429263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210384367.2A Pending CN114785462A (en) | 2022-04-13 | 2022-04-13 | Communication method for preventing packet loss |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114785462A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1671094A (en) * | 2004-03-15 | 2005-09-21 | 微软公司 | Method and apparatus for responding to a spurious timeout |
CN1964351A (en) * | 2006-11-21 | 2007-05-16 | 珠海金山软件股份有限公司 | A method to reduce network flow of game server by data package compression |
CN104917786A (en) * | 2014-03-11 | 2015-09-16 | 杭州雾隐美地传媒有限公司 | Method and module for saving transmission flow during interaction of client and server |
CN105573958A (en) * | 2016-01-12 | 2016-05-11 | 西北工业大学 | Reliable data interaction method based on RS-422 serial bus technique |
CN107395620A (en) * | 2017-08-17 | 2017-11-24 | 无锡清华信息科学与技术国家实验室物联网技术中心 | A kind of network transmission encrypting and decrypting method based on random bytes mapping |
CN111600927A (en) * | 2020-04-03 | 2020-08-28 | 浙江工业大学 | Method for service adaptive calling under complex network environment |
CN112565381A (en) * | 2020-11-30 | 2021-03-26 | 杭州迪普科技股份有限公司 | Data packet forwarding method, device and equipment |
CN113190388A (en) * | 2021-04-13 | 2021-07-30 | 厦门路桥信息股份有限公司 | TCP interface test method, medium, equipment and device |
-
2022
- 2022-04-13 CN CN202210384367.2A patent/CN114785462A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1671094A (en) * | 2004-03-15 | 2005-09-21 | 微软公司 | Method and apparatus for responding to a spurious timeout |
CN1964351A (en) * | 2006-11-21 | 2007-05-16 | 珠海金山软件股份有限公司 | A method to reduce network flow of game server by data package compression |
CN104917786A (en) * | 2014-03-11 | 2015-09-16 | 杭州雾隐美地传媒有限公司 | Method and module for saving transmission flow during interaction of client and server |
CN105573958A (en) * | 2016-01-12 | 2016-05-11 | 西北工业大学 | Reliable data interaction method based on RS-422 serial bus technique |
CN107395620A (en) * | 2017-08-17 | 2017-11-24 | 无锡清华信息科学与技术国家实验室物联网技术中心 | A kind of network transmission encrypting and decrypting method based on random bytes mapping |
CN111600927A (en) * | 2020-04-03 | 2020-08-28 | 浙江工业大学 | Method for service adaptive calling under complex network environment |
CN112565381A (en) * | 2020-11-30 | 2021-03-26 | 杭州迪普科技股份有限公司 | Data packet forwarding method, device and equipment |
CN113190388A (en) * | 2021-04-13 | 2021-07-30 | 厦门路桥信息股份有限公司 | TCP interface test method, medium, equipment and device |
Non-Patent Citations (1)
Title |
---|
是摸鱼啊: "GET 和 POST 的区别?", 《知乎》, pages 1 - 3 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5627829A (en) | Method for reducing unnecessary traffic over a computer network | |
CN112822276B (en) | Substation control layer communication method and system, electronic equipment and storage medium | |
US5309562A (en) | Method and apparatus for establishing protocol spoofing from a modem | |
US5592468A (en) | Wireless local area network system with improved transfer efficiency and data transfer method for same | |
US6321269B1 (en) | Optimized performance for transaction-oriented communications using stream-based network protocols | |
US5862326A (en) | Efficient request-reply protocol for a client-server model | |
CN112910856A (en) | Communication protocol design method based on serial port communication | |
JP2014509483A (en) | Mechanisms to improve the performance of transmission control protocols in wireless networks | |
KR20030081450A (en) | A dual proxy approach to tcp performance improvements over a wireless interface | |
US6055441A (en) | Systems and methods for facsimile communication over a cellular radiotelephone communications link | |
US7178060B2 (en) | Transmitting data reliably and efficiently | |
CN114338827A (en) | Internet of things protocol adaptation gateway, method and readable storage medium | |
US6502128B1 (en) | Server and a method for communicating event messages from the server connected to a peripheral device and a client computer | |
EP3038032A1 (en) | Service message transmitting method and device | |
CN107147561B (en) | Instant messaging method and system based on XMPP protocol | |
CN114785462A (en) | Communication method for preventing packet loss | |
CN104994074B (en) | A kind of implementation method of the health examination machine communication server | |
KR20020019334A (en) | Method of application hybrid ARQ type Ⅱ/Ⅲ and error handling method for improvement in performence on asynchronous wireless telecommunication system | |
CN107948303A (en) | The processing method of http request failure on a kind of Android | |
CN110636071B (en) | Interface docking method | |
CN114710570A (en) | UDP data zero-copy transmission method based on kernel mode protocol stack | |
WO2017067224A1 (en) | Packet processing method and apparatus | |
WO2012155703A1 (en) | Link parameter autonegotiation method, terminal and system based on hdlc protocol | |
KR100344979B1 (en) | Discard procedure for service data unit in radio link control | |
CN106850537B (en) | Method for realizing RSSP-I railway signal safety communication protocol |
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 |