CN108574563A - A kind of method and its device for transmitting file in WIFI environment - Google Patents

A kind of method and its device for transmitting file in WIFI environment Download PDF

Info

Publication number
CN108574563A
CN108574563A CN201710151265.5A CN201710151265A CN108574563A CN 108574563 A CN108574563 A CN 108574563A CN 201710151265 A CN201710151265 A CN 201710151265A CN 108574563 A CN108574563 A CN 108574563A
Authority
CN
China
Prior art keywords
packet
data
error rate
transmission
client
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
Application number
CN201710151265.5A
Other languages
Chinese (zh)
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.)
Shenzhen One Secret Technology Co Ltd
Original Assignee
Shenzhen One Secret Technology 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 Shenzhen One Secret Technology Co Ltd filed Critical Shenzhen One Secret Technology Co Ltd
Priority to CN201710151265.5A priority Critical patent/CN108574563A/en
Publication of CN108574563A publication Critical patent/CN108574563A/en
Pending legal-status Critical Current

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/04Error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments

Landscapes

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

Abstract

The present invention relates to the method and devices that file is transmitted under a kind of WIFI environment.This method includes:Negotiate with the client in the communication system;By file declustering at multiple data blocks;Check whether the control data bag for receiving client transmission;If there is control data bag, then respective handling is executed according to control data bag;Packet is notified to adjust dormancy time length according to the error rate, subsequently into dormancy time;The corresponding data block of re-transmission data packet transmission is constructed according to retransmission request packet and gives the client, subsequently into dormancy time;End-of-packet data transmission is notified according to being transmitted;If without control data bag, judge whether that all data packets are all sent completely, is then to enter dormancy time;Otherwise, construction raw data packets are sent to client, until all data blocks are all sent completely.Congestion control mechanism is used as by the error rate feedback between server and client, to promote the efficiency and speed of data transmission under WIFI environment.

Description

A kind of method and its device for transmitting file in WIFI environment
【Technical field】
The present invention relates in a kind of network data transmission technology more particularly to a kind of WIFI environment transmit file method and Device.
【Background technology】
At present in network transmission, TCP (Transmission Control Protocol transmission control protocols) agreement is The most widely used reliable network transmission protocol.Since Transmission Control Protocol has a wide range of application, various answer can be considered in design With environment, and make the design of a compromise.
However in WIFI (Wireless Fidelity, Wireless Fidelity) environment, due to its transmission environment complexity, packet loss Rate and round-trip delay can all become very high, this when Transmission Control Protocol after the data for having sent a window, the most of the time use In etc. packet to be confirmed, it is a large amount of to retransmit and confirming allow the efficiency of transmission slower and with the promotion of packet loss.Cause This, in WIFI environment, the data transmission performance under Transmission Control Protocol is not sufficiently stable, then speed is slower when transmitting big file.
【Invention content】
The technical problem to be solved in the present invention is to provide one kind under WIFI environment, and the side of file is transmitted using Transmission Control Protocol Method and its device.
In order to solve the above technical problems, the present invention provides following technical scheme:
On the one hand, the present invention provides a kind of method that file is transmitted under WIFI environment, transmission file under the WIFI environment Method is run in the server-side of communication system, the default initial expectation transmission rate of the server-side and initial suspend mode Time, the dormancy time are the periods that server-side stops transmission data packet;The method of transmission file includes under the WIFI environment: Negotiate with the client in the communication system, confirms file and the port of transmission data for needing to be transferred to the client;It will File declustering calculates according to this document total size the total block data of the data block at multiple data blocks;It checks whether and receives this The control data bag that client is sent;The control data bag includes:Error rate notice packet, retransmission request packet and is transmitted logical Know packet;Error rate notice includes client according to the number for retransmitting data packet number and client reception in a cycle According to the error rate that packet total amount calculates, which is the time interval that client sends the error rate to the server-side;Retransmission request Wrap the data block for notifying server-side to need to retransmit;Data of the notice packet for notifying server-side all are transmitted to have connect It harvests into;If there is control data bag, then respective handling is executed according to control data bag;Notify packet is adjusted to stop according to the error rate Dormancy time length, subsequently into dormancy time;It is constructed according to retransmission request packet and retransmits the corresponding data block of data packet transmission to this Client, subsequently into dormancy time;End-of-packet data transmission is notified according to being transmitted;If without control data bag, Judge whether that all data packets are all sent completely, is then to enter dormancy time;Otherwise, construction raw data packets are sent to client End, until all data blocks are all sent completely.
A kind of method that file is transmitted under WIFI environment, the method for transmission file runs on communication system under the WIFI environment Client in comprising:Receive the data packet that server-side is sent, and the data packet total amount received in the minute book period, this week Phase is the time interval that client sends the error rate to the server-side;According to the type field in the data packet, this week is confirmed The quantity of data packet is retransmitted in phase;According to the total amount of this period inscribed data packet received and the quantity of re-transmission data packet, calculate Error rate in this period;Error rate notice packet is sent to server-side, which notifies to include the error rate in packet;Confirm institute After some data packets all finish receiving, transmission is transmitted notice packet and gives the server-side;Confirmation has data packet not receive, then sends out Send retransmission request packet to the server-side.
The device of file is transmitted under a kind of WIFI environment, which can preset an initial expectation transmission rate and stop It sleeps the time, which is the period that server-side stops transmission data packet;The device packet of file is transmitted under the WIFI environment It includes:Negotiation element needs the file and the port of transmission data that are transferred to the client for negotiating confirmation with client;Text Part split cells is used for file declustering into multiple data blocks, and the total block data of the data block is calculated according to this document total size; Transmit-Receive Unit, for receiving or sending the data packet from client;Control data bag confirmation unit, for confirming Transmit-Receive Unit Whether control data bag is received;Control data bag includes:Notice packet is wrapped and are transmitted to retransmission request packet, error rate notice; Error rate notice includes total packet that client is received according to the sum and client of the re-transmission data packet in a cycle The error rate that number total amount calculates;The period is time interval of the client to server-side feedback error rate;
Data packet structural unit, for when not receiving control data bag, which to be configured to raw data packets And client is sent to by Transmit-Receive Unit, until all data hair blocks enter dormancy time after being sent completely;Or it is receiving When to retransmission request packet, is constructed according to retransmission request packet and retransmit data packet and client is sent to by the Transmit-Receive Unit;
Control data bag processing unit, for when receiving control data bag, being carried out according to control data bag type corresponding Processing;Packet is notified to adjust dormancy time length according to the error rate, subsequently into dormancy time;It should according to the triggering of retransmission request packet Data packet structural unit constructs the corresponding data block of re-transmission data packet transmission and gives the client, subsequently into dormancy time;Root End-of-packet data transmission is notified according to being transmitted.
A kind of device that file transmits under WIFI environment, which is characterized in that the device packet that file transmits under the WIFI environment It includes:Communication unit, for reception or transmission data packet to server-side;Computing unit, for recording the number received in a cycle According to packet sum and data packet number is retransmitted, and mistake is calculated according to the data packet of reception sum and re-transmission data packet number Rate;The period refers to the time interval that the present apparatus sends error rate;Control data bag building block builds mistake according to the error rate Rate notice packet receives situation structure retransmission request packet according to data packet and transmission is transmitted notice packet.
The beneficial effects of the present invention are:Client is then at regular intervals by error rate feedback to server-side, error rate Reflection is Network status, if Network status is poor, error rate increases, then extends server dormancy time accordingly, reduces hair Transmission rate, if lower error rate, shortens dormancy time, improves hair within the preset error rate threshold of error rate time Transmission rate is until close desired transmission rate.Congestion control machine is used as by the error rate feedback between server and client System, to promote the efficiency and speed of data transmission under WIFI environment so that under complicated WIFI environment, still can quickly, Reliably transmit big file.
【Description of the drawings】
Fig. 1 is the side for the system that the specific implementation mode one of the method for transmission file under a kind of WIFI environment of the present invention is run Frame schematic diagram;
Fig. 2 is the method that file is transmitted under a kind of WIFI environment that the specific embodiment of the invention one provides;
Fig. 3 is the particular flow sheet of step S110 in the specific embodiment of the invention one;
Fig. 4 is the structural schematic diagram for the data packet that server-side is sent to client in the specific embodiment of the invention one;
Fig. 5 is the method that file is transmitted under a kind of WIFI environment that the specific embodiment of the invention two provides;
Fig. 6 is the device that file is transmitted under a kind of WIFI environment that the specific embodiment of the invention three provides;
Fig. 7 is the device that file is transmitted under a kind of WIFI environment that the specific embodiment of the invention four provides.
Reference numeral:
Negotiation element 31
File declustering unit 32
Transmit-Receive Unit 33
Control data bag confirmation unit 34
Data packet structural unit 35
Control data bag processing unit 36
Communication unit 41
Computing unit 42
Control data bag structural unit 43
【Specific implementation mode】
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.
In addition, as long as technical characteristic involved in the various embodiments of the present invention described below is each other not Conflict is constituted to can be combined with each other.
As shown in Figure 1, for the operation of specific implementation mode one of the method for transmission file under a kind of WIFI environment of the present invention The frame principle figure of system.
The system includes:Server-side and client, the client receive the file transmitted from the server-side.The server-side and The client under WIFI environment, using UDP (User Datagram Protocol, User Datagram Protocol) transmission data, The mode of TCP transmission control information transmits file.
As shown in Fig. 2, the method for transmitting file under a kind of WIFI environment provided for the specific embodiment of the invention one.
In the specific implementation mode one, server-side can preset an initial expectation transmission rate and dormancy time, The dormancy time is the period that server-side stops transmission data packet;Such as:The expectation transmission rate, which can be arranged, is 700000000Bit/ seconds.This method includes:
Step S110 negotiates with client, confirms file and the port of transmission data for needing to be transferred to the client;
Specifically, as shown in figure 3, step S110 includes:
Step S111, establishes TCP connection, that is, according to the TCP port number of agreement, client is actively and server-side establishes TCP Connection;
Step S112, after server-side finds that TCP connection is established, actively send server-side transmits listed files to visitor Family end;
Step S113, client receive after can transmitting listed files, choose and need the file transmitted and feed back to server-side;
The size of client request file is notified client by step S114, server-side;
Step S115, client inform that UDP message transmits the port numbers used.
File declustering is calculated the data block by step S120, server-side at multiple data blocks, and according to this document total size Total block data;Specifically:The size of total block data=file total size/data block;Such as, server-side by entire file declustering at 4096 Byte is the data block of unit;It will so be sent out every 1*1000000/ (700000000/ (4096*8)) microsecond in perfect condition Send a data packet for including a data block;Specifically, each data block is gathered around there are one serial number, which can be from 1 starts;
Step S130, control data bag is checked whether there is, if there is control data bag, then enters step S140;If not yet There is control data bag, then enters step S150;
Control data bag includes:Notice packet is wrapped and are transmitted to retransmission request packet, error rate notice.Wherein, re-transmission is asked Seek data block of the packet for notifying server-side to need to retransmit;Error rate notice packet is used for transmission client according to weight in a cycle Pass the error rate of the data packet total amount calculating of data packet number and client reception;Notice packet is transmitted for notifying server-side All data have finished receiving.Optimization, which transmits in TCP control channels.
Specifically, re-transmission data packet includes:The type field and block sequence number field of control data bag;Block sequence number field is used In the serial number for the data block that record needs to control;Error rate notice includes the type field and error rate word of control data bag Section;It is transmitted the type field that notice includes control data bag.
Step S140, respective handling is executed according to control data bag;
Specifically, if what is received is retransmission request packet, is constructed according to retransmission request packet and retransmit data packet, pass through the transmission The port of data sends corresponding data block and gives the client;Specifically, literary from sending according to the block serial number in retransmission request packet Corresponding data block is taken out in part and constructs re-transmission data packet, and client is sent back to by the port of the transmission data;Optimization , client is sent back to by data packet is retransmitted by UDP message channel;
If what is received is error rate notice packet, packet is notified to adjust dormancy time length according to the error rate;Specifically, than More preset error rate threshold then extends the dormancy time if it is greater than the error rate threshold;If it is less than the error rate threshold Value, then shorten the dormancy time;Wherein, definition is Error (n)=F1*Error (n-1)+F2* (re-transmissions in this period Total packet number that packet number/this period receives), F1 and F2 are impact factor, this is defined herein as F1=0.3, F2=0.7;Week therein Phase refers to that client to the time interval of server-side feedback error rate, such as may be configured as 400 milliseconds;Error (n-1) is upper one The error rate in period.Error rate reflects Network status, if Network status is poor, error rate increases and reaches error rate threshold Value then needs to extend dormancy time, transmission rate is reduced, until error rate returns within threshold value;If lower error rate needs Shorten dormancy time, improve transmission rate until close to preset expectation transmission rate.
If what is received is to be transmitted notice packet, it is determined that the received complete all data of client terminate data and pass It is defeated.
Step S150, server-side judges whether that all data packets are all sent completely, and is then, to enter step S160;Otherwise, Construction raw data packets are simultaneously sent to client by the port of the transmission data, until all data blocks are all sent completely; Optimization, raw data packets are sent to by client by UDP channel;
As shown in figure 4, the data packet that server-side is sent to client includes:Type of data packet field, block sequence number field with And data block.Wherein, type of data packet includes raw data packets and re-transmission data packet;
Step S160, after having handled retransmission request packet or error rate notice packet, server-side enters dormancy time;Server-side into Transmission rate can be controlled by entering dormancy time, avoid causing because transmission rate is too fast network congestion, busy;
Step S170, after dormancy time section is passed through, server-side continues to execute step S130.
In present embodiment one, file declustering is sent to client by server-side at multiple data blocks, and client is then At regular intervals by error rate feedback to server-side, server-side adjusts the dormancy time of server according to error rate.Error rate Reflection is Network status, if Network status is poor, error rate increases, then extends server dormancy time accordingly, reduces hair Transmission rate, if lower error rate, shortens dormancy time, improves hair within the preset error rate threshold of error rate time Transmission rate is until close desired transmission rate.Congestion control machine is used as by the error rate feedback between server and client System, to promote the efficiency and speed of data transmission under WIFI environment so that under complicated WIFI environment, still can quickly, Reliably transmit big file.
As shown in figure 5, the method for transmitting file under a kind of WIFI environment provided for the specific embodiment of the invention two.
S210 receives the data packet that server-side is sent, and the data packet sum received in the minute book period;
S220 confirms the quantity that data packet is retransmitted in this period according to the type field in each data packet;
S230 calculates this period according to total packet number of this period inscribed data packet received and the quantity of re-transmission data packet Interior error rate;
Specifically, error rate Error (n)=F1*Error (n-1)+F2* in this period (retransmits data packet in this period Quantity/this period inscribed data packet sum received), F1=0.3, F2=0.7, wherein Error (n-1) was a upper period Error rate, period are the time interval that user end to server sends error rate;
S240 sends error rate notice packet to server-side, and error rate notifies to include the error rate in packet;
S250 sends control data bag, that is, after confirming that all data packets all finish receiving, transmission is transmitted notice It wraps to server-side;Confirmation has data packet not receive, then sends retransmission request packet.
The specific implementation mode two of the present invention, since client is periodically sent to server-side between error rate, with server-side Error rate feedback mechanism is established, so that server-side can carry out congestion control accordingly, to promote number under WIFI environment According to the efficiency and speed of transmission so that under complicated WIFI environment, still can quickly, reliably transmit big file.
As shown in fig. 6, transmitting the device of file under a kind of WIFI environment provided for the specific embodiment of the invention three.It should Device can preset an initial expectation transmission rate and dormancy time, which is that server-side stops transmission data packet Period.The device includes:
Negotiation element 31 needs to be transferred to the file and transmission data of the client for client negotiating to confirm Port;
File declustering unit 32, for file declustering to be calculated the number at multiple data blocks, and according to this document total size According to the total block data of block;Specifically:The size of total block data=file total size/data block;
Transmit-Receive Unit 33, for receiving or sending the data packet from client;
Control data bag confirmation unit 34, for confirming whether Transmit-Receive Unit 33 receives control data bag;Control data bag Including:Notice packet is wrapped and are transmitted to retransmission request packet, error rate notice;
Data packet structural unit 35, for when not receiving control data bag, which to be configured to initial data It wraps and client is sent to by Transmit-Receive Unit 33, until all data hair blocks enter dormancy time after being sent completely;Or When receiving re-transmission data packet, is constructed according to retransmission request packet and retransmit data packet and by Transmit-Receive Unit 33 via the transmission data Port be sent to client;That is, the data packet that data packet structural unit 35 constructs includes raw data packets and re-transmission data Packet;
Control data bag processing unit 36, for when receiving control data bag, phase to be carried out according to control data bag type It should handle;Packet is notified to adjust dormancy time length according to the error rate, subsequently into dormancy time;It is triggered according to retransmission request packet The data packet structural unit 35 constructs the corresponding data block of re-transmission data packet transmission and gives the client, when subsequently into suspend mode Between;End-of-packet data transmission is notified according to being transmitted;
Specifically, if what is received is retransmission request packet, by data packet structural unit 35 according to the block in retransmission request packet Serial number obtains corresponding data block construction and retransmits data packet, and sends back to client;Subsequently into dormancy time;
If what is received is that error rate notice is wrapped, more preset error rate threshold, if it is greater than the error rate threshold, then Extend the dormancy time;If it is less than the error rate threshold, then shorten the dormancy time;Subsequently into dormancy time;Wherein, wrong Accidentally rate is defined as Error (n)=F1*Error (n-1)+F2* (numbers received in re-transmission data packet number/this period in this period According to packet total amount), F1 and F2 are impact factor, are the numerical value between 0~1, this is defined herein as F1=0.3, F2=0.7;It is therein Period refers to that client to the time interval of server-side feedback error rate, such as may be configured as 400 milliseconds;
If what is received is to be transmitted notice packet, it is determined that the received complete all data of client terminate data and pass It is defeated.
In present embodiment three, file declustering is sent to client by server-side at multiple data blocks, and client is then At regular intervals by error rate feedback to server-side, server-side adjusts the dormancy time of server according to error rate.Error rate Reflection is Network status, if Network status is poor, error rate increases, then extends server dormancy time accordingly, reduces hair Transmission rate, if lower error rate, shortens dormancy time, improves hair within the preset error rate threshold of error rate time Transmission rate is until close desired transmission rate.Congestion control machine is used as by the error rate feedback between server and client System, to promote the efficiency and speed of data transmission under WIFI environment so that under complicated WIFI environment, still can quickly, Reliably transmit big file.
As shown in fig. 7, the device that file transmits under a kind of WIFI environment that the specific embodiment of the invention four provides.The dress Set including:
Communication unit 41, for reception or transmission data packet to server-side;
Computing unit 42, for recording the data packet received in a cycle sum and retransmitting data packet number, and root Error rate is calculated according to the data packet sum and re-transmission data packet number of reception;The period refers to the time that the present apparatus sends error rate Interval;
Specifically, error rate Error (n)=F1*Error (n-1)+F2* in this period (retransmits data packet in this period Quantity/this period inscribed data packet sum received), F1=0.3, F2=0.7, wherein be the error rate in a upper period;
Control data bag building block 43 builds error rate notice packet according to the error rate, situation is received according to data packet Structure retransmission request packet and transmission are transmitted notice packet.
The specific implementation mode four of the present invention, since the device that file transmits under the WIFI environment is periodically sent to server-side Error rate feedback mechanism is established between error rate, with server-side, so that server-side can carry out congestion control accordingly, from And promote the efficiency and speed of data transmission under WIFI environment so that, still can quickly, reliably under complicated WIFI environment Transmit big file.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of embodiment is can to lead to It crosses program and is completed to instruct relevant hardware, which can be stored in a computer readable storage medium, storage medium May include:Read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all All any modification, equivalent and improvement made by within the spirit and principles in the present invention etc. should be included in the guarantor of the present invention Within the scope of shield.
Above-mentioned specific implementation mode illustrates but is not intended to limit the present invention, and those skilled in the art can be in the model of claim It is designed in enclosing multiple instead of example.Those skilled in the art should be appreciated that violating such as appended right no Within the scope of the present invention defined in claim, specific implementation can be made it is appropriate adjustment, modification etc..Therefore, all Spirit according to the present invention and principle, the arbitrary modifications and variations done are of the invention defined in the appended claims Within the scope of.

Claims (11)

1. a kind of method for transmitting file under WIFI environment, the method for transmission file runs on communication system under the WIFI environment In server-side, the default initial expectation transmission rate of the server-side and initial dormancy time, the dormancy time are clothes Business end stops the period of transmission data packet;It is characterized in that, the method for transmitting file under the WIFI environment includes:
Negotiate with the client in the communication system, confirms file and the end of transmission data for needing to be transferred to the client Mouthful;
By file declustering at multiple data blocks, and calculate according to this document total size the total block data of the data block;
Check whether the control data bag for receiving client transmission;The control data bag includes:Error rate notice packet, retransmits Request bag and be transmitted notice packet;Error rate notice includes client according to the re-transmission number-of-packet in a cycle The error rate that the data packet total amount that amount and client receive calculates, which is that client sends the error rate to the server-side Time interval;Retransmission request packet is used to that server-side to be notified to need the data block retransmitted;Notice packet is transmitted for notifying clothes All data in business end have finished receiving;
If there is control data bag, then respective handling is executed according to control data bag;Packet is notified to adjust suspend mode according to the error rate Time length, subsequently into dormancy time;It is constructed according to retransmission request packet and retransmits data packet and pass through the port of the transmission data It sends corresponding data block and gives the client, subsequently into dormancy time;End-of-packet data transmission is notified according to being transmitted;
If without control data bag, judge whether that all data packets are all sent completely, is then to enter dormancy time;It is no Then, construction raw data packets are sent to client, until all data blocks are all sent completely.
2. the method for transmitting file under WIFI environment as described in claim 1, which is characterized in that the error rate Error's (n) Calculation formula is:
(client receives Error (n)=F1*Error (n-1)+F2* in re-transmission data packet number/this period in this period Data packet total amount);
Wherein, F1 and F2 is preset impact factor, is the concrete numerical value between 0 to 1;Error (n-1) was the mistake in a upper period Accidentally rate.
3. the method for transmitting file under WIFI environment as described in claim 1, which is characterized in that
The re-transmission data packet includes:The type field and block sequence number field of control data bag;Block sequence number field is needed for recording The serial number for the data block to be controlled;
The error rate notifies:The type field and error rate field of control data bag;
This is transmitted notice:The type field of control data bag.
4. the method for transmitting file under WIFI environment as described in claim 1, which is characterized in that the step " is asked according to re-transmission Ask packet construction to retransmit the corresponding data block of data packet transmission and give the client, subsequently into dormancy time " be specially:
Corresponding data block is then taken out from transmission file according to the block serial number in retransmission request packet and constructs re-transmission data packet and is led to The port for crossing the transmission data sends back to client, subsequently into dormancy time.
5. the method for transmitting file under WIFI environment as described in claim 1, it is characterised in that.The step is " according to the mistake Rate notice packet adjusts dormancy time length, subsequently into dormancy time " be specially:
It notifies packet to obtain error rate according to the error rate, and compares the error rate and preset error rate threshold, if it is greater than this Error rate threshold then extends the dormancy time;If it is less than the error rate threshold, then shorten the dormancy time;Subsequently into not It sleeps the time.
6. a kind of method for transmitting file under WIFI environment, the method for transmission file runs on communication system under the WIFI environment In client, which is characterized in that the method for transmission file includes under the WIFI environment:
Receive the data packet that server-side is sent, and the data packet total amount received in the minute book period, the period be client to this Server-side sends the time interval of the error rate;
According to the type field in the data packet, the quantity that data packet is retransmitted in this period is confirmed;
According to the total amount of this period inscribed data packet received and the quantity of re-transmission data packet, the error rate in this period is calculated;
Error rate notice packet is sent to server-side, which notifies to include the error rate in packet;
After confirming that all data packets all finish receiving, transmission is transmitted notice packet and gives the server-side;Confirmation has data packet not have It receives, then sends retransmission request packet and give the server-side.
7. the method for transmitting file under WIFI environment as claimed in claim 6, which is characterized in that the error rate Error's (n) Calculation formula is:
(client receives Error (n)=F1*Error (n-1)+F2* in re-transmission data packet number/this period in this period Data packet total amount);
Wherein, F1 and F2 is preset impact factor, is the concrete numerical value between 0 to 1;Error (n-1) was the mistake in a upper period Accidentally rate.
8. transmitting the device of file under a kind of WIFI environment, which can preset an initial expectation transmission rate and suspend mode Time, the dormancy time are the periods that server-side stops transmission data packet;The device of transmission file includes under the WIFI environment:
Negotiation element needs the file and the port of transmission data that are transferred to the client for negotiating confirmation with client;
File declustering unit, for file declustering to be calculated the data block at multiple data blocks, and according to this document total size Total block data;
Transmit-Receive Unit, for receiving or sending the data packet from client;
Control data bag confirmation unit, for confirming whether Transmit-Receive Unit receives control data bag;Control data bag includes:It retransmits Notice packet is wrapped and are transmitted to request bag, error rate notice;Error rate notice includes client according in a cycle Re-transmission data packet sum and the error rate that calculates of total packet number total amount for receiving of client;The period is the client to clothes The time interval for end feedback error rate of being engaged in;
Data packet structural unit, for when not receiving control data bag, which being configured to raw data packets and is led to It crosses Transmit-Receive Unit and is sent to client via the port of the transmission data, stop until all data hair blocks enter after being sent completely It sleeps the time;Or when receiving retransmission request packet, is constructed according to retransmission request packet and retransmit data packet and sent out by the Transmit-Receive Unit Give client;
Control data bag processing unit, for when receiving control data bag, respective handling to be carried out according to control data bag type; Packet is notified to adjust dormancy time length according to the error rate, subsequently into dormancy time;The data are triggered according to retransmission request packet Packet structural unit constructs the corresponding data block of re-transmission data packet transmission and gives the client, subsequently into dormancy time;According to biography Defeated completion notice end-of-packet data transmission.
9. transmitting the device of file under WIFI environment as claimed in claim 8, which is characterized in that control data bag processing is single After the error rate notice packet that member receives, it is specifically used for more preset error rate threshold, if it is greater than the error rate threshold, then Extend the dormancy time;If it is less than the error rate threshold, then shorten the dormancy time.
10. the device that file transmits under a kind of WIFI environment, which is characterized in that the device packet that file transmits under the WIFI environment It includes:
Communication unit, for reception or transmission data packet to server-side;
Computing unit, for recording the data packet received in a cycle sum and retransmitting data packet number, and according to reception Data packet sum and retransmit data packet number calculate error rate;The period refers to the time interval that the present apparatus sends error rate;
Control data bag building block, error rate notice packet is built according to the error rate, and situation structure weight is received according to data packet It passes request bag and sends and be transmitted notice packet.
11. transmitting the device of file under WIFI environment as claimed in claim 10, which is characterized in that computing unit, it is specific to use According to the error rate in the calculating a cycle of formula once:
Error (n)=F1*Error (n-1)+F2* (retransmits quantity/this period inscribed data packet received of data packet in this period Total amount), wherein Error (n-1) was the error rate in a upper period.
CN201710151265.5A 2017-03-14 2017-03-14 A kind of method and its device for transmitting file in WIFI environment Pending CN108574563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710151265.5A CN108574563A (en) 2017-03-14 2017-03-14 A kind of method and its device for transmitting file in WIFI environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710151265.5A CN108574563A (en) 2017-03-14 2017-03-14 A kind of method and its device for transmitting file in WIFI environment

Publications (1)

Publication Number Publication Date
CN108574563A true CN108574563A (en) 2018-09-25

Family

ID=63577319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710151265.5A Pending CN108574563A (en) 2017-03-14 2017-03-14 A kind of method and its device for transmitting file in WIFI environment

Country Status (1)

Country Link
CN (1) CN108574563A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023155577A1 (en) * 2022-02-17 2023-08-24 Oppo广东移动通信有限公司 Wifi relay method and apparatus, and computer-readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023746A1 (en) * 2001-07-26 2003-01-30 Koninklijke Philips Electronics N.V. Method for reliable and efficient support of congestion control in nack-based protocols
CN101252425A (en) * 2008-04-09 2008-08-27 杭州华三通信技术有限公司 Loss package error correcting method and system of self-adapting network
CN101345764A (en) * 2008-06-18 2009-01-14 西安联合信息技术股份有限公司 Multilink wireless mobile industrial management and control integrated data transmission system
CN103310669A (en) * 2013-06-09 2013-09-18 深圳市拓莱思科技有限公司 Data transmission method and data transmission system both used for interactive teaching
CN105516262A (en) * 2015-11-27 2016-04-20 深圳市酷士多网络科技有限公司 Remote control method and system of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023746A1 (en) * 2001-07-26 2003-01-30 Koninklijke Philips Electronics N.V. Method for reliable and efficient support of congestion control in nack-based protocols
CN101252425A (en) * 2008-04-09 2008-08-27 杭州华三通信技术有限公司 Loss package error correcting method and system of self-adapting network
CN101345764A (en) * 2008-06-18 2009-01-14 西安联合信息技术股份有限公司 Multilink wireless mobile industrial management and control integrated data transmission system
CN103310669A (en) * 2013-06-09 2013-09-18 深圳市拓莱思科技有限公司 Data transmission method and data transmission system both used for interactive teaching
CN105516262A (en) * 2015-11-27 2016-04-20 深圳市酷士多网络科技有限公司 Remote control method and system of application program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023155577A1 (en) * 2022-02-17 2023-08-24 Oppo广东移动通信有限公司 Wifi relay method and apparatus, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
US10594447B2 (en) Data transmission method, terminal, and ran device
CN106559739B (en) Lightweight data transmission method suitable for Bluetooth low-power wireless communication system
US9838318B2 (en) TCP congestion control for large latency networks
US9043486B2 (en) Data transfer method, system and protocol
US10075382B2 (en) Communication device, relay device, and communication method for a plurality of packets
CN108270682A (en) A kind of message transmitting method, terminal, the network equipment and communication system
CN105871736A (en) Transporting method with low delay
CN104038845B (en) Message transmitting method and device
US10284340B2 (en) Multicast sending apparatus, multicast receiving apparatus, and multicast transmission determining method
CN109067892A (en) Big data transmission method, terminal and server in a kind of Lora communication system
JP4269176B2 (en) Session relay apparatus and relay method
CN102217258A (en) Detection processing method, data transmitter, data receiver and communication system
KR20130065619A (en) Method of transporting data from sending node to destination node
CN107172649A (en) A kind of data transmission method and equipment
WO2020147453A1 (en) Data transmission method and related apparatus
Seytnazarov et al. Enhanced mathematical modeling of aggregation-enabled WLANs with compressed blockACK
Kumar et al. Performant {TCP} for {Low-Power} wireless networks
WO2019144802A1 (en) Data transmission method and related device
WO2014176889A1 (en) Data transmission method, device and system
CN106936730A (en) A kind of file transmitting method, TCP agent and TCP Client
CN103338184A (en) Data transmitting method and apparatus, data receiving apparatus and data transmission system
CN104137507B (en) Feed back the message treatment method and device of packet loss
CN108432287A (en) A kind of data transmission method and network side equipment
Kumar et al. TCPlp: System design and analysis of full-scale TCP in low-power networks
CN108574563A (en) A kind of method and its device for transmitting file in WIFI environment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180925