Audio playback method, device, electronic device and storage medium

By obtaining audio type and environment information, calculating playback priority and automatically selecting the target playback device, the problem that audio devices in smart terminals cannot automatically adapt to changes in environment and audio data is solved, and user experience and convenience are improved.

CN113296728BActive Publication Date: 2025-01-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110567536.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-24
Publication Date
2025-01-14
Estimated Expiration
2041-05-24

AI Technical Summary

Technical Problem

In the prior art, in smart terminals, audio devices cannot automatically adapt to changes in the environment and audio data, resulting in users needing to manually select target playback devices, affecting convenience.

Method used

By obtaining the audio type of audio data and the environment information of the smart terminal, the playback priority of multiple playback devices is calculated, and the target playback device is determined based on the priority, ensuring that the audio data automatically switches the playback device when the environment and audio type change.

Benefits of technology

It realizes that the smart terminal automatically selects the appropriate target playback device among multiple playback devices, improving user experience and convenience, ensuring that the audio data is always played through the appropriate device, and avoiding the need for manual selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113296728B_ABST
    Figure CN113296728B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an audio playback method, device, electronic device and storage medium, which are applied to smart terminals. The audio playback method includes: obtaining the audio type of the audio data to be played; obtaining the environmental information of the environment in which the smart terminal is located; according to the audio type and environmental information, obtaining the playback priority corresponding to multiple playback devices, the multiple playback devices include the smart terminal and the audio playback device that is communicatively connected to the smart terminal; according to the playback priority, determining the target playback device among the multiple playback devices; playing the audio data through the target playback device. Through the implementation of this embodiment, the target playback device can be selected based on the audio type of the audio data and the environmental information of the smart terminal, and the audio data can be played, so that the target playback device can be adaptively selected based on the environment of the smart terminal and the audio data, so that the effect of playing the audio data meets the user's expectations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of consumer electronic devices, and in particular to an audio playback method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of wireless communication technology, the Internet of Everything has gradually become a trend in the consumer electronics market. For example, common audio devices on the market (such as Bluetooth headsets, Bluetooth speakers, etc.) can be connected to smart terminals. When a user selects a specified audio device, the audio can be played based on the audio device, thereby meeting user needs. At the same time, in order to improve the user experience, smart terminals have also appeared on the market that can automatically connect to the audio device when entering a specific area (such as the Bluetooth connection range of the audio device), so that the audio device can play the audio in the smart terminal. However, in actual applications, when the audio in the smart terminal is content that the user does not want to be played by other audio devices, if these contents are automatically pushed to the audio device for playback, it will bring great inconvenience to the user. Summary of the invention

[0003] Embodiments of the present application provide an audio playback method, device, electronic device, and storage medium.

[0004] In the first aspect, an embodiment of the present application provides an audio playback method, which is applied to a smart terminal, and the audio playback method includes: obtaining the audio type of audio data to be played; obtaining environmental information of the environment in which the smart terminal is located; according to the audio type and the environmental information, obtaining the playback priority corresponding to multiple playback devices, and the multiple playback devices include a smart terminal and an audio playback device that is communicatively connected to the smart terminal; according to the playback priority, determining a target playback device among the multiple playback devices; and playing the audio data through the target playback device.

[0005] In the second aspect, an embodiment of the present application provides an audio playback device, which is applied to a smart terminal. The audio playback device includes an information acquisition module, an environmental information acquisition module, a playback priority acquisition module, a target playback device determination module, and an audio data playback module. The information acquisition module is used to obtain the audio type of the audio data to be played. The environmental information acquisition module is used to obtain environmental information of the environment in which the smart terminal is located. The playback priority acquisition module is used to obtain the playback priorities corresponding to multiple playback devices based on the audio type and environmental information. The multiple playback devices include a smart terminal and an audio playback device that is communicatively connected to the smart terminal. The target playback device determination module is used to determine the target playback device among the multiple playback devices based on the playback priority. The audio data playback module is used to play audio data through the target playback device.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, wherein the above method is executed when the program code is run.

[0008] The embodiments of the present application provide an audio playback method, device, electronic device and storage medium. Through the implementation of the embodiments, when the smart terminal has the function of selecting a target playback device from multiple playback devices to play audio data, the audio type of the audio data and the environmental information of the smart terminal are obtained. Under the conditions of the audio type and the environmental information, the playback priorities of the multiple playback devices are obtained, and the target playback device is determined according to the playback priority, so that the target playback device plays the audio data. In this way, the target playback device can be adaptively selected based on the environment and audio data of the smart terminal, so that the effect of playing the audio data meets the user's expectations. At the same time, when the environment and audio data of the smart terminal change, the selected target playback device will also change accordingly. The audio data can always be played through the target playback device, avoiding the need for the user to manually select the target playback device after the environment and audio data of the smart terminal change, thereby further improving the convenience of the user in selecting the target playback device.

[0009] Based on the application environment and system described above, various embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0011] Figure 1 A schematic diagram of an application environment suitable for the audio playback method provided in an embodiment of the present application is shown.

[0012] Figure 2 A schematic flow chart of an audio playback method according to an embodiment of the present application is shown.

[0013] Figure 3 Shows Figure 2A flowchart of the steps of obtaining the audio type in the method shown.

[0014] Figure 4 Shows Figure 2 A flowchart of the steps of obtaining environmental information in the method shown.

[0015] Figure 5 Shows Figure 2 A flow chart of the step of determining a target playback device according to an operation instruction in the method shown.

[0016] Figure 6 Shows Figure 5 A schematic flow chart of the step of determining a target playback device based on a first signal in the method shown.

[0017] Figure 7 Shows Figure 6 A schematic flow chart of the step of determining a target playback device based on a first signal and a second signal in the method shown.

[0018] Figure 8 Shows Figure 7 A schematic flow chart of the steps of determining a target playback device based on device distance in the method shown.

[0019] Fig. 9 Shows Figure 8 A flow chart of the steps of determining a target playback device based on device distance and relative angle in the method shown.

[0020] Fig.10 Shows Fig. 9 A schematic diagram of calculating the relative angle between the smart terminal and the audio playback device in the method shown.

[0021] Fig.11 Shows Figure 5 A schematic flow chart of the step of determining a target playback device based on a third signal in the method shown.

[0022] Fig.12 Shows Fig.11 A schematic flow chart of the steps of determining a target playback device based on device distance in the method shown.

[0023] Fig.13 Shows Fig.12 A flow chart of the steps of determining a target playback device based on device distance and relative angle in the method shown.

[0024] Fig.14 A functional module block diagram of an audio playback device proposed in an embodiment of the present application is shown.

[0025] Fig.15A functional module block diagram of an electronic device proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] At present, different playback devices are used in the market to play corresponding types of audio data. For example, when a smart terminal plays audio data, it can establish a connection with a playback device corresponding to the type of the audio data, so that the playback device plays the audio data. Therefore, when the audio data needs to be played, the corresponding playback device can be selected for playback based on the type of the audio data. Although this method can select the corresponding playback device to play the audio data based on the user's settings, in some special scenarios, the smart terminal cannot establish a connection with the playback device corresponding to the audio data, so that the selection of the playback device cannot meet the user's needs.

[0028] Based on this, the inventor of the present application conducted a lot of research and found that the playback priority can be set for each playback device, so as to determine the target playback device based on the priority level of the playback priority. Although this method of setting priorities can optimize the process of selecting playback devices, the inventors found that for the same audio data, the target playback devices to be selected in different scenarios may also be different, and the selected target playback device may change due to changes in the scene. Furthermore, the inventor proposed the audio playback method of the present application, which is applied to a smart terminal, and the audio playback method includes: obtaining the audio type of the audio data to be played and the environmental information of the environment in which the smart terminal is located; according to the audio type and the environmental information, obtaining the playback priority corresponding to multiple playback devices, the playback device includes a smart terminal and an audio playback device that is communicatively connected to the smart terminal; according to the playback priority, determining the target playback device among multiple playback devices; playing the audio data through the target playback device. Through the implementation of the audio playback method, when the smart terminal has the function of selecting a target playback device from multiple playback devices to play audio data, the audio type of the audio data and the environmental information of the smart terminal are obtained, and under the conditions of the audio type and the environmental information, the playback priorities of the multiple playback devices are obtained, and the target playback device is determined according to the playback priority, so that the target playback device plays the audio data, thereby being able to adaptively select the target playback device based on the environment and audio data of the smart terminal, so that the effect of playing the audio data meets the user's expectations. At the same time, when the environment and audio data of the smart terminal change, the selected target playback device will also change accordingly, and the audio data can always be played through the target playback device, avoiding the need for the user to manually select the target playback device after the environment and audio data of the smart terminal change, thereby further improving the convenience of the user in selecting the target playback device.

[0029] First, the application environment of the audio playback method provided in the embodiment of the present application is introduced.

[0030] See also Figure 1 , Figure 1 The application scenario schematic diagram of the audio playback method provided by the embodiment of the present application is shown. The audio playback method can be applied to a playback device, for example, in a smart terminal 100 or / and an audio playback device 200. In this case, the playback device may include a smart terminal 100 and an audio playback device 200, and the audio playback device 200 may be one or more. Among them, the smart terminal 100 can establish a communication connection with the audio playback device 200, the smart terminal 100 may include a device for transmitting information with the audio playback device 200, and the smart terminal 100 can obtain audio data and control the audio playback device 200 to play the audio data.

[0031] In some embodiments, the smart terminal 100 may include one or more of various types of devices such as a smart device control panel, a smart phone, a smart tablet, a laptop, a personal computer (PC), a personal digital assistant (PDA), a mobile Internet device (MID), a wearable device (such as a smart watch, a smart bracelet, and smart glasses). In addition, the operating system running on the smart terminal 100 may include, but is not limited to, an Android operating system, an IOS operating system, a Symbian operating system, a UNIX operating system, a Linux operating system, a QNX operating system, a Black Berry operating system, a Windows Phone 8 operating system, and the like.

[0032] In some embodiments, the audio playback device 200 may include a device for playing audio data. For example, the audio playback device 200 may include headphones, speakers, a car player, etc., and the audio playback device 200 may be arranged outside the smart terminal 100. It should be noted that the playback device may include the audio playback device 200 as described above, and may also include a smart terminal 100 provided with a speaker, that is, the playback device may be a smart phone, a smart tablet, a laptop computer, etc.

[0033] In some examples, the smart terminal 100 can establish a communication connection with the playback device 200 through wireless communication or / and wired communication. When the smart terminal 100 establishes a wireless communication connection with the playback device 200, the smart terminal 100 and the playback device 200 can be connected through Bluetooth, WLAN, Wi-Fi (Wireless-Fidelity), ZigBee (Zifeng Technology), etc.

[0034] Based on the application environment and system described above, various embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.

[0035] See also Figure 2 , an audio playback method provided in an embodiment of the present application is applied to a smart terminal. Once the smart terminal is triggered, the process of the method in the embodiment can be automatically run by the smart terminal, wherein each step can be performed in sequence as in the flowchart, or multiple steps can be performed simultaneously according to actual conditions, which is not limited here. The audio playback method may include the following steps S11 to S15.

[0036] Step S11: Obtain the audio type of the audio data to be played.

[0037] In this embodiment, the audio data may include data for parsing and playing by the playback device. The audio type may be used to characterize the category of the audio content, and the audio type may include private audio and non-private audio. For example, the audio content may include call audio, music audio, video audio, radio audio, etc.; when the audio content is call audio, its corresponding audio type may be private audio; when the audio content is radio audio or music audio, its corresponding audio type may be non-private audio. In this embodiment, the type attribute of the audio content may be customized by the user, such as, according to the user's settings, the audio of a certain content may be set as private audio or non-private audio to meet the actual needs of the user. Further, in some embodiments, when the user is about to enable audio output, such as when the user opens an application, and the application calls a speaker or a handset, the smart terminal may issue an inquiry message to confirm the audio type of the sound played by the application to the user, and set the audio type of the sound corresponding to the application according to the user's feedback information. For example, when the user starts a video playback program, the smart terminal may start a pop-up window and display "Please confirm whether the audio output by this program is private audio". If the user feedback is "yes", the smart terminal may set the sound corresponding to the video playback program to private audio.

[0038] Of course, in some embodiments, the intelligent terminal may automatically determine the audio type according to the audio content or its corresponding application.

[0039] In some embodiments, the program currently running on the smart terminal can be obtained, and the audio type is determined based on the signal parsed by the program currently running on the smart terminal, and the signal may include data used to represent audio data. For example, the program currently running on the smart terminal may be a music player program, and the smart terminal parses a pre-stored music file. At this time, the music file is used as the parsed signal, and the audio type is determined to be music audio based on the signal.

[0040] In some embodiments, the program currently running on the smart terminal can also be obtained, the category of the program can be obtained, and the audio type can be determined according to the category. For example, the program currently running on the smart terminal can be a music player program, and the category of the program is determined to be music, then the audio type at this time is determined to be music audio, and at this time, the category corresponding to the program configuration can be pre-set.

[0041] In some embodiments, the audio type of the audio data may also be determined based on the audio content of the audio data. For example, speech recognition may be performed on the audio data to obtain the audio content in the audio data, and then the audio content may be obtained to determine the audio type of the audio data.

[0042] In this embodiment, based on the audio type of the acquired audio data, it can be determined whether the audio data is suitable for privacy protection processing. If the audio data needs to be processed for privacy protection (such as calls), the audio data can be played through a playback device with a higher degree of privacy to prevent leakage. If the audio data does not need to be processed for privacy protection (such as music), the audio data can be played through a playback device with a lower degree of privacy, thereby adaptively selecting a corresponding playback device to play the audio data based on the audio type.

[0043] Step S12: Obtaining environmental information of the environment in which the smart terminal is located.

[0044] In this embodiment, the environmental information can be used to characterize the current environmental state of the smart terminal. For example, the environmental state can be a private scene, an outdoor scene, a home scene, etc., and the environmental information can include a private environment and a non-privacy environment. For example, when the environmental state is a private scene, the corresponding environmental information is a private environment; when the environmental state is an outdoor scene, the corresponding environmental information is a non-privacy environment.

[0045] In some embodiments, the location information of the smart terminal can be obtained and the environmental status of the smart terminal can be determined based on the location information of the smart terminal. The location information can be compared with a pre-set location (such as home, company, school, library, etc.) and the environmental status of the smart terminal can be determined based on the comparison result.

[0046] In this embodiment, based on the acquired environmental information, it can be determined whether it is appropriate to perform privacy protection processing on the audio data in the environment where the smart terminal is located. If the audio data needs to be privacy protected (for example, someone is answering a call in a vehicle), the audio data can be played through a playback device with a higher degree of privacy to prevent leakage. If the audio data does not need to be privacy protected (for example, no one is answering a call in a vehicle), the audio data can be played through a playback device with a lower degree of privacy, thereby adaptively selecting a corresponding playback device to play the audio data based on the environment in which the smart terminal is located.

[0047] In some embodiments, voice information in the car can be obtained, and based on the audio information, it is determined whether there is anyone in the car. In this case, the voice information can be collected through a microphone set on the smart terminal / vehicle, and the voice information can be recognized through a voice recognition algorithm. Based on the recognition result, it is determined whether there is a sound source other than the vehicle owner in the vehicle. If so, it is determined that there is someone in the vehicle, and if not, it is determined that there is no one in the vehicle. Sensors can also be set on the co-pilot seat and passenger seat of the vehicle, and the signals generated by the sensors are sent to the smart terminal. The smart terminal can determine whether there is someone in the seat based on the signal, and then determine whether there is anyone in the car. Images can also be captured by a camera set on the smart terminal / vehicle, and based on the image recognition results of the image, it is determined whether there is anyone in the car. There is no specific restriction on the method of determining whether there is someone in the car, and it can be set based on actual scene requirements.

[0048] Step S13: acquiring the playback priorities corresponding to the plurality of playback devices according to the audio type and the environment information, wherein the plurality of playback devices include a smart terminal and an audio playback device that is communicatively connected to the smart terminal.

[0049] In this embodiment, the playback priorities of multiple playback devices under different audio types and environmental information can be set in advance. Taking the following table (1) as an example, the audio type includes private audio and non-privacy audio, and the environmental information includes private environment and non-privacy environment. Specific examples of audio include call audio (privacy audio) and music type (non-privacy audio), and specific examples of environmental information include car environment (non-privacy environment) and home environment (privacy environment). If the audio type obtained in the above step S11 is call audio, the environmental information is the car environment, and the audio playback device includes headphones, then the playback priority of the headphones is obtained as the first priority. When the playback device also includes a car speaker and a home speaker, the playback priority of the car speaker and the home speaker can also be queried according to the relationship between the audio type, environmental information and the playback priority of the playback device.

[0050]

[0051]

[0052] Table (1)

[0053] In some embodiments, the multiple playback devices may include playback devices of the same type in different locations, playback devices of the same type with different performances, or playback devices of different types. No specific limitations are imposed on the types, performances, and locations of the multiple playback devices.

[0054] Step S14: determining a target playback device among multiple playback devices according to the playback priority.

[0055] In this embodiment, a playback device with the highest playback priority may be selected from multiple playback devices as the target playback device.

[0056] Specifically in some application scenarios, for example: when the audio content is music-type audio, but the audio type is set as a privacy type by the user, and the user does not want outsiders to hear the music. When the user is in the car, the car environment is classified as a non-privacy environment, and the smart terminal is connected to the car speakers and headphones at the same time, then the playback priority of the headphones and car speakers can be queried based on the above table, based on the audio type and environmental information. It can be seen that the playback priority of the headphones is higher, so the music will automatically be played through the headphones instead of the car speakers, which can reliably ensure that the user's privacy is not leaked; when the user listens to the same music and returns home, the home environment is classified as a privacy environment, and the smart terminal automatically connects to the home speakers and headphones, then the playback priority of the headphones and home speakers can be queried based on the above table, based on the audio type and environmental information, it can be seen that the home playback priority is higher, so the music will automatically be played through the home speakers instead of the headphones, which can improve the user's listening experience.

[0057] Step S15: Play the audio data through the target playback device.

[0058] In this embodiment, when the smart terminal and the target playback device are in the same device, the target playback device can obtain and play the audio data; when the smart terminal and the target playback device are in a wireless communication state, the smart terminal can send the audio data to the target playback device so that the target playback device plays the audio data. The specific way in which the target playback device obtains and plays the audio data can be determined based on actual needs.

[0059] In order to more clearly understand the content of this embodiment, the content of this embodiment is explained below by listing examples: the audio of the audio data is music (non-private audio), and the environment in which the smart terminal is located includes three audio playback devices, the three audio playback devices include a first speaker, a second speaker and headphones, the first speaker is in the living room (non-private environment), and the second speaker is in the bedroom (private environment). When the home environment is the living room (non-private environment) and the audio is a call type (private audio), the playback priority of the first speaker is the third priority, the playback priority of the second speaker is the second priority, and the playback priority of the headphones is the first priority; when the smart terminal is in the living room, the headphones have the highest playback priority, and the audio data is played through the headphones, thereby preventing the smart terminal from sending audio data to the first speaker when the user is in the living room and in a call state, causing the first speaker to play the audio data, thereby causing the user's call audio to be played in the living room. Therefore, this The embodiment can select the audio playback device with the highest priority to play audio data according to the audio type and environmental information to prevent the user's call audio from being leaked; when the home environment is a bedroom (privacy environment) and the audio is music (non-privacy audio), the playback priority of the first speaker is the third priority, the playback priority of the second speaker is the first priority, and the playback priority of the earphone is the second priority. When the smart terminal is in the bedroom, the playback priority of the second speaker is the highest, and the audio data is played through the second speaker. Therefore, when the user carries the smart terminal into the living room, the audio data can be played through the earphone, and when the user carries the smart terminal into the bedroom, the audio data can be played through the second speaker. Therefore, when the user is in the living room and playing music, the smart terminal sends audio data to the first speaker, so that the first speaker plays the audio data, so that the user in the living room can also hear the music, thereby realizing the switching of audio data in accordance with the user's preset needs.

[0060] For example, the smart terminal can be connected to the car player and the earphone at the same time. When the smart terminal is in a call state, the audio is a call type (privacy audio), and multiple audio playback devices include the car player and the earphone. The environmental information includes the vehicle environment with no passengers (privacy environment) and the vehicle environment with passengers (non-privacy environment). When the environmental information is the vehicle environment with no passengers and the audio is a call audio, the playback priority of the car player is higher than the playback priority of the earphone. When the environmental information is the vehicle environment with passengers and the audio is a call audio, the playback priority of the car player is lower than the playback priority of the earphone. Therefore, when there are passengers in the vehicle, the audio data of the call can be played through the earphone. When there are no passengers in the vehicle, the audio data of the call can be played through the car player. Among them, a detection device can be set in the vehicle, and the detection device is used to detect whether there are passengers in the vehicle. It can also be determined whether there are passengers in the vehicle through user gestures. There is no specific restriction on the method of detecting whether there are passengers in the vehicle.

[0061] In some embodiments, the user can also control the playback device in real time to make the playback device play audio data, such as pressing a play button of the playback device, selecting a target playback device in the interface of the smart terminal, etc.

[0062] In this embodiment, through the implementation of the above steps S11 to S15, when the smart terminal has the ability to select a target playback device from multiple playback devices to play audio data, the audio type of the audio data and the environmental information of the smart terminal are obtained. Under the conditions of the audio type and the environmental information, the playback priorities of the multiple playback devices are obtained, and the target playback device is determined according to the playback priority, so that the target playback device plays the audio data, thereby being able to adaptively select the target playback device based on the environment and audio data of the smart terminal, so that the effect of playing the audio data meets the user's expectations. At the same time, when the environment and audio data of the smart terminal change, the selected target playback device will also change accordingly, and the audio data can always be played through the target playback device, avoiding the need for the user to manually select the target playback device after the environment and audio data of the smart terminal change, further improving the convenience of the user in selecting the target playback device.

[0063] The embodiment of the present application also provides an audio playback method, which is applied to a smart terminal, and the audio playback method may include the following steps S21 to S25. In the audio playback method provided in this embodiment, the same or similar steps as those in the above embodiment may be included. For the execution of the same or similar steps, reference may be made to the above description, and this specification will not repeat them one by one.

[0064] Step S21: Obtain the audio type of the audio data to be played.

[0065] In order to obtain the audio type, the audio type may be determined based on the signal source of the audio data. Further, as an implementation of this embodiment, Figure 3 As shown, the above step S21 may include the following steps S211 to S212.

[0066] Step S211: Acquire a signal source of audio data generated by the smart terminal, where the signal source is used to represent a data source of the audio data.

[0067] In this embodiment, the signal source can be determined by the program running on the smart terminal, and the signal source can be a media file, real-time received voice data, real-time generated voice data, etc. For example, the program running on the smart terminal includes a video player, and it can be detected whether the video player is in a parsing state. If so, the data parsed by the video player can be obtained and used as the signal source.

[0068] Step S212: Determine the audio type according to the signal source.

[0069] In this embodiment, the audio type can be determined based on the format attribute of the signal source. There can be a one-to-one correspondence between the format attribute of the signal source and the audio type. Taking the following table (2) as an example, when the format attribute is A, the audio type is a, when the format attribute is B, the audio type is b, and when the format attribute is C, the audio type is c.

[0070]

[0071]

[0072] Table (2)

[0073] In this embodiment, by implementing the above steps S211 to S212, the signal source of the audio data can be acquired, and the audio type can be determined based on the format attribute of the signal source.

[0074] Step S22: Obtaining environmental information of the environment in which the smart terminal is located.

[0075] In order to obtain the environmental information, the environmental information may be determined based on the device attributes of the audio playback device. Further, as an implementation of this embodiment, Figure 4 As shown, the above step S22 may include the following steps S221 to S222.

[0076] Step S221: Acquire an audio playback device that establishes a communication connection with the smart terminal.

[0077] In this embodiment, the audio playback device that establishes a communication connection with the smart terminal may include a device that directly establishes a communication connection with the smart terminal, and may also include a device that indirectly establishes a communication connection with the smart terminal. For example, the smart terminal and the audio playback device may respectively establish a communication connection with the server, and the smart terminal may indirectly connect to the audio playback device through the server.

[0078] Step S222: Obtain device properties of the audio playback device.

[0079] In this embodiment, the device attributes may include the location information of the audio playback device, the control information received by the audio playback device, the binding relationship between the audio playback device and other devices, etc. Among them, the location information can be used to characterize the location of the audio playback device, and a positioning device can be set on the audio playback device to obtain the location of the audio playback device. The control information can be used to characterize the instructions received by the audio playback device, which can be instructions generated by the user in the smart terminal or the audio playback device. For example, when the audio playback device is provided with a button for generating instructions, when the user presses the button, the corresponding instruction can be generated. The binding relationship can be regarded as a connection relationship between the audio playback device and the vehicle computer, laptop computer, etc.

[0080] Step S223: Determine environmental information according to device attributes.

[0081] In this embodiment, the environment where the smart terminal is located can be determined based on the device attributes.

[0082] In some embodiments, when the device attributes include location information, the distance between the audio playback device and a preset target location can be determined based on the location information, thereby determining the environmental information based on the distance. For example, the target location can be the center of a bedroom, and the distance between the location of the audio playback device and the center can be calculated. If the distance is less than a preset value, it can be determined that the audio playback device that establishes a communication connection with the smart terminal is in the bedroom, and the environment in which the smart terminal is located is determined to be a home environment, and the home environment can be regarded as a non-private environment.

[0083] In some embodiments, when the device attributes include control information, the user intent can be determined based on the control information, thereby determining the environment information based on the user intent. For example, when the control information may be an instruction for representing a notification of answering an incoming call, the user intent can be determined to be to make a call with others based on the instruction, and the environment in which the smart terminal is located can be determined to be a private environment based on the user intent.

[0084] In some embodiments, when the device attributes include a binding relationship, the devices included in the environment where the smart terminal is located can be determined based on the binding relationship, and the environment where the smart terminal is located can be determined based on the devices. For example, when it is determined based on the binding relationship that the audio playback device is connected to the vehicle head unit, the environment where the smart terminal is located can be determined as a vehicle use environment based on the vehicle head unit. Based on the vehicle use environment, if there are passengers in the car, the current environment can be regarded as a private environment, and if there are no passengers in the car, the current environment can be regarded as a non-private environment.

[0085] In this embodiment, by implementing the above steps S221 to S223, the environment information of the smart terminal can be obtained based on the association between the device attributes and the environment.

[0086] Step S23: acquiring the playback priorities corresponding to the plurality of playback devices according to the audio type and the environment information, wherein the plurality of playback devices include a smart terminal and an audio playback device that is communicatively connected to the smart terminal.

[0087] In order to make the obtained target playback device more consistent with the user's expectations, the method for determining the target playback device to obtain the playback priority can be based on the audio type of the audio data and the playback priority of the playback device. The method is roughly the same as the method for obtaining the playback priority in the above step S12, and the method for obtaining the playback priority will not be repeated here.

[0088] Step S24: determining a target playback device from among multiple playback devices according to the playback priority.

[0089] Furthermore, the above step S24 may include the following step S241.

[0090] Step S241: Obtain the corresponding playback priority according to the audio type, and determine the playback device corresponding to the playback priority as the target playback device.

[0091] In this embodiment, the audio type may be matched with the play priority in advance, and then the play device corresponding to the play priority may be acquired.

[0092] In this embodiment, through the implementation of the above-mentioned steps S231 to S232 and step S241, the audio type and playback priority in different scenarios can be set in advance, so that when playing audio data, the target playback device corresponding to the type of the audio data and the environmental information can be selected to play the audio data. For example, when the audio type is private audio, the playback priority corresponding to the private audio can be selected. The playback device corresponding to the playback priority can play audio data of the private type under the current audio type and environmental information conditions to avoid leakage of privacy information.

[0093] Step S25: Play the audio data through the target playback device.

[0094] The embodiment of the present application also provides an audio playback method, which is applied to a smart terminal, and the audio playback method may include the following steps S31 to S35. In the audio playback method provided in this embodiment, the same or similar steps as those in the above embodiment may be included. For the execution of the same or similar steps, reference may be made to the above description, and this specification will not repeat them one by one.

[0095] Step S31: Obtain the audio type of the audio data to be played.

[0096] Step S32: Obtaining environmental information of the environment in which the smart terminal is located.

[0097] Step S33: acquiring the playback priorities corresponding to the multiple playback devices according to the audio type and the environment information, wherein the multiple playback devices include a smart terminal and an audio playback device that is communicatively connected to the smart terminal.

[0098] Step S34: determining a target playback device from among multiple playback devices according to the playback priority.

[0099] Since there are multiple playback devices, it is possible that multiple playback devices have the same playback priority. In order to avoid the situation where the target playback device cannot be accurately selected due to the same playback priority of multiple playback devices, as an implementation method of this embodiment, Figure 5 As shown, the above step S34 may include the following steps S341 to S342.

[0100] Step S341: if the playback priorities of at least two audio playback devices among the multiple playback devices are consistent, an operation instruction is obtained, where the operation instruction is used to determine a target playback device among the audio playback devices with consistent playback priorities.

[0101] In this embodiment, the operation instruction may represent an instruction for selecting a target playback device from a plurality of audio playback devices. In addition, the operation instruction may be generated by the smart terminal based on the user's operation, and the operation instruction may be automatically generated according to a pre-set rule when it is known that the playback priorities of at least two audio playback devices are consistent. For example, when it is detected that the playback priorities of two audio playback devices are the highest and the same, the smart terminal may automatically generate an operation instruction, and the instruction may specify the audio playback device with the highest frequency of use in the past preset time (such as within a week or a month) of the two audio playback devices as the target playback device, or specify the audio playback device that was used last time as the target playback device. The method of generating the operation instruction is not specifically limited here.

[0102] Step S342: Determine the target playback device according to the operation instruction.

[0103] In this embodiment, the target playback device may be determined in a corresponding manner based on the type of the operation instruction. Figure 6 As shown, the above step S342 may include the following steps S3421 to S3423.

[0104] Step S3421: Transmit a first signal carrying a transmission timestamp according to the operation instruction.

[0105] In this embodiment, the operation instruction may be an instruction for triggering the intelligent terminal to transmit the first signal. For example, the operation instruction may be a click instruction of the user on the intelligent terminal interface, or an automatically triggered action instruction. In addition, the emission timestamp may be used to characterize the emission time of the first signal. The first signal may be an ultrasonic signal, an electromagnetic wave signal, an optical signal, etc., and the type of the first signal is not specifically limited here.

[0106] Step S3422: receiving feedback information sent by the audio playback device based on the first signal, wherein the feedback information is generated based on the transmission timestamp and the time of receiving the first signal.

[0107] Step S3423: Determine a target playback device from audio playback devices with consistent playback priorities according to the feedback information.

[0108] In this embodiment, the feedback information may include the distance between the audio playback device and the smart terminal. The audio playback device may obtain the propagation rate of the first signal and the time of receiving the first signal, calculate the difference between the time of receiving the first signal and the time of transmitting the first signal represented by the transmission timestamp, and calculate the distance between the audio playback device and the smart terminal based on the difference and the propagation rate of the first signal, thereby obtaining the feedback information. In some embodiments, when the smart terminal determines that the distance between the audio playback device and the smart terminal is less than the preset distance based on the feedback information, the audio playback device may be used as the target playback device.

[0109] In some embodiments, the feedback information may also include a target playback device determination instruction. The audio playback device may obtain the propagation rate of the first signal and the time of receiving the first signal, calculate the difference between the time of receiving the first signal and the time of transmitting the first signal represented by the transmission timestamp, and calculate the distance between the audio playback device and the smart terminal based on the difference and the propagation rate of the first signal. If the distance is less than the preset distance, a target playback device determination instruction for characterizing the audio playback device as the target playback device may be generated, thereby obtaining feedback information. When the smart terminal receives the feedback information fed back by the audio playback device, it may determine that the audio playback device is the target playback device based on the target playback device determination instruction.

[0110] In this embodiment, by implementing the above steps S3421 to S3423, a first signal carrying a transmission timestamp is transmitted, and the propagation rate of the first signal is cleverly used to calculate the distance between the audio playback device and the smart terminal, and then the target playback device is determined based on the distance.

[0111] In order to reduce the occupation of audio playback device resources and lower the resource configuration requirements of the audio playback device, the target playback device can be determined by calculation of the intelligent terminal without performing calculation on the audio playback device. Further, as an implementation method of this embodiment, Figure 7 As shown, the above step S3423 may include the following steps S41 to S43.

[0112] Step S41: transmitting a first signal carrying a transmission timestamp according to an operation instruction.

[0113] In this embodiment, the operation instruction may be an instruction for triggering the intelligent terminal to transmit the first signal. For example, the operation instruction may be a click instruction of the user on the intelligent terminal interface, or an automatically triggered action instruction. In addition, the emission timestamp may be used to characterize the emission time of the first signal. The first signal may be an ultrasonic signal, an electromagnetic wave signal, an optical signal, etc., and the type of the first signal is not specifically limited here.

[0114] Step S42: receiving a second signal sent by the audio playback device based on the first signal, wherein the second signal includes a receiving timestamp when the audio playback device receives the first signal.

[0115] In this embodiment, the second signal may be an ultrasonic signal, an electromagnetic wave signal, an optical signal, etc., and the type of the first signal is not specifically limited. The receiving timestamp may be used to indicate the time when the audio playback device receives the first signal.

[0116] Step S43: determining a target playback device from audio playback devices with consistent playback priorities according to the first signal and the second signal.

[0117] The time difference of the first signal propagating from the smart terminal to the audio playback device can be calculated based on the transmission timestamp and the reception timestamp, the distance between the audio playback device and the smart terminal can be calculated based on the time difference, and whether the audio playback device is the target playback device can be determined based on the distance. Figure 8 As shown, the above step S43 may include the following steps S431 to S433.

[0118] Step S431: Acquire the propagation rate of the first signal.

[0119] In this embodiment, when the first signal is an ultrasonic signal, the propagation velocity of the ultrasonic wave in the air can be obtained; when the first signal is an electromagnetic wave signal, the propagation velocity of the electromagnetic wave in the air can be obtained; when the first signal is an optical signal, the propagation velocity of the light in the air can be obtained, thereby obtaining the propagation velocity of the first signal.

[0120] Step S432: Obtain the device distance between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp and the propagation rate.

[0121] In this embodiment, the time difference for the first signal to propagate from the smart terminal to the audio playback device can be calculated based on the transmission timestamp and the reception timestamp, and the device distance between the smart terminal and the audio playback device can be calculated based on the time difference and the propagation rate. Thus, the device distance between each audio playback device and the smart terminal can be calculated separately.

[0122] Step S433: determining a target playback device from audio playback devices with the same playback priority according to the device distance.

[0123] In this embodiment, the device distances between each audio playback device and the smart terminal can be compared, and the audio playback device with the smallest device distance can be used as the target playback device. The device distances between each audio playback device and the smart terminal can also be compared with a preset device distance, and the audio playback device corresponding to a device distance less than the preset device distance can be used as the target playback device.

[0124] In this embodiment, the target playback device can be determined based on the device distance between the smart terminal and the audio playback device, thereby preventing the situation where the target playback device cannot be obtained when there are at least two audio playback devices with the same playback priority, resulting in the inability to play the audio data, thereby realizing seamless operation to determine the target playback device.

[0125] Furthermore, in order to more accurately select the target playback device through a non-sensing operation, further, as an implementation method of this embodiment, Fig. 9 As shown, the audio playback device is provided with at least two signal receivers, and the at least two signal receivers include a first signal receiver and a second signal receiver; the above step S43 may include the following steps S4331 to S4333.

[0126] Step S4331: Obtain the distance between the first signal receiver and the second signal receiver.

[0127] In this embodiment, the signal type received by the first signal receiver and the second signal receiver should be consistent with the signal type of the first signal. For example, when the first signal is an ultrasonic signal, the first signal receiver and the second signal receiver may be microphones; when the first signal is an electromagnetic wave signal, the first signal receiver and the second signal receiver may be antennas; when the first signal is an optical signal, the first signal receiver and the second signal receiver may be photosensitive devices. The distance between the first signal receiver and the second signal receiver may be acquired in advance and stored in a database, and when the distance needs to be acquired, it may be queried in the database.

[0128] In this embodiment, a certain distance is set between the first signal receiver and the second signal receiver. For example, the first signal receiver may be a microphone in a certain area of ​​the microphone array, and the second signal receiver may be a microphone in another area of ​​the microphone array.

[0129] Step S4332: Calculate the relative angle between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp and the distance.

[0130] In this embodiment, the first distance from the smart terminal to the first signal receiver can be calculated according to the transmission timestamp and the reception timestamp, and the second distance from the smart terminal to the second signal receiver can be calculated according to the transmission timestamp and the reception timestamp. Fig.10 As shown, the difference between the first distance and the second distance is L, and the distance between the first signal receiver 201 and the second signal receiver 202 is d, so the angle θ can be calculated. Since the angle between the propagation direction of the first signal and the straight line formed by the first signal receiver 201 and the second signal receiver 202 can be calculated based on the angle θ, the angle θ can be used to characterize the relative angle of the smart terminal relative to the audio playback device. Furthermore, the first signal can be regarded as a parallel signal, and the angle θ can be calculated according to the following formula (1).

[0131]

[0132] Step S4333: Determine the target playback device from the audio playback devices with the same playback priority according to the device distance and relative angle.

[0133] In this embodiment, the device distance between each audio playback device and the smart terminal can be compared, the relative angle can be compared with the preset angle range, and the audio playback device with the smallest device distance and the relative angle within the preset angle range can be used as the target playback device. The device distance between each audio playback device and the smart terminal can also be compared with the preset device distance, and the relative angle can be compared with the preset angle range, and the audio playback device with a device distance less than the preset device distance and a relative angle within the preset angle range can be used as the target playback device.

[0134] In this embodiment, through the implementation of the above-mentioned steps S4331 to S4333, the target playback device can be obtained based on the relative angle and device distance between the smart terminal and the audio playback device. When the smart terminal points to the audio playback device at a specific angle, the pointed audio playback device can play audio data, thereby realizing seamless operation to select the target playback device, thereby improving the convenience of users in playing audio data.

[0135] Further, as an implementation method of this embodiment, Fig.11As shown, the above step S332 may include the following steps S51 to S53.

[0136] Step S51: transmitting a control instruction according to the operation instruction, so that the audio playback device transmits a third signal carrying a transmission timestamp.

[0137] In this embodiment, the operation instruction may be an instruction for triggering the emission of a control instruction. For example, the operation instruction may be a click instruction of a user on an interface of a smart terminal, or may be an automatically triggered action instruction.

[0138] In this embodiment, the third signal may be an ultrasonic signal, an electromagnetic wave signal, an optical signal, etc., and the type of the third signal is not specifically limited. The emission timestamp may be used to characterize the time when the audio playback device emits the third signal.

[0139] Step S52: receiving a third signal transmitted by the audio playback device, and obtaining a receiving timestamp of receiving the third signal.

[0140] In this embodiment, the time difference of the third signal propagating from the audio playback device to the smart terminal can be calculated based on the transmission timestamp and the reception timestamp, the distance between the audio playback device and the smart terminal can be calculated based on the time difference, and whether the audio playback device is the target playback device can be determined based on the distance.

[0141] Step S53: determining a target playback device from audio playback devices with consistent playback priorities according to the transmission timestamp and the reception timestamp.

[0142] Further, as an implementation method of this embodiment, Fig.12 As shown, the above step S53 may include the following steps S531 to S533.

[0143] Step S531: Acquire the propagation rate of the third signal.

[0144] In this embodiment, when the third signal is an ultrasonic signal, the propagation velocity of the ultrasonic wave in the air can be obtained; when the third signal is an electromagnetic wave signal, the propagation velocity of the electromagnetic wave in the air can be obtained; when the third signal is an optical signal, the propagation velocity of the light in the air can be obtained, thereby obtaining the propagation velocity of the third signal.

[0145] Step S532: Acquire the device distance between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp and the propagation rate.

[0146] In this embodiment, the time difference for the third signal to propagate from the audio playback device to the smart terminal can be calculated based on the transmission timestamp and the reception timestamp, and the device distance between the smart terminal and the audio playback device can be calculated based on the time difference and the propagation rate. Thus, the device distance between each audio playback device and the smart terminal can be calculated respectively.

[0147] Step S533: determining a target playback device from audio playback devices with the same playback priority according to the device distance.

[0148] In this embodiment, the device distances between each audio playback device and the smart terminal can be compared, and the audio playback device with the smallest device distance can be used as the target playback device. The device distances between each audio playback device and the smart terminal can also be compared with a preset device distance, and the audio playback device corresponding to a device distance less than the preset device distance can be used as the target playback device.

[0149] In this embodiment, the target playback device can be determined based on the device distance between the smart terminal and the audio playback device, thereby preventing the situation where the target playback device cannot be obtained when there are at least two audio playback devices with the same playback priority, resulting in the inability to play the audio data, thereby realizing seamless operation to determine the target playback device.

[0150] Furthermore, in order to more accurately select the target playback device through a non-sensing operation, further, as an implementation method of this embodiment, Fig.13 As shown, the intelligent terminal is provided with at least two signal receivers, and the at least two signal receivers include a first signal receiver and a second signal receiver; the above step S53 may include the following steps S5331 to S5333.

[0151] Step S5331: Acquire the distance between the first signal receiver and the second signal receiver.

[0152] In this embodiment, the signal type received by the first signal receiver and the second signal receiver should be consistent with the signal type of the third signal. For example, when the third signal is an ultrasonic signal, the first signal receiver and the second signal receiver may be microphones; when the third signal is an electromagnetic wave signal, the first signal receiver and the second signal receiver may be antennas; when the third signal is an optical signal, the first signal receiver and the second signal receiver may be photosensitive devices. The distance between the first signal receiver and the second signal receiver may be acquired in advance and stored in a database, and when the distance needs to be acquired, it may be queried in the database.

[0153] In this embodiment, a certain distance is set between the first signal receiver and the second signal receiver. For example, the first signal receiver may be a microphone in a certain area of ​​the microphone array, and the second signal receiver may be a microphone in another area of ​​the microphone array.

[0154] Step S5332: Calculate the relative angle between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp and the distance.

[0155] In this embodiment, the first distance from the smart terminal to the first signal receiver can be calculated based on the transmission timestamp and the reception timestamp, and the second distance from the smart terminal to the second signal receiver can be calculated based on the transmission timestamp and the reception timestamp. The difference between the first distance and the second distance is L, and the distance between the first signal receiver and the second signal receiver is d, so that the angle θ can be calculated. Since the angle between the propagation direction of the third signal and the straight line formed by the first signal receiver and the second signal receiver can be calculated based on the angle θ, the angle θ can be used to characterize the relative angle of the audio playback device relative to the smart terminal. Furthermore, the third signal can be regarded as a parallel signal, and the angle θ can be calculated according to the following formula (1).

[0156]

[0157] Step S5333: Determine the target playback device from the audio playback devices with the same playback priority according to the device distance and relative angle.

[0158] In this embodiment, the device distance between each audio playback device and the smart terminal can be compared, the relative angle can be compared with the preset angle range, and the audio playback device with the smallest device distance and the relative angle within the preset angle range can be used as the target playback device. The device distance between each audio playback device and the smart terminal can also be compared with the preset device distance, and the relative angle can be compared with the preset angle range, and the audio playback device with a device distance less than the preset device distance and a relative angle within the preset angle range can be used as the target playback device.

[0159] In this embodiment, through the implementation of the above-mentioned steps S5331 to S5333, the target playback device can be obtained based on the relative angle and device distance between the smart terminal and the audio playback device. When the smart terminal points to the audio playback device at a specific angle, the pointed audio playback device can play audio data, thereby realizing seamless operation to select the target playback device, thereby improving the convenience of users in playing audio data.

[0160] Step S35: Play the audio data through the target playback device.

[0161] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0162] See also Fig.14 , which shows a structural block diagram of an audio playback device provided in an embodiment of the present application, the audio playback device can be applied to a smart terminal, and the audio playback device includes an information acquisition module 61, an environmental information acquisition module 62, a playback priority acquisition module 63, a target playback device determination module 64 and an audio data playback module 65. The information acquisition module 61 is used to obtain the audio type of the audio data to be played. The environmental information acquisition module 62 is used to obtain environmental information of the environment in which the smart terminal is located. The playback priority acquisition module 63 is used to obtain the playback priorities corresponding to multiple playback devices according to the audio type and environmental information, and the multiple playback devices include a smart terminal and an audio playback device that is communicatively connected to the smart terminal. The target playback device determination module 64 is used to determine the target playback device among the multiple playback devices according to the playback priority. The audio data playback module 65 is used to play audio data through the target playback device.

[0163] Further, as an implementation of this embodiment, the environmental information may include a privacy environment and a non-privacy environment, the playback priority acquisition module 63 may include an audio type determination unit and a playback priority acquisition unit, and the target playback device determination module 64 may include a first target playback device determination unit. The audio type determination unit is used to determine the audio type of the audio data according to the audio type and the environmental information, and the audio type includes privacy audio and non-privacy audio. The first target playback device determination unit is used to obtain the playback priority corresponding to the audio type according to the audio type, and determine the playback device corresponding to the playback priority as the target playback device.

[0164] Further, as an implementation of this embodiment, the information acquisition module 61 may include a data source determination unit and an audio type determination unit. The data source determination unit is used to obtain a signal source of the audio data generated by the smart terminal, and the signal source is used to characterize the data source of the audio data. The audio type determination unit is used to determine the audio type of the audio data according to the signal source.

[0165] Further, as an implementation of this embodiment, the environment information acquisition module 62 may include a playback device acquisition unit, a device attribute acquisition unit, and an information determination unit. The playback device acquisition unit is used to acquire a playback device that establishes a communication connection with the smart terminal. The device attribute acquisition unit is used to acquire device attributes of the playback device. The information determination unit is used to determine the environment information of the environment in which the smart terminal is located according to the device attributes.

[0166] Further, as an implementation of this embodiment, the target playback device determination module 64 may also include an operation instruction acquisition unit and a second target playback device determination unit. The operation instruction acquisition unit is used to acquire an operation instruction if the playback priorities of at least two audio playback devices among the multiple playback devices are consistent, and the operation instruction is used to determine the target playback device among the audio playback devices with consistent playback priorities. The second target playback device determination unit is used to determine the target playback device according to the operation instruction.

[0167] Further, as an implementation of this embodiment, the second target playback device determination unit may include a first signal sending subunit, a feedback information receiving subunit and a first target playback device determination subunit. The first signal sending subunit is used to transmit a first signal carrying a transmission timestamp according to an operation instruction. The feedback information receiving subunit is used to receive feedback information sent by the audio playback device based on the first signal, wherein the feedback information is generated based on the transmission timestamp and the moment of receiving the first signal. The first target playback device determination subunit is used to determine the target playback device among audio playback devices with consistent playback priority according to the feedback information.

[0168] Further, as an implementation of this embodiment, the second target playback device determination unit may include a first signal transmitting subunit, a first receiving subunit and a first target playback device subunit. The first signal transmitting subunit is used to transmit a first signal carrying a transmission timestamp according to an operation instruction. The first receiving subunit is used to receive a second signal sent by the audio playback device based on the first signal, the second signal including a reception timestamp when the audio playback device receives the first signal. The first target playback device subunit is used to determine the target playback device among audio playback devices with consistent playback priorities based on the first signal and the second signal.

[0169] Further, as an implementation of this embodiment, the first target playback device subunit may include a first propagation rate acquisition subunit, a first device distance acquisition subunit and a first determination subunit. The first propagation rate acquisition subunit is used to acquire the propagation rate of the first signal. The first device distance acquisition subunit is used to acquire the device distance between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp and the propagation rate. The first determination subunit is used to determine the target playback device among the audio playback devices with the same playback priority according to the device distance.

[0170] Further, as an implementation of this embodiment, the audio playback device is provided with a first signal receiver and a second signal receiver; the first determination subunit may include a first spacing acquisition subunit, a first relative angle acquisition subunit and a first target determination subunit. Among them, the first spacing acquisition subunit is used to obtain the spacing between the first signal receiver and the second signal receiver. The first relative angle acquisition subunit is used to calculate the relative angle between the smart terminal and the audio playback device based on the transmission timestamp, the reception timestamp and the spacing. The first target determination subunit is used to determine the target playback device among the audio playback devices with the same playback priority based on the device distance and the relative angle.

[0171] Further, as an implementation of this embodiment, the second target playback device determination unit may include a third signal sending subunit, a second receiving subunit, and a second target playback device subunit. The third signal sending subunit is used to transmit a control instruction according to the operation instruction so that the audio playback device transmits a third signal carrying a transmission timestamp. The second receiving subunit is used to receive the third signal transmitted by the audio playback device and obtain a receiving timestamp of receiving the third signal. The second target playback device subunit is used to determine the target playback device among the audio playback devices with the same playback priority according to the transmission timestamp and the receiving timestamp.

[0172] Further, as an implementation of this embodiment, the second target playback device subunit may include a second propagation rate acquisition subunit, a second device distance acquisition subunit, and a second determination subunit. The second propagation rate acquisition subunit is used to acquire the propagation rate of the third signal. The second device distance acquisition subunit is used to acquire the device distance between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp, and the propagation rate. The second determination subunit is used to determine the target playback device among the audio playback devices with the same playback priority according to the device distance.

[0173] Further, as an implementation of this embodiment, the smart terminal is provided with a first signal receiver and a second signal receiver; the second determination subunit may include a second distance acquisition subunit, a second relative angle acquisition subunit, and a second target determination subunit. Among them, the second distance acquisition subunit is used to obtain the distance between the first signal receiver and the second signal receiver. The second relative angle acquisition subunit is used to calculate the relative angle between the smart terminal and the audio playback device based on the transmission timestamp, the reception timestamp and the distance. The second target determination subunit is used to determine the target playback device among the audio playback devices with the same playback priority based on the device distance and the relative angle.

[0174] In addition, each functional module and functional unit in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. Each module and unit in the above-mentioned integrated audio playback device can be implemented in the form of hardware or in the form of software functional modules.

[0175] See also Fig.15 , which shows an electronic device 800 provided by an embodiment of the present application, including one or more processors and a memory; one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors, and one or more programs are configured to execute the above method. Further, the electronic device 800 may include a processor 810, a communication module 820, a memory 830 and a bus. The processor 810, the communication module 820 and the memory 830 are interconnected through the bus and complete communication with each other. The bus can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them:

[0176] The memory 830 is used to store programs. Specifically, the memory 830 can be used to store software programs and various data. The memory 830 may mainly include a program storage area and a data storage area, wherein the program storage area can store application programs required to operate at least one function and may include program codes, and the program codes include computer operating instructions. In addition to storing programs, the memory 830 can also temporarily store messages that the communication module 820 needs to send, etc. The memory 830 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk storage.

[0177] The processor 810 is used to execute the program stored in the memory 830. When the program is executed by the processor, the steps of the audio playing method of each embodiment described above are implemented.

[0178] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned audio playback method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0179] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0180] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0181] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An audio playback method, characterized in that: Applied to a smart terminal, the smart terminal is provided with a first signal receiver and a second signal receiver, and the audio playing method comprises: Get the audio type of the audio data to be played; Acquire environmental information of the environment in which the smart terminal is located; According to the audio type and the environment information, obtaining playback priorities corresponding to a plurality of playback devices, wherein the plurality of playback devices include the smart terminal and an audio playback device that is communicatively connected to the smart terminal; According to the playback priority, determining a target playback device among the multiple playback devices, wherein, when there are at least two audio playback devices with the same playback priority, obtaining the distance between the first signal receiver and the second signal receiver, and calculating the relative angle between the smart terminal and the audio playback device, and determining the target playback device among the audio playback devices with the same playback priority according to the device distance between the smart terminal and the audio playback device and the relative angle; and The audio data is played through the target playback device.

2. The audio playback method according to claim 1, characterized in that: The environment information includes a privacy environment and a non-privacy environment; the audio type includes privacy audio and non-privacy audio; Determining a target playback device among the plurality of playback devices according to the playback priority includes: acquiring a playback priority corresponding to the audio type according to the audio type and the environmental information, and determining the playback device corresponding to the playback priority as the target playback device.

3. The audio playback method according to claim 1, characterized in that: The audio type of the audio data to be played includes: Acquire a signal source of the audio data generated by the smart terminal, where the signal source is used to represent a data source of the audio data; and The audio type of the audio data is determined according to the signal source.

4. The audio playback method according to claim 1, characterized in that: The obtaining of the environment information of the environment in which the smart terminal is located includes: Acquire an audio playback device that establishes a communication connection with the smart terminal; Obtaining device properties of the audio playback device; and The environmental information of the environment in which the smart terminal is located is determined according to the device attributes.

5. The audio playing method according to any one of claims 1 to 4, characterized in that: Determining a target playback device from among the plurality of playback devices according to the playback priority comprises: If the playback priorities of at least two audio playback devices among the plurality of playback devices are consistent, acquiring an operation instruction, wherein the operation instruction is used to determine a target playback device among the audio playback devices with consistent playback priorities; and The target playback device is determined according to the operation instruction.

6. The audio playback method according to claim 5, characterized in that: Determining the target playback device according to the operation instruction includes: Transmitting a first signal carrying a transmission timestamp according to the operation instruction; receiving feedback information sent by the audio playback device based on the first signal, wherein the feedback information is generated based on the transmission timestamp and the time of receiving the first signal; and According to the feedback information, a target playback device is determined from audio playback devices with consistent playback priorities.

7. The audio playback method according to claim 5, characterized in that: Determining the target playback device according to the operation instruction includes: Transmitting a first signal carrying a transmission timestamp according to the operation instruction; receiving a second signal sent by the audio playback device based on the first signal, wherein the second signal includes a receiving timestamp when the audio playback device receives the first signal; and A target playback device is determined from audio playback devices with consistent playback priorities according to the first signal and the second signal.

8. The audio playing method according to claim 7, characterized in that: The determining, according to the first signal and the second signal, a target playback device among audio playback devices with consistent playback priorities comprises: Acquire a propagation rate of the first signal; Acquire a device distance between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp, and the propagation rate; and A target playback device is determined from audio playback devices with the same playback priority according to the device distance.

9. The audio playing method according to claim 8, characterized in that: The audio playback device is provided with a first signal receiver and a second signal receiver; and determining the target playback device from the audio playback devices with the same playback priority according to the device distance comprises: Acquire a distance between a first signal receiver of the audio playback device and a second signal receiver of the audio playback device; Calculating the relative angle between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp and the distance; and A target playback device is determined from audio playback devices with consistent playback priorities according to the device distance and the relative angle.

10. The audio playing method according to claim 5, characterized in that: Determining the target playback device according to the operation instruction includes: transmitting a control instruction according to the operation instruction, so that the audio playback device transmits a third signal carrying a transmission timestamp; receiving the third signal transmitted by the audio playback device, and acquiring a receiving timestamp of receiving the third signal; and The target playback device is determined from audio playback devices with consistent playback priorities according to the transmission timestamp and the reception timestamp.

11. The audio playing method according to claim 10, characterized in that: The determining the target playback device among the audio playback devices with the same playback priority according to the transmission timestamp and the reception timestamp comprises: Acquire a propagation rate of the third signal; Acquire a device distance between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp, and the propagation rate; and The target playback device is determined from audio playback devices with consistent playback priorities according to the device distance.

12. The audio playing method according to claim 11, characterized in that: The smart terminal is provided with a first signal receiver and a second signal receiver; and determining the target playback device from the audio playback devices with the same playback priority according to the device distance comprises: Acquire the distance between the first signal receiver and the second signal receiver; Calculating the relative angle between the smart terminal and the audio playback device according to the transmission timestamp, the reception timestamp and the distance; and The target playback device is determined from audio playback devices with consistent playback priorities according to the device distance and the relative angle.

13. An audio playback device, characterized in that: Applied to a smart terminal, the smart terminal is provided with a first signal receiver and a second signal receiver, and the audio playback device comprises: An information acquisition module, used to acquire the audio type of the audio data to be played; An environmental information acquisition module, used to acquire environmental information of the environment in which the smart terminal is located; A playback priority acquisition module, used to acquire the playback priorities corresponding to a plurality of playback devices according to the audio type and the environment information, wherein the plurality of playback devices include the smart terminal and an audio playback device communicatively connected to the smart terminal; a target playback device determination module, configured to determine a target playback device among the plurality of playback devices according to the playback priority, wherein, when there are at least two audio playback devices with the same playback priority, the target playback device determination module is configured to obtain the distance between the first signal receiver and the second signal receiver, and calculate the relative angle between the smart terminal and the audio playback device, and determine the target playback device among the audio playback devices with the same playback priority according to the device distance between the smart terminal and the audio playback device and the relative angle; and The audio data playing module is used to play the audio data through the target playing device.

14. An electronic device, characterized in that: include: Memory; One or more processors coupled to the memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the audio playback method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the audio playing method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Audio playing control method and device, storage medium and mobile terminal

    CN107562405A

  • Method for selecting bluetooth device, terminal, and system

    CN110168942A

  • Audio playing method and device, equipment and storage medium

    CN113079246A