CN113840269A - Multimedia data transmission method and device, electronic equipment and storage medium - Google Patents

Multimedia data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113840269A
CN113840269A CN202110903936.5A CN202110903936A CN113840269A CN 113840269 A CN113840269 A CN 113840269A CN 202110903936 A CN202110903936 A CN 202110903936A CN 113840269 A CN113840269 A CN 113840269A
Authority
CN
China
Prior art keywords
data
multimedia
transmission
target
bluetooth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110903936.5A
Other languages
Chinese (zh)
Other versions
CN113840269B (en
Inventor
朱枫
陈森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202110903936.5A priority Critical patent/CN113840269B/en
Publication of CN113840269A publication Critical patent/CN113840269A/en
Application granted granted Critical
Publication of CN113840269B publication Critical patent/CN113840269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • 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
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0473Wireless resource allocation based on the type of the allocated resource the resource being transmission power
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/53Allocation or scheduling criteria for wireless resources based on regulatory allocation policies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

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

Abstract

The embodiment of the invention discloses a multimedia data transmission method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a data transmission request, wherein the data transmission request indicates a target multimedia and a receiving device for receiving the target multimedia; establishing a Bluetooth connection with the receiving device; responding to multimedia data sending operation triggered by the target multimedia, and monitoring data to be transmitted corresponding to the target multimedia currently cached in a Bluetooth transmission queue; determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue; and transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy, wherein the scheme can improve the transmission efficiency of multimedia data.

Description

Multimedia data transmission method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a multimedia data transmission method and apparatus, an electronic device, and a storage medium.
Background
With the continuous updating and development of the bluetooth technology, the integrated bluetooth function of the smart television becomes more and more extensive, and when a user wants to use the bluetooth device on the television, for example, to play music of the television through a bluetooth speaker, the user first needs to establish a binding connection between the bluetooth device and the television, and establish a wireless link for transmitting audio streams between the two parties.
For bluetooth devices that use audio coding (SBC), only a fixed transmission code rate is used. When the transmission code rate is high, the interference of wifi or other wireless signals is easily caused, and the problem of blocking such as connection interruption or sound interruption is caused.
Disclosure of Invention
The embodiment of the application provides a multimedia data transmission method, a multimedia data transmission device, electronic equipment and a storage medium, which can solve the problem of jamming caused by high transmission code rate and further improve the transmission efficiency of multimedia data.
The multimedia data transmission method provided by the embodiment of the application is applied to sending equipment and comprises the following steps:
acquiring a data transmission request, wherein the data transmission request indicates a target multimedia and a receiving device for receiving the target multimedia;
establishing a Bluetooth connection with the receiving device;
responding to multimedia data sending operation triggered by the target multimedia, and monitoring data to be transmitted corresponding to the target multimedia currently cached in a Bluetooth transmission queue;
determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue;
and transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy.
Correspondingly, an embodiment of the present application further provides a multimedia data transmission apparatus, which is applied to a sending device, and includes:
an obtaining module, configured to obtain a data transmission request, where the data transmission request indicates a target multimedia and a receiving device that receives the target multimedia;
the establishing module is used for establishing Bluetooth connection with the receiving equipment;
the monitoring module is used for responding to multimedia data sending operation triggered by the target multimedia and monitoring data to be transmitted corresponding to the target multimedia currently cached in a Bluetooth transmission queue;
the determining module is used for determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue;
and the transmission module is used for transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy.
Correspondingly, the embodiment of the application also provides an electronic device, which comprises a memory and a processor; the memory stores a computer program, and the processor is used for operating the computer program in the memory to execute any multimedia data transmission method provided by the embodiment of the application.
Correspondingly, the embodiment of the present application further provides a storage medium, where the storage medium is used to store a computer program, and the computer program is loaded by a processor to execute any one of the multimedia data transmission methods provided in the embodiment of the present application.
In the embodiment of the application, after a data transmission request is obtained, the data transmission request indicates a target multimedia and a receiving device for receiving the target multimedia, a bluetooth connection with the receiving device is established, then, in response to a multimedia data sending operation triggered by the target multimedia, to-be-transmitted data corresponding to the target multimedia currently cached in a bluetooth transmission queue is monitored, then, a multimedia transmission strategy is determined according to a data proportion of the to-be-transmitted data in the multimedia transmission queue, and finally, the target multimedia is transmitted to the receiving device based on the multimedia transmission strategy. The interference of wifi or other wireless signals is avoided, and the transmission efficiency of the multimedia data is improved.
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, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a schematic view of a multimedia data transmission method according to an embodiment of the present invention;
fig. 1b is a flowchart illustrating a multimedia data transmission method according to an embodiment of the present invention;
fig. 1c is another schematic flow chart of a multimedia data transmission method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a multimedia data transmission apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present application, and not all of the embodiments. 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.
The application provides a multimedia data transmission method, a multimedia data transmission device, electronic equipment and a storage medium.
The multimedia data transmission device may be specifically integrated in a terminal, and the terminal may be, but is not limited to, a smart television, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. .
For example, referring to fig. 1a, the present application provides a multimedia data transmission system, which includes a sending device 10 and a receiving device 20, when a user needs to transmit multimedia data of the sending device 10 to the receiving device 20 through bluetooth, the sending device 10 obtains a data transmission request, where the data transmission request indicates a target multimedia and the receiving device 20 receiving the target multimedia, and the data transmission request can be triggered by the user through a control displayed by the sending device 10, then, the sending device 10 establishes a bluetooth connection with the receiving device 20, the sending device 10 monitors data to be transmitted corresponding to the target multimedia currently buffered in a bluetooth transmission queue in response to a multimedia data transmission operation triggered by the user for the target multimedia, and then, the sending device 10 monitors data to be transmitted corresponding to the target multimedia currently buffered in the bluetooth transmission queue according to a data occupation ratio of the data to be transmitted in the multimedia transmission queue, a multimedia transmission policy is determined and finally, the transmitting device 10 transmits the target multimedia to the receiving device based on the multimedia transmission policy.
According to the multimedia data transmission method, the multimedia transmission strategy can be determined according to the data occupation ratio of the data to be transmitted in the multimedia transmission queue, when the transmission code rate is high, different multimedia transmission strategies can be flexibly switched according to the actual situation, interference caused by wifi or other wireless signals is avoided, and the transmission efficiency of the multimedia data is further improved.
The following are detailed below. It should be noted that the description sequence of the following embodiments is not intended to limit the priority sequence of the embodiments.
A method of multimedia data transmission, comprising: the method comprises the steps of obtaining a data transmission request, establishing Bluetooth connection with receiving equipment, responding to multimedia data sending operation triggered by target multimedia, monitoring to-be-transmitted data corresponding to the target multimedia currently cached in a Bluetooth transmission queue, determining a multimedia transmission strategy according to the data proportion of the to-be-transmitted data in the multimedia transmission queue, and transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy.
The following embodiments will be described in detail, respectively, and it should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 1b, fig. 1b is a schematic flow chart of a multimedia data transmission method provided in the present application. The multimedia data transmission method is applied to sending equipment, and the specific flow can be as follows:
101. and acquiring a data transmission request.
The data transmission request indicates a target multimedia and a receiving device for receiving the target multimedia, where the target multimedia may be a video or an audio, and the receiving device may be a smart television, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, or the like, and this application is not particularly limited thereto.
The bluetooth device can simultaneously inquire the nearby bluetooth devices and be discovered by the nearby bluetooth devices in a time division multiplexing mode, that is, the conventional bluetooth device can simultaneously serve as an inquiry device (Inquiring device) and a Discoverable device (Discoverable device). The inquiring device (i.e., the sending device) obtains the bluetooth address of the discoverable device by inquiring.
For example, in response to a device selection operation of a user for a discoverable device, the selected discoverable device is determined as a receiving device, so that a sending device obtains a data transmission request, specifically, the user can click a data transmission control displayed in the sending device, so that the sending device obtains the data transmission request, and the style of the data transmission control can be set according to actual conditions
102. A bluetooth connection is established with the receiving device.
Bluetooth is a radio technology that supports short-range communication (typically within 10 m) of devices, enabling wireless information exchange between many devices, including mobile phones, PDAs, wireless headsets, laptops, related peripherals, etc. With the bluetooth technology, it is possible to effectively simplify the communication between mobile communication terminal devices and also to successfully simplify the communication between the devices and the internet, so that data transmission becomes more rapid and efficient, widening the way for wireless communication.
Bluetooth, as a small-range wireless connection technology, can implement convenient, fast, flexible, secure, low-cost, low-power-consumption data communication and voice communication between devices, and thus it is one of the mainstream technologies for implementing wireless personal area network communication. Connection to other networks may lead to a wider range of applications. The wireless communication system is a sophisticated open wireless communication system, which enables various digital devices to communicate wirelessly, is one of wireless network transmission technologies, and originally used to replace infrared communication.
Bluetooth is an open global specification for wireless data and voice communication that establishes an ad hoc connection for fixed and mobile device communication environments based on low-cost short-range wireless connections. The essence of the method is to establish a universal Radio Air Interface (Radio Air Interface) for the communication environment between fixed devices or mobile devices, and further combine the communication technology with the computer technology, so that various 3C devices can realize mutual communication or operation in a short distance without mutual connection of wires or cables. Briefly, bluetooth technology is a technology for transmitting data to each other between various 3C devices using low power radio.
The bluetooth device may connect with a nearby bluetooth device and be connected with a nearby bluetooth device simultaneously in a time division multiplexing manner, that is, the bluetooth device may simultaneously serve as a Connecting device (Connecting device) and a Connectable device (Connectable device). The Connection device sending a Connection Request (Connection Request) signaling to the connectable device; the connectable device may send Connection reply (Connection Response) signaling to the connecting device. After the connection is successful, the bluetooth device initiating the connection (i.e., the transmitting device) becomes a Master (Master) in the network, and the connected bluetooth device becomes a Slave (Slave) in the network.
When detecting the bluetooth connection operation triggered by the user for the receiving device, then establishing the bluetooth connection with the receiving device, wherein the bluetooth connection operation can be triggered by clicking the bluetooth connection control, and the bluetooth connection operation can also be triggered by an interconnection system between devices, which is specific according to actual conditions and is not repeated herein.
103. And responding to the multimedia data sending operation triggered by the target multimedia, and monitoring the data to be transmitted corresponding to the target multimedia currently cached in the Bluetooth transmission queue.
It can be understood that the multimedia data is data related to the user service, such as data actually transmitted by a File Transfer Protocol ("FTP"), and the data volume of the multimedia data is usually large and usually cannot be transmitted to the corresponding receiving device in time, so that, in the present application, by detecting the to-be-transmitted data corresponding to the target multimedia currently cached in the bluetooth transmission queue, it is convenient to subsequently determine the corresponding multimedia transmission policy according to the to-be-transmitted data cached in the bluetooth transmission queue.
104. And determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue.
The method includes determining a multimedia transmission policy corresponding to a data occupancy ratio according to the data occupancy ratio of data to be transmitted in a multimedia transmission queue, for example, the multimedia transmission policy corresponding to the data occupancy ratio of 30% is a policy a, the multimedia transmission policy corresponding to the data occupancy ratio of 30% is a policy B, and the multimedia transmission policy corresponding to the data occupancy ratio of 70% is a policy C, where in some embodiments, the policy a, the policy B, and the policy C are different in that: the transmission power of the bluetooth in the sending device is different, that is, the higher the data occupation ratio is, the higher the transmission power of the bluetooth in the sending device is, so as to improve the transmission efficiency of the multimedia data, that is, the step "determining the multimedia transmission policy according to the data occupation ratio of the data to be transmitted in the multimedia transmission queue" may specifically include:
(11) calculating the data proportion of the data to be transmitted in the multimedia transmission queue;
(12) and determining a multimedia transmission strategy according to the range interval corresponding to the data occupation ratio.
The multimedia transmission strategies corresponding to each range interval are different, and the corresponding relation between the range intervals and the multimedia transmission strategies can be constructed in advance, for example, when the data percentage of the range interval corresponding to the range interval is 30-80%, the transmission power of the Bluetooth in the sending equipment can be improved; when the range interval corresponding to the data occupation ratio is 80-100%, the transmission interval of the data to be transmitted can be reduced; if the range interval corresponding to the data percentage is 100%, the data to be transmitted may be backed up, and the backup data may be cut, that is, optionally, in some embodiments, the step "determining the multimedia transmission policy according to the range interval corresponding to the data percentage" may specifically include:
(21) acquiring a range interval corresponding to the data proportion;
(22) when the range interval corresponding to the data occupation ratio is a first range interval, improving the transmitting power of the Bluetooth in the transmitting equipment;
(23) when the range interval corresponding to the data occupation ratio is a second range interval, improving the transmission interval of the data to be transmitted;
(24) and when the range interval corresponding to the data proportion is a third range interval, backing up the data to be transmitted and cutting the backup data.
Conventional bluetooth has 3 power levels: class1, Class2, and Class3 support transmission distances of 100m, 10m, and 1m, respectively, while bluetooth low energy is in a powerless Class, and the transmission power is generally-21-5 dBm, in this application, because the data amount of the transmitted multimedia data is large, a conventional bluetooth is used, wherein when the data percentage corresponds to a first range, the transmission power of the bluetooth in the transmitting device is increased, for example, the transmission power of the bluetooth is increased from Class1 to Class2, or the transmission power of the bluetooth is increased from Class1 to Class3, which is specifically selected according to the actual situation, and is not described herein again, that is, optionally, in some embodiments, the step "increasing the transmission power of the bluetooth in the transmitting device" may specifically include:
(31) determining a power mode currently corresponding to Bluetooth in receiving equipment;
(32) and switching the power mode to a target power mode corresponding to the target transmitting power so as to improve the transmitting power of the Bluetooth.
The bluetooth can realize two modes of high power and common power, so that an additional Power Amplifier (PA) can be added on a bluetooth radio frequency channel to realize the high power design of the bluetooth.
When the range interval corresponding to the data percentage is the second range interval, the transmission interval of the data to be transmitted is decreased, for example, the transmission interval is increased from 20 milliseconds to 30 milliseconds, but other values are also possible.
When the range section corresponding to the data proportion is the third range section, the data to be transmitted is backed up, and the backup data is cut, for example, specifically, the data of the odd frame in the backup data may be retained, and the data of the even frame in the backup data may be deleted, or the first 30% of the data in the backup data may be retained, which is specifically set according to the actual situation, and is not described herein again.
105. And transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy.
For different multimedia transmission strategies, the multimedia transmission modes are different, specifically as follows:
the target multimedia is transmitted to the receiving device based on the increase of the transmission power of the bluetooth in the sending device, for example, specifically, after the transmission power of the bluetooth is increased from Class1 to Class2, the target multimedia is transmitted to the receiving device based on the transmission power of Class2, thereby avoiding the interference of wifi or other wireless signals and further improving the transmission efficiency of the multimedia data.
It should be noted that before the target multimedia is transmitted to the receiving device based on bluetooth with increased transmission power. The data occupation ratio of the data to be transmitted in the multimedia transmission queue may also be detected, and when the range interval corresponding to the data occupation ratio of the data to be transmitted in the multimedia transmission queue for which the power is increased is the first range interval, the transmission power of the bluetooth is continuously increased, that is, optionally, in some embodiments, before the step "transmitting the target multimedia to the receiving device based on the bluetooth for increasing the transmission power", specifically, the method may further include:
(41) after the transmitting power is increased, detecting the data proportion of the data to be transmitted in a multimedia transmission queue;
(42) and when the range interval corresponding to the detected data occupation ratio is the first range interval, increasing the transmission power of the Bluetooth in the sending equipment and the transmission power of the Bluetooth in the receiving equipment to the maximum value.
For example, after the transmission power of the bluetooth is increased from Class1 to Class2, when the range interval corresponding to the data percentage of the data to be transmitted in the multimedia transmission queue is still the first range interval, the transmission power of the bluetooth is increased from Class2 to Class3, and the multimedia data transmission is performed based on the bluetooth whose transmission power is increased to Class 3.
In addition, for the manner based on increasing the transmission interval of the data to be transmitted, the target multimedia can be transmitted to the receiving device based on the increased transmission interval.
In a manner of cutting the backup data, the target multimedia may be transmitted to the receiving device based on the cut backup data, where data of odd frames in the cut backup data may be retained, and data of even frames in the cut backup data is deleted to obtain the target data, and finally the target multimedia is transmitted to the receiving device based on the target data, that is, optionally, in some embodiments, the step "transmitting the target multimedia to the receiving device based on the cut backup data" may specifically include:
(51) reserving the data of the Nth frame in the cut backup data, and deleting the data of the (N + 1) th frame in the cut backup data to obtain target data, wherein N is a positive integer;
(52) and transmitting the target multimedia to the receiving device based on the target data.
In this way, the trimmed backup data is further trimmed by half, so as to reduce the data occupation ratio in the multimedia transmission queue, thereby increasing the transmission speed, and in addition, when the target data is transmitted, the data occupation ratio of the target data in the multimedia transmission queue can be detected, and when the data occupation ratio of the target data in the multimedia transmission queue is smaller than a preset value, the target multimedia is transmitted to the receiving device, wherein the preset value can be 100% or 90%, and can be specifically adjusted according to the actual transmission condition. When the data proportion of the target data in the multimedia transmission queue is greater than the preset value, continuing to perform the operation of halving the target data until the data proportion of the target data in the multimedia transmission queue after being clipped is less than the preset value, that is, optionally, in some embodiments, the method may further include:
(61) when the data proportion of the target data in the multimedia transmission queue is detected to be larger than or equal to a preset value, retaining the data of the Nth frame in the target data, and deleting the data of the (N + 1) th frame of the target data;
(62) and transmitting the target multimedia to the receiving equipment based on the data of the Nth frame in the target data.
According to the method and the device, the corresponding multimedia transmission strategy is determined according to the data proportion of the data to be transmitted in the multimedia transmission queue, different multimedia transmission strategies can be flexibly selected in different application scenes, interference caused by wifi or other wireless signals is avoided, and the transmission efficiency of the multimedia data is improved.
To further understand the multimedia data transmission method of the present application, the following description takes video as an example to further describe in detail, please refer to fig. 1c, when the TV end and the bluetooth device end (speaker/earphone) are bound and connected, a bluetooth link is established. The TV end application plays video/music and the TV audio service starts to transmit audio streams to the Bluetooth device at the opposite end. And transmitting the audio to the Bluetooth headset of the opposite end, wherein the audio is coded correspondingly according to the coding format negotiated by the two parties through a Bluetooth protocol stack. And finally, sending the audio data to the opposite-end equipment through the HCI. And the opposite terminal equipment receives the audio data, and then performs audio decoding and playing. According to the scheme, when the audio coding is carried out on the Bluetooth protocol stack, the audio transmission can be dynamically optimized and adjusted by starting the card break early warning service. When the TV end application plays video/music and starts audio stream transmission, an audio broadcast event is sent. When the system receives the broadcast event, it will start the bluetooth katon early warning service. The service runs in real time in the background and it collects data information for the tx _ audio _ queue audio send queue of the bluetooth protocol stack. The data information includes a maximum space of the queue, a currently used space of the queue, a number of data frames that the queue has discarded, and a corresponding timestamp. From this data, the percentage of pending audio data (queue used space/queue total space) is calculated. The early warning service sets the pause level in the current state by traversing the pause level list according to the calculated percentage of the audio data to be sent. When the Bluetooth blockage early warning service detects that the percentage of data to be transmitted is greater than or equal to 30%, the current Bluetooth transmitting power level of the first gear is improved through a Bluetooth protocol stack, and a command request is issued through the HCI so that the Bluetooth module provides transmitting power. And the Bluetooth headset at the opposite end is informed, and the transmission power level of the Bluetooth headset is also suggested to be synchronously improved. And detecting the current data to be transmitted percentage again, and if the current data to be transmitted percentage is still greater than or equal to 30%, increasing the first-gear Bluetooth transmission power level again until the power level is increased to the maximum value. When the Bluetooth calorie on early warning service detects that the percentage of data to be sent is greater than or equal to 80%, the Bluetooth calorie on state is about to be achieved. The audio coding transmission INTERVAL A2DP _ SBC _ ENCODER _ INTERVAL _ MS is increased from the original 20MS to 30MS by changing the bluetooth protocol stack. If the percentage of pending data is again detected to be less than 80%, the transmission interval is adjusted to the original 20 ms. When the Bluetooth calorie on early warning service detects that the percentage of data to be sent is greater than or equal to 100%, the Bluetooth calorie on state is in a severe calorie on state. The data of the audio transmission queue is backed up first. And then halving the backed-up data, namely saving one frame of data and discarding one frame of data. And finally, backing up the halved data, issuing the data to the Bluetooth module through the HCI, and transmitting the data to the Bluetooth loudspeaker box/earphone of the opposite terminal. The bluetooth katon early warning service continues to detect, and when the percentage is greater than or equal to 100%, the data just cut off is cut off by half again and then sent to the opposite terminal equipment. If the percentage is greater than or equal to 100% a further number of times, then the currently buffered data is discarded.
As can be seen from the above, after acquiring the data transmission request, the embodiment of the present application establishes a bluetooth connection with the receiving device, then, in response to the multimedia data sending operation triggered by the target multimedia, the data to be transmitted corresponding to the target multimedia currently buffered in the Bluetooth transmission queue is monitored, and then, determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue, and finally, the multimedia data transmission method provided by the application, the multimedia transmission strategy can be determined according to the data proportion of the data to be transmitted in the multimedia transmission queue, and when the transmission code rate is higher, different multimedia transmission strategies can be flexibly switched according to actual conditions, interference caused by wifi or other wireless signals is avoided, and transmission efficiency of multimedia data is improved.
In order to better implement the multimedia data transmission method provided by the embodiment of the application, a multimedia data transmission device is further provided in an embodiment. The terms are the same as those in the above-mentioned multimedia data transmission method, and the details of the implementation can refer to the description in the method embodiment.
The multimedia data transmission apparatus may be specifically integrated in a sending device, as shown in fig. 2, and may include: the method comprises an acquisition module 201, an establishment module 202, a monitoring module 203, a determination module 204 and a transmission module 205, which are specifically as follows:
the obtaining module 201 is configured to obtain a data transmission request.
The data transmission request indicates a target multimedia and a receiving device for receiving the target multimedia, where the target multimedia may be a video or an audio, and the receiving device may be a smart television, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, or the like, and this application is not particularly limited thereto.
The bluetooth device can simultaneously inquire the nearby bluetooth devices and be discovered by the nearby bluetooth devices in a time division multiplexing mode, that is, the conventional bluetooth device can simultaneously serve as an inquiry device (Inquiring device) and a Discoverable device (Discoverable device). The inquiring device (i.e., the sending device) obtains the bluetooth address of the discoverable device by inquiring.
An establishing module 202, configured to establish a bluetooth connection with a receiving device.
When detecting a bluetooth connection operation triggered by a user for a receiving device, the establishing module 202 establishes a bluetooth connection with the receiving device, where the bluetooth connection operation may be triggered by clicking a bluetooth connection control, and the bluetooth connection operation may also be triggered by an interconnection system between devices, which is specifically determined according to actual situations and is not described herein again.
And the monitoring module 203 is configured to monitor to-be-transmitted data corresponding to the target multimedia currently buffered in the bluetooth transmission queue in response to a multimedia data sending operation triggered for the target multimedia.
It can be understood that the multimedia data is data related to the user service, such as data actually transmitted by a File Transfer Protocol ("FTP"), and the data volume of the multimedia data is usually large and usually cannot be transmitted to the corresponding receiving device in time, so that, in the present application, by detecting the to-be-transmitted data corresponding to the target multimedia currently cached in the bluetooth transmission queue, it is convenient to subsequently determine the corresponding multimedia transmission policy according to the to-be-transmitted data cached in the bluetooth transmission queue.
The determining module 204 is configured to determine a multimedia transmission policy according to a data proportion of the data to be transmitted in the multimedia transmission queue.
The determining module 204 determines, according to a data occupancy of data to be transmitted in the multimedia transmission queue, a multimedia transmission policy corresponding to the data occupancy, for example, the multimedia transmission policy corresponding to the data occupancy of 30% is a policy a, the multimedia transmission policy corresponding to the data occupancy of 30% is a policy B, and the multimedia transmission policy corresponding to the data occupancy of 70% is a policy C, where in some embodiments, the difference between the policy a, the policy B, and the policy C is: the transmission power of the bluetooth in the sending device is different, that is, the higher the data occupation ratio is, the higher the transmission power of the bluetooth in the sending device is, so as to improve the transmission efficiency of the multimedia data.
Optionally, in some embodiments, the determining module 204 may specifically include:
the computing unit is used for computing the data proportion of the data to be transmitted in the multimedia transmission queue;
and the determining unit is used for determining the multimedia transmission strategy according to the range interval corresponding to the data occupation ratio.
Optionally, in some embodiments, the determining unit may specifically include:
the acquisition subunit is used for acquiring a range interval corresponding to the data proportion;
the first improving subunit is used for improving the transmitting power of the Bluetooth in the transmitting equipment when the range interval corresponding to the data occupation ratio is the first range interval;
the second improving subunit is used for improving the transmission interval of the data to be transmitted when the range interval corresponding to the data occupation ratio is a second range interval;
and the backup subunit is used for backing up the data to be transmitted when the range interval corresponding to the data proportion is a third range interval, and the cutting subunit is used for cutting the backup data.
Optionally, in some embodiments, the first boosting subunit may specifically be configured to: determining a power mode currently corresponding to Bluetooth in receiving equipment; and switching the power mode to a target power mode corresponding to the target transmitting power so as to improve the transmitting power of the Bluetooth.
A transmission module 205, configured to transmit the target multimedia to the receiving device based on the multimedia transmission policy.
Optionally, in some embodiments, the transmission module 205 may specifically include:
and the first transmission unit is used for transmitting the target multimedia to the receiving equipment based on the improvement of the transmission power of the Bluetooth in the sending equipment.
And the second transmission unit is used for transmitting the target multimedia to the receiving equipment based on the transmission interval of the data to be transmitted.
And the third transmission unit is used for transmitting the target multimedia to the receiving equipment based on the cut backup data.
Optionally, in some embodiments, the third transmission unit may specifically include:
the reservation subunit is used for reserving the data of the Nth frame in the trimmed backup data and deleting the data of the (N + 1) th frame in the trimmed backup data to obtain target data, wherein N is a positive integer;
and the transmission subunit is used for transmitting the target multimedia to the receiving equipment based on the target data.
Optionally, in some embodiments, the transmission subunit is specifically configured to: detecting the data proportion of target data in the multimedia transmission queue; and when the data occupation ratio of the target data in the multimedia transmission queue is smaller than a preset value, transmitting the target multimedia to the receiving equipment.
Optionally, in some embodiments, the transmission subunit is further specifically configured to: when the data proportion of the target data in the multimedia transmission queue is detected to be larger than or equal to a preset value, retaining the data of the Nth frame in the target data, and deleting the data of the (N + 1) th frame of the target data; and transmitting the target multimedia to the receiving equipment based on the data of the Nth frame in the target data.
As can be seen from the above, after the obtaining module 201 of the embodiment of the present application obtains the data transmission request, the establishing module 202 establishes the bluetooth connection with the receiving device, then the monitoring module 203 monitors the to-be-transmitted data corresponding to the target multimedia currently buffered in the bluetooth transmission queue in response to the multimedia data sending operation triggered by the target multimedia, then the determining module 204 determines the multimedia transmission policy according to the data occupation ratio of the to-be-transmitted data in the multimedia transmission queue, and finally the transmitting module 205 transmits the target multimedia to the receiving device based on the multimedia transmission policy, according to the data occupation ratio of the to-be-transmitted data in the multimedia transmission queue, the multimedia transmission policy can be determined by the multimedia data transmission method provided in the present application, and when the transmission code rate is high, different multimedia transmission policies can be flexibly switched according to the actual situation, the interference of wifi or other wireless signals is avoided, and the transmission efficiency of the multimedia data is improved.
An embodiment of the present application further provides an electronic device, where the electronic device may be a terminal, as shown in fig. 3, which shows a schematic structural diagram of the electronic device according to the embodiment of the present application, and specifically:
the electronic device may include components such as a processor 301 of one or more processing cores, memory 302 of one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 3 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 301 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 302 and calling data stored in the memory 302, thereby performing overall monitoring of the electronic device. Optionally, processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs and modules, and the processor 301 executes various functional applications and data processing by operating the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The electronic device further comprises a power supply 303 for supplying power to the various components, and preferably, the power supply 303 may be logically connected to the processor 301 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 303 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 304, and the input unit 304 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302, thereby implementing various functions as follows:
the method comprises the steps of obtaining a data transmission request, establishing Bluetooth connection with receiving equipment, responding to multimedia data sending operation triggered by target multimedia, monitoring to-be-transmitted data corresponding to the target multimedia currently cached in a Bluetooth transmission queue, determining a multimedia transmission strategy according to the data proportion of the to-be-transmitted data in the multimedia transmission queue, and transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, after acquiring the data transmission request, the embodiment of the present application establishes a bluetooth connection with the receiving device, then, in response to the multimedia data sending operation triggered by the target multimedia, the data to be transmitted corresponding to the target multimedia currently buffered in the Bluetooth transmission queue is monitored, and then, determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue, and finally, the multimedia data transmission method provided by the application, the multimedia transmission strategy can be determined according to the data proportion of the data to be transmitted in the multimedia transmission queue, and when the transmission code rate is higher, different multimedia transmission strategies can be flexibly switched according to actual conditions, interference caused by wifi or other wireless signals is avoided, and transmission efficiency of multimedia data is improved.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the method provided in the various alternative implementations of the above embodiments.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, the present application provides a storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any one of the multimedia data transmission methods provided in the present application.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any multimedia data transmission method provided in the embodiments of the present application, the beneficial effects that can be achieved by any multimedia data transmission method provided in the embodiments of the present application can be achieved, and detailed descriptions are omitted here for the foregoing embodiments.
The foregoing describes in detail a multimedia data transmission method, an apparatus, an electronic device, and a storage medium provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the foregoing embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A multimedia data transmission method is applied to a sending device and is characterized by comprising the following steps:
acquiring a data transmission request, wherein the data transmission request indicates a target multimedia and a receiving device for receiving the target multimedia;
establishing a Bluetooth connection with the receiving device;
responding to multimedia data sending operation triggered by the target multimedia, and monitoring data to be transmitted corresponding to the target multimedia currently cached in a Bluetooth transmission queue;
determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue;
and transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy.
2. The method according to claim 1, wherein the determining a multimedia transmission policy according to the data proportion of the data to be transmitted in the multimedia transmission queue comprises:
calculating the data proportion of the data to be transmitted in the multimedia transmission queue;
and determining a multimedia transmission strategy according to the range interval corresponding to the data occupation ratio.
3. The method according to claim 2, wherein the determining a multimedia transmission policy according to the range interval corresponding to the data percentage comprises:
acquiring a range interval corresponding to the data proportion;
when the range interval corresponding to the data occupation ratio is a first range interval, improving the transmitting power of the Bluetooth in the transmitting equipment;
when the range interval corresponding to the data occupation ratio is a second range interval, improving the transmission interval of the data to be transmitted;
when the range interval corresponding to the data proportion is a third range interval, backing up the data to be transmitted, and cutting the backup data;
the transmitting the target multimedia to the receiving device based on the multimedia transmission strategy comprises: transmitting the target multimedia to the receiving device based on increasing the transmission power of the Bluetooth in the transmitting device, or; transmitting the target multimedia to the receiving device based on increasing the transmission interval of the data to be transmitted, or; and transmitting the target multimedia to the receiving equipment based on the cut backup data.
4. The method of claim 3, wherein the increasing the transmission power of the Bluetooth in the sending device comprises:
determining a power mode currently corresponding to Bluetooth in the receiving equipment;
and switching the power mode to a target power mode corresponding to the target transmitting power so as to improve the transmitting power of the Bluetooth.
5. The method of claim 4, wherein before transmitting the target multimedia to the receiving device based on the Bluetooth with increased transmission power, further comprising:
after the transmitting power is increased, detecting the data occupation ratio of the data to be transmitted in the multimedia transmission queue;
and when the range interval corresponding to the detected data occupation ratio is a first range interval, increasing the transmission power of the Bluetooth in the sending equipment and the transmission power of the Bluetooth in the receiving equipment to the maximum value.
6. The method of claim 3, wherein the transmitting the target multimedia to the receiving device based on the cropped backup data comprises:
reserving the data of the Nth frame in the cut backup data, and deleting the data of the (N + 1) th frame in the cut backup data to obtain target data, wherein N is a positive integer;
transmitting the target multimedia to the receiving device based on the target data.
7. The method of claim 6, wherein the transmitting the target multimedia to the receiving device based on the target data comprises:
detecting the data proportion of the target data in the multimedia transmission queue;
and when the data occupation ratio of the target data in the multimedia transmission queue is smaller than a preset value, transmitting the target multimedia to the receiving equipment.
8. The method of claim 7, further comprising:
when the data proportion of the target data in the multimedia transmission queue is detected to be larger than or equal to a preset value, retaining the data of the Nth frame in the target data, and deleting the data of the (N + 1) th frame of the target data;
and transmitting the target multimedia to the receiving equipment based on the data of the Nth frame in the target data.
9. A multimedia data transmission apparatus, applied to a sending device, comprising:
an obtaining module, configured to obtain a data transmission request, where the data transmission request indicates a target multimedia and a receiving device that receives the target multimedia;
the establishing module is used for establishing Bluetooth connection with the receiving equipment;
the monitoring module is used for responding to multimedia data sending operation triggered by the target multimedia and monitoring data to be transmitted corresponding to the target multimedia currently cached in a Bluetooth transmission queue;
the determining module is used for determining a multimedia transmission strategy according to the data proportion of the data to be transmitted in the multimedia transmission queue;
and the transmission module is used for transmitting the target multimedia to the receiving equipment based on the multimedia transmission strategy.
10. An electronic device, comprising a memory storing an application program and a processor for executing a computer program in the memory to perform the multimedia data transmission method according to any one of claims 1 to 8.
11. A storage medium for storing a computer program which is loaded by a processor to perform the multimedia data transmission method according to any one of claims 1 to 8.
CN202110903936.5A 2021-08-06 2021-08-06 Multimedia data transmission method and device, electronic equipment and storage medium Active CN113840269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110903936.5A CN113840269B (en) 2021-08-06 2021-08-06 Multimedia data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110903936.5A CN113840269B (en) 2021-08-06 2021-08-06 Multimedia data transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113840269A true CN113840269A (en) 2021-12-24
CN113840269B CN113840269B (en) 2023-11-14

Family

ID=78963025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110903936.5A Active CN113840269B (en) 2021-08-06 2021-08-06 Multimedia data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113840269B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786058A (en) * 2022-04-27 2022-07-22 南京欧珀软件科技有限公司 Multimedia data display method, device, terminal and storage medium
CN116055462A (en) * 2022-05-20 2023-05-02 荣耀终端有限公司 Data transmission method, terminal equipment, storage medium and chip system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338376A (en) * 2014-08-15 2016-02-17 中国电信股份有限公司 Streaming media code rate control method, streaming media code rate control system and streaming media server
US20160212190A1 (en) * 2015-01-19 2016-07-21 Samsung Electronics Co., Ltd. Method and apparatus for transmitting and receiving data
WO2018049887A1 (en) * 2016-09-14 2018-03-22 广东欧珀移动通信有限公司 Data transmission processing method and terminal device
WO2018101777A1 (en) * 2016-11-30 2018-06-07 삼성전자 주식회사 Method and apparatus for streaming audio by using wireless link
WO2019019371A1 (en) * 2017-07-24 2019-01-31 平安科技(深圳)有限公司 Streaming media data transmission method, storage medium and streaming media server
CN110049359A (en) * 2019-05-21 2019-07-23 腾讯科技(深圳)有限公司 A kind of control method and device of code rate
CN112135279A (en) * 2020-09-21 2020-12-25 珠海格力电器股份有限公司 Audio transmission method and device of multi-channel Bluetooth
WO2021022720A1 (en) * 2019-08-02 2021-02-11 惠州Tcl移动通信有限公司 Bluetooth-based data transmission method, storage medium and terminal
CN112468855A (en) * 2020-11-11 2021-03-09 西安万像电子科技有限公司 Data transmission method and device and nonvolatile storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338376A (en) * 2014-08-15 2016-02-17 中国电信股份有限公司 Streaming media code rate control method, streaming media code rate control system and streaming media server
US20160212190A1 (en) * 2015-01-19 2016-07-21 Samsung Electronics Co., Ltd. Method and apparatus for transmitting and receiving data
WO2018049887A1 (en) * 2016-09-14 2018-03-22 广东欧珀移动通信有限公司 Data transmission processing method and terminal device
WO2018101777A1 (en) * 2016-11-30 2018-06-07 삼성전자 주식회사 Method and apparatus for streaming audio by using wireless link
WO2019019371A1 (en) * 2017-07-24 2019-01-31 平安科技(深圳)有限公司 Streaming media data transmission method, storage medium and streaming media server
CN110049359A (en) * 2019-05-21 2019-07-23 腾讯科技(深圳)有限公司 A kind of control method and device of code rate
WO2021022720A1 (en) * 2019-08-02 2021-02-11 惠州Tcl移动通信有限公司 Bluetooth-based data transmission method, storage medium and terminal
CN112135279A (en) * 2020-09-21 2020-12-25 珠海格力电器股份有限公司 Audio transmission method and device of multi-channel Bluetooth
CN112468855A (en) * 2020-11-11 2021-03-09 西安万像电子科技有限公司 Data transmission method and device and nonvolatile storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786058A (en) * 2022-04-27 2022-07-22 南京欧珀软件科技有限公司 Multimedia data display method, device, terminal and storage medium
CN114786058B (en) * 2022-04-27 2024-02-06 南京欧珀软件科技有限公司 Multimedia data display method, device, terminal and storage medium
CN116055462A (en) * 2022-05-20 2023-05-02 荣耀终端有限公司 Data transmission method, terminal equipment, storage medium and chip system
CN116055462B (en) * 2022-05-20 2023-11-07 荣耀终端有限公司 Data transmission method, terminal equipment, storage medium and chip system

Also Published As

Publication number Publication date
CN113840269B (en) 2023-11-14

Similar Documents

Publication Publication Date Title
CN107889092B (en) Bluetooth device communication control method, device, terminal device and storage medium
EP1176783B1 (en) Method for transmitting stream data between a slave and a master within a short-range mobile system
US20100048133A1 (en) Audio data flow input/output method and system
WO2019090726A1 (en) Method for selecting bluetooth device, terminal, and system
US11501779B2 (en) Bluetooth speaker base, method and system for controlling thereof
CN102331727B (en) Bluetooth media play controlling method and relevant device
CN110177363B (en) Bluetooth data transmission method and device, Bluetooth chip and storage medium
US20160323826A1 (en) Multimode and power-saving method of multimedia transmission and system thereof
CN110189753B (en) Bluetooth sound box and control method, system and storage medium thereof
CN105120101A (en) Volume control method and device of smart sound box, smart sound box and mobile terminal
CN113906773B (en) Channel selection method and device for low-power consumption Bluetooth equipment
CN113840269B (en) Multimedia data transmission method and device, electronic equipment and storage medium
CN113766477A (en) Device connection method, device, electronic device and computer readable medium
CN113038316A (en) Earphone control method and device, Bluetooth earphone and storage medium
CN105704110A (en) Media transmission method, media control method and device
CN115002735A (en) Bluetooth control method, Bluetooth control device, storage medium and electronic equipment
CN109151669B (en) Earphone control method, earphone control device, electronic equipment and storage medium
CN112565876B (en) Screen projection method, device, equipment, system and storage medium
CN105828253A (en) Wireless connection control method and device in audio playing system
CN111182597B (en) Processing method and device
CN105407452A (en) Method and system for controlling data flow in Bluetooth sharing network
JP2015002394A (en) Information processing apparatus and computer program
CN111246433A (en) Resource pool switching method, device, mobile terminal, network side equipment and medium
CN115694742A (en) Method and electronic device for transmitting acknowledgement signal in wireless communication system
CN115396407A (en) Wireless audio/video device and wireless communication method

Legal Events

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