CN107426770A - Data communication method, data terminal and system based on data link layer - Google Patents

Data communication method, data terminal and system based on data link layer Download PDF

Info

Publication number
CN107426770A
CN107426770A CN201710604945.8A CN201710604945A CN107426770A CN 107426770 A CN107426770 A CN 107426770A CN 201710604945 A CN201710604945 A CN 201710604945A CN 107426770 A CN107426770 A CN 107426770A
Authority
CN
China
Prior art keywords
data
terminal
data frame
block
frame
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.)
Granted
Application number
CN201710604945.8A
Other languages
Chinese (zh)
Other versions
CN107426770B (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.)
GD Midea Air Conditioning Equipment Co Ltd
Original Assignee
Guangdong Midea Refrigeration Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Midea Refrigeration Equipment Co Ltd filed Critical Guangdong Midea Refrigeration Equipment Co Ltd
Priority to CN201710604945.8A priority Critical patent/CN107426770B/en
Publication of CN107426770A publication Critical patent/CN107426770A/en
Application granted granted Critical
Publication of CN107426770B publication Critical patent/CN107426770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/04Error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/02Data link layer protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of data communication method based on data link layer, data terminal and system, the data communication method carries out multiple data block processing by packet of the first terminal in data frame to be sent and sent to second terminal, the packet includes verification and information corresponding to each data block, transmission reply data frame is sent to first terminal after second terminal receives data frame, and according to the reply data frame, subsequently only transmission includes the data frame of data block error to first terminal.All packet can be repeated to send when there is error in data compared with the prior art, the embodiment of the present invention is when subsequently sending data frame, only send the data block of mistake, therefore the data volume of data frame is greatly reduced first relatively, the bit error rate of data transfer is so significantly reduced, and then improves data goodput and efficiency of transmission in wireless network.

Description

Data communication method, data terminal and system based on data link layer
Technical field
The present invention relates to wireless network data communication field, more particularly to a kind of data communication side based on data link layer Method, data terminal and system.
Background technology
With the popularization of mobile terminal device such as mobile phone, before the wireless network communication based on mobile terminal device is relative For cable network using more and more extensive, wireless network communication agreement such as WIFI now is to communicate association based on conventional cable network Transformation forms on the basis of view.Under cable network environment, the transmission success rate of data is high, when there is network congestion, typically Cause for the loss of data message, and under wireless network environment, because the reliability of transmission medium substantially reduces, the mistake of link The main reason for code substitution network congestion turns into data-bag lost, and now traditional procotol still can be by the packet loss of network It is judged as congestion, so as to the congestion window of reduction transmitting terminal that can be wrong, thus can reduces in wireless network communication and effectively handle up Rate and efficiency of transmission.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of data communication method based on data link layer, data terminal and be System, it is intended to solve existing communication network protocol applied to occurring reducing asking for goodput and efficiency of transmission in wireless network Topic.
To achieve the above object, a kind of data communication method based on data link layer provided by the invention, it is described to be based on The data communication method of data link layer includes:
Packet in data frame to be sent is divided into multiple data blocks by first terminal;
The first terminal calculate each data block verification and, according to default communication protocol will include verification and and The data frame of data block is encapsulated and sent to second terminal, wherein, the number that the second terminal is sent according to the first terminal Parsed according to frame, according to the verification of the data frame and determine to send the data block of mistake, and according to the data for sending mistake Block generates and feeds back reply data frame;
When receiving the reply data frame that the second terminal is sent, the first terminal is according to the reply data frame Identification sends the data block of mistake, and will be re-packaged into data frame comprising the data block for sending mistake and send to described second Terminal.
Preferably, the first terminal by comprising verification and and data block data frame encapsulation before also include:
Data block quantity information and data block identifier information, the data block identifier packet are built in the data frame Identification information corresponding to each data block is included, the mark is believed when recognizing the data block error for the second terminal Breath is modified, and mistake is sent to identify the data block;
The first terminal identifies that the data block for sending mistake includes according to the reply data frame:
The first terminal identifies identification information corresponding to each data block of the reply data frame, according to the mark Data block corresponding to modified values determination in information sends mistake.
Preferably, the first terminal by comprising verification and and data block data frame encapsulation before also include:
Piecemeal identification information is built in the data frame, to identify whether the data frame carries out piecemeal, for described Second terminal according to the verification of the data frame and determines to send mistake when there is piecemeal identification information in receiving the data frame Data block by mistake.
Preferably, the verification for calculating each data block and, and the verification and information are added to corresponding data Also include in block:
Calculate the header data before being located at the position in the data frame where packet verification and, and by the school Test and be added to information in the data frame, for the second terminal according to the verification and information of the header data to stem Data are verified.
To achieve the above object, a kind of data communication method based on data link layer that the present invention also provides, the base Include in the data communication method of data link layer:
Second terminal receives the data frame that first terminal is sent, and school is carried out respectively to multiple data blocks in the data frame Test and check;
Corresponding identification information is modified according to the data block of verification mistake, to identify the data of the verification mistake Block error in data;
Encapsulated comprising the reply data frame that have modified identification information by described and send the first terminal, wherein, it is described For first terminal when receiving the reply data frame that the second terminal is sent, the first terminal is according to the reply data frame Identification sends the data block of mistake, and will be re-packaged into data frame comprising the data block for sending mistake and send to described second Terminal.
Preferably, the second terminal is verified and checks it respectively to multiple data blocks in the data frame that receives It is preceding also to include:
Identify the piecemeal identification information in the data frame;
When confirming the data frame packet when containing block data according to the piecemeal identification information, perform to the data frame Block data carries out verification and collation process step.
Preferably, the second terminal also includes before receiving the data frame that first terminal is sent:
Packet in data frame to be sent is divided into multiple data blocks by first terminal;
The first terminal calculate each data block verification and, according to default communication protocol will include verification and and The data frame of data block is encapsulated and sent to second terminal.
Preferably, the first terminal will also include before the data frame encapsulation comprising multiple data blocks:
First terminal builds the quantity information and data block identifier information of data block, the data block in the data frame Identification information includes identification information corresponding to each data block, when recognizing the data block error for the second terminal pair The identification information is modified, and mistake is sent to identify the data block.
To achieve the above object, the present invention also provides a kind of data terminal, and the data terminal includes:
First controller;
First memory;And
First application program of the data communication method based on data link layer, wherein first application program is stored In the first memory, first application program realizes the number based on data link layer applied in first terminal The step of according to the means of communication.
To achieve the above object, the present invention also provides a kind of data terminal, and the data terminal includes:
Second controller;
Second memory;And
Second application program of the data communication method based on data link layer, wherein second application program is stored In the first memory, second application program realizes the number based on data link layer applied in second terminal The step of according to the means of communication.
To achieve the above object, the present invention also provides a kind of data communication system based on data link layer, described wireless Data Communication in Computer Networks system includes:
First terminal, it is divided into multiple data blocks for the packet in the data frame by transmission;And
Calculate each data block verification and, according to default communication protocol by comprising verification and and data block data Frame is encapsulated and sent to second terminal;And
When receiving the reply data frame that the second terminal is sent, the first terminal is according to the reply data frame Identification sends the data block of mistake, and will be re-packaged into data frame comprising the data block for sending mistake and send to described second Terminal;
Second terminal, the data frame that first terminal is sent is received, multiple data blocks in the data frame are carried out respectively Verification and verification;And
Corresponding identification information is modified according to the data block of verification mistake, to identify the data of the verification mistake Block error in data;And
Encapsulated comprising the reply data frame that have modified identification information by described and send the first terminal.
Data communication method provided by the invention based on data link layer, first terminal pass through in data frame to be sent In packet be divided into multiple data blocks, and calculate each data block verification and, and will verification and corresponding to information is added to In data block, while structure data block quantity information and data block identifier information, data block quantity information include in a data frame The quantity information of data block, data block identifier information include identification information corresponding to each data block, so that second terminal identifies Identification information is modified to during data block error, with identification data block send mistake, finally will include multiple data blocks with And data block quantity information and the data frame of data block identifier information are encapsulated and sent to second terminal;Second terminal receives data Multiple data blocks in data frame are verified and checked respectively after frame, and are marked according to the data block of verification mistake to corresponding Know information to modify, the data block data mistake of mistake is checked with mark, will then include the response that have modified identification information Data frame encapsulates and sends first terminal;First terminal identifies in subsequently received reply data frame according to reply data frame The data block of mistake is sent, and data frame will be re-packaged into comprising the data block for sending mistake and sent to second terminal.Phase All packets can be repeated to send by prior art when there is error in data, the embodiment of the present invention is subsequently sending data During frame, the data block of mistake is only sent, therefore the data volume of data frame is greatly reduced first relatively, so significantly reduces data The bit error rate of transmission, and then improve data goodput and efficiency of transmission in wireless network communication.
Brief description of the drawings
Fig. 1 is the schematic flow sheet for sending data frame first of the first embodiment of data communication method of the present invention;
Fig. 2 is the data frame structure schematic diagram sent first of the first embodiment of data communication method of the present invention;
Fig. 3 is the schematic flow sheet of the follow-up transmission data frame of the first embodiment of data communication method of the present invention;
Fig. 4 is the schematic flow sheet of the 3rd embodiment of data communication method of the present invention;
The flow that Fig. 5 is the first terminal of the data communication method of fourth embodiment of the invention and second terminal interacts Schematic diagram;
Fig. 6 is the high-level schematic functional block diagram of the data communication system of fifth embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only the part of the embodiment of the present invention, rather than whole embodiments.Base Embodiment in the present invention, those of ordinary skill in the art obtained under the premise of creative work is not made it is all its His embodiment, belongs to the scope of protection of the invention.
It is to be appreciated that the description for being related to " first ", " second " etc. in the present invention is only used for describing purpose, without being understood that To indicate or implying its relative importance or the implicit quantity for indicating indicated technical characteristic.Thus, define " first ", At least one this feature can be expressed or be implicitly included to the feature of " second ".In the description of embodiments of the present invention, " multiple " are meant that two or more, unless otherwise specifically defined.In addition, the technology between each embodiment Scheme can be combined with each other, but must can be implemented as basis with those of ordinary skill in the art, when the knot of technical scheme It will be understood that the combination of this technical scheme is not present when conjunction appearance is conflicting or can not realize, also not in application claims Within protection domain.
In data communication method provided by the invention, data terminal and data communication system with next embodiment, institute The first terminal and second terminal being related to have wireless network access function, include but is not limited to:Mobile phone, tablet personal computer (PAD, Portable Android Device), wearable device, the equipment such as notebook with wireless network card, involved data communication Method is applied in wireless network, based on 802.11 protocol suite standards, corresponding to OSI (Open System Interconnection, Open System Interconnection) second layer in Data Reference Model is data link layer, the protocol suite standard For data link layer be applied to wireless network a kind of implementation, data link layer between physical layer and Internet, its Basic function is to provide transparent and reliable data transmission basic service to this layer of user, the data of this layer of upper transmission it is interior Appearance, form and coding do not limit, and also It is not necessary to explain the meaning of message structure, data link layer is former to physical layer transmission The reinforcement of the function of beginning bit stream, it is therefore intended that it is original, have the physical transmission lines of mistake on the basis of, take mistake to examine The methods of survey, Error Control and flow control, the physical circuit for having mistake is modified to the data link of zero defect in logic, to Internet provides the service of high quality, and from the point of view of network reference model, each layer on physical layer has improvement data to pass The responsibility of transmission quality, but data link layer is most important one layer.
Data link layer is different from TCP transport layer and IP network layer, is transparent for TCP transport layer and IP network layer , TCP transport layer and IP network layer correspond to the data processing of data packet portions in the data frame of data link layer, and Data-Link The data frame of road floor also includes other data such as MAC Header (MAC header) partial data in addition to packet (DATA):Frame control Domain (Frame Control) processed, duration (Duration), address field (Address), sequence control domain (Sequence Control) etc., referring specifically to the frame structure of existing 802.11 agreement.
Fig. 1 is according to the schematic flow sheet of the data communication method based on data link layer of the embodiment of the present invention, this reality The data communication method for applying example is applied to the first terminal of data communication in wireless network, as shown in figure 1, the data communication method Comprise the following steps:
Packet in data frame to be sent is divided into multiple data blocks by step S101, first terminal;
Improvement on frame structure of the data frame of the embodiment of the present invention based on 802.11 agreements, in original frame structure Packet (DATA) is partly divided into polylith, and data frame structure schematic diagram as shown in Figure 2, wherein packet (DATA) are partly divided Into from data1, multiple pieces of data2 to datab, the data length that each data block takes can be set identical.
Step S102, first terminal calculate each data block verification and, will include verification according to default communication protocol With and the data frame of data block encapsulate and send to second terminal, wherein, the data that second terminal is sent according to first terminal Frame is parsed, and according to the verification of data frame and determines to send the data block of mistake, and generated according to the data block for sending mistake And feed back reply data frame;
As shown in Fig. 2 calculating each data block verification and being verified in figure and two bytes of occupancy are 16 bit checks With, the verification of each data block and be respectively added to after corresponding data block, such as data block data1 verification in figure and Checksum_1 is arranged on after data block data1, and data block data2 verification and checksum_2 are arranged on data block After data2, so it is easy to the later stage that verification and data is identified.
Further, because whole data frame is except packet (DATA) part, in addition to other parts data, such as Fig. 2 Part before middle packet (DATA) is referred to as header data, includes frame control domain (Frame Control), duration (Duration), these data messages such as address field (Address), sequence control domain (Sequence Control).For number According to the accuracy of transmitting procedure, it is also necessary to these header datas are calculated with verification and verification then is added into data with data In frame, the checksum in Fig. 2 be header data verification and, after whole data frame, be preferably located at whole number According to the last of frame, facilitate the identification of second terminal.
Further, first terminal by comprising verification and and data block data frame encapsulation before also include:
The quantity information and data block identifier information of data block are built in a data frame, and data block identifier information includes each Identification information corresponding to data block, identification information is modified when recognizing data block error for second terminal, with mark Data block sends mistake;
First terminal identifies that the data block for sending mistake includes according to reply data frame:
Identification information corresponding to each data block of first terminal identification reply data frame, the modification in identification information Data block corresponding to value determination sends mistake.
The data frame of the present embodiment also includes the quantity information and data block identifier information of data block, as shown in Fig. 2 wherein Fragnum in the quantity information corresponding diagram of data block, it is 4 to take 0.5 byte.Data block identifier information includes each number The fragmark in figure is corresponded to according to identification information corresponding to block, it is whether correct for identifying corresponding data block, take 2 bytes I.e. 16, each position corresponds to one of data block, and specific each bit data value can be uniformly come mark data with 1 or 0 No correct, it is correct that such as unification sends data block corresponding to 1 mark.It is 16 because fragnum only has 4 and fragmark Position, therefore 16 data blocks can be at most identified, data1, data2 to the data16 in corresponding diagram data blocks, now correspond to Verification and information be also from checksum_1, checksum_2 to checksum_16.
The quantity information and data block identifier information of above-mentioned data block are the frame data knot in existing 802.11 agreement Improvement on structure, can profit be to be multiplexed some wherein existing data message bytes because some of data of existing protocol frame Different periods of the byte in data transmission procedure such as send and receive be not terminate can use, therefore can be directed to it is different when Duan Jinhang is multiplexed, and these bytes are newly defined as with above-mentioned data block quantity information and data block identifier information.Data in Fig. 2 The quantity information fragnum of block is located at header data part, and data block identifier information fragmark abuts the school of header data Test and checksum, i.e., before verification and checksum, such setting is also convenient for the identification with second terminal.
The quantity information and data block identifier information of the data and data block that carry out piecemeal in above-mentioned steps are sealed Dress, and send to second terminal, you can realize that the data of first terminal are sent.Here it can be in local to send to second terminal Second terminal is sent directly in net, or the second terminal equipment in LAN is forwarded to through server;Or can also be through Server is forwarded to the second terminal of remote port.Here server provides access point (AP) equipment of function for wireless network, For data frame to be forwarded into second terminal from first terminal through wireless network;Or data frame is forwarded to server, by taking Business device is parsed to data frame, and the data frame after parsing is forwarded into second terminal.Then for example simple server can be with Conventional wireless exchange board, LAN closely is suitably applied in, the equipment such as smart mobile phone of two carrying wireless network cards can Communication mutual in LAN is realized by wireless router.Certain server may furthermore is that extended pattern AP, example Such as wireless router, except realizing short-range mobile device interconnection, moreover it is possible to pass through wireless router and access wired internet network Realize remote two mobile devices interconnection communication.
Further, after above-mentioned steps S102, in addition to:
Step S103, when receiving the reply data frame of second terminal transmission, first terminal is known according to reply data frame The data block of mistake is not sent, and will be re-packaged into data frame comprising the data block for sending mistake and sent to second terminal.
Data frame is sent to second terminal, second terminal analysis by server in first terminal and received from server Data frame data and carry out response, send corresponding reply data frame by server to second terminal.As shown in figure 3, This reply data frame includes data block identifier information fragmark, contains whether each block data in packet is correctly marked Know information.Each data by analyzing fragmark bytes can confirm whether the corresponding piecemeal time is correct, such as such as Fruit default data place value 1 identifies correctly, if it is 0 to receive a certain bit value, data block data corresponding to mark is incorrect, Illustrate that second terminal is not properly received this data block.
Data block identifier information fragmark of the first terminal in reply data frame recognizes wrong with the presence of data block Mistake, meeting data block next time wrong to these, which is encapsulated into data frame, is re-transmitted to server.
Such as when recognize data block identifier information fragmark first and data block identifier block of information data1 and Data2 flag position 0, then it is judged as that second terminal is not properly received this data block, then first terminal weighs next time Newly first and data block identifier block of information data1 and data2 are encapsulated into data frame, while are encapsulated into also having in data frame The verification of header data and header data and checksum and data block identifier information fragmark information are sent to server. Because the data frame of this transmission contains only the data block of mistake, therefore the data volume of data frame is big compared to what is sent first For reduce, in wireless network environment, data volume reduce can reduction data frame transmission when the bit error rate, transmit every time Data volume is fewer, and the bit error rate is lower.All packets can be repeated to send during due to occurring error in data in the prior art, because The length of this data frame is identical with sending first, and the present embodiment carries out piecemeal processing to packet, sending data first After frame, when there is error in data, the data block of mistake is only sent in follow-up send, therefore the data volume of data frame is relatively first It is greatly reduced, so significantly reduces the bit error rate of data transfer.
The embodiment of the present invention based on the data communication method of data link layer by first terminal by data frame to be sent In packet be divided into multiple data blocks, and calculate each data block verification and, and will verification and corresponding to information is added to In data block, while structure data block quantity information and data block identifier information, data block quantity information include in a data frame The quantity information of data block, data block identifier information include identification information corresponding to each data block, so that second terminal identifies Identification information is modified to during data block error, with identification data block send mistake, finally will include multiple data blocks with And data block quantity information and the data frame of data block identifier information are encapsulated and sent to second terminal;And subsequently received During the reply data frame that two terminals send over, the data block for sending mistake is identified according to reply data frame, and will include and send The data block of mistake is re-packaged into data frame and sent to second terminal.Can will during appearance error in data compared with the prior art All packets repeat to send, and the embodiment of the present invention only sends the data block of mistake, therefore number when subsequently sending data frame It is greatly reduced first relatively according to the data volume of frame, so significantly reduces the bit error rate of data transfer, and then improve wireless network Data goodput and efficiency of transmission in network.
Further, the data communication method based on data link layer based on first embodiment of the invention, in the present invention In the data communication method based on data link layer of second embodiment, data block quantity information and data are built in a data frame Block identification information also includes:
Piecemeal identification information is built in a data frame, whether piecemeal is carried out with mark data frame, so that second terminal is connecing Receive in data frame when having piecemeal identification information, according to the verification of data frame and determine to send the data block of mistake.
It is the improvement on the frame structure based on 802.11 agreements due to the data frame of the embodiment of the present invention, in order to compatible original The frame of existing 802.11 agreement, a piecemeal identification information can be increased in former data frame, with mark data frame whether piecemeal. In data frame as shown in Figure 2 in the byte of frame control domain (Frame Control), mf positions therein are expressed as again Piecemeal identification information, when this bit value be 1 expression data frame frame piecemeal processing has been carried out to packet, when this bit value is 0 table Show that data frame frame has not carried out piecemeal processing to packet.When mf bit values be 0 when be existing 802.11 agreement frame Structure, realized with this compatible with the frame structure of existing 802.11 agreement.
Fig. 4 is the schematic flow sheet according to the data communication method based on data link layer of third embodiment of the invention, The data communication method of the present embodiment is applied to the second terminal of data communication in wireless network, as shown in figure 4, the data communication Method comprises the following steps:
Step S201, second terminal receive the data frame that first terminal is sent, and multiple data blocks in data frame are distinguished Verified and checked;
After second terminal receives the data frame that first terminal is sent, multiple data blocks in data frame are verified respectively And verification, especially by the verification for calculating each data block and and with the verification of corresponding data block and being checked to determine number According to block whether mistake, if the verification and the verification with being included in packet that are calculated and inconsistent, illustrate this data block There is error in data.
Step S202, corresponding identification information is modified according to the data block of verification mistake, to identify verification mistake Data block data mistake;
When it is determined that there is error in data in data block, now modification corresponding to data block identification information, i.e., in embodiment 1 In the data block identifier information fragmark that mentions, the wherein corresponding mark place value of concrete modification, such as when data block data1 goes out When existing wrong, the corresponding bit value in data block identifier information fragmark is revised as 0, with identification data block data1 data Mistake, if data are correct, still maintain to correspond to bit value in data block identifier information fragmark constant.
Step S203, it will be encapsulated comprising the reply data frame that have modified identification information and send first terminal, wherein, first For terminal when receiving the reply data frame of second terminal transmission, first terminal identifies the number for sending mistake according to reply data frame According to block, and data frame will be re-packaged into comprising the data block for sending mistake and sent to second terminal.
The above-mentioned treated data frame comprising data block identifier information fragmark is packaged, forms reply data Frame is sent to first terminal, and the transmission of second terminal reply data frame is completed with this.
Further, the data communication method based on data link layer based on third embodiment of the invention, in the present invention In the data communication method based on data link layer of fourth embodiment, multiple data blocks in the data frame that receives are distinguished Also include before being verified and being checked:
Piecemeal identification information in identification data frame;
When confirming data frame packet when containing block data according to piecemeal identification information, perform and the block data of data frame is carried out Verification and collation process step.
Increase the identification information mf of deblocking in the data frame sent corresponding to the first terminal that first embodiment is mentioned When, in second terminal after server receives data frame, this identification information mf numerical value is first judged, it is determined that data frame packet contains During block data, the subsequent processing steps to the data frame comprising block data are just performed.
For example, when the identification information mf bit data values for recognizing piecemeal are 1, then it represents that data point are protected in this data frame Block message, just perform the subsequent processing steps to the data frame comprising block data;If recognize mf bit data values for 0 when, Then identify this data frame and do not include block data information, this data frame is the frame of existing 802.11 agreement, only need to be according to existing The processing mode of data frame is handled.
Fig. 5 is according to the first terminal of the data communication method based on data link layer of fourth embodiment of the invention and the The schematic flow sheet that two terminals interact, the flow comprise the following steps:
Packet in data frame to be sent is divided into multiple data blocks by step S301, first terminal;
Step S302, first terminal calculate each data block verification and;
Step S303, data block quantity information and data block identifier information, data block identifier information are built in a data frame Including identification information corresponding to each data block, identification information is repaiied when recognizing data block error for second terminal Change, mistake is sent with identification data block;
Step S304, first terminal will include verification and, multiple data blocks and data block quantity information and data block mark Know the data frame encapsulation of information;
Step S305, first terminal send the data frame for encapsulating completion to second terminal;
Step S306, second terminal are verified and checked respectively to multiple data blocks in the data frame that receives;
Step S307, second terminal are repaiied according to the data block of verification mistake to the identification information of data block identifier information Change, the data block data mistake of mistake is checked with mark;
Step S308, it will be encapsulated comprising the reply data frame that have modified identification information;
Step S309, second terminal send the reply data frame for encapsulating completion to first terminal;
Step S310, first terminal receives reply data frame, and the data block for sending mistake is identified according to reply data frame;
Step S311, first terminal will be re-packaged into data frame comprising the data block for sending mistake;
Step S312, first terminal send the data frame for Resealing completion to second terminal.
The correlation step S301-S305 of above-mentioned first terminal processing is the same as step S101-S102 in first embodiment of the invention Implementation, the correlation step S306-S309 of follow-up second terminal processing is the same as step S201- in third embodiment of the invention S203 implementations, and the correlation step S310-S312 of follow-up first terminal processing is the same as step in first embodiment of the invention S103 implementations.First terminal is realized with this piecemeal processing is carried out to the packet of data frame, and sent to second terminal, Second terminal, which is handled according to the data frame comprising block data of reception and sends reply data frame, is sent to first terminal, First terminal sends interaction as the data frame of corresponding protection block data information further according to reply data frame.
Fifth embodiment of the invention provides a kind of data communication system 100 based on data link layer, as shown in fig. 6, Data communication system 100 includes:First terminal 10 and second terminal 20.
First terminal 10, for data frame to be sent into second terminal through wireless network.First terminal 10 includes controller 11 With memory 12, application program 13 can be run on controller 11 by being stored with memory 12.
Second terminal 20, for receiving data frame from first terminal.Second terminal 20 includes controller 21 and memory 22, Application program 23 can be run on controller 21 by being stored with memory 22.
It is applied to the application program 13 of the data communication method of first terminal 10 in wireless network data communication system 100, Its application program 13 is stored in memory 12, the existing embodiments of the present invention 1 of the configuration processor 13 of controller 11 and the present invention Data communication method in embodiment 2.And the data in wireless network data communication system 100 applied to second terminal 20 are led to The application program 23 of communication method, its application program 23 are stored in memory 22, and the configuration processor 23 of controller 21 is existing above-mentioned Data communication method in inventive embodiments 3 and the embodiment of the present invention 4.
For example, application program 13 is in the instruction for performing data communication method in following steps:
Packet in data frame to be sent is divided into multiple data blocks by step S101, first terminal;
Step S102, first terminal calculate each data block verification and, will include verification according to default communication protocol With and the data frame of data block encapsulate and send to second terminal, wherein, the data that second terminal is sent according to first terminal Frame is parsed, and according to the verification of data frame and determines to send the data block of mistake, and generated according to the data block for sending mistake And feed back reply data frame;
Step S103, when receiving the reply data frame of second terminal transmission, first terminal is known according to reply data frame The data block of mistake is not sent, and will be re-packaged into data frame comprising the data block for sending mistake and sent to second terminal.
For example, application program 23 is in the instruction for performing data communication method in following steps:
Step S201, second terminal receive the data frame that first terminal is sent, and multiple data blocks in data frame are distinguished Verified and checked;
Step S202, corresponding identification information is modified according to the data block of verification mistake, to identify verification mistake Data block data mistake;
Step S203, it will be encapsulated comprising the reply data frame that have modified identification information and send first terminal, wherein, first For terminal when receiving the reply data frame of second terminal transmission, first terminal identifies the number for sending mistake according to reply data frame According to block, and data frame will be re-packaged into comprising the data block for sending mistake and sent to second terminal.
It is in flow chart or described otherwise above herein, it is necessary to illustrate in the description of embodiments of the present invention The description of any process or method be construed as, expression includes one or more for realizing specific logical function or mistake Module, fragment or the part of the code of the executable instruction of the step of journey, and the scope bag of the preferred embodiment of the present invention Include other realization, wherein order that is shown or discussing can not be pressed, including according to involved function by it is basic simultaneously Mode or in the opposite order, carrys out perform function, this should be managed by embodiments of the invention person of ordinary skill in the field Solution.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system including the system of processing module or other can be from instruction The system of execution system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or Equipment and use.For the purpose of this specification, " computer read/write memory medium " can be it is any can include, store, communicating, Propagate or transmission program for instruction execution system, device or equipment or with reference to these instruction execution systems, device or equipment and The device used.The more specifically example (non-exhaustive list) of computer-readable medium includes following:With one or more The electrical connection section (electronic installation) of wiring, portable computer diskette box (magnetic device), random access memory (RAM) are read-only to deposit Reservoir (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk are only Read memory (CDROM).In addition, computer read/write memory medium can even is that can thereon print described program paper or Other suitable media because can for example by carrying out optical scanner to paper or other media, then enter edlin, interpretation or Handled if necessary with other suitable methods electronically to obtain described program, be then stored in computer storage In device.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (11)

1. a kind of data communication method based on data link layer, it is characterised in that the data based on data link layer are led to Communication method includes:
Packet in data frame to be sent is divided into multiple data blocks by first terminal;
The first terminal calculate each data block verification and, will include verification and and data according to default communication protocol The data frame of block is encapsulated and sent to second terminal, wherein, the data frame that the second terminal is sent according to the first terminal Parsed, according to the verification of the data frame and determine to send the data block of mistake, and given birth to according to the data block for sending mistake Into and feed back reply data frame;
When receiving the reply data frame that the second terminal is sent, the first terminal identifies according to the reply data frame The data block of mistake is sent, and data frame will be re-packaged into comprising the data block for sending mistake and sent to described second eventually End.
2. data communication method as claimed in claim 1, it is characterised in that the first terminal will include verification and and data Also include before the data frame encapsulation of block:
Data block quantity information and data block identifier information are built in the data frame, the data block identifier information includes every Identification information corresponding to individual data block, the identification information is entered when recognizing the data block error for the second terminal Row modification, mistake is sent to identify the data block;
The first terminal identifies that the data block for sending mistake includes according to the reply data frame:
The first terminal identifies identification information corresponding to each data block of the reply data frame, according to the identification information In modified values determine corresponding to data block send mistake.
3. data communication method as claimed in claim 1, it is characterised in that the first terminal will include verification and and data Also include before the data frame encapsulation of block:
Piecemeal identification information is built in the data frame, to identify whether the data frame carries out piecemeal, for described second Terminal according to the verification of the data frame and determines to send mistake when there is piecemeal identification information in receiving the data frame Data block.
4. data communication method as claimed in claim 1, it is characterised in that the verification for calculating each data block and, and will The verification and information, which are added in corresponding data block, also to be included:
Calculate the header data before being located at the position in the data frame where packet verification and, and by the verification and Information is added in the data frame, for the second terminal according to the verification and information of the header data to header data Verified.
5. a kind of data communication method based on data link layer, it is characterised in that the data based on data link layer are led to Communication method includes:
Second terminal receive first terminal send data frame, to multiple data blocks in the data frame respectively carry out verification and Verification;
Corresponding identification information is modified according to the data block of verification mistake, to identify the data block number of the verification mistake According to mistake;
Encapsulated comprising the reply data frame that have modified identification information by described and send the first terminal, wherein, described first When receiving the reply data frame that the second terminal is sent, the first terminal identifies terminal according to the reply data frame The data block of mistake is sent, and data frame will be re-packaged into comprising the data block for sending mistake and sent to described second eventually End.
6. data communication method as claimed in claim 5, it is characterised in that the second terminal is in the data frame that receives Multiple data blocks verified and checked respectively before also include:
Identify the piecemeal identification information in the data frame;
When confirming the data frame packet when containing block data according to the piecemeal identification information, the piecemeal to the data frame is performed Data carry out verification and collation process step.
7. the data communication method as described in claim 5 or 6, it is characterised in that the second terminal receives first terminal hair Also include before the data frame sent:
Packet in data frame to be sent is divided into multiple data blocks by first terminal;
The first terminal calculate each data block verification and, will include verification and and data according to default communication protocol The data frame of block is encapsulated and sent to second terminal.
8. data communication method as claimed in claim 7, it is characterised in that the first terminal includes multiple data by described in Also include before the data frame encapsulation of block:
First terminal builds the quantity information and data block identifier information of data block, the data block identifier in the data frame Information includes identification information corresponding to each data block, to described when recognizing the data block error for the second terminal Identification information is modified, and mistake is sent to identify the data block.
9. a kind of data terminal, it is characterised in that the data terminal includes:
First controller;
First memory;And
First application program of the data communication method based on data link layer, wherein first application program is stored in institute State in first memory, first application program realize as any one of Claims 1-4 based on data link layer Data communication method the step of.
10. a kind of data terminal, it is characterised in that the data terminal includes:
Second controller;
Second memory;And
Second application program of the data communication method based on data link layer, wherein the application program is stored in described In two memories, second application program realizes the data communication side based on data link layer as described in claim 5 or 6 The step of method.
11. a kind of data communication system based on data link layer, it is characterised in that the data based on data link layer are led to News system includes:
First terminal, it is divided into multiple data blocks for the packet in the data frame by transmission;And
Calculate each data block verification and, according to default communication protocol by comprising verification and and data block data frame seal Fill and send to second terminal;And
When receiving the reply data frame that the second terminal is sent, the first terminal identifies according to the reply data frame The data block of mistake is sent, and data frame will be re-packaged into comprising the data block for sending mistake and sent to described second eventually End;
Second terminal, the data frame that first terminal is sent is received, multiple data blocks in the data frame are verified respectively And verification;And
Corresponding identification information is modified according to the data block of verification mistake, to identify the data block number of the verification mistake According to mistake;And
Encapsulated comprising the reply data frame that have modified identification information by described and send the first terminal.
CN201710604945.8A 2017-07-21 2017-07-21 Data communication method, data terminal and system based on data link layer Active CN107426770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710604945.8A CN107426770B (en) 2017-07-21 2017-07-21 Data communication method, data terminal and system based on data link layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710604945.8A CN107426770B (en) 2017-07-21 2017-07-21 Data communication method, data terminal and system based on data link layer

Publications (2)

Publication Number Publication Date
CN107426770A true CN107426770A (en) 2017-12-01
CN107426770B CN107426770B (en) 2021-09-14

Family

ID=60431026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710604945.8A Active CN107426770B (en) 2017-07-21 2017-07-21 Data communication method, data terminal and system based on data link layer

Country Status (1)

Country Link
CN (1) CN107426770B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194593A (en) * 2018-08-29 2019-01-11 百度在线网络技术(北京)有限公司 Method for sending information, device, equipment and computer readable storage medium
CN110267348A (en) * 2019-05-27 2019-09-20 中国联合网络通信集团有限公司 A kind of data transmission method and equipment
CN110875795A (en) * 2018-08-29 2020-03-10 阿里巴巴集团控股有限公司 Data transmission method, device, equipment and storage medium
CN112055314A (en) * 2019-06-28 2020-12-08 合肥炬芯智能科技有限公司 Bluetooth broadcast communication method, system and master device and slave device thereof
CN116610272A (en) * 2023-04-23 2023-08-18 珠海芯烨电子科技有限公司 Processing method and system for picture data of printing terminal
US20240089707A1 (en) * 2021-01-15 2024-03-14 Oshkosh Corporation Worksite connectivity system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103840913A (en) * 2002-10-17 2014-06-04 高通股份有限公司 Method and apparatus for transmitting and receiving a block of data in a communication system
CN106850143A (en) * 2013-11-04 2017-06-13 上海数字电视国家工程研究中心有限公司 The method for packing and method of calibration of packet

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103840913A (en) * 2002-10-17 2014-06-04 高通股份有限公司 Method and apparatus for transmitting and receiving a block of data in a communication system
CN106850143A (en) * 2013-11-04 2017-06-13 上海数字电视国家工程研究中心有限公司 The method for packing and method of calibration of packet

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194593A (en) * 2018-08-29 2019-01-11 百度在线网络技术(北京)有限公司 Method for sending information, device, equipment and computer readable storage medium
CN110875795A (en) * 2018-08-29 2020-03-10 阿里巴巴集团控股有限公司 Data transmission method, device, equipment and storage medium
CN110875795B (en) * 2018-08-29 2022-05-24 阿里巴巴集团控股有限公司 Data transmission method, device, equipment and storage medium
CN110267348A (en) * 2019-05-27 2019-09-20 中国联合网络通信集团有限公司 A kind of data transmission method and equipment
CN110267348B (en) * 2019-05-27 2022-08-02 中国联合网络通信集团有限公司 Data transmission method and equipment
CN112055314A (en) * 2019-06-28 2020-12-08 合肥炬芯智能科技有限公司 Bluetooth broadcast communication method, system and master device and slave device thereof
US20240089707A1 (en) * 2021-01-15 2024-03-14 Oshkosh Corporation Worksite connectivity system
CN116610272A (en) * 2023-04-23 2023-08-18 珠海芯烨电子科技有限公司 Processing method and system for picture data of printing terminal
CN116610272B (en) * 2023-04-23 2024-09-03 珠海芯烨电子科技有限公司 Processing method and system for picture data of printing terminal

Also Published As

Publication number Publication date
CN107426770B (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN107426770A (en) Data communication method, data terminal and system based on data link layer
CN108062230B (en) Serial port transparent transmission and program updating system and method in Internet range
CN101888658B (en) GPRS (General Packet Radio Service) core network simulation and test system
CN103957522B (en) A kind of intelligent communication method, terminal and system
CN109981480A (en) A kind of data transmission method and the first equipment
CN107750058A (en) Method, control terminal and the system of equipment access network based on wifi Beacon frames
CN105162868B (en) A kind of reliable data transmission method between teacher side and student side
CN107787025A (en) Method, control terminal and the system of equipment access network
CN107508907A (en) A kind of data transmission method and device
CN107040549A (en) A kind of TCP packet splicings processing method, server and system
CN106603506B (en) Data communication method, device and system based on multi-field bus
CN104618365B (en) protocol message processing method, device and terminal
CN108551425A (en) Data transmission system, method based on Industrial Ethernet and communication equipment
CN103442250A (en) System and method for debugging television
CN110213756A (en) A kind of data transmission method, device and its relevant device
CN108322443A (en) Equipment interactive communication method, apparatus, storage medium and computer equipment
CN207652705U (en) A kind of system of control terminal and the equipment access network based on wifi Beacon frames
CN115729879A (en) Data frame format, chip communication method and chip
CN107395604A (en) A kind of Internet of Things information transferring method and device
CN106507148B (en) Display control method and device
CN106685600B (en) Message delivery method in local area network between work station
CN111935767A (en) Network simulation system
CN103346961B (en) The method and system that a kind of data packing is exchanged
CN104991848A (en) Method and system for implementing Key code burning on basis of MSComm control
CN113518087A (en) IOT protocol reverse docking method and device

Legal Events

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