Multimedia data processing method and apparatus, and information sending method and apparatus
Patent Information
- Application Number
- PCT/CN2026/074209
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-20
- Filing Date
- 2026-01-22
- Publication Date
- 2026-08-27
Smart Images

Figure CN2026074209_27082026_PF_FP_ABST
Abstract
Description
Multimedia data processing methods and apparatus, information transmission methods and apparatus
[0001] This application claims priority to Chinese Patent Application No. 202510193262.2, filed on February 20, 2025, entitled "Multimedia Data Processing Method and Apparatus, Information Transmission Method and Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, specifically to a multimedia data processing method and apparatus, and an information transmission method and apparatus. Background Technology
[0003] With the rapid development of internet technology, the transmission of multimedia data (such as audio and video data) between different electronic devices has become increasingly important in various application scenarios. During the transmission of multimedia data, signal interference often occurs in the environment where electronic devices are located, causing stuttering during playback at the data receiving end, severely impacting the user experience. Summary of the Invention
[0004] This application discloses a multimedia data processing method and apparatus, an information sending method and apparatus, an electronic device, and a program product, which can reduce the number of times the data receiving end stutters when playing multimedia data and improve the user experience.
[0005] This application discloses a multimedia data processing method applied to a first electronic device. The first electronic device establishes a communication connection with a second electronic device. The first electronic device sends multimedia data to the second electronic device through the communication connection, and the second electronic device plays the multimedia data. The method includes:
[0006] Obtain first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played.
[0007] Determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device. The second buffer information is used to indicate the amount of multimedia data stored in the second buffer.
[0008] If it is determined based on the first buffer information and the second buffer information that the second electronic device has a risk of playback stuttering, then a target operation is performed, which is used to reduce the amount of multimedia data stored in the second buffer.
[0009] This application discloses an information transmission method applied to a second electronic device. The second electronic device establishes a communication connection with a first electronic device. The first electronic device sends multimedia data to the second electronic device through the communication connection, and the second electronic device plays the multimedia data. The method includes:
[0010] Send first buffer information to the first electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played.
[0011] The first buffer information is used to trigger the first electronic device to determine the second buffer information corresponding to the second buffer, and to perform a target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information; the second buffer is used to buffer multimedia data to be transmitted from the first electronic device to the second electronic device, the second buffer information is used to indicate the amount of multimedia data stored in the second buffer, and the target operation is used to reduce the amount of multimedia data stored in the second buffer.
[0012] This application discloses a multimedia data processing apparatus applied to a first electronic device. The first electronic device establishes a communication connection with a second electronic device. The first electronic device sends multimedia data to the second electronic device through the communication connection, and the second electronic device plays the multimedia data. The apparatus includes:
[0013] The acquisition module is used to acquire first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played.
[0014] The determining module is used to determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device. The second buffer information is used to indicate the amount of multimedia data stored in the second buffer.
[0015] The operation module is used to perform a target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information. The target operation is used to reduce the amount of multimedia data stored in the second buffer.
[0016] This application discloses an information transmitting device applied to a second electronic device. The second electronic device establishes a communication connection with a first electronic device. The first electronic device sends multimedia data to the second electronic device through the communication connection, and the second electronic device plays the multimedia data. The device includes:
[0017] The sending module is used to send first buffer information to the first electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played.
[0018] The first buffer information is used to trigger the first electronic device to determine the second buffer information corresponding to the second buffer, and to perform a target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information; the second buffer is used to buffer multimedia data to be transmitted from the first electronic device to the second electronic device, the second buffer information is used to indicate the amount of multimedia data stored in the second buffer, and the target operation is used to reduce the amount of multimedia data stored in the second buffer.
[0019] This application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the method described in any of the above embodiments.
[0020] This application discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor in an electronic device, causes the electronic device to perform the method described in any of the above embodiments.
[0021] This application discloses a computer program product, including a computer program, which, when executed by a processor in an electronic device, causes the electronic device to perform the method described in any of the above embodiments.
[0022] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features and advantages of this application will be apparent from the specification, drawings, and claims. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1A is a schematic diagram of audio data transmission in related technologies;
[0025] Figure 1B is a schematic diagram of data transmission between the data sending end and the data receiving end in the related technology;
[0026] Figure 2 is an application scenario diagram of a multimedia data processing method and an information sending method in one embodiment;
[0027] Figure 3 is a flowchart of a multimedia data processing method in one embodiment;
[0028] Figure 4 is a flowchart of a multimedia data processing method in another embodiment;
[0029] Figure 5A is an interaction timing diagram between the first electronic device and the second electronic device in one embodiment;
[0030] Figure 5B is an interaction timing diagram of the first electronic device and the second electronic device in another embodiment;
[0031] Figure 6 is a flowchart of a multimedia data processing method in another embodiment;
[0032] Figure 7 is a flowchart of a multimedia data processing method in another embodiment;
[0033] Figure 8 is a flowchart of an information sending method in one embodiment;
[0034] Figure 9 is a block diagram of a multimedia data processing device in one embodiment;
[0035] Figure 10 is a block diagram of an information transmission device in one embodiment;
[0036] Figure 11 is a structural block diagram of an electronic device in one embodiment. Detailed Implementation
[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0038] It should be noted that the terms "comprising" and "having," and any variations thereof, in the embodiments and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0039] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first electronic device may be referred to as a second electronic device, and similarly, a second electronic device may be referred to as a first electronic device. Both the first electronic device and the second electronic device are electronic devices, but they are not the same electronic device. The term "multiple" as used in this application refers to two or more. The term "and / or" as used in this application refers to one of the solutions, or any combination of multiple solutions.
[0040] During multimedia data transmission, the data sending end encodes the multimedia data to obtain data packets, and then sends these data packets to the data receiving end through a communication connection. After receiving the data packets from the data sending end, the data receiving end decodes them to obtain the multimedia data to be played, and then plays the multimedia data.
[0041] Taking a scenario of audio data transmission based on the Bluetooth communication protocol as an example, as shown in Figure 1A, the data sending end (i.e., the Source end) encodes the raw audio data according to the negotiated encoding parameters using the Bluetooth audio encoder. The data is then encapsulated into data packets by the L2CAP (Logical Link Control and Adaptation Protocol) layer and the Bluetooth Controller in the Bluetooth protocol stack, and transmitted to the data receiving end (i.e., the Sink end) via a wireless channel. The Sink end receives the data packets sent by the Source end and decapsulates them using the Bluetooth Controller and the L2CAP layer. The audio decoder then decodes the audio data carried in the data packets to obtain the raw audio data, which is then played back by a playback module (which may include an audio amplifier unit, a speaker, etc.).
[0042] For example, Figure 1B is a schematic diagram of data transmission between a data sender and a data receiver in related technologies. As shown in Figure 1B, the source sends a data packet to the sink. After receiving the data packet, if the sink parses the data packet normally, it will reply with an ACK (Acknowledgment) signal to the source. The source can set a timeout period. After sending each data packet, the source will wait for the ACK (Acknowledgment) signal from the sink. If the source receives the ACK signal within the timeout period, it will continue to send the next data packet; if it does not receive the ACK signal from the sink or receives a NAK (Negative Acknowledgment) signal within the timeout period, it will retransmit the data packet.
[0043] Before starting to play the received multimedia data, the sink first caches a certain amount of multimedia data in the playback buffer. During playback, it retrieves the cached multimedia data from the playback buffer and plays it while parsing the received data packets to obtain multimedia data and placing it into the playback buffer. This ensures that the playback buffer stores a certain amount of multimedia data, guaranteeing smooth playback and improving anti-interference capabilities.
[0044] In situations where there is significant signal interference in the network environment at both the Source and Sink ends, data packet loss may occur. Data packets are prone to prolonged and frequent retransmissions, causing them to accumulate in the Source's transmission buffer. If this accumulation occurs in the Bluetooth buffer at the Source, the Sink end will also be unable to receive data packets. If the signal interference is strong or lasts for a long time, it will cause playback stuttering at the Sink end. The main reasons for this stuttering are as follows:
[0045] Reason 1: Due to signal interference in the network environment, the sink cannot receive data packets in time, and therefore cannot put multimedia data into the playback buffer in time. When the multimedia data in the playback buffer of the sink is completely retrieved, the playback buffer will not have any buffered multimedia data, which will cause the playback on the sink to stutter.
[0046] Reason 2: Due to signal interference in the network environment, data packets keep piling up in the transmission buffer of the source end. As the amount of data in the transmission buffer of the source end increases, a flush operation will be triggered when it exceeds a certain limit. This flush operation will clear the data in the transmission buffer, causing the multimedia data sent from the source end to the sink end to be discontinuous, thus causing playback stuttering on the sink end.
[0047] When the source performs a flush operation on the data in the transmission buffer, it usually only considers the number of data packets cached in the source's transmission buffer, which has a large lag and may cause the situations described in reason one and reason two above to occur continuously, resulting in multiple playback stutters on the sink, which seriously affects the user experience.
[0048] The multimedia data processing method and apparatus, information transmission method and apparatus, electronic device, and program product provided in this application can reduce the number of times the data receiving end experiences stuttering when playing multimedia data, thereby improving the user experience.
[0049] Figure 2 illustrates an application scenario of a multimedia data processing method and an information sending method in one embodiment. As shown in Figure 2, the multimedia data processing method can be applied to a first electronic device 210, and the information sending method can be applied to a second electronic device 220.
[0050] The first electronic device 210 may include, but is not limited to, mobile phones, wearable devices (such as smartwatches, smart glasses, etc.), vehicle terminals, tablet computers, laptop computers, PCs (Personal Computers), and the second electronic device 220 may include, but is not limited to, mobile phones, wearable devices, vehicle terminals, tablet computers, laptop computers, PCs, headphones, smart speakers, smart home devices, etc.
[0051] The first electronic device 210 and the second electronic device 220 can establish a communication connection and transmit data through this connection. This communication connection may include, but is not limited to, Wi-Fi or Bluetooth connections. The first electronic device 210 can be a data sender, and the second electronic device 220 can be a data receiver. The first electronic device 210 can send multimedia data to the second electronic device 220 through this communication connection, and the second electronic device 220 can play the received multimedia data.
[0052] When a communication connection is established between the first electronic device 210 and the second electronic device 220, the first electronic device 210 can obtain first buffer information corresponding to the second electronic device. This first buffer information can be used to indicate the buffering delay of the first buffer in the second electronic device 220, which is used to buffer multimedia data to be played. The first electronic device 210 determines second buffer information corresponding to its own second buffer. This second buffer can be used to buffer multimedia data to be transmitted to the second electronic device, and the second buffer information indicates the amount of multimedia data stored in the second buffer. The first electronic device 210 can determine whether there is a risk of playback stuttering in the second electronic device 220 based on the first and second buffer information. If it is determined that there is a risk of playback stuttering in the second electronic device 220, a target operation can be performed. This target operation can reduce the amount of multimedia data stored in the second buffer, which can alleviate network congestion, achieve more efficient multimedia data transmission, thereby improving the transmission stability of multimedia data, reducing the number of stutters at the data receiving end when playing multimedia data, and improving the user experience.
[0053] It should be noted that Figure 2 only shows one possible application scenario of the embodiment of this application. In actual application, the first electronic device 210 can also establish communication connections with multiple second electronic devices 220 respectively, and play multimedia data through the multiple second electronic devices 220.
[0054] As shown in Figure 3, in one embodiment, a method for processing multimedia data is provided, which can be applied to the first electronic device described above. The method may include the following steps:
[0055] Step 310: Obtain the first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer the multimedia data to be played.
[0056] When a communication connection is established between the first electronic device and the second electronic device, the first electronic device can act as a data sender, and the second electronic device can act as a data receiver. The first electronic device can send multimedia data to the second electronic device and play the multimedia data through the second electronic device. The multimedia data may include, but is not limited to, video data and audio data. For example, the scenario of playing multimedia data may include, but is not limited to, screen projection scenarios and scenarios of playing audio (such as music and voice) using audio output devices (such as headphones, speakers, etc.).
[0057] When the first electronic device plays multimedia data through the second electronic device, the first electronic device can obtain the first buffer information corresponding to the second electronic device, which is used to indicate the buffering delay of the first buffer in the second electronic device.
[0058] The first buffer can be a buffer in the second electronic device used to buffer multimedia data to be played. In some embodiments, the second electronic device receives a data packet sent by the first electronic device. The data packet carries multimedia data. The second electronic device can parse the data packet and decode the multimedia data carried in the data packet to obtain the multimedia data to be played. Then, the multimedia data to be played is cached in the first buffer. During the playback of audio data, the second electronic device can read the multimedia data to be played from the first buffer for playback while parsing the received data packet, decoding the multimedia data, etc., and storing the multimedia data to be played in the first buffer.
[0059] For example, a second electronic device receives an audio data packet sent by a first electronic device, decodes the audio data carried in the audio data packet to obtain PCM (Pulse Code Modulation) data, and buffers this PCM data in a first buffer. During the playback of the audio data by the second electronic device, it can read the PCM data from the first buffer, and then use a DAC (Digital to Analog converter) and AMP (Amplifier for Power) to perform digital-to-analog conversion and power amplification to obtain analog data, which is then played through a speaker. It should be noted that the multimedia data to be played stored in the first buffer can also be in other formats, such as the raw bitstream of audio data or video image data, etc., without limitation.
[0060] After the second electronic device begins receiving multimedia data sent by the first electronic device, the first buffer needs to accumulate a certain amount of multimedia data to be played before playback begins. The buffering delay of the first buffer refers to the delay between the multimedia data entering the first buffer and its removal from the first buffer. Optionally, this buffering delay can be represented by a buffering delay duration, which refers to the duration the multimedia data remains in the first buffer, i.e., the time from when the multimedia data enters the first buffer to when it is removed.
[0061] Optionally, the buffer delay can also be represented by the amount of buffered data. The amount of buffered data can refer to the amount of data waiting to be retrieved after the multimedia data enters the first buffer, or it can be understood as the amount of multimedia data stored in the first buffer. For example, the amount of buffered data can be represented by the number of bytes or the number of samples.
[0062] The buffer latency of the first buffer can characterize the buffer size of the first buffer (i.e., the buffer size). The larger the buffer size of the first buffer, the greater the buffer latency of the first buffer, and the smaller the buffer size of the first buffer, the smaller the buffer latency of the first buffer.
[0063] In some embodiments, the buffering delay of the first buffer can be a preset fixed value. The second electronic device can preset the buffering delay of the first buffer, for example, the buffering delay duration corresponding to the first buffer can be set. When the second electronic device normally receives the multimedia data packet sent by the first electronic device (without signal interference), the multimedia data entering the first buffer needs to wait for the buffering delay duration before being retrieved and played.
[0064] In some embodiments, the buffering delay of the first buffer can also be a dynamically changing value. The second electronic device can dynamically adjust the buffering delay of the first buffer according to the network environment. When there is signal interference in the network environment, a larger buffering delay can be set to cope with the situation of data packet loss under signal interference and reduce playback stuttering. When there is no signal interference in the network environment or the signal strength between the second electronic device and the first electronic device is strong (indicating a better network environment), a smaller buffering delay can be set to reduce the playback delay of the second electronic device.
[0065] Optionally, the buffering delay of the first buffer can be relatively fixed at a certain stage of the second electronic device playing multimedia data. For example, the buffering delay of the first buffer can be fixed each time the second electronic device plays multimedia data; or, the buffering delay of the first buffer is fixed for a certain period of time during the process of the second electronic device playing multimedia data.
[0066] In some embodiments, the first electronic device can obtain the first buffer information corresponding to the second electronic device when triggering the second electronic device to play multimedia data. When a communication connection is established between the first and second electronic devices, the first electronic device can send a start-play command to the second electronic device and obtain the first buffer information corresponding to the second electronic device. This start-play command can be used to notify the second electronic device to prepare to begin multimedia data transmission and playback. In other words, the first electronic device can obtain the first buffer information corresponding to the second electronic device before the second electronic device plays multimedia data.
[0067] In some embodiments, since the buffering delay of the first buffer may change, the first electronic device can acquire the first buffering information corresponding to the second electronic device while the second electronic device is playing multimedia data. For example, the first electronic device can acquire the real-time first buffering information of the second electronic device at preset intervals; or, the second electronic device can feed back the first buffering information to the first electronic device when the buffering delay of the first buffer changes significantly, which can improve the accuracy of the first buffering information acquired by the first electronic device, thereby further improving the accuracy of subsequent target operations.
[0068] Step 320: Determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device. The second buffer information is used to indicate the amount of multimedia data stored in the second buffer.
[0069] During the transmission of multimedia data from the first electronic device to the second electronic device, the first electronic device can monitor the second buffer and obtain the second buffer information corresponding to the second buffer. The second buffer is used by the first electronic device to buffer the multimedia data to be transmitted to the second electronic device, and the multimedia data to be transmitted to the second electronic device can be a data packet obtained after multimedia encoding.
[0070] For example, a first electronic device sends multimedia data to a second electronic device via a Bluetooth communication connection. The second buffer may include a buffer in the Bluetooth Controller and / or a buffer in the Bluetooth Host. Further, taking the transmission of audio data as an example, after obtaining raw audio data from the application, the first electronic device can encode the raw audio data using a Bluetooth audio encoder in the Bluetooth Host to obtain audio data packets in formats suitable for Bluetooth transmission, such as SBC (Subband Codec) or AAC (Advanced Audio Coding), and store these audio data packets in the Bluetooth Host's buffer. The Bluetooth Host can communicate with the Bluetooth Controller, sending the audio data packets from its buffer to the Bluetooth Controller. The Bluetooth Controller can buffer the audio data packets sent by the Bluetooth Host in its own buffer and retrieve them from that buffer for transmission.
[0071] The second buffer stores multiple data packets to be sent, each carrying multimedia data. In related technologies, the first electronic device obtains the number of data packets stored in the second buffer and determines whether there is data backlog in the second buffer based on this number. If the number of data packets is small, it indicates that there is no data backlog in the second buffer. If the number of data packets is large, it indicates that there is data backlog in the second buffer, and the first electronic device will perform bitrate adaptation or flush operation on the data in the second buffer. Since the amount of multimedia data carried in each data packet may vary and is not fixed, using the number of data packets stored in the second buffer to analyze the data storage situation of the second buffer leads to inaccurate analysis results, which in turn leads to inaccurate bitrate adaptation, flush operation, etc., performed by the first electronic device.
[0072] In this embodiment, the first electronic device acquires real-time second buffer information of the second buffer, and can determine whether there is data accumulation in the second buffer based on the second buffer information. The second buffer information can be used to characterize the amount of multimedia data actually stored in the second buffer, and can also be understood as the sum of the amount of multimedia data carried by each data packet stored in the second buffer.
[0073] Optionally, the second buffer information may include the buffer duration of the second buffer, which may refer to the playback duration corresponding to the multimedia data stored in the second buffer. This buffer duration may be the sum of the playback durations corresponding to the multimedia data carried by each data packet stored in the second buffer. Further, each time the first electronic device stores a data packet into the second buffer, it may add the playback duration of the multimedia data carried by the stored data packet to the current buffer duration of the second buffer. Each time a data packet is retrieved from the second buffer, the playback duration of the multimedia data carried by the retrieved data packet may be deducted from the current buffer duration of the second buffer, thus updating the buffer duration of the second buffer in real time to ensure the accuracy of the second buffer information.
[0074] Optionally, the second buffer information may include the number of bytes or samples corresponding to the multimedia data stored in the second buffer. This second buffer information may be the sum of the number of bytes or samples corresponding to the multimedia data carried by each data packet stored in the second buffer. Further, each time the first electronic device stores a data packet into the second buffer, it can add the number of bytes or samples of the multimedia data carried by the stored data packet to the current number of bytes or samples in the second buffer. Each time a data packet is retrieved from the second buffer, the number of bytes or samples of the multimedia data carried by the retrieved data packet can be subtracted from the current number of bytes or samples in the second buffer. This real-time update of the number of bytes or samples corresponding to the multimedia data stored in the second buffer ensures the accuracy of the second buffer information.
[0075] Compared to related technologies that directly use the number of data packets to reflect the storage status of the second buffer, the embodiments of this application use the buffer duration of the second buffer or the number of bytes or samples corresponding to the multimedia data stored in the second buffer to reflect the storage status of the second buffer, which can more accurately analyze whether there is data accumulation in the second buffer.
[0076] In other embodiments, the first electronic device may also acquire the second buffer information corresponding to the second buffer according to a preset period of time. The period of time can be set according to actual needs and is not limited here.
[0077] Step 330: If it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information, then the target operation is executed. The target operation is used to reduce the amount of multimedia data stored in the second buffer.
[0078] The first electronic device can determine whether the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information. In some embodiments, when there is no signal interference or minimal signal interference in the network environment, multimedia data can be transmitted to the first electronic device in a timely manner. Therefore, the amount of multimedia data cached in the second buffer is small, and the difference between the data and the buffer delay of the first buffer indicated by the first buffer information is large. In this case, the first buffer in the first electronic device stores enough multimedia data to be played, and playback stuttering will not occur. In the case of strong signal interference in the network environment, due to frequent packet loss and retransmission, the multimedia data to be sent will accumulate in the second buffer, making the amount of multimedia data stored in the second buffer close to the buffer delay of the first buffer indicated by the first buffer information. In this case, the first buffer in the first electronic device does not store enough multimedia data to be played, and playback stuttering is likely to occur.
[0079] Therefore, it can be determined whether the second buffer information is close to the first buffer information. If the second buffer information is close to the first buffer information, it means that the amount of multimedia data stored in the second buffer in the first electronic device is close to the buffering delay of the first buffer in the second electronic device. This means that the amount of multimedia data buffered in the first buffer in the second electronic device is close to zero (i.e., the first buffer is about to be emptied), and the second electronic device is highly likely to experience playback stuttering, posing a risk of playback stuttering. Combining the storage status of the second buffer in the first electronic device with the buffering delay of the first buffer in the second electronic device can accurately identify the risk of playback stuttering in the second electronic device, improving the accuracy of playback stuttering risk identification.
[0080] Furthermore, the amount of multimedia data stored in the second buffer in the first electronic device is close to the buffering delay of the first buffer in the second electronic device, which also indicates that there is a certain amount of data accumulation in the second buffer.
[0081] If the first electronic device determines that the second electronic device has a risk of playback stuttering, the first electronic device may perform a target operation, which may be an operation that reduces the amount of multimedia data stored in the second buffer. By performing the target operation, the amount of multimedia data stored in the second buffer can be reduced, thereby alleviating the data backlog in the second buffer and reducing the amount of multimedia data waiting to be transmitted, thus alleviating network congestion.
[0082] In some embodiments, the target operation may include a bitrate reduction operation and / or a data clearing operation.
[0083] The bitrate reduction operation refers to reducing the bitrate of the multimedia encoder of the first electronic device. Bitrate refers to the amount of multimedia data transmitted per unit time, which can be measured in bits per second (bps) or kilobits per second (kbps). By reducing the bitrate of the multimedia encoder of the first electronic device, the amount of multimedia data obtained after encoding by the multimedia encoder can be reduced, thereby reducing the amount of multimedia data stored in the second buffer per unit time and alleviating the data accumulation in the second buffer.
[0084] As one implementation method, multiple bitrate levels can be preset, with different bitrates corresponding to different multimedia encoder levels. If a playback stuttering risk is detected in the second electronic device, the first electronic device can switch the multimedia encoder from the first bitrate level to the second bitrate level, where the bitrate is lower than that of the first bitrate level. The first bitrate level is the bitrate level of the multimedia encoder before the playback stuttering risk is detected. Optionally, the first bitrate level can be determined based on the application scenario, encoding format, etc. These application scenarios may include, but are not limited to, music playback, video playback, and other scenarios with high requirements for multimedia data quality, or games, phone calls, and other scenarios with high latency requirements (requiring low latency). By setting multiple bitrate levels, the bitrate of the multimedia encoder can be flexibly adjusted, which can alleviate data accumulation in the second buffer, simplify the adjustment method, and reduce unnecessary overhead.
[0085] As another implementation, the first electronic device can also reduce the bitrate corresponding to the multimedia encoder based on the data accumulation speed of the second buffer. This data accumulation speed and the corresponding bitrate of the multimedia encoder can be negatively correlated; the faster the data accumulation speed, the lower the bitrate of the multimedia encoder. The data accumulation speed refers to the amount of multimedia data added to the second buffer per unit time. For example, when the first electronic device detects a risk of playback stuttering in the second electronic device, it can determine the data accumulation speed based on the difference between the playback duration corresponding to the multimedia data stored in the second buffer per unit time and the playback duration corresponding to the multimedia data retrieved within that unit time. Based on this data accumulation speed, a bitrate reduction value is determined (the bitrate reduction value and the data accumulation speed can be positively correlated; the faster the data accumulation speed, the larger the bitrate reduction value). The current bitrate of the multimedia encoder is subtracted from this bitrate reduction value to obtain the reduced bitrate of the multimedia encoder, and the multimedia encoder is then controlled to encode the multimedia data according to this reduced bitrate. The bitrate of the multimedia encoder can be flexibly adjusted according to the data accumulation rate, which improves the accuracy of the bitrate adjustment of the multimedia encoder, further alleviates the data accumulation in the second buffer, and reduces the risk of playback stuttering in the second electronic device.
[0086] A data clearing operation can refer to the operation of clearing at least a portion of the multimedia data stored in the second buffer. Further, this data clearing operation can be used to clear all or part of the multimedia data stored in the second buffer. The data clearing operation can be a flush operation on the data in the second buffer, deleting all or part of the data stored in the second buffer, thereby alleviating data accumulation in the second buffer.
[0087] In related technologies, when the first electronic device performs a flush operation, it only considers the number of data packets stored in the second buffer, without considering the first buffer of the second electronic device at all. This results in a significant lag. Furthermore, since the flush operation of the first electronic device causes playback stuttering in the second electronic device, and clearing the data in the first buffer of the second electronic device also causes playback stuttering, the second electronic device will experience multiple playback stutters, which seriously affects the user experience.
[0088] In this embodiment of the application, when the first electronic device determines that the second electronic device has a risk of playback stuttering, it performs a flush operation on the second buffer. By placing the playback stuttering caused by the flush operation of the first electronic device and the playback stuttering caused by insufficient multimedia data cached in the first buffer of the second electronic device in the same stage or even at the same moment, the number of times the user experiences playback stuttering can be reduced.
[0089] In this embodiment, the first electronic device can accurately identify whether there is a risk of playback stuttering in the second electronic device based on the buffering delay of the first buffer in the second electronic device and the amount of multimedia data stored in its own second buffer. If the risk of playback stuttering is identified, the first electronic device performs a target operation to reduce the amount of multimedia data stored in the second buffer, reduce network congestion, thereby improving the transmission stability of multimedia data and reducing the number of times the data receiving end stutters when playing multimedia data, thus improving the user experience.
[0090] As shown in Figure 4, in another embodiment, a method for processing multimedia data is provided, which may include the following steps:
[0091] Step 402: Obtain the first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer the multimedia data to be played.
[0092] In some embodiments, the first buffer information may be sent directly from the second electronic device to the first electronic device. When the first electronic device and the second electronic device establish a communication connection, the second electronic device may determine the first buffer information corresponding to the first buffer, which may include the buffer delay duration of the first buffer in the second electronic device, and send the first buffer information to the first electronic device, and the first electronic device receives the first buffer information sent by the second electronic device.
[0093] Furthermore, the first electronic device and the second electronic device can support a proprietary communication protocol. This proprietary communication protocol can define the transmission fields corresponding to the first buffer information. The second electronic device can send a proprietary data packet to the first electronic device based on this proprietary communication protocol, and this proprietary data packet carries the first buffer information. The first electronic device can parse the received proprietary data packet based on this proprietary communication protocol to obtain the first buffer information. Based on the proprietary communication protocol, the second electronic device can accurately send the first buffer information to the first electronic device, improving the accuracy of the first buffer information obtained by the first electronic device, and further improving the accuracy of identifying whether the second electronic device has a risk of playback stuttering.
[0094] For example, Figure 5A is a timing diagram of the interaction between a first electronic device and a second electronic device in one embodiment. As shown in Figure 5A, the first electronic device and the second electronic device establish a Bluetooth communication connection. The second electronic device can send a buffer delay duration to the first electronic device based on a private communication protocol, and the first electronic device receives the buffer delay duration sent by the second electronic device. The first electronic device can encode multimedia data and send the multimedia data to the second electronic device. The second electronic device receives the multimedia data and performs decoding, playback, etc. The first electronic device can monitor the buffer duration corresponding to the second buffer. If it is determined based on the buffer duration and the buffer delay duration that the second electronic device has a risk of playback stuttering, then the target operation is executed.
[0095] In some embodiments, the first buffer information may be calculated by the first electronic device based on a delay value sent by the second electronic device. When the first electronic device plays multimedia data through the second electronic device, the second electronic device may send a delay value to the first electronic device. This delay value can be used to characterize the delay in the second electronic device processing the received multimedia data; that is, the delay value can be used to characterize the time between the second electronic device receiving the data packet and playing the multimedia data carried in the data packet.
[0096] After receiving the data packet sent by the first electronic device, the second electronic device parses the data packet to obtain the multimedia data carried by the data packet, decodes the multimedia data, and then buffers the decoded multimedia data in a second buffer to await retrieval and playback. Therefore, the latency of the second electronic device in processing the received multimedia data may include decoding latency and buffering latency. The decoding latency characterizes the latency caused by the second electronic device decoding the multimedia data using a multimedia decoder. Further, the aforementioned latency values may include the buffering latency duration and the decoding latency duration.
[0097] The first electronic device receives the delay value sent by the second electronic device and determines the first buffer information based on the delay value and the decoding delay. Further, the first electronic device can subtract the decoding delay duration from the delay value to determine the buffer delay duration of the first buffer. Optionally, the decoding delay duration can be a fixed value set empirically, such as 10ms or 8ms. This decoding delay duration can also be determined based on encoding / decoding parameters negotiated between the first and second electronic devices (such as encoding / decoding format, frame length, sampling rate, and bit depth, etc.), and is not limited here.
[0098] For example, the first electronic device and the second electronic device transmit multimedia data via Bluetooth communication. The aforementioned delay value can be a DelayReport value, which is a delay value reported by the data receiver to the data sender as specified in the Bluetooth standard protocol, used to help the data sender adjust the synchronization of audio and video. In this embodiment, the first electronic device can calculate the buffer delay duration of the first buffer based on the DelayReport value and decoding delay duration fed back by the second electronic device, ensuring that the first electronic device can accurately obtain the first buffer information, and can obtain the first buffer information without supporting a proprietary communication protocol, thus improving the applicability of the solution.
[0099] For example, Figure 5B is a timing diagram of the interaction between a first electronic device and a second electronic device in another embodiment. As shown in Figure 5B, the first electronic device and the second electronic device establish a Bluetooth communication connection. The second electronic device can send a DelayReport value to the first electronic device. The first electronic device subtracts the decoding delay time from the received DelayReport value to obtain the buffer delay time of the first buffer. The first electronic device can encode multimedia data and send the multimedia data to the second electronic device. The second electronic device receives the multimedia data and performs decoding, playback, etc. The first electronic device can monitor the buffer time corresponding to the second buffer. If it is determined based on the buffer time and the buffer delay time that the second electronic device has a risk of playback stuttering, then the target operation is executed.
[0100] In some embodiments, the first buffer information can be used to indicate the buffering delay of the first buffer when the second electronic device begins playing multimedia data sent by the first electronic device. After the second electronic device receives the multimedia data sent by the first electronic device, it needs to accumulate a certain amount of multimedia data in the first buffer. The first buffer information can characterize the amount of data that the second electronic device needs to accumulate in the first buffer before playing the multimedia data.
[0101] For example, the first buffer information may include the buffering delay duration of the first buffer when the second electronic device starts playing multimedia data sent by the first electronic device. This buffering delay duration can be the buffering duration of the first buffer when the second electronic device starts playing multimedia data, that is, the playback duration corresponding to the multimedia data stored in the first buffer. The first buffer information reflects the buffering delay of the first buffer when the second electronic device starts playing multimedia data. Through this first buffer information, it is possible to more accurately identify whether the second electronic device has a risk of playback stuttering, further improving the accuracy of identifying the risk of playback stuttering in the second electronic device.
[0102] In some embodiments, the first electronic device can obtain first buffer information corresponding to the second electronic device when establishing a multimedia data transmission channel with the second electronic device. When the first electronic device and the second electronic device establish a Bluetooth communication connection, if the first electronic device needs to play multimedia data through the second electronic device, it can establish a multimedia data transmission channel with the second electronic device. For example, this multimedia data transmission channel may include, but is not limited to, any one of SCO (Synchronous Connection Oriented) channels, ACL (Asynchronous Connection-Less) channels, and CIS (Connected Isochronous Stream) channels.
[0103] After establishing a Bluetooth multimedia data transmission channel between the first and second electronic devices, a start-up command can be sent to the second electronic device. Upon receiving the start-up command, the second electronic device can send first buffer information to the first electronic device based on a proprietary communication protocol, or it can send a delay value to the first electronic device based on the Bluetooth standard protocol. The buffer size of the first buffer can be pre-configured; therefore, the first buffer information or delay value can be a pre-set fixed value associated with the buffer size of the first buffer. The second electronic device can also dynamically allocate the buffer size of the first buffer based on network environment parameters (such as transmission signal strength, signal-to-noise ratio, etc.) when it receives the start-up command, and determine the first buffer information or delay value based on the allocated buffer size.
[0104] After the first electronic device receives and sends a start-play command, the second electronic device sends initial buffer information or a delay value to determine the buffering delay of the first buffer when the second electronic device starts playing multimedia data. When a Bluetooth multimedia data transmission channel is established between the first and second electronic devices, the second electronic device can proactively report the first buffer information or delay value to the first electronic device. The first electronic device, upon receiving the first buffer information from the second electronic device during multimedia data playback, can accurately identify whether the second electronic device experiences playback stuttering based on this first buffer information and the data storage status of the second buffer.
[0105] In one implementation, when the second electronic device adjusts the buffer space of the first buffer, the buffer delay of the first buffer will change. When the buffer delay of the first buffer changes, the second electronic device can send the changed first buffer information to the first electronic device, or it can send a delay value to the first electronic device, so that the first electronic device updates the first buffer information in a timely manner. Further, when the second electronic device adjusts the buffer space of the first buffer, it can determine whether the change in the buffer delay of the first buffer is greater than a preset range. For example, the second electronic device can determine whether the time difference of the change in the buffer delay duration of the first buffer is greater than a preset time difference. If the change in the buffer delay of the first buffer is greater than the preset range, it indicates that the buffer delay of the first buffer has changed significantly. In this case, the second electronic device can send the changed first buffer information to the first electronic device, or it can send a delay value to the first electronic device, so that the first electronic device updates the first buffer information in a timely manner. If the change in the buffer delay of the first buffer is not greater than the preset range, it indicates that the change in the buffer delay of the first buffer is small. In this case, the second electronic device may not need to send the first buffer information or delay value back to the first electronic device. This reduces the number of times the first buffer information is sent, thus reducing transmission overhead, while maintaining the accuracy of identifying playback stuttering risks.
[0106] As another implementation, the second electronic device can also periodically send first buffer information or delay values to the first electronic device. The first electronic device can update the recorded first buffer information based on the first buffer information or delay values periodically sent by the second electronic device. Further, the first electronic device can determine the first buffer information reported by the second electronic device this time based on the first buffer information or delay values periodically sent by the second electronic device. It can compare the determined first buffer information with the recorded first buffer information, calculate the change range between the two, and determine whether the change range is greater than a preset range. For example, the first electronic device can calculate the time difference between the determined buffer delay duration and the recorded buffer delay duration, and determine whether the time difference is greater than a preset time difference. If the change range corresponding to the buffer delay of the first buffer is greater than the preset range, it indicates that the buffer delay of the first buffer has changed significantly, and the first electronic device can update the recorded first buffer information to the determined first buffer information. If the change range corresponding to the buffer delay of the first buffer is not greater than the preset range, it indicates that the change in the buffer delay of the first buffer is small, and the first electronic device does not need to update the recorded first buffer information. This ensures the stability of the recorded first buffer information, thereby improving the accuracy of identifying whether the second electronic device has a risk of playback stuttering.
[0107] Step 404: Determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device. The second buffer information is used to indicate the amount of multimedia data stored in the second buffer.
[0108] The description of step 404 can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0109] Step 406: If the second buffer information is greater than the target threshold, it is determined that the second electronic device has a risk of playback stuttering; the target threshold is determined based on the first buffer information.
[0110] The first electronic device monitors the real-time second buffer information of the second buffer and can determine whether the second buffer information is greater than a target threshold, which is determined based on the first buffer information. In some embodiments, the target threshold may be the first buffer information, the product of the first buffer information and a preset first coefficient, or the difference between the first buffer information and a first preset value. For example, the first buffer information is the buffer delay duration of the first buffer, and the target threshold may be the buffer delay duration, the buffer delay duration multiplied by a preset first coefficient (such as 0.9, 0.88, etc.), or the buffer delay duration minus a first preset duration (such as 10ms, 15ms, etc.).
[0111] If the second buffer information is greater than the target threshold, and the amount of multimedia data stored in the second buffer of the first electronic device is close to or even greater than the buffering delay of the first buffer of the second electronic device, it means that the amount of multimedia data buffered in the first buffer of the second electronic device is close to or has already reached zero. The second electronic device is highly likely to experience playback stuttering, posing a risk of playback stuttering. By combining the storage status of the second buffer in the first electronic device with the buffering delay of the first buffer, the risk of playback stuttering in the second electronic device can be accurately identified, improving the accuracy of playback stuttering risk identification.
[0112] Step 408: Perform the target operation, which is used to reduce the amount of multimedia data stored in the second buffer.
[0113] In some embodiments, the target operation may include a bitrate reduction operation and / or a data clearing operation, which may be used to clear all multimedia data stored in the second buffer, or to clear a portion of the multimedia data stored in the second buffer.
[0114] In some embodiments, clearing a portion of the multimedia data stored in the second buffer may include, but is not limited to, at least one of the following:
[0115] (1) Clear the multimedia data stored in the second buffer that matches the first data volume parameter.
[0116] The first data volume parameter can be used to indicate the amount of multimedia data cleared from the second buffer. This first data volume parameter may include the first playback duration corresponding to the cleared multimedia data in the second buffer, the first number of bytes corresponding to the cleared multimedia data in the second buffer, the first number of samples, and the first number of data packets, etc. If the first electronic device determines that the second electronic device has a risk of playback stuttering, it can clear the multimedia data stored in the second buffer that matches the first data volume parameter.
[0117] Optionally, the first data volume parameter may be determined based on at least one of the first buffer information, the second buffer information, and the buffer size of the second buffer.
[0118] For example, the first data volume parameter can be determined based on the first buffer information. The first data volume parameter can be equal to the product of the first buffer information and a preset second coefficient, or equal to the difference between the first buffer information and a second preset value. For example, the first buffer information is the buffer delay duration of the first buffer, and the first data volume parameter is equal to the product of the buffer delay duration and a preset second coefficient (such as 0.6, 0.7, etc.), or equal to the buffer delay duration minus a second preset duration (such as 60ms, 70ms, etc.).
[0119] For example, the first data volume parameter can be determined based on the second buffer information. The first data volume parameter can be equal to the product of the second buffer information and the first proportion, or equal to the difference between the second buffer information and the third preset value, etc. For example, the second buffer information is the current buffer duration of the second buffer, and the first data volume parameter is equal to the product of the buffer duration and the first proportion (such as 67%, 65%, etc.), or equal to the buffer duration minus the third preset duration (such as 50ms, 73ms, etc.).
[0120] For example, the first data volume parameter may be determined based on the buffer size of the second buffer, and the second data volume parameter may be equal to the product of the buffer size of the second buffer and a second proportion (such as 60%, 70%, etc.).
[0121] For example, the first data volume parameter can also be determined based on various factors such as the first buffer information, the second buffer information, and the buffer size of the second buffer. Different weight coefficients can be assigned to the first buffer information, the second buffer information, and the buffer size of the second buffer, and a weighted average can be calculated based on the weight system corresponding to the first buffer information, the second buffer information, and the buffer size of the second buffer to obtain the first data volume parameter.
[0122] Based on at least one of the first buffer information, the second buffer information, and the size of the second buffer, a first data volume parameter is determined, and the amount of data in the second buffer to be cleared is dynamically adjusted. This avoids clearing too much multimedia data, which could result in noticeable jumps in the played multimedia data, and also avoids clearing too little multimedia data, which could not effectively reduce network congestion. This improves the accuracy of data clearing operations on the second buffer.
[0123] (2) Clear part of the multimedia data stored in the second buffer so that the remaining multimedia data in the second buffer is less than or equal to the second data volume parameter.
[0124] The second data volume parameter can be used to indicate the maximum amount of multimedia data remaining after the data clearing operation is performed on the second buffer. The second data volume parameter may include the second playback duration, the second number of bytes, the second number of samples, the second number of data packets, etc. If the first electronic device determines that the second electronic device has a risk of playback stuttering, the multimedia data stored in the second buffer can be cleared so that the remaining multimedia data in the second buffer is less than or equal to the second data volume parameter.
[0125] Optionally, the second data volume parameter may be determined based on at least one of the first buffer information, the second buffer information, and the buffer size of the second buffer.
[0126] It should be noted that the method for determining the second data volume parameter is similar to the method for determining the first data volume parameter described in the above embodiments, each corresponding to different preset coefficients or preset values, which will not be repeated here.
[0127] Based on at least one of the first buffer information, the second buffer information, and the buffer size of the second buffer, the second data volume parameter is determined, and the remaining data volume of the second buffer is dynamically adjusted. This can avoid the situation where there is too little remaining multimedia data, which would prevent the timely transmission of multimedia data to the first electronic device, and it can also avoid the situation where there is too much remaining multimedia data, which would prevent the network congestion from being effectively reduced. This improves the accuracy of data clearing operations on the second buffer.
[0128] (3) Clear the discontinuous multimedia data stored in the second buffer.
[0129] If the first electronic device determines that the second electronic device has a risk of playback stuttering, it can detect whether there is discontinuous multimedia data in the second buffer. For example, the data packet numbers corresponding to each data packet stored in the second buffer are determined by the multimedia encoder encoding and generating data packets according to the multimedia data stream; therefore, if the data packet numbers are consecutive, the multimedia data carried by the data packets is also consecutive.
[0130] The system can detect whether there are discontinuous data packet numbers in the second buffer. If discontinuous data packet numbers are found, it indicates the presence of discontinuous multimedia data. Multiple data packets corresponding to that discontinuous data packet number (including but not limited to one data packet corresponding to that discontinuous data packet number) can be deleted. For example, if the second buffer stores data packets numbered 1, 2, 3, 5, and 6, and numbers 3 and 5 are discontinuous, data packets numbered 1, 2, and 3 can be deleted, as can data packets numbered 5 and 6, or even data packets numbered 3 and 5, etc., but not limited to these. By deleting discontinuous multimedia data in the second buffer, playback stuttering caused by data clearing operations can be combined with playback stuttering caused by discontinuous multimedia data, reducing the frequency of playback stuttering on the second electronic device and improving the user experience.
[0131] (4) Clear some of the multimedia data stored in the second buffer so that the remaining multimedia data in the second buffer is continuous.
[0132] If the first electronic device determines that the second electronic device has a risk of playback stuttering, the multimedia data stored in the second buffer can be cleared, making the remaining multimedia data in the second buffer continuous. For example, after clearing the data in the second buffer, the data packet numbers corresponding to the remaining data packets in the second buffer are consecutive. For instance, if the second buffer stores data packets numbered 1 to 6, data packets numbered 1 to 4, or data packets numbered 3 to 6, can be deleted. The consecutive data packet numbers of the remaining data packets ensure the continuity of the multimedia data that was not deleted, guaranteeing that the multimedia data played by the second electronic device is as continuous as possible and reducing playback stuttering.
[0133] (5) Clear some of the multimedia data stored in the second buffer in the order of the storage time of the multimedia data stored in the second buffer.
[0134] If the first electronic device determines that the second electronic device has a risk of playback stuttering, it can clear part of the multimedia data stored in the second buffer in the order of storage time from first to last. This can ensure the continuity of the remaining multimedia data with the multimedia data subsequently stored in the second buffer and reduce the playback stuttering caused by the second electronic device.
[0135] In this embodiment of the application, the first electronic device can clear part of the multimedia data stored in the second buffer. While effectively reducing the multimedia data stored in the second buffer to alleviate network congestion, it avoids deleting too much multimedia data, which would cause playback to skip for too long and result in a decline in user experience, thus improving user experience.
[0136] In some embodiments, if the first electronic device detects that the multimedia data stored in the second buffer is discontinuous, it can perform a data clearing operation on the discontinuous multimedia data in the second buffer. For example, it can detect whether there are discontinuous data packet numbers in the second buffer. If discontinuous data packet numbers exist, it indicates that there is discontinuous multimedia data, and multiple data packets corresponding to the discontinuous data packet numbers (including but not limited to one of the data packets corresponding to the discontinuous data packet numbers) can be deleted.
[0137] If the first electronic device detects a discontinuity in the multimedia data stored in the second buffer, even if the first buffer in the second electronic device has sufficient multimedia data to be played and there is no data backlog in the second buffer, the second electronic device may still experience playback stuttering due to the discontinuity of the multimedia data, posing a risk of playback stuttering. Therefore, a data clearing operation can be performed on the discontinuous multimedia data in the second buffer. This preemptively merges the playback stuttering caused by the data clearing operation with the playback stuttering caused by the discontinuous multimedia data, preventing a situation where playback stuttering occurs first due to discontinuous multimedia data and then again due to data backlog requiring a data clearing operation. This reduces the frequency of playback stuttering and improves the user experience.
[0138] In this embodiment of the application, by combining the storage status of the second buffer in the first electronic device with the buffering delay of the first buffer in the second electronic device, the playback stuttering risk of the second electronic device can be accurately identified, thereby improving the accuracy of playback stuttering risk identification. When the playback stuttering risk of the second electronic device is identified, the target operation is performed to reduce the amount of multimedia data stored in the second buffer, reduce network congestion, and thus improve the transmission stability of multimedia data.
[0139] In some embodiments, different target operations can be performed for different levels of playback stuttering risk. As shown in Figure 6, in another embodiment, a multimedia data processing method is provided, which may include the following steps:
[0140] Step 602: Obtain the first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer the multimedia data to be played.
[0141] Step 604: Determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device. The second buffer information is used to indicate the amount of multimedia data stored in the second buffer.
[0142] The descriptions of steps 602 to 604 can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0143] Step 606: If the second buffer information is greater than the first target threshold, then it is determined that the second electronic device has a first risk of lag.
[0144] Step 608: Perform the data clearing operation.
[0145] The target threshold in the above embodiments may include a first target threshold and a second target threshold. The first target threshold may be greater than the second target threshold. For example, the preset first coefficient corresponding to the first target threshold may be greater than the preset first coefficient corresponding to the second target threshold, or the first preset value corresponding to the first target threshold may be less than the first preset value corresponding to the second target threshold, etc.
[0146] The playback stuttering risk of the second electronic device may include a first stuttering risk and a second stuttering risk. The risk level of the first stuttering risk may be greater than that of the second stuttering risk. That is, the probability of playback stuttering on the second electronic device under the first stuttering risk is higher than the probability of playback stuttering under the second stuttering risk. Here, the first stuttering risk may correspond to a first target threshold, and the second stuttering risk may correspond to a second target threshold.
[0147] The first electronic device can determine whether the second buffer information is greater than the first target threshold. If the second buffer information is greater than the first target threshold, it means that the amount of multimedia data buffered in the first buffer of the second electronic device is close to zero or has already been zero, and there is an extremely high risk of playback stuttering. Therefore, it can be determined that the second electronic device is at the first stuttering risk.
[0148] If the second electronic device is at risk of the first stutter, it can be basically determined that the second electronic device will experience playback stuttering. The first electronic device can then perform a data clearing operation on the second buffer. This will allow the playback stuttering caused by the data clearing operation and the playback stuttering caused by the first buffer being emptied to be reflected in a single playback stutter. This will eliminate multiple causes of playback stuttering in a single playback stutter, thereby reducing the number of times the second electronic device will experience playback stuttering and improving the user experience.
[0149] In some embodiments, if the second electronic device is at risk of first lag, a data clearing operation and a bitrate reduction operation are performed.
[0150] If the second electronic device is at risk of first stuttering, the first electronic device can clear the data in the second buffer and reduce the bitrate of the multimedia encoder, thereby further reducing the amount of multimedia data cached in the second buffer and increasing the transmission speed of multimedia data to the second electronic device, so as to restore the normal playback of the second electronic device as soon as possible.
[0151] Step 610: If the second buffer information is greater than the second target threshold but not greater than the first target threshold, then it is determined that the second electronic device has a second lag risk.
[0152] Step 612: Perform a bitrate reduction operation.
[0153] The first electronic device can also determine whether the second buffer information is greater than the second target threshold. If the second buffer information is greater than the second target threshold but not greater than the first target threshold, it indicates that the data accumulation in the second buffer is relatively light, and the multimedia data cached in the first buffer in the second electronic device can still be played. The second electronic device has a certain risk of playback stuttering, but it may not actually stutter. Therefore, it can be determined that the second electronic device is at the second stuttering risk.
[0154] In the event of a second electronic device being at risk of playback stuttering, since the second electronic device may not actually experience playback stuttering, the first electronic device may not perform a data clearing operation on the second buffer. Instead, it can reduce the bitrate of the multimedia encoder, reduce the amount of multimedia data cached in the second buffer, alleviate the data accumulation in the second buffer, and increase the transmission speed of multimedia data to the second electronic device. This further reduces the risk of playback stuttering on the second electronic device while reducing the number of playback stutters caused by the first electronic device clearing the data in the second buffer.
[0155] In this embodiment, depending on the different levels of playback stuttering risk present in the second electronic device, the first electronic device can perform different target operations. This reduces the playback stuttering risk present in the second electronic device while avoiding the number of playback stutters caused by the first electronic device clearing data from the second buffer, thus improving the user experience.
[0156] As one specific implementation method, as shown in Figure 7, the above-described multimedia data processing method may include the following steps:
[0157] Step 702: After the Source (i.e., the first electronic device mentioned above) triggers the start of playback, the buffer delay time T of the first buffer is obtained when the Sink (i.e., the second electronic device mentioned above) starts playing multimedia data.
[0158] Step 704: Obtain the current buffer duration t of the second buffer on the Source side.
[0159] Step 706: The source determines whether the current buffer duration t is greater than the first target threshold (e.g., buffer delay duration T*0.95). If yes, proceed to step 708; otherwise, proceed to step 710.
[0160] In step 708, the Sink experiences playback stuttering. The Source clears the data in the second buffer to an appropriate value and then executes step 712.
[0161] Step 710: The source determines whether the current buffer duration t is greater than the second target threshold (e.g., buffer delay duration T*0.7). If yes, proceed to step 712; otherwise, proceed to step 714.
[0162] Step 712: The source reduces the bitrate of the audio decoder and encodes the audio at the reduced bitrate.
[0163] Step 714: The source end encodes according to the current bitrate.
[0164] Step 716: The source end puts the encoded data into the second buffer and sends it.
[0165] Step 718: After the Source side waits for the specified period, step 704 is executed again.
[0166] In this embodiment, the buffering delay duration of the first buffer in the Sink and the buffering duration t of the second buffer in the Source can be used to jointly determine whether playback stuttering occurs in the Sink. When playback stuttering occurs in the Sink, the Source clears the data in the second buffer to an appropriate value, reducing network congestion and simultaneously reflecting multiple playback stutters in a single playback stutter, thereby reducing the number of times playback stuttering occurs in the second electronic device. Furthermore, depending on the different levels of playback stuttering risk present in the second electronic device, the first electronic device performs different target operations, further reducing the number of playback stutters caused by the first electronic device clearing data from the second buffer, thus improving the user experience.
[0167] As shown in Figure 8, in one embodiment, an information sending method is provided, which can be applied to the second electronic device described above. The method may include the following steps:
[0168] Step 810: Send first buffer information to the first electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played.
[0169] The first buffer information is used to trigger the first electronic device to determine the second buffer information corresponding to the second buffer, and to perform the target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information; the second buffer is used to buffer the multimedia data to be transmitted from the first electronic device to the second electronic device, the second buffer information is used to indicate the amount of multimedia data stored in the second buffer, and the target operation is used to reduce the amount of multimedia data stored in the second buffer.
[0170] In some embodiments, the first buffer information is used to indicate the buffering delay of the first buffer when the second electronic device begins playing multimedia data sent by the first electronic device.
[0171] In some embodiments, step 810 includes: sending first buffer information to the first electronic device when a multimedia data transmission channel is established with the first electronic device.
[0172] It should be noted that the description of the information transmission method applied to the second electronic device provided in the embodiments of this application can be referred to the relevant description in the multimedia data processing method applied to the first electronic device provided in the above embodiments, and will not be repeated here.
[0173] In this embodiment, the second electronic device can accurately send the first buffer information to the first electronic device, which improves the accuracy of the first buffer information obtained by the first electronic device. The first electronic device can combine the buffer delay of the first buffer in the second electronic device with the amount of multimedia data stored in its own second buffer according to the first buffer information and the second buffer information, and accurately identify whether the second electronic device has a risk of playback stuttering, which further improves the accuracy of identifying whether the second electronic device has a risk of playback stuttering.
[0174] As shown in FIG9, in one embodiment, a multimedia data processing device 900 is provided, which can be applied to the first electronic device described above. The multimedia data processing device 900 may include an acquisition module 910, a determination module 920, and an operation module 930.
[0175] The acquisition module 910 is used to acquire the first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer the multimedia data to be played.
[0176] The determining module 920 is used to determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device, and the second buffer information is used to indicate the amount of multimedia data stored in the second buffer.
[0177] The operation module 930 is used to perform a target operation if it is determined from the first buffer information and the second buffer information that the second electronic device has a risk of playback stuttering. The target operation is used to reduce the amount of multimedia data stored in the second buffer.
[0178] In one embodiment, the first buffer information is used to indicate the buffering delay of the first buffer when the second electronic device begins playing multimedia data sent by the first electronic device.
[0179] In one embodiment, the acquisition module 910 is further configured to acquire first buffer information corresponding to the second electronic device when a multimedia data transmission channel is established with the second electronic device.
[0180] In one embodiment, the target operation includes a bitrate reduction operation and / or a data clearing operation. The bitrate reduction operation refers to reducing the bitrate corresponding to the multimedia encoder of the first electronic device, and the data clearing operation refers to clearing at least a portion of the multimedia data stored in the second buffer.
[0181] In one embodiment, the target operation includes a data clearing operation, which is used to clear all multimedia data stored in the second buffer, or to clear a portion of the multimedia data stored in the second buffer. Clearing a portion of the multimedia data stored in the second buffer includes at least one of the following:
[0182] Clear the multimedia data stored in the second buffer that matches the first data volume parameter;
[0183] Clear a portion of the multimedia data stored in the second buffer, so that the remaining multimedia data in the second buffer is less than or equal to the second data volume parameter;
[0184] Clear the discontinuous multimedia data stored in the second buffer;
[0185] Clear a portion of the multimedia data stored in the second buffer, so that the remaining multimedia data in the second buffer is continuous;
[0186] According to the order in which the multimedia data was stored in the second buffer, clear the portion of the multimedia data stored in the second buffer.
[0187] In one embodiment, the first data volume parameter is determined based on at least one of the first buffer information, the second buffer information, and the buffer size of the second buffer.
[0188] The second data volume parameter is determined based on at least one of the first buffer information, the second buffer information, and the buffer size of the second buffer.
[0189] In one embodiment, the multimedia data processing apparatus 900 further includes a risk identification module.
[0190] The risk identification module is used to determine that the second electronic device has a risk of playback stuttering if the second buffer information is greater than the target threshold; the target threshold is determined based on the first buffer information.
[0191] In one embodiment, the target threshold includes a first target threshold and a second target threshold, wherein the first target threshold is greater than the second target threshold, and the playback stuttering risk includes a first stuttering risk and a second stuttering risk.
[0192] The risk identification module is further configured to determine that the second electronic device has a first lag risk if the second buffer information is greater than the first target threshold; and to determine that the second electronic device has a second lag risk if the second buffer information is greater than the second target threshold but not greater than the first target threshold.
[0193] The operation module 930 is also used to perform a data clearing operation if the second electronic device has a first risk of lag; and to perform a bitrate reduction operation if the second electronic device has a second risk of lag.
[0194] In one embodiment, the operation module 930 is further configured to perform a data clearing operation and a bitrate reduction operation if the second electronic device has a first risk of lag.
[0195] In one embodiment, the operation module 930 is further configured to perform a data clearing operation on the discontinuous multimedia data in the second buffer if it is detected that the multimedia data stored in the second buffer is discontinuous.
[0196] In one embodiment, the acquisition module 910 is further configured to receive first buffer information sent by the second electronic device; or...
[0197] It is also used to receive a delay value sent by a second electronic device, the delay value being used to characterize the delay of the second electronic device in processing the received multimedia data, the delay of the second electronic device in processing the received multimedia data including buffering delay and decoding delay; and to determine first buffer information based on the delay value and decoding delay.
[0198] In one embodiment, the first buffer information includes the buffer delay duration of the first buffer, which refers to the duration for which multimedia data remains in the first buffer; the second buffer information includes the buffer duration of the second buffer, which refers to the playback duration corresponding to the multimedia data stored in the second buffer.
[0199] In this embodiment, the first electronic device can accurately identify whether there is a risk of playback stuttering in the second electronic device based on the buffering delay of the first buffer in the second electronic device and the amount of multimedia data stored in its own second buffer. If the risk of playback stuttering is identified, the first electronic device performs a target operation to reduce the amount of multimedia data stored in the second buffer, reduce network congestion, thereby improving the transmission stability of multimedia data and reducing the number of times the data receiving end stutters when playing multimedia data, thus improving the user experience.
[0200] As shown in FIG10, in one embodiment, an information transmitting device 1000 is provided, which can be applied to the second electronic device described above. The information transmitting device 1000 may include a transmitting module 1010.
[0201] The sending module 1010 is used to send first buffer information to the first electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played.
[0202] The first buffer information is used to trigger the first electronic device to determine the second buffer information corresponding to the second buffer, and to perform the target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information; the second buffer is used to buffer the multimedia data to be transmitted from the first electronic device to the second electronic device, the second buffer information is used to indicate the amount of multimedia data stored in the second buffer, and the target operation is used to reduce the amount of multimedia data stored in the second buffer.
[0203] In one embodiment, the first buffer information is used to indicate the buffering delay of the first buffer when the second electronic device begins playing multimedia data sent by the first electronic device.
[0204] In one embodiment, the sending module 1010 is further configured to send first buffer information to the first electronic device when a multimedia data transmission channel is established with the first electronic device.
[0205] In this embodiment, the second electronic device can accurately send the first buffer information to the first electronic device, which improves the accuracy of the first buffer information obtained by the first electronic device. The first electronic device can combine the buffer delay of the first buffer in the second electronic device with the amount of multimedia data stored in its own second buffer according to the first buffer information and the second buffer information, and accurately identify whether the second electronic device has a risk of playback stuttering, which further improves the accuracy of identifying whether the second electronic device has a risk of playback stuttering.
[0206] Figure 11 is a structural block diagram of an electronic device in one embodiment. As shown in Figure 11, the electronic device 1100 may include one or more of the following components: a processor 1110 and a memory 1120 coupled to the processor 1110, wherein the memory 1120 may store one or more computer programs, and the one or more computer programs may be configured to, when executed by one or more processors 1110, cause the electronic device 1100 to implement the multimedia data processing method applied to the first electronic device as described in the above embodiments.
[0207] Processor 1110 may include one or more processing cores. Processor 1110 connects to various parts within the electronic device 1100 using various interfaces and lines, and performs various functions and processes data of the electronic device 1100 by running or executing instructions, programs, code sets, or instruction sets stored in memory 1120, and by calling data stored in memory 1120. Optionally, processor 1110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 1110 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1110 and may be implemented separately using a communication chip.
[0208] The memory 1120 may include random access memory (RAM) or read-only memory (ROM). The memory 1120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described above. The data storage area may also store data created by the electronic device 1100 during use.
[0209] The electronic device 1100 may also include a transceiver unit, which may include, but is not limited to, a Bluetooth module, a Wi-Fi module, etc., and can be used to provide communication functions.
[0210] This application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program, which, when executed by the processor, causes the electronic device to implement the information transmission method for a second electronic device as described in the above embodiments.
[0211] This application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the multimedia data processing method applied to a first electronic device as described in the above embodiments.
[0212] This application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the information transmission method applied to a second electronic device as described in the above embodiments.
[0213] This application discloses a computer program product, which includes a computer program. When the computer program is executed by a processor in an electronic device, it enables the electronic device to implement the multimedia data processing method applied to a first electronic device as described in the above embodiments.
[0214] This application discloses a computer program product, which includes a computer program. When the computer program is executed by a processor in an electronic device, it enables the electronic device to implement the information transmission method applied to a second electronic device as described in the above embodiments.
[0215] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, ROM, etc.
[0216] Any references to memory, storage, databases, or other media used herein may include non-volatile and / or volatile memory. Suitable non-volatile memory may include ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may take many forms, such as Static RAM (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus DRAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
[0217] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application. It should be noted that "multiple" in this application includes "two or more".
[0218] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0219] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0220] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0221] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0222] The foregoing has provided a detailed description of a multimedia data processing method and apparatus, and an information transmission method and apparatus disclosed in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method of processing multimedia data, characterized by, The method is applied to a first electronic device, which establishes a communication connection with a second electronic device. The first electronic device sends multimedia data to the second electronic device through the communication connection, and the second electronic device plays the multimedia data. The method includes: Obtain first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played. Determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device. The second buffer information is used to indicate the amount of multimedia data stored in the second buffer. If it is determined based on the first buffer information and the second buffer information that the second electronic device has a risk of playback stuttering, then a target operation is performed, which is used to reduce the amount of multimedia data stored in the second buffer.
2. The method of claim 1, wherein, The first buffer information is used to indicate the buffering delay of the first buffer when the second electronic device starts playing the multimedia data sent by the first electronic device.
3. The method of claim 2, wherein, The step of obtaining the first buffer information corresponding to the second electronic device includes: In the event that a multimedia data transmission channel is established with the second electronic device, the first buffer information corresponding to the second electronic device is obtained.
4. The method according to any one of claims 1 to 3, characterized in that, The target operation includes a bitrate reduction operation and / or a data clearing operation. The bitrate reduction operation refers to reducing the bitrate corresponding to the multimedia encoder of the first electronic device, and the data clearing operation refers to clearing at least a portion of the multimedia data stored in the second buffer.
5. The method of claim 4, wherein, The target operation includes a data clearing operation, which is used to clear all multimedia data stored in the second buffer, or to clear a portion of the multimedia data stored in the second buffer.
6. The method of claim 5, wherein, The clearing of a portion of the multimedia data stored in the second buffer includes at least one of the following: Clear the multimedia data stored in the second buffer that matches the first data volume parameter; Clear a portion of the multimedia data stored in the second buffer, so that the remaining multimedia data in the second buffer is less than or equal to the second data volume parameter; Clear the discontinuous multimedia data stored in the second buffer; Clear a portion of the multimedia data stored in the second buffer, so that the remaining multimedia data in the second buffer is continuous; According to the order in which the multimedia data was stored in the second buffer, clear a portion of the multimedia data stored in the second buffer.
7. The method of claim 6, wherein, The first data volume parameter is determined based on at least one of the first buffer information, the second buffer information, and the buffer size of the second buffer; and / or, The second data volume parameter is determined based on at least one of the first buffer information, the second buffer information, and the buffer size of the second buffer.
8. The method according to claim 4, characterized in that, Before performing the target operation if it is determined, based on the first buffer information and the second buffer information, that the second electronic device has a risk of playback stuttering, the method further includes: If the second buffer information is greater than the target threshold, it is determined that the second electronic device has a risk of playback stuttering; the target threshold is determined based on the first buffer information.
9. The method according to claim 8, characterized in that, The target threshold includes a first target threshold and a second target threshold, wherein the first target threshold is greater than the second target threshold, and the playback stuttering risk includes a first stuttering risk and a second stuttering risk; the step of determining that the second electronic device has a playback stuttering risk if the second buffer information is greater than the target threshold includes: If the second buffer information is greater than the first target threshold, then it is determined that the second electronic device has the first risk of lag. If the second buffer information is greater than the second target threshold but not greater than the first target threshold, then it is determined that the second electronic device has the second risk of lag. If it is determined, based on the first buffer information and the second buffer information, that the second electronic device has a risk of playback stuttering, then the target operation is performed, including: If the second electronic device has the first risk of lag, then the data clearing operation is performed; If the second electronic device has the second risk of lag, then the bitrate reduction operation is performed.
10. The method according to claim 9, characterized in that, If the second electronic device has the first risk of lag, then a data clearing operation is performed, including: If the second electronic device has the first risk of lag, then the data clearing operation and the bitrate reduction operation are performed.
11. The method according to claim 1, characterized in that, The method further includes: If it is detected that the multimedia data stored in the second buffer is not continuous, then the discontinuous multimedia data in the second buffer is cleared.
12. The method according to any one of claims 1-3 and 5-11, characterized in that, The step of obtaining the first buffer information corresponding to the second electronic device includes: Receive the first buffer information sent by the second electronic device; or, The device receives a delay value sent by the second electronic device, the delay value being used to characterize the delay in the second electronic device processing the received multimedia data, the delay in the second electronic device processing the received multimedia data including the buffering delay and the decoding delay; The first buffer information is determined based on the delay value and the decoding delay.
13. The method according to any one of claims 1 to 3, 5 to 11, characterized in that, The first buffer information includes the buffer delay duration of the first buffer, which refers to the duration for which multimedia data stays in the first buffer; the second buffer information includes the buffer duration of the second buffer, which refers to the playback duration corresponding to the multimedia data stored in the second buffer.
14. A method for sending information, characterized in that, The method is applied to a second electronic device, which establishes a communication connection with a first electronic device. The first electronic device sends multimedia data to the second electronic device through the communication connection, and the second electronic device plays the multimedia data. The method includes: Send first buffer information to the first electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played. The first buffer information is used to trigger the first electronic device to determine the second buffer information corresponding to the second buffer, and to perform a target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information; the second buffer is used to buffer multimedia data to be transmitted from the first electronic device to the second electronic device, the second buffer information is used to indicate the amount of multimedia data stored in the second buffer, and the target operation is used to reduce the amount of multimedia data stored in the second buffer.
15. The method according to claim 13, characterized in that, The first buffer information is used to indicate the buffering delay of the first buffer when the second electronic device starts playing the multimedia data sent by the first electronic device.
16. The method according to claim 14 or 15, characterized in that, Sending the first buffer information to the first electronic device includes: In the event that a multimedia data transmission channel is established with the first electronic device, first buffer information is sent to the first electronic device.
17. A multimedia data processing apparatus, characterized in that, An apparatus is applied to a first electronic device, which establishes a communication connection with a second electronic device. The first electronic device sends multimedia data to the second electronic device via the communication connection, and the second electronic device plays the multimedia data. The apparatus includes: The acquisition module is used to acquire first buffer information corresponding to the second electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played. The determining module is used to determine the second buffer information corresponding to the second buffer in the first electronic device. The second buffer is used to buffer multimedia data to be transmitted to the second electronic device. The second buffer information is used to indicate the amount of multimedia data stored in the second buffer. The operation module is used to perform a target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information. The target operation is used to reduce the amount of multimedia data stored in the second buffer.
18. An information transmitting device, characterized in that, An apparatus for use in a second electronic device, wherein the second electronic device establishes a communication connection with a first electronic device, the first electronic device sending multimedia data to the second electronic device via the communication connection, and the second electronic device playing the multimedia data; the apparatus includes: The sending module is used to send first buffer information to the first electronic device. The first buffer information is used to indicate the buffering delay of the first buffer in the second electronic device. The first buffer is used to buffer multimedia data to be played. The first buffer information is used to trigger the first electronic device to determine the second buffer information corresponding to the second buffer, and to perform a target operation if it is determined that the second electronic device has a risk of playback stuttering based on the first buffer information and the second buffer information; the second buffer is used to buffer multimedia data to be transmitted from the first electronic device to the second electronic device, the second buffer information is used to indicate the amount of multimedia data stored in the second buffer, and the target operation is used to reduce the amount of multimedia data stored in the second buffer.
19. An electronic device, characterized in that, The device includes a memory and a processor, and a transceiver unit. The memory stores a computer program, which, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1 to 13 or 14 to 16.
20. A computer program product, characterized in that, The method includes a computer program, and when the computer program is executed by a processor in an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 13 or 14 to 16.