Communication method, device, equipment, medium and product

By converting broadcast data packets into an encoding method supported by the first Bluetooth device in the terminal device, the problem of classic Bluetooth devices being unable to listen to broadcast data is solved, enabling users to listen to broadcast data without changing devices and improving the user experience.

CN120916112APending Publication Date: 2025-11-07BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202410550985.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2025-11-07

Smart Images

  • Figure CN120916112A_ABST
    Figure CN120916112A_ABST
Patent Text Reader

Abstract

The invention relates to a communication method and device, equipment, a medium and a product. The method comprises the steps that the communication equipment receives a broadcast data packet sent by broadcast equipment, converts first data into second data based on the broadcast data packet, and sends the second data to first Bluetooth equipment. According to the invention, the data can be converted based on the first coding mode and the second coding mode, and the first data is converted into the second data supported by the first Bluetooth device, so that a user can directly use the first Bluetooth device to listen to the radio without replacing the existing Bluetooth device, the fund is saved for the user, and the user experience is improved. And meanwhile, the use experience of the user is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of communication, and in particular, to a communication method, apparatus, device, medium and product. BACKGROUND

[0002] The broadcasting device can broadcast the to-be-broadcast data through a broadcast data packet, and a device supporting the broadcast listening technology can find and receive the broadcast data packet through scanning to play the to-be-broadcast data.

[0003] However, at present, most of the devices on the market do not support the broadcast listening technology. For some Bluetooth devices that can only support the classic Bluetooth communication protocol, the broadcast data cannot be directly received, which affects the user experience. SUMMARY

[0004] To overcome the problems in the related art, the present disclosure provides a communication method, apparatus, device, medium and product.

[0005] According to a first aspect of an embodiment of the present disclosure, a communication method is provided, comprising:

[0006] receiving a broadcast data packet sent by a broadcasting device, wherein the broadcast data packet comprises first data, and the first data is encoded in a first encoding manner supported by the broadcasting device;

[0007] converting the first data into second data based on the broadcast data packet, the second data being encoded in a second encoding manner supported by a first Bluetooth device, the first encoding manner being different from the second encoding manner, and the first Bluetooth device not supporting playing of the first data;

[0008] sending the second data to the first Bluetooth device.

[0009] In some embodiments, the broadcast data packet comprises first codec information, and the first codec information is used to represent the first encoding manner.

[0010] The converting the first data into second data based on the broadcast data packet comprises:

[0011] decoding the first data based on the first codec information to obtain original data;

[0012] encoding the original data in the second encoding manner to obtain the second data.

[0013] In some embodiments, the encoding the original data in the second encoding manner to obtain the second data comprises:

[0014] determine second codec information based on the first codec information, the second codec information being used to represent the second encoding mode, wherein a decoding speed using the first codec information is faster than an encoding speed using the second codec information;

[0015] encode the original data based on the second codec information to obtain the second data.

[0016] In some embodiments, the first codec information includes a code rate of the first data, and the second codec information includes a code rate of the second data, the code rate of the second data being less than the code rate of the first data.

[0017] In some embodiments, the encoding the original data using the second encoding mode to obtain the second data includes:

[0018] determine a playing duration corresponding to a data amount of the original data buffered in the second encoding mode;

[0019] encode the original data buffered based on the playing duration exceeding a preset threshold to obtain the second data.

[0020] In some embodiments, the communication method further includes:

[0021] display, based on a first instruction, Bluetooth devices that have established a connection, the types of the Bluetooth devices including a second Bluetooth device and the first Bluetooth device, wherein the second Bluetooth device supports the first data playing;

[0022] determine, based on a first operation, a Bluetooth device selected for listening to a broadcast; the first operation being used to instruct listening to a broadcast;

[0023] send an operation instruction based on a type of the Bluetooth device selected.

[0024] In some embodiments, the sending the operation instruction based on the type of the Bluetooth device selected includes:

[0025] when the Bluetooth device selected is the second Bluetooth device, sending the operation instruction to the second Bluetooth device;

[0026] wherein the operation instruction is used to instruct the second Bluetooth device to listen to a broadcast data packet sent by the broadcast device, and the second Bluetooth device supports the first data playing.

[0027] In some embodiments, the sending the operation instruction based on the type of the Bluetooth device selected includes:

[0028] The selected Bluetooth device is the first Bluetooth device, and the receiving of the broadcast data packet is started.

[0029] According to a second aspect of the embodiments of the present disclosure, a communication device is provided, comprising:

[0030] a receiving module, configured to receive a broadcast data packet sent by a broadcast device, wherein the broadcast data packet comprises first data, and the first data is encoded in a first encoding mode supported by the broadcast device;

[0031] a converting module, configured to convert the first data into second data based on the broadcast data packet, the second data being encoded in a second encoding mode supported by a first Bluetooth device, the first encoding mode being different from the second encoding mode, and the first Bluetooth device not supporting playing of the first data;

[0032] a sending module, configured to send the second data to the first Bluetooth device.

[0033] According to a third aspect of the embodiments of the present disclosure, a communication device is provided, comprising:

[0034] a processor;

[0035] a memory for storing processor-executable instructions;

[0036] The processor is configured to perform the communication method according to the first aspect of the present disclosure.

[0037] According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, when instructions in the storage medium are executed by a processor of a communication device, the communication device is enabled to perform the communication method according to the first aspect of the present disclosure.

[0038] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, the computer program product comprising computer instructions stored in a computer-readable storage medium; a processor of a communication device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the communication device performs the communication method according to the first aspect of the present disclosure.

[0039] With the above method of the present disclosure, the following beneficial effects are achieved: with the method of the present disclosure, the communication device receives the broadcast data packet sent by the broadcast device, and converts the first data in the broadcast data packet that the first Bluetooth device does not support playing into second data that the first Bluetooth device supports playing based on the first encoding mode and the second encoding mode, and sends the second data to the first Bluetooth device, so that the user does not need to replace the existing Bluetooth device, and can directly use the first Bluetooth device to listen to the broadcast, which not only saves the user's money, but also improves the user's use experience.

[0040] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the description.

[0042] Figure 1 is a schematic diagram of an application scenario according to an exemplary embodiment.

[0043] Figure 2 is a flowchart of a communication method according to an exemplary embodiment.

[0044] Figure 3 is a block diagram of a data conversion device according to an exemplary embodiment.

[0045] Figure 4 is a flowchart of a communication method according to an exemplary embodiment.

[0046] Figure 5 is a flowchart of a communication method according to an exemplary embodiment.

[0047] Figure 6 is a schematic diagram of a display interface of a terminal device according to an exemplary embodiment.

[0048] Figure 7 is a schematic diagram of an application scenario according to an exemplary embodiment.

[0049] Figure 8 is a block diagram of a communication device according to an exemplary embodiment.

[0050] Figure 9 is a block diagram of a communication device according to an exemplary embodiment. DETAILED DESCRIPTION

[0051] The exemplary embodiments will be described in detail below with reference to the drawings. The following description is only examples of the exemplary embodiments and does not represent all of the embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0052] At present, the low-power Bluetooth technology is developing, and the power consumption of the low-power Bluetooth technology is greatly reduced compared with the classic Bluetooth technology. The working principles of the classic Bluetooth device and the low-power Bluetooth device are completely different. The low-power Bluetooth device can directly listen to the broadcast data of the broadcast device, and the classic Bluetooth device complying with the classic Bluetooth communication protocol does not support the broadcast listening technology.

[0053] Based on the Bluetooth technology protocol standard, the broadcast device sends a broadcast data packet to the outside in a broadcast manner, and the device supporting the broadcast listening technology receives the broadcast data packet and plays the to-be-played data (audio data) in the broadcast data packet. However, because the development time of the broadcast listening technology is short, there are few devices supporting the broadcast listening technology on the market at present, and most of them are classic Bluetooth devices that do not support the broadcast listening technology. Users using the classic Bluetooth device cannot listen to the broadcast, and need to replace the device to be able to listen to the broadcast, which increases the device purchase cost of the users.

[0054] To solve the above problems, the present disclosure provides a communication method. By using the method in the present disclosure, the communication device receives the broadcast data packet sent by the broadcast device, and converts the first data in the broadcast data packet that the first Bluetooth device does not support playing into second data that the first Bluetooth device supports playing based on a first encoding manner and a second encoding manner, and sends the second data to the first Bluetooth device. In this way, the user can listen to the broadcast data using the first Bluetooth device without replacing the existing Bluetooth device, which not only saves the user's money, but also improves the user's experience.

[0055] The present disclosure is applicable to a broadcast scene, such as an audio broadcast scene, for example. Figure 1 As shown in the schematic diagram of the application scenario of the present disclosure, the schematic diagram of the application scenario includes at least one first Bluetooth device (a plurality of first Bluetooth devices are shown in the figure), a broadcast device, and a terminal device (i.e., a communication device). To make the present disclosure clearer and easier to understand, the relationship between the first Bluetooth device, the broadcast device, and the terminal device is represented by the data flow direction (the arrow direction shown in the figure represents the data flow direction). Figure 1 Figure 1 Specifically, with reference to

[0056] Specifically, with reference to Figure 1 ​The data flow of the present disclosure is that the broadcast device sends the broadcast data packet outward, the terminal device receives the broadcast data packet, and the terminal device sends the audio data generated based on the broadcast data packet to the first Bluetooth device. The terminal device (that is, the communication device using the method in the present disclosure) can be a mobile phone, a tablet computer, a smart wearable device, etc. used by a user, and the first Bluetooth device can be a Bluetooth device that does not support broadcast listening technology, such as a classic Bluetooth device (that is, a Bluetooth device complying with a classic Bluetooth protocol), used by the user, and the first Bluetooth device is in Bluetooth connection with the terminal device of the user. Among them, the application scenario can include at least one first Bluetooth device, and when the application scenario includes multiple first Bluetooth devices, the terminal device is in Bluetooth communication connection with each first Bluetooth device respectively.

[0057] It should be noted that the first Bluetooth device can be a device such as a Bluetooth headset or a sound box that lacks a user interface, and it is inconvenient for the user to target the first Bluetooth device for operation. By setting a terminal device with a display interface, the user can complete the control of the first Bluetooth device on the user interface of the terminal device. The terminal device receives the broadcast data packet sent by the broadcast device, the terminal device converts the data type in the broadcast data packet into a data type supported by the first Bluetooth device, and the first Bluetooth device receives the audio data converted by the terminal device and plays the audio data. For example, the user can select the first Bluetooth device as the Bluetooth device for listening to the broadcast on the user interface of the terminal device, thereby improving the operation experience of the user and facilitating the user to select the Bluetooth device for listening to the broadcast according to the needs.

[0058] Among them, as Figure 1 shown, the first Bluetooth device can be connected to the terminal device through an EDR (Enhanced data rate) connection. The EDR technology can improve the data transmission speed of the Bluetooth device. In addition, due to the bandwidth advantage of the EDR technology, the terminal device can simultaneously connect multiple first Bluetooth devices.

[0059] The exemplary embodiment of the present disclosure provides a communication method applied to a terminal device. The terminal device has a communication function and can be in communication connection with a Bluetooth device. The terminal device can be a smart device such as a mobile phone, a tablet computer, a notebook computer, a smart robot, and a smart wearable device. In addition, the terminal device is also provided with various hardware resources and an energy storage device for providing power for the operation of the various hardware resources.

[0060] As Figure 2 shown, the communication method shown in the embodiment includes the following steps.

[0061] S201, receiving a broadcast data packet sent by a broadcast device.

[0062] S202. Based on the broadcast data packet, convert the first data into the second data.

[0063] S203, Send the second data to the first Bluetooth device.

[0064] It should be noted that the broadcasting device in this embodiment can be a broadcasting device already existing in related technologies. The first Bluetooth device is a classic Bluetooth device, which cannot parse and play the data format in the broadcast data packets sent by the broadcasting device. Since the first Bluetooth device cannot directly listen to the broadcast data packets sent by the broadcasting device, therefore, referring to... Figure 1 The illustrated application scenario diagram shows that a terminal device can receive broadcast data packets sent by a broadcasting device, process the data in the broadcast data packets, convert it into a data format that a first Bluetooth device can play, and then send the audio data in the format that the first Bluetooth device can play to the first Bluetooth device, which will then play the audio content in the broadcast data packets.

[0065] In step S201, when there are multiple first Bluetooth devices that establish a connection with the terminal device, the first Bluetooth device that performs audio data playing can be selected on an interface in the terminal device. In an example, the first data is included in the broadcast data packet, and the first data is encoded in a first encoding manner supported by the broadcast device. The first encoding manner refers to an encoding manner adopted by the broadcast device when broadcasting the to-be-broadcast data. The first encoding manner can be an LC3 (Low Complexity Communications Codec) encoding manner, an LC3plus encoding manner, or an APTX lossness encoding manner. The encoding process of the LC3 encoding manner can be to convert a sound signal in a time domain to a frequency domain using a low-delay improved discrete cosine transform. In the frequency domain, a spectral noise shaping module processes each frequency component to reduce perceptible spectral quantization noise. A temporal noise shaping module reduces perceptible temporal quantization noise. The signal components processed by the spectral noise shaping module and the temporal noise shaping module are quantized by a spectral quantizer module. Spectral coefficients quantized to 0 will be replaced by noise during decoding to reduce artifacts. The spectral coefficients are subjected to an entropy encoding and multiplexing process to form an audio encoding bitstream. The LC3 encoding manner is a low-delay audio encoding technology that can achieve efficient compression and provide better sound quality while maintaining extremely low delay. In this way, at the same time of the same data transmission rate, the LC3 encoding manner can transmit higher-quality audio. At the same time, the LC3 encoding manner also has better fault tolerance and can maintain good sound quality in poor network environments. In addition, the LC3 encoding manner also supports variable bit rate encoding. This means that the LC3 encoder can automatically adjust the encoding rate during transmission according to the complexity of the audio signal, thereby achieving more efficient compression.

[0066] The LC3plus encoding manner is a superset of the LC3 encoding manner and includes all the functions of the LC3 encoding manner. In addition, the LC3plus encoding manner also has transmission robustness and a high-resolution encoding mode, and the data encoded by the LC3plus encoding manner can obtain a higher bit rate and a higher signal-to-noise ratio. At the same time, the LC3plus encoding manner also provides a flexible error concealment algorithm, which can optimize various audio signals and provide high-quality data transmission.

[0067] The APTX lossness coding mode is a lossless compression coding mode, which can provide a bit rate of up to 1 Mbps, and can also be smoothly reduced to 140 kbits and 16 bit / 44.1 kHz audio transmission in a crowded radio frequency environment, thereby minimizing audio interruption or interference, and bringing a CD-quality lossless audio experience. In order to save space, the process of encoding using the LC3plus coding mode and the APTX lossness coding mode in the present embodiment will not be discussed.

[0068] In addition, it should be noted that the broadcast data packet can also include the broadcast address of the broadcast device, the data size of the first data, and the like, and the broadcast device can also send an extension data packet before sending the broadcast data packet, the extension data packet including auxiliary information such as the transmission channel, the transmission time point, and the sound channel distribution of the broadcast data packet. Of course, the extension data packet and the broadcast data packet can be sent in no particular order, or can be sent as a whole.

[0069] In step S202, the first Bluetooth device does not support the first data to be played and cannot decode the first data, the first Bluetooth device supports the second data, the second data is encoded in a second coding mode supported by the first Bluetooth device, and the second coding mode refers to an encoding mode of data transmitted based on the A2DP (Advanced Audio Distribution Profile) protocol, that is, the first coding mode is different from the second coding mode. In order to enable the first Bluetooth device to play the broadcast data, it is necessary to convert the first data into the second data.

[0070] The encoding mode of the data transmitted based on the A2DP protocol includes multiple encoding modes, and different encoding modes can be used for different original data. For example, the original data f corresponds to the encoding mode F, and the original data e corresponds to the encoding mode E. It should be noted that the principle of the A2DP protocol is a Bluetooth protocol that allows wireless transmission of high-quality audio data to Bluetooth earphones, speakers, or other audio devices. The A2DP protocol can compress and encode audio data based on Bluetooth technology, and then wirelessly transmit the data to the receiving end for decoding and playing. Specifically, the encoding mode of the data transmitted based on the A2DP protocol can include an SBC (Sub-Band Coding) encoding mode, an AAC (Advanced Audio Coding) encoding mode, and the like. The basic principle of the SBC encoding mode is to divide the frequency of the audio signal into several sub-bands, and then independently encode each sub-band. Because the SBC encoding mode has a low bit rate and a high compression rate, the SBC encoding mode is an encoding mode supported by all Bluetooth devices. The AAC encoding mode can provide a large compression rate, thereby obtaining higher sound quality with smaller file size; can support multiple channels; can provide up to 48 full-range channels; has higher resolution; supports a maximum sampling frequency of 96kHZ; has higher decoding efficiency; and requires fewer resources for decoding and playing. The specific type of the second encoding mode in this embodiment can be set and selected according to the data type that the first Bluetooth device can support, as long as the first Bluetooth device can decode and play the second data after receiving the second data. The process of encoding the second data using the second encoding mode in this embodiment is a relatively mature encoding technology, and will not be discussed here.

[0071] In one example, the first encoding mode and the second encoding mode can be included in the broadcast data packet, that is, the first encoding mode and the second encoding mode are predetermined in the broadcast data packet, and the second data designated for the first Bluetooth device to play is encoded by the second encoding mode. For example, the first encoding mode G and the second encoding mode E are included in the broadcast data packet, and in the process of receiving the broadcast data packet of the broadcast device and performing data conversion processing by the terminal device, the second data can be directly determined based on the pre-stored first encoding mode G and the second encoding mode E.

[0072] In another example, the broadcast data packet can only include the first encoding mode, and the second encoding mode can be determined based on actual conditions, for example, the second encoding mode corresponding to the second data that can be played by the first Bluetooth device can be determined according to the performance of the first Bluetooth device, the data amount of the original data parsed by the first data, or the data conversion mode pre-stored by the terminal device.

[0073] During implementation, for example, the second encoding method can be determined based on the first encoding method. The terminal device has a pre-stored correspondence between the first encoding method and the second encoding method. If the first encoding method is LC3plus encoding method, the second encoding method can be determined to be AAC encoding method by querying the correspondence.

[0074] For example, the second encoding method can be determined based on the encoding parameters of the first and second encoding methods. If the code rate of the first encoding method is A, then encoding methods with a code rate less than A can be determined as the second encoding method. If there are multiple encoding methods with a code rate less than A, further selection can be made until a suitable second encoding method is determined.

[0075] For example, a second encoding method can be determined based on the first encoding method and the first data. The amount of data in the original data (original audio stream) can be determined using the first encoding method and the first data, thus determining the second encoding method. When the amount of data in the original data is large, AAC encoding is used; while when the amount of data in the original data is small, SBC encoding is used.

[0076] like Figure 3 The diagram shown is a block diagram of a data conversion device. Figure 3 The system includes a first encoder 31, a first decoder 32, a buffer 33, and a second encoder 34. The first encoder 31, located in the broadcasting equipment, is used to encode the raw data using a first encoding method to obtain first data. The first decoder 32, buffer 33, and second decoder 34 are all located in the terminal equipment. The first decoder 32 uses the same encoding and decoding method as the first encoder 31, and is used to decode the first data encoded by the first encoder 31 to obtain the raw data. The buffer 33 is used to store the raw data. The second encoder 34 is used to encode the raw data using a second encoding method to obtain second data. The raw data refers to pure audio stream data. Because the raw data is relatively large, it needs to be encoded (i.e., compressed) to ensure smooth data transmission, thereby reducing the data size and facilitating data transmission.

[0077] Combination Figure 3 As shown, the process of converting the first data into the second data is as follows:

[0078] The broadcast device encodes the original data by using the first encoder 31 to obtain the first data. The terminal device receives the first data and decodes the first data by using the first decoder 32 corresponding to the first encoder 31 to obtain the original data and stores the original data in the buffer area 33. The terminal device encodes the original data by using the second encoder 34 to obtain the second data supported by the first Bluetooth device for playing. For example, the broadcast data packet includes the first encoding mode as the LC3 encoding mode and the second encoding mode as the SBC encoding mode. In the application process, the broadcast device can directly encode the original data by using the LC3 encoder to obtain the first data, the terminal device can receive the first data and decode the first data by using the LC3 decoder corresponding to the LC3 encoder to obtain the original data, and encode the original data by using the SBC encoder to obtain the second data supported by the first Bluetooth device for playing.

[0079] It should be noted that when the second encoding mode needs to be determined additionally, the second encoder can be defined as an A2DP encoder, and the A2DP encoder includes a plurality of circuit corresponding to the encoding modes of the data transmitted based on the A2DP protocol and a selection switch. When the final second encoding mode is determined, the corresponding encoder circuit can be turned on by the selection switch. For example, when the final second encoding mode is determined as the SBC encoding mode, the selection switch can be connected with the SBC encoder circuit, so that the SBC encoder circuit is turned on. In addition, when the second encoding mode is included in the broadcast data packet, the encoder associated with the second encoding mode can be directly determined; or the second encoder can also be selected again according to the second encoding mode each time. In this way, the robustness and scalability of the second encoder can be improved to expand the application range of the second encoder.

[0080] It should be noted that the terminal device needs to decode the first data to obtain the original data and encode the original data to obtain the second data. If the decoding speed of the first data is less than the encoding speed of the original data, after the existing original data is encoded, the first data needs to be decoded, so that the playing process of the to-be-played data will appear the phenomenon of lag. Therefore, in the embodiment, the decoding speed of the first data is limited to be greater than the encoding speed of the original data, so that there is always original data in the encoding process, thereby avoiding the playing lag and improving the listening experience and use experience of the user.

[0081] In step S203, the second data is data that the first Bluetooth device supports playing, and correspondingly, in order to enable the first Bluetooth device to play the broadcast content, the first Bluetooth device is further provided with a second decoder corresponding to a second encoder to decode the second data to obtain the original data. By using the method in this embodiment, the first data that the first Bluetooth device does not support is converted into the second data that the first Bluetooth device supports, so that the first Bluetooth device successfully receives the broadcast data sent by the broadcast device without the need to replace the first Bluetooth device.

[0082] The embodiment can enable the first Bluetooth device to receive the broadcast data without the need of the user to replace the existing Bluetooth device, thereby saving the user's cost and improving the user's experience.

[0083] According to an exemplary embodiment, as shown in Figure 4 The communication method in this embodiment includes:

[0084] S401, receiving a broadcast data packet sent by a broadcast device.

[0085] S402, decoding the first data based on the first codec information to obtain the original data.

[0086] S403, encoding the original data in a second encoding manner to obtain second data.

[0087] S404, sending the second data to the first Bluetooth device.

[0088] The step S404 is the same as the step S203 in the above embodiment, and will not be described here.

[0089] In step S401, in one example, the broadcast data packet can only include the first codec information, and the first codec information is used to represent the first encoding manner, and can include encoding information of the first encoding manner or decoding information of a decoding manner corresponding to the first encoding manner, such as code rate, sampling rate (8kHz, 16kHz, 24kHz, 32kHz, 44.1kHz or 48kHz), frame interval (10ms or 7.5ms), data bit width (16bits, 24bits or 32bits) and the like.

[0090] In another example, the broadcast data packet can further include first codec information corresponding to the first encoding mode, and second codec information corresponding to the second encoding mode. The specific content of the first codec information can refer to the previous example, which will not be repeated here. Similarly, the second codec information for representing the second encoding mode can include encoding information of the second encoding mode or decoding information of a decoding mode corresponding to the second encoding mode, such as, encoding or decoding code rate, sampling rate (8 kHz, 16 kHz, 24 kHz, 32 kHz, 44.1 kHz or 48 kHz), channel mode (mono, stereo, stereo or joint stereo), block length (4, 8, 12 or 16), sub-band number (4 or 8), allocation mode, bit pool (range [2, 250]) and the like.

[0091] It should be noted that the encoding information and the decoding information in the first codec information or the second codec information should be corresponding, for example, the encoding code rate in the encoding information in the first codec information is A1, and the decoding rate in the decoding information in the first codec information is also A1; the sampling rate in the encoding information in the second codec information is A2, and the sampling rate in the decoding information in the second codec information is also A2, so as to ensure the consistency of the encoding process and the decoding process.

[0092] In step S402, the first codec information can be applied to the first decoder, so that the first decoder has the properties of the first codec information. Then, the first data is decoded by using the first decoder having the properties of the first codec information to obtain the original data. The decoding process using the first codec information is a relatively mature encoding technology, which will not be discussed here.

[0093] In step S403, in one example, when the second codec information is included in the broadcast data packet, the original data can be directly encoded based on the second codec information to obtain the second data. In another example, when only the first codec information is included in the broadcast data packet, the second codec information can be additionally determined based on actual conditions. For example, the second codec information can be determined based on the performance of the first Bluetooth device, the data amount of the original data parsed from the first data, or a corresponding relationship pre-stored by the terminal device. Specifically, the second codec information can be determined based on the first codec information. For example, the second codec information can be determined based on a corresponding relationship between the first codec information and the second codec information. For example, the first codec information X corresponds to the second codec information Y. If the current first codec information is the first codec information X, the second codec information can be determined as the second codec information Y. For another example, the second codec information can be determined based on the data amount of the original data decoded by using the first codec information. For example, the data amount of the original data can be determined by using the code rate or the sampling rate or other information in the first codec information, and the second codec information can be determined based on the data amount of the original data.

[0094] It should be noted that, regardless of the manner of determining the second codec information, the determined second codec information should have the properties of appropriate code rate and good listening experience, so as to ensure the user experience and listening experience. In the application process, if it is detected that the listening experience of the second data encoded based on the determined second codec information is poor (for example, the playback is interrupted, the playback is intermittent, etc.), the parameters in the second codec information can be adjusted based on actual conditions, for example, the code rate or the sampling rate or other parameters in the second codec information can be adjusted. In this way, the most appropriate second codec information can be determined by using the first codec information (and subsequent adjustment), so that the second data with smooth playback is obtained, and the listening experience of the user is improved.

[0095] In addition, it should be noted that the code rate of the first data is included in the first codec information, the code rate of the second data is included in the second codec information, based on the fact that the speed of decoding the first data by the terminal device is greater than the speed of encoding the original data, and in the process of encoding and decoding, the code rate can represent the size of data encoded by the encoder per second or the size of data decoded by the decoder per second, the code rate of the second data should be less than the code rate of the first data. Other information / parameters in the second codec information can be set and selected based on actual needs on the basis of ensuring the listening experience of the user, the A2DP protocol specification, and the good playback sound effect of the audio, which is not limited in the embodiment.

[0096] In addition, in order to further prevent the playing from being stalled, the original data decoded based on the first coding information can be stored in a cache area, and the original data is encoded based on the second coding information after the data amount of the original data reaches a certain threshold. In an example, the data amount of the original data stored in the cache area can be determined to correspond to a playing time length in the second encoding mode, and the original data is encoded based on the second coding information when the playing time length exceeds a preset threshold, to obtain second data. The specific value of the preset threshold is not limited in the embodiment, and the preset threshold can be 1s, 2s, etc.

[0097] In the embodiment, the first data can be decoded based on the first coding information to obtain original data, and the original data is encoded based on the second coding information to obtain second data, so as to realize the conversion between the first data and the second data. In this way, the first Bluetooth device that cannot originally listen to the broadcast can be used to listen to the broadcast, and the effect of using the first Bluetooth device to listen to the broadcast is achieved without the user needing to replace the existing Bluetooth device, thereby saving the user's money and improving the user's use experience.

[0098] According to an exemplary embodiment, as shown in Figure 5 The communication method in the embodiment includes:

[0099] S501, display the Bluetooth device that has established a connection based on the first instruction.

[0100] S502, determine the Bluetooth device selected for listening to the broadcast based on the first operation.

[0101] S503, judge the type of the selected Bluetooth device, if the type of the selected Bluetooth device is the second Bluetooth device, execute S504; if the type of the selected Bluetooth device is the first Bluetooth device, execute S505.

[0102] S504, send an operation instruction to the second Bluetooth device.

[0103] S505, start receiving the broadcast data packet.

[0104] S506, receive the broadcast data packet sent by the broadcast device.

[0105] S507, decode the first data based on the first coding information to obtain original data.

[0106] S508, encode the original data in the second encoding mode to obtain second data.

[0107] S509, send the second data to the first Bluetooth device.

[0108] Steps S506-S509 are the same as steps S401-S404 in the above embodiments, and will not be described again here.

[0109] In step S501, in one example, the first instruction can be used to represent a viewing instruction for a Bluetooth device that has established a connection with the terminal device. For example, it could be an instruction corresponding to a click operation on the parent interface of the interface containing the Bluetooth device that has established a connection with the terminal device; or an instruction corresponding to a long press operation on the Bluetooth icon in the status bar. After receiving the first instruction, the terminal device displays the interface containing the Bluetooth device that has established a connection. For example, refer to... Figure 6 The diagram shows a display interface of a terminal device. Figure 6 It includes a first Bluetooth device C1, a first Bluetooth device C2, a second Bluetooth device D1, and a second Bluetooth device D2.

[0110] Bluetooth devices are categorized into second Bluetooth devices and first Bluetooth devices, where the second Bluetooth device supports first data playback. That is, the second Bluetooth device is a device that supports broadcast listening technology. For example... Figure 7 The diagram shown illustrates one application scenario. Figure 7 exist Figure 1 The schematic diagram of the application scenario shown is supplemented by a second Bluetooth device. For the second Bluetooth device: the terminal device (i.e., the communication device using the method of this disclosure) can connect to at least one second Bluetooth device, and the second Bluetooth device can listen to the broadcast data sent by the broadcast device. Figure 7 The data flow direction is used to represent the relationship between the second Bluetooth device, the first Bluetooth device, the terminal device, and the broadcast device. It should be noted that the terminal device can select the second Bluetooth device as the broadcast listening device. Since the data flow direction between the two is not mentioned in this embodiment, therefore... Figure 7 The relationship between the second Bluetooth device and the terminal device will not be described for the time being.

[0111] In step S502, the first operation is used to select a Bluetooth device and instruct the selected Bluetooth device to listen to the broadcast content. The first operation can be a click, double-click, or voice operation, etc., and is not limited here. Taking a click operation as an example, when the user clicks on one of the Bluetooth devices (e.g., the second Bluetooth device D1), that Bluetooth device (the second Bluetooth device D1) is instructed to listen to the broadcast. Based on the characteristic that the second Bluetooth device D1 supports the playback of the first data, the second Bluetooth device can directly receive the broadcast data packets sent by the broadcast device, decode the first data to obtain the original data, and play it.

[0112] In step S503, since the first Bluetooth device and the second Bluetooth device are different types of Bluetooth devices, and the second Bluetooth device in the first Bluetooth device and the second Bluetooth device can support the first data playing, the first Bluetooth device does not support the first data playing, therefore, after the first operation, it is necessary to judge the type of the selected Bluetooth device, and corresponding data processing is carried out based on the type of the Bluetooth device. It should be noted that step S504 and step S505 are alternative selection.

[0113] In step S504, when the selected Bluetooth device is the second Bluetooth device, since the second Bluetooth device supports the first data playing, an operation instruction can be sent to the second Bluetooth device, and the operation instruction is used to instruct the second Bluetooth device to receive the broadcast data packet sent by the broadcast device. After receiving the broadcast data packet, the second Bluetooth device can decode the first data, and then obtain the original data and perform audio playing.

[0114] In step S505, when the selected Bluetooth device is the first Bluetooth device, since the first Bluetooth device does not support the first data playing, the terminal device will start receiving the broadcast data packet, and send the first data in the broadcast data packet to the first Bluetooth device after processing. In this way, it can be ensured that the user can use the first Bluetooth device as an audio playing device to listen to the broadcast content of the broadcast device.

[0115] The embodiment shows the way of obtaining the original data corresponding to the first Bluetooth device and the second Bluetooth device, which are two different types of Bluetooth devices. In this way, the application range of the method shown in the embodiment can be expanded, so that the method shown in the embodiment is applicable to a variety of Bluetooth devices.

[0116] The exemplary embodiment of the present disclosure provides a communication device, as shown in the figure, the present disclosure shows a block diagram of a communication device. Figure 8

[0117] The block diagram includes a receiving module 81, a conversion module 82 and a sending module 83. The receiving module 81 is used for receiving a broadcast data packet sent by a broadcast device, wherein the broadcast data packet includes first data, and the first data is encoded in a first encoding mode supported by the broadcast device. The conversion module 82 is used for converting the first data into second data based on the broadcast data packet, the second data is encoded in a second encoding mode supported by the first Bluetooth device, the first encoding mode is different from the second encoding mode, and the first Bluetooth device does not support the first data playing. The sending module 83 is used for sending the second data to the first Bluetooth device.

[0118] In some embodiments, the broadcast data packet includes first codec information, the first codec information is used to represent the first encoding mode, and the conversion module 82 is specifically used for: ​

[0119] decode the first data based on the first coding information to obtain original data;

[0120] encode the original data in the second coding mode to obtain second data.

[0121] In some embodiments, the conversion module 82 is specifically configured to:

[0122] determine the second coding information based on the first coding information, the second coding information being used to represent the second coding mode, wherein the speed of decoding by using the first coding information is faster than the speed of encoding by using the second coding information;

[0123] encode the original data based on the second coding information to obtain the second data.

[0124] In some embodiments, the first coding information comprises a code rate of the first data, and the second coding information comprises a code rate of the second data, the code rate of the second data being less than the code rate of the first data.

[0125] In some embodiments, the conversion module 82 is specifically configured to:

[0126] determine a playing duration corresponding to the data amount of the buffered original data in the second coding mode;

[0127] encode the buffered original data based on the playing duration exceeding a preset threshold to obtain the second data.

[0128] In some embodiments, the communication device further comprises a processing module, which is specifically configured to:

[0129] display the Bluetooth devices that have established a connection based on the first instruction, the types of the Bluetooth devices comprising the second Bluetooth device and the first Bluetooth device, wherein the second Bluetooth device supports playing of the first data;

[0130] determine the selected Bluetooth device for listening to the broadcast based on the first operation, the first operation being used to instruct to listen to the broadcast;

[0131] send an operation instruction based on the type of the selected Bluetooth device.

[0132] In some embodiments, the processing module is specifically configured to:

[0133] when the selected Bluetooth device is the second Bluetooth device, send the operation instruction to the second Bluetooth device;

[0134] wherein the operation instruction is used to instruct the second Bluetooth device to listen to the broadcast data packet sent by the broadcast device, and the second Bluetooth device supports playing of the first data.

[0135] In some embodiments, the processing module is specifically configured to:

[0136] The selected Bluetooth device is the first Bluetooth device, and the receiving the broadcast data packet is initiated.

[0137] Figure 9 is a block diagram of a communication device 900 according to an exemplary embodiment.

[0138] Referring to Figure 9 , the communication device 900 can include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0139] The processing component 902 usually controls overall operations of the communication device 900, such as operations associated with displaying, making phone calls, data communications, camera operations, and recording operations. The processing component 902 can include one or more processors 920 to execute instructions to complete all or part of steps of the above methods. In addition, the processing component 902 can include one or more modules to facilitate interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0140] The memory 904 is configured to store various types of data to support operations of the communication device 900. Examples of these data include instructions for any application or method operating on the communication device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0141] The power supply component 906 provides power for various components of the communication device 900. The power supply component 906 can include a power supply management system, one or more power supplies, and other components associated with generating, managing and distributing power for the communication device 900.

[0142] The multimedia component 908 includes a display for the communication device 900 to provide an output interface between the communication device 900 and a user. In some embodiments, the display includes a liquid crystal display (LCD) and a touch panel (TP). If the display includes a touch panel, the display can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors for sensing touch, swiping, and gestures on the touch panel. The touch sensors can not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the communication device 900 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have a focal length and optical zoom capability.

[0143] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) for receiving an external audio signal when the communication device 900 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

[0144] The I / O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0145] The sensor component 914 includes one or more sensors for providing status assessments of various aspects of the communication device 900. For example, the sensor component 914 can detect an open / closed position of the communication device 900, relative positioning of components, such as a display and a keypad of the communication device 900, a change in position of the communication device 900 or a component of the communication device 900, the presence or absence of user contact with the communication device 900, the orientation or acceleration / deceleration / g-force and a temperature change of the communication device 900. The sensor component 914 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 914 can further include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0146] The communication component 916 is configured to facilitate wired or wireless communication between the communication device 900 and other devices. The communication device 900 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0147] In an exemplary embodiment, the communication device 900 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components, for performing the above-described methods.

[0148] In an exemplary embodiment, a non-transitory computer readable storage medium including instructions, such as the memory 904 including instructions, is also provided, which can be executed by the processor 920 of the communication device 900 to complete the above-described methods. For example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.

[0149] A non-transitory computer readable storage medium, when instructions in the storage medium are executed by a processor of a communication device, enables the communication device to perform a communication method provided by an exemplary embodiment of the present disclosure.

[0150] A computer program product, the computer program product including computer instructions stored in a computer readable storage medium; a processor of a communication device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the communication device performs a communication method provided by an exemplary embodiment of the present disclosure.

[0151] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the present disclosure being indicated by the following claims.

[0152] It should be understood that the present disclosure is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A communication method characterized by comprising: The method comprises: receiving a broadcast data packet sent by a broadcast device, wherein the broadcast data packet comprises first data encoded in a first encoding mode supported by the broadcast device; based on the broadcast data packet, converting the first data into second data encoded in a second encoding mode supported by a first Bluetooth device, the first encoding mode being different from the second encoding mode, and the first Bluetooth device not supporting playing of the first data; sending the second data to the first Bluetooth device.

2. The communication method according to claim 1, characterized by, The broadcast data packet comprises first codec information used to represent the first encoding mode; The method further comprises: decoding the first data based on the first codec information to obtain original data; encoding the original data in the second encoding mode to obtain the second data.

3. The communication method according to claim 2, wherein, The method further comprises: determining second codec information based on the first codec information, the second codec information being used to represent the second encoding mode, wherein the speed of decoding using the first codec information is faster than the speed of encoding using the second codec information; encoding the original data based on the second codec information to obtain the second data.

4. The communication method according to claim 3, wherein, The first codec information comprises a code rate of the first data, and the second codec information comprises a code rate of the second data, the code rate of the second data being smaller than the code rate of the first data.

5. The communication method according to claim 2, wherein, The method further comprises: determining a playing duration corresponding to the second encoding mode for a data amount of the original data buffered; based on the playing duration exceeding a preset threshold, encoding the buffered original data to obtain the second data.

6. The communication method according to any one of claims 1 to 5, characterized by, The method further comprises: based on a first instruction, displaying Bluetooth devices that have established a connection, the types of the Bluetooth devices comprising a second Bluetooth device and the first Bluetooth device, wherein the second Bluetooth device supports playing of the first data; based on a first operation, determining a selected Bluetooth device for listening to a broadcast, the first operation being used to instruct listening to a broadcast; based on the type of the selected Bluetooth device, sending an operation instruction.

7. The communication method according to claim 6, wherein, The method further comprises: when the selected Bluetooth device is the second Bluetooth device, sending the operation instruction to the second Bluetooth device; wherein the operation instruction is used to instruct the second Bluetooth device to receive the broadcast data packet sent by the broadcast device, and the second Bluetooth device supports playing of the first data.

8. The communication method according to claim 6, wherein, The method further comprises: when the selected Bluetooth device is the first Bluetooth device, starting to receive the broadcast data packet.

9. A communications device, characterized by The method comprises: receive a broadcast data packet sent by a broadcast device, wherein the broadcast data packet comprises first data, and the first data is encoded in a first encoding manner supported by the broadcast device; convert the first data into second data based on the broadcast data packet, wherein the second data is encoded in a second encoding manner supported by a first Bluetooth device, the first encoding manner is different from the second encoding manner, and the first Bluetooth device does not support playing of the first data; send the second data to the first Bluetooth device.

10. A communication device, characterized by comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the communication method of any one of claims 1-8.

11. A non-transitory computer-readable storage medium, comprising: When the instructions in the storage medium are executed by the processor of the communication device, the communication device is enabled to perform the communication method of any one of claims 1-8.

12. A computer program product, characterised in that, The computer program product comprises computer instructions stored in a computer readable storage medium; the processor of the communication device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the communication device performs the communication method of any one of claims 1-8.