A multi-device synchronous playback method and apparatus

By evaluating the relay and playback capabilities of terminal devices, selecting the optimal transmission path and using the relay node to optimize audio data transmission, the delay and lag problems in synchronous audio playback of multiple devices are solved, and the playback efficiency and stability are improved.

CN115733703BActive Publication Date: 2025-08-01HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110993559.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-27
Publication Date
2025-08-01
Estimated Expiration
2041-08-27

AI Technical Summary

Technical Problem

In the multi-device audio synchronous playback scenario, the problem of synchronous playback delay and lag caused by different device location and network signal status affects the user experience.

Method used

By evaluating the relay capability and playback capability of each terminal device, selecting the optimal transmission path for audio data transmission, and using other devices as relay nodes, optimizing the transmission path to improve the efficiency and stability of synchronous playback.

Benefits of technology

It improves the efficiency, stability and user experience of synchronous audio playback of multi-device, reduces latency and lag between devices, and improves overall playback fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733703B_ABST
    Figure CN115733703B_ABST
Patent Text Reader

Abstract

This application relates to the field of audio technology, and discloses a multi-device synchronous playback method and apparatus to improve the efficiency of multi-device audio synchronous playback. The method is as follows: the first terminal device obtains the transit capacity evaluation values of N second terminal devices, where N is a positive integer; the first terminal device obtains the transit availability of the N second terminal devices for the first terminal device according to the N transit capacity evaluation values; the first terminal device selects a destination transmission path from N transmission paths based on the transit availability of the N second terminal devices for the first terminal device, and the N transmission paths correspond to the N second terminal devices one by one; the first terminal device obtains the audio data to be played back from the second terminal device corresponding to the destination transmission path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of audio technology, and in particular, to a multi-device synchronous playback method and device. Background Art

[0002] With the development of intelligent network technology, there are more and more scenarios of multi-device collaborative management, bringing a better user experience to users. For example, on the basis of multiple devices that can be used to play audio in a local area network such as a home, there are more and more scenarios of synchronous audio playback using multiple different devices.

[0003] However, affected by factors such as different placement positions of different devices and different network signal states, there will be certain limitations in realizing multi-device audio synchronous playback, resulting in a poor user experience. For example, since the time-consuming for one device in multiple devices to obtain the audio data to be played is relatively long, the start-up waiting time for multi-device synchronous playback is relatively long or there are problems such as stuttering during the synchronous playback process.

[0004] Therefore, how to improve the efficiency of multi-device audio synchronous playback is of research value. Summary of the Invention

[0005] The embodiments of the present application provide a multi-device synchronous playback method and device, which are used to solve the problem that there are certain limitations in realizing multi-device audio synchronous playback in related technologies.

[0006] In a first aspect, the embodiments of the present application provide a multi-device synchronous playback method, and the method includes: a first terminal device obtains the transit ability evaluation values of N second terminal devices, where N is a positive integer; the first terminal device obtains the transit availability of the N second terminal devices for the first terminal device according to the N transit ability evaluation values; the first terminal device selects a target transmission path from N transmission paths based on the transit availability of the N second terminal devices for the first terminal device, and the N transmission paths correspond to the N second terminal devices one by one; the first terminal device obtains the audio data to be played from the second terminal device corresponding to the target transmission path. Optionally, assuming that the greater the transit availability of the second terminal device for the first terminal device, the better the transmission efficiency, stability, and reliability of the first terminal device selecting the transmission path corresponding to the second terminal device as the target transmission path, then when determining the target transmission path, the first terminal device may preferentially select the second terminal device with a relatively high transit availability for the first terminal device.

[0007] Through the method provided in this application, in the application scenario of multi-device synchronous playback, in the embodiments of this application, the relay capabilities of the terminal devices included in this application scenario are evaluated. Based on the relay capabilities, it is determined whether a terminal device can be used as a relay node for other terminal devices to obtain the audio data to be played, so as to provide multiple optional transmission paths for other terminal devices and achieve path optimization. Compared with the prior art in which each terminal device obtains the audio data to be played from a router, the embodiments of this application can improve the acquisition efficiency, stability, and reliability of multiple terminal devices for the same audio data to be played, thereby improving the user experience of multi-device synchronous playback.

[0008] In a possible design, the first terminal device obtains the relay availability of the N second terminal devices for the first terminal device according to the N relay capability evaluation values, which can be implemented as follows: the first terminal device determines N relative signal strengths corresponding to the N second terminal devices; the first terminal device assigns relay availability weight factors to the N second terminal devices respectively based on the N relative signal strengths; for the i-th second terminal device, the first terminal device takes the product of the relay capability evaluation value and the relay availability weight factor of the i-th second terminal device as the relay availability of the i-th terminal device; i is any positive integer from 1 to N. Optionally, assuming that the greater the relative signal strength of the second terminal device, the higher the relay availability of the second terminal device for the first terminal device, the first terminal device can assign a higher relay availability weight factor to the second terminal device with a greater relative signal strength.

[0009] In this design, the first terminal device assigns different relay availability weight factors to different second terminal devices based on the relative relationship with each second terminal device, which can improve the relay availability of the second terminal device with a better relative relationship, thereby ensuring the accuracy of the selection of the target transmission path.

[0010] In a possible design, the first terminal device can also relay the audio data to be played for other terminal devices, which can be determined according to the relay ability evaluation value of the first terminal device. This design can be implemented as follows: the first terminal device uses the first evaluation parameter group to determine the first relay ability evaluation value of the first terminal device. The first evaluation parameter group includes, but is not limited to, one or a combination of the following evaluation parameters: the network signal strength of the first terminal device, the network transmission status of the first terminal device, the type of the first terminal device, the usage status of the first terminal device, and the charging frequency of the first terminal device. If the first relay ability evaluation value meets the preset relay ability threshold condition, the first terminal device sends the first relay ability evaluation value, etc. It can be understood that before the first terminal device obtains the relay ability evaluation values of N second terminal devices, the second terminal devices can also use the design introduced above to determine their respective relay ability evaluation values. Optionally, assuming that the larger the first relay ability evaluation value of the first terminal device, the stronger the relay ability of the first terminal device, then when the first relay ability evaluation value is greater than or equal to the preset relay ability threshold, it means that the condition is met.

[0011] In this design, by calculating the relay ability evaluation value of the first terminal device, it is also possible to evaluate whether the first terminal device can be used as a relay node for other terminal devices, so as to provide a possible transmission path for other terminal devices, in order to optimize the overall stability and efficiency of the multi-device synchronous playback scenario.

[0012] In the above design, the first terminal device uses the first evaluation parameter group to determine the first relay ability evaluation value of the first terminal device. An optional implementation manner is: the first terminal device obtains the relay ability weight factors corresponding to the respective evaluation parameters included in the first evaluation parameter group; the first terminal device uses the relay ability weight factors corresponding to the respective evaluation parameters to perform weighted summation on the respective evaluation parameters included in the first evaluation parameter group to obtain the first relay ability evaluation value. Among them, the relay ability weight factor can be predefined or obtained based on experience, etc. Another option is that the first terminal device can also adopt an implementation manner for determining the first relay ability evaluation value, such as using a machine learning method, etc., which is not limited in this application.

[0013] In this design, the first terminal device determines the first relay ability evaluation value based on multiple evaluation parameters in the first evaluation parameter group, which can more accurately evaluate the relay ability of the first terminal device, thereby ensuring the stability, efficiency, and reliability of the multi-device synchronous playback scenario.

[0014] In a possible design, the first terminal device can also periodically update the first relay ability evaluation value.

[0015] In this design, the first terminal device can obtain more accurate evaluation results through periodic updates, thereby ensuring the efficiency, reliability, and stability of multi-device synchronous playback.

[0016] In a possible design, the first terminal device can perform role division and different processing can be carried out under different roles. For example, the first terminal device can be divided into a normal playback role or an end playback role according to the playback ability evaluation value. Among them, the end playback role indicates that the playback ability of the first terminal device is poor. Based on this, the first terminal device uses a second evaluation parameter group to determine the first playback ability evaluation value of the first terminal device. The second evaluation parameter group includes one or more combinations of the following evaluation parameters: the network signal strength of the first terminal device, the network transmission status of the first terminal device, and the type of the first terminal device. Optionally, if the first terminal device determines that the first playback ability evaluation value does not meet the playback ability threshold condition, the first terminal device can select a destination transmission path from N transmission paths corresponding to N second terminal devices to obtain the audio data to be played. Optionally, assuming that the larger the first playback ability evaluation value of the first terminal device, the stronger the playback ability of the first terminal device, then when the first playback ability evaluation value is greater than or equal to the preset playback ability threshold, it means that the condition is met.

[0017] In this design, by evaluating the playback ability of the first terminal device, the first terminal device can be timely triggered to optimize the destination transmission path. For example, search for and discover a better destination transmission path and perform a switch, thereby ensuring the efficiency, reliability, and stability of multi-device synchronous playback.

[0018] In a possible design, the first terminal device selects a destination transmission path from N transmission paths based on the transit availability of the N second terminal devices for the first terminal device, which can be implemented as follows: when the first terminal device determines that the transit availability of the N second terminal devices for the first terminal device does not meet the transit capacity threshold condition, the first terminal device takes the current transmission path as the destination transmission path. Or it can also be implemented as: when the first terminal device determines that the transit availability of at least one second terminal device for the first terminal device meets the transit capacity threshold condition, the first terminal device selects a destination transmission path from at least one transmission path corresponding to the at least one second terminal device. Or it can be implemented in another way: when the first terminal device determines that the transit availability of at least one second terminal device for the first terminal device meets the transit capacity threshold condition and the transit availability of the at least one second terminal device for the first terminal device does not meet the preset switching condition compared with the transit availability of the second terminal device corresponding to the current transmission path for the first terminal device, the first terminal device takes the current transmission path as the destination transmission path.

[0019] In this design, by evaluating the transit availability of multiple transmission paths, the first terminal device can more accurately select the destination transmission path, thereby ensuring the efficiency, reliability, and stability of multi-device synchronous playback. Moreover, by comparing the transit availability of multiple optional transmission paths with that of the current transmission path, this design can set the optional transmission path to perform switching only when it meets the preset switching condition (such as a certain transit availability difference) compared with the current transmission path, which can also better ensure the stability of the transmission path and avoid frequent switching of the destination transmission path.

[0020] In a possible design, the first terminal device can also periodically update the first playback ability evaluation value.

[0021] In this design, through periodic update, the first terminal device can obtain a more accurate evaluation result, thereby ensuring the efficiency, reliability, and stability of multi-device synchronous playback.

[0022] In a possible design, the first terminal device can also ensure the transmission efficiency and stability of the audio data to be played by predicting the current transmission path. Specifically, the first terminal device predicts the stability of the current transmission path based on the first processing data to obtain the stability evaluation value of the current transmission path at the first moment; the first processing data is obtained by the first terminal device by statistically processing the data generated by using the current transmission path; and the first terminal device predicts the transit capacity of the current transmission path based on the second processing data to obtain the transit capacity evaluation value of the current transmission path at the second moment; the second processing data is obtained by the first terminal device by statistically processing the transit capacity evaluation value of the second terminal device corresponding to the current transmission path. If the first terminal device detects a first trigger condition, it pre-connects at least one alternative transmission path; wherein, the first trigger condition includes one or more combinations of the following conditions: the stability evaluation value at the first moment meets the preset stability threshold condition, and the transit capacity evaluation value at the second moment meets the preset transit capacity threshold condition.

[0023] In this design, by predicting the stability and transit capacity of the current transmission path in a future period of time, it is possible to pre-connect an alternative transmission path in a scenario where the stability is poor or the transit capacity is not good, so as to effectively switch the target transmission path and ensure the stability of multi-device synchronous playback.

[0024] In a possible design, the first terminal device selects a target transmission path from N transmission paths, including: the first terminal device selects the target transmission path from the at least one alternative transmission path.

[0025] In this design, based on the previous design, the first terminal device can pre-connect an alternative transmission path according to the prediction. In this way, when the first terminal device selects a target transmission path, it can be determined from the alternative transmission paths, thereby improving the accuracy and efficiency of the transmission path switching.

[0026] In a possible design, the first terminal device predicts the stability of the current transmission path based on the first processing data, which can be implemented as the first terminal device predicting the stability of the current transmission path based on the first processing data by using a time series learning algorithm; the first terminal device predicts the transit capacity of the current transmission path based on the second processing data, including: the first terminal device predicts the transit capacity of the current transmission path based on the second processing data by using a time series learning algorithm.

[0027] In this design, through the time series learning algorithm, more accurate prediction results can be obtained by statistically processing historical processing data.

[0028] In a possible design, the stability evaluation value is determined by one or a combination of more than one of the following information, including but not limited to: the power-off confidence of the second terminal device, the load status of the second terminal device, the network status of the second terminal device, etc.

[0029] In this design, the first terminal device predicts the power-off state, load state, or network state, etc. of the second terminal device corresponding to the current transmission path to evaluate the stability of the current transmission path, which can improve the efficiency of the first terminal device in switching the destination transmission path, thereby ensuring the efficiency and reliability of multi-device synchronous playback.

[0030] In a possible design, after the first terminal device obtains the audio data to be played, the first terminal device can receive and respond to a play instruction to play the audio data to be played; the play instruction is used to instruct at least one terminal device to synchronously play the audio data to be played, and the at least one terminal device includes the first terminal device and the N second terminal devices.

[0031] In this design, through the method provided in this application, after the first terminal device and other terminal devices participating in synchronous playback have obtained the audio data to be played, synchronous playback can be achieved based on the play instruction.

[0032] In a second aspect, an embodiment of the present application further provides a terminal device, including: one or more processors; one or more memories; the one or more memories are used to store one or more computer programs and data information; wherein the one or more computer programs include instructions; when the instructions are executed by the one or more processors, the terminal device is caused to execute the method described in any possible design in the first aspect above.

[0033] In a third aspect, an embodiment of the present application further provides a communication system, including at least one terminal device as described in the second aspect above.

[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, and the computer-readable medium stores a computer program (which can also be referred to as code or instructions), and when it runs on a computer, the computer is caused to execute the method in any possible implementation manner in the first aspect above.

[0035] In a fifth aspect, an embodiment of the present application provides a computer program product, and the computer program product includes: a computer program (which can also be referred to as code or instructions), and when the computer program is run, the computer is caused to execute the method in any possible implementation manner in the first aspect above.

[0036] Sixth aspect, an embodiment of the present application further provides a graphical user interface on a terminal device. The terminal device has a display screen, one or more memories, and one or more processors. The one or more processors are configured to execute one or more computer programs stored in the one or more memories. The graphical user interface includes the graphical user interface displayed when the terminal device executes any possible implementation manner of the first aspect of the embodiments of the present application.

[0037] For the beneficial effects of any one of the above second aspect to sixth aspect, please refer to the beneficial effects of various possible designs in the above first aspect for details, which will not be elaborated here. Description of the Drawings

[0038] Figure 1 It is an application scenario under a home network;

[0039] Figure 2 It is a schematic diagram of the hardware structure of a possible terminal device provided by an embodiment of the present application;

[0040] Figure 3 It is a block diagram of the software structure of a terminal device provided by an embodiment of the present application;

[0041] Figure 4 It is one of the schematic diagrams of the application scenario of a multi-device synchronous playback method provided by an embodiment of the present application;

[0042] Figure 5 It is one of the flow diagrams of a multi-device synchronous playback method provided by an embodiment of the present application;

[0043] Figure 6 It is the second of the schematic diagrams of the application scenario of a multi-device synchronous playback method provided by an embodiment of the present application;

[0044] Figure 7 It is the second of the flow diagrams of a multi-device synchronous playback method provided by an embodiment of the present application;

[0045] Figure 8 It is the third of the schematic diagrams of the application scenario of a multi-device synchronous playback method provided by an embodiment of the present application;

[0046] Figure 9 It is the third of the flow diagrams of a multi-device synchronous playback method provided by an embodiment of the present application;

[0047] Figure 10 It is the fourth of the schematic diagrams of the application scenario of a multi-device synchronous playback method provided by an embodiment of the present application;

[0048] Figure 11 It is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Detailed implementation manners

[0049] With the development of intelligent network technology, there are more and more scenarios of multi-device collaborative management. Among them, the device can also be referred to as a "terminal device" or a "terminal", and can be used interchangeably in the following embodiments.

[0050] In the scenario of collaborative management of multiple terminal devices that can be used to play audio in a local area network, the demand for synchronous audio playback using multiple different terminal devices is becoming stronger and stronger. Among them, the local area network can be a home network, an enterprise network, etc.

[0051] For example, Figure 1 It is an application scenario under a home network. In Figure 1 The shown home network includes Room 1, Room 2, Room 3, and Room 4, and a terminal device that can be used to play audio is respectively installed in each room, such as a speaker device, etc. Each terminal device in this home network can be connected to the local area network configured by an access point (AP) (such as a wireless router, a switch, etc.) located in Room 1, and is used to implement functions such as data transmission through this local area network. For example, users can use multiple speaker devices for synchronous music playback, so that users in each room can hear the same music synchronously, or users do not perceive music delay when going to different rooms, improving the user experience.

[0052] Another example is that the local area network can also be an enterprise network. In an enterprise network, multiple broadcast terminal devices can be installed on multiple different floors or in offices. Through multiple broadcast terminal devices, synchronous playback of the same audio content can be performed.

[0053] However, affected by factors such as different placement positions of different devices and different network signal states, there will be certain limitations in realizing multi-device audio synchronous playback. Combining Figure 1 The shown scenario, due to factors such as the different distances between different speaker devices and the wireless router, being placed in the same or different rooms, the bandwidth of the speaker device for receiving audio data, and the network signal state, etc., it may cause different speaker devices to take different times to obtain the same audio data, resulting in problems such as poor synchronous playback experience. For example, the network signal state of a speaker device that is far from the wireless router is usually poor, and the network signal state of a speaker device placed in the same room as the wireless router is generally better.

[0054] In the scenario of multi-device audio synchronous playback, considering the short board effect, the smoothness of synchronous playback is easily affected by the terminal device at the end. Among them, the terminal device at the end can be understood as a terminal device with a poor network signal state to a certain extent, usually a terminal device far from the wireless router or a terminal device with many obstacles between it and the wireless router, etc.

[0055] Exemplarily, assume Figure 1 that the terminal device at the end in is the speaker device D. During the process of speaker devices A, B, C, and D obtaining the same audio data to be played for synchronous playback, due to the poor network signal state of the speaker device D, the time taken to obtain the audio data to be played is the longest. Therefore, the start time of the speaker devices A, B, C, and D for the audio data to be played depends on the acquisition time of the speaker device D, and there is a problem of a long start-up delay. That is to say, when the speaker devices A, B, and C have obtained the audio data to be played while D has not, the speaker devices A, B, and C need to wait until D also obtains the audio data to be played before they can start synchronous playback.

[0056] Another exemplarily, if the audio data to be played is transmitted to the speaker devices A, B, C, and D in the form of fragments or packets, there may also be a problem of stuttering during synchronous playback due to the incomplete acquisition of the next fragment or packet of the audio data to be played. For example, assume that the audio data to be played is a piece of music, which is divided into two fragments for transmission. After the speaker devices A, B, C, and D obtain the first fragment of the audio data to be played and start synchronous playback, while obtaining the second fragment of the audio data to be played, it is possible that the playback of the first fragment has been completed, but there is a speaker device among the speaker devices A, B, C, and D that has not completed the acquisition of the second fragment of the audio data to be played, resulting in the playback being paused.

[0057] In addition, in the scenario of multi-device audio synchronous playback, it can be understood that as the number of terminal devices at the end participating in synchronous playback increases, the smoothness of synchronous playback may also become worse and worse.

[0058] In view of this, the embodiments of the present application provide a multi-device synchronous playback method. In the scenario of multi-device audio synchronous playback, comprehensively considering factors such as the performance and state of multiple terminal devices included in this scenario, based on the idea that each terminal device can also be used as a relay node between other terminal devices and the wireless router, by selecting a destination transmission path for the terminal devices in this scenario from multiple possible transmission paths, a technical solution that can improve the playback smoothness, stability, and user experience of multi-device synchronous playback is designed.

[0059] Next, the embodiments of the present application will be described in detail with reference to the accompanying drawings.

[0060] It can be understood that the audio data in the embodiments of the present application can also be referred to as sound data, which is used to represent sound and is the data obtained after processing an audio file (such as an ogg file). By way of example, audio data is obtained by performing operations such as decoding, decompressing, or applying sound effects to an audio file. The audio file contains audio data and can be an MP3 file, an MP4 file, or a file in other formats, without limitation in this regard. That is, the terminal device can play sound based on the audio data.

[0061] The terminal device in the embodiments of the present application can be a device with audio playback capabilities such as a smart home device (e.g., a smart TV, a smart screen, a smart speaker, etc.), a mobile phone, a tablet computer, a wearable device (e.g., a watch, a helmet, headphones, etc.), an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. It can be understood that the embodiments of the present application do not impose any restrictions on the specific type of the terminal device.

[0062] The terminal devices to which the embodiments of the present application can be applied, exemplary embodiments include but are not limited to portable terminal devices equipped with or other operating systems. The above portable terminal devices can also be other portable terminal devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel).

[0063] Figure 2 FIG. shows a schematic diagram of the hardware structure of a possible terminal device. Among them, the terminal device 200 includes: a radio frequency (RF) circuit 210, a power supply 220, a processor 230, a memory 240, an input unit 250, a display unit 260, an audio circuit 270, a communication interface 280, and a wireless-fidelity (Wi-Fi) module 290, and other components. Those skilled in the art can understand that Figure 2 the hardware structure of the terminal device 200 shown in FIG. does not limit the terminal device 200. The terminal device 200 provided by the embodiments of the present application may include more or fewer components than those shown in the figure, may combine two or more components, or may have a different component configuration. Figure 2 The various components shown in FIG. can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0064] The following will specifically introduce each component of the terminal device 200 in conjunction with Figure 2 :

[0065] The RF circuit 210 can be used for receiving and sending data during communication or calls. In particular, after the RF circuit 210 receives the downlink data from the base station, it sends the data to the processor 230 for processing. Additionally, it sends the uplink data to be sent to the base station. Generally, the RF circuit 210 includes, but is not limited to, antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc.

[0066] In addition, the RF circuit 210 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0067] The Wi-Fi technology belongs to short-range wireless transmission technology. The terminal device 200 can connect to and access an access point (AP) through the Wi-Fi module 290, thereby realizing access to the data network. The Wi-Fi module 290 can be used for receiving and sending data during communication. In the embodiments of the present application, the terminal device 200 can also be connected to APs such as a wireless router and a gateway through the Wi-Fi module 290, thereby realizing access to the data network, such as receiving audio data to be played, etc.

[0068] The terminal device 200 can be physically connected to other devices through the communication interface 280. Optionally, the communication interface 280 of the terminal device 200 is connected to the communication interface of the other device through a cable to realize data transmission between the terminal device 200 and the other device.

[0069] Since in the embodiments of the present application, the terminal device 200 can implement communication services and interact with other terminal devices, the terminal device 200 needs to have a data transmission function, that is, the terminal device 200 needs to include a communication module internally. Although Figure 2 communication modules such as the RF circuit 210, the Wi-Fi module 290, and the communication interface 280 are shown, it can be understood that at least one of the above components or other communication modules for implementing communication (such as a Bluetooth module) exist in the terminal device 200 to perform data transmission.

[0070] For example, when the terminal device 200 is a mobile phone, the terminal device 200 may include the RF circuit 210, may also include the Wi-Fi module 290, or may include a Bluetooth module ( Figure 2 not shown in the figure); when the terminal device 200 is a computer, the terminal device 200 may include the communication interface 280, may also include the Wi-Fi module 290, or may include a Bluetooth module ( Figure 2 not shown in the figure); when the terminal device 200 is a tablet computer, the terminal device 200 may include the Wi-Fi module, or may include a Bluetooth module ( Figure 2 not shown in the figure).

[0071] The memory 240 can be used to store software programs and modules. The processor 230 executes various functional applications and data processing of the terminal device 200 by running the software programs and modules stored in the memory 240. Optionally, the memory 240 may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system (mainly including software programs or modules corresponding to the kernel layer, the system layer, the application framework layer, and the application layer, etc.).

[0072] In addition, the memory 240 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0073] The input unit 250 can be used to receive editing operations of various different types of data objects such as digital or character information input by a user, and generate key signal inputs related to user settings and function controls of the terminal device 200. Optionally, the input unit 250 may include a touch panel 251 and other input devices 252.

[0074] Among them, the touch panel 251, also known as a touch screen, can collect touch operations of a user on or near it (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch panel 251), and drive corresponding connection devices according to a preset program.

[0075] Optionally, the other input device 252 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0076] The display unit 260 can be used to display information input by the user or information provided to the user, as well as various menus of the terminal device 200. The display unit 260 is the display system of the terminal device 200, used to present an interface and implement human-computer interaction. The display unit 260 may include a display panel 261. Optionally, the display panel 261 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In the embodiments of the present application, the display unit 260 may not be provided on the terminal device. For example, a smart speaker device does not need to be provided with a display screen; or on the terminal device, the display unit 260 may also display the audio data to be played received by the terminal device 200 through the Wi-Fi module. For example, if the audio data to be played is music, the corresponding lyrics or pictures of the music may be played on the display panel 261.

[0077] The processor 230 is the control center of the terminal device 200, connecting various components through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 240, and calling data stored in the memory 240, it executes various functions of the terminal device 200 and processes data, thereby implementing various services based on the terminal device 200. In the embodiments of the present application, the processor 230 is used to implement the method provided in the embodiments of the present application, and further provides a technical solution that can improve the playback fluency, stability, and user experience of multi-device synchronous playback.

[0078] The terminal device 200 further includes a power supply 220 (such as a battery) for powering each component. Optionally, the power supply 220 may be logically connected to the processor 230 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption through the power management system.

[0079] Such as Figure 2As shown in the figure, the terminal device 200 further includes an audio circuit 270, a microphone 271, and a speaker 272, which can provide an audio interface between the user and the terminal device 200. The audio circuit 270 can be used to convert audio data into a signal that the speaker 272 can recognize, and transmit the signal to the speaker 272, which converts it into a sound signal for output. The microphone 271 is used to collect external sound signals (such as the sound of a person speaking or other sounds, etc.), and convert the collected external sound signals into a signal that the audio circuit 270 can recognize, and send it to the audio circuit 270. The audio circuit 270 can also be used to convert the signal sent by the microphone 271 into audio data, and then output the audio data to the RF circuit 220 for transmission to, for example, another terminal device, or output the audio data to the memory 240 for further processing later.

[0080] Although not shown, the terminal device 200 may further include at least one sensor, a camera, etc., which will not be elaborated here. The at least one sensor may include, but is not limited to, a pressure sensor, a barometric pressure sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a touch sensor, a temperature sensor, etc.

[0081] The operating system (OS) involved in the embodiments of the present application is the most basic system software running on the terminal device 200. Taking a smart speaker as an example, the operating system may be the HarmonyOS, the Android system, or the iOS system. The software system of the terminal device 200 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the operating system with a layered architecture as an example, the software structure of the terminal device 200 will be exemplarily described.

[0082] Figure 3 This is a software structure block diagram of a terminal device provided by the embodiments of the present application. As Figure 3 shown, the software structure of the terminal device may be a layered architecture. For example, the software can be divided into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into five layers, from top to bottom are the application layer, the application framework layer (FWK), the runtime and system libraries, the kernel layer, and the hardware layer.

[0083] The application layer may include a series of application packages. As Figure 3 shown, the application layer may include a camera, settings, a skin module, a user interface (UI), third-party applications, etc. Among them, the third-party applications may include WLAN, music, calls, Bluetooth, video, etc.

[0084] In some embodiments of the present application, the application layer can be used to implement the presentation of the editing interface, and the above-mentioned editing interface can be used for users to operate. For example, if the smart speaker includes a display panel 261, the user can perform user operations such as playing music on the main interface displayed on the display panel 261.

[0085] In one possible implementation, the application can be developed using the Java language and completed by calling the application programming interface (API) provided by the application framework layer. Developers can interact with the underlying layers of the operating system (such as the hardware layer, kernel layer, etc.) through the application framework layer to develop their own applications. The application framework layer is mainly a series of services and management systems of the operating system.

[0086] The application framework layer provides application programming interfaces and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. As Figure 3 shown, the application framework layer can include a quick icon management module, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.

[0087] The quick icon management module is used to manage the quick icons displayed on the terminal device, such as creating quick icons, removing quick icons, monitoring whether the quick icons meet the display conditions, etc.

[0088] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make these data accessible to applications. The data can include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc.

[0089] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view for displaying text and a view for displaying pictures.

[0090] The phone manager is used to provide the communication function of the terminal device. For example, the management of call status (including answering, hanging up, etc.).

[0091] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0092] The notification manager enables an application to display notification information in the status bar. It can be used to convey messages of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that a download is completed, a message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scrolling text, such as a notification of a background-running application, or a notification that appears on the screen in the form of a dialogue window. For example, it prompts text information in the status bar, emits a prompt tone, the terminal device vibrates, the indicator light flashes, etc.

[0093] In some embodiments of the present application, the application framework layer is mainly responsible for calling the service interface for communication with the hardware layer to transfer the operation request of the user's operation to the hardware layer, and the operation request may include an operation request for the user to open a certain APP, etc.

[0094] The runtime includes a core library and a virtual machine. The runtime is responsible for the scheduling and management of the operating system.

[0095] The core library includes two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of the operating system. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as the management of the object life cycle, stack management, thread management, security and exception management, and garbage collection.

[0096] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.

[0097] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0098] The media library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0099] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0100] The 2D graphics engine is a drawing engine for 2D drawing.

[0101] In some embodiments, a 3D graphics processing library can be used to draw 3D motion trajectory images, and a 2D graphics engine can be used to draw 2D motion trajectory images.

[0102] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.

[0103] The hardware layer may include various sensors, such as an acceleration sensor, a gyroscope sensor, a touch sensor, etc.

[0104] Generally, the terminal device 200 can run multiple applications simultaneously. More simply, one application can correspond to one process, and more complexly, one application can correspond to multiple processes. Each process has a process number (process ID).

[0105] Combined with the above Figure 2 introduction to the hardware structure of the terminal device, and Figure 3 introduction to the software framework of the terminal device, below, in combination with multiple embodiments and drawings, the working principles of the software and hardware of the terminal device for executing a multi-device synchronous playback method proposed in the embodiments of the present application are exemplarily described.

[0106] It should be understood that in the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single item (s) or plural item (s). For example, at least one (item) of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0107] The multiple involved in the embodiments of the present application means greater than or equal to two.

[0108] In addition, it should be understood that in the description of the present application, terms such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0109] In addition, in the embodiments of the present application, "terminal device", "device", "mobile phone", etc. can be used interchangeably, which refers to various devices that can be used to implement the embodiments of the present application; "application" and "application program" in the embodiments of the present application can also be used interchangeably, both referring to programs or clients with certain service-providing capabilities, that is, applications and clients can also be used interchangeably. For example, a video client or a game client can also be called a video application or a game application, etc.

[0110] It should be understood that the hardware structure of the terminal device can be as Figure 2 shown, and the software architecture can be as Figure 3 shown. Among them, the software programs and / or modules corresponding to the software architecture in the terminal device can be stored in the memory 240, and the processor 230 can run the software programs and applications stored in the memory 240 to execute the process of a multi-device synchronous playback method provided by the embodiments of the present application.

[0111] To facilitate understanding of a multi-device synchronous playback method provided by the present application, the implementation process of the method provided by the present application will be introduced below in combination with Figures 4 to 10 the content shown in

[0112] The embodiments of the present application are applicable to the application scenario of multi-device audio synchronous playback. Generally, multiple terminal devices are connected to the same local area network, such as Figure 1 the scenario shown. It should be noted that Figure 1 the application scenario of the multi-device audio synchronous playback described above is only an example for illustration, and the embodiments of the present application do not limit the number of wireless APs, the number of terminal devices, the type of wireless APs, and the type of terminal devices included in the application scenario of the multi-device audio synchronous playback.

[0113] In the above application scenario, when the terminal device obtains the audio data to be played, it can be obtained through a wireless router, or it can also be obtained by using the method of other terminal devices to relay the audio data to be played. Exemplarily, Figure 4 the following shows a schematic diagram of an application scenario of another multi-device synchronous playback method provided by the embodiments of the present application, taking the speaker device D as an example.

[0114] An optional obtaining method is that based on the speaker device D connecting to the wireless router through the Wi-Fi module 290, the speaker device D can obtain the audio data to be played through the wireless router. As Figure 4 the transmission path 1 (wireless router → speaker device D) in

[0115] Another optional acquisition method is that due to factors such as the long distance or many obstacles between the speaker device D and the wireless router, the network signal status of the connection between the speaker device D and the wireless router is poor. In the scenario of multi-device audio synchronous playback, based on the fact that speakers A, B, and C will also obtain the same audio data to be played, the speaker device D can also obtain the audio data to be played through the relay of the speaker devices A, B, or C. For example Figure 4 the transmission path 2 (wireless router → speaker device B → speaker device D), or transmission path 3 (wireless router → speaker device A → speaker device D), or transmission path 4 (wireless router → speaker device C → speaker device D) in Figure 4 . Among them, the speaker devices A, B, or C can obtain the audio data to be played through the wireless router. It should be noted that the transmission of the audio data to be played between terminal devices can be implemented by transmission methods such as wireless or wired routers, Bluetooth, Wi-Fi direct connection, etc., and the present application does not limit this.

[0116] It can be understood that the terminal device itself not only has the playback ability but also can have the relay ability. Among them, the playback ability represents the efficiency of the terminal device to obtain the audio data to be played and play the audio data to be played, such as the time-consuming for obtaining the audio data to be played, etc., which can be used to reflect the processing capabilities of the terminal device to continuously and stably obtain the audio data to be played and manage and buffer the audio data to be played. The relay ability represents the efficiency, performance, persistence, and reliability of the terminal device to obtain the audio data to be played and transmit the audio data to be played to other terminal devices, such as the total time-consuming from the terminal device starts to obtain the audio data to be played until it transmits the audio data to be played to other terminal devices, the stability of the operation state of the terminal device itself, the continuous stability during the relay process of the terminal device for the audio data to be played, etc.

[0117] Through Figure 4 the scenario introduction in Figure 4 , in the scenario of multi-device audio synchronous playback, based on the fact that each terminal device can select a transmission path from multiple transmission paths to obtain the audio data to be played. In order to improve the fluency, stability, and user experience of audio synchronous playback in this scenario, when implementing the present application, the relay ability and playback ability of multiple terminal devices can be combined to provide a technical solution for how to select the destination transmission path for each terminal device in this scenario, so as to optimize the transmission path for at least one terminal device to obtain the audio data to be played, improve the efficiency and reliability of multiple terminal devices to obtain the audio data to be played, reduce the time-consuming for the end terminal device to obtain the audio data to be played, and improve the stability of obtaining the audio data to be played.

[0118] In an optional embodiment Figure 5Schematic flowchart of a multi-device synchronous playback method provided by an embodiment of the present application. Assume that there are multiple terminal devices in the scenario of audio synchronous playback. In the following embodiments, one of the terminal devices (i.e., the first terminal device in the following embodiments) is taken as an example to introduce the method provided by the embodiments of the present application. It can be understood that the implementation manners of other terminal devices (i.e., any one of the N second terminal devices in the following embodiments) can refer to the implementation manner of the first terminal device.

[0119] The first terminal device can receive multiple possible trigger events, and the trigger events are used to instruct the first terminal device to execute Figure 5 the method flow shown.

[0120] As a possible trigger scenario, on the basis of receiving a multi-device synchronous playback event, if the first terminal device does not save the default transmission path for obtaining the audio data to be played, it can adopt Figure 5 the method flow shown to select the destination transmission path. It should be noted that generally, the first terminal device can use the transmission path corresponding to the wireless router (such as Figure 4 transmission path 1) as the default transmission path, or the first terminal device saves the destination transmission path determined during the previous multi-device synchronous playback as the default transmission path.

[0121] As another possible trigger scenario, the first terminal device can be triggered according to its own network signal strength (such as the actual available bandwidth), network transmission status and other network parameters. When the first terminal device detects that its network parameters cannot meet the basic requirements for obtaining the audio data to be played, it can trigger the selection of the destination transmission path. If there is a destination transmission path different from the current transmission path, the first terminal device can switch to the destination transmission path to obtain the audio data to be played, so as to improve the acquisition efficiency, stability and reliability. Exemplarily, the basic requirements for the first terminal device to obtain the audio data to be played can be pre-set, for example, the downlink transmission rate is set to be 100 Kbps based on the requirements.

[0122] As yet another possible trigger scenario, the first terminal device can set a trigger period for determining the destination transmission path. In this way, by periodically obtaining the destination transmission path of the first terminal device, the short board effect caused by the abnormality of the first terminal device during use can be reduced, thereby improving the stability of audio acquisition.

[0123] It should be noted that in the scenario of multi-device synchronous playback, the first terminal device can also be set to execute Figure 5 the method flow for obtaining the destination transmission path based on other possible trigger scenarios, and the present application does not limit this.

[0124] S501, the first terminal device obtains the relay capacity evaluation values of N second terminal devices; N is a positive integer. The relay capacity evaluation value is used to indicate the relay capacity of the second terminal device. When the second terminal device meets the preset relay capacity threshold condition, it can send the relay capacity evaluation value to be obtained by the first terminal device. In a possible application scenario, if the relay capacity evaluation value of the second terminal device is larger, it means that the relay capacity of the second terminal device is stronger; if the relay capacity evaluation value of the second terminal device is smaller, it means that the relay capacity of the second terminal device is weaker; in other words, when the relay capacity evaluation value of the second terminal device is greater than the preset relay capacity threshold, it can be indicated that the preset relay capacity threshold condition is met. For example, the longer the time taken by the first terminal device to obtain the audio data to be played by using the second terminal device as a relay, the greater the impact on the short-board effect of multi-device audio synchronous playback, indicating that the relay capacity of the second terminal device is weaker. Or for another example, the worse the stability of the first terminal device to obtain the audio data to be played by using the second terminal device as a relay (such as a larger fluctuation range or frequency of the transmission rate, lower smoothness, etc.), the greater the impact on the short-board effect of multi-device audio synchronous playback, indicating that the relay capacity of the second terminal device is weaker. In this way, after the first terminal device obtains the relay capacity evaluation values of one or more second terminal devices, it can select a suitable destination second terminal device from the N second terminal devices to obtain the audio data to be played.

[0125] In an optional example, the embodiment of the present application provides an implementation manner for determining the relay capacity evaluation value of the second terminal device. Taking any second terminal device as an example, the implementation manners of other second terminal devices are similar. It can be implemented that the second terminal device determines the relay capacity evaluation value by using the first evaluation parameter group. Exemplarily, the first evaluation parameter group may include but is not limited to the following parameters: the network signal strength of the second terminal device, the network transmission state of the first terminal device, the type of the second terminal device, the usage state of the second terminal device, and the charging frequency of the second terminal device. It should be noted that "first" and "second" are only used for distinguishing descriptions. It can be understood that when determining the relay capacity evaluation value of the first terminal device, the evaluation parameter group corresponding to the first terminal device is used.

[0126] (1) The network signal strength, for example, can be represented by the received signal strength indication (RSSI), which can be used to indicate the actual available transmission bandwidth of the terminal device, thereby affecting the network transmission rate of the terminal device. It is usually determined by factors such as the interference of the channel where the signal works, the transmission distance, the placement position of the router, the antenna gain, the transmission power of the router, and the room layout. If the RSSI value is larger, it indicates that the signal strength is stronger, and the data loading fluency of the user when using the second terminal device is better; conversely, if the RSSI value is smaller, it indicates that the signal strength is weaker, and the data loading fluency of the user when using the second terminal device is poorer, and there may even be problems such as lag and loading failure. It can be understood that the stronger the network signal strength of the second terminal device, the stronger the relay ability, and vice versa, the weaker the relay ability.

[0127] (2) The network transmission state can be characterized by parameters such as transmission bandwidth, transmission delay, and delay jitter. Among them, if the terminal device has a higher data throughput, and / or a larger transmission bandwidth, and / or a lower transmission delay and / or a smaller delay jitter, it indicates that the terminal device has a better network transmission state. The quality of the network transmission state is usually determined by the router to which the terminal device is connected. For example, the more terminal devices connected to the router, the smaller the transmission bandwidth allocated to each terminal device. It can be understood that the better the network transmission state of the second terminal device, the stronger the relay ability, and vice versa, the weaker the relay ability.

[0128] (3) The type of the terminal device can be determined by factors such as the models and specifications of hardware modules such as the processor and network card of the terminal device, and can be used to evaluate the performance of the terminal device, such as processing performance or power consumption performance. During implementation, different sub-evaluation values can be determined for different types of terminal devices. The determination method can be predefined, or obtained according to empirical values, or determined by comprehensively considering multiple hardware modules included in the terminal device, etc. This application does not limit the specific implementation method for determining the sub-evaluation value for the second terminal device according to the type of the terminal device. It can be understood that the better the performance of the type of the second terminal device, the stronger the relay ability, and vice versa, the weaker the relay ability.

[0129] (4) The usage state of the terminal device can be determined by the load condition of the terminal device, such as CPU load and network card load. Since the processing performance of the terminal device is certain, the new processing tasks running on the second terminal device will be affected by the current load condition of the second terminal device. If the load of the second terminal device is higher, the processing ability for new processing tasks is poorer. It can be understood that the less the current load of the second terminal device, the stronger the relay ability, and vice versa, the weaker the relay ability.

[0130] (5) The power-on frequency of the terminal device can represent the probability that the terminal device is in the on state, which can be obtained by statistically predicting whether the terminal device is powered on during a historical period of time. Exemplarily, taking the speaker device B in Figure 4 located in Room 2 as an example, assuming that Room 2 is the living room, by statistically analyzing whether the speaker device B is powered on (turned on) during a historical period of time, it is determined that the probability of the speaker device B being turned off gradually increases after 10 pm. It can be understood that if the second terminal device is in an unpowered state, it cannot relay the audio data to be played for the first terminal device. At this time, the relay ability evaluation value of the second terminal device can be set relatively low to avoid the problem that the first terminal device fails to obtain the audio data to be played after the second terminal device is powered off (shut down). Figure 4 Taking the speaker device B in Figure 4 located in Room 2 as an example, assuming that Room 2 is the living room, by statistically analyzing whether the speaker device B is powered on (turned on) during a historical period of time, it is determined that the probability of the speaker device B being turned off gradually increases after 10 pm. It can be understood that if the second terminal device is in an unpowered state, it cannot relay the audio data to be played for the first terminal device. At this time, the relay ability evaluation value of the second terminal device can be set relatively low to avoid the problem that the first terminal device fails to obtain the audio data to be played after the second terminal device is powered off (shut down).

[0131] Optionally, when the second terminal device uses the first evaluation parameter group to determine the relay ability evaluation value, it can meet the requirements of the following formula 1:

[0132]

[0133] where Transability k represents the relay ability evaluation value of the kth (k is a positive integer less than or equal to N) second terminal device; θ i represents the relay ability weight factor assigned to the ith (i is a positive integer within the range of 1 to n) evaluation parameter; α i represents the sub-evaluation value of the ith evaluation parameter in the first evaluation parameter group; n represents the number of evaluation parameters included in the first evaluation parameter group. For example, if the first evaluation parameter group includes the network signal strength, network transmission status, type of the terminal device, usage status of the terminal device, and power-on frequency of the terminal device introduced above, then the value of n is 5. It should be noted that the relay ability weight factor assigned to each evaluation parameter can be obtained based on historical experience or can also be user-defined; and it can be adjusted in a timely manner.

[0134] In a possible implementation manner, the second terminal device can use the service availability registration and discovery method to publish the relay service, or can also publish the relay ability evaluation value through broadcast or multicast messages, so that the first terminal device can obtain the relay ability evaluation value of the second terminal device and use the second terminal device to relay the audio data to be played. For example, Figure 4 the speaker devices A, B, and C included in Figure 4 broadcast Transability k in the local area network established based on the wireless router, so that the speaker device D, which is the end terminal device, can receive Transability A and TransabilityB and Transability C , and thus the speaker device B can have transmission paths 1, 2, 3, and 4 as shown in Figure 4 .

[0135] Through the above examples, in the application scenario of multi-device audio synchronous playback, the embodiments of the present application evaluate the transit capabilities of the terminal devices included in this application scenario, and determine whether the terminal device can be used as a transit node for other terminal devices to obtain the audio data to be played through the transit capabilities, so as to provide multiple optional transmission paths for other terminal devices and achieve path optimization. Compared with the prior art in which each terminal device obtains the audio data to be played from the router, the embodiments of the present application can improve the acquisition efficiency, stability, and reliability of multiple terminal devices for the same audio data to be played, thereby improving the user experience of multi-device synchronous playback.

[0136] In addition, when the present application is implemented, the first terminal device can also determine its own transit capability evaluation value to evaluate whether it has the ability to forward the audio data to be played for other terminal devices. Optionally, if the first terminal device determines that its own transit capability evaluation value is greater than the transit capability threshold (the transit capability threshold can represent the threshold for the first terminal device to have the ability to forward the audio data to be played for other terminal devices), the first terminal device can publish a transit service. It can also be understood that the first terminal device can be searched, discovered, and connected by other terminal devices for data transmission. In other words, in S501, the first terminal device can obtain the transit capability evaluation value of the second terminal device, indicating that the second terminal device has the transit capability, that is, the second terminal device has published a transit service.

[0137] It should be noted that in the local area network where the first terminal device and N second terminal devices are located, there may also be other third terminal devices that do not have transit capabilities or whose transit capabilities do not meet the requirements of the preset transit capability threshold but have playback capabilities. The third terminal device is used to synchronously play the audio data to be played with the first terminal device and the N second terminal devices after obtaining the audio data to be played. For example, Figure 6 shows a schematic diagram of an application scenario of another multi-device synchronous playback method provided in the embodiments of the present application. In the Figure 6 shown local area network, the speaker device D is used as the first terminal device; the speaker devices A and C have published transit services and can be used as second terminal devices (the wireless router acts as an AP and can transmit the audio data to be played to the speaker device D, so it can be understood that it can itself be used as a second terminal device); the speaker device B has not published a transit service but has playback capabilities and can be used as a third terminal device.

[0138] In a possible implementation, the above-mentioned first terminal device, second terminal device, or third terminal device may or may not publish a relay service at different times and different locations. For example, the first terminal device can periodically publish the relay capability evaluation value from time T1 through service availability registration and discovery or by means of broadcast or multicast messages. At time T2, it is detected that the relay capability evaluation value no longer meets the requirement of being greater than the relay capability threshold, and at this time, the relay capability evaluation value is no longer published through service availability registration and discovery or by means of broadcast or multicast.

[0139] S502. The first terminal device obtains the relay availability of the N second terminal devices for the first terminal device according to the N relay capability evaluation values.

[0140] The first terminal device obtains the relay capability evaluation values of one or more second terminal devices from S501, and can obtain the strength of the relay capability of each second terminal device itself. Due to the influence of factors such as the relative distance, placement position, and whether they are in the same room between the first terminal device and any second terminal device, the efficiency of the first terminal device to obtain the audio data to be played also depends on the relative signal strength between the first terminal device and the second terminal device; among them, the relative signal strength of the second terminal device can be expressed as the signal strength of the second terminal device detected by the first terminal device. Exemplarily, if the relative signal strength of the second terminal device is greater, it means that the relative signal attenuation between the first terminal device and the second terminal device is smaller; conversely, the relative signal attenuation is greater. In other words, the relay availability of the second terminal device for the first terminal device can be jointly determined by the relay capability evaluation value of the second terminal device and the relative signal strength between the second terminal device and the first terminal device.

[0141] Based on this, in an optional example, the first terminal device can respectively assign different relay availability weight factors to each second terminal device according to the relative signal strength with each second terminal device; among them, the first terminal device can assign a larger relay availability weight factor to the second terminal device with a larger relative signal strength. In another optional example, the first terminal device can also pre-store the relay availability weight factors assigned to each second terminal device.

[0142] Then the first terminal device determines the relay availability of each second terminal device based on the relay availability weight factor and the relay capability evaluation value of each second terminal device. Optionally, the first terminal device determines that the relay availability of the k-th second terminal device for the first terminal device can meet the requirements of the following formula 2:

[0143] Score X←k =γ X←k *Transability kFormula 2

[0144] Where Score X←k represents the transit availability of the k-th (k is a positive integer) second terminal device relative to the first terminal device (X can represent the identifier of the first terminal device); γ X←k represents the transit availability weight factor assigned by the first terminal device to the k-th second terminal device.

[0145] For example, in combination with Figure 4 the application scenario diagram shown, taking the speaker device D as the first terminal device, and the speaker devices A, B, C, and the wireless router as the second terminal devices as an example. The speaker device D can obtain the transit ability evaluation values of the speaker devices A, B, C, and the wireless router, and determine the transit availability weight factor of each second terminal device relative to the speaker device D according to the relative signal strength between the speaker device D and each second terminal device. Finally, according to the transit availability weight factor and the transit ability evaluation value of each second terminal device, the transit availability of each second terminal device relative to the first terminal device is obtained. For the sake of easy understanding, the following is illustrated by Table 1:

[0146] Table 1

[0147]

[0148] In Table 1 above, the transit availability of each second terminal device obtained by the speaker device D is jointly determined by the transit ability evaluation value and the transit availability weight factor. For example, the transit ability evaluation value of the wireless router is usually stronger than that of the speaker device A or B or C; however, due to the relatively large signal strength between the wireless router and the speaker device D (such as due to factors such as relatively long distance and passing through two walls in the middle), the γ D←AP assigned by the speaker device D to the wireless router is smaller; while the relative signal strength between the speaker device C and the speaker device D is smaller, and the γ D←C assigned by the speaker device D to the speaker device C is larger. Therefore, there may be a situation where the value of Score D←C is larger than the value of Score D←AP . In this way, although the transit ability evaluation value of the wireless router is strong, the time taken for the speaker device D to obtain the audio data to be played through transmission path 1 may be longer than that using transmission path 4. Therefore, the speaker device D can select a better transmission path according to the transit availability of each second terminal device.

[0149] S503, the first terminal device selects a target transmission path from the N transmission paths based on the relay availability of the N second terminal devices for the first terminal device. Among them, the N transmission paths correspond to the N second terminal devices one by one. For example Figure 4 the transmission path 1 (wireless router → speaker device D), transmission path 2 (wireless router → speaker device B → speaker device D), or transmission path 3 (wireless router → speaker device A → speaker device D), or transmission path 4 (wireless router → speaker device C → speaker device D) corresponding to the speaker device D.

[0150] Exemplarily, as introduced in S502, after the first terminal device obtains the relay availability of each second terminal device, it can select the transmission path corresponding to the second terminal device with the strongest relay availability as the target transmission path. For example, for Figure 4 the speaker device D shown in D←C >Score D←B >Score D←A >Score ←AP the speaker device D can select the transmission path 4 corresponding to the speaker device C as the target transmission path.

[0151] Alternatively, it can also randomly select a transmission path from the N transmission paths corresponding to the N second terminal devices whose relay availability meets the preset relay capacity threshold condition as the target transmission path. Among them, the preset relay capacity threshold condition can be that the relay availability is greater than or equal to the preset relay threshold.

[0152] Or to ensure the stability in the multi-device audio synchronous playback scenario, if the first terminal device already has a transmission path, when it is determined that the current transmission path meets the preset relay capacity threshold condition according to the relay availability, even if there is a better transmission path, there is no need to switch. In other words, when the current transmission path cannot meet the preset relay capacity threshold condition, it can be selected from other transmission paths that meet the preset relay capacity threshold condition. For example, if Figure 4 the current transmission path of the speaker device D shown in is the transmission path 1 corresponding to the wireless router, and the transmission path 1 meets the preset relay capacity threshold condition. At this time, even if the relay availability of the speaker device A or B or C for the speaker device D is greater than the availability of the wireless router for the speaker device D, there is no need to switch the target transmission path.

[0153] Alternatively, when the first terminal device determines that the relay availability of at least one second terminal device for the first terminal device meets the relay capability threshold condition, but the relay availability of the at least one second terminal device for the first terminal device does not meet the preset switching condition compared with the relay availability of the second terminal device corresponding to the current transmission path for the first terminal device, the first terminal device may maintain the current transmission path. For example, Figure 4 The current transmission path of the speaker device D shown in Figure 4 is transmission path 1. If transmission path 2 meets the relay capability threshold condition but has a small gain compared to transmission path 1, then there is no need to switch the transmission path, thus ensuring the stability of the multi-device audio synchronous playback scenario.

[0154] It should be noted that after the first terminal device selects the destination transmission path, if the destination transmission path has a corresponding physical transmission channel, the corresponding physical transmission channel is used to implement data transmission. For example, usually if the second terminal device is a wireless router, there is a physical transmission channel between the second terminal device and the first terminal device, such as a physical transmission channel based on a wireless local area network, etc.; if the destination transmission path does not have a corresponding physical transmission channel, the first terminal device may initiate a request to establish a physical transmission channel to the destination second terminal device corresponding to the destination transmission path. In this way, after there is a physical transmission channel between the first terminal device and the destination second terminal device, based on the destination second terminal device, the audio data to be played can be obtained, and the first terminal device can receive the audio data to be played transmitted by the destination second terminal device from the physical transmission channel.

[0155] In a possible implementation manner, in a multi-device synchronous playback application scenario, as at least one terminal device changes different positions, there may be a situation where the first terminal device triggers a switch to different destination transmission paths (for example, the first terminal device changes its position, or the second terminal device corresponding to the current transmission path of the first terminal device changes its position). At this time, the source address included in the data packet containing the audio data to be played received by the first terminal device may be different. For example, when the destination transmission path of the first terminal device is transmission path 1, the source address included in the data packet containing the audio data to be played is the MAC address of the wireless router; when the destination transmission path of the first terminal device is transmission path 2, the source address included in the data packet containing the audio data to be played is the MAC address of the speaker device B.

[0156] In addition, to ensure the actual availability of the destination transmission path, before establishing an actual physical transmission channel, the transmission rate, stability, reliability, etc. of the destination transmission path can be simulated by pre-connecting a corresponding test transmission channel. If the test results meet the requirements, the actual physical transmission channel can be established. In this way, the efficiency and reliability of data transmission can be ensured, and the playback efficiency of the multi-device synchronous playback application scenario can be guaranteed.

[0157] S504, the first terminal device obtains the audio data to be played from the second terminal device corresponding to the destination transmission path.

[0158] In implementation, after determining the destination transmission path, the first terminal device can send a request message to the destination second terminal device corresponding to the destination transmission path. The request message is used to request the destination second terminal device to transmit the audio data to be played to the first terminal device after obtaining the audio data to be played. It can be understood that the destination second terminal device itself can also cache the audio data to be played for jointly realizing multi-device audio synchronous playback with the first terminal device.

[0159] As described above Figure 5 In the implementation process introduced above, for one or more terminal devices participating in the multi-device audio synchronous playback application scenario, based on the design concept that the terminal device can also be used as a relay node, by analyzing the relative signal strength between each terminal device and multiple other terminal devices in this application scenario, the terminal device can have multiple transmission path selection capabilities; and each terminal device can select an appropriate transmission path to obtain the audio data to be played by analyzing the relay availability. In this way, compared with the method in the prior art where each terminal device in the multi-device audio synchronous playback application scenario needs to obtain the audio data to be played from a wireless router, the efficiency, smoothness, stability, and user experience of multi-device audio synchronous playback can be improved.

[0160] In another optional embodiment, the multi-device synchronous playback method provided by the embodiments of the present application can also perform dynamic analysis on the destination transmission path determined for each terminal device in the multi-device audio synchronous playback application scenario. By periodically analyzing the multiple terminal devices included in this application scenario, the destination transmission path of the terminal device can be dynamically adjusted in a timely and accurate manner, so as to ensure the stability of the multi-device audio synchronous playback application scenario, improve the playback smoothness, and enhance the user experience.

[0161] Based on the implementation manner of selecting the destination transmission path for each terminal device in the multi-device audio synchronous playback application scenario based on the relay capability of the terminal device described above, when implementing this application, the playback capabilities of each terminal device can also be evaluated. By evaluating the relay capabilities and playback capabilities of each terminal device, optimization and stability guarantee of the destination transmission path of the terminal device in this application scenario can be achieved.

[0162] In an alternative implementation manner, Figure 7 shown is another flowchart of a multi-device synchronous playback method. In this implementation manner, taking the first terminal device as an example, the first terminal device is role-divided based on the relay capability of the first terminal device, the playback capability, and the relay availability of the first terminal device by N second terminal devices. In this way, by judging the role of the first terminal device, different processing can be performed on the first terminal device in combination with the characteristics of different roles, so as to ensure that each terminal device included in the multi-device audio synchronous playback application scenario can have a better acquisition efficiency for the audio data to be played, thereby ensuring the stability and smoothness of audio playback in this application scenario, etc.

[0163] Among them, the evaluation methods for the relay capability of the first terminal device and the relay availability of the first terminal device by N second terminal devices can be combined with the Figures 4 to 6 embodiment content introduced above and will not be elaborated here. Based on a similar evaluation idea, the playback capability of the first terminal device can be realized through a playback capability evaluation value. Among them, the playback capability evaluation value can be used to represent the playback capability of the first terminal device. It can be understood that if the playback capability evaluation value of the first terminal device is larger, it can indicate that the playback capability of the first terminal device is stronger; in other words, the first terminal device takes less time, has better stability, and higher reliability, etc. to obtain the audio data to be played, and has less impact on the short-board effect of multi-device audio synchronous playback.

[0164] Optionally, an implementation manner for determining the playback capability evaluation value of the first terminal device provided in the embodiments of this application can be implemented as that the first terminal device uses a second evaluation parameter group to determine the playback capability evaluation value of each second terminal device. Exemplarily, the second evaluation parameter group may include, but is not limited to, the following parameters: network signal strength, network transmission status, and type of terminal device. Among them, the definitions of the evaluation parameters included in the second evaluation parameter group can refer to the content described above in combination with Figure 5 and will not be redundantly introduced in this application.

[0165] Among them, the first terminal device using the second evaluation parameter group to determine the playback capability evaluation value may meet the requirements of the following formula 3:

[0166]

[0167] Among them, Playbackability X represents the playback ability evaluation value of the first terminal device (X can represent the identifier of the first terminal device); represents the playback ability weight factor assigned to the j-th (j is a positive integer within the range of 1 to m) evaluation parameter; β i represents the sub-evaluation value of the j-th evaluation parameter in the second evaluation parameter group; m represents the number of evaluation parameters included in the second evaluation parameter group. For example, if the second evaluation parameter group includes the network signal strength, network transmission status, and type of terminal device introduced in the above content, then the value of m is 3. It should be noted that the playback ability weight factor assigned to each evaluation parameter can be obtained based on historical experience or can also be user-defined; and it can be adjusted in a timely manner.

[0168] Based on the above descriptions of the relaying ability, playback ability, and the relaying availability of N second terminal devices to the first terminal device, Figure 7 the shown process may include:

[0169] S701a. The first terminal device updates the relaying ability evaluation value.

[0170] Exemplarily, the first terminal device can periodically update the relaying ability evaluation value according to the first evaluation parameter group. Among them, the update period can also be dynamically adjusted according to the scenario of multi-device audio synchronous playback. For example, during the high-frequency usage period of the first terminal device, the update period can be set to a shorter time interval; while during the low-frequency usage period of the first terminal device, the update period can be set to a longer time interval; for example, the update period during the evening time period can be set to a few minutes, and the update period during the early morning period can be set to a few hours. In this way, by dynamically updating the relaying ability evaluation value of the first terminal device, the accuracy of the relaying ability of the first terminal device as a relaying node can be improved, and further, the playback ability of other terminal devices that select the first terminal device as the data source for obtaining the audio data to be played can be ensured. Therefore, the smoothness and stability of audio playback in the multi-device audio synchronous playback scenario can be improved to enhance the user experience.

[0171] S702a. If the relay capacity evaluation value of the first terminal device is greater than the relay capacity threshold, proceed to S703a; otherwise, proceed to S707. The first terminal device can be pre-set with a relay capacity threshold, and this relay capacity threshold can be used as an evaluation basis for determining whether the first terminal device can publish a relay service. Optionally, the relay capacity threshold can be determined based on historical experience values. For example, through the statistics of historical data in the multi-device audio synchronous playback scenario or the analysis of experimental data, it can be obtained that when the relay capacity evaluation value is greater than this relay capacity threshold, a better user experience can be obtained in this application scenario, etc.

[0172] S703a. The first terminal device publishes a relay service and determines itself as the relay role. After the first terminal device publishes the relay service, it can be searched by other terminal devices, thus serving as a transmission path for other terminal devices to obtain the audio data to be played, providing multiple possible transmission path options for the data sources of multiple terminal devices to obtain the audio data to be played in the multi-device audio synchronous playback scenario.

[0173] In a possible implementation manner, the first terminal device can publish the relay service by using the service availability registration and discovery method, or by means of broadcast or multicast messages. The relay service can be, for example, the relay capacity evaluation value.

[0174] It should be noted that the execution order between the following S701b to S706b and the above S701a to S703a is not limited. Optionally, S701b to S706b and the above S701a to S703a can be executed in parallel.

[0175] S701b. The first terminal device updates the playback capacity evaluation value. Similar to the update method of the relay capacity evaluation value, the first terminal device can also periodically update the playback capacity evaluation value, so as to accurately and timely evaluate the playback capacity of the first terminal device, and further ensure the synchronous playback efficiency of the multi-device audio synchronous playback scenario.

[0176] S702b. If the playback capacity evaluation value of the first terminal device is greater than the playback capacity threshold, proceed to S707; otherwise, proceed to S703b. The playback capacity threshold is similar to the relay capacity threshold and can also be pre-set, which will not be elaborated here. It should be noted that in this embodiment, it is taken as an example that the greater the playback capacity evaluation value of the first terminal device, the stronger the playback capacity of the first terminal device; the smaller the playback capacity evaluation value of the first terminal device, the weaker the playback capacity of the first terminal device. In actual implementation, there may also be another possible correlation, such as a negative correlation. At this time, S702b can be changed accordingly.

[0177] S703b. The first terminal device searches for N second terminal devices that publish the relay service. When the first terminal device determines that the current playback capability cannot meet the preset playback capability threshold, it indicates that the transmission state of the transmission path for obtaining the to-be-played audio data currently is poor. At this time, the first terminal device can start the processing flow for switching the destination transmission path. It can be implemented that the first terminal device first determines N second terminal devices that can provide a transmission path for the first terminal device.

[0178] It should be noted that Figure 7 The shown process can also be applicable to the scenario where the first terminal device is initially started. At this time, the first terminal device may not have the current transmission path. Through the processing flow from S703b to S706b, the first selected transmission path can also be determined. In addition, after the first terminal device selects the transmission path for the first time, it can save the first selected transmission path as the default transmission path. After the subsequent start of the first terminal device, the default transmission path is used to obtain the to-be-played transmission data, so as to improve the processing efficiency in the multi-device audio synchronous playback scenario for the first terminal device.

[0179] S704. The first terminal device performs relay availability analysis on each of the second terminal devices. The implementation process of the first terminal device performing relay availability analysis can refer to the implementation process introduced in Figure 5 which is not redundantly introduced in this application.

[0180] S705. If the first terminal device determines that there are N second terminal devices among the second terminal devices whose relay availability is greater than the relay availability threshold, continue to execute S706b; otherwise, continue to execute S707. Among them, the relay availability threshold is similar to the relay capability threshold and can also be preset, which will not be elaborated here. Optionally, being greater than the relay availability threshold is used to indicate that obtaining the to-be-played audio data through the transmission path corresponding to the second terminal device can meet the basic requirements for multi-device audio synchronous playback; for example, the time taken to obtain the to-be-played audio data through this transmission path is lower than the set maximum time threshold requirement.

[0181] S706. The first terminal device performs destination transmission path switching and determines the end playback role.

[0182] Exemplarily, through the analysis of multiple relay availabilities, if there is a destination transmission path that can meet the basic requirements for multi-device audio synchronous playback, based on the judgment result in S702b that the current playback capability of the first terminal device is poor, the first terminal device switches the destination transmission path for obtaining the to-be-played audio data, which can improve the data acquisition efficiency of the first terminal device, reduce the data acquisition time, and thus can reduce the impact of the short-board effect of the first terminal device on the multi-device audio synchronous playback scenario.

[0183] In addition, through the processing of S701b - S706b, it can be determined that the ability of the first terminal device to obtain the audio data to be played is poor. The first terminal device can be determined as the end - playing role, that is, the end - terminal device introduced in the foregoing embodiments. It can be understood that in the multi - device audio synchronous playback scenario, the fluency of multi - device audio synchronous playback depends more on the influence of the terminal device in the end - playing role. Therefore, in order to improve the user experience of multi - device audio synchronous playback, the efficiency of the end - playing role in obtaining the audio data to be played can be increased, and the acquisition time can be reduced.

[0184] In a possible implementation manner, before and after the first terminal device switches the destination transmission path, the source address included in the data packet containing the audio data to be played is different.

[0185] S707. The first terminal device is determined as the normal - playing role. Among them, the terminal device in the normal - playing role can basically meet the requirements of multi - device audio synchronous playback and participate in the implementation of the multi - device audio synchronous playback scenario. Compared with the terminal device in the end - playing role, it can have a smaller negative impact on multi - device audio synchronous playback. It should be noted that the first terminal device can also be determined as the relay role and the normal - playing role at the same time.

[0186] Based on the introduction of the above - mentioned embodiments, when the present application is implemented, by dividing different roles for the terminal devices included in the multi - device audio synchronous playback scenario, different terminal devices can be processed more accurately. For example, for the terminal device in the end - playing role, considering that this terminal device will have a greater impact on the playback experience, the efficiency of the end - playing role in obtaining the audio data to be played can be increased, thereby reducing the impact on the playback experience. In addition, when the present application is implemented, personalized reminders can also be customized for the user according to the terminal device in the end - playing role. For example, when it is recognized that the terminal device is in the end - playing role, a prompt that this terminal device may affect the synchronous playback experience can be sent to the user, as well as an operation instruction asking the user whether to remove this terminal device from the current multi - device audio synchronous playback scenario. Among them, the prompt can be embodied in the form of a text message, a phone call, a pop - up window, etc., and the present application does not make a limitation on this.

[0187] For ease of understanding, Figure 8FIG. 0 is a schematic diagram of an application scenario of another multi-device synchronous playback method shown in an embodiment of the present application. It can be understood that in this application scenario, the terminal devices included may respectively have corresponding relay ability evaluation values and playback ability evaluation values. Among them, since a wireless router usually does not participate in audio playback, it is not necessary to determine the playback ability evaluation value. Taking the speaker device D as the first terminal device as an example, the speaker device D can also determine the relay availability of multiple second terminal devices for the speaker device D based on the relay ability evaluation values of the multiple second terminal devices, and obtain a relay availability list as shown in Figure 8 to perform the switching of the destination transmission path.

[0188] After the speaker device D is started, the default transmission path can usually be the transmission path 1 shown in Figure 8 , that is, the audio data to be played can be obtained from the wireless router.

[0189] During the operation of the speaker device D, the relay ability evaluation value and the playback ability evaluation value can be periodically updated based on the content introduced in Figure 7 to evaluate the role of the speaker device D at different times. For example, the speaker device D can be a normal playback role at time T1. After obtaining the audio data to be played through the transmission path 1, it can achieve multi-device synchronous playback with other speaker devices. Based on the normal playback role at time T2, the speaker device D can also be a relay role. At this time, the speaker device D can publish a relay service and provide an optional transmission path for other terminal devices (such as end-playback devices).

[0190] For another example, if the playback ability evaluation value updated at time T3 of the speaker device D is determined to be no longer greater than the playback ability threshold, the speaker device D then determines whether to switch the target transmission path based on S703b to S705b shown. If the speaker device D determines that the destination transmission path needs to be switched, it can determine the destination transmission path according to the relay availability of multiple second terminal devices for the speaker device D. For example, if the relay availability value shown in Figure 8 meets the preset relay ability threshold condition, the speaker device D can switch from obtaining the audio data to be played through the transmission path 1 to obtaining it through the transmission path 4. D←C It can be understood that during the operation of the speaker device D, the dynamic analysis of the destination transmission path can be realized based on the implementation shown in

[0191] to enable the timely and accurate switching of the destination transmission path, so as to ensure the efficiency, stability, and reliability of the terminal device to obtain the audio data to be played. Figure 7 In another alternative embodiment,

[0192] Figure 9 ​Another flowchart of a multi-device synchronous playback method provided by an embodiment of the present application. In this embodiment, still taking the first terminal device as an example, during the process of multi-device synchronous playback on the first terminal device, long-term status monitoring and data learning and analysis can also be performed on the processing data of the first terminal device during multi-device synchronous playback. Based on the long-term status monitoring results and data learning and analysis results of the first terminal device, the stability and transit capacity of the current transmission path of the first terminal device can be predicted and analyzed, so that a suitable transmission path can be selected or switched for the first terminal device in a timely and accurate manner, thereby ensuring the stability, fluency, and user experience of audio playback in the multi-device audio synchronous playback scenario. The specific processing flow of this embodiment includes:

[0193] S901a. The first terminal device statistically analyzes the current transmission path status. Exemplarily, the first terminal device collects first processing data generated by the multi-device synchronous playback process using the current transmission path; where the first processing data is used to represent the stability of the current transmission path status, and the first processing data may include, for example, the load status, network status, historical power-on time, historical power-off time, or historical startup time of the data source terminal device of the audio data to be played (such as Figure 8 when the speaker device D obtains the audio data to be played through the transmission path 4, the data source terminal device is the speaker device C).

[0194] In specific implementation, the first terminal device can collect the first processing data within a specified time period. For example, the first terminal device collects the first processing data for the past week, or further, the first terminal device collects the first processing data from 8 am to 11 pm for the past week. In this way, the first terminal device can perform long-term status monitoring and prediction through the collection of historical first processing data, which can improve the accuracy and timeliness of the prediction, and at the same time, it can also avoid excessive occupation of the processing performance of the first terminal device due to high load.

[0195] S902a. The first terminal device predicts the stability of the current transmission path. Optionally, the first terminal device can predict the stability of the current transmission path based on a time series learning algorithm, that is, the first terminal device predicts whether the current transmission path can still be used normally or stably in a future period of time. During implementation, the first terminal device can perform the prediction through a stability evaluation value. The stability evaluation value can be determined by one or a combination of the following information: power-off confidence, load status (such as CPU usage rate, etc.), network status (such as transmission rate, transmission bandwidth, etc.).

[0196] Among them, the power-down confidence level can be used to indicate whether the terminal device is about to power down. If the power-down confidence level increases, it means that the probability that the current transmission path cannot be used normally increases. Combining Figure 8 With reference to the application scenario diagram shown, if the current transmission path of the speaker device D is transmission path 4, that is, the transmission path corresponding to the speaker device C, according to the statistical result of the current transmission path state in S901a, the power-down confidence level of the speaker device C can be predicted based on the historical first processing data. In this way, the first terminal device can execute the processing in S903 based on the predicted power-down confidence level. The specific processing rules will be introduced in S903 below and will not be elaborated here for the time being.

[0197] S901b. The first terminal device statistically analyzes the relay capacity of the second terminal device corresponding to the current transmission path. Exemplarily, the first terminal device collects the second processing data generated by the multi-device synchronous playback processing using the current transmission path; where the second processing data is used to represent the relay capacity of the second terminal device corresponding to the current transmission path; for example, the relay capacity evaluation value introduced in the foregoing embodiments. Similar to the first processing data, the collection of the second processing data can also collect the data generated within a specified time, and then the collected historical second processing data can be used as a sample for statistics to achieve the prediction of the relay capacity of the current transmission path.

[0198] S902b. The first terminal device predicts the relay capacity of the current transmission path. Optionally, the first terminal device can predict the relay capacity of the current transmission path based on a time series learning algorithm, that is, the first terminal device predicts the quality of the relay capacity of the terminal device corresponding to the current transmission path in a future period of time. For example, combining Figure 8 With reference to the application scenario diagram shown, if the current transmission path of the speaker device D is transmission path 4, according to the statistical result of the relay capacity of the current transmission path obtained through S901b, the estimated relay capacity evaluation value of the speaker device C in a future period of time can be predicted based on the historical second processing data. In this way, the first terminal device can execute the processing in S903 based on the predicted estimated relay capacity evaluation value. The specific processing rules will be introduced in S903 below and will not be elaborated here for the time being.

[0199] S903. The first terminal device determines whether to pre-connect the standby transmission path. If so, it continues to execute S904a; otherwise, it continues to execute S904b. Based on S901a - S902a, S901b - S902b, the first terminal device can respectively obtain the stability evaluation value and the relay capacity evaluation value of the current transmission path in a future period of time (or at a future moment).

[0200] One possible example is that when the stability evaluation value of the current transmission path is greater than the stability threshold after the first terminal device determines the first duration (or at the future first moment), it is determined to perform pre-connection of the backup transmission path. Among them, in this example, the larger the stability evaluation value, the greater the fluctuation of the current transmission path, that is, the more unstable it is; if the smaller stability evaluation value is used to indicate that the current transmission path is more unstable, then greater than the stability threshold can be changed to less than the stability threshold.

[0201] Another possible example is that when the transit capacity evaluation value of the current transmission path is less than or equal to the transit capacity threshold after the first terminal device determines the second duration (or at the future second moment), it is determined to perform pre-connection of the backup transmission path.

[0202] Among them, the second duration can be the same as the first duration or different from the first duration. For example, when implementing this application, the second duration can be set to be longer than the first duration. Since the power-off of the terminal device that establishes the current transmission path usually means that the terminal device cannot transmit the audio data to be played for the first terminal device before the next power-on, if it is predicted that the stability evaluation value is high, it can be determined that pre-connection of the backup transmission path is required. And the poor transit capacity of the terminal device that establishes the current transmission path may be temporary and may recover after a period of time. Therefore, in order to improve the stability of the transmission path, after delaying a period of time compared with the first duration, if it is still predicted that the transit capacity of the terminal device corresponding to the current transmission path is poor, it is determined at this time that pre-connection of the backup transmission path is required.

[0203] S904a. The first terminal device performs pre-connection of at least one backup transmission path. Exemplarily, Figure 10 Fig. shows another application scenario diagram of multi-device synchronous playback provided by the embodiments of the present application. Taking the speaker device D as an example, the current transmission path is transmission path 1 established through the wireless router. By S903, it is determined that pre-connection of the backup transmission path is required, which can also be understood as establishing the physical transmission channel corresponding to the backup transmission path; at this time, the speaker device D can perform pre-connection on transmission path 2, transmission path 3, and transmission path 4 as the backup transmission paths of transmission path 1, that is, the speaker device D can send requests for establishing physical transmission channels to the speaker device A, the speaker device B, and the speaker device C respectively. For example, the speaker device D initiates a Bluetooth connection request to the speaker device B, and after connecting to the Bluetooth, it means that the physical transmission channel is established; the speaker device D initiates a Wi-Fi direct connection request to the speaker device A, and after establishing the Wi-Fi direct connection, it means that the physical transmission channel is established.

[0204] It should be noted that when the present application is implemented, only one or several standby transmission paths with better transit availability may be pre-connected, without connecting all the transmission paths that meet the transit availability, so as to avoid increasing the processing load. Moreover, before the first terminal device switches the destination transmission path from the current transmission path to the standby transmission path, the standby transmission path does not transmit the audio data to be played.

[0205] S904b. The first terminal device maintains the connection of the current transmission path. Exemplarily, if the first terminal device determines that the current transmission path can meet the transmission capability for the audio data to be played in a future period of time, it can continue to maintain the connection of the current transmission path and wait for the next judgment. It should be noted that Figure 9 The illustrated processing flow may also be performed periodically to ensure the stability of the multi-device audio synchronous playback scenario.

[0206] S905. Whether the first terminal device switches from the current transmission path to the standby transmission path. Based on the prediction in the foregoing step content, the first terminal device may pre-connect the standby transmission path for possible abnormalities of the current transmission path in a future period of time. In order to more accurately switch the transmission path in a timely manner based on the stability and transit capability of the current transmission path, the first terminal device may also instantaneously detect the current stability and transit capability of the current transmission path. If it is determined that the transmission path switching condition is met, S906 is continued to be executed; otherwise, it returns to execute S904b.

[0207] For example, if the first terminal device detects that the transmission state of the current transmission path is interrupted (the terminal device that may be used as the data source is powered off), it determines to switch the transmission path. For another example, if the first terminal device detects that the transit capability of the terminal device of the current transmission path becomes worse and is less than or equal to the transit capability threshold, it determines to switch the transmission path.

[0208] S906. The first terminal device selects a destination transmission path from the at least one standby transmission path and makes a switch. As Figure 10 shown in the application scenario diagram, the first terminal device may select one of the transmission path 2, transmission path 3, and transmission path 4 as the standby transmission path as the destination transmission path. For example, the speaker device D switches from obtaining the audio data to be played through the transmission path 1 to obtaining the audio data to be played through the (standby) transmission path 4.

[0209] Through Figure 9In the illustrated embodiment, by predicting the current transmission path, the terminal device can pre - establish an alternative transmission path. Thus, when it is detected that the current state of the transmission path is poor, the transmission path can be quickly switched, thereby improving the smoothness and stability of audio playback in the multi - device audio synchronous playback scenario, reducing the longest time taken for multiple devices to obtain the audio data to be played, and enhancing the user experience.

[0210] Based on the same technical concept, Figure 11 Shown is a terminal device 1100 provided by an embodiment of the present application. The terminal device 1100 includes one or more processors 1101; one or more memories 1102; a communication interface 1103, and one or more computer programs 1104. The above - mentioned components can be connected through one or more communication buses 1105. The communication interface 1103 is used to achieve communication with other devices (such as terminal devices). For example, the communication interface can be a transceiver. Among them, the one or more computer programs 1104 are stored in the above - mentioned memory 1102 and are configured to be executed by the one or more processors 1101. The one or more computer programs 1104 include instructions, and the above - mentioned instructions can be used to execute the following steps, including:

[0211] The first terminal device obtains the transit - ability evaluation values of N second terminal devices, where N is a positive integer; the first terminal device obtains the transit availability of the N second terminal devices for the first terminal device according to the N transit - ability evaluation values; the first terminal device selects a destination transmission path from N transmission paths based on the transit availability of the N second terminal devices for the first terminal device, and the N transmission paths correspond to the N second terminal devices one by one; the first terminal device obtains the audio data to be played from the second terminal device corresponding to the destination transmission path.

[0212] In a possible design, the first terminal device obtaining the transit availability of the N second terminal devices for the first terminal device according to the N transit - ability evaluation values can be implemented as: the first terminal device determines N relative signal strengths corresponding to the N second terminal devices; the first terminal device assigns transit - availability weight factors to the N second terminal devices based on the N relative signal strengths; for the i - th second terminal device, the first terminal device takes the product of the transit - ability evaluation value and the transit - availability weight factor of the i - th second terminal device as the transit availability of the i - th terminal device, where i is any positive integer from 1 to N. Optionally, assuming that the greater the relative signal strength of the second terminal device, the higher the transit availability of the second terminal device for the first terminal device, the first terminal device can assign a higher transit - availability weight factor to the second terminal device with a greater relative signal strength.

[0213] In a possible design, the first terminal device can also relay the audio data to be played for other terminal devices, which can be determined according to the relay capacity evaluation value of the first terminal device. This design can be implemented as follows: the first terminal device uses a first evaluation parameter group to determine the first relay capacity evaluation value of the first terminal device. The first evaluation parameter group includes, but is not limited to, one or more combinations of the following evaluation parameters: the network signal strength of the first terminal device, the network transmission state of the first terminal device, the type of the first terminal device, the usage state of the first terminal device, and the power-on frequency of the first terminal device. If the first relay capacity evaluation value meets the preset relay capacity threshold condition, the first terminal device sends the first relay capacity evaluation value, etc. It can be understood that before the first terminal device obtains the relay capacity evaluation values of N second terminal devices, the second terminal devices can also use the design described above to determine their respective relay capacity evaluation values.

[0214] In the above design, when the first terminal device uses a first evaluation parameter group to determine the first relay capacity evaluation value of the first terminal device, an optional implementation method is as follows: the first terminal device obtains the relay capacity weight factors corresponding to the respective evaluation parameters included in the first evaluation parameter group; the first terminal device uses the relay capacity weight factors corresponding to the respective evaluation parameters to perform weighted summation on the respective evaluation parameters included in the first evaluation parameter group to obtain the first relay capacity evaluation value. Alternatively, the first terminal device can also adopt an implementation method for determining the first relay capacity evaluation value, such as a machine learning method, etc., which is not limited in this application.

[0215] In a possible design, the first terminal device can also periodically update the first relay capacity evaluation value.

[0216] In a possible design, the first terminal device can perform role division and different processing can be performed under different roles. For example, the first terminal device can be divided into a normal playback role or an end playback role according to the playback capacity evaluation value. Among them, the end playback role indicates that the playback capacity of the first terminal device is poor. Based on this, the first terminal device uses a second evaluation parameter group to determine the first playback capacity evaluation value of the first terminal device. The second evaluation parameter group includes one or more combinations of the following evaluation parameters: the network signal strength of the first terminal device, the network transmission state of the first terminal device, and the type of the first terminal device. Optionally, if the first terminal device determines that the first playback capacity evaluation value does not meet the playback capacity threshold condition, the first terminal device can select a destination transmission path from the N transmission paths corresponding to the N second terminal devices to obtain the audio data to be played.

[0217] In a possible design, the first terminal device selects a destination transmission path from N transmission paths based on the relay availability of the N second terminal devices for the first terminal device, which can be implemented as: when the first terminal device determines that the relay availabilities of the N second terminal devices for the first terminal device do not meet the relay capacity threshold condition, the first terminal device uses the current transmission path as the destination transmission path. Or it can also be implemented as: when the first terminal device determines that the relay availability of at least one second terminal device for the first terminal device meets the relay capacity threshold condition, the first terminal device selects a destination transmission path from at least one transmission path corresponding to the at least one second terminal device. Or it can also be implemented as: when the first terminal device determines that the relay availability of at least one second terminal device for the first terminal device meets the relay capacity threshold condition and the relay availability of the at least one second terminal device for the first terminal device does not meet the preset switching condition compared with the relay availability of the second terminal device corresponding to the current transmission path for the first terminal device, the first terminal device uses the current transmission path as the destination transmission path.

[0218] In a possible design, the first terminal device may also update the first playback capacity evaluation value periodically.

[0219] In a possible design, the first terminal device can also ensure the transmission efficiency and stability of the audio data to be played by predicting the current transmission path. It can be implemented as that the first terminal device predicts the stability of the current transmission path based on the first processing data to obtain the stability evaluation value of the current transmission path at the first moment; the first processing data is obtained by the first terminal device by counting the processing data generated by using the current transmission path; and the first terminal device predicts the relay capacity of the current transmission path based on the second processing data to obtain the relay capacity evaluation value of the current transmission path at the second moment; the second processing data is obtained by the first terminal device by counting the relay capacity evaluation values of the second terminal devices corresponding to the current transmission path. If the first terminal device detects a first trigger condition, it pre-connects at least one backup transmission path; where the first trigger condition includes one or a combination of the following conditions: the stability evaluation value at the first moment meets the preset stability threshold condition, and the relay capacity evaluation value at the second moment meets the preset relay capacity threshold condition.

[0220] In a possible design, when the first terminal device selects a destination transmission path from N transmission paths, it includes: the first terminal device selects the destination transmission path from the at least one backup transmission path.

[0221] In a possible design, the first terminal device predicts the stability of the current transmission path based on the first processed data, which can be implemented as the first terminal device predicting the stability of the current transmission path by using a time series learning algorithm based on the first processed data; the first terminal device predicts the transit capacity of the current transmission path based on the second processed data, including: the first terminal device predicting the transit capacity of the current transmission path by using a time series learning algorithm based on the second processed data.

[0222] In a possible design, the stability evaluation value is determined by one or a combination of more than one of the following information, such as: the power-off confidence level of the second terminal device, the load state of the second terminal device, the network state of the second terminal device, etc.

[0223] In a possible design, after the first terminal device obtains the audio data to be played, the first terminal device can receive and respond to a play instruction to play the audio data to be played; the play instruction is used to instruct at least one terminal device to synchronously play the audio data to be played, and the at least one terminal device includes the first terminal device and the N second terminal devices.

[0224] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0225] In each embodiment of the embodiments of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0226] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk, or optical disc.

[0227] As described above, the above is only the specific implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims

1. A multi-device synchronous playback method, characterized in that, The method includes: The first terminal device obtains the transit capacity evaluation values of N second terminal devices, where N is a positive integer; The first terminal device obtains the transit availability of the N second terminal devices for the first terminal device according to the N transit capacity evaluation values; The first terminal device selects a destination transmission path from N transmission paths based on the transit availability of the N second terminal devices for the first terminal device, and the N transmission paths correspond to the N second terminal devices one by one; The first terminal device obtains the audio data to be played from the second terminal device corresponding to the destination transmission path; The first terminal device predicts the stability of the current transmission path based on the first processing data to obtain the stability evaluation value of the current transmission path at the first moment; the first processing data is obtained by the first terminal device counting the processing data generated by using the current transmission path; and, The first terminal device predicts the transit capacity of the current transmission path based on the second processing data to obtain the transit capacity evaluation value of the current transmission path at the second moment; the second processing data is obtained by the first terminal device counting the transit capacity evaluation values of the second terminal device corresponding to the current transmission path; the first moment is different from the second moment; When the first terminal device detects a first trigger condition, it pre-connects at least one standby transmission path; where the first trigger condition includes one or more combinations of the following conditions: the stability evaluation value at the first moment meets the preset stability threshold condition, the transit capacity evaluation value at the second moment meets the preset transit capacity threshold condition.

2. The method according to claim 1, characterized in that, The first terminal device obtains the transit availability of the N second terminal devices for the first terminal device according to the N transit capacity evaluation values, including: The first terminal device determines N relative signal strengths corresponding to the N second terminal devices; The first terminal device assigns transit availability weight factors to the N second terminal devices based on the N relative signal strengths; For the i-th second terminal device, the first terminal device takes the product of the transit capacity evaluation value and the transit availability weight factor of the i-th second terminal device as the transit availability of the i-th terminal device; i is any positive integer from 1 to N.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The first terminal device determines the first transit capacity evaluation value of the first terminal device by using a first evaluation parameter group, and the first evaluation parameter group includes one or more combinations of the following evaluation parameters: the network signal strength of the first terminal device, the network transmission state of the first terminal device, the type of the first terminal device, the usage state of the first terminal device, the power-on frequency of the first terminal device; If the first transit capacity evaluation value meets the preset transit capacity threshold condition, the first terminal device sends the first transit capacity evaluation value.

4. The method according to claim 3, wherein The first terminal device determines the first transit capacity evaluation value of the first terminal device by using a first evaluation parameter group, including: The first terminal device obtains the relay capacity weight factors corresponding to the respective evaluation parameters included in the first evaluation parameter group; The first terminal device obtains the first relay capacity evaluation value by performing weighted summation on the respective evaluation parameters included in the first evaluation parameter group according to the relay capacity weight factors corresponding to the respective evaluation parameters.

5. The method according to claim 3, characterized in that The method further includes: The first terminal device periodically updates the first relay capacity evaluation value.

6. The method according to claim 4, wherein The method further includes: The first terminal device periodically updates the first relay capacity evaluation value.

7. The method according to claim 1 or 2, characterized in that, Before the first terminal device obtains the relay capacity evaluation values of N second terminal devices, the method further includes: The first terminal device determines the first playback capacity evaluation value of the first terminal device by using a second evaluation parameter group, where the second evaluation parameter group includes a combination of one or more of the following evaluation parameters: the network signal strength of the first terminal device, the network transmission state of the first terminal device, and the type of the first terminal device; The first terminal device determines that the first playback capacity evaluation value does not meet the playback capacity threshold condition.

8. The method according to claim 1, wherein The first terminal device selects a destination transmission path from N transmission paths based on the relay availability of the N second terminal devices for the first terminal device, including: The first terminal device determines that the relay availability of the N second terminal devices for the first terminal device does not meet the relay capacity threshold condition, and the first terminal device uses the current transmission path as the destination transmission path; or The first terminal device determines that the relay availability of at least one second terminal device for the first terminal device meets the relay capacity threshold condition, and the first terminal device selects a destination transmission path from at least one transmission path corresponding to the at least one second terminal device; or The first terminal device determines that the relay availability of at least one second terminal device for the first terminal device meets the relay capacity threshold condition and that the relay availability of the at least one second terminal device for the first terminal device does not meet a preset switching condition compared with the relay availability of the second terminal device corresponding to the current transmission path for the first terminal device, and the first terminal device uses the current transmission path as the destination transmission path.

9. The method according to claim 7, characterized in that, The method further includes: The first terminal device periodically updates the first playback capacity evaluation value.

10. The method according to claim 1, characterized in that, The first terminal device selects a destination transmission path from N transmission paths, including: The first terminal device selects the destination transmission path from the at least one standby transmission path.

11. The method according to claim 1, wherein The first terminal device predicts the stability of the current transmission path based on first processed data, including: The first terminal device predicts the stability of the current transmission path by using a time series learning algorithm based on the first processed data; The first terminal device predicts the relay capacity of the current transmission path based on second processed data, including: The first terminal device predicts the relay capacity of the current transmission path by using a time series learning algorithm based on the second processed data.

12. The method according to claim 1, 10 or 11, characterized in that, The stability evaluation value is determined by a combination of one or more of the following information: the power-down confidence level of the second terminal device, the load state of the second terminal device, and the network state of the second terminal device.

13. The method according to claim 1 or 2, characterized in that, The method further includes: The first terminal device receives and responds to a play instruction to play the audio data to be played; the play instruction is used to instruct at least one terminal device to synchronously play the audio data to be played, and the at least one terminal device includes the first terminal device and the N second terminal devices.

14. A terminal device, characterized in that, Comprising: One or more processors; one or more memories; The one or more memories are used to store one or more computer programs and data information; wherein the one or more computer programs include instructions; When the instructions are executed by the one or more processors, the terminal device executes the method according to any one of claims 1 to 13.

15. A communication system, characterized in that, Comprising at least one terminal device according to claim 14.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, and when the computer program runs on a computer, the computer is caused to execute the method according to any one of claims 1 to 13.

17. A computer program product, characterized in that, Comprising a computer program, and when the computer program runs on a computer, the computer is caused to execute the method according to any one of the above claims 1 to 13.

Citation Information

Patent Citations

  • Data transmission method and system in IOT, IOT equipment and terminal

    CN104684042A

  • Device and method for increasing sound distance of intelligent sound box

    CN110290443A

  • Wireless intelligent sound interconnection system with multi-room music playing function

    CN208956068U