CN116798470A - Audio playing method and device and electronic equipment - Google Patents

Audio playing method and device and electronic equipment Download PDF

Info

Publication number
CN116798470A
CN116798470A CN202210250227.6A CN202210250227A CN116798470A CN 116798470 A CN116798470 A CN 116798470A CN 202210250227 A CN202210250227 A CN 202210250227A CN 116798470 A CN116798470 A CN 116798470A
Authority
CN
China
Prior art keywords
user
head
sound source
activity
audio
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
CN202210250227.6A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210250227.6A priority Critical patent/CN116798470A/en
Publication of CN116798470A publication Critical patent/CN116798470A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/16Storage of analogue signals in digital stores using an arrangement comprising analogue/digital [A/D] converters, digital memories and digital/analogue [D/A] converters 

Landscapes

  • Telephone Function (AREA)

Abstract

The application is applicable to the technical field of multimedia, and provides an audio playing method, an audio playing device and electronic equipment, wherein the method comprises the following steps: controlling the simulated sound source to move on a preset sound surrounding track so as to prompt a user to move the neck according to the sound surrounding track; the simulated sound source is obtained by simulation through loudspeakers positioned at two sides of the ear of the user; collecting head activity information of the user in the process that the simulated sound source moves on the sound surrounding track; a scoring report is generated based on the head activity information and the sound surround trajectory. According to the technical scheme provided by the application, a user does not need to watch the screen at any time, but can move towards a designated direction and a designated track according to the relative position relation between the simulated sound source and the user, so that the operation difficulty of the user is reduced, the operation of the neck movement is more flexible, and the use experience of the user is improved.

Description

Audio playing method and device and electronic equipment
Technical Field
The application belongs to the technical field of multimedia, and particularly relates to an audio playing method and device and electronic equipment.
Background
Along with the continuous improvement of the living standard of people, the attention degree of users to the physical health is also continuously improved. In order to reasonably develop stretching exercises during rest, a user can play corresponding activity exercise videos, such as neck activity videos, through a mobile phone and perform corresponding activity exercises along with the content of the activity exercise demonstration videos.
However, in the existing multimedia playing technology, when a user needs to exercise activities, the user often needs to pay attention to the demonstration video of the screen at all times, and particularly when the user needs to exercise the neck, the user cannot exercise the neck sufficiently due to the fact that the user needs to exercise the neck by paying attention to the video content at all times, so that the effect of the neck exercise is greatly reduced, and the operation difficulty is high.
Disclosure of Invention
The embodiment of the application provides an audio playing method, an audio playing device, electronic equipment and a computer readable storage medium, which can solve the problems that when a user needs to exercise activities, the user always needs to pay attention to demonstration videos of a screen at all times, and particularly when the neck needs to be subjected to stretching activities, the user cannot fully exercise the neck when paying attention to video contents at all times, so that the effect of the neck stretching activities is greatly reduced, and the operation difficulty is high.
In a first aspect, an embodiment of the present application provides a method for playing audio, including:
controlling the simulated sound source to move on a preset sound surrounding track so as to prompt a user to move the neck according to the sound surrounding track; the simulated sound source is obtained by simulation through loudspeakers positioned at two sides of the ear of the user;
collecting head activity information of the user in the process that the simulated sound source moves on the sound surrounding track;
a scoring report is generated based on the head activity information and the sound surround trajectory.
The embodiment of the application has the following beneficial effects: corresponding speakers are configured on two sides of ears of a user, so that a simulated sound source is obtained through simulation based on binaural effects, the simulated sound source is controlled to move on a preset sound surrounding track, the purpose of prompting the user to conduct neck activities is achieved, in the process of moving the neck of the user, namely, the simulated sound source moves on the sound surrounding track, head activity information of the user is collected, finally, matching is conducted according to the head activity information and the sound surrounding track, evaluation scores of the neck activities of the user are obtained, and the purpose of screen-free guiding activities is achieved. Compared with the existing multimedia playing technology, the embodiment of the application can simulate the corresponding simulated sound source through the binaural effect, achieves the purpose of guiding the activities of the user by controlling the simulated sound source to perform surrounding movement, does not need the user to stare at the screen at any time, but can move towards the appointed direction and the appointed track according to the relative position relation between the simulated sound source and the user, thereby reducing the operation difficulty of the user, enabling the operation of the neck activity to be more flexible and improving the use experience of the user.
In a possible implementation manner of the first aspect, the collecting the head activity information of the user during the moving of the simulated sound source on the sound surrounding track includes:
controlling the simulated sound source to move to an Nth key position point on the sound surrounding track; the N is a positive integer;
collecting the head pose of the user when the simulated sound source moves to the Nth key position point;
determining target audio of each loudspeaker according to the head pose and the Nth key position point; the target audio is used for an audio segment in the process that the simulated sound source moves from the Nth key position point to the (n+1) th key position point;
increasing the value of N, and if the increased value of N is smaller than the total number of key position points on the sound surrounding track, returning to execute the operation of collecting the head pose of the user after the simulated sound source moves to the Nth key position point;
and if the value of N after the addition is greater than or equal to the total number, generating the head activity information based on all the head pose.
In a possible implementation manner of the first aspect, the determining, according to the head pose and the nth key position point, the target audio of each speaker includes:
Determining a first distance value between the head of the user and the Nth key position point according to the initial pose of the user and the Nth key position point when the simulated sound source moves to the Nth key position point;
determining a second distance value between the head pose and the nth key position point;
determining a first audio segment according to the first distance value and the second distance value; the first audio segment is used for simulating the relative position change between the head of the user and the simulated sound source;
determining a second audio segment according to the nth key position point, the (n+1) th key position point and the head pose; the second audio segment is used for simulating the movement of the simulated audio from the Nth key position point to the (n+1) th key position point;
and generating the target audio according to the first audio piece and the second audio piece.
In a possible implementation manner of the first aspect, the generating a scoring report based on the head activity information and the sound surrounding track includes:
generating a head movement track of the user in the process of moving the simulated sound source on the sound surrounding track according to a plurality of head gestures in the head movement information;
Calculating the track similarity between the head movement track and the sound surrounding track;
determining the activity range of the user according to the head movement track;
and generating the scoring report according to the track similarity and the activity range.
In a possible implementation manner of the first aspect, the selecting the application program with the start confidence coefficient greater than the preset confidence coefficient threshold as a candidate application, and determining the background running application set based on the candidate application includes:
importing all the candidate applications and the running environment information into decision algorithms corresponding to all the running environment dimensions, and calculating the first application corresponding to the running environment dimensions;
and generating the background running application set based on the first application corresponding to all the running environment dimensions.
In a possible implementation manner of the first aspect, after the generating a scoring report based on the head activity information and the sound surrounding track, the method further includes:
determining the actual activity amplitude of the user in a plurality of activity directions according to the activity range;
if the actual activity amplitude corresponding to any activity direction is smaller than a preset amplitude threshold, identifying any activity direction as a reinforced activity direction;
Generating neck exercise cues based on all of the reinforcement activity directions.
In a possible implementation manner of the first aspect, before the controlling the simulated sound source to move on the preset sound surrounding track to prompt the user to move the neck according to the sound surrounding track, the method further includes:
playing the Mth course prompt information based on a preset course prompt list; the initial value of M is 1;
acquiring actual motion information of the user based on the Mth course prompt information;
if the actual motion information is matched with the standard motion information associated with the Mth course prompt information, outputting a preset success prompt tone and increasing the value of M;
if the value of M is smaller than or equal to the total number of the course prompt messages in the course prompt list, returning to execute the preset course prompt list and playing the Mth course prompt message;
and if the value of M is larger than the total number of the course prompt messages, outputting a preset completion prompt tone.
In one possible implementation manner of the first aspect, the method is applied to a head-mounted device; the headset includes an earpiece and an inertial sensor; the earphone part comprises loudspeakers at two sides of the ear; the inertial sensor is used for acquiring the head activity information.
In a second aspect, an embodiment of the present application provides an audio playing device, including:
the simulated sound source moving unit is used for controlling the simulated sound source to move on a preset sound surrounding track so as to prompt a user to move the neck according to the sound surrounding track; the simulated sound source is obtained by simulation through loudspeakers positioned at two sides of the ear of the user;
the head activity information acquisition unit is used for acquiring the head activity information of the user in the process that the simulated sound source moves on the sound surrounding track;
and a score report output unit for generating a score report based on the head activity information and the sound surrounding track.
In a possible implementation manner of the second aspect, the head activity information acquisition unit includes:
the key position point moving unit is used for controlling the simulated sound source to move to an Nth key position point on the sound surrounding track; the N is a positive integer;
the head pose determining unit is used for collecting the head pose of the user when the simulated sound source moves to the Nth key position point;
a target audio determining unit, configured to determine target audio of each speaker according to the head pose and an nth key position point; the target audio is used for an audio segment in the process that the simulated sound source moves from the Nth key position point to the (n+1) th key position point;
The circulating unit is used for increasing the value of N, and if the value of N after the increase is smaller than the total number of key position points on the sound surrounding track, the operation of collecting the head pose of the user after the simulated sound source moves to the Nth key position point is carried out;
and the head activity information packaging unit is used for generating the head activity information based on all the head pose if the value of N after the addition is greater than or equal to the total number.
In a possible implementation manner of the second aspect, the target audio determining unit includes:
a first distance value determining unit, configured to determine a first distance value between the head of the user and the nth key position point according to the initial pose of the user and the nth key position point when the simulated sound source moves to the nth key position point;
a second distance value determining unit for determining a second distance value between the head pose and the nth key position point;
a first audio segment determining unit, configured to determine a first audio segment according to the first distance value and the second distance value; the first audio segment is used for simulating the relative position change between the head of the user and the simulated sound source;
A second audio segment determining unit, configured to determine a second audio segment according to the nth key position point, the n+1th key position point, and the head pose; the second audio segment is used for simulating the movement of the simulated audio from the Nth key position point to the (n+1) th key position point;
and the target audio packaging unit is used for generating the target audio according to the first audio piece and the second audio piece.
In one possible implementation manner of the second aspect, the score report output unit includes:
a head motion track generation unit, configured to generate a head motion track of the user during the movement of the simulated sound source on the sound surrounding track according to a plurality of head poses in the head motion information;
a track similarity calculation unit, configured to calculate a track similarity between the head motion track and the sound surrounding track;
a movement range determining unit for determining a movement range of the user according to the head movement track;
and the scoring report generating unit is used for generating the scoring report according to the track similarity and the activity range.
In a possible implementation manner of the second aspect, the audio playing device further includes:
an actual activity amplitude determining unit, configured to determine actual activity amplitudes of the user in a plurality of activity directions according to the activity range;
the strengthening activity direction determining unit is used for identifying any activity direction as a strengthening activity direction if the actual activity amplitude corresponding to the any activity direction is smaller than a preset amplitude threshold value;
and the neck exercise prompting unit is used for generating neck exercise prompting information based on all the strengthening activity directions.
In a possible implementation manner of the second aspect, the audio playing device further includes:
the teaching course prompting unit is used for playing the Mth teaching course prompting information based on a preset teaching course prompting list; the initial value of M is 1;
the actual motion information acquisition unit is used for acquiring the actual motion information of the user based on the Mth course prompt information;
the success prompting sound output unit is used for outputting a preset success prompting sound and increasing the value of M if the actual motion information is matched with the standard motion information associated with the Mth course prompting information;
The return execution unit is used for returning to execute the preset course prompt list and playing the Mth course prompt information if the value of M is smaller than or equal to the total number of the course prompt information in the course prompt list;
and the completion prompting unit is used for outputting a preset completion prompting sound if the value of M is larger than the total number of the course prompting messages.
In one possible implementation manner of the second aspect, the method is applied to a head-mounted device; the headset includes an earpiece and an inertial sensor; the earphone part comprises loudspeakers at two sides of the ear; the inertial sensor is used for acquiring the head activity information.
In a third aspect, an embodiment of the present application provides an electronic device, a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the computer program to implement the method for playing audio in any one of the first aspects.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the method for playing audio according to any one of the first aspects.
In a fifth aspect, an embodiment of the present application provides a computer program product, which when run on an electronic device, causes the electronic device to perform the method for playing audio according to any one of the first aspects.
In a sixth aspect, an embodiment of the present application provides a chip system, including a processor, where the processor is coupled to a memory, and the processor executes a computer program stored in the memory, to implement the audio playing method according to any one of the first aspect.
It will be appreciated that the advantages of the second to sixth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a block diagram of the software architecture of an electronic device according to an embodiment of the application;
FIG. 3 is a schematic diagram of a prior art neck movement process;
FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating an implementation of an audio playback method according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating initiation of a neck relaxing instruction according to one embodiment of the present application;
FIG. 7 is a schematic illustration of selecting an audio file according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating initiation of a neck relaxing instruction provided by another embodiment of the present application;
FIG. 9 is a flowchart illustrating an implementation of an audio playing method according to an embodiment of the present application;
FIG. 10 is a schematic illustration of a tutorial prompt provided in accordance with one embodiment of the application;
fig. 11 is a flowchart of a specific implementation of S502 in an audio playing method according to another embodiment of the present application;
FIG. 12 is a schematic diagram illustrating the division of a sound surround track according to an embodiment of the present application;
FIG. 13 is a schematic diagram of audio segment determination provided by an embodiment of the present application;
FIG. 14 is a schematic view showing a scoring report according to one embodiment of the present application;
fig. 15 is a flowchart of a specific implementation of S503 in a method for playing audio according to another embodiment of the present application;
FIG. 16 is a schematic diagram of a neck exercise reminder provided in an embodiment of the present application;
fig. 17 is a block diagram of an audio playing device according to an embodiment of the present application;
fig. 18 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The audio playing method provided by the embodiment of the application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (augmented reality, AR)/Virtual Reality (VR) devices, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and the like, and particularly can be applied to electronic scales or electronic devices with body detection functions.
For example, the electronic device may be a Station (ST) in a WLAN, may be a cellular telephone, a cordless telephone, a Session initiation protocol (Session InitiationProtocol, SIP) telephone, a wireless local loop (Wireless Local Loop, WLL) station, a personal digital assistant (Personal Digital Assistant, PDA) device, a handheld device having wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a computer, a laptop computer, a handheld communication device, a handheld computing device, and/or other devices for communicating over a wireless system, as well as next generation communication systems, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved public land mobile network (Public Land Mobile Network, PLMN) network, etc.
Fig. 1 shows a schematic structural diagram of an electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information. The display 194 may specifically display the generated detection report, so that the user may view the detection report through the display 194.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1. The display 194 may include a touch panel and other input devices.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A. In particular, the speaker 170A may be configured to output a prompt message for informing the user of the location where contact with the electronic scale is desired.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be provided on the display 194, for example, the electronic device may obtain the weight of the user through the pressure sensor 180A. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software architecture block diagram of an electronic device according to an embodiment of the application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, a An Zhuoyun row (Android run) system layer, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications such as cameras, calendars, maps, WLANs, bluetooth, music, video, short messages, mailboxes, weChat, WPS, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is for providing communication functions of the electronic device. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system layer may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with capturing a photo scene.
When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, time stamp of touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the input event. Taking the touch operation as a touch click operation, taking a control corresponding to the click operation as an example of a control of a camera application icon, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera driver by calling a kernel layer, and captures a still image or video by the camera 193.
Nowadays, health problems are more and more paid attention to, especially in the reasons of increasing life pressure, long-term table-keeping work and computer use, or long-term driving, etc., people keep a single posture for a long time, so that the occurrence probability of cervical spondylosis is easily increased. In order to timely move the neck so as to reduce the occurrence probability of cervical spondylosis, a user can move the neck according to the guidance in the video by watching related videos, and relax the neck. Illustratively, fig. 3 shows a schematic diagram of a prior art neck movement process. Referring to fig. 3, when a user views a guiding video through a handheld electronic device, the user needs to pay attention to a display screen, so that the movement range of the neck of the user is limited, and a better neck relaxing effect cannot be achieved; on the other hand, in the process of moving the neck, the user often hopes to achieve the purpose of relaxing both the spirit and the body, and if the user needs to pay attention to the guiding video appearing in the display screen at any time, the user needs to pay attention to the guiding video, so that the spirit cannot be fully relaxed, and the use experience of the user is further reduced. Therefore, the prior art has the defects of high operation difficulty and poor user experience when stretching the neck.
Embodiment one:
therefore, in order to solve the defects that in the existing guiding process of stretching the neck of a user, the operation difficulty is high and the user experience is poor, the application provides a playing method of audio. The speaker and the electronic device may be connected by a wired communication method or by a wireless communication method.
The electronic device may be a smart phone, a computer, a tablet computer, or the like, in which case the electronic device may be externally connected with a headset component, which may be a wired headset or a wireless headset, and fig. 4 illustrates a schematic structural diagram of the electronic device according to an embodiment of the present application. Referring to fig. 4 (a), the electronic device is a smart phone, where the smart phone may establish communication connection with an earphone component through a bluetooth communication module, or may establish communication connection with an earphone component through a serial interface, and may specifically be determined according to practical situations. Referring to fig. 4 (b), in this embodiment, the speaker may be an external speaker, and at least one external speaker is placed on both sides of the ear of the user, and of course, in order to achieve a better simulation effect, if more than two external speakers are used, the smart phone may establish communication connection with an external device set formed by a plurality of external speakers through bluetooth.
The electronic device may also be a headset device, such as a wireless earphone, a real wireless earphone, a headphone, etc., which is internally configured with two speakers, i.e. two handsets, for example. In this case, the user may wear the head-mounted device to achieve the purpose of neck activity guidance, as shown in (c) of fig. 4, and the user does not need to hold the smart phone, and the head-mounted device may be configured with a processing module to perform the audio playing method provided in this embodiment.
Fig. 5 shows a flowchart of an implementation of an audio playing method according to an embodiment of the present application, which is described in detail below:
in S501, controlling the simulated sound source to move on a preset sound surrounding track so as to prompt the user to move the neck according to the sound surrounding track; the simulated sound source is obtained by simulation through loudspeakers positioned at two sides of the ear of the user.
In this embodiment, in order to enable guidance of the neck activity, the electronic device may simulate to obtain one simulated sound source through two speakers configured. Because of the binaural effect, the sound source position perceived by the user can be controlled by controlling the loudness and frequency of the audio at the two sides of the ears, filtering the directional sound and other operations, and in this case, the electronic device can control the simulated sound source to move around the preset sound track through the principle of the binaural effect.
In one possible implementation manner, the electronic device may respond to a neck relaxing instruction initiated by a user, and perform control to move the simulated sound source on a preset sound surrounding track, so as to prompt the user to move the neck according to the sound surrounding track, that is, initiate a neck relaxing procedure. Illustratively, fig. 6 shows a schematic diagram of initiating a neck relaxing instruction according to an embodiment of the present application. Referring to fig. 6 (a), the electronic device is a smart phone, in which an application 61 for "sports health" is installed, if it is detected that a user clicks the application 61, an operation interface for sports health may be started, as shown in fig. 6 (b), in the operation interface for sports health, a plurality of different functional controls are included, including a functional control 62 for neck relaxation, and if it is detected that the user clicks the functional control 62, it is identified that the user initiates a neck relaxation instruction, and the operation of S501 is performed. Preferably, in order to facilitate the user to select a suitable speaker to perform neck relaxation guiding, after detecting that the user clicks the function control 62, the smart phone may generate a selection interface of an audio device, where the selection interface includes a plurality of selectable audio playing modes, including a local playing mode and an external device playing mode, where when playing the external device, the external device may be displayed through a corresponding device identifier, as shown in (c) in fig. 6, and the selection interface includes a plurality of selectable options respectively: local play 63, freebuds play 64 (i.e. play through wireless bluetooth headset), and outgoing horn play 65, and the user can select a suitable audio device to play audio according to the actual situation.
Further, as another embodiment of the present application, the electronic device may include a plurality of different audio files, each of which may guide audio corresponding to a different neck activity. For example, the activity amplitude, the activity duration and the exercise emphasis point corresponding to different audio files may be different, the electronic device may display a plurality of different audio files, and the user may select an appropriate target file to play according to the actual activity situation. Fig. 7 is a schematic diagram illustrating selection of an audio file according to an embodiment of the present application. Referring to fig. 7 (a), after the user determines the audio device to be used, a selection interface for audio files may be entered, where the selection interface includes a plurality of selectable audio files, respectively: light relaxed track 1, deep relaxed track 2, left focused relaxed track 3, and right focused relaxed track 4, the user can select the corresponding track according to the actual situation, for example, in this embodiment, the user can click on the control corresponding to deep relaxed track 2 and play the audio file, as shown in fig. 7 (b).
It should be noted that, in addition to the manner of selecting the playing files by user definition, the user may also play each audio file in turn according to the preset playing order, for example, after detecting that the user selects the corresponding audio device, the electronic device may directly enter the audio playing interface, i.e. as shown in (b) of fig. 7, and skip the selecting interface of the audio file, i.e. skip (a) of fig. 7, where in this case, the audio playing interface includes a track switching control, i.e. a previous control 71, a next control 72 and a track list viewing control 73, and of course, the audio playing interface further includes a switching mode selecting control 74, where multiple switching modes based on list playing, random playing, and single-track cyclic playing may be selected by the user according to the actual situation.
Fig. 8 shows a schematic diagram of initiation of a neck relaxing instruction according to another embodiment of the present application. The electronic device is a head-mounted device, the head-mounted device comprises a plurality of operation keys, such as a volume increasing key 81, a volume decreasing key 82 and a function key 83, when a user is detected to click the function key 83, the head-mounted device can perform a function selection mode, at the moment, the user can initiate a neck relaxing instruction to the head-mounted device in a voice instruction mode, such as speaking "neck relaxing", the head-mounted device collects voice instructions initiated by the user, extracts keywords contained in the voice instructions, and determines operation instructions corresponding to the keywords based on the keywords. Alternatively, the function key 83 is continuously pressed a predetermined number of times to select the corresponding function.
In one possible implementation, an electronic device may be configured with a plurality of different play modes. Among them, the play modes include, but are not limited to: normal audio play mode and neck relaxing play mode. In the normal audio playing mode, the electronic device plays the audio file according to the original data of each sound track in the audio file. In the neck relaxing mode, the electronic device may adjust the original data of each sound track based on the above-mentioned sound surrounding tracks, so that the simulated sound source in each sound track moves based on the preset sound surrounding track, generate surrounding movement data, and perform the operation of S501 based on the surrounding movement data.
Further, as another embodiment of the present application, fig. 9 shows a flowchart of an implementation of a method for playing audio according to an embodiment of the present application. Referring to fig. 9, compared with the embodiment shown in fig. 5, the embodiment of the present application further includes the following steps before S501, which are specifically described as follows:
further, before the controlling the simulated sound source to move on the preset sound surrounding track to prompt the user to move the neck according to the sound surrounding track, the method further comprises:
in S901, playing an mth course prompt message based on a preset course prompt list; the initial value of M is 1.
In this embodiment, since the neck activity guiding process is only guided by means of audio, the user may not be able to directly know how to perform the neck activity when in first contact, in this case, the electronic device may output corresponding course prompt information according to the preset course prompt list, so as to prompt the user, so that the user can learn how to perform the neck activity following the simulated sound source in the subsequent process conveniently.
For example, the course prompt information may be "please get close to the simulated sound source during the audio playing process", and "sound increase indicates close to the simulated sound source", and "sound decrease indicates far away from the simulated sound source", etc., and the user may determine the correspondence between the change rule of the audio and the relative position of the simulated sound source according to different course prompt information, so as to follow the neck activity subsequently.
In this embodiment, the course hint list may include a plurality of course hint information. The different course prompt messages comprise corresponding prompt orders which are sequentially arranged in the course prompt list. When the electronic equipment plays the prompt information, the electronic equipment can prompt the prompt information in sequence based on the prompt sequence of each information in the course prompt list.
In one possible implementation manner, the electronic device may record the number of times the user performs the neck activity, and if it is detected that the user initiates the neck relaxing instruction for the first time, the operation of S901 may be performed to perform the teaching process before the activity on the user, and after the teaching process is completed, the operation of S501 is performed to perform the neck activity.
In one possible implementation, the course prompt for the user may be initiated when the user first uses the neck activity, and may be performed again when it is detected that the score corresponding to the neck activity for multiple times is low. Specifically, the evaluation report includes an evaluation score of the neck activity, if the evaluation score in the evaluation report of the user for a plurality of times is smaller than a preset score threshold, the user is not able to follow the simulated sound source to perform the activity according to the preset sound surrounding track, and needs to perform the course prompt again, and then the operation of S901 is performed.
In one possible implementation manner, the electronic device may obtain identity information of the user performing the neck activity at this time, for example, through a biometric identification technology such as face recognition, or judge the number of times the user performs the neck activity according to account information such as an account number of the logged-in user, if the number of times of the activity is detected to be 0, it indicates that the user performs the neck activity for the first time, and at this time, the operation of S901 is performed to perform the activity course prompt.
In S902, the actual motion information of the user based on the mth course prompt information is acquired.
In this embodiment, when the electronic device plays the mth course prompt information, the user may be prompted to perform an activity according to the course prompt, and in this case, the electronic device may obtain actual motion information corresponding to the user based on the mth course prompt. The electronic equipment is provided with a motion sensor, and the motion condition of the head of the user can be acquired through the motion sensor, so that corresponding actual motion information is generated based on the motion condition of the head of the user within a preset effective duration. The actual motion information can comprise the motion trail, the motion direction, the motion speed, the motion acceleration and other related information of the head. The information items collected by different course prompt messages may be different, specifically determined according to the course content, that is, the information items contained in the actual motion information corresponding to the different course prompt messages may be different.
In this embodiment, each course prompt information may be associated with corresponding standard motion information, and the electronic device may calculate a matching condition between the standard motion information and the actual motion information, to determine whether the user performs a specified action according to the course prompt information. If the two match, then executing the operation of S903; otherwise, if the two do not match, the operation of S906 is performed.
In one possible implementation manner, the standard motion information includes a corresponding motion feature value, the electronic device may calculate a difference between the motion feature value and an actual motion value in the actual motion information, and if the difference is smaller than a preset deviation threshold, identify that the two motion feature values are matched; otherwise, if the difference value between the motion characteristic value and the actual motion value is greater than or equal to the deviation threshold value, the actual motion information is identified to be not matched with the standard motion information.
In S903, if the actual motion information matches with the standard motion information associated with the mth course alert information, a preset success alert sound is output, and the value of M is increased.
In this embodiment, when detecting that the actual motion information of the user matches with the standard motion information associated with the longer alert information, the electronic device indicates that the user has performed a corresponding action according to the tutorial alert information, and may output a corresponding success alert sound at this time to notify the user that the user may perform the teaching of the next tutorial through the tutorial, so that the value of M may be increased to report the next tutorial alert information in the tutorial alert list.
In S904, if the value of M is less than or equal to the total number of course prompt messages in the course prompt list, the execution is returned to the preset course prompt list, and the mth course prompt message is played.
In S905, if the value of M is greater than the total number of the course prompt messages, a preset completion prompt tone is output.
In this embodiment, if the value of M is smaller than or equal to the total number of the course prompt messages after the value of M is increased, the operation of broadcasting the next course prompt message is returned to be executed until all the course prompt messages in the course list are broadcasted, that is, the value of M is greater than the total number of the course prompt messages, at this time, a corresponding completing prompt sound may be output to prompt the user that the teaching process has been completed, at this time, a corresponding guiding process of the neck activity may be executed, that is, the operation of S501 is executed.
In S906, if the actual motion information does not match the standard motion information associated with the mth course prompt information, outputting a preset failure prompt tone, and returning to execute the operation of playing the mth course prompt information based on the preset course prompt list.
In this embodiment, when detecting that the actual motion information of the user does not match with the standard motion information associated with the course prompt information, the electronic device indicates that the user does not perform the corresponding motion according to the course prompt information, where the user may have a question about the course content and does not understand the action indicated by the course, a failed prompt may be output to prompt the user that the course fails in teaching, and the course prompt is played again, so that the user listens to the course content again and performs the corresponding action.
Illustratively, FIG. 10 shows a schematic diagram of a tutorial prompt provided by an embodiment of the application. Referring to fig. 10 (a), the simulated sound source is located on the left side of the user, and the tutorial prompt message is "moving head, approaching the simulated sound source". At this time, if the user controls the head to swing left, the user approaches the simulated sound source, at this time, the user can be identified that the actual motion information of the user matches with the standard motion information, and a successful prompt tone is output, as shown in (b) of fig. 10, at this time, the next course prompt message can be played; otherwise, if the user controls the head to swing to the right, the user is far away from the simulated sound source, at this time, it can be identified that the actual motion information of the user does not match the standard motion information, and a failed prompt tone is output, and as shown in (c) of fig. 10, the course prompt information is replayed once, that is, "moving the head, approaching the simulated sound source".
In the embodiment of the application, before the user performs the neck relaxing activity, the corresponding course prompt information is played so that the user can move along with the movement of the simulated sound source in the subsequent neck activity process, thereby greatly improving the success rate of the subsequent neck activity and improving the use efficiency.
In S502, head activity information of the user is collected during movement of the simulated sound source on the sound surrounding track.
In this embodiment, in the process of playing the simulated sound source, the simulated sound source moves on the preset sound surrounding track, and the user controls the head to move correspondingly along with the movement of the simulated sound source, so as to determine whether the head movement condition of the user matches with the preset sound surrounding track, the electronic device may acquire the head movement information of the user. The head activity information includes information about the direction, speed, angle, magnitude, etc. of the head activity.
In one possible implementation, the electronic device may establish a communication connection with a distributed camera module, obtain a user activity video including a user's head through the camera module, and locate a face region (i.e., a head region) of the user by performing face recognition on the user activity video, thereby obtaining coordinates of the head region in each frame of video image, and determine head activity information of the head region.
In one possible implementation, the electronic device is in particular a head mounted device comprising a headset assembly and an inertial sensor; the earphone part comprises loudspeakers at two sides of the ear; the inertial sensor is used for acquiring the head activity information. The headset device can be a wireless earphone, a virtual reality VR eyeshade device, a head massager and the like. Wherein the head-mounted device is provided with earphone parts, and each earphone part comprises a corresponding loudspeaker so as to realize control of the simulated sound source to move along the sound surrounding track; the head mounted device also comprises an inertial sensor (Inertial Measurement Unit, IMU) which can be used to obtain the angular acceleration and linear acceleration of the head mounted device to determine movement information of the head mounted device, and since the head mounted device is worn on the head of the user, the movement information of the head mounted device can be regarded as movement information of the head of the user, and the movement of the head is dependent on the neck, the purpose of the movement of the neck can be achieved.
In the embodiment of the application, the earphone part and the IMU are packaged in the head-mounted equipment, and the neck activity of the user is guided by the head-mounted equipment, so that the guiding efficiency can be improved, the neck activity can be completed without the need of holding the equipment by the user, and the operation difficulty of the neck activity is greatly reduced.
Further, as another embodiment of the present application, fig. 11 shows a flowchart for specifically implementing S502 in a method for playing audio according to another embodiment of the present application, and referring to fig. 11, compared with the embodiment described in fig. 5, S502 in the embodiment of the present application specifically includes the following steps, which are specifically described as follows:
in S5021, controlling the simulated sound source to move to an nth key position point on the sound surrounding track; and N is a positive integer.
In this embodiment, when the analog sound source moves on the sound surrounding track, the analog sound source may be divided into a plurality of key position points, where the number of key position points may be determined according to the adjustment accuracy of the audio, or may be determined according to the length of time that the analog sound source stays at each position on the track. If the number of the divided key position points is larger, the response speed of the subsequent user is higher when the head is controlled to move along the sound track; on the contrary, if the number of the divided key position points is smaller, the response speed of the subsequent user when the head is controlled to move along the sound track is slower.
In one possible implementation manner, the electronic device may be configured with a preset separation distance, and a plurality of different key location points are divided on the sound surrounding track based on the separation distance, that is, a distance value between the different key location points is the preset separation distance. Fig. 12 is a schematic diagram illustrating the division of a sound surround track according to an embodiment of the present application. Referring to fig. 12 (a), the sound surrounding track is a circle, but in other implementations, the sound surrounding track may be curved in any shape. The electronic device may divide a plurality of different key location points on the sound surrounding track according to a preset interval distance, where the distance values between the different key location points are the same.
In one possible implementation manner, the electronic device may identify key location points according to the residence time of the simulated sound source at each location, where the simulated sound source may stay at one or more preset key location points in the process of moving around the track, and the electronic device may identify residence time corresponding to each location point on the track, and if the residence time of any location point is greater than a preset time threshold, identify the location point as a key location point. Illustratively, referring to (B) in fig. 12, the duration of stay of the simulated sound source in the position point a is 1s, while not staying in the position point B (i.e., only the position point B is passed, the corresponding stay duration may be determined according to the moving speed of the simulated sound source, for example, the stay duration of all the position points which are passed but not stay may be set to 0.1 s), while the corresponding duration threshold is 0.5s, it may be determined that the stay duration of the position point a is greater than the duration threshold, while the stay duration of the position point B is less than the duration threshold, i.e., the position point a is a key position point, while the position point B is not a key position point.
In this embodiment, the sound surrounding track may be a plane curve or a three-dimensional curve, which is specifically determined according to the neck activity requirement of the user. Therefore, the plurality of key position points may be in the same plane or in different planes.
In S5022, a head pose of the user when the simulated sound source moves to the nth key position point is acquired.
In this embodiment, in order to facilitate the user to feel the relative position change between the head moving process and the simulated sound source, the electronic device may acquire, in real time, the head pose of the user in the process of simulating the movement of the sound source, where the head pose includes two partial parameters, that is, the position of the head and the pose of the head. Because the relative position relation between the simulated sound source and the simulated sound source is not only related to the position of the head, the difference of the head gestures can also influence the distance between the simulated sound source and the ears, so that the relative position relation between the user judgment and the simulated sound source is influenced, and therefore, the electronic equipment can determine the change condition of the head gestures of the user in the process of moving the simulated sound source to the key position point. The electronic equipment can determine the audio content to be played according to the change condition of the head pose, namely the audio content played by the loudspeaker is changed in real time according to the change of the head pose.
In S5023, determining a target audio of each speaker according to the head pose and the nth key position point; the target audio is used for audio segments in the process that the simulated sound source moves from the Nth key position point to the (n+1) th key position point.
In this embodiment, due to the change of the head pose, the relative position between the ears of the user and the simulated sound source is changed, so that in order to improve the simulation effect, the electronic device can determine the audio to be played by each speaker according to the real-time state of the head pose, so that the user can feel the change of the distance between the electronic device and the simulated sound source. Based on the above, the electronic device may determine the target audio to be played according to the relative positional relationship between the head pose and the key position point, and the relative positional relationship between the head pose and the subsequent key point (i.e., the n+1th key position point). In view of the binaural effect and the doppler effect, the loudness and frequency of the sound received by the user may change during the head movement, so the electronic device may determine the frequency change and the loudness change of the audio segment according to the movement speed and the movement distance of the head pose, so that the audio segment is matched with the state of the head movement, thereby simulating and obtaining the change of the relative position between the user and the simulated sound source, and improving the guiding accuracy.
Further, as another embodiment of the present application, the step S5023 may specifically include the following five steps:
step 1: and determining a first distance value between the head of the user and the Nth key position point according to the initial pose of the user and the Nth key position point when the simulated sound source moves to the Nth key position point.
Step 2: a second distance value between the head pose and the nth key position point is determined.
Step 3: determining a first audio segment according to the first distance value and the second distance value; the first audio segment is for simulating a relative change in position between the user's head and the simulated sound source.
Step 4: determining a second audio segment according to the nth key position point, the (n+1) th key position point and the head pose; the second audio segment is for simulating movement of the simulated audio from the nth key location point to the n+1th key location point.
Step 5: and generating the target audio according to the first audio piece and the second audio piece.
In this embodiment, the process of moving the head of the user following the simulated sound source may be divided into two different phases, wherein the first phase is that the user approaches the simulated sound source, and the second phase is that the simulated sound source moves to the next position key point. Based on the method, the electronic equipment can acquire the corresponding initial pose of the head of the user before following the movement of the simulated sound source. The initial pose can be obtained through an IMU of the electronic device, and can also be determined by shooting a video image of the head of the user. The electronic device may determine a first distance value between the first pose of the user's head and the nth key location point according to the first pose. The first distance value is used for determining the relative position relation between the user head and the simulated sound source before the user head approaches the simulated sound source.
In this embodiment, after the user's head tries to approach the simulated sound source, the head's posture changes from the initial posture to the head posture, at which point the electronic device may again determine a second distance value between the head posture and the nth key position point. The second distance value is used for determining the relative position relationship between the user head and the simulated sound source after the user head approaches the simulated sound source.
In this embodiment, the electronic device may follow up the first distance value and the second distance value, determine a position change amount between the head of the user and the simulated sound source, then determine a loudness change, and determine a speed of movement of the head of the user according to a change time between the initial pose and the head pose, thereby determining a frequency change of the first audio segment, and determine a sound change condition of the simulated sound source received by the user according to the loudness change and the frequency change, thereby determining the first audio segment corresponding to each speaker.
In addition to the change of the relative position relationship between the user head and the simulated sound source caused by the movement of the user head, the change of the relative position relationship is caused when the simulated sound source moves on the sound source movement track, and the movement of the simulated sound source needs to determine a second distance value between the Nth key position point and the head pose and a third distance value between the (n+1) th key position point and the head position, and the loudness change of the second audio segment can be determined based on the difference of the two distance values; similarly, the simulated sound source moves on the sound surrounding track at a preset moving speed, so that the frequency change of the second audio segment can be determined according to the preset moving speed, the sound change condition of the process of moving the simulated sound source to the (n+1) th key position point at the (N) th key position point is determined according to the loudness change and the frequency change, the second audio segment corresponding to each loudspeaker is determined, and the first audio segment and the second audio segment are overlapped, so that the target audio in the process can be obtained.
Illustratively, fig. 13 shows a schematic diagram of audio segment determination provided by an embodiment of the present application. Referring to fig. 13 (a), the user's head rotates from point a to point B to approach point C where the simulated sound source is located, at this time, the distance between the two changes from d1 to d2, and the electronic device may determine the first audio segment corresponding to each speaker according to the change in distance between d1 and d 2. On the other hand, referring to fig. 13 (B), when the simulated sound source can move from the position point C to the position point D, the distance value between the simulated sound source and the user head point B is changed from D2 to D3, and the electronic device can determine the second audio segment corresponding to each speaker according to the change of the distance between D2 and D3. The two audio segments are integrated to obtain the target audio segment.
In the embodiment of the application, the process of audio change is divided into two parts, the audio segments corresponding to each part are respectively determined, and then the two audio segments are overlapped to obtain the target audio, so that the accuracy of generating the target audio can be improved, and the simulation effect is improved.
In S5024, increasing the value of N, if the increased value of N is smaller than the total number of key position points on the sound surrounding track, returning to the operation of collecting the head pose of the user after the simulated sound source moves to the nth key position point.
In S5025, if the value of N after the increase is greater than or equal to the total number, the head activity information is generated based on all the head poses.
In this embodiment, when the simulated sound source does not reach the final key position point, the target audio of each speaker is continuously determined in the above manner until the simulated audio has been moved, so that the head activity information of the user can be generated according to all head poses acquired by the head of the user during the movement of the simulated sound source. The electronic device may associate corresponding acquisition times for each head pose, and determine a pose order of each head pose based on each acquisition time, thereby generating the head activity information.
In the embodiment of the application, the simulated sound source can be changed along with the change of the head pose of the user by acquiring the head poses corresponding to different key position points and determining the target audio of the next stage, so that the authenticity of the simulated sound source is improved, and the accuracy of neck activity guidance is improved.
In S503, a scoring report is generated based on the head activity information and the sound surround track.
In this embodiment, the electronic device may determine a movement track of the user's head when obtaining the head activity information corresponding to the user in the process of simulating the movement of the sound source along the sound surrounding track, so as to determine the activity effect of the user's current neck activity according to the movement amplitude, the movement duration and the similarity with the sound surrounding track corresponding to the movement track, thereby obtaining a corresponding evaluation score, and generating a score report corresponding to the evaluation score based on the evaluation score.
In one possible implementation manner, the electronic device may determine an activity amplitude of the head activity information, determine a corresponding activity amplitude score based on the activity amplitude, then determine a total movement duration of the current sound surrounding track (i.e., a total neck activity duration of the user), determine a corresponding duration score, finally generate a head activity track according to all head poses, calculate a similarity between the head activity track and the sound surrounding track, determine an anastomosis score, calculate a corresponding activity total score according to the activity amplitude score, the duration score and the anastomosis score, and obtain a corresponding score report.
In one possible implementation manner, if the electronic device is a head-mounted device, the score report may be output in a voice broadcast manner, and the user may determine the content of the score report by listening to the audio corresponding to the score report. Optionally, if the head-mounted device is connected to other electronic devices, for example, a smart phone, the head-mounted device may send the corresponding score report to the smart phone, and the display module of the smart phone displays the score report, so that the user may view the content of the score report on the smart phone.
Illustratively, FIG. 14 shows a display schematic of a scoring report provided by an embodiment of the present application. Referring to fig. 14 (a), the electronic device that obtains the head activity information of the user is a head-mounted device, and after generating the score report of the current neck activity of the user, the head-mounted device may send the score report to the smart phone through a bluetooth communication connection. The smart phone is provided with a client program associated with the head-mounted device, and the corresponding scoring report can be displayed by starting the client program, as shown in (b) of fig. 14, and the scoring report can display scoring conditions of different dimensions, such as activity magnitude scores, duration scores and coincidence scores.
Further, as another embodiment of the present application, fig. 15 shows a flowchart for specifically implementing S503 in a method for playing audio according to another embodiment of the present application, and referring to fig. 15, compared with the embodiment described in fig. 5, S503 in the embodiment of the present application specifically includes the following steps, which are specifically described as follows:
in S5031, a head motion trajectory of the user during the movement of the simulated sound source on the sound surrounding trajectory is generated according to a plurality of head poses in the head activity information.
In S5032, a trajectory similarity between the head motion trajectory and the sound surrounding trajectory is calculated.
In S5033, a range of motion of the user is determined from the head motion trajectory.
In S5034, the score report is generated according to the trajectory similarity and the range of motion.
In this embodiment, the electronic device acquires a plurality of head gestures in the process that the user follows the simulated sound source to move, and connects each head gesture in turn based on the sequence of the acquisition of each head gesture, so as to generate a head motion track corresponding to the user. And carrying out similarity calculation on the head motion track and the sound motion track of the simulated sound source to obtain the track similarity.
In one possible implementation, the manner of calculating the track similarity may be: based on the acquisition time, establishing an association relation between each coordinate point on the head motion track and each coordinate point on the sound surrounding track, then calculating distance values between each coordinate point on the head motion track and the corresponding coordinate point on the sound surrounding track, and determining track similarity between the two based on the sum of the distance values corresponding to all the head motion tracks or the average value of the distance values. Wherein, the smaller the sum of the distance values or the average value of the distance values is, the larger the corresponding track similarity is; otherwise, if the sum of the distance values or the average value of the distance values is larger, the corresponding track similarity is smaller.
In one possible implementation manner, the electronic device may perform scaling processing on the head motion track, so as to maximize the contact ratio between the scaled head motion track and the sound surrounding track, and use the corresponding value when the contact ratio between the two tracks is maximized as the track similarity between the two tracks.
In this embodiment, the electronic device determines, in addition to the similarity between the two tracks, the range of motion of the head in the current neck motion process, that is, the motion amplitude. The movement amplitude can be determined according to the distance value between the movement track of the head and the axis of the human body, and also can be determined according to the swinging angle of the head, and the movement amplitude is specifically set according to the actual situation.
In this embodiment, the electronic device may import the track similarity and the activity range into a preset report template, so as to generate a score report corresponding to the neck activity. Optionally, the electronic device is configured with a scoring conversion algorithm, the track similarity and the activity range are imported into the scoring conversion algorithm, an evaluation score corresponding to the neck activity can be calculated and obtained, and the evaluation score is added into the scoring report, so that the user can conveniently determine the effect of the neck activity.
In the embodiment of the application, the head activity track in the current activity process is generated through the head activity information, so that the track similarity between the head activity track and the sound surrounding track is determined, the activity range of the user is determined, the neck activity of the user is evaluated from multiple angles, and the accuracy of an evaluation report can be improved.
Further, as another embodiment of the present application, after S503, it may further include:
in S5035, an actual activity magnitude of the user in a plurality of activity directions is determined according to the activity range.
In S5036, if the actual activity amplitude corresponding to any activity direction is smaller than the preset amplitude threshold, identifying any activity direction as the strengthening activity direction.
In S5037, neck exercise cues are generated based on all of the reinforcement activity directions.
In this embodiment, after generating the score report of the current neck activity, the electronic device may perform related exercise advice according to the activity condition of the user at this time. For example, if the user deflects his head to the left by a significantly smaller amount than his head to the right while following the movement of the simulated sound source, the user may experience an imbalance in the left and right neck movements, which may be caused by lack of exercise of the left neck muscles, in which case the electronic device may alert the user to the exercise. Therefore, after the scoring report of the present neck activity is generated, the electronic device can identify the actual activity amplitude corresponding to each preset activity direction in the activity range, compare the actual activity amplitude with the preset amplitude threshold, and if the actual activity amplitude is greater than the amplitude threshold of the corresponding direction, the fact that no abnormality exists in the activity direction is indicated, and the neck exercise prompt information of the activity direction is not required to be generated; on the contrary, if any actual activity amplitude is a preset amplitude threshold value, it indicates that when the neck of the user moves towards the activity direction, there is an abnormal condition with smaller amplitude, and exercise needs to be enhanced, so that neck exercise prompt information about the activity direction can be generated.
Illustratively, fig. 16 shows a schematic diagram of neck exercise prompt information provided by an embodiment of the present application. Referring to fig. 16, after the electronic device outputs the score report, the neck exercise prompt information may be displayed by means of a pop-up frame, so that a user may be reminded of a targeted exercise, for example, "the left side activity range is small, please strengthen the left muscle of the neck", and the user may exercise targeted.
In the embodiment of the application, when the fact that the user has limited activity in a certain activity direction is identified, the user can be prompted, the readability of the evaluation report is improved, and the user can conveniently and well exercise the neck.
It can be seen from the foregoing that, in the audio playing method provided by the embodiment of the present application, corresponding speakers are configured on two sides of a user's ears, so that a simulated sound source is obtained through simulation based on binaural effects, the purpose of prompting the user to perform neck activity is achieved by controlling the simulated sound source to move on a preset sound surrounding track, in the process of user activity of the neck, that is, in the process of moving the simulated sound source on the sound surrounding track, head activity information of the user is collected, and finally matching is performed according to the head activity information and the sound surrounding track, so that an evaluation score of the user's current neck activity is obtained, and the purpose of screen-free guiding activity is achieved. Compared with the existing multimedia playing technology, the embodiment of the application can simulate the corresponding simulated sound source through the binaural effect, achieves the purpose of guiding the activities of the user by controlling the simulated sound source to perform surrounding movement, does not need the user to stare at the screen at any time, but can move towards the appointed direction and the appointed track according to the relative position relation between the simulated sound source and the user, thereby reducing the operation difficulty of the user, enabling the operation of the neck activity to be more flexible and improving the use experience of the user.
Embodiment two:
corresponding to the audio playing method described in the above embodiments, fig. 17 shows a block diagram of the audio playing device provided in the embodiment of the present application, and for convenience of explanation, only the portion related to the embodiment of the present application is shown.
Referring to fig. 17, the audio playing device includes:
a simulated sound source moving unit 171 for controlling the simulated sound source to move on a preset sound surrounding track so as to prompt a user to move the neck according to the sound surrounding track; the simulated sound source is obtained by simulation through loudspeakers positioned at two sides of the ear of the user;
a head activity information collection unit 172 for collecting head activity information of the user during the movement of the simulated sound source on the sound surrounding track;
a score report output unit 173 for generating a score report based on the head activity information and the sound surrounding track.
Optionally, the head activity information acquisition unit 172 includes:
the key position point moving unit is used for controlling the simulated sound source to move to an Nth key position point on the sound surrounding track; the N is a positive integer;
the head pose determining unit is used for collecting the head pose of the user when the simulated sound source moves to the Nth key position point;
A target audio determining unit, configured to determine target audio of each speaker according to the head pose and an nth key position point; the target audio is used for an audio segment in the process that the simulated sound source moves from the Nth key position point to the (n+1) th key position point;
the circulating unit is used for increasing the value of N, and if the value of N after the increase is smaller than the total number of key position points on the sound surrounding track, the operation of collecting the head pose of the user after the simulated sound source moves to the Nth key position point is carried out;
and the head activity information packaging unit is used for generating the head activity information based on all the head pose if the value of N after the addition is greater than or equal to the total number.
Optionally, the target audio determining unit includes:
a first distance value determining unit, configured to determine a first distance value between the head of the user and the nth key position point according to the initial pose of the user and the nth key position point when the simulated sound source moves to the nth key position point;
a second distance value determining unit for determining a second distance value between the head pose and the nth key position point;
A first audio segment determining unit, configured to determine a first audio segment according to the first distance value and the second distance value; the first audio segment is used for simulating the relative position change between the head of the user and the simulated sound source;
a second audio segment determining unit, configured to determine a second audio segment according to the nth key position point, the n+1th key position point, and the head pose; the second audio segment is used for simulating the movement of the simulated audio from the Nth key position point to the (n+1) th key position point;
and the target audio packaging unit is used for generating the target audio according to the first audio piece and the second audio piece.
Alternatively, the score report output unit 173 includes:
a head motion track generation unit, configured to generate a head motion track of the user during the movement of the simulated sound source on the sound surrounding track according to a plurality of head poses in the head motion information;
a track similarity calculation unit, configured to calculate a track similarity between the head motion track and the sound surrounding track;
a movement range determining unit for determining a movement range of the user according to the head movement track;
And the scoring report generating unit is used for generating the scoring report according to the track similarity and the activity range.
Optionally, the audio playing device further includes:
an actual activity amplitude determining unit, configured to determine actual activity amplitudes of the user in a plurality of activity directions according to the activity range;
the strengthening activity direction determining unit is used for identifying any activity direction as a strengthening activity direction if the actual activity amplitude corresponding to the any activity direction is smaller than a preset amplitude threshold value;
and the neck exercise prompting unit is used for generating neck exercise prompting information based on all the strengthening activity directions.
Optionally, the audio playing device further includes:
the teaching course prompting unit is used for playing the Mth teaching course prompting information based on a preset teaching course prompting list; the initial value of M is 1;
the actual motion information acquisition unit is used for acquiring the actual motion information of the user based on the Mth course prompt information;
the success prompting sound output unit is used for outputting a preset success prompting sound and increasing the value of M if the actual motion information is matched with the standard motion information associated with the Mth course prompting information;
The return execution unit is used for returning to execute the preset course prompt list and playing the Mth course prompt information if the value of M is smaller than or equal to the total number of the course prompt information in the course prompt list;
and the completion prompting unit is used for outputting a preset completion prompting sound if the value of M is larger than the total number of the course prompting messages.
Optionally, the audio playing device is applied to the head-mounted equipment; the headset includes an earpiece and an inertial sensor; the earphone part comprises loudspeakers at two sides of the ear; the inertial sensor is used for acquiring the head activity information.
Therefore, the audio playing device provided by the embodiment of the application can also be used for obtaining a simulated sound source through simulation based on the binaural effect by configuring corresponding speakers on two sides of the user, the purpose of prompting the user to perform neck activities is achieved by controlling the simulated sound source to move on the preset sound surrounding track, in the process of moving the neck of the user, namely, the simulated sound source moves on the sound surrounding track, head activity information of the user is collected, and finally, the head activity information and the sound surrounding track are matched according to the head activity information, so that the evaluation score of the neck activity of the user is obtained, and the purpose of screen-free guiding activities is achieved. Compared with the existing multimedia playing technology, the embodiment of the application can simulate the corresponding simulated sound source through the binaural effect, achieves the purpose of guiding the activities of the user by controlling the simulated sound source to perform surrounding movement, does not need the user to stare at the screen at any time, but can move towards the appointed direction and the appointed track according to the relative position relation between the simulated sound source and the user, thereby reducing the operation difficulty of the user, enabling the operation of the neck activity to be more flexible and improving the use experience of the user.
Fig. 18 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 18, the electronic device 18 of this embodiment includes: at least one processor 180 (only one processor is shown in fig. 18), a memory 181, and a computer program 182 stored in the memory 181 and executable on the at least one processor 180, the processor 180 implementing the steps in any of the various audio playback method embodiments described above when executing the computer program 182.
The electronic device 18 may be a computing device such as a desktop computer, a notebook computer, a palm top computer, and a cloud server. The electronic device may include, but is not limited to, a processor 180, a memory 181. It will be appreciated by those skilled in the art that fig. 18 is merely an example of the electronic device 18 and is not intended to limit the electronic device 18, and may include more or fewer components than shown, or may combine certain components, or may include different components, such as input-output devices, network access devices, etc.
The processor 180 may be a central processing unit (Central Processing Unit, CPU), the processor 180 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 181 may in some embodiments be an internal storage unit of the electronic device 18, such as a hard disk or a memory of the electronic device 18. The memory 181 may also be an external storage device of the electronic device 18 in other embodiments, such as a plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash memory Card (Flash Card) or the like, which are provided on the electronic device 18. Further, the memory 181 may also include both internal and external memory units of the electronic device 18. The memory 181 is used to store an operating system, application programs, boot loader (BootLoader), data, and other programs, etc., such as program code for the computer program. The memory 181 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides electronic equipment, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a camera device/electronic apparatus, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method of playing audio, comprising:
controlling the simulated sound source to move on a preset sound surrounding track so as to prompt a user to move the neck according to the sound surrounding track; the simulated sound source is obtained by simulation through loudspeakers positioned at two sides of the ear of the user;
Collecting head activity information of the user in the process that the simulated sound source moves on the sound surrounding track;
a scoring report is generated based on the head activity information and the sound surround trajectory.
2. The method according to claim 1, wherein the step of collecting the head activity information of the user during the movement of the simulated sound source on the sound surrounding track comprises:
controlling the simulated sound source to move to an Nth key position point on the sound surrounding track; the N is a positive integer;
collecting the head pose of the user when the simulated sound source moves to the Nth key position point;
determining target audio of each loudspeaker according to the head pose and the Nth key position point; the target audio is used for an audio segment in the process that the simulated sound source moves from the Nth key position point to the (n+1) th key position point;
increasing the value of N, and if the increased value of N is smaller than the total number of key position points on the sound surrounding track, returning to execute the operation of collecting the head pose of the user after the simulated sound source moves to the Nth key position point;
And if the value of N after the addition is greater than or equal to the total number, generating the head activity information based on all the head pose.
3. The method of playing according to claim 2, wherein determining the target audio of each speaker according to the head pose and the nth key position point comprises:
determining a first distance value between the head of the user and the Nth key position point according to the initial pose of the user and the Nth key position point when the simulated sound source moves to the Nth key position point;
determining a second distance value between the head pose and the nth key position point;
determining a first audio segment according to the first distance value and the second distance value; the first audio segment is used for simulating the relative position change between the head of the user and the simulated sound source;
determining a second audio segment according to the nth key position point, the (n+1) th key position point and the head pose; the second audio segment is used for simulating the movement of the simulated audio from the Nth key position point to the (n+1) th key position point;
and generating the target audio according to the first audio piece and the second audio piece.
4. The playback method of claim 1, wherein the generating a scoring report based on the head activity information and the sound surround tracks comprises:
generating a head movement track of the user in the process of moving the simulated sound source on the sound surrounding track according to a plurality of head gestures in the head movement information;
calculating the track similarity between the head movement track and the sound surrounding track;
determining the activity range of the user according to the head movement track;
and generating the scoring report according to the track similarity and the activity range.
5. The playback method as recited in claim 4, further comprising, after said generating a scoring report based on said head activity information and said sound surround tracks:
determining the actual activity amplitude of the user in a plurality of activity directions according to the activity range;
if the actual activity amplitude corresponding to any activity direction is smaller than a preset amplitude threshold, identifying any activity direction as a reinforced activity direction;
generating neck exercise cues based on all of the reinforcement activity directions.
6. The playback method as recited in any one of claims 1-5, wherein before the controlling the simulated sound source to move on a preset sound surrounding track to prompt a user to move the neck according to the sound surrounding track, further comprising:
playing the Mth course prompt information based on a preset course prompt list; the initial value of M is 1;
acquiring actual motion information of the user based on the Mth course prompt information;
if the actual motion information is matched with the standard motion information associated with the Mth course prompt information, outputting a preset success prompt tone and increasing the value of M;
if the value of M is smaller than or equal to the total number of the course prompt messages in the course prompt list, returning to execute the preset course prompt list and playing the Mth course prompt message;
and if the value of M is larger than the total number of the course prompt messages, outputting a preset completion prompt tone.
7. The playback method as recited in any one of claims 1-5, applied to a head-mounted device; the headset includes an earpiece and an inertial sensor; the earphone part comprises loudspeakers at two sides of the ear; the inertial sensor is used for acquiring the head activity information.
8. An audio playback apparatus, comprising:
the simulated sound source moving unit is used for controlling the simulated sound source to move on a preset sound surrounding track so as to prompt a user to move the neck according to the sound surrounding track; the simulated sound source is obtained by simulation through loudspeakers positioned at two sides of the ear of the user;
the head activity information acquisition unit is used for acquiring the head activity information of the user in the process that the simulated sound source moves on the sound surrounding track;
and a score report output unit for generating a score report based on the head activity information and the sound surrounding track.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
CN202210250227.6A 2022-03-14 2022-03-14 Audio playing method and device and electronic equipment Pending CN116798470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210250227.6A CN116798470A (en) 2022-03-14 2022-03-14 Audio playing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210250227.6A CN116798470A (en) 2022-03-14 2022-03-14 Audio playing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116798470A true CN116798470A (en) 2023-09-22

Family

ID=88037772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210250227.6A Pending CN116798470A (en) 2022-03-14 2022-03-14 Audio playing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116798470A (en)

Similar Documents

Publication Publication Date Title
CN110910872B (en) Voice interaction method and device
EP4020491A1 (en) Fitness-assisted method and electronic apparatus
CN111669515B (en) Video generation method and related device
CN115016869B (en) Frame rate adjusting method, terminal equipment and frame rate adjusting system
CN114466128B (en) Target user focus tracking shooting method, electronic equipment and storage medium
WO2021052139A1 (en) Gesture input method and electronic device
WO2022193989A1 (en) Operation method and apparatus for electronic device and electronic device
CN113805487B (en) Control instruction generation method and device, terminal equipment and readable storage medium
EP4170440A1 (en) Home device control method, terminal device, and computer-readable storage medium
WO2022206494A1 (en) Target tracking method and device
CN114111704B (en) Method and device for measuring distance, electronic equipment and readable storage medium
CN111031492B (en) Call demand response method and device and electronic equipment
CN116048217B (en) Electronic equipment operation method and device and electronic equipment
EP4307168A1 (en) Target user determination method, electronic device and computer-readable storage medium
US20230402150A1 (en) Adaptive Action Evaluation Method, Electronic Device, and Storage Medium
WO2022007757A1 (en) Cross-device voiceprint registration method, electronic device and storage medium
CN116391212A (en) Method for preventing gesture from being misidentified and electronic equipment
CN111339513B (en) Data sharing method and device
US20220277845A1 (en) Prompt method and electronic device for fitness training
CN115730091A (en) Comment display method and device, terminal device and readable storage medium
CN116798470A (en) Audio playing method and device and electronic equipment
CN114812381A (en) Electronic equipment positioning method and electronic equipment
CN114764300B (en) Window page interaction method and device, electronic equipment and readable storage medium
CN114205318B (en) Head portrait display method and electronic equipment
CN116450026B (en) Method and system for identifying touch operation

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