WO2021223452A1 - 数据传输方法及装置 - Google Patents

数据传输方法及装置 Download PDF

Info

Publication number
WO2021223452A1
WO2021223452A1 PCT/CN2020/141031 CN2020141031W WO2021223452A1 WO 2021223452 A1 WO2021223452 A1 WO 2021223452A1 CN 2020141031 W CN2020141031 W CN 2020141031W WO 2021223452 A1 WO2021223452 A1 WO 2021223452A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
video data
preset
connection channel
transmission
Prior art date
Application number
PCT/CN2020/141031
Other languages
English (en)
French (fr)
Inventor
黄磊
王昊
张瑶琦
杨智慧
龙春宇
王孟灰
Original Assignee
上海幻电信息科技有限公司
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 上海幻电信息科技有限公司 filed Critical 上海幻电信息科技有限公司
Priority to US17/923,227 priority Critical patent/US11778006B2/en
Publication of WO2021223452A1 publication Critical patent/WO2021223452A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/403Arrangements for multi-party communication, e.g. for conferences
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/752Media network packet handling adapting media to network capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/762Media network packet handling at the source 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • This application relates to the field of Internet technology, and in particular to a data transmission method, device, computer equipment, and computer-readable storage medium.
  • the electronic device can realize the switching and display of display content among multiple devices by means such as screen projection.
  • the inventor realizes that in the prior art, in the process of screen projection and display, delays and freezes often occur, and the display effect is poor.
  • This application proposes a data transmission method, device, computer equipment, and computer readable storage medium, which can solve the problems of delay and freeze in the projection screen display in the prior art.
  • this application provides a data transmission method, the method includes:
  • Receive a screen projection request from a screen projection terminal establish an audio and video data connection channel with the screen projection terminal; obtain and play audio and video data through the audio and video data connection channel; monitor the audio and video data connection channel Network status; when the network status becomes worse, select and execute a corresponding transmission mode from a preset transmission strategy according to the index value of the network status.
  • the monitoring the network status of the audio and video data connection channel includes: monitoring a preset first number of sampling points or sampling points within a preset time period; If the index value of the second number of sampling points deviates from the corresponding index value standard, it indicates that the network status has deteriorated.
  • the network status includes at least one indicator value of packet loss rate, delay, jitter, and bandwidth.
  • the monitoring the network status of the audio and video data connection channel includes: counting the sequence numbers and receiving time of data packets received in a preset time period, so as to obtain the packet loss rate and the time period of the time period. Delay.
  • the monitoring the network status of the audio and video data connection channel includes: counting the sequence numbers and receiving time of data packets received in a preset time period; according to the first n data packets in the time period The data packet receiving time prediction curve is established at the receiving time of, and the n+1th data packet receiving time is predicted according to the data packet receiving time prediction curve, where (1 ⁇ n ⁇ N, n++), N is the time segment The number of all data packets in the data packet; the jitter of the time segment is calculated according to the actual receiving time and the predicted receiving time of the n+1th data packet.
  • the selecting and executing the corresponding transmission mode from the preset transmission strategy according to the indicator value of the network state includes: when the jitter is greater than the preset first threshold, then enabling the first dynamic buffer for buffering The received audio and video data packets; when the jitter is greater than the preset second threshold, the second dynamic buffer is enabled for buffering the received audio and video data packets; wherein, the second threshold is greater than the first threshold, the first The second dynamic cache is larger than the first dynamic cache.
  • the selecting and executing the corresponding transmission mode from the preset transmission strategy according to the indicator value of the network state includes: when the packet loss rate is high and the bandwidth is sufficient, performing the data packet in a forward error correction mode Transmission; when the packet loss rate is high, the bandwidth is insufficient, and the delay is low, the data packet transmission is performed by the packet loss retransmission method; when the packet loss rate is high, the bandwidth is insufficient and the delay is high, the data packet is performed by the packet loss retransmission method Transmission, and reduce the transmission bit rate and display resolution.
  • this application also provides a data transmission device, the device including:
  • the establishment module is used to receive the screen projection request of the screen projection terminal, and establish the audio and video data connection channel with the screen projection terminal;
  • the playback module is used to obtain and play the audio and video data through the audio and video data connection channel
  • the monitoring module is used to monitor the network state of the audio and video data connection channel;
  • the execution module is used to select and execute the preset transmission strategy according to the index value of the network state when the network state becomes worse Corresponding transmission method.
  • this application also proposes a computer device, the computer device includes a memory and a processor, the memory stores computer-readable instructions that can run on the processor, and the computer-readable instructions are The following steps are implemented when the processor is executed:
  • Receive a screen projection request from a screen projection terminal establish an audio and video data connection channel with the screen projection terminal; obtain and play audio and video data through the audio and video data connection channel; monitor the audio and video data connection channel Network status; when the network status becomes worse, select and execute a corresponding transmission mode from a preset transmission strategy according to the index value of the network status.
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable The at least one processor performs the following steps:
  • Receive a screen projection request from a screen projection terminal establish an audio and video data connection channel with the screen projection terminal; obtain and play audio and video data through the audio and video data connection channel; monitor the audio and video data connection channel Network status; when the network status becomes worse, select and execute a corresponding transmission mode from a preset transmission strategy according to the index value of the network status.
  • the data transmission method, device, computer equipment, and computer-readable storage medium proposed in this application can receive a screen projection request from a screen projection terminal, and establish an audio and video data connection channel with the screen projection terminal;
  • the audio and video data connection channel obtains the audio and video data and plays it; then monitors the network status of the audio and video data connection channel, and when the network status becomes worse, the preset transmission strategy is changed according to the index value of the network status Select and execute the corresponding transmission method. Therefore, an appropriate transmission mode can be dynamically selected according to the index value of the network state, thereby solving the problems of delay and freezing, and improving the display effect.
  • Fig. 1 is a schematic diagram of an application environment of an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a specific embodiment of the data transmission method of the present application.
  • FIG. 3 is a schematic flowchart of a specific embodiment based on step S204 in FIG. 2;
  • FIG. 4 is a schematic flowchart of a specific embodiment of step S204 in FIG. 2;
  • FIG. 5 is a schematic flowchart of a specific embodiment of selecting and executing a corresponding transmission mode from a preset transmission strategy according to the index value of the network state in step S206 in FIG. 2;
  • FIG. 6 is a schematic flowchart of another specific embodiment of selecting and executing a corresponding transmission mode from a preset transmission strategy according to the index value of the network state in step S206 in FIG. 2;
  • FIG. 7 is a schematic diagram of program modules of an embodiment of the data transmission device of the present application.
  • Fig. 8 is a schematic diagram of an optional hardware architecture of the computer device of the present application.
  • Fig. 1 is a schematic diagram of an application environment of an embodiment of the present application.
  • the computer device 1 is connected to the projection terminal 2, can receive the projection display request sent by the projection terminal 2, establish an audio and video data connection channel with the projection terminal 2, and then Acquire audio and video data through the audio and video data connection channel and play it; then monitor the network status of the audio and video data connection channel, and when the network status becomes worse, the indicator value of the network status is changed from a preset Select and execute the corresponding transmission mode in the transmission strategy.
  • the screen projection terminal 2 may be a mobile phone, a tablet, a portable device or a PC, etc.
  • the computer device 1 may be a mobile phone, a tablet, a portable device, a PC, or an electronic device with a display function, etc.
  • Fig. 2 is a schematic flowchart of an embodiment of a data transmission method according to the present application. It can be understood that the flowchart in this method embodiment is not used to limit the order of execution of the steps. The following is an exemplary description with the computer device 1 as the execution subject.
  • the data transmission method may include steps S200 to S206, wherein:
  • Step S200 Receive a screen projection request from a screen projection terminal, and establish an audio and video data connection channel with the screen projection terminal.
  • Step S202 Acquire and play audio and video data through the audio and video data connection channel.
  • the projection terminal when the user wants to screen the audio and video data on the projection terminal onto the computer device 1, the projection terminal first needs to connect to the computer device 1, and then the user sends the video data to the computer device 1 through the projection terminal.
  • the computer device 1 sends a screen projection request.
  • the computer device 1 receives the screen projection request, and then establishes an audio and video data connection channel according to the screen projection request.
  • the projection terminal needs to project real-time projected video data to the computer device 1. Therefore, the computer device 1 can obtain real-time projected audio and video through the audio and video data connection channel. data.
  • real-time screen projection means that the screen projection terminal will directly perform audio and video shooting, and then the computer device 1 can directly obtain the audio and video data captured by the screen projection terminal in real time through the audio and video data connection channel.
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • the screen projection terminal needs to establish a connection with the computer device 1 before the screen projection. Therefore, the screen projection terminal can establish a transmission network, such as a wired local area network, or wifi, Bluetooth, or other mobile communication networks.
  • the computer equipment 1 joins the transmission network.
  • the screen projection terminal sends a data link establishment request based on the UDP protocol communication protocol to the computer device 1 through the transmission network, and the computer device 1 receives the data link establishment request to establish audio and video Data connection channel, and load the audio and video data to the player for playback.
  • Step S204 Monitor the network status of the audio and video data connection channel.
  • Step S206 When the network state becomes worse, select and execute a corresponding transmission mode from a preset transmission strategy according to the index value of the network state.
  • step S204 may include steps S300 to S302.
  • step S300 a preset first number of sampling points or sampling points within a preset time period are monitored.
  • step S302 when the index value of the sampling points greater than or equal to the preset second number deviates from the corresponding index value standard, it indicates that the network status has deteriorated.
  • the detection of the network status is dynamic and real-time, but the handover is not performed all the time.
  • the continuous switching strategy is mainly considered, which consumes resources such as the computing power of the computer device 1, and even in extreme cases, it may only be that a point in the linear statistics is far away from the prediction. In this case, the execution of the switching will consume a lot of resources. Therefore, the sampling points need to be screened. For example, we set to count 1000 sampling points or sampling points for 5 seconds. If there are only a few sampling points in the middle, it will not trigger the switching of the transmission mode; only when the sampling points meet certain predetermined conditions, will the transmission mode be switched. Perform the switching of the transmission mode.
  • the network status at least includes at least one index value of packet loss rate, delay, jitter, and bandwidth.
  • step S204 may include steps S400 to S404.
  • Step S400 Count the sequence numbers and receiving time of data packets received in a preset time period, so as to obtain the packet loss rate and delay of the time period.
  • Step S402 Establish a data packet reception time prediction curve according to the reception time of the first n data packets in the time section, and predict the n+1th data packet reception time according to the data packet reception time prediction curve, where (1 ⁇ n ⁇ N, n++), where N is the number of all data packets in the time zone.
  • Step S404 Calculate the jitter of the time segment according to the actual receiving time and the predicted receiving time of the n+1th data packet.
  • the screen projection terminal transmits audio and video data to the computer device 1, generally by dividing the audio and video data into several data packets for transmission, and each data packet includes a serial number. Then, after the computer device 1 receives the data packet of the audio and video data sent by the projection terminal, it combines all the data packets and restores the original audio and video data according to the sequence number of each data packet. Therefore, when the computer device 1 receives each data packet, it can count the sequence number and receiving time of the data packet, for example, by establishing a receiving status feedback report to save the sequence numbers and receiving time of all the data packets of the audio and video data. time.
  • the computer device 1 can directly calculate whether the sequence numbers of the received data packets are missing and the number of missing sequence numbers, so as to obtain the packet loss rate of the data packet; and according to whether the receiving time of the data packet has timed out and how much timed out, thereby Get the delay of the data packet.
  • the computer device 1 For the jitter of the network, it can be calculated by the receiving time of adjacent data packets.
  • the computer device 1 establishes a data packet reception time prediction curve according to the reception time of the first n data packets in the time segment, and establishes the prediction curve of subsequent sampling points through the first few sampling points. There are many mature formulas in the technology, so I won't repeat them here. Then the computer device 1 predicts the n+1th data packet receiving time according to the data packet receiving time prediction curve, where (1 ⁇ n ⁇ N, n++), N is the number of all data packets in the time section Number; The difference between the actual receiving time and the predicted receiving time of the n+1th data packet indicates the jitter value of the network state.
  • the computer device 1 may also directly calculate the jitter of the network according to the delay of each data packet, for example, calculate the delay difference between adjacent data packets as the data packet corresponding The jitter value at the time point.
  • the computer device 1 After the computer device 1 calculates the actual value of each indicator of the network status, it can be compared with the standard values corresponding to the preset indicators. When the deviation exceeds the preset value, the network status is considered When it becomes worse, therefore, the computer device 1 further selects and executes a corresponding transmission mode from a preset transmission strategy according to the index value of the network state. In this embodiment, the computer device 1 presets a transmission strategy for automatically switching to a different transmission mode when different index values appear for the network state. Therefore, when the computer device 1 detects that the network status has deteriorated, it will execute the corresponding transmission method according to the index value and the transmission strategy.
  • selecting and executing a corresponding transmission mode from a preset transmission strategy according to the index value of the network state in step S206 includes steps S500-S502.
  • step S500 when the jitter is greater than the preset first threshold, the first dynamic buffer is enabled for buffering the received audio and video data packets.
  • Step S502 When the jitter is greater than the preset second threshold, the second dynamic buffer is used to buffer the received audio and video data packets; wherein, the second threshold is greater than the first threshold, and the second dynamic buffer is greater than the first dynamic Cache.
  • the computer device 1 when the network jitter is large, the network jitter will cause out-of-sequence and delay of data packets. Therefore, after the computer device 1 obtains the jitter value, it can correspondingly enable dynamic buffering for storing the received jitter value. data pack.
  • the computer device 1 when the network is unstable (jitter occurs), the computer device 1 increases the length of the dynamic buffer and buffers more data to cope with the jitter that may occur in the future; when the network is stable, reduce the dynamic buffer The length of the video is less, some data is less cached, the end-to-end delay of the video is reduced, and the real-time performance is improved.
  • the running process of the dynamic buffer is a process of dynamically adjusting the length of the dynamic buffer according to the jitter. Therefore, the end-to-end delay can be reduced under the premise of ensuring that there is no jam as much as possible, that is, it can achieve a better balance between the delay and the jam rate.
  • selecting and executing the corresponding transmission mode from the preset transmission strategy according to the index value of the network state in step S206 includes steps S600-S604.
  • step S600 when the packet loss rate is high and the bandwidth is sufficient, data packet transmission is performed in a forward error correction manner.
  • step S602 when the packet loss rate is high, the bandwidth is insufficient, and the delay is low, data packet transmission is performed in a packet loss retransmission manner.
  • step S604 when the packet loss rate is high, the bandwidth is insufficient, and the delay is high, the data packet transmission is performed in a packet loss retransmission manner, and the transmission code rate and display resolution are reduced.
  • the computer device 1 after the computer device 1 obtains the packet loss rate, it will further obtain the bandwidth value of the current network, for example, by using bandwidth real-time speed measurement technology.
  • the computer device 1 performs data packet transmission in a forward error correction manner.
  • forward error correction requires the sender to send the data to be sent together with a certain redundant error correction code, and the receiver performs error detection on the received data according to the error correction code. If an error is found, the receiver will perform error detection. Error correction, although sending redundancy occupies more network bandwidth, it can reduce the packet loss rate.
  • the computer device 1 When the packet loss rate is high, the bandwidth is insufficient, and the delay is low, the computer device 1 performs data packet transmission in a packet loss retransmission manner.
  • packet loss retransmission is mainly based on the sequence number of the data packet to determine whether the packet is lost. Normally, the sequence number is continuous; if the receiver finds that the data is lost, it sends a request to the sender to request the sender to resend the specified data packet . Therefore, the packet loss rate can also be effectively reduced.
  • the computer device 1 chooses to perform the data packet transmission through the packet loss retransmission mode, while reducing the transmission code. Rate, and reduce the display resolution of the player’s display screen. This can effectively reduce the amount of data transmission and ensure the flow of the display screen.
  • the data transmission method proposed in this embodiment can receive a screen projection request from a screen projection terminal, and establish an audio and video data connection channel with the screen projection terminal; and then obtain through the audio and video data connection channel The audio and video data is played; then the network status of the audio and video data connection channel is monitored. When the network status becomes worse, the corresponding transmission strategy is selected and executed according to the index value of the network status. transfer method. Therefore, an appropriate transmission mode can be dynamically selected according to the index value of the network state, thereby solving the problems of delay and freezing, and improving the display effect.
  • FIG. 7 schematically shows a block diagram of a data transmission device according to Embodiment 2 of the present application.
  • the data transmission device can be divided into one or more program modules, one or more program modules are stored in a storage medium, and Executed by one or more processors to complete the embodiments of the present application.
  • the program modules referred to in the embodiments of this application refer to a series of computer-readable instruction segments that can complete specific functions. The following description will specifically introduce the functions of the program modules in this embodiment.
  • the data transmission device 400 may include an establishment module 410, a playback module 420, a monitoring module 430, and an execution module 440, where:
  • the establishment module 410 is configured to receive a screen projection request from a screen projection terminal, and establish an audio and video data connection channel with the screen projection terminal.
  • the playing module 420 is configured to obtain and play audio and video data through the audio and video data connection channel.
  • the monitoring module 430 is used to monitor the network status of the audio and video data connection channel.
  • the execution module 440 is configured to select and execute a corresponding transmission mode from a preset transmission strategy according to the index value of the network state when the network state becomes worse.
  • the monitoring module 430 is further configured to: monitor a preset first number of sampling points or sampling points within a preset time period; when the number of sampling points is greater than or equal to the preset second number If the index value of a point deviates from the corresponding index value standard, it indicates that the network status is getting worse.
  • the network state at least includes at least one index value of packet loss rate, delay, jitter, and bandwidth.
  • the monitoring module 430 is further configured to: count the sequence numbers and receiving time of the data packets received in the preset time period, so as to obtain the packet loss rate and delay of the time period. And counting the sequence numbers and receiving time of data packets received in the preset time section; establishing a data packet receiving time prediction curve according to the receiving time of the first n data packets in the time section, and according to the data packet receiving time The prediction curve predicts the receiving time of the n+1th data packet, where (1 ⁇ n ⁇ N, n++), N is the number of all data packets in the time section; according to the actual reception of the n+1th data packet Time and predicted reception time are used to calculate the jitter of the time segment.
  • the execution module 440 is further configured to: when the jitter is greater than the preset first threshold, enable the first dynamic buffer to buffer the received audio and video data packets; when the jitter is greater than the preset first threshold, At the second threshold, the second dynamic buffer is enabled for buffering the received audio and video data packets; wherein, the second threshold is greater than the first threshold, and the second dynamic buffer is greater than the first dynamic buffer.
  • the forward error correction method is used to perform data packet transmission; when the packet loss rate is high, the bandwidth is insufficient and the delay is low, the data packet transmission is performed through the packet loss retransmission method; when the packet is lost When the transmission rate is high, the bandwidth is insufficient and the delay is high, the data packet transmission is performed through the packet loss retransmission method, and the transmission code rate and display resolution are reduced.
  • FIG. 8 schematically shows a schematic diagram of the hardware architecture of a computer device 1 suitable for implementing the data transmission method according to the third embodiment of the present application.
  • the computer device 1 is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
  • it may be a rack server, a blade server, a tower server or a cabinet server (including an independent server or a server cluster composed of multiple servers) with a gateway function.
  • the computer device 1 at least includes but is not limited to: a memory 510, a processor 520, and a network interface 530 that can communicate with each other through a system bus. in:
  • the memory 510 includes at least one type of computer-readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), and static random access memory.
  • SRAM read-only memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • PROM programmable read-only memory
  • magnetic memory magnetic disk, optical disk, etc.
  • the memory 510 may be an internal storage module of the computer device 1, such as a hard disk or memory of the computer device 1.
  • the memory 510 may also be an external storage device of the computer device 1, such as a plug-in hard disk equipped on the computer device 1, a smart memory card (Smart Media Card, referred to as SMC), and a secure digital (Secure Digital). Digital, abbreviated as SD) card, flash card (Flash Card), etc.
  • the memory 510 may also include both an internal storage module of the computer device 1 and an external storage device thereof.
  • the memory 510 is generally used to store an operating system and various application software installed in the computer device 1, such as program code of a data transmission method.
  • the memory 510 may also be used to temporarily store various types of data that have been output or will be output.
  • the processor 520 may be a central processing unit (Central Processing Unit, CPU for short), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 520 is generally used to control the overall operation of the computer device 1, such as performing data interaction or communication-related control and processing with the computer device 1.
  • the processor 520 is configured to run program codes stored in the memory 510 or process data.
  • the network interface 530 may include a wireless network interface or a wired network interface, and the network interface 530 is generally used to establish a communication link between the computer device 1 and other computer devices.
  • the network interface 530 is used to connect the computer device 1 with an external terminal through a network, and establish a data transmission channel and a communication link between the computer device 1 and the external terminal.
  • the network can be Intranet, Internet, Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network , 5G network, Bluetooth (Bluetooth), Wi-Fi and other wireless or wired networks.
  • FIG. 8 only shows a computer device with components 510-530, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
  • the program code of the data transmission method stored in the memory 510 may also be divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 520). To complete the embodiments of this application.
  • This embodiment also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the following steps are implemented:
  • Receive a screen projection request from a screen projection terminal establish an audio and video data connection channel with the screen projection terminal; obtain and play audio and video data through the audio and video data connection channel; monitor the audio and video data connection channel Network status; when the network status becomes worse, select and execute a corresponding transmission mode from a preset transmission strategy according to the index value of the network status.
  • the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, referred to as SMC), and a secure digital (SMC). Secure Digital, referred to as SD card, Flash Card, etc.
  • the computer-readable storage medium may also include both the internal storage unit and the external storage device of the computer device.
  • the computer-readable storage medium is generally used to store the operating system and various application software installed in the computer device, such as the program code of the component management method of the service platform in the embodiment.
  • the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
  • modules or steps of the embodiments of the present application described above can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed among multiple computing devices.
  • they can be implemented by the program code executable by the computing device, so that they can be stored in the storage device for execution by the computing device, and in some cases, they can be different from here
  • the steps shown or described are executed in the order of, or they are respectively fabricated into individual integrated circuit modules, or multiple modules or steps of them are fabricated into a single integrated circuit module to achieve. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种数据传输方法,该方法包括:接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;通过所述音视频数据连接通道获取音视频数据并进行播放;监测所述音视频数据连接通道的网络状态;当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。本申请还提供一种数据传输装置、计算机设备以及计算机可读存储介质。本申请能够根据网络状态的指标值动态选择适当的传输方式,从而解决了延时和卡顿的问题,提升了显示效果。

Description

数据传输方法及装置
本申请要求于2020年05月06日提交中国专利局、申请号为202010373539.7、发明名称为“数据传输方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网技术领域,尤其涉及一种数据传输方法、装置、计算机设备及计算机可读存储介质。
背景技术
随着计算机技术的发展,越来越多种类的电子设备被开发并被广泛使用。各类电子设备一般具有各自的设备特点,例如,手机的便携性更好,电视屏幕的显示效果更好,而音箱的音质效果更好。为了充分发挥不同电子设备的设备特点,电子设备可以通过投屏等方式实现显示内容在多个设备之间的切换和显示。发明人意识到,现有技术中,在投屏显示过程中,经常出现延时和卡顿现象,显示效果较差。
发明内容
本申请提出一种数据传输方法、装置、计算机设备及计算机可读存储介质,能够解决现有技术中投屏显示中的延时和卡顿的问题。
首先,为实现上述目的,本申请提供一种数据传输方法,所述方法包括:
接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;通过所述音视频数据连接通道获取音视频数据并进行播放;监测所述音视频数据连接通道的网络状态;当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
在一个例子中,所述监测所述音视频数据连接通道的网络状态包括:对预设第一数量的采样点或者预设时间区段内的采样点进行监测;当其中大于或等于预设第二数量的采样点的指标值偏离对应的指标值标准,则表示网络状态变差。
在一个例子中,所述网络状态至少包括丢包率、延时、抖动和带宽中的至少一种指标值。
在一个例子中,所述监测所述音视频数据连接通道的网络状态包括:统计预设时间区 段内接收到的数据包的序号和接收时间,从而得到所述时间区段的丢包率和延时。
在一个例子中,所述监测所述音视频数据连接通道的网络状态包括:统计预设时间区段内接收到的数据包的序号和接收时间;根据所述时间区段中前n个数据包的接收时间建立数据包接收时间预测曲线,并根据所述数据包接收时间预测曲线预测第n+1个数据包接收时间,其中(1<n<N,n++),N为所述时间区段内所有的数据包个数;根据第n+1个数据包的实际接收时间和预测接收时间来计算所述时间区段的抖动。
在一个例子中,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:当抖动大于预设第一阈值时,则启用第一动态缓存用于缓存接收到的音视频数据的数据包;当抖动大于预设第二阈值时,则启用第二动态缓存用于缓存接收到的音视频数据的数据包;其中,第二阈值大于第一阈值,第二动态缓存大于第一动态缓存。
在一个例子中,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:当丢包率高且带宽充足时,通过前向纠错方式执行数据包传输;当丢包率高且带宽不足且延时低时,通过丢包重传方式执行数据包传输;当丢包率高且带宽不足且延时高时,通过丢包重传方式执行数据包传输,并降低传输码率和显示分辨率。
此外,为实现上述目的,本申请还提供一种数据传输装置,所述装置包括:
建立模块,用于接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;播放模块,用于通过所述音视频数据连接通道获取音视频数据并进行播放;监测模块,用于监测所述音视频数据连接通道的网络状态;执行模块,用于当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
进一步地,本申请还提出一种计算机设备,所述计算机设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述计算机可读指令被所述处理器执行时实现以下步骤:
接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;通过所述音视频数据连接通道获取音视频数据并进行播放;监测所述音视频数据连接通道的网络状态;当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行以下步骤:
接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;通过所述音视频数据连接通道获取音视频数据并进行播放;监测所述音视频数据连接通道的网络 状态;当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
本申请所提出的数据传输方法、装置、计算机设备及计算机可读存储介质,能够接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;然后通过所述音视频数据连接通道获取音视频数据并进行播放;然后监测所述音视频数据连接通道的网络状态,当所述网络状态变差时,则根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。因此,能够根据网络状态的指标值动态选择适当的传输方式,从而解决了延时和卡顿的问题,提升了显示效果。
附图说明
图1是本申请一实施例的应用环境示意图;
图2是本申请数据传输方法一具体实施例的流程示意图;
图3是基于图2中步骤S204的一具体实施例的流程示意图;
图4是图2中步骤S204的一具体实施例的流程示意图;
图5是图2中步骤S206中的根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式的一具体实施例的流程示意图;
图6是图2中步骤S206中的根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式的另一具体实施例的流程示意图;
图7是本申请数据传输装置一实施例的程序模块示意图;
图8是本申请计算机设备一可选的硬件架构的示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要 求的保护范围之内。
图1是本申请一实施例的应用环境示意图。参阅图1所示,所述计算机设备1与投屏终端2连接,可以接收由投屏终端2发送的投屏显示请求,建立与所述投屏终端2之间的音视频数据连接通道,然后通过所述音视频数据连接通道获取音视频数据并进行播放;然后监测所述音视频数据连接通道的网络状态,当所述网络状态变差时,则根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。在本实施例中,所述投屏终端2可以是手机、平板、便携设备或者PC机等;所述计算机设备1可作为手机、平板、便携设备、PC机或者具有显示功能的电子设备等。
实施例一
图2是本申请数据传输方法一实施例的流程示意图。可以理解,本方法实施例中的流程图不用于对执行步骤的顺序进行限定。下面以计算机设备1为执行主体进行示例性描述。
如图2所示,所述数据传输方法可以包括步骤S200~S206其中:
步骤S200,接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道。
步骤S202,通过所述音视频数据连接通道获取音视频数据并进行播放。
具体地,当用户想要将投屏终端上的音视频数据投屏到所述计算机设备1上时,那么投屏终端首先需要与所述计算机设备1进行网络连接,然后用户通过投屏终端向所述计算机设备1发送投屏请求。所述计算机设备1则接收所述投屏请求,然后根据所述投屏请求建立音视频数据连接通道。在本实施例中,所述投屏终端需要实时投屏的视频数据投屏到所述计算机设备1,因此,所述计算机设备1可以通过所述音视频数据连接通道获取实时投屏的音视频数据。其中,实时投屏表示所述投屏终端会直接进行音视频拍摄,然后所述计算机设备1则可以通过所述音视频数据连接通道直接获取到所述投屏终端实时拍摄的音视频数据。
对于实时视频流媒体来说,人们期望音视频数据能够及时地从一端传输到另一端,少量的丢包对于观看影响不明显,但较大的延迟和卡顿则严重影响观看体验。TCP(Transmission Control Protocol,传输控制协议)的拥塞控制技术不太适用于这种快速而稳定的流媒体传输,并且重传机制对于实时流媒体来说既影响效率又没必要,因此,这种情况下一般采用基于UDP(User Datagram Protocol,用户数据报协议)的方式。
具体地,所述投屏终端在投屏之前需要与所述计算机设备1建立连接,因此,所述投屏终端能够建立传输网络,比如有线局域网,或者wifi、蓝牙或者其他移动通信网络,然 后所述计算机设备1加入到所述传输网络。所述投屏终端则会通过所述传输网络向所述计算机设备1发送基于UDP协议通信协议发送的数据链路建立请求,所述计算机设备1则接收所述数据链路建立请求从而建立音视频数据连接通道,并将所述音视频数据加载到播放器进行播放。
步骤S204,监测所述音视频数据连接通道的网络状态。
步骤S206,当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
如图3所示,在一示例性的实施例中,步骤S204可以包括步骤S300~S302。
步骤S300,对预设第一数量的采样点或者预设时间区段内的采样点进行监测。
步骤S302,当其中大于或等于预设第二数量的采样点的指标值偏离对应的指标值标准,则表示网络状态变差。
在本实施例中,对于网络状态的检测,是动态、实时的,但并非时刻都在执行切换。主要考虑到不断的切换策略,比较耗费所述计算机设备1的计算能力等资源,甚至极端情况下可能仅仅是线性统计中一个点远离预计,这种情况下执行切换对于资源损耗比较大。因此,需要对采样点进行筛选。例如,我们设置了统计1000个采样点或者5秒钟的采样点,若中间仅有几个采样点偏离,则不会触发传输方式的切换;只有在采样点满足预定的一定的条件,才会执行传输方式的切换。
在本实施例中,所述网络状态至少包括丢包率、延时、抖动和带宽中的至少一种指标值。
因此,如图4所示,在一示例行实施例中,步骤S204可以包括步骤S400~S404。
步骤S400,统计预设时间区段内接收到的数据包的序号和接收时间,从而得到所述时间区段的丢包率和延时。
步骤S402,根据所述时间区段中前n个数据包的接收时间建立数据包接收时间预测曲线,并根据所述数据包接收时间预测曲线预测第n+1个数据包接收时间,其中(1<n<N,n++),N为所述时间区段内所有的数据包个数。
步骤S404,根据第n+1个数据包的实际接收时间和预测接收时间来计算所述时间区段的抖动。
具体地,投屏终端将音视频数据传输到所述计算机设备1,一般都是通过将所述音视频数据划分为若干个数据包进行传输,每个数据包均包括序号。然后所述计算机设备1接收到投屏终端发送的所述音视频数据的数据包之后,根据每个数据包的序号将所有的数据包组合并恢复成原有的音视频数据。因此,所述计算机设备1在接收每个数据包时,可以 统计数据包的序号和接收时间,例如,通过建立一个接收状态反馈报告用于保存所述音视频数据的所有数据包的序号和接收时间。
因此,所述计算机设备1可以直接通过统计接收到的数据包的序号是否出现缺失以及缺失的序号数量,从而得到数据包的丢包率;以及根据数据包的接收时间是否超时以及超时多少,从而得到数据包的延时。
对于网络的抖动,则可以通过相邻数据包的接收时间进行计算。在本实施例中,所述计算机设备1根据所述时间区段中前n个数据包的接收时间建立数据包接收时间预测曲线,通过前几个采样点建立后续采样点的预测曲线,现有技术中已有较多成熟公式,这里不再赘述。然后所述计算机设备1根据所述数据包接收时间预测曲线预测第n+1个数据包接收时间,其中(1<n<N,n++),N为所述时间区段内所有的数据包个数;第n+1个数据包的实际接收时间和预测接收时间的差值,则表示网络状态的抖动值。
当然,在其他实施例中,所述计算机设备1也可以直接根据每个数据包的延时计算网络的抖动,比如,将相邻之间的数据包的延时差计算出来作为该数据包对应时间点的抖动值。
当所述计算机设备1计算出所述网络状态的各个指标的实际值后,则可以通过与预设的各个指标对应的标准值进行对比,当偏离超过预设的值,则认为所述网络状态变差时,因此,所述计算机设备1进一步根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。在本实施例中,所述计算机设备1预先设置了对于网络状态出现不同的指标值时,自动切换到不同的传输方式的传输策略。因此,在所述计算机设备1监测到网络状态变差时,则会根据指标值和传输策略执行对应的传输方式。
如图5所示,在一示例行实施例中,步骤S206中的根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括步骤S500~S502。
步骤S500,当抖动大于预设第一阈值时,则启用第一动态缓存用于缓存接收到的音视频数据的数据包。
步骤S502,当抖动大于预设第二阈值时,则启用第二动态缓存用于缓存接收到的音视频数据的数据包;其中,第二阈值大于第一阈值,第二动态缓存大于第一动态缓存。
具体地,当网络抖动大的时候,网络抖动会造成数据包乱序和延时,因此,所述计算机设备1在获取到抖动值后,则可以对应地启用动态缓存,用于存储接收到的数据包。在本实施例中,当网络不稳定时(抖动发生),所述计算机设备1增加动态缓存的长度,多缓存一些数据,以应对将来可能发生的抖动;当网络稳定下来时,减小动态缓存的长度,少缓存一些数据,降低视频端到端的延迟,提高实时性。因此动态缓存的运行过程是一个根 据抖动来动态调整动态缓存长度的过程。从而能够在保证尽量不卡的前提下降低端到端的延迟,即它能够在延迟和卡顿率之间取得较好的平衡。
如图6所示,在一示例行实施例中,步骤S206中的根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括步骤S600~S604。
步骤S600,当丢包率高且带宽充足时,通过前向纠错方式执行数据包传输。
步骤S602,当丢包率高且带宽不足且延时低时,通过丢包重传方式执行数据包传输。
步骤S604,当丢包率高且带宽不足且延时高时,通过丢包重传方式执行数据包传输,并降低传输码率和显示分辨率。
在本实施例中,所述计算机设备1在获取到丢包率之后,还会进一步获取当前网络的带宽值,例如通过带宽实时测速技术。当丢包率高且带宽充足时,所述计算机设备1则通过前向纠错方式执行数据包传输。其中,前向纠错要求发送方将要发送的数据加上一定的冗余纠错码一起发送,接收方则根据纠错码对接收到的数据进行差错检测,如发现差错,则由接收方进行纠错,虽然发送冗余占用更大的网络带宽,但是能够减少丢包率。
当丢包率高且带宽不足且延时低时,所述计算机设备1则通过丢包重传方式执行数据包传输。其中,丢包重传主要是根据数据包的序号来进行判断是否丢包,正常情况下序号是连续的;接收方如果发现数据丢失,则向发送方发出请求,请求发送端重发指定数据包。因此,也能够有效减少丢包率。
当然,如果所述计算机设备1获取到丢包率高且带宽不足且延时高时,那么,所述计算机设备1再选择通过丢包重传方式执行数据包传输的同时,还会降低传输码率,以及降低播放器显示画面的显示分辨率。从而能够有效减少数据传输量,保证显示画面的流程。
综上所述,本实施例所提出的数据传输方法能够接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;然后通过所述音视频数据连接通道获取音视频数据并进行播放;然后监测所述音视频数据连接通道的网络状态,当所述网络状态变差时,则根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。因此,能够根据网络状态的指标值动态选择适当的传输方式,从而解决了延时和卡顿的问题,提升了显示效果。
实施例二
图7示意性示出了根据本申请实施例二的数据传输装置的框图,该数据传输装置可以被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请实施例。本申请实施例所称的程序模块是指能够完成特 定功能的一系列计算机可读指令段,以下描述将具体介绍本实施例中各程序模块的功能。
如图7所示,该数据传输装置400可以包括建立模块410、播放模块420、监测模块430和执行模块440,其中:
建立模块410,用于接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道。
播放模块420,用于通过所述音视频数据连接通道获取音视频数据并进行播放。
监测模块430,用于监测所述音视频数据连接通道的网络状态。
执行模块440,用于当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
在示例性的实施例中,监测模块430,还用于:对预设第一数量的采样点或者预设时间区段内的采样点进行监测;当其中大于或等于预设第二数量的采样点的指标值偏离对应的指标值标准,则表示网络状态变差。
在示例性的实施例中,所述网络状态至少包括丢包率、延时、抖动和带宽中的至少一种指标值。
在示例性的实施例中,监测模块430,还用于:统计预设时间区段内接收到的数据包的序号和接收时间,从而得到所述时间区段的丢包率和延时。以及统计预设时间区段内接收到的数据包的序号和接收时间;根据所述时间区段中前n个数据包的接收时间建立数据包接收时间预测曲线,并根据所述数据包接收时间预测曲线预测第n+1个数据包接收时间,其中(1<n<N,n++),N为所述时间区段内所有的数据包个数;根据第n+1个数据包的实际接收时间和预测接收时间来计算所述时间区段的抖动。
在示例性的实施例中,执行模块440,还用于:当抖动大于预设第一阈值时,则启用第一动态缓存用于缓存接收到的音视频数据的数据包;当抖动大于预设第二阈值时,则启用第二动态缓存用于缓存接收到的音视频数据的数据包;其中,第二阈值大于第一阈值,第二动态缓存大于第一动态缓存。以及当丢包率高且带宽充足时,通过前向纠错方式执行数据包传输;当丢包率高且带宽不足且延时低时,通过丢包重传方式执行数据包传输;当丢包率高且带宽不足且延时高时,通过丢包重传方式执行数据包传输,并降低传输码率和显示分辨率。
实施例三
图8示意性示出了根据本申请实施例三的适于实现数据传输方法的计算机设备1的硬件架构示意图。本实施例中,计算机设备1是一种能够按照事先设定或者存储的指令,自 动进行数值计算和/或信息处理的设备。例如,可以是具有网关功能的机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图8所示,计算机设备1至少包括但不限于:可通过***总线相互通信链接存储器510、处理器520、网络接口530。其中:
存储器510至少包括一种类型的计算机可读存储介质,可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器510可以是计算机设备1的内部存储模块,例如该计算机设备1的硬盘或内存。在另一些实施例中,存储器510也可以是计算机设备1的外部存储设备,例如该计算机设备1上配备的插接式硬盘,智能存储卡(Smart Media Card,简称为SMC),安全数字(Secure Digital,简称为SD)卡,闪存卡(Flash Card)等。当然,存储器510还可以既包括计算机设备1的内部存储模块也包括其外部存储设备。本实施例中,存储器510通常用于存储安装于计算机设备1的操作***和各类应用软件,例如数据传输方法的程序代码等。此外,存储器510还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器520在一些实施例中可以是中央处理器(Central Processing Unit,简称为CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器520通常用于控制计算机设备1的总体操作,例如执行与计算机设备1进行数据交互或者通信相关的控制和处理等。本实施例中,处理器520用于运行存储器510中存储的程序代码或者处理数据。
网络接口530可包括无线网络接口或有线网络接口,该网络接口530通常用于在计算机设备1与其他计算机设备之间建立通信链接。例如,网络接口530用于通过网络将计算机设备1与外部终端相连,在计算机设备1与外部终端之间的建立数据传输通道和通信链接等。网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯***(Global System of Mobile communication,简称为GSM)、宽带码分多址(Wideband Code Division Multiple Access,简称为WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
需要指出的是,图8仅示出了具有部件510-530的计算机设备,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。
在本实施例中,存储于存储器510中的数据传输方法的程序代码还可以被分割为一个或者多个程序模块,并由一个或多个处理器(本实施例为处理器520)所执行,以完成本申请实施例。
实施例四
本实施例还提供一种计算机可读存储介质,计算机可读存储介质其上存储有计算机可读指令,计算机可读指令被处理器执行时实现以下步骤:
接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;通过所述音视频数据连接通道获取音视频数据并进行播放;监测所述音视频数据连接通道的网络状态;当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
本实施例中,计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,计算机可读存储介质可以是计算机设备的内部存储单元,例如该计算机设备的硬盘或内存。在另一些实施例中,计算机可读存储介质也可以是计算机设备的外部存储设备,例如该计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,简称为SMC),安全数字(Secure Digital,简称为SD)卡,闪存卡(Flash Card)等。当然,计算机可读存储介质还可以既包括计算机设备的内部存储单元也包括其外部存储设备。本实施例中,计算机可读存储介质通常用于存储安装于计算机设备的操作***和各类应用软件,例如实施例中服务平台的组件管理方法的程序代码等。此外,计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的各类数据。
显然,本领域的技术人员应该明白,上述的本申请实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请实施例不限制于任何特定的硬件和软件结合。
以上仅为本申请实施例的优选实施例,并非因此限制本申请实施例的专利范围,凡是利用本申请实施例说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请实施例的专利保护范围内。

Claims (20)

  1. 一种数据传输方法,所述方法包括:
    接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;
    通过所述音视频数据连接通道获取音视频数据并进行播放;
    监测所述音视频数据连接通道的网络状态;
    当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
  2. 如权利要求1所述的数据传输方法,所述监测所述音视频数据连接通道的网络状态包括:
    对预设第一数量的采样点或者预设时间区段内的采样点进行监测;
    当其中大于或等于预设第二数量的采样点的指标值偏离对应的指标值标准,则表示网络状态变差。
  3. 如权利要求1所述的数据传输方法,所述网络状态至少包括丢包率、延时、抖动和带宽中的至少一种指标值。
  4. 如权利要求3所述的数据传输方法,所述监测所述音视频数据连接通道的网络状态包括:
    统计预设时间区段内接收到的数据包的序号和接收时间,从而得到所述时间区段的丢包率和延时。
  5. 如权利要求3所述的数据传输方法,所述监测所述音视频数据连接通道的网络状态包括:
    统计预设时间区段内接收到的数据包的序号和接收时间;
    根据所述时间区段中前n个数据包的接收时间建立数据包接收时间预测曲线,并根据所述数据包接收时间预测曲线预测第n+1个数据包接收时间,其中(1<n<N,n++),N为所述时间区段内所有的数据包个数;
    根据第n+1个数据包的实际接收时间和预测接收时间来计算所述时间区段的抖动。
  6. 如权利要求3所述的数据传输方法,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:
    当抖动大于预设第一阈值时,则启用第一动态缓存用于缓存接收到的音视频数据的数据包;
    当抖动大于预设第二阈值时,则启用第二动态缓存用于缓存接收到的音视频数据的数据包;其中,第二阈值大于第一阈值,第二动态缓存大于第一动态缓存。
  7. 如权利要求3所述的数据传输方法,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:
    当丢包率高且带宽充足时,通过前向纠错方式执行数据包传输;
    当丢包率高且带宽不足且延时低时,通过丢包重传方式执行数据包传输;
    当丢包率高且带宽不足且延时高时,通过丢包重传方式执行数据包传输,并降低传输码率和显示分辨率。
  8. 一种数据传输装置,所述装置包括:
    建立模块,用于接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;
    播放模块,用于通过所述音视频数据连接通道获取音视频数据并进行播放;
    监测模块,用于监测所述音视频数据连接通道的网络状态;
    执行模块,用于当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
  9. 一种计算机设备,所述计算机设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述计算机可读指令被所述处理器执行时实现以下步骤:
    接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;
    通过所述音视频数据连接通道获取音视频数据并进行播放;
    监测所述音视频数据连接通道的网络状态;
    当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
  10. 如权利要求9所述的计算机设备,所述监测所述音视频数据连接通道的网络状态包括:
    对预设第一数量的采样点或者预设时间区段内的采样点进行监测;
    当其中大于或等于预设第二数量的采样点的指标值偏离对应的指标值标准,则表示网络状态变差;其中,所述网络状态至少包括丢包率、延时、抖动和带宽中的至少一种指标值。
  11. 如权利要求10所述的计算机设备,所述监测所述音视频数据连接通道的网络状态包括:
    统计预设时间区段内接收到的数据包的序号和接收时间,从而得到所述时间区段的丢包率和延时。
  12. 如权利要求10所述的计算机设备,所述监测所述音视频数据连接通道的网络状态包括:
    统计预设时间区段内接收到的数据包的序号和接收时间;
    根据所述时间区段中前n个数据包的接收时间建立数据包接收时间预测曲线,并根据所述数据包接收时间预测曲线预测第n+1个数据包接收时间,其中(1<n<N,n++),N为所述时间区段内所有的数据包个数;
    根据第n+1个数据包的实际接收时间和预测接收时间来计算所述时间区段的抖动。
  13. 如权利要求10所述的计算机设备,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:
    当抖动大于预设第一阈值时,则启用第一动态缓存用于缓存接收到的音视频数据的数据包;
    当抖动大于预设第二阈值时,则启用第二动态缓存用于缓存接收到的音视频数据的数据包;其中,第二阈值大于第一阈值,第二动态缓存大于第一动态缓存。
  14. 如权利要求10所述的计算机设备,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:
    当丢包率高且带宽充足时,通过前向纠错方式执行数据包传输;
    当丢包率高且带宽不足且延时低时,通过丢包重传方式执行数据包传输;
    当丢包率高且带宽不足且延时高时,通过丢包重传方式执行数据包传输,并降低传输码率和显示分辨率。
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行以下步骤:
    接收投屏终端的投屏请求,建立与所述投屏终端之间的音视频数据连接通道;
    通过所述音视频数据连接通道获取音视频数据并进行播放;
    监测所述音视频数据连接通道的网络状态;
    当所述网络状态变差时,根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式。
  16. 如权利要求15所述的计算机可读存储介质,所述监测所述音视频数据连接通道的网络状态包括:
    对预设第一数量的采样点或者预设时间区段内的采样点进行监测;
    当其中大于或等于预设第二数量的采样点的指标值偏离对应的指标值标准,则表示网络状态变差;其中,所述网络状态至少包括丢包率、延时、抖动和带宽中的至少一种指标 值。
  17. 如权利要求16所述的计算机可读存储介质,所述监测所述音视频数据连接通道的网络状态包括:
    统计预设时间区段内接收到的数据包的序号和接收时间,从而得到所述时间区段的丢包率和延时。
  18. 如权利要求16所述的计算机可读存储介质,所述监测所述音视频数据连接通道的网络状态包括:
    统计预设时间区段内接收到的数据包的序号和接收时间;
    根据所述时间区段中前n个数据包的接收时间建立数据包接收时间预测曲线,并根据所述数据包接收时间预测曲线预测第n+1个数据包接收时间,其中(1<n<N,n++),N为所述时间区段内所有的数据包个数;
    根据第n+1个数据包的实际接收时间和预测接收时间来计算所述时间区段的抖动。
  19. 如权利要求16所述的计算机可读存储介质,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:
    当抖动大于预设第一阈值时,则启用第一动态缓存用于缓存接收到的音视频数据的数据包;
    当抖动大于预设第二阈值时,则启用第二动态缓存用于缓存接收到的音视频数据的数据包;其中,第二阈值大于第一阈值,第二动态缓存大于第一动态缓存。
  20. 如权利要求16所述的计算机可读存储介质,所述根据所述网络状态的指标值从预设的传输策略中选择并执行对应的传输方式包括:
    当丢包率高且带宽充足时,通过前向纠错方式执行数据包传输;
    当丢包率高且带宽不足且延时低时,通过丢包重传方式执行数据包传输;
    当丢包率高且带宽不足且延时高时,通过丢包重传方式执行数据包传输,并降低传输码率和显示分辨率。
PCT/CN2020/141031 2020-05-06 2020-12-29 数据传输方法及装置 WO2021223452A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/923,227 US11778006B2 (en) 2020-05-06 2020-12-29 Data transmission method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010373539.7A CN111628847B (zh) 2020-05-06 2020-05-06 数据传输方法及装置
CN202010373539.7 2020-05-06

Publications (1)

Publication Number Publication Date
WO2021223452A1 true WO2021223452A1 (zh) 2021-11-11

Family

ID=72273048

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/141031 WO2021223452A1 (zh) 2020-05-06 2020-12-29 数据传输方法及装置

Country Status (3)

Country Link
US (1) US11778006B2 (zh)
CN (1) CN111628847B (zh)
WO (1) WO2021223452A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911833A (zh) * 2022-06-02 2022-08-16 青岛华正信息技术股份有限公司 工业互联网平台监测数据传输交换方法及***
CN116095780A (zh) * 2023-04-10 2023-05-09 深圳市通恒伟创科技有限公司 一种4G和wifi同步通信方法、***、设备及存储介质

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111628847B (zh) * 2020-05-06 2022-04-08 上海幻电信息科技有限公司 数据传输方法及装置
CN112261625A (zh) * 2020-10-09 2021-01-22 Oppo广东移动通信有限公司 比特率自适应的数据传输方法及装置、设备、存储介质
CN114442971A (zh) * 2020-10-30 2022-05-06 华为技术有限公司 无线投屏方法、移动设备及计算机可读存储介质
CN112533074B (zh) * 2020-12-01 2023-08-11 国家电网有限公司 数据传输方法及装置
CN112672203B (zh) * 2020-12-16 2023-05-23 努比亚技术有限公司 文件传输控制方法、移动终端及计算机可读存储介质
CN117441155A (zh) * 2021-07-07 2024-01-23 海信视像科技股份有限公司 显示设备以及投屏方法
CN115706958A (zh) * 2021-07-20 2023-02-17 华为技术有限公司 数据处理方法及电子设备
CN113810760B (zh) * 2021-08-17 2023-04-21 荣耀终端有限公司 控制投屏的方法、电子设备及计算机可读存储介质
CN113766169A (zh) * 2021-09-16 2021-12-07 江苏三步科技股份有限公司 一种弱网环境下的音视频数据传输***、优化设备及方法
CN113965466B (zh) * 2021-09-30 2022-11-25 广西中科曙光云计算有限公司 一种自适应网络带宽的数据传输***
CN114157902B (zh) * 2021-12-02 2024-03-22 瑞森网安(福建)信息科技有限公司 一种无线投屏方法、***及存储介质
CN114125515B (zh) * 2021-12-14 2022-06-10 荣耀终端有限公司 投屏方法、设备及存储介质
CN115086194B (zh) * 2022-05-20 2024-02-02 阿里巴巴(中国)有限公司 云应用的数据传输方法、计算设备及计算机存储介质
CN116055693B (zh) * 2022-07-21 2024-04-02 荣耀终端有限公司 投屏方法、电子设备、***及计算机可读存储介质
CN116578586B (zh) * 2023-05-06 2023-11-17 重庆翰海睿智大数据科技股份有限公司 一种基于大数据的动态数据查询***
CN116708134B (zh) * 2023-07-12 2024-05-14 韩山师范学院 基于流量控制的点对点网络传输***

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100321750A1 (en) * 2009-04-24 2010-12-23 National Semiconductor Corporation Method and system for providing resonant frequency change compensation in a drive signal for a mems scanner
CN106851408A (zh) * 2017-02-22 2017-06-13 微鲸科技有限公司 一种电视机投屏监测装置及方法
CN109922205A (zh) * 2018-11-29 2019-06-21 努比亚技术有限公司 投屏实现方法、移动终端及计算机可读存储介质
CN110740288A (zh) * 2018-07-20 2020-01-31 钉钉控股(开曼)有限公司 投屏网络的管理方法、接入方法及装置
CN111628847A (zh) * 2020-05-06 2020-09-04 上海幻电信息科技有限公司 数据传输方法及装置

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7643480B2 (en) * 2004-01-22 2010-01-05 Hain-Ching Liu Method and system for reliably and efficiently transporting data over a network
EP1628446B1 (en) * 2004-08-18 2007-11-14 Infineon Technologies AG Method for transmitting information through a communication link and respective transmitting device and communication system
US9635315B2 (en) * 2006-08-07 2017-04-25 Oovoo Llc Video conferencing over IP networks
US20140118222A1 (en) * 2012-10-30 2014-05-01 Cloudcar, Inc. Projection of content to external display devices
CN104954279B (zh) * 2014-03-28 2018-04-10 华为技术有限公司 一种传输控制方法、装置及***
US9867117B2 (en) * 2014-07-25 2018-01-09 Comcast Cable Communications, Llc Network admission control
CN107342848B (zh) * 2017-08-24 2020-05-01 杭州联吉技术有限公司 一种自适应码流传输方法、装置及设备
US10812857B2 (en) * 2018-09-28 2020-10-20 Apple Inc. Systems and methods for reducing latency of a video transmission system
CN109120970A (zh) * 2018-09-30 2019-01-01 珠海市君天电子科技有限公司 一种无线投屏方法、终端设备及存储介质
CN109525889A (zh) * 2018-11-23 2019-03-26 深圳市鹰硕技术有限公司 一种投屏方法、装置和***、智能终端和存储介质
CN109996097B (zh) * 2019-03-12 2022-01-04 广州虎牙信息科技有限公司 一种投屏方法、***及存储装置
US20200329387A1 (en) * 2019-04-13 2020-10-15 Qualcomm Incorporated Miracast Framework Enhancements For Direct Streaming Mode
US11722422B2 (en) * 2019-05-20 2023-08-08 Citrix Systems, Inc. Systems and methods for managing streams of packets via intermediary devices
CN110519632B (zh) * 2019-07-30 2021-08-20 华为技术有限公司 投屏方法及设备
US11570660B2 (en) * 2020-03-18 2023-01-31 Connectify, Inc. Management of data communication connections

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100321750A1 (en) * 2009-04-24 2010-12-23 National Semiconductor Corporation Method and system for providing resonant frequency change compensation in a drive signal for a mems scanner
CN106851408A (zh) * 2017-02-22 2017-06-13 微鲸科技有限公司 一种电视机投屏监测装置及方法
CN110740288A (zh) * 2018-07-20 2020-01-31 钉钉控股(开曼)有限公司 投屏网络的管理方法、接入方法及装置
CN109922205A (zh) * 2018-11-29 2019-06-21 努比亚技术有限公司 投屏实现方法、移动终端及计算机可读存储介质
CN111628847A (zh) * 2020-05-06 2020-09-04 上海幻电信息科技有限公司 数据传输方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911833A (zh) * 2022-06-02 2022-08-16 青岛华正信息技术股份有限公司 工业互联网平台监测数据传输交换方法及***
CN116095780A (zh) * 2023-04-10 2023-05-09 深圳市通恒伟创科技有限公司 一种4G和wifi同步通信方法、***、设备及存储介质

Also Published As

Publication number Publication date
CN111628847A (zh) 2020-09-04
US20230188578A1 (en) 2023-06-15
US11778006B2 (en) 2023-10-03
CN111628847B (zh) 2022-04-08

Similar Documents

Publication Publication Date Title
WO2021223452A1 (zh) 数据传输方法及装置
KR101137164B1 (ko) 단-대-단 측정에 기초한 네트워크 상으로의 데이터 스트림 유입 제어
CA2842098C (en) A system and method for transmission of data signals over a wireless network
JP6178523B2 (ja) 要求マネージャおよび接続マネージャの機能を実装するトランスポートアクセラレータ
EP2530870B1 (en) Systems and methods for measuring quality of experience for media streaming
KR101046105B1 (ko) 컴퓨터 프로그램 제조품, 리소스 요구 조정 방법 및 엔드 시스템
US9930097B2 (en) Transport accelerator systems and methods
US9680890B2 (en) Streaming media delivery composite
US20070226347A1 (en) Method and apparatus for dynamically changing the TCP behavior of a network connection
CN113783775A (zh) 数据传输的方法和装置
CN115037416A (zh) 数据前向纠错处理方法、装置、电子设备和存储介质
CN113747489A (zh) Udp通信质量评估方法、装置及电子设备
CN113316263A (zh) 数据传输方法、装置、设备和存储介质
US7366097B2 (en) Increasing the accuracy and efficiency of admission control for data streams
JP2004186793A (ja) ストリーミング配信装置、ストリーミング端末装置、ストリーミング配信システム、及びストリーミング配信方法
WO2022002003A1 (zh) 信息确定方法及设备
Cui et al. MM-ABR: an Enhanced ABR Algorithm with Multi-Metric Information for QUIC-based Video Streaming
JPH11341064A (ja) 通信装置及び方法及びシステム及び記憶媒体
JP6897769B2 (ja) データ送信装置、方法およびプログラム
Yu et al. Mustang: Improving QoE for Real-Time Video in Cellular Networks by Masking Jitter

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20934327

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20934327

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/05/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20934327

Country of ref document: EP

Kind code of ref document: A1