Earphone noise reduction method and device, storage medium and electronic equipment

文档序号:912954 发布日期:2021-02-26 浏览:4次 中文

阅读说明:本技术 耳机降噪方法、装置、存储介质及电子设备 (Earphone noise reduction method and device, storage medium and electronic equipment ) 是由 龚金华 于 2019-08-20 设计创作,主要内容包括:本申请实施例公开了一种耳机降噪方法、装置、存储介质及电子设备,其中,通过与耳机建立通信连接后,获取耳机的设备信息;然后获取当前所处位置的位置信息,并根据位置信息确定对应当前所处位置的场景信息;再获取与设备信息和场景信息匹配的降噪参数;最后将降噪参数提供给耳机,指示耳机根据降噪参数进行降噪处理。由此,使得耳机能够获取到与实际所处场景且与自身硬件所匹配的降噪参数,不仅能够更灵活的进行降噪,还能够提高降噪效果。(The embodiment of the application discloses a method and a device for reducing noise of an earphone, a storage medium and electronic equipment, wherein after communication connection is established with the earphone, equipment information of the earphone is acquired; then obtaining the position information of the current position, and determining scene information corresponding to the current position according to the position information; then, noise reduction parameters matched with the equipment information and the scene information are obtained; and finally, providing the noise reduction parameters for the earphone, and indicating the earphone to carry out noise reduction processing according to the noise reduction parameters. Therefore, the earphone can acquire the noise reduction parameters matched with the actual scene and the hardware of the earphone, not only can the noise be reduced more flexibly, but also the noise reduction effect can be improved.)

1. A method for reducing noise of a headset is applied to an electronic device, and is characterized by comprising the following steps:

after establishing communication connection with an earphone, acquiring equipment information of the earphone;

acquiring position information of a current position, and determining scene information corresponding to the current position according to the position information;

acquiring noise reduction parameters matched with the equipment information and the scene information;

and providing the noise reduction parameters for the earphone, and instructing the earphone to carry out noise reduction processing according to the noise reduction parameters.

2. The method of claim 1, wherein the obtaining noise reduction parameters matching the device information and the scene information comprises:

sending the equipment information and the scene information to a server;

receiving noise reduction parameters matched with the equipment information and the scene information and returned by the server;

when the server has a plurality of noise reduction parameters matched with the equipment information and the scene information, the server returns the noise reduction parameter with the highest corresponding score value in the plurality of noise reduction parameters.

3. The method of claim 2, wherein before sending the device information and the scene information to a server, the method further comprises:

identifying whether noise reduction parameters matched with the equipment information and the scene information are stored locally;

and when the noise reduction parameters matched with the equipment information and the scene information are not stored locally, sending the equipment information and the scene information to the server.

4. The method of claim 3, wherein after receiving the noise reduction parameters matching the device information and the scene information returned by the server, the method further comprises:

and storing the noise reduction parameters matched with the equipment information and the scene information, which are returned by the server, according to a preset storage path.

5. The method of claim 1, wherein the providing the noise reduction parameters to the headphones instructing the headphones to perform noise reduction processing according to the noise reduction parameters comprises:

generating a corresponding noise reduction plug-in according to the noise reduction parameters;

and providing the noise reduction plug-in for the earphone, and indicating the earphone to load the noise reduction plug-in so as to carry out noise reduction processing through the noise reduction plug-in.

6. The method of claim 1, wherein the determining scene information corresponding to the current position according to the position information comprises:

when a plurality of pieces of scene information corresponding to the current position are determined according to the position information;

and acquiring the audio data of the current position, and screening out one scene information from the plurality of scene information according to the audio data.

7. The method of any one of claims 1 to 6, wherein before obtaining the noise reduction parameters matching the device information and the scene information, the method further comprises:

identifying whether a target application corresponding to the scene information is currently operated;

and if the target application is currently operated, acquiring noise reduction parameters matched with the equipment information and the scene information.

8. A noise reduction device for a headset is applied to an electronic device, and the noise reduction device for the headset comprises:

the device information acquisition module is used for acquiring the device information of the earphone after the electronic device establishes communication connection with the earphone;

the scene information acquisition module is used for acquiring the position information of the current position of the electronic equipment and determining the scene information corresponding to the current position according to the position information;

a noise reduction parameter acquisition module, configured to acquire a noise reduction parameter that matches the device information and the scene information;

and the noise reduction parameter issuing module is used for providing the noise reduction parameters for the earphone and indicating the earphone to carry out noise reduction processing according to the noise reduction parameters.

9. A storage medium having stored thereon a computer program, characterized in that, when the computer program is invoked by a processor, it causes the processor to execute the headphone noise reduction method according to any one of claims 1 to 7.

10. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the headphone noise reduction method according to any one of claims 1 to 7 by calling the computer program.

Technical Field

The application relates to the technical field of noise reduction, in particular to a method and a device for noise reduction of an earphone, a storage medium and electronic equipment.

Background

With the development of noise reduction technology, noise reduction earphones are widely applied to the life of people. The noise reduction techniques adopted by noise reduction earphones are generally classified into passive noise reduction and active noise reduction, wherein the passive noise reduction is to eliminate a noise signal by adopting physical methods such as earplugs or earmuffs, and the active noise reduction is to actively generate an audio signal in an opposite phase to the noise signal to offset the noise signal. However, when the noise reduction earphone performs active noise reduction, fixed noise reduction parameters are often adopted to generate an audio signal for canceling a noise signal, and the flexibility is poor.

Disclosure of Invention

The embodiment of the application provides a method and a device for reducing noise of an earphone, a storage medium and an electronic device, which can flexibly reduce noise and improve the noise reduction effect.

In a first aspect, an embodiment of the present application provides a method for reducing noise of a headphone, which is applied to an electronic device, and the method for reducing noise of the headphone includes:

after establishing communication connection with an earphone, acquiring equipment information of the earphone;

acquiring position information of a current position, and determining scene information corresponding to the current position according to the position information;

acquiring noise reduction parameters matched with the equipment information and the scene information;

and providing the noise reduction parameters for the earphone, and instructing the earphone to carry out noise reduction processing according to the noise reduction parameters.

In a second aspect, an embodiment of the present application provides a noise reduction device for a headphone, which is applied to an electronic device, and the noise reduction device for a headphone includes:

the device information acquisition module is used for acquiring the device information of the earphone after the electronic device establishes communication connection with the earphone;

the scene information acquisition module is used for acquiring the position information of the current position of the electronic equipment and determining the scene information corresponding to the current position according to the position information;

a noise reduction parameter acquisition module, configured to acquire a noise reduction parameter that matches the device information and the scene information;

and the noise reduction parameter issuing module is used for providing the noise reduction parameters for the earphone and indicating the earphone to carry out noise reduction processing according to the noise reduction parameters.

In a third aspect, the present application provides a storage medium having a computer program stored thereon, which, when called by a processor, causes the processor to execute the headphone noise reduction method provided by the present application.

In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the method for reducing noise of a headset according to the embodiment of the present application by calling the computer program.

In the embodiment of the application, after the communication connection with the earphone is established, the equipment information of the earphone is acquired; then obtaining the position information of the current position, and determining scene information corresponding to the current position according to the position information; then, noise reduction parameters matched with the equipment information and the scene information are obtained; and finally, providing the noise reduction parameters for the earphone, and indicating the earphone to carry out noise reduction processing according to the noise reduction parameters. Therefore, the earphone can acquire the noise reduction parameters matched with the actual scene and the hardware of the earphone, not only can the noise be reduced more flexibly, but also the noise reduction effect can be improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a scene schematic diagram of a noise reduction method for a headphone according to an embodiment of the present application.

Fig. 2 is a schematic flow chart of a noise reduction method for a headphone according to an embodiment of the present disclosure.

Fig. 3 is another schematic flow chart of a noise reduction method for a headphone according to an embodiment of the present disclosure.

Fig. 4 is a schematic structural diagram of a noise reduction device for a headphone according to an embodiment of the present application.

Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

Detailed Description

Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.

Embodiments of the present application provide a method for reducing noise of a headset, a device for reducing noise of a headset, a storage medium, and an electronic device, wherein an execution subject of the method for reducing noise of a headset may be the device for reducing noise of a headset provided in embodiments of the present application, or an electronic device integrated with the device for reducing noise of a headset, where the device for reducing noise of a headset may be implemented in hardware or software, and the electronic device may be a computing device such as a laptop computer, a computer monitor including an embedded computer, a tablet computer, a cellular phone, a media player, or other handheld or portable electronic devices, a smaller device (such as a wristwatch device, a hanging device, a headset or earphone device, a device embedded in glasses, or other device worn on the head of a user, or other wearable or miniature devices), a television, a computer display without an embedded computer, a television, a computer display, a computer, Gaming devices, navigation devices, embedded systems (such as systems in which an electronic device having a display is installed in a kiosk or automobile), and the like.

Referring to fig. 1, fig. 1 is a schematic view of a scene of a noise reduction method for an earphone according to an embodiment of the present application, for example, after an electronic device establishes a communication connection with the earphone, device information of the earphone is obtained; then, acquiring the position information of the current position, and determining scene information corresponding to the current position according to the position information; then, noise reduction parameters matched with the equipment information and the scene information are obtained; and finally, providing the acquired noise reduction parameters for the earphone, and indicating the earphone to carry out noise reduction processing according to the noise reduction parameters.

It should be noted that the scene schematic diagram of the headphone noise reduction method shown in fig. 1 is only an example, and the scene of the headphone noise reduction method described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not form a limitation to the technical solution provided in the embodiment of the present application.

Referring to fig. 2, fig. 2 is a schematic flow chart of a noise reduction method for an earphone according to an embodiment of the present disclosure. The method for reducing noise of the earphone is applied to the electronic device provided by the embodiment of the present application, as shown in fig. 2, the flow of the method for reducing noise of the earphone provided by the embodiment of the present application may be as follows:

101, after establishing communication connection with the earphone, acquiring the equipment information of the earphone.

It should be noted that the earphone mentioned in the embodiments of the present application is an earphone with an active noise reduction function, and includes at least a processor and an audio output unit, for example, the processor can generate an audio signal in an anti-phase with a noise signal through a noise reduction parameter, so that the audio signal is output through the audio output unit to cancel the noise signal, thereby implementing active noise reduction.

For example, when the earphone is a wired earphone, a user can directly insert an earphone plug of the wired earphone into an audio interface of the electronic device, and the electronic device establishes a wired communication connection with the wired earphone; for another example, when the headset is a wireless headset, the user may operate the wireless headset to initiate a connection establishment request, and the electronic device responds to the connection establishment request to establish a wireless communication connection with the wireless headset.

Correspondingly, after the electronic device establishes communication connection with the earphone, a device information acquisition request is sent to the earphone, and the device information acquisition request is used for indicating the earphone to return the device information.

On the other hand, after receiving the device information acquisition request of the electronic device, the headset returns the device information of the headset to the electronic device according to the device information acquisition request.

Wherein the device information includes manufacturer information, model information, processor information, and/or audio output unit information of the headset.

And 102, acquiring the position information of the current position, and determining scene information corresponding to the current position according to the position information.

The electronic equipment also acquires the position information of the current position, wherein the position information comprises longitude/latitude coordinates and is used for describing the current position. The electronic equipment comprises a satellite positioning component, a base station positioning component and a short-distance wireless positioning component.

The satellite positioning component realizes positioning by adopting satellite positioning technologies such as GPS, Beidou, Glonass and/or Galileo.

The base station positioning component realizes positioning by adopting the base station positioning technology such as LBS and the like.

The short-distance wireless positioning component realizes positioning by adopting short-distance wireless positioning technologies such as Wi-Fi positioning, UWB triangulation positioning, Bluetooth positioning and the like.

When the position information of the current position cannot be obtained through the positioning of the satellite positioning component (for example, when the electronic equipment is located in an environment where satellite positioning signals such as indoor and the like are shielded, the satellite positioning component cannot perform positioning), the electronic equipment obtains the position information of the current position through the cooperative positioning of the base station positioning component and the short-distance wireless positioning component so as to ensure the accuracy of the position information.

It should be noted that, in the embodiment of the present application, a corresponding relationship between position information and scene information is set in advance in an electronic device and is used to describe scenes corresponding to different positions, for example, a position information describes a position a, and i scene information corresponding to the position a describes an i scene, that is, it indicates that a scene corresponding to the position a is an i scene. The corresponding relationship between the position information and the scene information may be in the form of a scene comparison table, as shown in the following table:

position information A, position information B, and position information C i scene information
D position information j scene information and k scene information
E position information Information of l scene

It can be seen that, in the embodiment of the present application, multiple pieces of location information may correspond to the same piece of scene information, the same piece of location information may correspond to multiple pieces of scene information, and one piece of location information may correspond to one piece of location information.

And 103, acquiring noise reduction parameters matched with the device information and the scene information.

Wherein the noise reduction parameters include noise reduction filter parameters and acoustic EQ parameters. After acquiring the device information of the headset with the established communication connection and acquiring the scene information corresponding to the current position, the electronic device further acquires noise reduction parameters matched with the device information and the scene information, for example, acquires the noise reduction parameters with the highest degree of matching with the device information and the scene information.

And 104, providing the noise reduction parameters to the earphone, and instructing the earphone to carry out noise reduction processing according to the noise reduction parameters.

After the noise reduction parameters which are simultaneously matched with the device information and the scene information are acquired, the electronic device provides the noise reduction parameters for the earphone through the communication connection between the electronic device and the earphone, and instructs the earphone to perform noise reduction processing according to the noise reduction parameters.

On the other hand, after receiving the noise reduction parameters provided by the electronic device, the headset loads the noise reduction parameters and performs noise reduction processing according to the noise reduction parameters. The noise reduction earphone is characterized in that the noise reduction earphone firstly configures the audio output unit according to the acoustic EQ parameters, then external audio data are collected in real time through the audio collection unit, the external audio data are filtered by the processor according to the noise reduction filter coefficient to generate noise reduction audio data, and the noise reduction audio data and audio data to be played from external equipment are played together, so that noise reduction playing is achieved, and the optimal noise reduction playing effect is obtained.

As can be seen from the above, in the embodiment of the present application, after establishing communication connection with the headset, device information of the headset is acquired; then obtaining the position information of the current position, and determining scene information corresponding to the current position according to the position information; then, noise reduction parameters matched with the equipment information and the scene information are obtained; and finally, providing the noise reduction parameters for the earphone, and indicating the earphone to carry out noise reduction processing according to the noise reduction parameters. Therefore, the earphone can acquire the noise reduction parameters matched with the actual scene and the hardware of the earphone, not only can the noise be reduced more flexibly, but also the noise reduction effect can be improved.

In one embodiment, "acquiring the noise reduction parameters matched with the device information and the scene information" includes:

(1) sending the equipment information and the scene information to a server;

(2) receiving noise reduction parameters matched with the equipment information and the scene information and returned by the server;

when the server has a plurality of noise reduction parameters matched with the equipment information and the scene information, the server returns the noise reduction parameters with the highest corresponding score values in the plurality of noise reduction parameters.

It should be noted that in the embodiment of the present application, a server is configured to maintain noise reduction parameters in a unified manner, where the server is provided with a noise reduction parameter library, and multiple sets of noise reduction parameters are stored in the noise reduction parameter library, and a correspondence between < device information, scene information > and noise reduction parameters is preset. The group of < device information, scene information > may correspond to a plurality of groups of noise reduction parameters, or may correspond to a group of noise reduction parameters, which may be specifically set by a person skilled in the art according to actual needs.

For example, for a certain headphone, a general noise reduction parameter suitable for the headphone to perform noise reduction processing may be generated in advance, and then, for different scenes, the general noise reduction parameter is adaptively adjusted to obtain a noise reduction parameter suitable for the headphone to perform noise reduction in different scenes.

In the embodiment of the application, when the electronic device acquires the noise reduction parameters matched with the device information and the scene information, the electronic device may generate a noise reduction parameter acquisition request according to a message format agreed with a server in advance, where the noise reduction parameter acquisition request carries the device information and the scene information acquired by the electronic device; and then, sending the generated noise reduction parameter acquisition request to a server, and indicating the server to return noise reduction parameters which are matched with the device information and the scene information carried in the noise reduction parameter acquisition request at the same time.

On the other hand, after receiving the noise reduction parameter acquisition request from the electronic device, the server analyzes the device information and the scene information carried by the noise reduction parameter acquisition request, searches for the noise reduction parameter simultaneously matched with the analyzed device information and scene information according to the preset corresponding relation between the < device information, scene information > and the noise reduction parameter, and returns the noise reduction parameter to the electronic device.

Correspondingly, the electronic device receiving server obtains the noise reduction parameters returned by the request according to the noise reduction parameters, namely the noise reduction parameters which are simultaneously matched with the device information of the earphone and the scene information of the current position, namely the noise reduction parameters suitable for noise reduction of the earphone in the scene corresponding to the current position.

In addition, when the server returns the noise reduction parameter value to the electronic device, if a plurality of noise reduction parameters with which the device information and the scene information are simultaneously matched exist, the noise reduction parameter with the highest corresponding score value is screened from the plurality of noise reduction parameters, and the noise reduction parameter is returned to the electronic device as the optimal noise reduction parameter.

In addition, the server may further update the noise reduction parameter of which the score reaches a preset score, where a value of the preset score is not specifically limited in the embodiment of the present application and may be taken by a person of ordinary skill in the art according to actual needs.

When the server historically sends the noise reduction parameters to other electronic devices, the score is obtained according to user scores fed back by the other electronic devices, for example, taking a certain noise reduction parameter as an example, the server may accumulate user scores returned by all other devices receiving the noise reduction parameter, and the accumulated sum is used as the score of the noise reduction parameter.

In an embodiment, before "sending the device information and the scenario information to the server", the method further includes:

(1) identifying whether noise reduction parameters matched with the equipment information and the scene information are stored locally;

(2) and when the noise reduction parameters matched with the equipment information and the scene information are not stored locally, sending the equipment information and the scene information to a server.

When the electronic equipment acquires the noise reduction parameters which are matched with the equipment information and the scene information at the same time, whether the noise reduction parameters which are matched with the equipment information and the scene information are stored locally or not is firstly identified, when the electronic equipment identifies that the noise reduction which is matched with the equipment information and the scene information is not stored locally, the equipment information and the scene information are sent to the server, and the noise reduction parameters which are matched with the equipment information and the scene information at the same time are acquired from the server. Therefore, the electronic equipment can be prevented from repeatedly downloading the noise reduction parameters, and the flow consumption is saved.

In an embodiment, after "receiving the noise reduction parameters matched with the device information and the scene information returned by the server", the method further includes:

and storing the noise reduction parameters matched with the equipment information and the scene information returned by the server according to a preset storage path.

In the embodiment of the application, after receiving the noise reduction parameters which are simultaneously matched with the device information and the scene information and are returned by the server, the electronic device also stores the noise reduction parameters which are simultaneously matched with the device information and the scene information and are returned by the server according to the preset storage path, so that the noise reduction parameters can be directly obtained from the local place when needing to be obtained next time, and repeated downloading from the server is not needed.

It should be noted that, in the embodiment of the present application, the setting of the preset storage path is not specifically limited, and may be set by a person skilled in the art according to actual needs.

In one embodiment, "providing noise reduction parameters to the headphones, instructing the headphones to perform noise reduction processing according to the noise reduction parameters" includes:

(1) generating a corresponding noise reduction plug-in according to the noise reduction parameters;

(2) and providing the noise reduction plug-in for the earphone, and instructing the earphone to load the noise reduction plug-in so as to carry out noise reduction processing through the noise reduction plug-in.

In the embodiment of the application, after the electronic device acquires the noise reduction parameters which are simultaneously matched with the device information and the scene information, according to a preset plug-in generation rule matched with the earphone (namely, the earphone which is in communication connection with the electronic device), the electronic device generates the corresponding noise reduction plug-in according to the acquired noise reduction parameters. Then, the electronic device provides the generated noise reduction plug-in to the earphone through the communication connection between the electronic device and the earphone, and instructs the earphone to load the noise reduction plug-in.

On the other hand, after the earphone receives the noise reduction plug-in provided by the electronic device, the noise reduction plug-in is loaded according to the indication of the electronic device, so that the noise reduction processing can be performed according to the noise reduction plug-in to obtain the optimal noise reduction effect.

In one embodiment, "determining scene information corresponding to a current location according to location information" includes:

(1) when a plurality of pieces of scene information corresponding to the current position are determined according to the position information;

(2) and acquiring audio data of the current position, and screening out one scene information from the plurality of scene information according to the audio data.

In the embodiment of the application, when a plurality of pieces of scene information corresponding to the current position are determined according to the position information, that is, the current position of the electronic device corresponds to a corresponding scene, at this time, the electronic device may acquire audio data of the current position through a microphone, and screen out one piece of scene information describing the current scene from the plurality of pieces of corresponding scene information according to the audio data.

For example, the electronic device stores sample audio data corresponding to different pieces of scene information in advance, when one piece of scene information is screened out from multiple pieces of scene information according to the audio data, the electronic device compares the obtained audio data of the current position with the sample audio data corresponding to the multiple pieces of scene information, and screens out the scene information of the sample audio data, of which the similarity with the audio data reaches the preset similarity, from the multiple pieces of scene information as the scene information describing the current actual scene of the electronic device.

In an embodiment, before "acquiring the noise reduction parameters matching the device information and the scene information", the method further includes:

(1) identifying whether a target application corresponding to the scene information is currently operated;

(2) and if the target application is currently operated, acquiring noise reduction parameters matched with the equipment information and the scene information.

It should be noted that, in the embodiment of the present application, a corresponding relationship between a scene and an application that will normally run in the scene is also preset according to experience, for example, taking a commuting scene as an example, if a user would habitually run a news reading-type application through an electronic device to browse current news, the commuting scene would correspond to the news reading-type application.

Accordingly, the electronic device can verify the accuracy of the acquired scene information from the side through the running application. The electronic device identifies whether a target application corresponding to a scene described by the acquired scene information is currently running according to a corresponding relationship between the scene and the application, determines that the acquired scene information is accurate if the target application is currently running, and further acquires a noise reduction parameter matched with the device information and the scene information at this time to provide the noise reduction parameter for the earphone to perform noise reduction processing.

Referring to fig. 3, fig. 3 is another schematic flow chart of a noise reduction method for a headphone according to an embodiment of the present application, and as shown in fig. 3, the flow chart of the noise reduction method for a headphone may include:

201, after establishing communication connection with the earphone, the electronic device acquires the device information of the earphone.

It should be noted that the earphone mentioned in the embodiments of the present application is an earphone with an active noise reduction function, and includes at least a processor and an audio output unit, for example, the processor can generate an audio signal in an anti-phase with a noise signal through a noise reduction parameter, so that the audio signal is output through the audio output unit to cancel the noise signal, thereby implementing active noise reduction.

For example, when the earphone is a wired earphone, a user can directly insert an earphone plug of the wired earphone into an audio interface of the electronic device, and the electronic device establishes a wired communication connection with the wired earphone; for another example, when the headset is a wireless headset, the user may operate the wireless headset to initiate a connection establishment request, and the electronic device responds to the connection establishment request to establish a wireless communication connection with the wireless headset.

Correspondingly, after the electronic device establishes communication connection with the earphone, a device information acquisition request is sent to the earphone, and the device information acquisition request is used for indicating the earphone to return the device information.

On the other hand, after receiving the device information acquisition request of the electronic device, the headset returns the device information of the headset to the electronic device according to the device information acquisition request.

Wherein the device information includes manufacturer information, model information, processor information, and/or audio output unit information of the headset.

202, the electronic device obtains the position information of the current position, and determines the scene information corresponding to the current position according to the position information.

The electronic equipment also acquires the position information of the current position, wherein the position information comprises longitude/latitude coordinates and is used for describing the current position. The electronic equipment comprises a satellite positioning component, a base station positioning component and a short-distance wireless positioning component.

The satellite positioning component realizes positioning by adopting satellite positioning technologies such as GPS, Beidou, Glonass and/or Galileo.

The base station positioning component realizes positioning by adopting the base station positioning technology such as LBS and the like.

The short-distance wireless positioning component realizes positioning by adopting short-distance wireless positioning technologies such as Wi-Fi positioning, UWB triangulation positioning, Bluetooth positioning and the like.

When the position information of the current position cannot be obtained through the positioning of the satellite positioning component (for example, when the electronic equipment is located in an environment where satellite positioning signals such as indoor and the like are shielded, the satellite positioning component cannot perform positioning), the electronic equipment obtains the position information of the current position through the cooperative positioning of the base station positioning component and the short-distance wireless positioning component so as to ensure the accuracy of the position information.

It should be noted that, in the embodiment of the present application, a corresponding relationship between position information and scene information is set in advance in an electronic device and is used to describe scenes corresponding to different positions, for example, a position information describes a position a, and i scene information corresponding to the position a describes an i scene, that is, it indicates that a scene corresponding to the position a is an i scene. The corresponding relationship between the position information and the scene information may be in the form of a scene comparison table, as shown in the following table:

position information A, position information B, and position information C i scene information
D position information j scene information and k scene information
E position information Information of l scene

It can be seen that, in the embodiment of the present application, multiple pieces of location information may correspond to the same piece of scene information, the same piece of location information may correspond to multiple pieces of scene information, and one piece of location information may correspond to one piece of location information.

And 203, the electronic equipment transmits the equipment information and the scene information to a server.

It should be noted that in the embodiment of the present application, a server is configured to maintain noise reduction parameters in a unified manner, where the server is provided with a noise reduction parameter library, and multiple sets of noise reduction parameters are stored in the noise reduction parameter library, and a correspondence between < device information, scene information > and noise reduction parameters is preset. The group of < device information, scene information > may correspond to a plurality of groups of noise reduction parameters, or may correspond to a group of noise reduction parameters, which may be specifically set by a person skilled in the art according to actual needs.

For example, for a certain headphone, a general noise reduction parameter suitable for the headphone to perform noise reduction processing may be generated in advance, and then, for different scenes, the general noise reduction parameter is adaptively adjusted to obtain a noise reduction parameter suitable for the headphone to perform noise reduction in different scenes.

In the embodiment of the application, when the electronic device acquires the noise reduction parameters matched with the device information and the scene information, the electronic device may generate a noise reduction parameter acquisition request according to a message format agreed with a server in advance, where the noise reduction parameter acquisition request carries the device information and the scene information acquired by the electronic device; and then, sending the generated noise reduction parameter acquisition request to a server, and indicating the server to return noise reduction parameters which are matched with the device information and the scene information carried in the noise reduction parameter acquisition request at the same time.

204, the electronic device receives the noise reduction parameters matched with the device information and the scene information returned by the server, wherein the server returns the noise reduction parameters with the highest corresponding score values in the noise reduction parameters when the noise reduction parameters matched with the device information and the scene information are multiple.

On the other hand, after receiving the noise reduction parameter acquisition request from the electronic device, the server analyzes the device information and the scene information carried by the noise reduction parameter acquisition request, searches for the noise reduction parameter simultaneously matched with the analyzed device information and scene information according to the preset corresponding relation between the < device information, scene information > and the noise reduction parameter, and returns the noise reduction parameter to the electronic device.

Correspondingly, the electronic device receiving server obtains the noise reduction parameters returned by the request according to the noise reduction parameters, namely the noise reduction parameters which are simultaneously matched with the device information of the earphone and the scene information of the current position, namely the noise reduction parameters suitable for noise reduction of the earphone in the scene corresponding to the current position.

In addition, when the server returns the noise reduction parameter value to the electronic device, if a plurality of noise reduction parameters with which the device information and the scene information are simultaneously matched exist, the noise reduction parameter with the highest corresponding score value is screened from the plurality of noise reduction parameters, and the noise reduction parameter is returned to the electronic device as the optimal noise reduction parameter.

In addition, the server may further update the noise reduction parameter of which the score reaches a preset score, where a value of the preset score is not specifically limited in the embodiment of the present application and may be taken by a person of ordinary skill in the art according to actual needs.

When the server historically sends the noise reduction parameters to other electronic devices, the score is obtained according to user scores fed back by the other electronic devices, for example, taking a certain noise reduction parameter as an example, the server may accumulate user scores returned by all other devices receiving the noise reduction parameter, and the accumulated sum is used as the score of the noise reduction parameter.

And 205, the electronic equipment generates a corresponding noise reduction plug-in according to the noise reduction parameters.

In the embodiment of the application, after the electronic device acquires the noise reduction parameters which are simultaneously matched with the device information and the scene information, according to a preset plug-in generation rule matched with the earphone (namely, the earphone which is in communication connection with the electronic device), the electronic device generates the corresponding noise reduction plug-in according to the acquired noise reduction parameters.

The electronic device provides the noise reduction plug-in to the headset and instructs the headset to load the noise reduction plug-in for noise reduction processing by the loaded noise reduction plug-in 206.

And the electronic equipment provides the generated noise reduction plug-in for the earphone through the communication connection between the electronic equipment and the earphone, and instructs the earphone to load the noise reduction plug-in.

On the other hand, after the earphone receives the noise reduction plug-in provided by the electronic device, the noise reduction plug-in is loaded according to the indication of the electronic device, so that the noise reduction processing can be performed according to the noise reduction plug-in to obtain the optimal noise reduction effect.

The embodiment of the application also provides a device for reducing the noise of the earphone. Referring to fig. 4, fig. 4 is a schematic structural diagram of a noise reduction device for a headset according to an embodiment of the present disclosure. The device for reducing the noise of the earphone is applied to electronic equipment, and comprises an equipment information acquisition module 301, a scene information acquisition module 302, a noise reduction parameter acquisition module 303 and a noise reduction parameter issuing module 304, as follows:

the device information acquiring module 301 is configured to acquire device information of the headset after establishing communication connection with the headset;

a scene information obtaining module 302, configured to obtain position information of a current position, and determine scene information corresponding to the current position according to the position information;

a noise reduction parameter obtaining module 303, configured to obtain noise reduction parameters matched with the device information and the scene information;

and a noise reduction parameter issuing module 304, configured to provide the noise reduction parameter to the earphone, and instruct the earphone to perform noise reduction processing according to the noise reduction parameter.

In an embodiment, when the noise reduction parameters matching the device information and the scene information are obtained, the noise reduction parameter obtaining module 303 is configured to:

sending the equipment information and the scene information to a server;

receiving noise reduction parameters matched with the equipment information and the scene information and returned by the server;

when the server has a plurality of noise reduction parameters matched with the equipment information and the scene information, the server returns the noise reduction parameters with the highest corresponding score values in the plurality of noise reduction parameters.

In an embodiment, before sending the device information and the scene information to the server, the noise reduction parameter obtaining module 303 is further configured to:

identifying whether noise reduction parameters matched with the equipment information and the scene information are stored locally;

and when the noise reduction parameters matched with the equipment information and the scene information are not stored locally, sending the equipment information and the scene information to a server.

In an embodiment, after receiving the noise reduction parameters returned by the server and matching the device information and the scene information, the noise reduction parameter obtaining module 303 is further configured to:

and storing the noise reduction parameters matched with the equipment information and the scene information returned by the server according to a preset storage path.

In an embodiment, when the noise reduction parameter is provided to the headphone and the headphone is instructed to perform noise reduction processing according to the noise reduction parameter, the noise reduction parameter issuing module 304 is configured to:

generating a corresponding noise reduction plug-in according to the noise reduction parameters;

and providing the noise reduction plug-in for the earphone, and instructing the earphone to load the noise reduction plug-in so as to carry out noise reduction processing through the noise reduction plug-in.

In an embodiment, when determining the scene information corresponding to the current location according to the location information, the scene information obtaining module 302 is configured to:

when a plurality of pieces of scene information corresponding to the current position are determined according to the position information;

and acquiring audio data of the current position, and screening out one scene information from the plurality of scene information according to the audio data.

In an embodiment, before the noise reduction parameters matching the device information and the scene information are obtained, the noise reduction parameter obtaining module 303 is further configured to:

identifying whether a target application corresponding to the scene information is currently operated;

and if the target application is currently operated, acquiring noise reduction parameters matched with the equipment information and the scene information.

It should be noted that the earphone noise reduction device provided in the embodiment of the present application and the earphone noise reduction method in the above embodiment belong to the same concept, and any method provided in the embodiment of the earphone noise reduction method may be run on the earphone noise reduction device, and a specific implementation process thereof is detailed in the embodiment of the earphone noise reduction method, and is not described herein again.

The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when the stored computer program is executed on a computer, causes the computer to execute the steps in the noise reduction method for a headset as provided by the embodiment of the present application. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.

Referring to fig. 5, the electronic device includes a processor 401 and a memory 402, wherein the processor 401 is electrically connected to the memory 402.

The processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by running or loading a computer program stored in the memory 402 and calling data stored in the memory 402.

The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.

In this embodiment, the processor 401 in the electronic device loads instructions corresponding to one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions, as follows:

after establishing communication connection with the earphone, acquiring equipment information of the earphone;

acquiring position information of a current position, and determining scene information corresponding to the current position according to the position information;

acquiring noise reduction parameters matched with the equipment information and the scene information;

and providing the noise reduction parameters for the earphone, and indicating the earphone to carry out noise reduction processing according to the noise reduction parameters.

In an embodiment, in obtaining the noise reduction parameters matching the device information and the scene information, the processor 401 performs:

sending the equipment information and the scene information to a server;

receiving noise reduction parameters matched with the equipment information and the scene information and returned by the server;

when the server has a plurality of noise reduction parameters matched with the equipment information and the scene information, the server returns the noise reduction parameters with the highest corresponding score values in the plurality of noise reduction parameters.

In an embodiment, before sending the device information and the scenario information to the server, the processor 401 further performs:

identifying whether noise reduction parameters matched with the equipment information and the scene information are stored locally;

and when the noise reduction parameters matched with the equipment information and the scene information are not stored locally, sending the equipment information and the scene information to a server.

In an embodiment, after receiving the noise reduction parameters matching the device information and the scene information returned by the server, the processor 401 further performs:

and storing the noise reduction parameters matched with the equipment information and the scene information returned by the server according to a preset storage path.

In one embodiment, when the noise reduction parameters are provided to the headphones and the headphones are instructed to perform noise reduction processing according to the noise reduction parameters, the processor 401 performs:

generating a corresponding noise reduction plug-in according to the noise reduction parameters;

and providing the noise reduction plug-in for the earphone, and instructing the earphone to load the noise reduction plug-in so as to carry out noise reduction processing through the noise reduction plug-in.

In an embodiment, when determining scene information corresponding to a current location according to the location information, the processor 401 performs:

when a plurality of pieces of scene information corresponding to the current position are determined according to the position information;

and acquiring audio data of the current position, and screening out one scene information from the plurality of scene information according to the audio data.

In an embodiment, before obtaining the noise reduction parameters matching the device information and the scene information, the processor 401 further performs:

identifying whether a target application corresponding to the scene information is currently operated;

and if the target application is currently operated, acquiring noise reduction parameters matched with the equipment information and the scene information.

It should be noted that the electronic device provided in the embodiment of the present application and the method for reducing noise of an earphone in the foregoing embodiments belong to the same concept, and any method provided in the embodiment of the method for reducing noise of an earphone may be run on the electronic device, and a specific implementation process thereof is described in detail in the embodiment of the feature extraction method, and is not described herein again.

It should be noted that, for the earphone noise reduction method of the embodiment of the present application, it may be understood by a person skilled in the art that all or part of the process of implementing the earphone noise reduction method of the embodiment of the present application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and during the execution, the process of the embodiment of the earphone noise reduction method may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.

For the earphone noise reduction device in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.

The method, the apparatus, the storage medium, and the electronic device for reducing noise of an earphone provided by the embodiments of the present application are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present application, and the description of the embodiments above is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:耳机降噪方法、装置、存储介质及降噪耳机

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类