CN117811702A - Communication data processing method, device and system - Google Patents
Communication data processing method, device and system Download PDFInfo
- Publication number
- CN117811702A CN117811702A CN202311874244.8A CN202311874244A CN117811702A CN 117811702 A CN117811702 A CN 117811702A CN 202311874244 A CN202311874244 A CN 202311874244A CN 117811702 A CN117811702 A CN 117811702A
- Authority
- CN
- China
- Prior art keywords
- data packet
- data
- communication
- data packets
- verified
- 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 155
- 238000004891 communication Methods 0.000 title claims abstract description 140
- 238000003672 processing method Methods 0.000 title abstract description 11
- 238000012790 confirmation Methods 0.000 claims abstract description 41
- 238000000034 method Methods 0.000 claims abstract description 37
- 238000013524 data verification Methods 0.000 claims abstract description 32
- 238000012544 monitoring process Methods 0.000 claims abstract description 19
- 238000012545 processing Methods 0.000 claims description 39
- 238000012795 verification Methods 0.000 claims description 25
- 239000012634 fragment Substances 0.000 claims description 14
- 238000005538 encapsulation Methods 0.000 claims description 7
- 230000011218 segmentation Effects 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 3
- 230000005540 biological transmission Effects 0.000 description 17
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
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/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0056—Systems characterized by the type of code used
- H04L1/0061—Error detection codes
-
- 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/1806—Go-back-N protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a communication data processing method, device and system. Wherein the method comprises the following steps: monitoring data packets received by a receiving end in a communication process, and sequentially writing the received data packets into a data packet sequence, wherein a plurality of data packets contained in the data packet sequence are sequenced according to a receiving time stamp; the receiving end sequentially performs data verification on the data packets in the data packet sequence; if the checking result of any data packet to be checked in the data packet sequence is damaged, stopping feeding back the communication confirmation information corresponding to the data packet to be checked to the transmitting end, wherein the transmitting end does not receive the communication confirmation information corresponding to the data packet to be checked within a preset time, and retransmitting the data packet to be checked. The invention solves the technical problems of high resource occupancy rate and low communication efficiency under the same communication data volume in the related technology.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a method, an apparatus, and a system for processing communication data.
Background
The Matter protocol is an emerging communication protocol of the internet of things, and aims to unify the communication standards of various intelligent devices so that the intelligent devices can communicate and cooperate with each other. The data protocol uses the Thread network protocol to communicate, and can support different communication modes such as wireless network (Wireless Fidelity, wi-Fi), bluetooth, zigbee and the like, so that the interconnection between devices becomes simpler and more efficient.
However, the existing communication data transmission mode based on the Matter protocol has high resource occupancy rate, and particularly on some intelligent devices with limited resources, the performance of the intelligent devices is reduced. In addition, in the case of a poor network environment, the communication data transmission efficiency is low.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for processing communication data, which are used for at least solving the technical problems of high resource occupancy rate and low communication efficiency under the condition of the same communication data volume in the related technology.
According to one embodiment of the present invention, there is provided a method for processing communication data, including: monitoring data packets received by a receiving end in a communication process, and sequentially writing the received data packets into a data packet sequence, wherein a plurality of data packets contained in the data packet sequence are sequenced according to a receiving time stamp; the receiving end sequentially performs data verification on the data packets in the data packet sequence; if the checking result of any data packet to be checked in the data packet sequence is damaged, stopping feeding back the communication confirmation information corresponding to the data packet to be checked to the transmitting end, wherein the transmitting end does not receive the communication confirmation information corresponding to the data packet to be checked within a preset time, and retransmitting the data packet to be checked.
Optionally, the processing method of communication data further includes: when the total length of the data packet received by the receiving end exceeds a threshold value, the receiving end starts to execute data verification on the data packet sequence.
Optionally, the processing method of communication data further includes: and the receiving end sequentially performs data verification on the data packets in the data packet sequence by taking one data packet as a unit, deletes at least one data packet positioned behind the data packet to be verified in the data packet sequence when any data packet to be verified is verified to be damaged, and feeds back the data packet to be verified to the transmitting end.
Optionally, the receiving end generates communication confirmation information corresponding to the data packet to be verified under the condition that the verification result of the data packet to be verified is successful, and feeds back the generated communication confirmation information to the sending end.
Optionally, each time the transmitting end receives a predetermined number of data packets, it monitors whether communication acknowledgement information matching the predetermined number of data packets is received, and if there is at least one communication acknowledgement information corresponding to the data packets that is not received, the data packets are retransmitted until the communication acknowledgement information of the data packets is received.
Optionally, the processing method of communication data further includes: the transmitting end encodes the data to be transmitted to generate a data packet; the transmitting end judges whether the length of the data packet exceeds a threshold value; if the length of the data packet exceeds the threshold value, the transmitting end performs segmentation on the data packet, divides the data packet into a plurality of fragments, assembles the head address and the length of the fragments into a head, assembles the data part into an effective data area, and encapsulates the head and the effective data area; the sending end starts to send the encapsulation result of the data packet to the receiving end.
According to one embodiment of the present invention, there is also provided a communication data processing apparatus including: the monitoring module is used for monitoring the data packets received in the communication process and writing the received data packets into the data packet sequence in turn, wherein the data packets contained in the data packet sequence are sequenced according to the receiving time stamps; the verification module is used for sequentially carrying out data verification on the data packets in the data packet sequence; and the control module is used for stopping feeding back the communication confirmation information corresponding to the data packet to be checked to the transmitting end if the checking result of any one of the data packets to be checked in the data packet sequence is damaged, wherein the transmitting end does not receive the communication confirmation information corresponding to the data packet to be checked within a preset time, and resends the data packet to be checked.
Optionally, the processing device of communication data further includes: and the starting module is used for starting to execute data verification on the data packet sequence when the total length of the data packet received by the receiving end exceeds a threshold value.
Optionally, the verification module is further configured to: and the receiving end sequentially performs data verification on the data packets in the data packet sequence by taking one data packet as a unit, deletes at least one data packet positioned behind the data packet to be verified in the data packet sequence when any data packet to be verified is verified to be damaged, and feeds back the data packet to be verified to the transmitting end.
Optionally, the control module is further configured to: and the receiving end generates communication confirmation information corresponding to the data packet to be verified under the condition that the verification result of the data packet to be verified is successful, and feeds the generated communication confirmation information back to the sending end.
Optionally, the control module is further configured to: and each time the transmitting end receives a preset number of data packets, monitoring whether communication confirmation information matched with the preset number of data packets is received, and if at least one communication confirmation information corresponding to the data packets is not received, retransmitting the data packets until the communication confirmation information of the data packets is received.
Optionally, the processing device of communication data further includes a generating module, configured to encode data to be transmitted by the transmitting end, and generate a data packet; the control module is also used for: the transmitting end judges whether the length of the data packet exceeds a threshold value; if the length of the data packet exceeds the threshold value, the transmitting end performs segmentation on the data packet, divides the data packet into a plurality of fragments, assembles the head address and the length of the fragments into a head, assembles the data part into an effective data area, and encapsulates the head and the effective data area; the sending end starts to send the encapsulation result of the data packet to the receiving end.
According to one embodiment of the present invention, there is also provided a communication data processing system including: the transmitting end encodes the data to be transmitted to generate a data packet; the receiving end is communicated with the transmitting end and is used for monitoring that data packets received in the communication process are sequentially written into the data packet sequence, sequentially carrying out data verification on the data packets in the data packet sequence, and stopping feeding back communication confirmation information corresponding to the data packets to be verified to the transmitting end if the verification result of any one of the data packets to be verified in the data packet sequence is damaged, wherein the data packets contained in the data packet sequence are sequenced according to the receiving time stamps; the sending end is further configured to retransmit the data packet to be checked, where the communication acknowledgement information corresponding to the data packet to be checked is not received within a predetermined time.
In the embodiment of the invention, a mode of monitoring the data packets received by the receiving end in the communication process and writing the received data packets into the data packet sequence in turn and sequentially carrying out data verification on the data packets in the data packet sequence by the receiving end is adopted, if the verification result of any data packet to be verified in the data packet sequence is damaged, the feedback of communication confirmation information corresponding to the data packet to be verified to the sending end is stopped, so that the aim of low resource occupancy rate under the same communication data volume is fulfilled, the technical effects of reducing the resource occupancy rate and improving the communication efficiency under the same communication data volume are fulfilled, and the technical problems of high resource occupancy rate and low communication efficiency under the same communication data volume in the related art are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a block diagram of a hardware configuration of a method of processing communication data according to one embodiment of the present invention;
FIG. 2 is a flow chart of a method of processing communication data according to one embodiment of the invention;
FIG. 3 is a schematic diagram of a method of processing communication data according to one embodiment of the present invention;
fig. 4 is a block diagram of a communication data processing apparatus according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the method for processing communication data provided by the embodiment of the application can be executed in a mobile terminal, a computer terminal or a similar computing device. Fig. 1 is a block diagram of a hardware configuration of a method for processing communication data according to an embodiment of the present invention. As shown in fig. 1, the computer terminal 10 (or electronic device 10) may include one or more (shown as 102a, 102b, … …,102 n) processors (which may include, but are not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors and/or other data processing circuits described above may be referred to herein generally as "data processing circuits. The data processing circuit may be embodied in whole or in part in software, hardware, firmware, or any other combination. Furthermore, the data processing circuitry may be a single stand-alone processing module, or incorporated, in whole or in part, into any of the other elements in the computer terminal 10 (or electronic device). As referred to in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of the path of the variable resistor termination to interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the processing methods of communication data in the embodiments of the present application, and the processor executes the software programs and modules stored in the memory 104, thereby executing various functional applications and data processing, that is, implementing the data processing methods described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 106 is used to receive or transmit data via a network. The specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission module 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with user pages of the computer terminal 10 (or electronic device).
It should be noted here that, in some alternative embodiments, the computer device (or the electronic device) shown in fig. 1 described above may include hardware elements (including circuits), software elements (including computer code stored on a computer readable medium), or a combination of both hardware elements and software elements. It should be noted that fig. 1 is only one example of a specific example, and is intended to illustrate the types of components that may be present in the computer device (or electronic device) described above.
According to an embodiment of the present invention, there is provided a method embodiment of a method of processing communication data, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different from that herein.
Fig. 2 is a flowchart of a method for processing communication data according to one embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S20, monitoring data packets received by a receiving end in a communication process, and sequentially writing the received data packets into a data packet sequence, wherein a plurality of data packets contained in the data packet sequence are ordered according to receiving time stamps;
specifically, a data packet received by a receiving end in a communication process is monitored; when receiving a data packet, the receiving end equipment records the related information of the data packet, including the content of the data packet and a receiving time stamp; sequentially writing the received data packets into a sequence of data packets, wherein an array, list, or other data structure may be used to store the sequence of data packets; when writing the data packet sequence, the data packets are ordered according to the receiving time stamp so as to ensure that a plurality of data packets in the data packet sequence are arranged according to the receiving time sequence.
Step S22, the receiving end sequentially performs data verification on the data packets in the data packet sequence;
specifically, when the receiving end receives the first data packet in the data packet sequence, the data packet is checked by using a pre-agreed data check algorithm, for example, cyclic redundancy check (Cyclic Redundancy Check, CRC) or hash check. If the checking result shows that the data packet has no error, the receiving end continues to receive the next data packet.
Step S24, if the checking result of any one of the data packets to be checked in the data packet sequence is damaged, stopping feeding back the communication confirmation information corresponding to the data packet to be checked to the transmitting end, wherein the transmitting end does not receive the communication confirmation information corresponding to the data packet to be checked in a preset time, and resending the data packet to be checked.
In the step S24, the communication acknowledgement information refers to a communication completion flag code (UNIX NET ACK, UNA), and the receiving end sends acknowledgement information to the sending end after successfully receiving and verifying the data packet, so as to inform the sending end that the data packet has been successfully received.
Specifically, in the communication with the bottom layer in the data application, when the sending end sends a data packet to the receiving end, the receiving end firstly checks the data packet, if the check result indicates that the check result of any one data packet to be checked in the data packet sequence is damaged, the receiving end stops feeding back communication confirmation information corresponding to the data packet to be checked to the sending end, wherein if the receiving end checks that the last data packet in the data packet sequence is damaged, the receiving end sends a message of communication completion to the sending end.
Based on the above steps S20 to S24, a manner of monitoring the data packets received by the receiving end in the communication process and sequentially writing the received data packets into the data packet sequence and sequentially performing data verification on the data packets in the data packet sequence by the receiving end is adopted, if the verification result of any one of the data packets to be verified in the data packet sequence is damaged, the feedback of the communication confirmation information corresponding to the data packets to be verified to the sending end is stopped, so that the purpose of low resource occupancy rate under the same communication data volume is achieved, the technical effects of reducing the resource occupancy rate and improving the communication efficiency under the same communication data volume are achieved, and the technical problems of high resource occupancy rate and low communication efficiency under the same communication data volume in the related art are solved.
Optionally, the processing method of the communication data further includes:
in step S251, when the total length of the data packet received by the receiving end exceeds the threshold value, the receiving end starts to perform data verification on the data packet sequence.
Specifically, the receiving end firstly sets a threshold value for determining the data packet sequence to start the data verification operation when the total length of the received data packets exceeds the total length. The threshold may be determined based on the particular application scenario and the size of the data packet. Then, when the total length of the data packet received by the receiving end exceeds a set threshold, the receiving end will start to perform data check on the data packet sequence, and the data check can adopt various different check algorithms, such as CRC check, parity check, and the like. In the process, the receiving end organizes the received data packet sequence according to a certain rule, and performs verification calculation on the whole data packet sequence. The verification calculation process can be determined according to a specific verification algorithm, and is generally to calculate each byte in the data packet, and compare the calculation result with a pre-calculated verification value of the receiving end. Finally, if the data verification is passed, the receiving end marks the received data packet sequence as reliable data, sends a verification completion Acknowledgement (ACK) to the sending end, and transmits the data packet to an upper layer application for processing; and if the data verification is not passed, requesting the transmitting end to retransmit the data.
Based on the step S251, when the total length of the data packet received by the receiving end exceeds the threshold, the receiving end starts to perform data verification on the data packet sequence, so as to ensure the integrity and accuracy of the received data packet, thereby improving the reliability and safety of data transmission.
Optionally, the processing method of the communication data further includes:
in step S252, the receiving end sequentially performs data verification on the data packets in the data packet sequence by taking one data packet as a unit, and when any one data packet to be verified is verified to be damaged, deletes at least one data packet located behind the data packet to be verified in the data packet sequence, and feeds back the data packet to be verified to the transmitting end.
Specifically, after receiving a data packet, the receiving end performs data verification operation on the data packet, and if the data packet passes the verification, the receiving end receives the next data packet to be verified, and the operation is repeated. When the receiving end checks any data packet to be checked, the receiving end finds that the data packet to be checked is a damaged data packet, and then deletes at least one data packet positioned behind the damaged data packet in the data packet sequence, so that the receiving end is ensured not to use the damaged data packet for subsequent processing. And the receiving end feeds back the damaged data packet to the sending end, and the sending end can retransmit the data packet or take other measures to ensure the reliable transmission of the data after receiving the feedback. Repeating the above operation until the receiving end completes the verification of the whole data packet sequence.
Based on the step S252, the receiving end sequentially performs data verification on the data packets in the data packet sequence by taking one data packet as a unit, and deletes at least one data packet positioned behind the data packet to be verified in the data packet sequence when any one data packet to be verified is verified to be damaged, and feeds back the data packet to be verified to the transmitting end, so that the accuracy and the integrity of communication data are ensured, errors and losses in the transmission process of the communication data can be effectively prevented, and the reliability and the stability of the transmission of the communication data are improved.
Optionally, the receiving end generates communication confirmation information corresponding to the data packet to be verified under the condition that the verification result of the data packet to be verified is successful, and feeds back the generated communication confirmation information to the sending end.
Specifically, after receiving the data packet to be checked, the receiving end checks the data packet first and compares the data packet with the checksum in the data packet so as to ensure the integrity and accuracy of the data packet. For example, a hash function is used to calculate the digest of the data packet. If the verification result is successful, the receiving end generates communication confirmation information corresponding to the data packet to be verified. The communication acknowledgement information UNA code is used for indicating the contents such as acknowledgement of the received data packet, state information of the receiving end, processing result of the data packet and the like. After the communication confirmation information is generated, the receiving end feeds back the communication confirmation information to the transmitting end. Reliable transmission of communication data can be achieved based on the above operations.
Optionally, each time the transmitting end receives a predetermined number of data packets, it monitors whether communication acknowledgement information matching the predetermined number of data packets is received, and if there is at least one communication acknowledgement information corresponding to the data packets that is not received, the data packets are retransmitted until the communication acknowledgement information of the data packets is received.
Specifically, the transmitting end will first send a certain number of data packets to the receiving end. Once the predetermined number of data packets has been transmitted, the transmitting end starts to monitor whether communication acknowledgement information matching the number of data packets transmitted is received. If the communication acknowledgement information matches the number of the transmitted data packets, the transmitting end can continue to transmit the next data packet. If at least one communication acknowledgement message corresponding to the data packet is not received, the transmitting end retransmits the data packet. This process continues until a communication acknowledgement is received for the packet, ensuring reliable transmission of the packet.
The steps can ensure reliable transmission of communication data even if packet loss or errors occur in the communication process. By monitoring and retransmitting the data packets, the transmitting end can ensure that the receiving end successfully receives all the data.
Optionally, the processing method of the communication data further includes:
step S261, the transmitting end encodes the data to be transmitted to generate a data packet;
step S262, the transmitting end judges whether the length of the data packet exceeds a threshold value;
step S263, if the length of the data packet exceeds the threshold value, the transmitting end segments the data packet, divides the data packet into a plurality of fragments, assembles the head address and the length of the fragments into a header, assembles the data part into an effective data area, and encapsulates the header and the effective data area;
in step S264, the transmitting end starts to transmit the encapsulation result of the data packet to the receiving end.
Specifically, firstly, a transmitting end processes data to be transmitted, codes the data to be transmitted, and generates a data packet so as to be correctly analyzed and reconstructed in the transmission process. Then, the transmitting end judges whether the length of the data packet exceeds a preset threshold value. If the length of the data packet exceeds the threshold, the sender performs segmentation on the data packet, i.e. the sender divides the data packet into a plurality of fragments, assembles the head address and the length of each fragment into a header, assembles the data part into a valid data area, and encapsulates the header and the valid data area. Finally, the transmitting end starts to transmit the encapsulation result of the data packet to the receiving end so that the receiving end can analyze and process the data.
Based on the steps S261 to S264, the transmitting end encodes the data to be transmitted to generate a data packet; the transmitting end judges whether the length of the data packet exceeds a threshold value; if the length of the data packet exceeds the threshold value, the transmitting end performs segmentation on the data packet, divides the data packet into a plurality of fragments, assembles the head address and the length of the fragments into a head, assembles the data part into an effective data area, and encapsulates the head and the effective data area; the sending end starts to send the encapsulation result of the data packet to the receiving end, so that the purpose of low resource occupancy rate under the same communication data volume is achieved, the technical effects of reducing the resource occupancy rate and improving the communication efficiency under the same communication data volume are achieved, and the technical problems of high resource occupancy rate and low communication efficiency under the same communication data volume in the related art are solved.
Fig. 3 is a schematic diagram of a method for processing communication data according to an embodiment of the present invention, as shown in fig. 3, the method for processing communication data includes the following steps:
first, when a receiving end receives a plurality of data packets, for example, 123, 456, 789 and other data packets, the received data packets are sequentially written into a data packet sequence, and data verification is sequentially performed on the data packets in the data packet sequence, wherein when the total length of the received data packets exceeds a threshold value, the receiving end starts to perform data verification on the data packet sequence. And secondly, the receiving end transmits communication confirmation information UNA, and when the receiving end receives the UNA, the receiving end continuously transmits subsequent data. When the data is damaged, the transmitting end retransmits the damaged data packet when the interval is larger than the preset number N of data packets. For example, when packet 1 is corrupted but packet 4 has been transmitted, packet 1 is retransmitted. Then, after the subsequent transmission of each N packets is finished, the transmitting end retransmits the data packet after not receiving the UNA code of the retransmitted data packet until receiving the UNA code of the data packet, and after the N data packets, the transmitting end completes retransmission after receiving the ACK code, thereby avoiding serious influence on the network when three continuous retransmissions continuously fail when using a transmission control protocol (Transmission Control Protocol, TCP). Finally, the data packet is transferred to IP Framing and Transport Management layer application for processing. Based on the above, the original reliable communication protocol generally performs data ensuring by an ACK mechanism, and on this basis, the present invention increases a multi-packet data checking mode of the sliding window and a dual mechanism of checking the communication acknowledgement information UNA code and the check completion ACK code, so that the state of equipment connection does not need to be ensured, the retransmission time can be reduced, and the quick recovery of communication is facilitated.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present invention.
The embodiment of the present invention further provides a device for processing communication data, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a block diagram of a communication data processing apparatus according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes:
the monitoring module 401 is configured to monitor a data packet received during a communication process, and sequentially write the received data packet into a data packet sequence, where a plurality of data packets included in the data packet sequence are ordered according to a receiving timestamp;
a verification module 402, configured to sequentially perform data verification on data packets in the data packet sequence;
and the control module 403 is configured to stop feeding back communication acknowledgement information corresponding to the data packet to be checked to the transmitting end if the check result of any one of the data packets to be checked in the data packet sequence is damaged, where the transmitting end does not receive the communication acknowledgement information corresponding to the data packet to be checked within a predetermined time, and resends the data packet to be checked.
Optionally, the processing device of communication data further includes: an enabling module 404, configured to enable performing data verification on the data packet sequence when the total length of the data packet received by the receiving end exceeds a threshold.
Optionally, the verification module 402 is further configured to: and the receiving end sequentially performs data verification on the data packets in the data packet sequence by taking one data packet as a unit, deletes at least one data packet positioned behind the data packet to be verified in the data packet sequence when any data packet to be verified is verified to be damaged, and feeds back the data packet to be verified to the transmitting end.
Optionally, the control module 403 is further configured to: and the receiving end generates communication confirmation information corresponding to the data packet to be verified under the condition that the verification result of the data packet to be verified is successful, and feeds the generated communication confirmation information back to the sending end.
Optionally, the control module 403 is further configured to: and each time the transmitting end receives a preset number of data packets, monitoring whether communication confirmation information matched with the preset number of data packets is received, and if at least one communication confirmation information corresponding to the data packets is not received, retransmitting the data packets until the communication confirmation information of the data packets is received.
Optionally, the processing device of communication data further includes a generating module 405, configured to encode data to be transmitted by a transmitting end, and generate a data packet; the control module 403 is further configured to: the transmitting end judges whether the length of the data packet exceeds a threshold value; if the length of the data packet exceeds the threshold value, the transmitting end performs segmentation on the data packet, divides the data packet into a plurality of fragments, assembles the head address and the length of the fragments into a head, assembles the data part into an effective data area, and encapsulates the head and the effective data area; the sending end starts to send the encapsulation result of the data packet to the receiving end.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
The embodiment of the application also provides a communication data processing system, which comprises: the transmitting end encodes the data to be transmitted to generate a data packet; the receiving end is communicated with the sending end and is used for monitoring that data packets received in a communication process are sequentially written into a data packet sequence, sequentially carrying out data verification on the data packets in the data packet sequence, and stopping feeding back communication confirmation information corresponding to the data packets to be verified to the sending end if the verification result of any one of the data packets to be verified in the data packet sequence is damaged, wherein the data packets contained in the data packet sequence are sequenced according to receiving time stamps; the sending end is further configured to retransmit the data packet to be verified, where the communication acknowledgement information corresponding to the data packet to be verified is not received within a predetermined time.
Alternatively, in the present embodiment, the processing system of communication data described above may be configured to store a computer program for executing the steps of:
s1, monitoring data packets received by a receiving end in a communication process, and sequentially writing the received data packets into a data packet sequence, wherein a plurality of data packets contained in the data packet sequence are ordered according to a receiving time stamp;
s2, the receiving end sequentially performs data verification on the data packets in the data packet sequence;
and S3, if the checking result of any data packet to be checked in the data packet sequence is damaged, stopping feeding back communication confirmation information corresponding to the data packet to be checked to the transmitting end, wherein the transmitting end does not receive the communication confirmation information corresponding to the data packet to be checked within a preset time, and retransmitting the data packet to be checked.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (11)
1. A method for processing communication data, comprising:
monitoring data packets received by a receiving end in a communication process, and sequentially writing the received data packets into a data packet sequence, wherein a plurality of data packets contained in the data packet sequence are sequenced according to a receiving time stamp;
the receiving end sequentially performs data verification on the data packets in the data packet sequence;
and if the checking result of any data packet to be checked in the data packet sequence is damaged, stopping feeding back communication confirmation information corresponding to the data packet to be checked to a transmitting end, wherein the transmitting end does not receive the communication confirmation information corresponding to the data packet to be checked within a preset time, and retransmitting the data packet to be checked.
2. The method according to claim 1, wherein the method further comprises: and when the total length of the data packet received by the receiving end exceeds a threshold value, starting to execute the data verification on the data packet sequence.
3. The method according to claim 1, wherein the method further comprises:
and the receiving end sequentially performs data verification on the data packets in the data packet sequence by taking one data packet as a unit, deletes at least one data packet positioned behind the data packet to be verified in the data packet sequence when any one data packet to be verified is verified to be damaged, and feeds back the data packet to be verified to the transmitting end.
4. A method according to any one of claims 1 to 3, wherein the receiving end generates communication acknowledgement information corresponding to the data packet to be verified, and feeds back the generated communication acknowledgement information to the transmitting end, when the verification result of the data packet to be verified is successful.
5. The method of claim 1, wherein each time a predetermined number of data packets are received by the transmitting end, the transmitting end monitors whether communication acknowledgement information matching the predetermined number of data packets is received, and if at least one communication acknowledgement information corresponding to the data packets is not received, the transmitting end resends the data packets until the communication acknowledgement information of the data packets is received.
6. The method according to claim 1, wherein the method further comprises:
the sending end encodes the data to be transmitted to generate the data packet;
the sending end judges whether the length of the data packet exceeds a threshold value;
if the length of the data packet exceeds the threshold value, the sending end performs segmentation on the data packet, divides the data packet into a plurality of fragments, assembles the head address and the length of the fragments into a header, assembles the data part into an effective data area, and encapsulates the header and the effective data area;
the sending end starts to send the encapsulation result of the data packet to the receiving end.
7. A communication data processing apparatus, comprising:
the monitoring module is used for monitoring the data packets received in the communication process and writing the received data packets into a data packet sequence in sequence, wherein a plurality of data packets contained in the data packet sequence are sequenced according to the receiving time stamps;
the verification module is used for sequentially carrying out data verification on the data packets in the data packet sequence;
and the control module is used for stopping feeding back communication confirmation information corresponding to the data packet to be verified to the transmitting end if the verification result of any data packet to be verified in the data packet sequence is damaged, wherein the transmitting end does not receive the communication confirmation information corresponding to the data packet to be verified within a preset time, and resends the data packet to be verified.
8. The apparatus of claim 7, wherein the apparatus further comprises: and the starting module is used for starting to execute the data verification on the data packet sequence when the total length of the received data packet exceeds a threshold value.
9. The apparatus according to claim 7 or 8, wherein the control module is further configured to generate communication acknowledgement information corresponding to the data packet to be verified, and feed back the generated communication acknowledgement information to the transmitting end, if the verification result of the data packet to be verified is successful.
10. The apparatus of claim 7, wherein the apparatus further comprises: and each time the transmitting end receives a preset number of data packets, monitoring whether communication confirmation information matched with the preset number of data packets is received, and if at least one communication confirmation information corresponding to the data packets is not received, retransmitting the data packets until the communication confirmation information of the data packets is received.
11. A system for processing communication data, comprising:
the transmitting end encodes the data to be transmitted to generate a data packet;
the receiving end is communicated with the sending end and is used for monitoring that data packets received in a communication process are sequentially written into a data packet sequence, sequentially carrying out data verification on the data packets in the data packet sequence, and stopping feeding back communication confirmation information corresponding to the data packets to be verified to the sending end if the verification result of any one of the data packets to be verified in the data packet sequence is damaged, wherein the data packets contained in the data packet sequence are sequenced according to receiving time stamps;
the sending end is further configured to retransmit the data packet to be verified, where the communication acknowledgement information corresponding to the data packet to be verified is not received within a predetermined time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311874244.8A CN117811702A (en) | 2023-12-29 | 2023-12-29 | Communication data processing method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311874244.8A CN117811702A (en) | 2023-12-29 | 2023-12-29 | Communication data processing method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117811702A true CN117811702A (en) | 2024-04-02 |
Family
ID=90429752
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311874244.8A Pending CN117811702A (en) | 2023-12-29 | 2023-12-29 | Communication data processing method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117811702A (en) |
-
2023
- 2023-12-29 CN CN202311874244.8A patent/CN117811702A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104539739B (en) | A kind of system, method and device that file uploads | |
KR101366332B1 (en) | A method of automatic repeat request(ARQ) in communication system | |
US6301249B1 (en) | Efficient error control for wireless packet transmissions | |
CN107257270B (en) | Data transmission method and system based on hybrid automatic repeat request | |
KR102046792B1 (en) | Method of transporting data from sending node to destination node | |
CN106031072A (en) | Harq frame data structure and method of transmitting and receiving with harq in systems using blind detection | |
CN109905205B (en) | Data sending method, data receiving method, data sending equipment, data receiving equipment, data transmission method and data transmission system | |
CN105657646A (en) | Bluetooth 4.0 based device-to-device big data communication method | |
WO2011137640A1 (en) | File transmission method, file transmission apparatus and file reception apparatus | |
CN113783662B (en) | Adaptive data transmission method and device, computer equipment and readable storage medium | |
CN111711680A (en) | File breakpoint continuous transmission method and device based on UDP (user Datagram protocol) | |
CN108933642B (en) | Downlink retransmission method based on code block grouping, base station and terminal | |
CN106656424A (en) | Verification method of data transmission | |
CN117220837A (en) | Data transmission method, storage medium and equipment | |
CN107645357B (en) | Recovery method and device for incomplete transmitted file | |
CN109120385B (en) | Data transmission method, device and system based on data transmission system | |
CN102318282A (en) | Method and apparatus for compressed data packet transmission | |
CN101453479A (en) | Fast document transmission system | |
US10200154B2 (en) | System and method for early packet header verification | |
CN111147597B (en) | File transmission method, terminal, electronic device and storage medium | |
CN117811702A (en) | Communication data processing method, device and system | |
CN115412890B (en) | Data transmission method and device and terminal equipment | |
CN115843033A (en) | Data security communication method based on LoRa broadcast, loRa host terminal and system | |
CN111741013B (en) | Data transmission method and device | |
CN116112121A (en) | Wireless communication method, system, equipment and 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 |