CN109525458A - Data transmission method, device, medium and electronic equipment - Google Patents
Data transmission method, device, medium and electronic equipment Download PDFInfo
- Publication number
- CN109525458A CN109525458A CN201811386724.9A CN201811386724A CN109525458A CN 109525458 A CN109525458 A CN 109525458A CN 201811386724 A CN201811386724 A CN 201811386724A CN 109525458 A CN109525458 A CN 109525458A
- Authority
- CN
- China
- Prior art keywords
- packet
- data
- data packets
- redundant data
- transmission
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0006—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
- H04L43/0829—Packet loss
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
Abstract
The embodiment of the invention provides a kind of data transmission method, device, medium and electronic equipment, which includes: the two-way time and/or packet loss when being periodically detected through transmitted data on network packet;In the case where the data packet of transmission carries redundant data packets, if detect that the two-way time is less than the number of default packet loss more than or equal to number is set less than default two-way time and/or the packet loss, the redundant data packets carried are reduced or stopped.The technical solution of the embodiment of the present invention is by carrying redundant data packets in transmission data packet, and when there is two-way time less than the number of two-way time and/or packet loss less than default packet loss is preset more than or equal to number is set, the method for reducing or stopping the redundant data packets carrying, promote the transmission frequency of redundant data data packet when the network environment is poor, reduce packet loss, and then shorten two-way time, delay is reduced, user experience is promoted.
Description
Technical field
The present invention relates to computer and fields of communication technology, in particular to a kind of data transmission method, device, Jie
Matter and electronic equipment.
Background technique
Network protocol is the collection that computer network is the most basic rule, standard or the agreement that carry out data exchange and establish
It closes, existing data transmission technology is all based on network protocol and realizes, such as TCP (Transmission Control
Protocol, transmission control protocol), UDP (User Datagram Protocol, User Datagram Protocol), class udp protocol
Deng.Currently, the most widely used network protocol can meet data transmission to reliability and speed in general
It is required that.However, vulnerable network environment (lose by high latency, height in the case where the terminal devices such as mobile phone, tablet computer are more and more common
Packet rate) become normality.In this case, all inevitably there is the phenomenon that delay is increased in existing network protocol, greatly
Affect user experience.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of data transmission method, device, medium and electronic equipment, Jin Erzhi
It is few to overcome the problems, such as that vulnerable network environment lower network agreement delay occurs and increases to a certain extent.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention
Practice and acquistion.
According to a first aspect of the embodiments of the present invention, a kind of data transmission method is provided, comprising: be periodically detected and pass through
Two-way time and/or packet loss when transmitted data on network packet;The feelings of redundant data packets are carried in the data packet of transmission
Under condition, if detecting the number that the two-way time is less than default two-way time and/or the packet loss is less than default packet loss
When more than or equal to setting number, the redundant data packets carried are reduced or stopped.
In some embodiments of the invention, aforementioned schemes are based on, further includes: do not carry in the data packet of transmission superfluous
In the case where remaining data packet, if detecting, the two-way time is greater than default two-way time and/or the packet loss greater than default
Packet loss then carries redundant data packets in the data packet of transmission.
In some embodiments of the invention, aforementioned schemes are based on, according to maximum transmission unit and data to be transmitted
The quantity of packet determines the quantity for carrying redundant data packets.
In some embodiments of the invention, aforementioned schemes are based on, further includes: detect the transmission time of each redundant data packets
Number;After detecting that target redundancy data packet is sent T times, stop sending the target redundancy data packet.
In some embodiments of the invention, aforementioned schemes are based on, the value of the T is according to the network where data transmission
Attribute is preset.
In some embodiments of the invention, aforementioned schemes are based on, further includes: to packet header of the data packet of transmission into
Row modification, to identify the information of the redundant data packets carried.
In some embodiments of the invention, aforementioned schemes are based on, to send the redundant data packets of data packet and carrying into
Row modification, comprising:
Redundant data packets are carried when if sending data packet, are added in the packet header for sending data packet for identifying redundant digit
According to the field of packet length information, and in the backpack body of the data packet add redundant data packets backpack body;If send data packet
Redundant data packets are not carried, then set 0 for the field with redundant data packets length information, by the carrying redundant digit
Backpack body according to packet is sky.
According to a second aspect of the embodiments of the present invention, a kind of data transmission device is provided, comprising: statistic unit is used for
Two-way time and/or packet loss when being periodically detected through transmitted data on network packet;Processing unit, for described in the transmission
In the case that data packet carries redundant data packets, if detecting, the two-way time is less than default two-way time and/or described
When the number that packet loss is less than default packet loss is greater than or equal to setting number, the redundant data carried is reduced or stopped
Packet.
In some embodiments of the invention, aforementioned schemes, the configuration of the processing unit further include: in transmission are based on
In the case that the data packet does not carry redundant data packets, if detect the two-way time be greater than default two-way time and/or
The packet loss is greater than default packet loss, then carries redundant data packets in the data packet of transmission.
In some embodiments of the invention, aforementioned schemes are based on, the processing unit is configured that according to maximum transmitted
The quantity of unit and data packet to be transmitted determines the quantity for carrying redundant data packets.
In some embodiments of the invention, aforementioned schemes are based on, the processing unit is configured that each redundancy of detection
The transmission times of data packet;After detecting that target redundancy data packet is sent T times, stop sending the target redundancy data
Packet.
In some embodiments of the invention, aforementioned schemes, the value root for being configured that the T of the processing unit are based on
It is preset according to the attribute of the network where data transmission.
In some embodiments of the invention, aforementioned schemes, the processing unit are based on further include: modification unit is used for
It modifies to the packet header of the data packet of transmission, to identify the information of the redundant data packets carried.
In some embodiments of the invention, aforementioned schemes are based on, if being configured that for modification unit sends data packet
When carry redundant data packets, then send data packet packet header in the field for identifying redundant data packets length information is added,
And the backpack body of redundant data packets is added in the backpack body of the data packet;Redundant data packets are not carried when if sending data packet,
0 is set by the field with redundant data packets length information, is sky by the backpack body for carrying redundant data packets.
According to a third aspect of the embodiments of the present invention, a kind of computer-readable medium is provided, computer is stored thereon with
Program realizes the data transmission method as described in first aspect in above-described embodiment when described program is executed by processor.
According to a fourth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, comprising: one or more processors;
Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors
When row, so that one or more of processors realize the data transmission method as described in first aspect in above-described embodiment.
Technical solution provided in an embodiment of the present invention can include the following benefits:
In the technical solution provided by some embodiments of the present invention, by carrying redundant data in transmission data packet
Packet, and be greater than or equal to there is the number that two-way time is less than default packet loss less than default two-way time and/or packet loss
When setting number, the method for reducing or stopping the redundant data packets carrying promotes redundant data data when the network environment is poor
The transmission frequency of packet reduces packet loss, and then shortens two-way time, reduces delay, promotes user experience.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 diagrammatically illustrates the flow chart of data transmission method according to an embodiment of the invention;
Fig. 2 diagrammatically illustrates the packet header amending method of data transmission method according to an embodiment of the invention;
Fig. 3 shows the delay schematic diagram of the protocol layer when being not turned on carrying redundancy according to one embodiment of present invention;
Fig. 4 shows the delay schematic diagram of the protocol layer when opening carrying redundancy according to one embodiment of present invention;
Fig. 5 shows the ping that is averaged in game when opening and being not turned on carrying redundancy according to one embodiment of present invention
The contrast schematic diagram of value;
Fig. 6 diagrammatically illustrates the block diagram of data transmission device according to an embodiment of the invention;
Fig. 7 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner
In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However,
It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail,
Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side
Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity.
I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit
These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step,
It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close
And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
Fig. 1 diagrammatically illustrates the flow chart of data transmission method according to an embodiment of the invention, which passes
The executing subject of transmission method can be terminal device with data transfer demands, including computer, tablet computer, mobile phone etc. and set
It is standby.
Shown in referring to Fig.1, data transmission method according to an embodiment of the invention includes the following steps S110 to step
Rapid S120, is illustrated in detailed below:
In step s 110, two-way time and/or packet loss when being periodically detected through transmitted data on network packet.
In one embodiment of the invention, described be periodically detected refers to that according to the preset time interval, detection passes through
Two-way time and/or packet loss when transmitted data on network packet.
In the step s 120, in the case where the data packet of transmission carries redundant data packets, if detecting described
Two-way time is less than default two-way time and/or the packet loss is less than the number of default packet loss more than or equal to setting number
When, reduce or stop the redundant data packets carrying.
For above scheme, the embodiment provides following specific embodiments:
Step a1 detects two-way time when transmitted data on network packet if current time is more than or equal to predetermined period
And/or packet loss;
Step a2, according to the state currently carried detected and the two-way time of the transmitted data on network packet detected
And/or packet loss updates the state carried.
In one embodiment of the invention, the default two-way time, default packet loss, setting number can bases
Experience and test are set.For example, be in preferable network state when a certain equipment, can be respectively set it is described preset it is past
It returns the time, default packet loss, set number as biggish value, so as to just open or close carrying when change of network environment is larger.
For opening or stopping the scheme of carrying redundant data packets, the embodiment provides following specific implementations
Example:
Step b1 calculates present packet loss and two-way time, calculates the review time next time according to predetermined period;
Step b2, if current to stop the state carrying, packet loss is more than or equal to default packet loss and current round trip
Time then opens carrying more than or equal to default two-way time;
If it is current to open the state carried, and packet loss is less than default packet loss or current round trip time is less than
Threshold preset two-way time is then less than default two-way time for two-way time and/or packet loss is less than the number of default packet loss
Increase by 1;
Step b3, if two-way time is less than default two-way time and/or packet loss is less than the number etc. of default packet loss
In setting number, then stop carrying;Otherwise it re-execute the steps b1.
In one embodiment of the invention, the data transmission method further include: do not taken in the data packet of transmission
In the case where band redundant data packets, if detecting, the two-way time is greater than default two-way time and/or the packet loss is greater than
Default packet loss, then carry redundant data packets in the data packet of transmission.It is preset back and forth when detecting that two-way time is greater than
When time and/or the packet loss are greater than default packet loss, it was demonstrated that be now in vulnerable network environment, by taking in the packet
The transmission frequency of data packet is improved with redundant data packets, reduces packet loss, and then reduces high packet loss to two-way time
It influences.
In one embodiment of the invention, transmission the data packet carry redundant data packets quantity can basis
The quantity of maximum transmission unit and data packet to be transmitted determines.For example, the maximum transmission unit of network locating for device end
For N, it is n that this, which transmits data packet number to be transmitted, then the quantity of redundant data packets can be 0 to (N-n).By being arranged most
Big transmission unit, avoids the occurrence of that the redundant data packets carried in transmission process are excessive, causes the load of data receiver excessive
Problem.
In one embodiment of the invention, the data transmission method further include: detect the hair of each redundant data packets
Send number;After detecting that target redundancy data packet is sent T times, stop sending the target redundancy data packet.By to superfluous
The limitation for the number that remaining data packet is sent can reduce the waste of flow caused by repeat consumption flow.
For the above-mentioned method for limiting to redundant data packets quantity and transmission times, the embodiment provides as follows
One specific embodiment:
In one embodiment of the invention, the value of the T can be according to the network where data transmission terminal equipment
Attribute is preset.For example, the bandwidth of the network according to locating for data transmission terminal equipment presets T value, when bandwidth is bigger, preset
T value it is bigger.
In one embodiment of the invention, the data transmission method further include: to the packet of the data packet of transmission
Head is modified, to identify the information of the redundant data packets carried.For example, the packet header increase data type to data packet is
The rdc_len field of IUINT32, to state redundant data length.
In one embodiment of the invention, it modifies to the redundant data packets for sending data packet and carrying, specifically repairs
The mode changed is referring to shown in Fig. 2: if send data packet when carry redundant data packets, send data packet packet header (head and
Len the field (rdc-len) for identifying redundant data packets length information is added in), and in the backpack body of the data packet
(body) backpack body (rdc-body) of addition redundant data packets in;Redundant data packets are not carried when if sending data packet, by institute
It states the field with redundant data packets length information and is set as 0, set empty for the backpack body for carrying redundant data packets.
For the scheme modified when above-mentioned carrying redundant data packets to data packet, the embodiment provides such as
Lower specific embodiment:
Step c1, if detecting, this has data to need to send, and is currently at and opens the state carried and currently carry
Data packet send number be less than T time, then send data packet packet header (head and len) in addition for identifying redundant digit
According to the field (rdc-len) of packet length information, and updates this and send data length;
Step c2 abandons the redundant data packets specifically carried if data length is greater than maximum transmission unit N;
Step c3, if rdc-len is greater than 0, the data packet that more new historical is sent makes for sending redundant data next time
With.
In one embodiment of the invention, due to above-mentioned data packet packet header and backpack body be modified, need
It modifies to program used when sending and receiving data, to realize above-mentioned data transmission method, implementation of the invention
Example provides specific embodiment: field is increased to program used when sending and receiving data, as shown in table 1 below:
Table 1
In one embodiment of the invention, referring to shown in Fig. 2, the backpack body (rdc-body) of the redundant data packets includes
Three serial number (rdc-sn), data packet length (data-len), data (data) parts, can be in a backpack body (rdc-body)
Comprising multiple redundant data packets, the quantity of specific redundant data packets is for example above-mentioned according to maximum transmission unit and data to be transmitted
The quantity of packet determines.
In one embodiment of the invention, when receiving layer protocol data and being converted into KCP data packet, due to data
The structure of packet changes, therefore when parsing to data packet, and specific analysis mode is also required to modify, modified solution
Analysis mode is as follows:
Step d1, parsing data take out order, and according to command analysis data packet, comprising:
If order is ACK (Acknowledgement confirms character), then judge whether remaining data length is greater than ACK
Packet header size is wrapped, remaining data length is greater than ACK packet packet header size if judging, parses data and takes out window size wnd, time
Stab ts, packet serial number sn, serial number una to be received;
If order is not ACK, window size wnd, timestamp ts, packet serial number sn, serial number una to be received, packet are parsed
Data length len, redundant data length rdc_len;
Step d2 adjusts kcp transmit queue according to una and adjusts kcp window;
Step d3, according to command analysis data packet, comprising:
Judge whether redundant data length rdc_len is greater than 0;
If rdc_len is greater than 0, Analysis design data packet;
Otherwise, this normal data packet is parsed.
The embodiment of the present invention introduced below applies a kind of realization in the data transmission of the fast and reliable agreement of game (KCP)
Method, particular content are as follows:
Strategy 1: redundancy number
When KCP sends data packet every time, N number of data packet being transmitted across before, the top n data packet promoted with this are carried
Transmission frequency.This N can be typically chosen 1 to 3 with dynamic select, be a configuration parameter;It is carried if should be noted that
It has been more than MTU (Maximum Transmission Unit, maximum transmission unit) after n-th redundant data packets, then just not
N-th redundant data packets can be carried, N-1 redundant data packets can only be carried.
Strategy 2: redundancy number
After a data coating is transmitted across certain number as redundant data packets, do not retransmit, to reduce flow
Waste.The number T is a configuration parameter.If a data coating is all lost as redundant data packets carrying T times, card
The state for comparing card has been arrived in bright game, and in this state, user has apparent perception, has received larger shadow
It rings;Meanwhile KCP itself has the mechanism of Fast retransmission, by timeout (time-out) and max ack (maximum retransmits) mechanism, this
A packet being dropped itself can be retransmitted certain number.It in the above-described state, can be meaningless to reduce by limitation redundancy number
Flow consumption.
Strategy 3: dynamic redundancy
When smaller due to network delay, the increase of packet loss does not have a significant impact two-way time, therefore increases dynamic
Redundancy strategy.Redundancy strategy is an option, can control whether to open by dynamic switch.Specific algorithm are as follows:
Defined parameters rdc_loss_limit, rdc_rtt_limit, rdc_close_tm, rdc_close_try, wherein
Remaining parameter is preset all in accordance with experience and experiment in addition to rdc_close_tm.Wherein, parameter rdc_loss_limit is pre-
If packet loss, rdc_rtt_limit is default two-way time, and rdc_close_tm is to be less than default two-way time two-way time
And/or packet loss is less than the number of default packet loss, rdc_close_try sets number.
A) rdc_close_tm=0 is set when initial
B) in each update cycle, if being currently at redundancy open state, and RTT is less than rdc_rtt_limit or loses
Packet rate is less than rdc_loss_limit, then adds 1 to rdc_close_tm, and if judging that rdc_close_tm is more than or equal to
Rdc_close_try closes redundancy;
C) in each update cycle, if being currently at redundancy closed state, and RTT is more than or equal to rdc_rtt_limit
And packet loss is more than or equal to rdc_loss_limit, then rdc_close_tm is set to 0, and open redundancy.
Strategy 4: unidirectional redundancy
Unidirectional redundancy refers to that the uplink/downlink redundant configuration of KCP will not influence the transmitting-receiving of the other end.To realize this spy
Property, it needs to modify to the packet header KCP, modification mode is as shown in Figure 2:
The part head refers to all packet header contents other than len and rdc_len, and len refers to the length of body,
Rdc_len refers to the length of rdc_body.Wherein rdc_body is made of rdc_data one by one, each rdc_data
Tri- parts rdc_sn, data_len and data are contained again.It, can be the case where not influencing other end transmitting-receiving under designing in this way
Under, the quantity of redundant data packets is carried by adjusting the rdc_data quantity for including in rdc_body adjustment.
The embodiment of the present invention is applied in game KCP protocol data transmission, under vulnerable network environment, after unlatching redundancy
Performance it is good, two-way time not will receive packet loss promoted bring influence.As shown in Figure 3, Figure 4, under vulnerable network environment,
Performance after unlatching redundancy is good, substantially in the environment of two-way time being greater than 100ms, not will receive packet loss elevator belt
The influence come, overall effect are lifted at 30%~40%.Meanwhile as two-way time and packet loss are continuously increased, above-mentioned strategy
Brought effect of optimization is also more and more obvious, and specific effect of optimization is as shown in Figure 5.
The device of the invention embodiment introduced below can be used for executing the above-mentioned data transmission method of the present invention.
Fig. 6 diagrammatically illustrates the block diagram of data transmission device according to an embodiment of the invention, the transmitting device
It can be set on the terminal device with data-transformation facility.
Referring to shown in Fig. 6, data transmission device 600 according to an embodiment of the invention, comprising: statistic unit 610,
Processing unit 620.
Wherein, statistic unit 610 is used for two-way time and/or packet loss when being periodically detected through transmitted data on network packet
Rate;Processing unit 620 is used in the case where the data packet of transmission carries redundant data packets, if detecting described round-trip
When time is less than the number of default two-way time and/or the packet loss less than default packet loss more than or equal to setting number,
Reduce or stop the redundant data packets carrying.
In some embodiments of the invention, aforementioned schemes are based on, processing unit 620 configures further include: in the institute of transmission
It states in the case that data packet do not carry redundant data packets, if detecting, the two-way time is greater than default two-way time and/or institute
It states packet loss and is greater than default packet loss, then carry redundant data packets in the data packet of transmission.
In some embodiments of the invention, aforementioned schemes are based on, processing unit 620 is configured that according to maximum transmitted list
The quantity of data packet first and to be transmitted determines the quantity for carrying redundant data packets.
In some embodiments of the invention, aforementioned schemes are based on, processing unit 620 is configured that each redundant digit of detection
According to the transmission times of packet;After detecting that target redundancy data packet is sent T times, stop sending the target redundancy data packet.
In some embodiments of the invention, aforementioned schemes are based on, processing unit 620 is configured that the value of the T according to number
It is preset according to the attribute of the network where transmission.
In some embodiments of the invention, aforementioned schemes, the processing unit 620 are based on further include: modification unit is used
It modifies in the packet header of the data packet to transmission, to identify the information of the redundant data packets carried.
In some embodiments of the invention, aforementioned schemes are based on, if being configured that for modification unit sends data packet
When carry redundant data packets, then send data packet packet header in the field for identifying redundant data packets length information is added,
And the backpack body of redundant data packets is added in the backpack body of the data packet;Redundant data packets are not carried when if sending data packet,
0 is set by the field with redundant data packets length information, is sky by the backpack body for carrying redundant data packets.
Each functional module and above-mentioned data transmission method due to the data transmission device of example embodiments of the present invention
Example embodiment the step of it is corresponding, therefore for undisclosed details in apparatus of the present invention embodiment, please refer in the present invention
The embodiment for the data transmission method stated.
Below with reference to Fig. 7, it illustrates the computer systems 700 for the electronic equipment for being suitable for being used to realize the embodiment of the present invention
Structural schematic diagram.The computer system 700 of electronic equipment shown in Fig. 7 is only an example, should not be to the embodiment of the present invention
Function and use scope bring any restrictions.
As shown in fig. 7, computer system 700 includes central processing unit (CPU) 701, it can be read-only according to being stored in
Program in memory (ROM) 702 or be loaded into the program in random access storage device (RAM) 703 from storage section 708 and
Execute various movements appropriate and processing.In RAM 703, it is also stored with various programs and data needed for system operatio.CPU
701, ROM 702 and RAM 703 is connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to bus
704。
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.;
And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because
The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon
Computer program be mounted into storage section 708 as needed.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description
Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 709, and/or from detachable media
711 are mounted.When the computer program is executed by central processing unit (CPU) 701, executes and limited in the system of the application
Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation
Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs
When standby execution, so that the electronic equipment realizes such as above-mentioned data transmission method as described in the examples.
For example, the electronic equipment may be implemented as shown in Figure 1: step S110 is periodically detected and passes through network
Two-way time and/or packet loss when transmission data packet;Step S120 carries redundant data packets in the data packet of transmission
In the case where, if detecting, the two-way time is less than default two-way time and/or the packet loss is less than default packet loss
When number is greater than or equal to setting number, the redundant data packets carried are reduced or stopped.
For another example, modification mode as shown in Figure 2 may be implemented in the electronic equipment.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description
Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more
Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould
The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention
Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of data transmission method characterized by comprising
Two-way time and/or packet loss when being periodically detected through transmitted data on network packet;
In the case where the data packet of transmission carries redundant data packets, if detecting, the two-way time is past less than presetting
When returning the number of time and/or the packet loss less than default packet loss more than or equal to setting number, reduces or stopping carries
The redundant data packets.
2. the data transmission method stated according to claim 1, which is characterized in that further include:
In the case where the data packet of transmission does not carry redundant data packets, if detecting, the two-way time is past greater than presetting
It returns the time and/or the packet loss is greater than default packet loss, then carry redundant data packets in the data packet of transmission.
3. data transmission method according to claim 1, which is characterized in that according to maximum transmission unit and to be transmitted
The quantity of data packet determines the quantity for carrying redundant data packets.
4. data transmission method according to claim 1, which is characterized in that further include:
Detect the transmission times of each redundant data packets;
After detecting that target redundancy data packet is sent T times, stop sending the target redundancy data packet.
5. data transmission method according to claim 4, which is characterized in that the value of the T is according to data transmission place
The attribute of network is preset.
6. data transmission method according to any one of claim 1 to 5, which is characterized in that further include:
It modifies to the packet header of the data packet of transmission, to identify the information of the redundant data packets carried.
7. data transmission method according to claim 6, which is characterized in that the redundant data for sending data packet and carrying
Packet is modified, comprising:
Redundant data packets are carried when if sending data packet, are added in the packet header for sending data packet for identifying redundant data packets
The field of length information, and in the backpack body of the data packet add redundant data packets backpack body;
Redundant data packets are not carried when if sending data packet, set the field with redundant data packets length information to
0, it is sky by the backpack body for carrying redundant data packets.
8. a kind of data transmission device characterized by comprising
Statistic unit, two-way time and/or packet loss when for being periodically detected through transmitted data on network packet;
Processing unit, in the case where the data packet of transmission carries redundant data packets, if detecting described round-trip
When time is less than the number of default two-way time and/or the packet loss less than default packet loss more than or equal to setting number,
Reduce or stop the redundant data packets carrying.
9. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is executed by processor
Data transmission method of the Shi Shixian as described in any one of claims 1 to 7.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing
When device executes, so that one or more of processors realize the transmission side data as described in any one of claims 1 to 7
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811386724.9A CN109525458B (en) | 2018-11-20 | 2018-11-20 | Data transmission method, device, medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811386724.9A CN109525458B (en) | 2018-11-20 | 2018-11-20 | Data transmission method, device, medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109525458A true CN109525458A (en) | 2019-03-26 |
CN109525458B CN109525458B (en) | 2021-01-15 |
Family
ID=65776618
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811386724.9A Active CN109525458B (en) | 2018-11-20 | 2018-11-20 | Data transmission method, device, medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109525458B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111082896A (en) * | 2019-12-11 | 2020-04-28 | 深圳市优必选科技股份有限公司 | Data transmission method and transmitting and receiving device |
CN111093288A (en) * | 2019-07-30 | 2020-05-01 | 中兴通讯股份有限公司 | User data transmission method, network equipment and storage medium |
CN111200830A (en) * | 2020-01-02 | 2020-05-26 | 腾讯科技(深圳)有限公司 | Data transmission method and device and electronic equipment |
CN111669659A (en) * | 2020-05-13 | 2020-09-15 | 南斗六星系统集成有限公司 | Chat room audio and video processing method and system |
CN112351049A (en) * | 2021-01-11 | 2021-02-09 | 全时云商务服务股份有限公司 | Data transmission method, device, equipment and storage medium |
CN112821992A (en) * | 2021-01-08 | 2021-05-18 | 百果园技术(新加坡)有限公司 | Data transmission method and device, electronic equipment and storage medium |
CN114039703A (en) * | 2021-11-26 | 2022-02-11 | 北京字节跳动网络技术有限公司 | Data transmission method, device, equipment and medium |
CN114615164A (en) * | 2022-03-09 | 2022-06-10 | 网易(杭州)网络有限公司 | Packet loss rate detection method and device, storage medium and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101030832A (en) * | 2006-03-03 | 2007-09-05 | 华为技术有限公司 | Method and system for realizing realtime transmission protocol message redundancy |
CN101072083A (en) * | 2007-06-04 | 2007-11-14 | 深圳市融合视讯科技有限公司 | Method for optimizing network data transmission redundancy error correction rate |
CN103957222A (en) * | 2014-05-20 | 2014-07-30 | 艾诺通信系统(苏州)有限责任公司 | Video transmission self-adaption method based on FEC algorithm |
CN104580171A (en) * | 2014-12-24 | 2015-04-29 | 北京高森明晨信息科技有限公司 | TCP (transmission control protocol) transmission method, device and system |
US9166853B2 (en) * | 2013-01-10 | 2015-10-20 | Qualcomm Incorporated | Rate adaptation for data communication |
CN106301714A (en) * | 2016-08-16 | 2017-01-04 | 浙江大华技术股份有限公司 | A kind of data transmission method and device |
CN107306361A (en) * | 2016-04-22 | 2017-10-31 | 华为技术有限公司 | Code stream transmission method, device and IP Camera |
-
2018
- 2018-11-20 CN CN201811386724.9A patent/CN109525458B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101030832A (en) * | 2006-03-03 | 2007-09-05 | 华为技术有限公司 | Method and system for realizing realtime transmission protocol message redundancy |
CN101072083A (en) * | 2007-06-04 | 2007-11-14 | 深圳市融合视讯科技有限公司 | Method for optimizing network data transmission redundancy error correction rate |
US9166853B2 (en) * | 2013-01-10 | 2015-10-20 | Qualcomm Incorporated | Rate adaptation for data communication |
CN103957222A (en) * | 2014-05-20 | 2014-07-30 | 艾诺通信系统(苏州)有限责任公司 | Video transmission self-adaption method based on FEC algorithm |
CN104580171A (en) * | 2014-12-24 | 2015-04-29 | 北京高森明晨信息科技有限公司 | TCP (transmission control protocol) transmission method, device and system |
CN107306361A (en) * | 2016-04-22 | 2017-10-31 | 华为技术有限公司 | Code stream transmission method, device and IP Camera |
CN106301714A (en) * | 2016-08-16 | 2017-01-04 | 浙江大华技术股份有限公司 | A kind of data transmission method and device |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111093288A (en) * | 2019-07-30 | 2020-05-01 | 中兴通讯股份有限公司 | User data transmission method, network equipment and storage medium |
CN111093288B (en) * | 2019-07-30 | 2024-02-06 | 中兴通讯股份有限公司 | User data transmission method, network equipment and storage medium |
CN111082896A (en) * | 2019-12-11 | 2020-04-28 | 深圳市优必选科技股份有限公司 | Data transmission method and transmitting and receiving device |
CN111200830A (en) * | 2020-01-02 | 2020-05-26 | 腾讯科技(深圳)有限公司 | Data transmission method and device and electronic equipment |
CN111200830B (en) * | 2020-01-02 | 2022-04-26 | 腾讯科技(深圳)有限公司 | Data transmission method and device and electronic equipment |
CN111669659A (en) * | 2020-05-13 | 2020-09-15 | 南斗六星系统集成有限公司 | Chat room audio and video processing method and system |
CN112821992A (en) * | 2021-01-08 | 2021-05-18 | 百果园技术(新加坡)有限公司 | Data transmission method and device, electronic equipment and storage medium |
CN112821992B (en) * | 2021-01-08 | 2024-02-06 | 百果园技术(新加坡)有限公司 | Data transmission method, device, electronic equipment and storage medium |
CN112351049B (en) * | 2021-01-11 | 2021-04-06 | 全时云商务服务股份有限公司 | Data transmission method, device, equipment and storage medium |
CN112351049A (en) * | 2021-01-11 | 2021-02-09 | 全时云商务服务股份有限公司 | Data transmission method, device, equipment and storage medium |
CN114039703A (en) * | 2021-11-26 | 2022-02-11 | 北京字节跳动网络技术有限公司 | Data transmission method, device, equipment and medium |
CN114039703B (en) * | 2021-11-26 | 2023-10-20 | 北京字节跳动网络技术有限公司 | Data transmission method, device, equipment and medium |
CN114615164A (en) * | 2022-03-09 | 2022-06-10 | 网易(杭州)网络有限公司 | Packet loss rate detection method and device, storage medium and electronic equipment |
CN114615164B (en) * | 2022-03-09 | 2023-12-29 | 网易(杭州)网络有限公司 | Packet loss rate detection method and device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109525458B (en) | 2021-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109525458A (en) | Data transmission method, device, medium and electronic equipment | |
CN111937364B (en) | Method and system for processing data path creation in wireless network system | |
US8274886B2 (en) | Inferring TCP initial congestion window | |
US11171862B2 (en) | Multi-subflow network transmission method and apparatus | |
US20070226375A1 (en) | Plug-in architecture for a network stack in an operating system | |
EP1701506B1 (en) | Method and system for transmission control protocol (TCP) traffic smoothing | |
US8583053B1 (en) | Optimizing TCP traffic for mobile devices using TCP backoff thresholds | |
CN105827537A (en) | Congestion relieving method based on QUIC protocol | |
US20190044861A1 (en) | Technologies for congestion control for ip-routable rdma over converged ethernet | |
US8521901B2 (en) | TCP burst avoidance | |
CN107276910A (en) | The real-time adjusting apparatus of video code rate and system, video server | |
CN107624232A (en) | The apparatus and method of downlink throughput are controlled in a communications system | |
CN107342848A (en) | A kind of adaptive code stream transmission method, device and equipment | |
WO2009048691A1 (en) | Parallelizing the tcp behavior of a network connection | |
WO2021103706A1 (en) | Data packet sending control method, model training method, device, and system | |
JP5607769B2 (en) | Data transfer management method and system | |
EP3806366A1 (en) | Method for controlling retransmission, communication interface, and electronic device | |
CN104320809A (en) | Wireless multi-hop network congestion control method and system based on RTT | |
US9130740B2 (en) | Variable acknowledge rate to reduce bus contention in presence of communication errors | |
CN109257138A (en) | A kind of data transfer control method and relevant device | |
CN107659558A (en) | A kind of data transmission method and base station | |
CN109981385A (en) | A kind of methods, devices and systems for realizing packet loss detection | |
US20220103465A1 (en) | Multi-Subflow Network Transmission Method and Apparatus | |
CN105897452A (en) | Data retransmission method and device | |
CN112994848B (en) | MCS (modulation and coding scheme) adjusting method and device, storage medium and wireless node |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |