CN112261625A - Bit rate adaptive data transmission method and device, equipment and storage medium - Google Patents

Bit rate adaptive data transmission method and device, equipment and storage medium Download PDF

Info

Publication number
CN112261625A
CN112261625A CN202011075469.3A CN202011075469A CN112261625A CN 112261625 A CN112261625 A CN 112261625A CN 202011075469 A CN202011075469 A CN 202011075469A CN 112261625 A CN112261625 A CN 112261625A
Authority
CN
China
Prior art keywords
bit rate
packet loss
data transmission
link quality
adjusting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011075469.3A
Other languages
Chinese (zh)
Inventor
单博伦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011075469.3A priority Critical patent/CN112261625A/en
Publication of CN112261625A publication Critical patent/CN112261625A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0231Traffic management, e.g. flow control or congestion control based on communication conditions
    • H04W28/0236Traffic management, e.g. flow control or congestion control based on communication conditions radio quality, e.g. interference, losses or delay

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the application discloses a data transmission method with self-adaptive bit rate, which comprises the following steps: in the case that a first device establishes a WFD connection with a second device, detecting P2P link quality in the WFD connection; the first device is a source device for data transmission, and the second device is a destination device for data transmission; according to the P2P link quality, according to a specific adjusting strategy, adjusting the bit rate in the current WFD connection; transmitting target data from the first device to the second device according to the adjusted bit rate. The embodiment of the application also provides a data transmission device, equipment and a storage medium with self-adaptive bit rate.

Description

Bit rate adaptive data transmission method and device, equipment and storage medium
Technical Field
The present application relates to the field of electronic device technology, and relates to, but is not limited to, a bit rate adaptive data transmission method and apparatus, a device, and a storage medium.
Background
In the related art, after WFD (wireless Display) is connected, data is transmitted in a fixed bit rate manner, and a screen projection picture is at a fixed definition. However, no matter the network quality is good or bad, the problems of unstable transmission, missing pictures and the like caused by the adoption of a fixed bit rate when a video source is collected. For example, the current screen projection scheme adopts high definition to project, and once the network quality of a user fluctuates, the projected picture can be blocked, mosaics and the like.
Disclosure of Invention
The embodiment of the application provides a bit rate self-adaptive data transmission method, a bit rate self-adaptive data transmission device, bit rate self-adaptive data transmission equipment and a storage medium.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a method for data transmission with adaptive bit rate, where the method includes:
in the case that a first device establishes a WFD connection with a second device, detecting a P2P (Peer-to-Peer) link quality in the WFD connection; the first device is a source device for data transmission, and the second device is a destination device for data transmission;
according to the P2P link quality, according to a specific adjusting strategy, adjusting the bit rate in the current WFD connection;
transmitting target data from the first device to the second device according to the adjusted bit rate.
In a second aspect, an embodiment of the present application provides a bit rate adaptive data transmission apparatus, including:
the device comprises a detection module, a processing module and a processing module, wherein the detection module is used for detecting the link quality of P2P in the WFD connection under the condition that the first device establishes the WFD connection with the second device; the first device is a source device for data transmission, and the second device is a destination device for data transmission;
an adjusting module, configured to adjust a bit rate in the current WFD connection according to a specific adjustment policy according to the P2P link quality;
a transmission module, configured to transmit the target data from the first device to the second device according to the adjusted bit rate.
In a third aspect, an embodiment of the present application provides a bit rate adaptive data transmission device, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the steps in the bit rate adaptive data transmission method when executing the program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the above-mentioned bit rate adaptive data transmission method.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
in the embodiment of the present application, first, in a case that a WFD connection is established between a first device and a second device, a P2P link quality in the WFD connection is detected, then, according to the P2P link quality, a bit rate in the current WFD connection is adjusted according to a specific adjustment policy, and finally, target data is transmitted from the first device to the second device according to the adjusted bit rate. Therefore, the problems of screen splash, blockage, audio and video asynchronism and the like caused by various unexpected link quality fluctuations in wireless connection can be effectively solved by detecting the quality of the P2P link between two devices in real time and dynamically adjusting the bit rate of transmission data.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive efforts, wherein:
fig. 1 is a technical and protocol block diagram related to WFD provided by an embodiment of the present application;
fig. 2 is a block diagram of a WFD connection system according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a bit rate adaptive data transmission method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another bit rate adaptive data transmission method according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another bit rate adaptive data transmission method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another bit rate adaptive data transmission method according to an embodiment of the present application;
FIG. 7 is a WFD join logic flow diagram provided by an embodiment of the present application;
fig. 8 is a schematic flowchart of adaptively adjusting a bit rate according to an embodiment of the present application;
fig. 9 is a schematic structural diagram illustrating a bit rate adaptive data transmission apparatus according to an embodiment of the present application;
fig. 10 is a schematic hardware entity diagram of a bit rate adaptive data transmission apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
It should be noted that the terms "first \ second \ third" referred to in the embodiments of the present application are only used for distinguishing similar objects and do not represent a specific ordering for the objects, and it should be understood that "first \ second \ third" may be interchanged under specific ordering or sequence if allowed, so that the embodiments of the present application described herein can be implemented in other orders than illustrated or described herein.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which embodiments of the present application belong. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
WFD, also called wireless projection (Miracast), is a wireless projection technology introduced by the Wi-Fi Alliance (Wi-Fi Alliance) to establish and maintain a Wi-Fi based connection between multimedia devices and use this connection to advance the presentation and playback of video/audio at the target device. At present, the WFD technology is supported by an intelligent terminal, a Personal Computer (PC), a television and a display, and it is common to project a video source of the intelligent terminal/the PC to the television/the display for playing.
The WFD is established on the basis of Wi-Fi P2P connection and supports the following two connection modes: 1) Wi-Fi direct peering: the technology that a plurality of Wi-Fi devices can be connected with each other without a wireless router is supported, and one Wi-Fi device is needed to be used as an organizer to establish a network with a function similar to an Access Point (AP) so that other Wi-Fi devices can search and use Wi-Fi connection; 2) TDLS (Tunneled Direct Link Setup): two Wi-Fi devices are connected to the same AP, and a point-to-point channel can be directly established between the two Wi-Fi devices to realize data transmission.
Fig. 1 is a technical and protocol block diagram related to WFD provided by an embodiment of the present application. As shown in fig. 1, based on the Wi-Fi P2P network technology, RTSP (Real Time Streaming Protocol) is used as an audio and video stream control Protocol, and the technical processes of transmission, control, encryption, decryption, encoding, decoding, and the like of Streaming media are involved. The WFD has many technical layers and many related protocols, including Wi-Fi P2P technology, RTSP and RTP (Real-time Transport Protocol) technology, streaming media technology, and audio/video codec related technology. The Wi-Fi Protected Setup (Wi-Fi Protected Setup) is also an authentication project of a Wi-Fi alliance and is used for simplifying the work of installing a wireless local area network and configuring security performance of a user; TDLS is an 802.11 protocol that establishes a direct connection between two client devices connected to the same AP
Fig. 2 is a block diagram of a WFD connection system according to an embodiment of the present disclosure. As shown in fig. 2, the WFD connection system 200 includes an initiator device 201 and a sink device 202. In the screen projection process, the sending end device 201 serves as a source Wi-Fi device, the receiving end device 202 serves as a destination Wi-Fi device, and after the WFD connection is established, the sending end device 201 transmits multimedia content to the receiving end device 202 by means of Wi-Fi. The sender device 201 and the receiver device 202 may be portable terminals such as smart phones, notebook computers, tablets, etc., or electronic devices such as televisions, printers, cameras, etc.
In an exemplary embodiment of the present application, the transmitting side device 201 and the receiving side device 202 include WFD connection establishment modules having standards equal to or higher than IEEE (Institute of Electrical and Electronics Engineers) 802.11g (e.g., 802.11g or 802.11n) and correspond to Wi-Fi direct-authenticated devices.
The current screen projection scheme generally adopts high definition projection, and once the network quality of a user fluctuates, for example, in the scenes that network fluctuation easily occurs, such as equipment in Bluetooth work, equipment downloads files through Wi-Fi, equipment is in a crowded channel, the distance between the equipment and a television changes, and the like, a projection picture is blocked, mosaics and the like.
The embodiment of the application provides a data transmission method with self-adaptive bit rate, which is applied to equipment. The functions implemented by the method may be implemented by calling program code by a processor in a device, which may, of course, be stored in a computer storage medium, which, in turn, comprises at least a processor and a storage medium. The processor may be configured to perform the processing for the bit rate adaptive data transfer process, and the memory may be configured to store data required and data generated during the bit rate adaptive data transfer process. The device may also include a transceiver that may be used to receive and transmit data.
Fig. 3 is a schematic flowchart of a bit rate adaptive data transmission method according to an embodiment of the present application, where as shown in fig. 3, the method at least includes the following steps:
step S310, when the first device establishes a WFD connection with the second device, detects the link quality of P2P in the WFD connection.
Here, the first device and the second device are both devices authenticated by Wi-Fi direct, where the first device is a source device for data transmission, that is, a device capable of providing multimedia content transmission, such as a smart phone, a tablet, and the like; the second device is a destination device for data transmission, i.e. a device capable of receiving and presenting multimedia content, such as a display, a printer, a television, etc.
In the implementation process, the source device and the destination device start the WFD function at the same time, and establish a WFD basic line based on Wi-Fi P2P and TDLS technology. A TCP (Transmission Control Protocol) connection is established between the source device and the destination device, and a Control port is created to establish and maintain a session, and the port adopts an RTSP Protocol. And determining the optimal parameters to be used, including audio and video decoding rate, resolution, channel load and the like, through the RTSP protocol parameters, and after the parameter protocol is confirmed, sending a screen display picture of the source end device to the destination end device by the source end device at the set video code rate and resolution. For example, the things displayed on the screen of the mobile phone/notebook computer are synchronously displayed on the super-large screen projector, the large screen liquid crystal television or the display device, so that the user can enjoy the high-quality image display effect without connecting wires.
Here, the first device and the second device may directly establish a peer-to-peer channel to implement data transmission, and then detect the quality of the P2P link between the two Wi-Fi devices in real time, and in implementation, any link quality detection means that is conventional in the art may be used, which is not limited in this embodiment of the present application. For example, the first device constructs a detection message, where the detection message carries network quality detection parameters such as signal quality, packet loss or retransmission number, which are added by the two devices, respectively, and sends the detection message to the second device, and then detects the quality of the P2P link between the two Wi-Fi devices based on the detection message exchanged between the first device and the second device.
Step S320, according to the link quality of P2P, adjusting the bit rate in the current WFD connection according to a specific adjustment strategy.
Here, the P2P link quality is indicated as at least one of: packet loss rate, RSSI (Received Signal Strength Indication), and the number of currently retransmitted packets.
Here, the Bit rate is the number of bits transmitted Per Second, and is expressed in bps (Bit Per Second), and the higher the Bit rate is, the faster the data transmission speed is.
It is understood that the bit rate in audio refers to the amount of binary data per unit time after converting an analog sound signal into a digital sound signal, and is an index for indirectly measuring the audio quality. The bit rate principle in video is the same as that in sound, and refers to the amount of binary data per unit time after an analog signal is converted into a digital signal. For example, the most commonly used bit rate in music files is 128kbps, and MP3 files can be used with typically 8 to 320 kbps.
In some embodiments, the specific adjustment strategy may be to obtain P2P link data in real time, and then dynamically adjust the bit rate of data transmission according to whether the network quality is good or not according to the P2P link data. If the P2P link quality is good, then the bit rate is increased; if the P2P link quality deteriorates, the bit rate is reduced.
In some embodiments, the specific adjustment strategy may be to detect the network quality in real time, and continuously adjust the bit rate in a dichotomy manner to achieve the optimal bit rate configuration.
In some embodiments, the specific adjustment strategy may be to set different levels of link data, and establish a mapping relationship between link data of each level and a bit rate, so as to adjust the bit rate corresponding to the link data of the current level in real time according to the detected link data.
Step S330, transmitting the target data from the first device to the second device according to the adjusted bit rate.
Here, the object data may include Video content such as television program Video, VOD (Video On Demand), UCC (User Created content), music Video and other similar and/or appropriate types of Video, still image content such as pictures, drawings and other similar types of images, text content such as electronic books, letters, task files, web pages and other similar and/or appropriate types of text, music content such as music, music compositions, sound files, radio broadcasts and other similar and/or appropriate types of sounds and/or music, and applications such as widgets, games, utilities, executable files and other similar and/or appropriate applications.
In the embodiment of the present application, first, in a case that a WFD connection is established between a first device and a second device, a P2P link quality in the WFD connection is detected, then, according to the P2P link quality, a bit rate in the current WFD connection is adjusted according to a specific adjustment policy, and finally, target data is transmitted from the first device to the second device according to the adjusted bit rate. Therefore, the problems of screen splash, blockage, audio and video asynchronism and the like caused by various unexpected link quality fluctuations in wireless connection can be effectively solved by detecting the quality of the P2P link between two devices in real time and dynamically adjusting the bit rate of transmission data.
Fig. 4 is a schematic flow chart of another bit rate adaptive data transmission method provided in this embodiment of the present application, where the P2P link quality indicator is a packet loss rate, and as shown in fig. 4, the method at least includes the following steps:
step S410, when the first device establishes the WFD connection with the second device, detects the link quality of P2P in the WFD connection.
Step S420, obtaining a packet loss rate in the P2P link.
Here, P2P may use a 30-second data file as a block of data packets in data transmission, and the Loss Rate (Loss Tolerance or Packet Loss Rate) refers to the ratio of the number of lost data packets in the test to the number of transmitted data packets.
The packet loss rate in the P2P link may be a ratio of a packet sent by the source device to a packet not received by the destination device in a unit time, and it is obvious that a smaller packet loss rate value is better, for example, a card may be sometimes felt in a network game, which is a result of a relatively higher packet loss rate.
And step S430, adjusting the bit rate according to the packet loss rate and the position relation of the specific interval on the axis.
Here, the specific interval may be used as a criterion for determining that the network quality is good, and is generally an empirical value, for example, when the packet loss rate is in a range of 0.5% to 2%, it indicates that the network quality is stable.
In some embodiments, when the packet loss rate in the P2P link is less than the minimum value of the specific interval, the bit rate is increased, the data throughput is improved, and the quality of the projected picture is improved, thereby improving the user experience;
in some embodiments, the bit rate is maintained in case the packet loss rate in the P2P link is in the certain interval;
in some embodiments, in the case that the packet loss rate in the P2P link is greater than the maximum value of the specific interval, the bit rate is reduced to reduce the packet loss problem occurring when the P2P link quality is degraded, thereby improving the stability of picture transmission.
Step S440, transmitting the target data from the first device to the second device according to the adjusted bit rate.
In this embodiment of the present application, first, when a first device establishes a WFD connection with a second device, a P2P link quality in the WFD connection is detected, then, a packet loss rate in a P2P link is obtained, then, the bit rate is adjusted according to the packet loss rate and a position relationship of a specific interval on a numerical axis, and finally, target data is transmitted from the first device to the second device according to the adjusted bit rate. Therefore, by judging the numerical relation between the packet loss rate in the P2P link and a specific interval indicating good network quality and dynamically adjusting the bit rate of transmission data, the problems of screen splash, blockage, audio and video asynchrony and the like caused by various unexpected link quality fluctuation in wireless connection can be effectively solved.
Fig. 5 is a schematic flow chart of another bit rate adaptive data transmission method provided in this embodiment of the present application, where the P2P link quality indicator is a packet loss rate, and as shown in fig. 5, the method at least includes the following steps:
step S510, when the first device establishes a WFD connection with the second device, detects the link quality of P2P in the WFD connection.
And step S520, under the condition that the link quality of the P2P meets a preset condition, adjusting the bit rate in a dichotomy mode.
Here, the case where the P2P link quality satisfies the preset condition may be an extreme case such as an excellent network quality or an extremely poor network quality.
Binary search is a very efficient search method, and the main principle is that half of the values can be discarded to narrow the range in each search. The time complexity is O (log2n) and is typically used for optimization of common search methods. The application of the dichotomy method generally meets the following points: the array has huge data quantity, and the time complexity of processing needs to be optimized; the array is already sorted; it is generally required to find a certain value or a position.
It should be noted that, generally, in different application scenarios, the bit rate of data transmission may be set to a plurality of different values within a [10bps, 100000bps ] interval, and since the value range is wide, the bit rate may be continuously adjusted according to the idea of bisection method to achieve the optimal bit rate configuration.
For example, if the current network quality is excellent, the transmission picture quality can be improved by raising the bit rate. As for how large the current bit rate is adjusted to, the intermediate value between the current bit rate and the maximum bit rate can be found first, the intermediate value is taken as the bit rate of the next data transmission, and then the network quality is detected, so that the value range is gradually shortened until the optimal bit rate configuration is found.
In some embodiments, in the event that the packet loss rate is greater than a first threshold, determining a first intermediate value of the bit rate and a first particular bit rate; and taking the first intermediate value as the bit rate of the next data transmission.
Here, the first threshold value represents that the network quality is very poor, and a case of serious packet loss occurs, for example, 10% or even higher than the maximum value 2% in the normal range. The setting is performed according to different application scenarios in implementation, which is not limited in the embodiment of the present application.
In some embodiments, in the event that the packet loss rate is less than a second threshold, determining a second intermediate value of the bit rate and a second particular bit rate; and taking the second intermediate value as the bit rate of the next data transmission.
Here, the second threshold value is smaller than the first threshold value, which indicates that the network quality is excellent, and the packet loss rate is smaller than 0.5%, even if no packet loss occurs during the detection period. The setting is performed according to different application scenarios in implementation, which is not limited in the embodiment of the present application.
Here, the second specific bit rate is larger than the first specific bit rate, and the first specific bit rate and the second specific bit rate are respectively a minimum value and a maximum value within a bit rate value range.
Step S530, transmitting the target data from the first device to the second device according to the adjusted bit rate.
In the embodiment of the present application, first, when a WFD connection is established between a first device and a second device, a P2P link quality in the WFD connection is detected, then, when the P2P link quality meets a preset condition, the bit rate is adjusted in a binary manner, and finally, target data is transmitted from the first device to the second device according to the adjusted bit rate. Therefore, under the condition that the network quality is possibly extremely high and extremely low, the bit rate can be continuously adjusted according to the dichotomy idea to achieve the optimal bit rate configuration, the stability of picture transmission can be effectively improved, the problems of screen splash, blockage and the like of a projected picture are avoided, and meanwhile, when the quality of a p2p link is good, the quality of the projected picture of a user is improved, and further the user experience is improved.
Fig. 6 is a schematic flow chart of another bit rate adaptive data transmission method provided in the embodiment of the present application, where P2P indicates link quality as a packet loss rate, and as shown in fig. 6, the method at least includes the following steps:
step S610, when the first device establishes the WFD connection with the second device, detecting the link quality of P2P in the WFD connection.
Step S620, setting a mapping relationship between packet loss rates and bit rates of different level intervals.
Here, a step adjustment of the bit rate may be set, the packet loss rate is divided into different levels, and a mapping relationship between the packet loss rate and the bit rate in different level intervals is established.
For example, the packet loss rate is set to be 2% to 3% as a first level, 5% as a second level, and 12% as a third level (i.e., the packet loss rate is 1%, 3%, and 10% higher than 2%), respectively, and bit rate reduction is performed to different degrees, that is, a bit rate is set for each level.
In the implementation process, a greedy algorithm (also called a greedy method) can be adopted to determine the optimal bit rate corresponding to the packet loss rate in each level interval one by one. The greedy algorithm is that when solving a problem, the choice which is the best in the current view is always made. That is, rather than being considered from a global optimum, the algorithm results in a locally optimal solution in some sense.
Step S630, determining a level interval where the packet loss rate in the P2P link is located.
Here, the packet loss rate in the P2P link is first obtained, and then it is determined to which class interval the packet loss rate belongs.
Step S640 determines a target bit rate corresponding to the level interval from the mapping relationship.
Here, the corresponding target bit rate is determined from the mapping relationship according to the level interval where the packet loss rate in the current P2P link is located.
Step S650, adjusting the bit rate to the target bit rate.
Step S660, transmitting target data from the first device to the second device according to the target bit rate.
In this embodiment of the present application, first, when a WFD connection is established between a first device and a second device, the quality of a P2P link in the WFD connection is detected, then, a mapping relationship between packet loss rates and bit rates of different level intervals is set, a level interval in which the packet loss rate in the P2P link is located is determined, a target bit rate corresponding to the level interval is determined from the mapping relationship, the bit rate is adjusted to the target bit rate, and finally, target data is transmitted from the first device to the second device according to the target bit rate. Therefore, the packet loss rate is divided into different levels by setting the step adjustment of the bit rate, so that the corresponding bit rate is configured in real time according to the link quality of P2P, the stability of picture transmission can be effectively improved, and the problems of screen splash, blockage and the like of a projected picture are avoided.
The foregoing bit rate adaptive data transmission method is described below with reference to a specific embodiment, but it should be noted that the specific embodiment is only for better describing the present application and is not to be construed as a limitation of the present application.
The problems of screen splash, blockage, audio and video asynchronism and the like caused by various unexpected link quality fluctuation in wireless connection can be effectively solved by adjusting the bit rate. Therefore, in the embodiment of the application, by acquiring P2P link data, the probability change of retransmission and packet loss in the current network is determined, and the bit rate of the acquired video is dynamically reduced/increased.
Fig. 7 is a flowchart of WFD connection logic provided in an embodiment of the present application, and as shown in fig. 7, the flowchart includes the following steps:
step S701, a WFD connection is established between the two devices.
Here, both devices are Wi-Fi direct authenticated devices and may establish a WFD connection.
Step S702 detects the current P2P link quality.
Here, the quality of the current network, such as packet loss rate, signal quality, and the number of currently retransmitted packets, is detected by acquiring P2P link data in the network.
Step S703 determines whether the link quality is good.
Here, if the link quality is good, step S704 is performed; if the link quality is poor, step S705 is performed.
Step S704, increasing the bit rate
Step S705, the bit rate is reduced.
Step S702 is continuously executed after the above-described step S704 or S705.
For the above steps S703 to S705, one possible implementation is: whether the bit rate needs to be adjusted currently is defined by configuring an interval value of the packet loss rate. Fig. 8 is a schematic diagram of a process of adaptively adjusting a bit rate according to an embodiment of the present application, and as shown in fig. 8, the process includes the following steps:
step S801, calculates the packet loss rate of the P2P link.
Step S802, judging whether the packet loss rate meets a preset interval.
If the packet loss rate is within the preset interval, executing step S803; if the packet loss rate is smaller than the minimum value of the preset interval, executing step S804; if the packet loss rate is greater than the maximum value of the preset interval, step S805 is performed.
In implementation, if the packet loss rate is in the range of 0.5% to 2%, it can be generally used as a good judgment criterion in network quality, and is temporarily used as a judgment applied in a WFD screen projection scenario.
Step S803, the current bit rate is maintained.
Step S804, the current bit rate is increased.
Here, when the P2P link quality is good, the user experience is improved by increasing the bit rate to improve the user projection picture quality.
In step S805, the current bit rate is reduced.
Here, reducing the bit rate can reduce the data throughput, reduce the packet loss problem occurring when the P2P link quality is degraded, and further improve the stability of picture transmission. The problems of screen splash, blockage and the like of the projected picture are avoided.
In practical applications, the network quality may be very high or very low at some time, so that the bit rate does not need to be conservative when adjusting the bit rate, and the bit rate can be continuously adjusted in a dichotomy manner to achieve the optimal bit rate configuration.
The greedy algorithm can also be used to set the step adjustment of the bit rate, and the packet loss rate is divided into different levels, for example, if the packet loss rate is 1%, 3%, or 10% higher than 2%, the bit rate is reduced to different degrees, and if the packet loss rate is 0.5% higher than 0.1%, 0.3%, or 0.5%, the bit rate is increased to different degrees.
In the embodiment of the application, after the WFD connection is established between the two devices, the probability change of retransmission and packet loss in the current network is determined according to the acquired P2P link data, and the bit rate of the acquired video is dynamically reduced/increased. Through the means, the data throughput is reduced, and the stability of picture transmission is improved. By adaptively adjusting the bit rate, the problems of screen splash, blockage, audio and video asynchronism and the like caused by various unexpected link quality fluctuation in wireless connection are effectively solved.
Based on the foregoing embodiments, an embodiment of the present application further provides a bit rate adaptive data transmission apparatus, where the apparatus includes modules and units included in the modules, and the apparatus can be implemented by a processor in a device; of course, the implementation can also be realized through a specific logic circuit; in the implementation process, the Processor may be a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 9 is a schematic structural diagram of a bit rate adaptive data transmission apparatus according to an embodiment of the present application, and as shown in fig. 9, the apparatus 900 includes a detection module 910, an adjustment module 920, and a transmission module 930, where:
the detecting module 910 is configured to detect, in a case that a WFD connection is established between a first device and a second device, a P2P link quality in the WFD connection; the first device is a source device for data transmission, and the second device is a destination device for data transmission;
the adjusting module 920 is configured to adjust a bit rate in the current WFD connection according to a specific adjusting policy according to the P2P link quality;
the transmission module 930 is configured to transmit the target data from the first device to the second device according to the adjusted bit rate.
In some possible embodiments, the P2P link quality is indicated as at least one of: packet loss rate, received signal strength indicator RSSI, and number of currently retransmitted data packets.
In some possible embodiments, the P2P link quality indicator is a packet loss rate, and the adjusting module 920 includes an obtaining sub-module and a first adjusting sub-module, where: the obtaining submodule is configured to obtain a packet loss rate in the P2P link; and the first adjusting submodule adjusts the bit rate according to the packet loss rate and the position relation of the specific interval on the axis.
In some possible embodiments, the first adjusting submodule includes a first adjusting unit, a second adjusting unit, and a third adjusting unit, wherein: the first adjusting unit is configured to increase the bit rate when the packet loss rate is smaller than a minimum value of a specific interval; the second adjusting unit is configured to maintain the bit rate when the packet loss rate is in the specific interval; the third adjusting unit is configured to reduce the bit rate when the packet loss rate is greater than the maximum value of the specific interval.
In some possible embodiments, the adjusting module is further configured to adjust the bit rate in a binary manner if the P2P link quality satisfies a preset condition.
In some possible embodiments, the P2P link quality indicator is a packet loss rate, and the adjusting module further includes a first determining submodule and a second determining submodule, where: the first determining submodule is used for determining a first intermediate value of the bit rate and a first specific bit rate under the condition that the packet loss rate is greater than a first threshold value; the second determining submodule is used for taking the first intermediate value as the bit rate of the next data transmission; or the first determining submodule is used for determining a second intermediate value of the bit rate and a second specific bit rate under the condition that the packet loss rate is smaller than a second threshold value; wherein the second threshold is less than the first threshold; the second particular bit rate is greater than the first particular bit rate; the second determining submodule is configured to use the second intermediate value as a bit rate of a next data transmission.
In some possible embodiments, the P2P link quality indicator is a packet loss rate, and the apparatus 900 further includes a setting module, configured to set a mapping relationship between packet loss rates and bit rates of different class intervals.
In some possible embodiments, the adjusting module further includes a third determining sub-module, a fourth determining sub-module, and a second adjusting sub-module, wherein: the third determining submodule is configured to determine a level interval where a packet loss rate in the P2P link is located; the fourth determining submodule is configured to determine, from the mapping relationship, a target bit rate corresponding to the level interval; the second adjusting submodule is configured to adjust the bit rate to the target bit rate.
Here, it should be noted that: the above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the bit rate adaptive data transmission method is implemented in the form of a software functional module and is sold or used as a standalone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a device to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Correspondingly, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps in the bit rate adaptive data transmission method according to any of the foregoing embodiments.
Correspondingly, in an embodiment of the present application, a chip is further provided, where the chip includes a programmable logic circuit and/or program instructions, and when the chip runs, the chip is configured to implement the steps in the bit rate adaptive data transmission method in any of the foregoing embodiments.
Correspondingly, in an embodiment of the present application, there is also provided a computer program product, which is configured to implement the steps in the bit rate adaptive data transmission method according to any one of the foregoing embodiments when the computer program product is executed by a processor of a device.
Based on the same technical concept, embodiments of the present application provide a bit rate adaptive data transmission apparatus, which is used to implement the bit rate adaptive data transmission method described in the foregoing method embodiments. The device is understood to be a source device for data transmission and may be any form of information and communication device such as a mobile communication device supporting a communication protocol for a communication system, a smart phone, a portable multimedia player, a digital broadcast receiver, a music player such as a personal digital assistant audio player, or a portable game player. The devices provided by embodiments of the present application may be applied to medium to large size devices such as televisions, large displays, digital signage, media kiosks, personal computers, laptop computers, printers, multi-function office machines, and the like.
Fig. 10 is a hardware entity diagram of an apparatus provided in the embodiment of the present application, as shown in fig. 10, the apparatus 1000 includes a memory 1010 and a processor 1020, the memory 1010 stores a computer program that can be executed on the processor 1020, and the processor 1020 executes the computer program to implement the steps in the bit rate adaptive data transmission method according to any embodiment of the present application.
The Memory 1010 is configured to store instructions and applications executable by the processor 1020, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 1020 and modules in the device, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
The processor 1020, when executing the program, performs the steps of the bit rate adaptive data transmission method of any of the above. The processor 1020 generally controls the overall operation of the device 1000.
The Processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic device implementing the above-mentioned processor function may be other electronic devices, and the embodiments of the present application are not particularly limited.
The computer storage medium/Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM), and the like; or may be a variety of devices including one or any combination of the above memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing an automatic test line of a device to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method of bit rate adaptive data transmission, the method comprising:
under the condition that a first device establishes a wireless display (WFD) connection with a second device, detecting the link quality of a point-to-point connection P2P in the WFD connection; the first device is a source device for data transmission, and the second device is a destination device for data transmission;
according to the P2P link quality, according to a specific adjusting strategy, adjusting the bit rate in the current WFD connection;
transmitting target data from the first device to the second device according to the adjusted bit rate.
2. The method of claim 1, wherein the P2P link quality is indicated as at least one of: packet loss rate, received signal strength indicator RSSI, and number of currently retransmitted data packets.
3. The method of claim 1, wherein the P2P link quality indicator is packet loss rate, and wherein adjusting the bit rate in the current WFD connection according to a specific adjustment strategy based on the P2P link quality comprises:
acquiring the packet loss rate in the P2P link;
and adjusting the bit rate according to the packet loss rate and the position relation of the specific interval on the axis.
4. The method of claim 3, wherein the adjusting the bit rate according to the packet loss rate and a position relationship of a specific interval on a number axis comprises:
increasing the bit rate under the condition that the packet loss rate is smaller than the minimum value of a specific interval;
maintaining the bit rate when the packet loss rate is in the specific interval;
and reducing the bit rate under the condition that the packet loss rate is greater than the maximum value of the specific interval.
5. The method of any of claims 1 to 4, wherein said adjusting the bit rate in the current WFD connection according to a specific adjustment strategy based on the P2P link quality comprises:
and in the case that the P2P link quality meets a preset condition, adjusting the bit rate in a dichotomy mode.
6. The method of claim 5, wherein the P2P link quality indicator is packet loss rate, and wherein the adjusting the bit rate in a bisection manner if the P2P link quality satisfies a preset condition comprises:
determining a first intermediate value of the bit rate and a first specific bit rate if the packet loss rate is greater than a first threshold;
taking the first intermediate value as the bit rate of the next data transmission; or
Determining a second intermediate value of the bit rate and a second specific bit rate under the condition that the packet loss rate is smaller than a second threshold value; wherein the second threshold is less than the first threshold; the second particular bit rate is greater than the first particular bit rate;
and taking the second intermediate value as the bit rate of the next data transmission.
7. The method according to any of claims 1 to 4, wherein the P2P link quality indicator is packet loss ratio, the method further comprising:
and setting a mapping relation between the packet loss rate and the bit rate of the different grade intervals.
8. The method of claim 7, wherein said adjusting the bit rate in the current WFD connection according to a specific adjustment strategy based on the P2P link quality comprises:
determining a level interval where the packet loss rate in the P2P link is located;
determining a target bit rate corresponding to the grade interval from the mapping relation;
adjusting the bit rate to the target bit rate.
9. A bit rate adaptive data transmission apparatus, comprising a detection module, an adjustment module, and a transmission module, wherein:
the detection module is configured to detect a P2P link quality in a WFD connection when the first device establishes the WFD connection with a second device; the first device is a source device for data transmission, and the second device is a destination device for data transmission;
the adjusting module is configured to adjust a bit rate in the current WFD connection according to a specific adjusting policy according to the P2P link quality;
and the transmission module is used for transmitting the target data from the first equipment to the second equipment according to the adjusted bit rate.
10. A bit rate adaptive data transmission device comprising a memory and a processor, the memory storing a computer program operable on the processor, wherein the processor when executing the program performs the steps of the method of any one of claims 1 to 8.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202011075469.3A 2020-10-09 2020-10-09 Bit rate adaptive data transmission method and device, equipment and storage medium Pending CN112261625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011075469.3A CN112261625A (en) 2020-10-09 2020-10-09 Bit rate adaptive data transmission method and device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011075469.3A CN112261625A (en) 2020-10-09 2020-10-09 Bit rate adaptive data transmission method and device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112261625A true CN112261625A (en) 2021-01-22

Family

ID=74241878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011075469.3A Pending CN112261625A (en) 2020-10-09 2020-10-09 Bit rate adaptive data transmission method and device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112261625A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788646A (en) * 2021-03-16 2021-05-11 北京字节跳动网络技术有限公司 Network quality monitoring method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015188678A1 (en) * 2014-06-13 2015-12-17 珠海全志科技股份有限公司 Transmission control method and system for video stream of mobile device
CN111263217A (en) * 2020-02-18 2020-06-09 深圳市炬力北方微电子有限公司 Wireless screen projection method, wireless screen projection system and computer readable storage medium thereof
CN111628847A (en) * 2020-05-06 2020-09-04 上海幻电信息科技有限公司 Data transmission method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015188678A1 (en) * 2014-06-13 2015-12-17 珠海全志科技股份有限公司 Transmission control method and system for video stream of mobile device
CN111263217A (en) * 2020-02-18 2020-06-09 深圳市炬力北方微电子有限公司 Wireless screen projection method, wireless screen projection system and computer readable storage medium thereof
CN111628847A (en) * 2020-05-06 2020-09-04 上海幻电信息科技有限公司 Data transmission method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788646A (en) * 2021-03-16 2021-05-11 北京字节跳动网络技术有限公司 Network quality monitoring method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9979771B2 (en) Adaptive variable fidelity media distribution system and method
US9986579B2 (en) Split miracast transmission over multiple frequency bands
EP3007455B1 (en) Information processing device and information processing method
US10887630B2 (en) Device supporting multipath transport control protocol and method by which device receives video data through streaming
US20100262712A1 (en) Channel adaptive video transmission method, apparatus using the same, and system providing the same
US9998915B2 (en) Wireless communication device
KR20140111859A (en) Method and device for sharing content
CN105681881A (en) Multimedia data transmission method based on mobile terminal, and mobile terminal
US20110105028A1 (en) Mobile terminal and communication method for determining a communication protocol
JP2002064818A (en) Data transmission system, apparatus and method for transmitting data, apparatus and method for processing data as well as recording medium
US8082507B2 (en) Scalable user interface
CN108881931B (en) Data buffering method and network equipment
WO2011125496A1 (en) Communications device, communications method, and communications program
US20110216246A1 (en) Transmission device, data transmitting method, and communication system
US20160134837A1 (en) Methods, devices, and systems for controlling audio and video transmission
WO2015085873A1 (en) Video code stream obtaining method and apparatus
JPWO2014207899A1 (en) Communication apparatus and communication method
CN112261625A (en) Bit rate adaptive data transmission method and device, equipment and storage medium
US20120002587A1 (en) Communication processor and communication processing method
US10187671B2 (en) Apparatus and method for transmitting and receiving content
US9654533B2 (en) Method of adaptively delivering media based on reception status information from media client and apparatus using the same
US10728911B2 (en) Wireless communication device
JP2007329814A (en) Video reproduction terminal, video distribution apparatus, video distribution system and video distribution control program
US20240236409A9 (en) Electronic apparatus, server apparatus and control method thereof
WO2021120182A1 (en) Data transmission method, apparatus and communication device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210122

RJ01 Rejection of invention patent application after publication