CN113840269B - 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
CN113840269B
CN113840269B CN202110903936.5A CN202110903936A CN113840269B CN 113840269 B CN113840269 B CN 113840269B CN 202110903936 A CN202110903936 A CN 202110903936A CN 113840269 B CN113840269 B CN 113840269B
Authority
CN
China
Prior art keywords
data
multimedia
transmission
target
transmitting
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.)
Active
Application number
CN202110903936.5A
Other languages
Chinese (zh)
Other versions
CN113840269A (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

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

Abstract

The embodiment of the application discloses a multimedia data transmission method, a device, electronic equipment and a storage medium, comprising the following steps: acquiring a data transmission request, wherein the data transmission request indicates a target multimedia and receiving equipment for receiving the target multimedia; establishing a Bluetooth connection with the receiving device; responding to the multimedia data sending operation triggered by aiming at the target multimedia, and monitoring the 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 duty ratio of the data to be transmitted in the multimedia transmission queue; based on the multimedia transmission strategy, the target multimedia is transmitted to the receiving equipment, and the scheme can improve the transmission efficiency of the 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 method and apparatus for transmitting multimedia data, an electronic device, and a storage medium.
Background
With the continuous update and development of bluetooth technology, the integrated bluetooth function of the smart television is more and more widespread, and when a user wants to use bluetooth equipment on the television, for example, play music of the television through a bluetooth sound box, the bluetooth equipment and the television are firstly required to be connected in a binding way, and a wireless link for transmitting audio streams by the two parties is established.
For bluetooth devices employing audio coding (SBC), only a fixed transmission code rate will be used. When the transmission code rate is higher, the interference of wifi or other wireless signals is easy to occur, and the problem of blocking such as connection interruption or sound discontinuity is caused.
Disclosure of Invention
The embodiment of the application provides a multimedia data transmission method, a device, electronic equipment and a storage medium, which can solve the problem of blocking caused by higher transmission code rate, thereby improving the transmission efficiency of multimedia data.
The multimedia data transmission method provided by the embodiment of the application is applied to the sending equipment and comprises the following steps:
acquiring a data transmission request, wherein the data transmission request indicates a target multimedia and receiving equipment for receiving the target multimedia;
establishing a Bluetooth connection with the receiving device;
responding to the multimedia data sending operation triggered by aiming at the target multimedia, and monitoring the 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 duty ratio of the data to be transmitted in the multimedia transmission queue;
transmitting the target multimedia to the receiving device based on the multimedia transmission policy.
Correspondingly, the embodiment of the application also provides a multimedia data transmission device, which is applied to the sending equipment and comprises:
the system comprises an acquisition module, a receiving module and a processing module, wherein the acquisition module is used for acquiring a data transmission request, and the data transmission request indicates a target multimedia and receiving equipment for receiving the target multimedia;
the establishing module is used for establishing Bluetooth connection with the receiving equipment;
the monitoring module is used for 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;
the determining module is used for determining a multimedia transmission strategy according to the data duty ratio 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 electronic equipment which comprises a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory, so as to execute any one of the multimedia data transmission methods provided by the embodiments of the present application.
Accordingly, an embodiment of the present application also provides a storage medium storing a computer program loaded by a processor to perform any one of the multimedia data transmission methods provided by the embodiments of the present application.
After a data transmission request is acquired, the data transmission request indicates a target multimedia and a receiving device for receiving the target multimedia, bluetooth connection is established between the receiving device and the receiving device, then, in response to a multimedia data sending operation triggered by the target multimedia, data to be transmitted corresponding to the target multimedia currently cached in a Bluetooth transmission queue is monitored, then, a multimedia transmission strategy is determined according to the data occupation ratio of the data to be transmitted in the multimedia transmission queue, and finally, the target multimedia is transmitted to the receiving device based on the multimedia transmission strategy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1a is a schematic view of a scenario of a multimedia data transmission method according to an embodiment of the present application;
fig. 1b is a flowchart of a multimedia data transmission method according to an embodiment of the present application;
fig. 1c is another flow chart of a multimedia data transmission method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a multimedia data transmission device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the 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 can be integrated in a terminal, and the terminal can be a smart television, a smart phone, a tablet personal computer, a notebook computer, a desktop computer, a smart sound box, a smart watch and the like, but is not limited to the smart television, the smart mobile phone, the tablet personal computer, the notebook computer, the desktop computer, the smart sound box, the smart watch and the like. .
For example, referring to fig. 1a, the present application provides a multimedia data transmission system, which includes a transmitting device 10 and a receiving device 20, when a user needs to transmit multimedia data of the transmitting device 10 to the receiving device 20 through bluetooth, the transmitting device 10 obtains a data transmission request, where the data transmission request indicates a target multimedia and the receiving device 20 receives the target multimedia, and the data transmission request may be triggered by a control displayed by the user through the transmitting device 10, then the transmitting device 10 establishes a bluetooth connection with the receiving device 20, the transmitting device 10 responds to a multimedia data transmission operation triggered by the user for the target multimedia, monitors data to be transmitted corresponding to the target multimedia currently buffered in a bluetooth transmission queue, then the transmitting device 10 determines a multimedia transmission policy according to a data ratio of the data to be transmitted in the multimedia transmission queue, 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 provided by the application, the multimedia transmission strategy can be determined according to the data duty ratio 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 the actual situation, so that interference of wifi or other wireless signals is avoided, and the transmission efficiency of the multimedia data is further improved.
The following will describe in detail. It should be noted that the following description order of embodiments is not a limitation of the priority order of embodiments.
A multimedia data transmission method, comprising: acquiring a data transmission request, establishing Bluetooth connection with receiving equipment, responding to multimedia data sending operation triggered by target multimedia, 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 duty ratio 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.
The following detailed description will be given, respectively, with the understanding that the description sequence of the following embodiments is not to be taken as a limitation on the preferred sequence of the embodiments.
Referring to fig. 1b, fig. 1b is a flow chart of a multimedia data transmission method according to the present application. The multimedia data transmission method is applied to the sending equipment, and the specific flow can be as follows:
101. a data transmission request is obtained.
The data transmission request indicates the target multimedia and the receiving device for receiving the target multimedia, the target multimedia may be video or 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.
The bluetooth device can inquire about nearby bluetooth devices and be discovered by nearby bluetooth devices simultaneously in a time division multiplexing mode, namely, a traditional bluetooth device can act as an Inquiring device (inquiry device) and a discoverable device (Discoverable device) simultaneously. The querying device (i.e., the transmitting device) obtains the bluetooth address of the discoverable device by querying.
For example, in response to a user selecting an apparatus for an discoverable apparatus, the selected discoverable apparatus is determined as a receiving apparatus, so that the transmitting apparatus obtains a data transmission request, specifically, the user may click on a data transmission control displayed in the transmitting apparatus, so that the transmitting apparatus obtains the data transmission request, and the style of the data transmission control may be set according to the actual situation
102. A bluetooth connection is established with the receiving device.
Bluetooth is a radio technology supporting short-range communication (typically within 10 m) of devices, enabling wireless information exchange between numerous devices including mobile phones, PDAs, wireless headsets, notebook computers, related peripherals, and the like. By using the Bluetooth technology, the communication between mobile communication terminal devices can be effectively simplified, and the communication between the devices and the Internet can be successfully simplified, so that the data transmission becomes quicker and more efficient, and the road is widened for wireless communication.
Bluetooth is used as a small-range wireless connection technology, and can realize convenient, quick, flexible, safe, low-cost and low-power consumption data communication and voice communication among devices, so that the Bluetooth is one of the mainstream technologies for realizing wireless personal area network communication. Connecting to other networks may lead to a wider range of applications. The wireless communication system is an open-ended wireless communication system, can enable various digital devices to communicate wirelessly, is one of wireless network transmission technologies, and is originally used for replacing infrared communication.
Bluetooth is an open global specification for wireless data and voice communications, which is based on low cost short range wireless connections to establish a special connection for the fixed and mobile device communication environment. The essence is to establish a general radio air interface (Radio Air Interface) for the communication environment between fixed devices or mobile devices, and to further combine the communication technology with computer technology to enable various 3C devices to communicate or operate within close range without wires or cables interconnecting. In brief, bluetooth is a technology for transmitting data between various 3C devices using low power radio.
The Bluetooth device can be connected with the nearby Bluetooth device and the nearby Bluetooth device at the same time in a time division multiplexing mode, namely, the Bluetooth device can serve as a connecting device (Connecting device) and a connectable device (Connectable device) at the same time. The connecting device sends connection request (Connection Request) signaling to the connectable device; the connected device may send connection reply (Connection Response) signaling to the connecting device. After the connection is successful, the bluetooth device that initiates the connection (i.e., the transmitting device) becomes the Master (Master) in the network, and the connected bluetooth device becomes the Slave (Slave) in the network.
When detecting the bluetooth connection operation triggered by the user aiming at the receiving equipment, establishing bluetooth connection with the receiving equipment, wherein the bluetooth connection operation can be triggered by clicking a bluetooth connection control, and also can be triggered by an interconnection system between the equipment, and the bluetooth connection operation is specific according to actual conditions and is not described herein.
103. And responding to the multimedia data sending operation triggered by aiming at 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 (File Transfer Protocol, abbreviated as "FTP"), and the data size of the multimedia data is generally large and cannot be timely transmitted to the corresponding receiving device, so in the present application, by detecting the data to be transmitted corresponding to the target multimedia currently buffered in the bluetooth transmission queue, the subsequent determination of the corresponding multimedia transmission policy according to the data buffered in the bluetooth transmission queue is facilitated.
104. And determining a multimedia transmission strategy according to the data duty ratio of the data to be transmitted in the multimedia transmission queue.
According to the data duty ratio of the data to be transmitted in the multimedia transmission queue, a multimedia transmission policy corresponding to the data duty ratio is determined, for example, the multimedia transmission policy corresponding to the data duty ratio is 30% is an a policy, the multimedia transmission policy corresponding to the data duty ratio is 30% is a B policy, the multimedia transmission policy corresponding to the data duty ratio is 70% is a C policy, and in some embodiments, the a policy, the B policy and the C policy are different from each other: the transmitting power of bluetooth in the transmitting device is different, that is, the higher the data duty ratio is, the higher the transmitting power of bluetooth in the transmitting device is, so as to improve the transmission efficiency of multimedia data, that is, the step of determining a multimedia transmission policy according to the data duty ratio of data to be transmitted in a multimedia transmission queue may specifically include:
(11) Calculating the data duty ratio 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 duty ratio.
The corresponding relation between the range intervals and the multimedia transmission strategies can be pre-constructed, for example, when the range interval corresponding to the data ratio is 30-80%, the transmitting power of Bluetooth in the transmitting equipment can be improved; when the range interval corresponding to the data duty ratio is 80-100%, the transmission interval of the data to be transmitted can be reduced; when the range interval corresponding to the data duty ratio 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 of determining the multimedia transmission policy according to the range interval corresponding to the data duty ratio may specifically include:
(21) Acquiring a range interval corresponding to the data duty ratio;
(22) When the range interval corresponding to the data duty ratio is the first range interval, the transmitting power of Bluetooth in the transmitting equipment is improved;
(23) When the range interval corresponding to the data duty ratio is a second range interval, the transmission interval of the data to be transmitted is increased;
(24) And when the range interval corresponding to the data duty ratio 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 respectively support transmission distances of 100m, 10m and 1m, while bluetooth low energy is of no power Class, generally the transmission power is between-21 and 5dBm, in the present application, since the data size of the transmitted multimedia data is large, conventional bluetooth is adopted, where when the range interval corresponding to the data duty ratio is the first range interval, the transmission power of bluetooth in the transmitting device is increased, for example, the transmission power of bluetooth is increased from Class1 to Class2, or the transmission power of bluetooth is increased from Class1 to Class3, which is specifically selected according to the actual situation, and not described herein, and in some embodiments, the step of "increasing the transmission power of 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 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, and the high power design of the Bluetooth is realized.
When the range interval corresponding to the data duty ratio is the second range interval, the transmission interval of the data to be transmitted is reduced, for example, the transmission interval is increased from 20 milliseconds to 30 milliseconds, and of course, other values are also possible.
When the range interval corresponding to the data duty ratio is the third range interval, 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 can be reserved, the data of the even frame in the backup data can be deleted, or the first 30% of the data in the backup data can be reserved, and the setting is specifically performed according to the actual situation, which is not described herein.
105. The target multimedia is transmitted to the receiving device based on the multimedia transmission policy.
For different multimedia transmission strategies, the mode of transmitting the multimedia is different, and the method is as follows:
Based on the improvement of the transmitting power of the Bluetooth in the transmitting device, the target multimedia is transmitted to the receiving device, for example, after the transmitting power of the Bluetooth is improved from Class1 to Class2, the target multimedia is transmitted to the receiving device based on the transmitting power of Class2, so that interference of wifi or other wireless signals is avoided, and the transmission efficiency of multimedia data is improved.
It should be noted that, before the target multimedia is transmitted to the receiving device based on bluetooth with increased transmission power. The method may further detect a data duty ratio of the data to be transmitted in the multimedia transmission queue, and when a range interval corresponding to the data duty ratio of the data to be transmitted in the multimedia transmission queue with the increased power is a first range interval, continuously increasing the transmission power of bluetooth, that is, optionally, in some embodiments, before the step of "transmitting the target multimedia to the receiving device based on the bluetooth with increased transmission power", the method may specifically further include:
(41) After the transmitting power is increased, detecting the data duty ratio of the data to be transmitted in the multimedia transmission queue;
(42) And when the range interval corresponding to the detected data duty ratio is the first range interval, the transmitting power of the Bluetooth in the transmitting equipment and the transmitting power of the Bluetooth in the receiving equipment are increased to the maximum value.
For example, after the transmitting power of bluetooth is increased from Class1 to Class2, when the range interval of the data to be transmitted corresponding to the data duty ratio of the multimedia transmission queue is still the first range interval, the transmitting power of bluetooth is increased from Class2 to Class3, and multimedia data transmission is performed based on the bluetooth with the transmitting power increased to Class 3.
In addition, for the manner based on the increase of the transmission interval of the data to be transmitted, the target multimedia may be transmitted to the receiving apparatus based on the increased transmission interval.
In the manner of clipping the backup data, the target multimedia may be transmitted to the receiving device based on the clipped backup data, where the data of the odd frame in the clipped backup data may be retained, the data of the even frame in the clipped backup data may be 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 of transmitting the target multimedia to the receiving device based on the clipped backup data may specifically include:
(51) The data of the N frame in the cut backup data is reserved, and the data of the (n+1) frame of the cut backup data is deleted to obtain target data, wherein N is a positive integer;
(52) The target multimedia is transmitted to the receiving device based on the target data.
In this way, in practice, the cut backup data is further halved, so as to reduce the data duty ratio in the multimedia transmission queue, thereby improving the transmission speed, in addition, when the target data is transmitted, the data duty ratio of the target data in the multimedia transmission queue can be detected, and when the data duty 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 specifically can be adjusted according to the actual transmission situation. When the data duty ratio of the target data in the multimedia transmission queue is greater than a preset value, the operation of halving the target data is continued until the data duty ratio of the target data in the multimedia transmission queue after clipping is less than the preset value, that is, optionally, in some embodiments, the method may specifically further include:
(61) When the data duty ratio of the target data in the multimedia transmission queue is detected to be larger than or equal to a preset value, reserving the data of the N frame in the target data, and deleting the data of the (n+1) frame of the target data;
(62) Transmitting the target multimedia to the receiving device based on the data of the nth frame in the target data.
According to the application, the corresponding multimedia transmission strategies are determined according to the data duty ratio of the data to be transmitted in the multimedia transmission queue, and different multimedia transmission strategies can be flexibly selected under different application scenes, so that interference caused by wifi or other wireless signals is avoided, and the transmission efficiency of the multimedia data is further improved.
For further understanding of the multimedia data transmission method of the present application, a video will be taken as an example for further details, refer to fig. 1c, where a bluetooth link is established when a TV end and a bluetooth device end (speaker/earphone) are connected in a binding manner. The TV-side application plays video/music and the TV audio service starts transmitting an audio stream to the opposite bluetooth device. The audio signal is transmitted to the Bluetooth headset at the opposite end, and the corresponding audio coding is carried out according to the coding format negotiated by the two parties through the Bluetooth protocol stack. And finally, sending the audio data to the opposite terminal equipment through the HCI. And the opposite terminal equipment decodes the audio and plays the audio after receiving the audio data. According to the scheme, when the Bluetooth protocol stack performs audio coding, the audio transmission can be dynamically optimized and adjusted by starting the card breakage early warning service. When the TV end application plays video/music and starts audio streaming, a play audio broadcast event is sent. When the system receives the broadcast event, the Bluetooth cartoon early warning service is started. The service runs in real time in the background and collects data information of the tx_audio_queue audio transmission queue of the bluetooth protocol stack. The data information includes the maximum space of the queue, the currently used space of the queue, the number of frames of data the queue has discarded, and the corresponding time stamp. From this data, the percentage of audio data to be sent (space used for queue/total space for queue) is calculated. The early warning service sets the cartoon grade in the current state by traversing the cartoon grade list according to the calculated percentage of the audio data to be sent. When the Bluetooth cartoon early warning service detects that the percentage of the data to be sent is greater than or equal to 30%, the current Bluetooth transmitting power level of a first file is improved through a Bluetooth protocol stack, and a command request is issued through an HCI, so that the Bluetooth module provides transmitting power. And the opposite Bluetooth headset is informed, and the transmitting power level of the Bluetooth headset is also suggested to be synchronously improved. And detecting the current data percent to be transmitted again, and if the current data percent to be transmitted 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 cartoon early warning service detects that the percentage of the data to be sent is greater than or equal to 80%, the Bluetooth cartoon early warning service is in a cartoon-impending state. The transmission INTERVAL a2dp_sbc_code_interval_ms is increased from the original 20MS to 30MS by changing the audio coding of the bluetooth protocol stack. If the percentage of the data to be transmitted is detected again to be less than 80%, the transmission interval is adjusted to be 20ms. When the Bluetooth cartoon early warning service detects that the percentage of the data to be sent is more than or equal to 100%, the Bluetooth cartoon early warning service is in a serious cartoon state. The data of the audio transmission queue is first backed up. And then halving and cutting the backed-up data, namely saving one frame of data and discarding one frame of data. And finally, backing up half of cut data, and transmitting the data to the Bluetooth module through the HCI to be transmitted to the Bluetooth sound box/earphone at the opposite end. The bluetooth jam early warning service can continue to detect, and when the bluetooth jam early warning service is still in percentage more than or equal to 100%, the data which is just cut is cut in half again, and then the data is sent to the opposite terminal equipment. If the percentage is greater than or equal to 100% more times later, the current buffered data is discarded.
As can be seen from the foregoing, after the data transmission request is obtained, the embodiment of the present application establishes a bluetooth connection with a receiving device, then, in response to a multimedia data sending operation triggered by a target multimedia, monitors data to be transmitted corresponding to the target multimedia currently buffered in a bluetooth transmission queue, then, determines a multimedia transmission policy according to a data duty ratio of the data to be transmitted in the multimedia transmission queue, and finally, transmits the target multimedia to the receiving device based on the multimedia transmission policy.
In order to facilitate better implementation of the multimedia data transmission method provided by the embodiment of the application, an embodiment of the application also provides a multimedia data transmission device. Wherein the meaning of the nouns is the same as in the above-mentioned multimedia data transmission method, and specific implementation details can be referred to the description in the method embodiment.
The multimedia data transmission apparatus may be integrated in a transmitting device, as shown in fig. 2, and may include: the acquisition module 201, the establishment module 202, the monitoring module 203, the determination module 204 and the transmission module 205 are specifically as follows:
an acquisition module 201, configured to acquire a data transmission request.
The data transmission request indicates the target multimedia and the receiving device for receiving the target multimedia, the target multimedia may be video or 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.
The bluetooth device can inquire about nearby bluetooth devices and be discovered by nearby bluetooth devices simultaneously in a time division multiplexing mode, namely, a traditional bluetooth device can act as an Inquiring device (inquiry device) and a discoverable device (Discoverable device) simultaneously. The querying device (i.e., the transmitting device) obtains the bluetooth address of the discoverable device by querying.
The establishing module 202 is configured to establish a bluetooth connection with a receiving device.
When the establishing module 202 detects the bluetooth connection operation triggered by the user for the receiving device, it establishes a bluetooth connection with the receiving device, where the bluetooth connection operation may be triggered by clicking a bluetooth connection control, or may be triggered by an interconnection system between devices, which is specifically determined according to the actual situation and will not be described herein.
The monitoring module 203 is configured to monitor data to be transmitted corresponding to the target multimedia currently buffered in the bluetooth transmission queue in response to a multimedia data transmission operation triggered by 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 (File Transfer Protocol, abbreviated as "FTP"), and the data size of the multimedia data is generally large and cannot be timely transmitted to the corresponding receiving device, so in the present application, by detecting the data to be transmitted corresponding to the target multimedia currently buffered in the bluetooth transmission queue, the subsequent determination of the corresponding multimedia transmission policy according to the data buffered in the bluetooth transmission queue is facilitated.
A determining module 204, configured to determine a multimedia transmission policy according to a data duty ratio of the data to be transmitted in the multimedia transmission queue.
The determining module 204 determines, according to the data ratio of the data to be transmitted in the multimedia transmission queue, a multimedia transmission policy corresponding to the data ratio, for example, the multimedia transmission policy corresponding to the data ratio of 30% is an a policy, the multimedia transmission policy corresponding to the data ratio of 30% is a B policy, the multimedia transmission policy corresponding to the data ratio of 70% is a C policy, and in some embodiments, the a policy, the B policy, and the C policy are different from one another: the transmission power of the Bluetooth in the transmitting device is different, namely, the higher the data duty ratio is, the higher the transmission power of the Bluetooth in the transmitting device is, so that the transmission efficiency of the multimedia data is improved.
Optionally, in some embodiments, the determining module 204 may specifically include:
the computing unit is used for computing the data duty ratio 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 duty 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 duty ratio;
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 duty ratio is the first range interval;
a second enhancing subunit, configured to enhance a transmission interval of the data to be transmitted when a range interval corresponding to the data duty 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 duty ratio is a third range interval, and the clipping subunit is used for clipping the backup data.
Optionally, in some embodiments, the first enhancement 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 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:
the first transmission unit transmits the target multimedia to the receiving device based on increasing the transmission power of bluetooth in the transmitting device.
And the second transmission unit is used for transmitting the target multimedia to the receiving equipment based on the improvement of 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:
a retaining subunit, configured to retain data of an nth frame in the cut backup data, and delete data of an n+1th frame of the cut backup data to obtain target data, where 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 duty ratio of target data in the multimedia transmission queue; and when the data duty ratio of the target data in the multimedia transmission queue is detected to be smaller than a preset value, transmitting the target multimedia to the receiving equipment.
Optionally, in some embodiments, the transmission subunit is specifically further configured to: when the data duty ratio of the target data in the multimedia transmission queue is detected to be larger than or equal to a preset value, reserving the data of the N frame in the target data, and deleting the data of the (n+1) frame of the target data; transmitting the target multimedia to the receiving device based on the data of the nth frame in the target data.
As can be seen from the foregoing, after the acquiring module 201 acquires the data transmission request, the establishing module 202 establishes bluetooth connection with the receiving device, then the monitoring module 203 responds to the multimedia data sending operation triggered by the target multimedia, monitors the data to be transmitted corresponding to the target multimedia currently buffered in the bluetooth transmission queue, then the determining module 204 determines the multimedia transmission policy according to the data duty ratio of the data to be transmitted 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.
The embodiment of the application also provides an electronic device, which 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 application, specifically:
the electronic device may include one or more processing cores 'processors 301, one or more computer-readable storage media's memory 302, power supply 303, and input unit 304, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 3 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 301 is a control center of the electronic device, connects various parts of the entire electronic device using 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 and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, etc., and the modem processor primarily 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 executing the software programs and modules stored in the memory 302. The memory 302 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, 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 powering the various components, preferably the power supply 303 is logically connected to the processor 301 by a power management system, whereby the functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 303 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 304, which input unit 304 may be used for receiving input digital or character information and for generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 301 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 executes the application programs stored in the memory 302, so as to implement various functions as follows:
acquiring a data transmission request, establishing Bluetooth connection with receiving equipment, responding to multimedia data sending operation triggered by target multimedia, 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 duty ratio 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.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein.
As can be seen from the foregoing, after the data transmission request is obtained, the embodiment of the present application establishes a bluetooth connection with a receiving device, then, in response to a multimedia data sending operation triggered by a target multimedia, monitors data to be transmitted corresponding to the target multimedia currently buffered in a bluetooth transmission queue, then, determines a multimedia transmission policy according to a data duty ratio of the data to be transmitted in the multimedia transmission queue, and finally, transmits the target multimedia to the receiving device based on the multimedia transmission policy.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the electronic device to perform the methods provided in the various alternative implementations of the embodiments described above.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a storage medium in which a computer program is stored, the computer program being capable of being loaded by a processor to perform the steps of any of the multimedia data transmission methods provided by the embodiments of the present application.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any of the multimedia data transmission methods provided by the embodiments of the present application can be executed by the computer program stored in the storage medium, so that the beneficial effects that any of the multimedia data transmission methods provided by the embodiments of the present application can be achieved, which are detailed in the previous embodiments and are not described herein.
The foregoing has described in detail a method, apparatus, electronic device and storage medium for multimedia data transmission provided by the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing description of the embodiments is only for aiding in understanding the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (9)

1. A multimedia data transmission method applied to a transmitting device, comprising:
acquiring a data transmission request, wherein the data transmission request indicates a target multimedia and receiving equipment for receiving the target multimedia;
establishing a Bluetooth connection with the receiving device;
responding to the multimedia data sending operation triggered by aiming at the target multimedia, and monitoring the data to be transmitted corresponding to the target multimedia currently cached in a Bluetooth transmission queue;
calculating the data duty ratio of the data to be transmitted in a multimedia transmission queue;
acquiring a range interval corresponding to the data duty ratio;
When the range interval corresponding to the data duty ratio is a first range interval, the transmitting power of Bluetooth in the transmitting equipment is improved;
when the range interval corresponding to the data duty ratio is a second range interval, the transmission interval of the data to be transmitted is increased;
when the range interval corresponding to the data duty ratio is a third range interval, backing up the data to be transmitted, and cutting the backup data;
and transmitting the target multimedia to the receiving equipment based on the improvement of the transmitting power of Bluetooth in the transmitting equipment, or transmitting the target multimedia to the receiving equipment based on the improvement of the transmission interval of the data to be transmitted, or transmitting the target multimedia to the receiving equipment based on the backup data after clipping.
2. The method of claim 1, wherein said increasing the transmit power of bluetooth in said transmitting 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.
3. The method of claim 2, wherein prior to transmitting the target multimedia into the receiving device based on bluetooth with increased transmit power, further comprising:
After the transmitting power is increased, detecting the data duty ratio of the data to be transmitted in the multimedia transmission queue;
and when the range interval corresponding to the detected data duty ratio is the first range interval, the transmitting power of the Bluetooth in the transmitting equipment and the transmitting power of the Bluetooth in the receiving equipment are increased to the maximum value.
4. The method of claim 1, wherein transmitting the target multimedia to the receiving device based on the post-clip backup data comprises:
the data of the N frame in the cut backup data is reserved, and the data of the (n+1) frame of the cut backup data is deleted to obtain target data, wherein N is a positive integer;
transmitting the target multimedia to the receiving device based on the target data.
5. The method of claim 4, wherein the transmitting the target multimedia into the receiving device based on the target data comprises:
detecting the data duty ratio of the target data in the multimedia transmission queue;
and when the data duty ratio of the target data in the multimedia transmission queue is detected to be smaller than a preset value, transmitting the target multimedia to the receiving equipment.
6. The method as recited in claim 5, further comprising:
when the data duty ratio of the target data in the multimedia transmission queue is detected to be larger than or equal to a preset value, reserving the data of an N frame in the target data, and deleting the data of an (n+1) 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.
7. A multimedia data transmission apparatus applied to a transmitting device, comprising:
the system comprises an acquisition module, a receiving module and a processing module, wherein the acquisition module is used for acquiring a data transmission request, and the data transmission request indicates a target multimedia and receiving equipment for receiving the target multimedia;
the establishing module is used for establishing Bluetooth connection with the receiving equipment;
the monitoring module is used for 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;
the calculating unit is used for calculating the data duty ratio of the data to be transmitted in the multimedia transmission queue;
the acquisition subunit is used for acquiring a range interval corresponding to the data duty ratio;
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 duty ratio is a first range interval;
a second enhancing subunit, configured to enhance a transmission interval of the data to be transmitted when a range interval corresponding to the data duty ratio is a second range interval;
the backup subunit is used for backing up the data to be transmitted and cutting the backup data when the range interval corresponding to the data duty ratio is a third range interval;
a first transmission unit for transmitting the target multimedia to the receiving device based on increasing the transmission power of bluetooth in the transmitting device, or,
a second transmission unit for transmitting the target multimedia to the receiving device based on increasing a transmission interval of the data to be transmitted, or,
and the third transmission unit is used for transmitting the target multimedia to the receiving equipment based on the cut backup data.
8. An electronic device comprising a memory storing an application program and a processor for executing a computer program in the memory to perform the method of multimedia data transmission of any one of claims 1 to 6.
9. A storage medium storing a computer program to be loaded by a processor to perform the multimedia data transmission method of any one of claims 1 to 6.
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 CN113840269A (en) 2021-12-24
CN113840269B true 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)

Families Citing this family (2)

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

Citations (8)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102294040B1 (en) * 2015-01-19 2021-08-26 삼성전자 주식회사 Method and apparatus for transmitting and receiving data

Patent Citations (8)

* 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
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

Also Published As

Publication number Publication date
CN113840269A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
WO2021082875A1 (en) Method and apparatus for switching master and slave bluetooth headsets, bluetooth headset, and system
WO2021047390A1 (en) Method for reducing power consumption and mobile terminal
JP6742465B2 (en) Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker
CN113840269B (en) Multimedia data transmission method and device, electronic equipment and storage medium
JP7068491B2 (en) Monitoring method and terminal for uplink transmission cancellation instruction
US11501779B2 (en) Bluetooth speaker base, method and system for controlling thereof
CN110177363B (en) Bluetooth data transmission method and device, Bluetooth chip and storage medium
JP2008199621A (en) Method, device, and process for distributing task with time in mobile terminal
CN110189753B (en) Bluetooth sound box and control method, system and storage medium thereof
CN111818503A (en) Voice communication method, system, chip, electronic equipment and storage medium
CN113766477A (en) Device connection method, device, electronic device and computer readable medium
US11374623B2 (en) Connected isochronous stream swapping
JP2023508739A (en) Multicast service transmission method, transmission processing method and related equipment
JP6785332B2 (en) Bluetooth speaker Data processing method, device and bluetooth speaker
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
CN112867069B (en) Interference processing method and device, storage medium and electronic equipment
CN105828253A (en) Wireless connection control method and device in audio playing system
CN116137676B (en) Network acceleration method, electronic equipment, chip system and storage medium
JPWO2019184691A5 (en)
CN110856162A (en) Network configuration method and related device
CN113038317A (en) Earphone control method and device, Bluetooth earphone and storage medium
CN116074986B (en) Bluetooth connection method, device and system
CN102082948A (en) System, method and equipment for acquiring video information
WO2024060750A1 (en) Bluetooth switching method and apparatus, bluetooth connection method and apparatus, and electronic 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
GR01 Patent grant
GR01 Patent grant