Playing control method and device and storage medium

When the terminal speaker plays sound, it simultaneously plays sound waves of different frequency bands and receives reflected sound waves to determine whether the speaker is in contact with an object. This solves the problem of abnormal noise caused by the position of the speaker's rear shell, improves the sound quality, and protects the speaker structure.

CN119364253APending Publication Date: 2025-01-24BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310913556.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When the terminal speaker is located in the rear case, abnormal noise is prone to occur, affecting the sound quality.

Method used

When the speaker plays sound, it simultaneously plays sound waves that are different from the sound band, and receives the reflected sound waves through the microphone to determine whether the speaker is in contact with an object. If so, the speaker amplitude is reduced or a prompt message is issued.

Benefits of technology

It effectively avoids abnormal noise caused by contact between the speaker and objects, improves the sound quality, and protects the speaker structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364253A_ABST
    Figure CN119364253A_ABST
Patent Text Reader

Abstract

The invention provides a playing control method and device and a storage medium. The playing control method is applied to the terminal, the terminal comprises a loudspeaker and a microphone, the loudspeaker and the microphone are arranged at a rear shell of the terminal, a sound production end of the loudspeaker and a detection end of the microphone both face one side of the rear shell of the terminal, and the loudspeaker and the detection end of the microphone are arranged at an interval. The playing control method comprises the following steps: in response to a loudspeaker playing sound, controlling the loudspeaker to play sound waves with a frequency band different from a sound frequency band; in response to the existence of the object in the preset range of the sound production end of the loudspeaker, receiving reflected sound waves reflected by the object through the microphone; in response to the fact that the sound waves played by the loudspeaker and the reflected sound waves received by the microphone meet the preset conditions, the amplitude of the sound played by the loudspeaker is reduced and / or prompt information is sent out, and the prompt information is used for prompting to change the posture of the terminal. According to the invention, the playing sound quality of the loudspeaker arranged at the rear shell of the terminal can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to a playback control method, device and storage medium. Background Art

[0002] With the advancement of technology, people's requirements for mobile smart terminals used in daily life are getting higher and higher, and the requirements for the sound quality of mobile smart terminals are also increasing.

[0003] Due to the limitations of the terminal itself and the aesthetics of the terminal, the speakers of the terminal are generally located on the front, bottom and back shell of the terminal. However, when playing sound through the speakers placed on the back shell (also called back shell speakers), sometimes abnormal sounds occur, affecting the playback sound quality. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a playback control method, device and storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a playback control method is provided, which is applied to a terminal, wherein the terminal comprises: a speaker and a microphone, wherein the speaker and the microphone are arranged at a rear shell of the terminal, wherein a sound-emitting end of the speaker and a detection end of the microphone are both facing a side of the rear shell of the terminal, and the speaker and the detection end of the microphone are arranged at intervals, wherein the method comprises: in response to the speaker playing a sound, controlling the speaker to play a sound wave having a frequency band different from the sound frequency band; in response to the presence of an object within a preset range of the sound-emitting end of the speaker, receiving, through a microphone, a reflected sound wave of the sound wave reflected by the object; in response to the sound wave played by the speaker and the reflected sound wave received by the microphone satisfying a preset condition, reducing the amplitude of the sound played by the speaker and / or issuing a prompt message, wherein the prompt message is used to prompt a change in the posture of the terminal.

[0006] In one implementation, the sound waves played by the speaker and the reflected sound waves received by the microphone meet preset conditions, including: a time difference between the time when the speaker plays the sound waves and the time when the microphone receives the reflected sound waves is less than or equal to a time threshold.

[0007] In one implementation, reducing the amplitude of the speaker includes at least one of the following: reducing the playback volume of the sound; and stopping playback of the sound.

[0008] In one embodiment, controlling the speaker to play sound waves in a frequency band different from the sound band includes: sending ultrasound use case configuration parameters to start the ultrasound use case; starting the ultrasound use case based on the ultrasound use case configuration parameters, and playing it concurrently with the sound through a digital audio interface.

[0009] In one embodiment, sending ultrasound use case configuration parameters to start the ultrasound use case includes: activating a hardware abstraction layer virtual sensor through a preconfigured configuration file, so that the hardware abstraction layer virtual sensor sends the ultrasound use case configuration parameters to the hardware abstraction layer audio sensor through a hardware abstraction layer interface definition language interface to start the ultrasound use case in the hardware abstraction layer audio sensor.

[0010] In one embodiment, the time threshold is obtained in the following manner: obtaining the current scene in which the speaker plays sound; determining the time threshold corresponding to the current scene based on the current scene and a pre-trained model, wherein the input of the model is the scene and the output is the time threshold.

[0011] In one embodiment, the method further includes: if the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave is greater than a time threshold, keeping the amplitude of the sound played by the speaker unchanged.

[0012] In one embodiment, the sound wave is ultrasonic wave.

[0013] According to a second aspect of an embodiment of the present disclosure, a playback control device is provided, which is applied to a terminal, wherein the terminal comprises: a speaker and a microphone, wherein the speaker and the microphone are arranged at a rear shell of the terminal, wherein a sound-emitting end of the speaker and a detection end of the microphone are both facing a side of the rear shell of the terminal, and the speaker and the detection end of the microphone are arranged at intervals, and the device comprises:

[0014] a playing unit, for controlling the speaker to play a sound wave having a frequency band different from the sound frequency band in response to the speaker playing the sound;

[0015] A receiving unit, configured to receive, through a microphone, a reflected sound wave of the sound wave reflected by the object in response to the existence of an object within a preset range of the sound-emitting end of the speaker;

[0016] An execution unit is used to reduce the amplitude of the sound played by the speaker and / or issue a prompt message in response to the sound wave played by the speaker and the reflected sound wave received by the microphone meeting a preset condition, wherein the prompt message is used to prompt the terminal to change its posture.

[0017] In one implementation, the sound waves played by the speaker and the reflected sound waves received by the microphone meet preset conditions, including: a time difference between the time when the speaker plays the sound waves and the time when the microphone receives the reflected sound waves is less than or equal to a time threshold.

[0018] In one implementation, the execution unit reduces the amplitude of the speaker in at least one of the following ways: reducing the playing volume of the sound; and stopping playing the sound.

[0019] In one embodiment, the execution unit controls the speaker to play sound waves with a frequency band different from the sound band in the following manner: sending ultrasound use case configuration parameters to start the ultrasound use case; starting the ultrasound use case based on the ultrasound use case configuration parameters, and playing it concurrently with the sound through a digital audio interface.

[0020] In one embodiment, the execution unit sends the ultrasonic use case configuration parameters to start the ultrasonic use case in the following manner: activate the hardware abstraction layer virtual sensor through a pre-configured configuration file, so that the hardware abstraction layer virtual sensor sends the ultrasonic use case configuration parameters to the hardware abstraction layer audio sensor through the hardware abstraction layer interface definition language interface to start the ultrasonic use case in the hardware abstraction layer audio sensor.

[0021] In one embodiment, the execution unit obtains the time threshold in the following manner: obtaining the current scene in which the speaker plays sound; based on the current scene and a pre-trained model, determining the time threshold corresponding to the current scene, the input of the model is the scene, and the output is the time threshold.

[0022] In one embodiment, it is characterized in that the execution unit is also used to: if the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave is greater than a time threshold, keep the amplitude of the sound played by the speaker unchanged.

[0023] In one embodiment, the sound wave is ultrasonic wave.

[0024] According to a third aspect of an embodiment of the present disclosure, a playback control device is provided, including:

[0025] a processor; a memory for storing instructions executable by the processor;

[0026] The processor is configured to: execute the method described in the first aspect or any one of the embodiments of the first aspect.

[0027] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the playback control method described in the first aspect or any one of the embodiments of the first aspect.

[0028] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by playing sound waves of a frequency band different from that of the sound when the speaker of the terminal plays the sound, and obtaining the sound waves reflected after the sound waves come into contact with the object, it is possible to determine whether the speaker comes into contact with the object, and by reducing the amplitude of the speaker and / or issuing a prompt message, the speaker will not produce abnormal sounds, thereby improving the playback sound quality of the speaker and the structure of the speaker.

[0029] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0031] Figure 1 is a schematic diagram showing a speaker structure provided at a rear shell of a terminal according to an exemplary embodiment.

[0032] Figure 2 is a schematic diagram showing a side cross-section of a speaker provided on a rear shell of a terminal according to an exemplary embodiment.

[0033] Figure 3 FIG. 4 is a rear view of a mobile device according to an exemplary embodiment.

[0034] Figure 4 The figure is a flowchart of a playback control method according to an exemplary embodiment.

[0035] Figure 5 The figure is a flowchart of a playback control method according to an exemplary embodiment.

[0036] Figure 6 The invention is a flow chart showing a method for reducing the amplitude of sound played by a speaker according to an exemplary embodiment.

[0037] Figure 7 The invention is a flowchart showing a method for playing a sound wave having a frequency band different from a sound frequency band according to an exemplary embodiment.

[0038] Figure 8 The figure is a flow chart showing a method for determining a time threshold according to an exemplary embodiment.

[0039] Fig. 9 The figure is a flowchart of a playback control method according to an exemplary embodiment.

[0040] Fig.10 is a schematic diagram of an ultrasonic drive link according to an exemplary embodiment.

[0041] Fig.11 The figure is a block diagram of a playback control device according to an exemplary embodiment.

[0042] Fig.12 It is a block diagram of a device for controlling playback according to an exemplary embodiment. DETAILED DESCRIPTION

[0043] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0044] The playback control method provided in the present disclosure is applied to a scenario where a terminal plays sound, for example, it is applied to a scenario where a speaker disposed at a rear shell of the terminal plays sound.

[0045] Figure 1 is a schematic diagram of a speaker structure provided at the rear shell of a terminal, such as Figure 1 As shown, the speaker generally includes a vibration plate 1, a diaphragm 2, a voice coil 3, a magnet 4 and a magnetic conductive plate 5. The speaker interacts with the magnet 4 through the current signal, thereby driving the voice coil 3 in the magnetic field to perform piston-like reciprocating motion, wherein the diaphragm 2 is connected to the voice coil 3, so that the diaphragm 2 vibrates with the vibration of the voice coil 3. When the diaphragm 2 vibrates, it compresses the air to generate sound waves, and then the speaker makes a sound. Among them, the edge of the diaphragm 2 needs to be fixed on the battery cover 8 of the rear shell of the terminal.

[0046] Figure 2 Schematic diagram of the side cross section of a speaker disposed on the rear shell of a terminal. The diaphragm 2 includes a dome 10 and a folding ring 11. Figure 2 The folding ring 11 is connected to the battery cover 8 of the terminal rear shell. The dome 10 corresponds to the area inside the voice coil 3; the folding ring 11 corresponds to the area outside the voice coil 3 inside the speaker frame. The folding ring 11 of the speaker is set to ensure the axial movement of the paper cone along the speaker and limit the lateral movement, and at the same time play the role of blocking the air circulation in front and behind the paper cone.

[0047] In addition, to ensure that the user obtains better sound quality, the terminal may further include an upper speaker 6 and a lower speaker 7. The upper speaker 6 and the lower speaker 7 are installed on one side of the terminal screen 12. Figure 2 As shown, the upper speaker is located on the upper side of the terminal and can play left-channel music, and the lower speaker is located on the lower side of the terminal and can play right-channel music. The speakers can be located as follows Figure 3 The location shown, Figure 3The figure is a rear view of the mobile device. The speaker 13 may be located at the rear shell of the terminal, for example, the speaker 13 is located at the center of the rear shell. The microphone 9 is an energy conversion device that converts sound signals into electrical signals and can be used to receive sound. When the terminal has three speakers, each speaker can play sound of different channels, so that the user can get a better sound quality experience.

[0048] Furthermore, when the speaker is located on the rear shell of the terminal, the use of the front side of the terminal can be reduced, thereby increasing the screen-to-body ratio and allowing users to obtain better display effects.

[0049] When the speaker disposed at the rear shell of the terminal starts working, it may come into contact with other objects. Through the playback control method provided by the present disclosure, when the speaker disposed at the rear shell of the terminal plays a sound, the speaker is controlled to play a sound wave different from the sound frequency band, and the microphone receives the reflected sound wave reflected by an object existing within a preset range of the speaker's sound-emitting end. Based on the fact that the sound wave played by the speaker and the reflected sound wave received by the microphone meet the preset conditions, it is determined that the speaker is in contact with the object, and an operation of reducing the amplitude of the speaker is performed and / or a prompt message is issued, thereby avoiding contact between the speaker and the object, thereby improving the playback sound quality of the speaker and protecting the speaker structure, and avoiding damage caused by vibration contact with the object when the speaker plays the sound.

[0050] In the embodiments of the present disclosure, the sound played by the speaker can be understood as a sound wave, which is a wave phenomenon in which a vibration signal is transmitted through a medium and can be perceived by the auditory organs of humans or animals.

[0051] Among them, the sound played by the speaker in the embodiment of the present disclosure is generally a sound wave in a frequency band that can be heard by the human ear. For example, the human ear can hear sound waves in a frequency band of 20Hz-20000Hz. The sound waves involved in the embodiment of the present disclosure that are different from the sound frequency band played by the speaker can be sound waves different from 20Hz-20000Hz. For example, the speaker provided at the rear shell of the terminal in the embodiment of the present disclosure plays a sound wave that is different from the sound frequency band, wherein the sound wave can be understood as a sound wave with a wavelength in a preset range, for example: the sound wave can be an ultrasonic wave.

[0052] Figure 4 is a flowchart of a playback control method according to an exemplary embodiment. Figure 4 As shown, the playback control method is used in a terminal, comprising the following steps:

[0053] In step S11 , in response to the speaker playing a sound, the speaker is controlled to play a sound wave having a frequency band different from the sound frequency band.

[0054] The speaker is disposed at the rear shell of the terminal, and the sound-emitting end of the speaker faces one side of the rear shell of the terminal. Figure 2 and Figure 3 , the sound-emitting end of the speaker and the detection end of the microphone are both facing one side of the rear shell, and the microphone is spaced apart from the speaker. In this way, by sending sound waves from the speaker and receiving reflected sound waves from the microphone, it is possible to confirm whether there is an object at the sound-emitting end of the speaker and the distance of the object from the sound-emitting end of the speaker. For example: the microphone is arranged at the camera decorative part, and the camera decorative part is provided with a sound receiving hole for the microphone. It should be noted that the embodiments of the present disclosure do not specifically limit the setting positions of the speaker and the microphone.

[0055] The loudspeaker plays the sound and the sound waves with a frequency band different from the sound frequency band synchronously.

[0056] In step S12, in response to the presence of an object within a preset range of the sound-emitting end of the speaker, a reflected sound wave is received by a microphone.

[0057] The microphone is arranged at the rear shell of the terminal, and the detection end of the microphone faces one side of the rear shell.

[0058] The detection ends of the loudspeaker and the microphone are arranged at intervals.

[0059] Among them, the reflected sound wave is the reflected sound wave that is emitted by the speaker of the terminal and is reflected after contacting an object within the preset range of the speaker's sound-emitting end. It can be understood that the sound waves sent by the speaker and the reflected sound waves received by the microphone can be used to confirm whether there is an object at the speaker's sound-emitting end. Furthermore, the speaker's sound-emitting end and the microphone's receiving end are set at a preset distance interval. If there is an object within the preset range of the speaker's sound-emitting end, the sound waves emitted by the speaker's sound-emitting end will be reflected to the microphone when encountering the object, and then the distance between the speaker's sound-emitting end and the object can be confirmed through the speaker's sending time and the microphone's receiving time.

[0060] The objects within the preset range may be objects of different materials, such as a tabletop with a harder material or a cloth with a softer material, etc. No restriction is imposed on the objects within the preset range.

[0061] In step S13, in response to the sound waves played by the speaker and the reflected sound waves received by the microphone satisfying a preset condition, the amplitude of the sound played by the speaker is reduced and / or a prompt message is issued.

[0062] The prompt information is used to prompt the terminal to change its posture.

[0063] In an embodiment of the present disclosure, when a speaker provided on the rear shell of the terminal starts to play a sound that the user wants to play, a sound wave different from the sound frequency band is simultaneously emitted. The sound wave is reflected after contacting an object to form a reflected sound wave, and the reflected sound wave is received by a microphone installed on the rear shell of the terminal. Among them, the sound-emitting end of the speaker and the detection end of the microphone are both facing the rear shell side of the terminal, so as to better play the sound waves and receive the reflected sound waves. According to the preset conditions satisfied by the sound waves played by the speaker and the reflected sound waves received by the microphone, it can be determined whether the speaker contacts the object. If the speaker contacts the object, the amplitude of the sound played by the speaker is reduced and / or the terminal sends a prompt message.

[0064] The user may reduce the amplitude of the sound played by the speaker.

[0065] The terminal may reduce the amplitude of the sound played by the speaker.

[0066] The prompt information may be used to prompt the user to change the terminal posture, and the terminal posture may be a state in which the speaker is in contact with an object.

[0067] The prompt information may be used to prompt the user that the amplitude of the sound played by the speaker is about to be reduced.

[0068] In one example, the sound waves played by the speaker and the reflected sound waves received by the microphone meet preset conditions, and after determining that the speaker is in contact with an object, the terminal autonomously reduces the amplitude of the sound played by the speaker.

[0069] In one example, when the sound waves played by the speaker and the reflected sound waves received by the microphone meet the preset conditions, after determining that the speaker is in contact with an object, the terminal sends a prompt message, and the prompt message is used to guide the user to change the terminal posture. For example, when it is determined that the speaker is in contact with the desktop, the terminal sends a prompt message to prompt the user to pick up the phone so that the speaker is no longer in contact with the desktop.

[0070] In one example, when the sound waves played by the speaker and the reflected sound waves received by the microphone meet the preset conditions, after determining that the speaker has touched an object, the terminal sends a prompt message, which is used to remind the user that the terminal is about to reduce the amplitude of the sound played by the speaker. For example, when it is determined that the speaker has touched the desktop and the terminal sends a prompt message, the terminal autonomously reduces the amplitude of the sound played by the speaker so that the amplitude of the sound currently played by the speaker no longer affects the sound quality of the sound.

[0071] In one example, when the sound waves played by the speaker and the reflected sound waves received by the microphone meet the preset conditions, after determining that the speaker touches an object, the terminal issues a prompt message, which is used to prompt the user to reduce the amplitude of the sound played by the speaker. For example, when it is determined that the speaker touches the desktop and the terminal issues a prompt message, the user operates the terminal speaker to reduce the amplitude of the sound played by the speaker, so that the amplitude of the sound currently played by the speaker no longer affects the sound quality of the sound.

[0072] The prompt information may be prompted by a special prompt sound emitted by a speaker, or by a pop-up window prompt. The method of issuing the prompt information and the content of the prompt information are not limited here.

[0073] In the embodiment of the present disclosure, by using sound waves of a frequency band different from that played by the speaker currently provided on the back shell of the terminal and the reflected sound waves, it is determined whether the speaker is in contact with an object, and an operation of reducing the amplitude of the speaker is performed and / or a prompt message is issued, so as to prevent the speaker from continuing to contact the object, thereby eliminating abnormal sounds generated when the speaker contacts the object, improving the playback sound quality of the speaker, and protecting the structure of the speaker so that it will not be damaged due to contact with the object during vibration.

[0074] The following is an explanation of the playback control method involved in the above embodiment.

[0075] In the embodiment of the present disclosure, the preset conditions satisfied by the sound waves played by the speaker and the reflected sound waves received by the microphone are used to determine whether the sound-emitting end of the speaker is in contact with an object within a preset range. The distance between the speaker and the object can be used to determine whether the speaker is in contact with the object. The distance can be represented by the length of time.

[0076] In the embodiment of the present disclosure, the preset condition satisfied by the sound waves played by the speaker and the reflected sound waves received by the microphone is achieved by comparing the time difference between the time when the speaker plays the sound waves and the time when the microphone receives the reflected sound waves with a threshold value, thereby determining whether the speaker is in contact with an object within a preset range of its sound-emitting end.

[0077] Figure 5 is a flowchart of a playback control method according to an exemplary embodiment. Figure 5 As shown, the playback control method is used in a terminal, comprising the following steps:

[0078] In step S21, in response to the speaker playing a sound, the speaker is controlled to play a sound wave having a frequency band different from the sound frequency band.

[0079] In step S22, in response to the presence of an object within a preset range of the sound-emitting end of the speaker, the reflected sound waves reflected by the object are received by the microphone.

[0080] Among them, steps S21 and S22 are the same as steps S11 and S12, and will not be described in detail here.

[0081] In step S23, in response to the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave being less than or equal to the time threshold, the amplitude of the sound played by the speaker is reduced and / or a prompt message is issued.

[0082] In one embodiment, when a speaker installed at the rear shell of the terminal plays a sound, a sound wave with a frequency band different from the sound frequency band is played synchronously. A microphone installed at the rear shell of the terminal receives a reflected sound wave reflected by the sound wave contacting an object within a preset range of the speaker's sound-emitting end. When the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave is less than or equal to a time threshold, it is determined that the speaker contacts an object within a preset range of the speaker's sound-emitting end, and at this time, the amplitude of the played sound is reduced and / or a prompt message is issued.

[0083] In the disclosed embodiment, the contact between the speaker and the object can be accurately determined by comparing the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave with the time threshold. If the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave is less than or equal to the time threshold, it can be determined that the speaker is in contact with the object. At this time, lowering the volume of the sound played by the speaker and / or issuing a prompt message is conducive to changing the current state of the speaker and changing the speaker to a state where it is not in contact with the object, thereby ensuring the sound quality of the speaker and protecting the speaker from damage caused by vibration contact with the object.

[0084] In the embodiment of the present disclosure, based on the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave being less than or equal to the time threshold, the operation of reducing the amplitude of the sound played by the speaker and / or issuing a prompt message is adopted to change the current posture of the speaker, wherein the posture includes the sound-emitting state of the speaker and the state of contact between the speaker and the object.

[0085] In the embodiment of the present disclosure, the amplitude of the sound played by the speaker can be reduced by adjusting the playback volume of the speaker; or the amplitude of the sound played by the speaker can be reduced by stopping the playback of the sound.

[0086] Figure 6 is a flow chart showing a method for reducing the amplitude of sound played by a speaker according to an exemplary embodiment. Figure 6 As shown, the method for reducing the amplitude of the sound played by the speaker is used in the terminal. The method for reducing the amplitude of the sound played by the speaker includes the following steps:

[0087] In step S31, the amplitude of the sound played by the speaker is reduced.

[0088] In step S321, the sound playback volume is reduced.

[0089] Among them, reducing the sound played by the speaker can be executed by the terminal.

[0090] Herein, lowering the sound played by the speaker may be performed by the user.

[0091] In step S322, stop playing the sound.

[0092] Among them, the speaker stopping playing sound can be executed by the terminal.

[0093] Among them, the speaker stopping playing sound can be executed by the user.

[0094] In one example, the terminal may automatically lower the volume of a speaker to reduce the vibration amplitude of the sound played by the speaker.

[0095] In one example, a user receives a prompt message from a terminal, and operates the terminal to reduce the volume of a speaker, thereby reducing the vibration amplitude of the speaker.

[0096] In one example, the terminal may automatically stop playing the sound, so that the amplitude of the sound played by the speaker is reduced to zero.

[0097] In one example, a user receives a prompt message from a terminal, and the user operates the terminal to stop playing the sound, thereby reducing the vibration amplitude of the speaker playing the sound to zero.

[0098] In the disclosed embodiment, after determining that the speaker of the terminal is in contact with an object, the sound playback volume is reduced; or the sound playback is stopped, thereby avoiding the speaker from contacting the object, thereby improving the playback sound quality of the speaker and protecting its structure.

[0099] In the embodiment of the present disclosure, the speaker plays sound waves in a frequency band different from the sound band, wherein the sound waves in a frequency band different from the sound band can be acquired through an ultrasonic test case.

[0100] Figure 7 is a flow chart showing a method for playing a sound wave having a frequency band different from a sound frequency band according to an exemplary embodiment. Figure 7 As shown, the method for playing sound waves with a frequency band different from the audio band is used in a terminal. The method for playing sound waves with a frequency band different from the audio band includes the following steps:

[0101] In step S41, ultrasound use case configuration parameters are sent to start the ultrasound use case.

[0102] Among them, the ultrasonic use case can be the sound waves corresponding to the scenes where different speakers play sounds.

[0103] The ultrasonic use case configuration parameters may be parameters corresponding to different scenarios in which the speaker plays sound.

[0104] In step S42, the ultrasound use case is started based on the ultrasound use case configuration parameters, and is played concurrently with the sound through the digital audio interface.

[0105] Among them, Digital Audio Interfaces (DAI) refers to the method of transmitting digital audio signals at the board level or between boards.

[0106] In the disclosed embodiment, based on the parameters corresponding to different scenarios in which the speaker plays sound, the sound wave corresponding to the scenario in which the current speaker plays sound is obtained, and the sound wave corresponding to the scenario in which the previous speaker plays sound is played simultaneously with the sound played by the speaker.

[0107] In the disclosed embodiment, the hardware abstraction layer virtual sensor sends the ultrasound use case configuration parameters to the hardware abstraction layer audio sensor.

[0108] In the disclosed embodiment, the hardware abstraction layer virtual sensor is activated through a preconfigured configuration file, so that the hardware abstraction layer virtual sensor sends ultrasound use case configuration parameters to the hardware abstraction layer audio sensor through the hardware abstraction layer interface definition language interface to start the ultrasound use case in the hardware abstraction layer audio sensor.

[0109] Among them, the Hardware Abstraction Layer Interface Definition Language (HIDL) is an interface description language used to specify the interface between the hardware abstraction layer and its users.

[0110] In the embodiment of the present disclosure, the time threshold is determined according to different scenarios, where the different scenarios may be that the speaker contacts objects of different materials, or the contact surfaces of the speaker are different.

[0111] The objects of different materials may be relatively hard objects, such as a tabletop, or relatively soft objects, such as cloth.

[0112] The contact surface between the speaker and the object may be that the entire speaker is in contact with the object, or may be that a portion of the speaker is in contact with the object.

[0113] In the disclosed embodiment, the time for sound waves to be reflected may vary depending on the different scenarios of the speaker, and thus the time thresholds in different scenarios may also be different.

[0114] In a playback control method provided by an embodiment of the present disclosure, a time threshold corresponding to a current scene can be determined according to a current scene of a terminal.

[0115] Figure 8is a flow chart showing a method for determining a time threshold according to an exemplary embodiment. Figure 8 As shown, the method for determining the time threshold is used in a terminal. The method for determining the time threshold includes the following steps:

[0116] In step S51, the current scene of the terminal's speaker playing sound is obtained.

[0117] The current scene may include one or more of the posture, contact position, material of the contacted object, etc. when the speaker of the terminal contacts the object.

[0118] The current posture of the terminal may be the posture of the terminal when the terminal uses a speaker to play sound. The posture of the terminal may be that the terminal is placed in different ways.

[0119] The terminal position may be the distance between the terminal and the object.

[0120] In an exemplary embodiment, the current scenario involved in the embodiment of the present disclosure may be, for example: the entire speaker of the terminal is in contact with the desktop, or a portion of the speaker of the terminal is placed on a relatively soft cloth surface.

[0121] In step S52, based on the current scene and the pre-trained model, a time threshold corresponding to the current scene is determined.

[0122] The input of the pre-trained model is a scene, and the output is a time threshold for determining whether the speaker contacts the object.

[0123] Among them, the scenes input into the pre-trained model are scenes corresponding to different postures and positions of the terminal.

[0124] Pre-training refers to the speaker undergoing multiple tests in different scenarios to determine the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave when the speaker contacts the object in the corresponding scenario, and determining the time difference as the time threshold involved in the embodiment of the present disclosure. For example, when all the speakers of the terminal contact the desktop, the desktop is relatively hard and the speaker structure is easily damaged. At this time, the time difference between the speaker playing the sound wave and the microphone receiving the reflected sound wave is obtained as the time threshold.

[0125] In the disclosed embodiment, a virtual driver may be set in a terminal supporting the above-mentioned pre-training process, and a node for performing the above-mentioned pre-training may be set in the virtual driver. The node for performing the pre-training stores a trained model, wherein the model input is a scene of a terminal speaker playing sound, and the output is a time threshold.

[0126] The virtual driver may also be provided with a node for providing a configuration file to a hardware abstraction layer virtual sensor (sensor HAL), that is, playing the above-mentioned sound for determining whether an object is contacted.

[0127] In the embodiment of the present disclosure, when the driving platform obtains the time information of the speaker playing the sound waves and the time information of the microphone receiving the reflected sound waves and sends them to the virtual driver, the virtual driver matches the current scene of the terminal's speaker playing the sound with the pre-trained scene, obtains the corresponding configuration file, and then sends the configuration file to the hardware abstraction layer virtual sensor (sensor HAL) to play the sound.

[0128] In the disclosed embodiment, the current scene is compared with the scenes in the pre-completed training to obtain the time threshold corresponding to the current scene, and the time threshold is compared with the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave in the current scene to determine whether it is necessary to reduce the speaker amplitude and / or issue a prompt message.

[0129] In the disclosed embodiment, by determining the time threshold of the current scene, the terminal can determine whether the speaker is in contact with an object according to different scenes, and then determine whether it is necessary to perform operations such as reducing the speaker amplitude and / or issuing a prompt message. The speaker can have different standards in different scenes to determine whether the speaker is in contact with an object, and then the speaker can perform operations such as reducing the speaker amplitude and / or issuing a prompt message when necessary to avoid the speaker not being able to work properly.

[0130] In the embodiment of the present disclosure, the sound waves played by the speaker and the reflected sound waves received by the microphone may not meet the preset condition, and the speaker maintains the current amplitude unchanged.

[0131] The preset condition satisfied by the sound wave played by the speaker and the reflected sound wave received by the microphone may be the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave.

[0132] Fig. 9 is a flowchart of a playback control method according to an exemplary embodiment. Fig. 9 As shown, the playback control method is used in a terminal. The playback control method includes the following steps:

[0133] In step S61, if the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave is greater than the time threshold.

[0134] In step S62, the amplitude of the sound played by the speaker is kept unchanged.

[0135] In the implementation of the present disclosure, when the speaker plays music, a sound wave with a frequency band different from the sound frequency band is played synchronously. The sound wave is reflected after contacting an object within a preset range of the speaker's sound-emitting end, and the reflected sound wave is received by the microphone. If the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave is greater than a time threshold, it is determined that the speaker is not in contact with the object. At this time, the amplitude of the sound currently played by the speaker is kept unchanged. Among them, keeping the amplitude of the sound unchanged can be keeping the volume of the current sound unchanged.

[0136] In the embodiment of the present disclosure, the sound wave having a frequency band different from the sound band played by the speaker may be an ultrasonic wave.

[0137] In the disclosed embodiment, the ultrasonic wave may be a sound wave with a frequency greater than 20000 Hz, wherein the ultrasonic wave has good directivity and strong reflection ability.

[0138] The speaker can play an ultrasonic characteristic wave, wherein the ultrasonic characteristic wave is different from the frequency band of the sound played by the speaker.

[0139] The ultrasonic characteristic wave is any ultrasonic wave with a frequency of M. For example, M may be 96000 Hz.

[0140] In the embodiment of the present disclosure, when a speaker installed at the rear shell plays sound, a sound wave with a frequency band different from the sound frequency band is played synchronously, and a microphone installed at the rear shell receives the reflected sound wave reflected by the object. When the preset conditions of the sound wave and the reflected sound wave are met, the speaker reduces the playback volume and / or issues a prompt message. The above-mentioned control playback method can be performed as follows: Fig.10 The ultrasound link is shown.

[0141] Fig.10 is a schematic diagram of an ultrasonic drive link according to an exemplary embodiment.

[0142] In the disclosed embodiment, the speaker and the microphone are arranged at the rear shell of the terminal, and the sound-emitting end of the speaker and the detection end of the microphone are both facing one side of the rear shell of the terminal. The detection end of the speaker and the microphone are arranged at intervals. The speaker plays ultrasonic characteristic waves with a frequency band different from the currently played sound frequency band. The microphone receives ultrasonic characteristic waves reflected by objects that touch the preset range of the speaker's sound-emitting end. The ultrasonic characteristic wave is an ultrasonic wave corresponding to the scene of the speaker currently playing sound. The ultrasonic characteristic wave is an analog signal. The analog signal of the ultrasonic characteristic wave is converted into a digital signal by an audio codec (WCD).

[0143] In the disclosed embodiment, the ultrasonic engine runs on an advanced signal processor (Digital Singal Processor, ADSP). Among them, the pseudo port of the ultrasonic engine is used to anchor the sound driver and its thread. For example, the ultrasonic engine sends receiver data to the RX-AFE thread and receives microphone data from the TX-AFE thread. When the path bypasses the WCD, such as a smart power amplifier, the ultrasonic engine will share the RX and / or TX back-end DAI with other use cases.

[0144] Among them, the Smart Power Amplifier (Smart PA) adds feedback to the PA signal output end to detect the speaker in real time, so that the speaker can work at its limit state and maximize the performance of the speaker.

[0145] Among them, the analog front end (AFE) chip is a chip used for signal acquisition and processing. Its function is to convert physical quantities into electrical signals, and to amplify, filter, sample, quantize and process the electrical signals so that the subsequent digital signal processor or microprocessor can digitize the signals.

[0146] In the disclosed embodiment, there are device nodes in the ultrasound virtual driver.

[0147] The device node may be a node used for ultrasound training.

[0148] The device node may be a node that provides ultrasonic sensing information to a hardware abstraction layer virtual sensor (sensor HAL).

[0149] The node that provides ultrasonic sensing information to the sensor HAL may be used to provide the sensor HAL with a configuration file pre-written in an extensible markup language, thereby activating or deactivating the sensor HAL.

[0150] The ultrasonic sensing information may be a configuration file of sensor events, control messages, debugging messages and other data using an extensible markup language.

[0151] The node for ultrasound training contains an ultrasound training model, in which the input of the ultrasound training model is the current scene of the terminal, and the output is the time threshold corresponding to the current scene.

[0152] Among them, the ultrasonic training node can be closed after the call is completed later.

[0153] Among them, ultrasonic sensing information can be transmitted through driving.

[0154] In the disclosed embodiment, the driver sends ultrasonic sensing information to the ultrasonic virtual driver. The virtual driver compares the ultrasonic sensing information with the model information in the ultrasonic training through the node used for ultrasonic training to obtain the relevant configuration file. The configuration file is transmitted to the sensor HAL through the node used to provide ultrasonic sensing information to the sensor HAL.

[0155] In the disclosed embodiment, the sensor HAL provides support for ultrasonic virtual driving.

[0156] In the disclosed embodiment, a configuration file may be pre-configured through an extensible markup language. The sensor HAL is activated or deactivated through the pre-configured configuration file, so that the sensor HAL sends or stops sending ultrasound use case configuration parameters to the hardware abstraction layer audio sensor (audio HAL) through the hardware abstraction layer interface definition language (HAL Interface Definition Language, HIDL) interface to start or deactivate the ultrasound use case in the audio HAL.

[0157] Among them, Extensible Markup Language (XML) can be used to mark data and define data types. It is a source language that allows users to define their own markup languages.

[0158] Among them, the ultrasonic use case configuration parameters can be used to start the ultrasonic use case.

[0159] In the embodiment of the present disclosure, when the pre-configured configuration file activates or deactivates the sensor HAL, the audio HAL receives the ultrasound use case configuration parameters sent by the sensor HAL, and starts or stops the specific ultrasound use case according to the ultrasound use case configuration parameters. For example, it can be received through the set_parameter method. Among them, the specific ultrasound use case can be the corresponding parameters in the specific scenario of the speaker playing the sound. The audio HAL will open the hostless front-end DAI for the playback and capture paths; and the use case concurrency must be controlled to ensure that the use of dedicated and shared back-end DAIs is properly handled.

[0160] Among them, the set_parameter method is used to set parameters.

[0161] Based on the same concept, the embodiment of the present disclosure also provides a playback control device.

[0162] It is understandable that the playback control device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0163] Fig.11 is a block diagram of a playback control device according to an exemplary embodiment. Fig.11 The playback control device 100 includes a playback unit 101 , a receiving unit 102 and an execution unit 103 .

[0164] The playing unit 101 is used for controlling the speaker to play sound waves having a frequency band different from the sound frequency band in response to the speaker playing sound;

[0165] The receiving unit 102 is used to receive the reflected sound wave of the sound wave reflected by the object through the microphone in response to the existence of the object within the preset range of the sound-emitting end of the speaker;

[0166] The execution unit 103 is used to reduce the amplitude of the sound played by the speaker and / or issue a prompt message in response to the sound wave played by the speaker and the reflected sound wave received by the microphone meeting a preset condition, wherein the prompt message is used to prompt the terminal to change its posture.

[0167] In one implementation, the sound waves played by the speaker and the reflected sound waves received by the microphone meet a preset condition, including: a time difference between the time when the speaker plays the sound waves and the time when the microphone receives the reflected sound waves is less than or equal to a time threshold.

[0168] In one implementation, the execution unit 103 reduces the amplitude of the speaker in at least one of the following ways: reducing the playing volume of the sound. Stopping the playing of the sound.

[0169] In one implementation, the execution unit 103 controls the speaker to play sound waves with a frequency band different from the sound frequency band in the following manner: sending ultrasound use case configuration parameters to start the ultrasound use case. Starting the ultrasound use case based on the ultrasound use case configuration parameters, and playing the ultrasound use case concurrently with the sound through the digital audio interface.

[0170] In one implementation, the execution unit 103 sends the ultrasonic use case configuration parameters to start the ultrasonic use case in the following manner: activate the hardware abstraction layer virtual sensor through a pre-configured configuration file, so that the hardware abstraction layer virtual sensor sends the ultrasonic use case configuration parameters to the hardware abstraction layer audio sensor through the hardware abstraction layer interface definition language interface to start the ultrasonic use case in the hardware abstraction layer audio sensor.

[0171] In one implementation, the execution unit 103 obtains the time threshold in the following manner: obtain the current scene of the speaker playing the sound, and determine the time threshold corresponding to the current scene based on the current scene and a pre-trained model, where the input of the model is the scene and the output is the time threshold.

[0172] In one implementation, it is characterized in that the execution unit 103 is also used to: if the time difference between the time when the speaker plays the sound wave and the time when the microphone receives the reflected sound wave is greater than a time threshold, keep the amplitude of the sound played by the speaker unchanged.

[0173] In one implementation, the wavelength range of the sound wave is within a preset range, for example, the sound wave may be ultrasonic wave.

[0174] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0175] Fig.12 2 is a block diagram of an apparatus 200 for controlling playback according to an exemplary embodiment. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0176] Reference Fig.12 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .

[0177] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.

[0178] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0179] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.

[0180] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0181] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.

[0182] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0183] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0184] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0185] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0186] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0187] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0188] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0189] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.

[0190] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0191] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0192] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0193] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims

1. A playback control method, characterized in that: The method is applied to a terminal, the terminal comprising: a speaker and a microphone, the speaker and the microphone are arranged at a rear shell of the terminal, the sound-emitting end of the speaker and the detection end of the microphone are both facing a side of the rear shell of the terminal, the speaker and the detection end of the microphone are arranged at intervals, and the method comprises: In response to the speaker playing a sound, controlling the speaker to play a sound wave having a frequency band different from the sound frequency band; In response to the presence of an object within a preset range of the sound-emitting end of the speaker, receiving, through a microphone, a reflected sound wave resulting from the sound wave being reflected by the object; In response to the sound waves played by the speaker and the reflected sound waves received by the microphone satisfying a preset condition, the amplitude of the sound played by the speaker is reduced and / or a prompt message is issued, wherein the prompt message is used to prompt the terminal to change its posture.

2. The method according to claim 1, characterized in that The sound waves played by the loudspeaker and the reflected sound waves received by the microphone meet preset conditions, including: A time difference between a time when the speaker plays the sound wave and a time when the microphone receives the reflected sound wave is less than or equal to a time threshold.

3. The method according to claim 1, characterized in that: The reducing the amplitude of the speaker includes at least one of the following: reducing the playback volume of the sound; Stops playing the sound.

4. The method according to claim 1, characterized in that: The step of controlling the loudspeaker to play a sound wave having a frequency band different from the sound frequency band comprises: Send ultrasound use case configuration parameters to start the ultrasound use case; The ultrasound use case is started based on the ultrasound use case configuration parameters and played concurrently with the sound through the digital audio interface.

5. The method according to claim 4, characterized in that The sending of ultrasound use case configuration parameters to start the ultrasound use case includes: The hardware abstraction layer virtual sensor is activated through a preconfigured configuration file, so that the hardware abstraction layer virtual sensor sends the ultrasound use case configuration parameters to the hardware abstraction layer audio sensor through the hardware abstraction layer interface definition language interface to start the ultrasound use case in the hardware abstraction layer audio sensor.

6. The method according to claim 2, characterized in that The time threshold is obtained in the following way: Get the current scene of the speaker playing sound; Based on the current scene and a pre-trained model, a time threshold corresponding to the current scene is determined, where the input of the model is the scene and the output is the time threshold.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: If the time difference between the time when the loudspeaker plays the sound wave and the time when the microphone receives the reflected sound wave is greater than the time threshold, the amplitude of the sound played by the loudspeaker is kept unchanged.

8. The method according to claim 1, characterized in that The sound wave is ultrasonic wave.

9. A playback control device, characterized in that: The device is applied to a terminal, the terminal comprising: a speaker and a microphone, the speaker and the microphone are arranged at the rear shell of the terminal, the sound-emitting end of the speaker and the detection end of the microphone are both facing one side of the rear shell of the terminal, the speaker and the detection end of the microphone are arranged at intervals, and the device comprises: a playing unit, for controlling the speaker to play a sound wave having a frequency band different from the sound frequency band in response to the speaker playing the sound; A receiving unit, configured to receive, through a microphone, a reflected sound wave of the sound wave reflected by the object in response to the existence of an object within a preset range of the sound-emitting end of the speaker; An execution unit is used to reduce the amplitude of the sound played by the speaker and / or issue a prompt message in response to the sound wave played by the speaker and the reflected sound wave received by the microphone meeting a preset condition, wherein the prompt message is used to prompt the terminal to change its posture.

10. The device according to claim 9, characterized in that The sound waves played by the loudspeaker and the reflected sound waves received by the microphone meet preset conditions, including: A time difference between a time when the speaker plays the sound wave and a time when the microphone receives the reflected sound wave is less than or equal to a time threshold.

11. The device according to claim 9, characterized in that The execution unit reduces the amplitude of the speaker by at least one of the following methods: reducing the playback volume of the sound; Stops playing the sound.

12. The device according to claim 9, characterized in that The execution unit controls the speaker to play sound waves having a frequency band different from the sound frequency band in the following manner: Send ultrasound use case configuration parameters to start the ultrasound use case; The ultrasound use case is started based on the ultrasound use case configuration parameters and played concurrently with the sound through the digital audio interface.

13. The device according to claim 12, characterized in that The execution unit sends the ultrasound use case configuration parameters to start the ultrasound use case in the following manner: The hardware abstraction layer virtual sensor is activated through a preconfigured configuration file, so that the hardware abstraction layer virtual sensor sends the ultrasound use case configuration parameters to the hardware abstraction layer audio sensor through the hardware abstraction layer interface definition language interface to start the ultrasound use case in the hardware abstraction layer audio sensor.

14. The device according to claim 10, characterized in that The execution unit obtains the time threshold in the following manner: Get the current scene of the speaker playing sound; Based on the current scene and a pre-trained model, a time threshold corresponding to the current scene is determined, where the input of the model is the scene and the output is the time threshold.

15. The device according to any one of claims 9 to 14, characterized in that The execution unit is also used for: If the time difference between the time when the loudspeaker plays the sound wave and the time when the microphone receives the reflected sound wave is greater than the time threshold, the amplitude of the sound played by the loudspeaker is kept unchanged.

16. The device according to claim 9, characterized in that The sound wave is ultrasonic wave.

17. A playback control device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the playback control method described in any one of claims 1-8.

18. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor of the terminal, the terminal is enabled to execute the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for controlling sound effect

    CN103501375A

  • Portable electronic device

    CN104754086A

  • Alarm device for driving vehicle

    JP2003016592A

  • Automated audio assembly performance assessment

    US11115766B1

  • Myopia prevention method applicable to electronic device, myopia prevention electronic device, and myopia prevention tablet

    WO2022082711A1