CN113296728A - Audio playing method and device, electronic equipment and storage medium - Google Patents

Audio playing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113296728A
CN113296728A CN202110567536.1A CN202110567536A CN113296728A CN 113296728 A CN113296728 A CN 113296728A CN 202110567536 A CN202110567536 A CN 202110567536A CN 113296728 A CN113296728 A CN 113296728A
Authority
CN
China
Prior art keywords
playing
audio
signal
target
intelligent terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110567536.1A
Other languages
Chinese (zh)
Inventor
吴哲晞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110567536.1A priority Critical patent/CN113296728A/en
Publication of CN113296728A publication Critical patent/CN113296728A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Abstract

The embodiment of the application discloses an audio playing method, an audio playing device, electronic equipment and a storage medium, which are applied to an intelligent terminal, wherein the audio playing method comprises the following steps: acquiring the audio type of audio data to be played; acquiring environment information of an environment where the intelligent terminal is located; acquiring playing priorities corresponding to a plurality of playing devices according to the audio type and the environmental information, wherein the plurality of playing devices comprise intelligent terminals and audio playing devices in communication connection with the intelligent terminals; determining a target playing device in a plurality of playing devices according to the playing priority; and playing the audio data through the target playing equipment. Through the implementation of the embodiment, the target playing device can be selected based on the audio type of the audio data and the environment information where the intelligent terminal is located, and the audio data is played, so that the target playing device can be adaptively selected based on the environment of the intelligent terminal and the audio data, and the effect of playing the audio data is in accordance with the expectation of a user.

Description

Audio playing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of consumer electronics, and in particular, to an audio playing method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development of wireless communication technology, the interconnection of everything gradually becomes the trend of the electronic consumer market. For example, common audio equipment (such as bluetooth earphones, bluetooth sound boxes and the like) on the market can be connected with the intelligent terminal, and when a user selects the specified audio equipment, the audio can be played based on the audio equipment, so that the user requirements are met. Meanwhile, in order to improve user experience, it is also appeared in the market that when an intelligent terminal enters a specific area (such as a bluetooth connection range of an audio device), the audio device can be automatically connected, so that the audio device plays audio in the intelligent terminal. However, in practical applications, when the audio in the smart terminal belongs to the content that the user does not want to be played by other audio devices, if the content is automatically pushed to the audio device for playing, great inconvenience is brought to the user.
Disclosure of Invention
The embodiment of the application provides an audio playing method and device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present application provides an audio playing method, which is applied to an intelligent terminal, and the audio playing method includes: acquiring the audio type of audio data to be played; acquiring environment information of an environment where the intelligent terminal is located; acquiring playing priorities corresponding to a plurality of playing devices according to the audio type and the environmental information, wherein the plurality of playing devices comprise intelligent terminals and audio playing devices in communication connection with the intelligent terminals; determining a target playing device in a plurality of playing devices according to the playing priority; and playing the audio data through the target playing equipment.
In a second aspect, an embodiment of the present application provides an audio playing apparatus, which is applied to an intelligent terminal, and the audio playing apparatus includes an information obtaining module, an environmental information obtaining module, a playing priority obtaining module, a target playing device determining module, and an audio data playing module. The information acquisition module is used for acquiring the audio type of the audio data to be played. The environment information acquisition module is used for acquiring environment information of the environment where the intelligent terminal is located. The playing priority obtaining module is used for obtaining playing priorities corresponding to a plurality of playing devices according to the audio types and the environment information, and the plurality of playing devices comprise intelligent terminals and audio playing devices in communication connection with the intelligent terminals. The target playing device determining module is used for determining the target playing device in the plurality of playing devices according to the playing priority. The audio data playing module is used for playing the audio data through the target playing device.
In a third aspect, an embodiment of the present application provides an electronic device, including 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, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, in which program codes are stored, wherein the method described above is performed when the program codes are executed.
The embodiment of the application provides an audio playing method, an audio playing device, an electronic device and a storage medium, through implementation of the embodiment, when an intelligent terminal selects a target playing device from a plurality of playing devices to play audio data, an audio type of the audio data and environment information where the intelligent terminal is located are obtained, under the condition of the audio type and the environment information, playing priorities of the plurality of playing devices are obtained, the target playing device is determined according to the playing priorities, the target playing device plays the audio data, the target playing device can be adaptively selected based on the environment and the audio data of the intelligent terminal, the effect of playing the audio data is in line with expectation of a user, meanwhile, when the environment where the intelligent terminal is located and the audio data are changed, the selected target playing device is also correspondingly changed, and the audio data can be played through the target playing device all the time, the situation that the user needs to manually select the target playing device after the environment where the intelligent terminal is located and the audio data are changed is avoided, and convenience of the user in selecting the target playing device is further improved.
A specific audio playback method will be described below. Based on the above-described application environment and system, embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 shows a schematic application environment applicable to the audio playing method provided by the embodiment of the present application.
Fig. 2 shows a flow diagram of an audio playback method according to an embodiment of the present application.
Fig. 3 shows a flow diagram of the step of obtaining the audio type in the method shown in fig. 2.
Fig. 4 shows a flow chart illustrating a step of acquiring environment information in the method shown in fig. 2.
Fig. 5 is a flowchart illustrating a step of determining a target playback device according to an operation instruction in the method shown in fig. 2.
Fig. 6 is a flowchart illustrating a step of determining a target playback device based on the first signal in the method shown in fig. 5.
Fig. 7 is a flowchart illustrating a step of determining a target playback device based on the first signal and the second signal in the method illustrated in fig. 6.
Fig. 8 is a flowchart illustrating a step of determining a target playback device based on the device distance in the method illustrated in fig. 7.
Fig. 9 is a flowchart illustrating a step of determining a target playback device based on device distance and relative angle in the method illustrated in fig. 8.
Fig. 10 is a schematic diagram illustrating the calculation of the relative angle between the intelligent terminal and the audio playing device in the method shown in fig. 9.
Fig. 11 is a flowchart illustrating a step of determining a target playback device based on a third signal in the method shown in fig. 5.
Fig. 12 is a flowchart illustrating a step of determining a target playback device based on the device distance in the method illustrated in fig. 11.
Fig. 13 is a flowchart illustrating a step of determining a target playback device based on device distance and relative angle in the method illustrated in fig. 12.
Fig. 14 shows a functional block diagram of an audio playing apparatus according to an embodiment of the present application.
Fig. 15 shows a functional block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, different playing devices are used in the market to play audio data of corresponding types, for example, when an intelligent terminal plays audio data, a connection can be established with the playing device corresponding to the type of the audio data, so that the playing device plays the audio data. Although the method can select the corresponding playing device to play the audio data based on the user setting, in some special scenes, the intelligent terminal can be connected with the playing device corresponding to the audio data, so that the selection of the playing device cannot meet the user requirement.
Based on this, the inventors of the present application have conducted extensive research and found that it is possible to set a playback priority for each playback device, thereby determining a target playback device based on the priority level of the playback priority. Although the way of setting the priority can optimize the process of selecting the playing device, the inventor finds that, for the same audio data, the target playing device to be selected may be different in different scenes, and the selected target playing device may change due to the change of the scenes. Further, the inventor proposes an audio playing method of the present application, where the audio playing method is applied to an intelligent terminal, and the audio playing method includes: acquiring the audio type of audio data to be played and the environmental information of the environment where the intelligent terminal is located; acquiring playing priorities corresponding to a plurality of playing devices according to the audio type and the environmental information, wherein the playing devices comprise intelligent terminals and audio playing devices in communication connection with the intelligent terminals; determining a target playing device in a plurality of playing devices according to the playing priority; and playing the audio data through the target playing equipment. By implementing the audio playing method, when the intelligent terminal selects the target playing device from the plurality of playing devices to play the audio data, the audio type of the audio data and the environment information of the intelligent terminal are obtained, the playing priorities of the plurality of playing devices are obtained under the conditions of the audio type and the environment information, the target playing device is determined according to the playing priorities, the target playing device plays the audio data, so that the target playing device can be adaptively selected based on the environment and the audio data of the intelligent terminal, the effect of playing the audio data is in accordance with the expectation of a user, meanwhile, when the environment and the audio data of the intelligent terminal are changed, the selected target playing device is also changed correspondingly, the audio data can be played through the target playing device all the time, and the situation that the environment and the audio data of the intelligent terminal are changed is avoided, the user is required to manually select the target playing device, so that the convenience of selecting the target playing device by the user is further improved.
First, an application environment of the audio playing method provided by the embodiment of the present application is introduced.
Referring to fig. 1, fig. 1 is a schematic view illustrating an application scenario of an audio playing method according to an embodiment of the present application. The audio playing method may be applied to a playing device, for example, the intelligent terminal 100 or/and the audio playing device 200, in this case, the playing device may include the intelligent terminal 100 and the audio playing device 200, and the number of the audio playing devices 200 may be one or more. The intelligent terminal 100 may establish a communication connection with the audio playing device 200, the intelligent terminal 100 may include a device that performs information transmission with the audio playing device 200, and the intelligent terminal 100 may obtain audio data and control the audio playing device 200 to play the audio data.
In some embodiments, the smart terminal 100 may include one or more of 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 (e.g., a smart watch, a smart bracelet, and smart glasses), and the like. In addition, the operating system run by 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.
In some embodiments, the audio playback device 200 may include a device that plays audio data. For example, the audio playing device 200 may include an earphone, a sound box, a car player, and the like, and the audio playing device 200 may be disposed outside the smart terminal 100. It should be noted that the playing device may include the audio playing device 200 as described above, and may also include the smart terminal 100 provided with a speaker, that is, the playing device may be a smart phone, a smart tablet, a notebook computer, or the like.
In some examples, the smart terminal 100 may establish a communication connection with the playback device 200 through wireless communication or/and wired communication. When the intelligent terminal 100 establishes a Wireless communication connection with the playback device 200, the intelligent terminal 100 and the playback device 200 may be connected by bluetooth, WLAN, Wi-Fi (Wireless-Fidelity), ZigBee (ZigBee technology), or the like.
A specific audio playback method will be described below. Based on the above-described application environment and system, embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, the audio playing method provided in the embodiment of the present application is applied to an intelligent terminal, and once the intelligent terminal is triggered, the flow of the method in the embodiment may automatically run through the intelligent terminal, where each step may be performed sequentially according to the sequence in the flowchart, or multiple steps may be performed simultaneously according to an actual situation, which is not limited herein. The audio playing method may include the following steps S11 to S15.
Step S11: and acquiring the audio type of the audio data to be played.
In this embodiment, the audio data may include data for the playback device to parse and play. The audio types may be used to characterize categories of audio content, and the audio types may include private audio and non-private audio. For example, audio content may include call audio, music audio, video audio, station audio, and so forth; when the audio content is a call audio, the corresponding audio type can be a privacy audio; when the audio content is station audio or music audio, the corresponding audio type may be non-private audio. In this embodiment, the type attribute of the audio content may be set by a user, for example, the audio of a certain content may be set as a private audio or a non-private audio according to the setting of the user, so as to meet the actual requirement of the user. Further, in some embodiments, when the user is about to enable audio output, for example, when the user opens an application and the application invokes a speaker or a handset, the smart terminal may send out query information 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 feedback information of the user. For example, when the user starts the video playing program, the intelligent terminal may start a pop-up window and display "please confirm whether the audio output by the program is the private audio", and if the user feedback is "yes", the intelligent terminal may set the sound corresponding to the video playing program as the private audio.
Of course, in some embodiments, the smart terminal may automatically determine its audio type from the audio content or its corresponding application.
In some embodiments, a program currently running by the intelligent terminal may be obtained, and the audio type may be determined according to a signal parsed by the program currently running by the intelligent terminal, where the signal may include data representing audio data. For example, the program currently run by the intelligent terminal may be a music playing program, the intelligent terminal parses a pre-stored music file, at this time, the music file is used as a parsed signal, and the audio type is determined to be music audio according to the signal.
In some embodiments, a program currently running by the intelligent terminal may also be acquired, a category of the program is acquired, and the audio type is determined according to the category. For example, a program currently running by the intelligent terminal may be a music playing program, and if the type of the program is determined to be music, the type of the audio at that time is determined to be music audio, and at that time, the type corresponding to the program configuration may be preset.
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, voice recognition may be performed on the audio data, the audio content in the audio data may be obtained, and the audio content may be obtained to determine the audio type of the audio data.
In this embodiment, whether the audio data is suitable for privacy protection processing may be determined based on the audio type of the acquired audio data, and if the audio data needs privacy protection processing (such as call), the audio data is played through a playing device with a higher privacy degree, so as to prevent disclosure; if the audio data does not need privacy protection processing (such as music), the audio data can be played through the playing device with lower privacy degree, so that the corresponding playing device is adaptively selected to play the audio data based on the audio type.
Step S12: and acquiring environment information of the environment where the intelligent terminal is located.
In this embodiment, the environment information may be used to represent the current environment state of the smart terminal. For example, the environment state may be a private scene, an outdoor scene, a home scene, etc., and the environment information may include a private environment and a non-private environment. For example, when the environment state is a private scene, the corresponding environment information is a private environment; when the environment state is an outdoor scene, the corresponding environment information is a non-privacy environment.
In some embodiments, the location information of the smart terminal may be obtained, the environment state of the smart terminal may be determined according to the location information of the smart terminal, where the location information may be compared with a preset location (e.g., a location of a home, a company, a school, a library, etc.), and the environment state of the smart terminal may be determined based on the comparison result.
In this embodiment, whether privacy protection processing is suitable for audio data in the environment where the intelligent terminal is located may be determined based on the acquired environment information, and if privacy protection processing is required for the audio data (for example, a person takes a car to answer a call), the audio data is played through a playing device with a higher privacy degree, so as to prevent disclosure; if the audio data does not need privacy protection processing (such as no person taking a car to answer a call), the audio data can be played through the playing equipment with lower privacy degree, so that the corresponding playing equipment is selected to play the audio data adaptively based on the environment where the intelligent terminal is located.
In some embodiments, voice information in the vehicle may be obtained, whether a person takes the vehicle in the vehicle is determined based on the audio information, at this time, the voice information may be acquired based on a microphone provided in the smart terminal/vehicle, the voice information is recognized through a voice recognition algorithm, whether a sound source other than an owner of the vehicle exists in the vehicle is determined based on a recognition result, if so, it is determined that the person takes the vehicle, and if not, it is determined that no person takes the vehicle; sensors can be arranged on a passenger seat and a passenger seat of the vehicle, signals generated by the sensors are sent to the intelligent terminal, and the intelligent terminal can determine whether the seat is occupied or not based on the signals so as to determine whether the passenger takes the vehicle or not; the image can be shot through a camera arranged on the intelligent terminal/vehicle, whether a person takes the bus in the vehicle is determined based on the image recognition result of the image, the mode for judging whether the person takes the bus in the vehicle is not specifically limited, and the setting can be specifically based on the actual scene requirement.
Step S13: and acquiring playing priorities corresponding to a plurality of playing devices according to the audio type and the environmental information, wherein the plurality of playing devices comprise intelligent terminals and audio playing devices in communication connection with the intelligent terminals.
In this embodiment, the playing priorities of a plurality of playing devices under different audio types and environment information may be set in advance. Taking the following table (1) as an example, the audio types include private audio and non-private audio, and the environment information includes a private environment and a non-private environment. Specific examples of the audio include a call audio (private audio) music type (non-private audio), specific examples of the environment information include a car environment (non-private environment) and a home environment (private environment), if the audio type obtained in step S11 is a call audio, the environment information is a car environment, the audio playing device includes an earphone, at this time, the playing priority obtained for the earphone is a first priority, and when the playing device further includes a car audio box and a home audio box, the playing priority of the car audio box and the home audio box may be queried according to a relationship between the audio type, the environment information and the playing priority of the playing device.
Figure BDA0003081446500000051
Figure BDA0003081446500000061
Watch (1)
In some embodiments, the multiple playback devices may include the same type of playback devices at different locations, may also include the same type of playback devices with different performances, and may also include different types of playback devices, where the types, performances, and locations of the multiple playback devices are not particularly limited.
Step S14: and determining a target playing device in the plurality of playing devices according to the playing priority.
In this embodiment, a playback device with the highest playback priority may be selected from the multiple playback devices as the target playback device.
In particular in some application scenarios, for example: when the audio content is the audio of the music class, but the audio type is set as the privacy type by the user, the user does not want to hear the music to outsiders. When a user is on a vehicle, the vehicle environment belongs to a non-privacy environment, the intelligent terminal is connected to the vehicle-mounted sound box and the earphone at the same time, the playing priority of the earphone and the vehicle-mounted sound box can be inquired according to the table and based on the audio type and the environment information, and the playing priority of the earphone is known to be higher, so that music can be automatically played through the earphone and cannot be played through the vehicle-mounted sound box, and the privacy of the user can be reliably guaranteed not to be disclosed; when a user listens to the same piece of music and gets back to home, the home environment belongs to a private environment, and the intelligent terminal is automatically connected with the household sound box and the earphone, the playing priority of the earphone and the household sound box can be inquired according to the table and the audio type and the environment information, so that the playing priority of the household sound box is high, the music can be automatically played through the household sound box without being played through the earphone, and the hearing experience of the user can be improved.
Step S15: and playing the audio data through the target playing equipment.
In this embodiment, when the intelligent terminal and the target playing device are in the same apparatus, the target playing device may acquire and play the audio data; when the intelligent terminal and the target playing device are in a wireless communication state, the intelligent terminal can send the audio data to the target playing device, so that the target playing device plays the audio data, and the mode of acquiring and playing the audio data by the target playing device can be determined based on actual requirements.
In order to more clearly understand the content of the present embodiment, the following describes the content of the present embodiment by exemplifying an example: the audio of the audio data is music (non-private audio), the environment where the intelligent terminal is located comprises three audio playing devices, the three audio playing devices comprise a first sound box, a second sound box and an earphone, the first sound box is located in a living room (non-private environment), the second sound box is located in a bedroom (private environment), the playing priority of the first sound box is a third priority, the playing priority of the second sound box is a second priority, and the playing priority of the earphone is the first priority under the conditions that the living environment is the living room (non-private environment) and the audio is conversation (private audio); when the intelligent terminal is in the living room, the playing priority of the earphone is the highest, and the audio data is played through the earphone, so that the situation that a user is in the living room and in a conversation state can be prevented, the intelligent terminal sends the audio data to the first sound box, the first sound box plays the audio data, and conversation audio of the user is played in the living room, therefore, according to the embodiment, the audio playing device with the highest priority can be selected to play the audio data according to the audio type and the environment information, and the conversation audio of the user is prevented from being leaked; under the conditions that the home environment is a bedroom (private environment) and the audio is music (non-private audio), the playing priority of the first sound box is the third priority, the playing priority of the second sound box is the first priority, the playing priority of the earphone is the second priority, when the intelligent terminal is in the bedroom, the playing priority of the second sound box is the highest, and the audio data is played through the second sound box, so that, when the user enters the living room with the intelligent terminal, the audio data can be played through the earphone, when the user enters the bedroom with the intelligent terminal, the audio data can be played through the second sound box, therefore, when the user is in the living room and plays music, the intelligent terminal sends the audio data to the first sound box to enable the first sound box to play the audio data, therefore, the user in the living room can hear the music, and the switching of the audio data meets the preset requirements of the user.
For example, the intelligent terminal can be connected with the vehicle-mounted player and the earphone at the same time, when the intelligent terminal is in a call state, the audio is in conversation type (private audio), the plurality of audio playing devices comprise a vehicle-mounted player and an earphone, the environment information comprises the vehicle-using environment (private environment) of no person taking a car and the vehicle-using environment (non-private environment) of a person taking a car, when the environment information is the environment of the vehicle without a person riding the vehicle and the audio is the conversation audio, the playing priority of the vehicle-mounted player is higher than that of the earphone, when the environment information is the environment for a passenger to use the car and the audio is the call audio, the playing priority of the car-mounted player is lower than that of the earphone, therefore, when a passenger rides in the vehicle, the audio data of the call can be played through the earphone, and when no passenger rides in the vehicle, the audio data of the call can be played through the vehicle-mounted player. The detection device may be disposed in the vehicle, and the detection device is configured to detect whether a passenger is in the vehicle, and may further determine whether a passenger is in the vehicle through a user gesture, where a manner of detecting whether a passenger is in the vehicle is not particularly limited.
In some embodiments, the user may further cause the playing device to play the audio data by controlling the playing device in real time, for example, pressing a playing key of the playing device, selecting a target playing device on an interface of the intelligent terminal, and the like.
In this embodiment, through the implementation of the above steps S11 to S15, when the smart terminal has a target playback device selected from multiple playback devices to play back audio data, the audio type of the audio data and the environment information where the smart terminal is located are obtained, the playback priorities of the multiple playback devices are obtained under the conditions of the audio type and the environment information, and the target playback device is determined according to the playback priorities, so that the target playback device plays back the audio data, and thus the target playback device can be adaptively selected based on the environment and the audio data of the smart terminal, so that the effect of playing back the audio data meets the user expectation, and meanwhile, when the environment and the audio data where the smart terminal is located change, the selected target playback device also changes correspondingly, and the audio data can be played back through the target playback device all the time, so as to avoid that after the environment and the audio data where the smart terminal is located change, the user is required to manually select the target playing device, so that the convenience of selecting the target playing device by the user is further improved.
The embodiment of the present application further provides an audio playing method, where the audio playing method is applied to an intelligent terminal, and the audio playing method may include the following steps S21 to S25. The audio playing method provided in this embodiment may include the same or similar steps as those in the above embodiments, and for the execution of the same or similar steps, reference may be made to the foregoing description, and the description is not repeated.
Step S21: and acquiring the audio type of the audio data to be played.
In order to be able to acquire the audio type, the audio type may be determined based on a signal source of the audio data, and further, as an implementation manner of this embodiment, as shown in fig. 3, the above step S21 may include the following steps S211 to S212.
Step S211: and acquiring a signal source of the audio data generated by the intelligent terminal, wherein the signal source is used for representing the data source of the audio data.
In this embodiment, the signal source may be determined by a program run by the intelligent terminal, and the signal source may be a media file, real-time received voice data, real-time generated voice data, or the like. For example, the program run by the intelligent terminal includes a video player, and can detect whether the video player is in an analysis state, and if so, can acquire data analyzed by the video player and use the data as a signal source.
Step S212: the audio type is determined from the signal source.
In this embodiment, the audio type may be determined based on the format attribute of the signal source. The format attribute of the signal source and the audio type can be in one-to-one correspondence. 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.
Figure BDA0003081446500000071
Figure BDA0003081446500000081
Watch (2)
In this embodiment, through the implementation of the above steps S211 to S212, a 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.
Step S22: and acquiring environment information of the environment where the intelligent terminal is located.
In order to be able to acquire the environment information, the environment information may be determined based on the device attribute of the audio playing device, and further, as an implementation manner of this embodiment, as shown in fig. 4, the above step S22 may include the following steps S221 to S222.
Step S221: and acquiring audio playing equipment which establishes communication connection with the intelligent terminal.
In this embodiment, the audio playing device that establishes a communication connection with the intelligent terminal may include a device that directly establishes a communication connection with the intelligent terminal, and may also include a device that indirectly establishes a communication connection with the intelligent terminal. For example, the intelligent terminal and the audio playing device may be respectively in communication connection with the server, and the intelligent terminal may be indirectly connected with the audio playing device through the server.
Step S222: and acquiring the equipment attribute of the audio playing equipment.
In this embodiment, the device attribute may include position information of the audio playing device, control information received by the audio playing device, a binding relationship between the audio playing device and other devices, and the like. The position information can be used for representing the position of the audio playing device, and a positioning device can be arranged on the audio playing device, so that the position of the audio playing device can be obtained. The control information may be used to represent an instruction received by the audio playing device, where the instruction may be an instruction formed by a user operating the intelligent terminal or the audio playing device, for example, when the audio playing device is provided with a button for generating the instruction, and when the user presses the button, a corresponding instruction may be generated. The binding relationship can be regarded as a connection relationship between the audio playing device and a vehicle machine, a notebook computer and the like of a vehicle.
Step S223: the environment information is determined according to the device attributes.
In this embodiment, the environment in which the smart terminal is located may be determined based on the device attribute.
In some embodiments, when the device attribute includes location information, a distance between the audio playback device and a preset target location may be determined based on the location information, so as to determine the environment information according to the distance. For example, the target position may be a center position of a bedroom, a distance between the position of the audio playing device and the center position may be calculated, if the distance is smaller than a preset value, it may be determined that the audio playing device establishing communication connection with the intelligent terminal is located in the bedroom, it is determined that an environment where the intelligent terminal is located is a home environment, and the home environment may be regarded as a non-private environment.
In some embodiments, when the device attribute includes control information, the user intention may be determined based on the control information, thereby determining the environmental information according to the user intention. For example, when the control information may be an instruction for characterizing answering of an incoming call notification, it may be determined that the user intends to communicate with another person according to the instruction, and it may be determined that the environment where the intelligent terminal is located is a privacy environment according to the user intention.
In some embodiments, when the device property includes a binding relationship, a device included in an environment where the smart terminal is located may be determined according to the binding relationship, and the environment where the smart terminal is located may be determined based on the device. For example, when it is determined that the audio playing device is connected to the vehicle machine according to the binding relationship, it may be determined that the environment where the intelligent terminal is located is a vehicle using environment based on the vehicle machine, and on the basis of the vehicle using environment, if the vehicle is in a passenger state, the current environment may be regarded as a private environment, and if the vehicle is in a passenger-free state, the current environment may be regarded as a non-private environment.
In this embodiment, through the implementation of the above steps S221 to S223, the environment information where the smart terminal is located can be obtained based on the association between the device attribute and the environment.
Step S23: and acquiring playing priorities corresponding to a plurality of playing devices according to the audio type and the environmental information, wherein the plurality of playing devices comprise intelligent terminals and audio playing devices in communication connection with the intelligent terminals.
In order to make the obtained target playback device more consistent with the expectation of the user, it may be determined that the manner in which the target playback device obtains the playback priority based on the audio type of the audio data and the playback priority of the playback device is substantially the same as the manner in which the playback priority is obtained in step S12, and details of the manner in which the playback priority is obtained are omitted here.
Step S24: and determining a target playing device in the plurality of playing devices according to the playing priority.
Further, the above step S24 may include the following step S241.
Step S241: and acquiring a corresponding playing priority according to the audio type, and determining the playing equipment corresponding to the playing priority as target playing equipment.
In this embodiment, the audio type may be previously corresponding to the playing priority, and then the playing device corresponding to the playing priority may be obtained.
In this embodiment, through the implementation of the above steps S231 to S232 and S241, the audio types and the playing priorities under different scenes may be set in advance, so that when the audio data is played, a target playing device corresponding to the type of the audio data and the environment information may be selected to play the audio data, for example, when the audio type is a private audio, a playing priority corresponding to the private audio may be selected, and the playing device corresponding to the playing priority may play the audio data of which the audio type is the private type under the current conditions of the audio type and the environment information, so as to avoid the leakage of the private information.
Step S25: and playing the audio data through the target playing equipment.
The embodiment of the present application further provides an audio playing method, where the audio playing method is applied to an intelligent terminal, and the audio playing method may include the following steps S31 to S35. The audio playing method provided in this embodiment may include the same or similar steps as those in the above embodiments, and for the execution of the same or similar steps, reference may be made to the foregoing description, and the description is not repeated.
Step S31: and acquiring the audio type of the audio data to be played.
Step S32: and acquiring environment information of the environment where the intelligent terminal is located.
Step S33: and acquiring playing priorities corresponding to a plurality of playing devices according to the audio type and the environmental information, wherein the plurality of playing devices comprise intelligent terminals and audio playing devices in communication connection with the intelligent terminals.
Step S34: and determining a target playing device in the plurality of playing devices according to the playing priority.
As shown in fig. 5, the step S34 may include the following steps S341 to S342 in order to avoid the situation that the target playback device cannot be accurately selected due to the fact that the number of playback devices is multiple, and the playback priorities of multiple playback devices are the same.
Step S341: if the playing priorities of at least two audio playing devices in the multiple playing devices are consistent, an operation instruction is obtained, and the operation instruction is used for determining a target playing device in the audio playing devices with consistent playing priorities.
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 intelligent terminal based on an operation of a user, and the operation instruction may be automatically generated according to a preset rule when it is known that the playing priorities of at least two audio playing devices are consistent, for example, when it is detected that the playing priorities of some two audio playing devices are the highest and the same, the intelligent terminal may automatically generate the operation instruction, and the instruction may designate an audio playing device with the highest use frequency in a past preset time (for example, within a week and a month) of the two audio playing devices as the target playing device, or designate an audio playing device used last time as the target playing device, where a manner of generating the operation instruction is not specifically limited.
Step S342: and determining the target playing equipment according to the operation instruction.
In this embodiment, the target playback device may be determined in a corresponding manner based on the type of the operation instruction. Further, as shown in fig. 6, the above step S342 may include the following steps S3421 to S3423.
Step S3421: and transmitting a first signal carrying a transmission time stamp according to the operation instruction.
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 a user on an interface of the intelligent terminal, and may also be an action instruction triggered automatically. Additionally, the transmission time stamp may be used to characterize the transmission time instant 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 particularly limited herein.
Step S3422: and receiving feedback information sent by the audio playing device based on the first signal, wherein the feedback information is generated based on the emission timestamp and the moment of receiving the first signal.
Step S3423: and according to the feedback information, determining a target playing device in the audio playing devices with consistent playing priority.
In this embodiment, the feedback information may include a distance between the audio playing device and the intelligent terminal. The audio playing device can obtain the propagation rate of the first signal and the time of receiving the first signal, calculate a difference value between the time of receiving the first signal and the transmission time of transmitting the first signal represented by the transmission timestamp, and calculate a distance between the audio playing device and the intelligent terminal based on the difference value and the propagation rate of the first signal, so as to obtain the feedback information. In some embodiments, when the intelligent terminal determines that the distance between the audio playing device and the intelligent terminal is smaller than the preset distance according to the feedback information, the audio playing device may be used as the target playing device.
In some embodiments, the feedback information may also include target playback device determination instructions. The audio playing device can obtain the propagation rate of the first signal and the time of receiving the first signal, calculate a difference value between the time of receiving the first signal and the transmission time of transmitting the first signal represented by the transmission timestamp, calculate a distance between the audio playing device and the intelligent terminal based on the difference value and the propagation rate of the first signal, and if the distance is smaller than a preset distance, generate a target playing device determination instruction for representing the audio playing device as the target playing device, so as to obtain the feedback information. When the intelligent terminal receives feedback information fed back by the audio playing device, the audio playing device can be determined to be the target playing device based on the target playing device determination instruction.
In this embodiment, through the implementation of the above steps S3421 to S3423, the first signal carrying the transmission timestamp is transmitted, the distance between the audio playing device and the intelligent terminal is calculated by skillfully using the propagation rate of the first signal, and then the target playing device is determined based on the distance.
In order to reduce the occupation of the resources of the audio playing device and reduce the resource allocation requirement of the audio playing device, the target playing device may be determined through the calculation of the intelligent terminal without performing the calculation at the audio playing device, and further, as an implementation manner of this embodiment, as shown in fig. 7, the step S3423 may include the following steps S41 to S43.
Step S41: and transmitting a first signal carrying a transmission time stamp according to the operation instruction.
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 a user on an interface of the intelligent terminal, and may also be an action instruction triggered automatically. Additionally, the transmission time stamp may be used to characterize the transmission time instant 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 particularly limited herein.
Step S42: and receiving a second signal sent by the audio playing device based on the first signal, wherein the second signal comprises a receiving time stamp of the first signal received by the audio playing device.
In the present embodiment, the second signal may be an ultrasonic signal, an electromagnetic wave signal, an optical signal, or the like, and the type of the first signal is not particularly limited herein. The reception timestamp may be used to characterize the moment in time at which the first signal was received by the audio playback device.
Step S43: and determining a target playing device in the audio playing devices with consistent playing priority according to the first signal and the second signal.
The time difference of the first signal transmitted from the intelligent terminal to the audio playing device can be calculated according to the transmitting time stamp and the receiving time stamp, the distance between the audio playing device and the intelligent terminal is calculated based on the time difference, and whether the audio playing device is the target playing device or not is determined based on the distance. Further, as an implementation manner of the present embodiment, as shown in fig. 8, the above step S43 may include the following steps S431 to S433.
Step S431: the propagation rate of the first signal is obtained.
In this embodiment, when the first signal is an ultrasonic signal, the propagation velocity of the ultrasonic wave in the air can be acquired; when the first signal is an electromagnetic wave signal, the propagation rate of the electromagnetic wave in the air can be acquired; when the first signal is an optical signal, the propagation velocity of light in the air can be obtained, and thus the propagation velocity of the first signal can be obtained.
Step S432: and acquiring the equipment distance between the intelligent terminal and the audio playing equipment according to the transmitting time stamp, the receiving time stamp and the propagation rate.
In this embodiment, a time difference of the first signal propagating from the intelligent terminal to the audio playing device may be calculated based on the transmission time stamp and the reception time stamp, and a device distance between the intelligent terminal and the audio playing device may be calculated based on the time difference and the propagation rate, and thus, the device distances to each audio playing device and the intelligent terminal may be calculated respectively.
Step S433: and determining target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance.
In this embodiment, the device distances between the audio playing devices and the intelligent terminal may be compared, the audio playing device with the smallest device distance is used as the target playing device, the device distances between the audio playing devices and the intelligent terminal may also be compared with the preset device distance, and the audio playing device corresponding to the device distance smaller than the preset device distance is used as the target playing device.
In this embodiment, the target playing device may be determined based on the device distance between the intelligent terminal and the audio playing device, so that a situation that when there is a match between the playing priorities of at least two audio playing devices, the target playing device cannot be obtained, and audio data cannot be played is prevented, and thus the target playing device is determined through a non-sensory operation.
Further, in order to select the target playback device more accurately through a non-sensory operation, as an implementation manner of this embodiment, as shown in fig. 9, 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.
Step S4331: a spacing between the first signal receiver and the second signal receiver is obtained.
In the present embodiment, the signal type received by the first signal receiver and the second receiver should coincide 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 can be acquired in advance and stored in a database, and when the distance needs to be acquired, the database can be queried.
In this embodiment, a certain distance is provided between the first signal receiver and the second signal receiver, for example, the first signal receiver may be a microphone in one area of the microphone array, and the second signal receiver may be a microphone in another area of the microphone array.
Step S4332: and calculating the relative angle between the intelligent terminal and the audio playing equipment according to the transmitting time stamp, the receiving time stamp and the distance.
In this embodiment, a first distance from the intelligent terminal to the first signal receiver may be calculated according to the transmission timestamp and the reception timestamp, and a second distance from the intelligent terminal to the second signal receiver may be calculated according to the transmission timestamp and the reception timestamp, as shown in fig. 10, a difference between the first distance and the second distance is L, and a distance between the first signal receiver 201 and the second signal receiver 202 is d, so that an included angle θ may be calculated, and since an included angle between a propagation direction of the first signal and a straight line formed by the first signal receiver 201 and the second signal receiver 202 may be calculated according to the included angle θ, the included angle θ may be used to represent a relative angle of the intelligent terminal with respect to the audio playing device. Further, the first signal may be regarded as a parallel signal, and the included angle θ is calculated according to the following formula (1).
Figure BDA0003081446500000121
Step S4333: and determining target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance and the relative angle.
In this embodiment, the device distances between the audio playing devices and the intelligent terminal can be compared, the relative angles and the preset angle ranges are compared, the audio playing device with the minimum device distance and the relative angle within the preset angle ranges is used as the target playing device, the device distances between the audio playing devices and the intelligent terminal can also be compared with the preset device distances, the relative angles and the preset angle ranges are compared, and the audio playing device with the preset angle ranges smaller than the preset device distances and the relative angles within the preset angle ranges is used as the target playing device.
In this embodiment, through the implementation of the above steps S4331 to S4333, the target playing device may be obtained based on the relative angle between the intelligent terminal and the audio playing device and the device distance, and when the intelligent terminal points to the audio playing device according to a specific angle, the pointed audio playing device may play audio data, so that the target playing device is selected by a non-sensory operation, and the convenience of the user for playing the audio data is improved.
Further, as an implementation manner of the present embodiment, as shown in fig. 11, the step S332 may include the following steps S51 to S53.
Step S51: and transmitting a control instruction according to the operation instruction so as to enable the audio playing equipment to transmit a third signal carrying a transmission time stamp.
In this embodiment, the operation instruction may be an instruction for triggering emission of the control instruction, for example, the operation instruction may be a click instruction of a user on an interface of the intelligent terminal, and may also be an action instruction triggered automatically.
In the present embodiment, the third signal may be an ultrasonic signal, an electromagnetic wave signal, an optical signal, or the like, and the type of the third signal is not particularly limited herein. The transmission time stamp may be used to characterize the moment at which the audio playback device transmits the third signal.
Step S52: and receiving a third signal transmitted by the audio playing device, and acquiring a receiving time stamp of the third signal.
In this embodiment, a time difference of the third signal propagating from the audio playing device to the intelligent terminal may be calculated according to the transmitting time stamp and the receiving time stamp, a distance between the audio playing device and the intelligent terminal may be calculated based on the time difference, and whether the audio playing device is the target playing device may be determined based on the distance.
Step S53: and determining the target playing equipment in the audio playing equipment with consistent playing priority according to the transmitting time stamp and the receiving time stamp.
Further, as an implementation manner of the present embodiment, as shown in fig. 12, the above step S53 may include the following steps S531 to S533.
Step S531: the propagation rate of the third signal is obtained.
In this embodiment, when the third signal is an ultrasonic signal, the propagation velocity of the ultrasonic wave in the air can be acquired; when the third signal is an electromagnetic wave signal, the propagation rate of the electromagnetic wave in the air can be acquired; when the third signal is an optical signal, the propagation velocity of light in the air can be obtained, and thus the propagation velocity of the third signal can be obtained.
Step S532: and acquiring the equipment distance between the intelligent terminal and the audio playing equipment according to the transmitting time stamp, the receiving time stamp and the propagation rate.
In this embodiment, a time difference of the third signal propagating from the audio playing device to the intelligent terminal may be calculated based on the transmission time stamp and the reception time stamp, and a device distance between the intelligent terminal and the audio playing device may be calculated based on the time difference and the propagation rate, and thus, the device distances between each audio playing device and the intelligent terminal may be calculated respectively.
Step S533: and determining target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance.
In this embodiment, the device distances between the audio playing devices and the intelligent terminal may be compared, the audio playing device with the smallest device distance is used as the target playing device, the device distances between the audio playing devices and the intelligent terminal may also be compared with the preset device distance, and the audio playing device corresponding to the device distance smaller than the preset device distance is used as the target playing device.
In this embodiment, the target playing device may be determined based on the device distance between the intelligent terminal and the audio playing device, so that a situation that when there is a match between the playing priorities of at least two audio playing devices, the target playing device cannot be obtained, and audio data cannot be played is prevented, and thus the target playing device is determined through a non-sensory operation.
Further, in order to select the target playback device more accurately through a non-sensory operation, as an implementation manner of this embodiment, as shown in fig. 13, 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.
Step S5331: a distance between the first signal receiver and the second signal receiver is obtained.
In this embodiment, the signal type received by the first signal receiver and the second receiver should coincide 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 can be acquired in advance and stored in a database, and when the distance needs to be acquired, the database can be queried.
In this embodiment, a certain distance is provided between the first signal receiver and the second signal receiver, for example, the first signal receiver may be a microphone in one area of the microphone array, and the second signal receiver may be a microphone in another area of the microphone array.
Step S5332: and calculating the relative angle between the intelligent terminal and the audio playing equipment according to the transmitting time stamp, the receiving time stamp and the distance.
In this embodiment, a first distance from the intelligent terminal to the first signal receiver can be calculated according to the transmission timestamp and the reception timestamp, a second distance from the intelligent terminal to the second signal receiver can be calculated according to the transmission timestamp and the reception timestamp, a difference value between the first distance and the second distance is L, and a distance between the first signal receiver and the second signal receiver is d, so that an included angle θ can be calculated. Further, the third signal may be regarded as a parallel signal, and the included angle θ is calculated according to the following formula (1).
Figure BDA0003081446500000131
Step S5333: and determining target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance and the relative angle.
In this embodiment, the device distances between the audio playing devices and the intelligent terminal can be compared, the relative angles and the preset angle ranges are compared, the audio playing device with the minimum device distance and the relative angle within the preset angle ranges is used as the target playing device, the device distances between the audio playing devices and the intelligent terminal can also be compared with the preset device distances, the relative angles and the preset angle ranges are compared, and the audio playing device with the preset angle ranges smaller than the preset device distances and the relative angles within the preset angle ranges is used as the target playing device.
In this embodiment, through the implementation of the steps S5331 to S5333, the target playing device can be obtained based on the relative angle between the intelligent terminal and the audio playing device and the device distance, and when the intelligent terminal points to the audio playing device according to a specific angle, the pointed audio playing device can play audio data, so that the target playing device can be selected through a non-sensory operation, and the convenience of the user for playing the audio data is improved.
Step S35: and playing the audio data through the target playing equipment.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Referring to fig. 14, a block diagram of an audio playing apparatus provided in an embodiment of the present application is shown, where the audio playing apparatus may be applied to an intelligent terminal, and the audio playing apparatus includes an information obtaining module 61, an environment information obtaining module 62, a playing priority obtaining module 63, a target playing device determining module 64, and an audio data playing module 65. The information obtaining module 61 is configured to obtain an audio type of the audio data to be played. The environment information obtaining module 62 is configured to obtain environment information of an environment where the intelligent terminal is located. The playing priority acquiring module 63 is configured to acquire playing priorities corresponding to a plurality of playing devices according to the audio types and the environment information, where the plurality of playing devices include an intelligent terminal and an audio playing device in communication connection with the intelligent terminal. The target playback device determining module 64 is configured to determine a target playback device among the multiple playback devices according to the playback priority. The audio data playing module 65 is used for playing the audio data through the target playing device.
Further, as an implementation manner of this embodiment, the environment information may include a private environment and a non-private environment, the playing priority obtaining module 63 may include an audio type determining unit and a playing priority obtaining unit, and the target playing device determining module 64 may include a first target playing device determining unit. The audio type determining unit is used for determining the audio type of the audio data according to the audio type and the environment information, wherein the audio type comprises private audio and non-private audio. The first target playing device determining unit is used for acquiring a playing priority corresponding to the audio type according to the audio type and determining the playing device corresponding to the playing priority as the target playing device.
Further, as an implementation manner of this embodiment, the information obtaining module 61 may include a data source determining unit and an audio type determining unit. The data source determining unit is used for acquiring a signal source of audio data generated by the intelligent terminal, and the signal source is used for representing a data source of the audio data. The audio type determining unit is used for determining the audio type of the audio data according to the signal source.
Further, as an implementation manner of the present 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 playing device obtaining unit is used for obtaining a playing device which is in communication connection with the intelligent terminal. The device attribute acquiring unit is used for acquiring the device attribute of the playing device. The information determining unit is used for determining the environment information of the environment where the intelligent terminal is located according to the device attributes.
Further, as an implementation manner of this embodiment, the target playback device determination module 64 may further include an operation instruction acquisition unit and a second target playback device determination unit. The operation instruction obtaining unit is used for obtaining an operation instruction if the playing priorities of at least two audio playing devices in the multiple playing devices are consistent, and the operation instruction is used for determining a target playing device in the audio playing devices with consistent playing priorities. The second target playing device determining unit is used for determining the target playing device according to the operation instruction.
Further, as an implementation manner of this embodiment, the second target playback device determination unit may include a first signal transmission subunit, a feedback information reception subunit, and a first target playback device determination subunit. The first signal sending subunit is configured to send a first signal carrying a sending timestamp according to the operation instruction. The feedback information receiving subunit is configured to receive feedback information sent by the audio playback device based on the first signal, where the feedback information is generated based on the transmission timestamp and a time at which the first signal is received. The first target playing device determining subunit is configured to determine, according to the feedback information, a target playing device among the audio playing devices with the consistent playing priority.
Further, as an implementation manner of this embodiment, the second target playback device determining 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 for transmitting a first signal carrying a transmitting time stamp according to the operation instruction. The first receiving subunit is configured to receive a second signal sent by the audio playback device based on the first signal, where the second signal includes a receiving timestamp for the audio playback device to receive the first signal. The first target playing device subunit is used for determining a target playing device in the audio playing devices with consistent playing priority according to the first signal and the second signal.
Further, as an implementation manner of this embodiment, the first target playback device sub-unit may include a first transmission rate obtaining sub-unit, a first device distance obtaining sub-unit, and a first determining sub-unit. The first propagation rate obtaining subunit is configured to obtain a propagation rate of the first signal. The first equipment distance obtaining subunit is used for obtaining the equipment distance between the intelligent terminal and the audio playing equipment according to the transmitting time stamp, the receiving time stamp and the propagation rate. The first determining subunit is configured to determine, according to the device distance, a target playback device among the audio playback devices with the same playback priority.
Further, as an implementation manner of the present embodiment, the audio playing device is provided with a first signal receiver and a second signal receiver; the first determining subunit may include a first pitch acquiring subunit, a first relative angle acquiring subunit, and a first target determining subunit. The first distance acquiring subunit is used for acquiring the distance between the first signal receiver and the second signal receiver. The first relative angle acquisition subunit is used for calculating the relative angle between the intelligent terminal and the audio playing device according to the transmitting time stamp, the receiving time stamp and the distance. The first target determining subunit is configured to determine, according to the device distance and the relative angle, a target playback device among the audio playback devices with the same playback priority.
Further, as an implementation manner of this embodiment, the second target playback device determining unit may include a third signal transmitting subunit, a second receiving subunit, and a second target playback device subunit. The third signal sending subunit is configured to send a control instruction according to the operation instruction, so that the audio playing device sends a third signal carrying a sending timestamp. The second receiving subunit is configured to receive a third signal transmitted by the audio playback device, and acquire a receiving timestamp of receiving the third signal. And the second target playing device subunit is used for determining the target playing device in the audio playing devices with the consistent playing priority according to the transmitting time stamp and the receiving time stamp.
Further, as an implementation manner of this embodiment, the second target playing device sub-unit may include a second propagation rate obtaining sub-unit, a second device distance obtaining sub-unit, and a second determining sub-unit. The second propagation rate obtaining subunit is configured to obtain a propagation rate of the third signal. And the second equipment distance acquisition subunit is used for acquiring the equipment distance between the intelligent terminal and the audio playing equipment according to the transmitting time stamp, the receiving time stamp and the propagation rate. The second determining subunit is configured to determine, according to the device distance, a target playback device among the audio playback devices with the same playback priority.
Further, as an implementation manner of this embodiment, the intelligent terminal is provided with a first signal receiver and a second signal receiver; the second determination subunit may include a second pitch acquisition subunit, a second relative angle acquisition subunit, and a second target determination subunit. The second distance acquiring subunit is used for acquiring the distance between the first signal receiver and the second signal receiver. And the second relative angle acquisition subunit is used for calculating the relative angle between the intelligent terminal and the audio playing equipment according to the transmitting time stamp, the receiving time stamp and the distance. The second target determination subunit is used for determining target playing devices in the audio playing devices with consistent playing priorities according to the device distance and the relative angle.
In addition, each functional module and functional unit in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The modules and units in the integrated audio playing device can be realized in a hardware form, and can also be realized in a software functional module form.
Referring to fig. 15, an electronic device 800 according to an embodiment of the present application is shown, which includes 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, the one or more programs configured to perform the methods described above. Further, electronic device 800 may include processor 810, communication module 820, memory 830, and a bus. The processor 810, the communication module 820 and the memory 830 are connected to each other through a bus and perform communication with each other. The bus may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. Wherein:
and a memory 830 for storing programs. In particular, the memory 830 may be used to store software programs as well as various data. The memory 830 may mainly include a program storage area and a data storage area, wherein the program storage area may store an application program required to operate at least one function and may include program codes including computer operating instructions. In addition to storing programs, the memory 830 may temporarily store messages or the like that the communication module 820 needs to send. Memory 830 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 810 is configured to execute programs stored in the memory 830. The program, when executed by a processor, implements the steps of the audio playback method of the embodiments described above.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the audio playing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods of the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (15)

1. An audio playing method is applied to an intelligent terminal, and the audio playing method comprises the following steps:
acquiring the audio type of audio data to be played;
acquiring environment information of the environment where the intelligent terminal is located;
acquiring playing priorities corresponding to a plurality of playing devices according to the audio type and the environment information, wherein the plurality of playing devices comprise the intelligent terminal and audio playing devices in communication connection with the intelligent terminal;
determining a target playing device in the plurality of playing devices according to the playing priority; and
and playing the audio data through the target playing equipment.
2. The audio playback method according to claim 1, wherein the environment information includes a private environment and a non-private environment; the audio types include private audio and non-private audio;
the determining a target playback device among the plurality of playback devices according to the playback priority includes: and acquiring a playing priority corresponding to the audio type according to the audio type and the environment information, and determining the playing equipment corresponding to the playing priority as target playing equipment.
3. The audio playing method according to claim 1, wherein the obtaining the audio type of the audio data to be played comprises:
acquiring a signal source for generating the audio data by the intelligent terminal, wherein the signal source is used for representing a data source of the audio data; and
and determining the audio type of the audio data according to the signal source.
4. The audio playing method according to claim 1, wherein the obtaining of the environment information of the environment where the intelligent terminal is located comprises:
acquiring audio playing equipment which establishes communication connection with the intelligent terminal;
acquiring the equipment attribute of the audio playing equipment; and
and determining the environment information of the environment where the intelligent terminal is located according to the equipment attribute.
5. The audio playing method according to any one of claims 1 to 4, wherein said determining a target playing device among a plurality of said playing devices according to said playing priority comprises:
if the playing priorities of at least two audio playing devices in the plurality of playing devices are consistent, acquiring an operation instruction, wherein the operation instruction is used for determining a target playing device in the audio playing devices with consistent playing priorities; and
and determining the target playing equipment according to the operation instruction.
6. The audio playing method according to claim 5, wherein the determining the target playing device according to the operation instruction comprises:
transmitting a first signal carrying a transmission time stamp according to the operation instruction;
receiving feedback information sent by the audio playing device based on the first signal, wherein the feedback information is generated based on the emission timestamp and the time of receiving the first signal; and
and according to the feedback information, determining target playing equipment in the audio playing equipment with consistent playing priority.
7. The audio playing method according to claim 5, wherein the determining the target playing device according to the operation instruction comprises:
transmitting a first signal carrying a transmission time stamp according to the operation instruction;
receiving a second signal sent by the audio playback device based on the first signal, the second signal including a reception timestamp at which the audio playback device received the first signal; and
and determining target playing equipment in the audio playing equipment with consistent playing priority according to the first signal and the second signal.
8. The audio playing method according to claim 7, wherein said determining, according to the first signal and the second signal, a target playing device among audio playing devices with consistent playing priorities comprises:
acquiring the propagation rate of the first signal;
acquiring the equipment distance between the intelligent terminal and the audio playing equipment according to the transmitting timestamp, the receiving timestamp and the propagation rate; and
and determining target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance.
9. The audio playback method according to claim 8, wherein the audio playback device is provided with a first signal receiver and a second signal receiver; the determining the target playing device in the audio playing devices with consistent playing priority according to the device distance comprises:
acquiring a distance between the first signal receiver and the second signal receiver;
calculating the relative angle between the intelligent terminal and the audio playing equipment according to the transmitting timestamp, the receiving timestamp and the distance; and
and determining target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance and the relative angle.
10. The audio playing method according to claim 5, wherein the determining the target playing device according to the operation instruction comprises:
transmitting a control instruction according to the operation instruction so as to enable the audio playing equipment to transmit a third signal carrying a transmission time stamp;
receiving the third signal transmitted by the audio playing device and acquiring a receiving timestamp for receiving the third signal; and
and determining the target playing equipment in the audio playing equipment with consistent playing priority according to the transmitting time stamp and the receiving time stamp.
11. The audio playing method according to claim 10, wherein said determining the target playing device among the audio playing devices with the consistent playing priority according to the transmission time stamp and the reception time stamp comprises:
acquiring the propagation rate of the third signal;
acquiring the equipment distance between the intelligent terminal and the audio playing equipment according to the transmitting timestamp, the receiving timestamp and the propagation rate; and
and determining the target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance.
12. The audio playing method according to claim 11, wherein the intelligent terminal is provided with a first signal receiver and a second signal receiver; the determining the target playing device in the audio playing devices with the consistent playing priority according to the device distance includes:
acquiring a distance between the first signal receiver and the second signal receiver;
calculating the relative angle between the intelligent terminal and the audio playing equipment according to the transmitting timestamp, the receiving timestamp and the distance; and
and determining the target playing equipment in the audio playing equipment with consistent playing priority according to the equipment distance and the relative angle.
13. The utility model provides an audio playback device which characterized in that is applied to intelligent terminal, audio frequency auto-change over device includes:
the information acquisition module is used for acquiring the audio type of the audio data to be played;
the environment information acquisition module is used for acquiring environment information of the environment where the intelligent terminal is located;
a playing priority obtaining module, configured to obtain, according to the audio type and the environment information, playing priorities corresponding to multiple playing devices, where the multiple playing devices include the intelligent terminal and an audio playing device in communication connection with the intelligent terminal;
a target playing device determining module, configured to determine a target playing device among the plurality of playing devices according to the playing priority; and
and the audio data playing module is used for playing the audio data through the target playing equipment.
14. An electronic device, comprising:
a memory;
one or more processors coupled with the memory;
one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the audio playback method of any of claims 1-12.
15. A computer-readable storage medium having stored thereon program code that can be invoked by a processor to perform the audio playback method according to any one of claims 1 to 12.
CN202110567536.1A 2021-05-24 2021-05-24 Audio playing method and device, electronic equipment and storage medium Pending CN113296728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110567536.1A CN113296728A (en) 2021-05-24 2021-05-24 Audio playing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110567536.1A CN113296728A (en) 2021-05-24 2021-05-24 Audio playing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113296728A true CN113296728A (en) 2021-08-24

Family

ID=77324524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110567536.1A Pending CN113296728A (en) 2021-05-24 2021-05-24 Audio playing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113296728A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791887A (en) * 2021-09-28 2021-12-14 杭州中河电子器材有限公司 Audio task priority management method, device and system
WO2023040517A1 (en) * 2021-09-16 2023-03-23 Oppo广东移动通信有限公司 Audio data playback method, device, electronic equipment, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767970A (en) * 2015-03-20 2015-07-08 上海大唐移动通信设备有限公司 Monitoring method and system based on sound source
CN105704110A (en) * 2014-11-27 2016-06-22 华为终端(东莞)有限公司 Media transmission method, media control method and device
EP3147907A1 (en) * 2015-09-25 2017-03-29 Xiaomi Inc. Control method and apparatus for playing audio
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal
CN107643509A (en) * 2016-07-22 2018-01-30 腾讯科技(深圳)有限公司 Localization method, alignment system and terminal device
CN110168942A (en) * 2017-11-10 2019-08-23 华为技术有限公司 Select method, terminal and the system of bluetooth equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105704110A (en) * 2014-11-27 2016-06-22 华为终端(东莞)有限公司 Media transmission method, media control method and device
CN104767970A (en) * 2015-03-20 2015-07-08 上海大唐移动通信设备有限公司 Monitoring method and system based on sound source
EP3147907A1 (en) * 2015-09-25 2017-03-29 Xiaomi Inc. Control method and apparatus for playing audio
CN107643509A (en) * 2016-07-22 2018-01-30 腾讯科技(深圳)有限公司 Localization method, alignment system and terminal device
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal
CN110168942A (en) * 2017-11-10 2019-08-23 华为技术有限公司 Select method, terminal and the system of bluetooth equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023040517A1 (en) * 2021-09-16 2023-03-23 Oppo广东移动通信有限公司 Audio data playback method, device, electronic equipment, and storage medium
CN113791887A (en) * 2021-09-28 2021-12-14 杭州中河电子器材有限公司 Audio task priority management method, device and system

Similar Documents

Publication Publication Date Title
US20220392481A1 (en) Voice Wakeup Method and System, and Device
CN108449493B (en) Voice call data processing method and device, storage medium and mobile terminal
JP2019159307A (en) Terminal bracket and far-field voice interaction system
EP3350804B1 (en) Collaborative audio processing
CN110870201A (en) Audio signal adjusting method and device, storage medium and terminal
CN113296728A (en) Audio playing method and device, electronic equipment and storage medium
JP2019533915A (en) Incoming call management method and apparatus
JP2019128586A (en) Audio processing method and apparatus, and computer-readable storage medium
KR102447381B1 (en) Method for providing intelligent agent service while calling and electronic device thereof
US11727928B2 (en) Responding method and device, electronic device and storage medium
CN110336892B (en) Multi-device cooperation method and device
CN112334978A (en) Electronic device supporting personalized device connection and method thereof
CN112185388B (en) Speech recognition method, device, equipment and computer readable storage medium
CN108668023A (en) Communication message processing method and device
CN110660403B (en) Audio data processing method, device, equipment and readable storage medium
CN113038337B (en) Audio playing method, wireless earphone and computer readable storage medium
CN109347980A (en) Presentation, the method for pushed information, medium, device and calculating equipment
CN109194998A (en) Data transmission method, device, electronic equipment and computer-readable medium
CN111128159B (en) Method and system for realizing multi-channel message distribution of intelligent loudspeaker box
EP4137932A1 (en) Voice collaborative awakening method and apparatus, electronic device and storage medium
US11050499B1 (en) Audience response collection and analysis
CN111556406B (en) Audio processing method, audio processing device and earphone
CN108234764A (en) Display methods, device and the terminal of terminal
CN108900706B (en) Call voice adjustment method and mobile terminal
CN113066504A (en) Audio transmission method, device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination