CN115037831B - Mode control method and device, electronic equipment and earphone - Google Patents

Mode control method and device, electronic equipment and earphone Download PDF

Info

Publication number
CN115037831B
CN115037831B CN202110247155.5A CN202110247155A CN115037831B CN 115037831 B CN115037831 B CN 115037831B CN 202110247155 A CN202110247155 A CN 202110247155A CN 115037831 B CN115037831 B CN 115037831B
Authority
CN
China
Prior art keywords
keyword
mode
earphone
headset
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110247155.5A
Other languages
Chinese (zh)
Other versions
CN115037831A (en
Inventor
陈嘉琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Oneplus Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN202110247155.5A priority Critical patent/CN115037831B/en
Publication of CN115037831A publication Critical patent/CN115037831A/en
Application granted granted Critical
Publication of CN115037831B publication Critical patent/CN115037831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G—PHYSICS
    • G10—MUSICAL INSTRUMENTS; ACOUSTICS
    • G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00—Speech recognition
    • G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04M—TELEPHONIC COMMUNICATION
    • H04M1/00—Substation equipment, e.g. for use by subscribers
    • H04M1/60—Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033—Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • H04M1/6041—Portable telephones adapted for handsfree use
    • H04M1/6058—Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone
    • H04M1/6066—Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone including a wireless connection
    • G—PHYSICS
    • G10—MUSICAL INSTRUMENTS; ACOUSTICS
    • G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00—Speech recognition
    • G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/225—Feedback of the input speech
    • Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00—Reducing energy consumption in communication networks
    • Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Headphones And Earphones (AREA)

Abstract

本申请涉及终端技术领域,公开了一种模式控制方法、装置、电子设备及耳机。该模式控制方法,应用于电子设备,电子设备通信连接耳机,该方法包括:接收耳机发送的语音信息;识别语音信息,确定语音信息对应的关键词信息;获取耳机当前的耳机模式;若关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向耳机发送模式切换指令,以使耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式。通过判断语音信息对应的关键词信息是否包含预设的关键词,以向耳机发送模式切换指令,以使耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式,本申请实施例能够智能化控制耳机模式。

The present application relates to the field of terminal technology, and discloses a mode control method, device, electronic device and headset. The mode control method is applied to an electronic device, and the electronic device is connected to a headset for communication. The method includes: receiving voice information sent by the headset; recognizing the voice information, and determining the keyword information corresponding to the voice information; obtaining the current headset mode of the headset; if the keyword information contains a preset keyword, and the current headset mode does not correspond to the preset keyword, a mode switching instruction is sent to the headset so that the headset switches the current headset mode to the headset mode corresponding to the preset keyword. By judging whether the keyword information corresponding to the voice information contains a preset keyword, a mode switching instruction is sent to the headset so that the headset switches the current headset mode to the headset mode corresponding to the preset keyword. The embodiment of the present application can intelligently control the headset mode.

Description

一种模式控制方法、装置、电子设备及耳机Mode control method, device, electronic equipment and earphone

技术领域Technical Field

本申请涉及终端技术领域,尤其涉及一种模式控制方法、装置、电子设备及耳机。The present application relates to the field of terminal technology, and in particular to a mode control method, device, electronic device and earphone.

背景技术Background technique

随着无线耳机技术的不断发展,越来越多的用户开始选择在日常生活中佩戴无线耳机,例如:在工作中佩戴耳机进行隔音,或者,平时生活中佩戴耳机进行游戏、听音乐等,但是,由于耳机与电子设备连接,例如:耳机与手机进行连接,在用户佩戴耳机进行听音乐时,往往无法接听到其他信息,例如:周围人的声音而容易导致错过一些关键的信息,因此,如何控制耳机来增强交互体验是一个需要解决的问题。With the continuous development of wireless headset technology, more and more users are beginning to choose to wear wireless headsets in their daily lives, for example, wearing headsets for noise isolation at work, or wearing headsets for playing games, listening to music, etc. However, since the headsets are connected to electronic devices, such as mobile phones, when users wear headsets to listen to music, they often cannot hear other information, such as the voices of people around them, and may easily miss some key information. Therefore, how to control the headset to enhance the interactive experience is a problem that needs to be solved.

目前,耳机通常通过设置降噪模式来避免外界声音的影响,但是,降噪模式并没有针对性,导致一些特殊情况无法及时响应,从而影响用户的使用体验。现有技术至少存在以下问题:目前在耳机的控制存在交互性不足的问题。At present, headphones usually avoid the influence of external sounds by setting a noise reduction mode, but the noise reduction mode is not targeted, resulting in some special situations not being able to respond in time, thus affecting the user experience. The existing technology has at least the following problems: At present, there is a problem of insufficient interactivity in the control of headphones.

发明内容Summary of the invention

本申请实施例提供一种模式控制方法、装置、电子设备及耳机,其能够智能化控制耳机模式。The embodiments of the present application provide a mode control method, device, electronic device and earphone, which can intelligently control the earphone mode.

第一方面,本申请实施例提供一种模式控制方法,应用于电子设备,所述电子设备通信连接耳机,所述方法包括:In a first aspect, an embodiment of the present application provides a mode control method, which is applied to an electronic device, wherein the electronic device is communicatively connected to a headset, and the method includes:

接收耳机发送的语音信息;Receive voice messages sent by headphones;

识别所述语音信息,确定所述语音信息对应的关键词信息;Recognize the voice information and determine keyword information corresponding to the voice information;

获取耳机当前的耳机模式;Get the current headset mode of the headset;

若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向所述耳机发送模式切换指令,以使所述耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式。If the keyword information includes a preset keyword and the current earphone mode does not correspond to the preset keyword, a mode switching instruction is sent to the earphone to enable the earphone to switch the current earphone mode to the earphone mode corresponding to the preset keyword.

在一些实施例中,在接收耳机发送的语音信息之前,所述方法还包括:In some embodiments, before receiving the voice information sent by the headset, the method further includes:

获取预设的关键词库,其中,所述预设的关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式。A preset keyword library is obtained, wherein the preset keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode.

在一些实施例中,所述预设的关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,In some embodiments, the preset keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode.

所述若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,向所述耳机发送模式切换指令,以使所述耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式,包括:If the keyword information includes a preset keyword, and the current earphone mode does not correspond to the preset keyword, sending a mode switching instruction to the earphone so that the earphone switches the current earphone mode to the earphone mode corresponding to the preset keyword, including:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode and the voice information is recognized to include a first preset keyword, a mode switching instruction is sent to the headset so that the headset switches the noise reduction mode to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将非降噪模式切换成降噪模式。If the current earphone mode is the non-noise reduction mode and it is recognized that the voice information includes the second preset keyword, a mode switching instruction is sent to the earphone to switch the earphone from the non-noise reduction mode to the noise reduction mode.

在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:

若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则不向所述耳机发送模式切换指令。If the keyword information includes a preset keyword, and the current earphone mode corresponds to the preset keyword, no mode switching instruction is sent to the earphone.

第二方面,本申请实施例提供一种模式控制方法,应用于耳机,所述耳机通信连接电子设备,所述方法包括:In a second aspect, an embodiment of the present application provides a mode control method, which is applied to a headset, wherein the headset is communicatively connected to an electronic device, and the method includes:

获取语音信息;Get voice information;

向电子设备发送语音信息;Send voice messages to electronic devices;

向电子设备发送当前的耳机模式;Sending the current headset mode to the electronic device;

当接收到模式切换指令时,切换当前的耳机模式。When a mode switching instruction is received, the current headset mode is switched.

在一些实施例中,所述耳机模式包括降噪模式和非降噪模式,所述当接收到模式切换指令时,切换当前的耳机模式的步骤包括:In some embodiments, the headphone mode includes a noise reduction mode and a non-noise reduction mode, and when a mode switching instruction is received, the step of switching the current headphone mode includes:

若当前的耳机模式为降噪模式,根据模式切换指令将当前的耳机模式切换成非降噪模式;If the current headphone mode is the noise reduction mode, switch the current headphone mode to the non-noise reduction mode according to the mode switching instruction;

若当前的耳机模式为非降噪模式,根据模式切换指令将当前的耳机模式切换成降噪模式。If the current headphone mode is a non-noise reduction mode, the current headphone mode is switched to a noise reduction mode according to the mode switching instruction.

第三方面,本申请实施例提供一种模式控制方法,应用于电子设备,所述电子设备通信连接耳机,所述方法包括:In a third aspect, an embodiment of the present application provides a mode control method, which is applied to an electronic device, wherein the electronic device is communicatively connected to a headset, and the method includes:

获取关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;Acquire a keyword library, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode;

向耳机发送所述关键词库。The keyword library is sent to the headset.

在一些实施例中,所述方法包括:In some embodiments, the method comprises:

当所述电子设备中的关键词库被更新之后,向所述耳机发送更新后的所述关键词库,以使所述耳机更新自身存储的关键词库。After the keyword library in the electronic device is updated, the updated keyword library is sent to the headset, so that the headset updates the keyword library stored in itself.

第四方面,本申请实施例提供一种模式控制方法,应用于耳机,所述耳机通信连接电子设备,所述方法包括:In a fourth aspect, an embodiment of the present application provides a mode control method, which is applied to a headset, wherein the headset is communicatively connected to an electronic device, and the method includes:

获取语音信息;Get voice information;

识别所述语音信息,确定所述语音信息对应的关键词信息;Recognize the voice information and determine keyword information corresponding to the voice information;

若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式。If the keyword information includes a preset keyword, and the current earphone mode does not correspond to the preset keyword, the current earphone mode is switched to an earphone mode corresponding to the preset keyword.

在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:

接收所述电子设备发送的关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;Receiving a keyword library sent by the electronic device, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode;

根据所述关键词库,确定所述关键词信息中是否包含预设的关键词。According to the keyword library, it is determined whether the keyword information contains preset keywords.

在一些实施例中,所述关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,In some embodiments, the keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode.

所述若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式,包括:If the keyword information includes a preset keyword, and the current earphone mode does not correspond to the preset keyword, switching the current earphone mode to an earphone mode corresponding to the preset keyword includes:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode, and the voice information is recognized to include the first preset keyword, the noise reduction mode is switched to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则将非降噪模式切换成降噪模式。If the current earphone mode is a non-noise reduction mode and it is recognized that the voice information includes a second preset keyword, the non-noise reduction mode is switched to the noise reduction mode.

在一些实施例中,所述方法还包括:若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则保持当前的耳机模式。In some embodiments, the method further includes: if the keyword information includes a preset keyword, and the current headphone mode corresponds to the preset keyword, maintaining the current headphone mode.

第五方面,本申请实施例提供一种模式控制装置,应用于电子设备,所述电子设备通信连接耳机,所述装置包括:In a fifth aspect, an embodiment of the present application provides a mode control device, which is applied to an electronic device, wherein the electronic device is communicatively connected to a headset, and the device includes:

语音信息接收单元,用于接收耳机发送的语音信息;A voice information receiving unit, used for receiving voice information sent by the earphone;

关键词信息识别单元,用于识别所述语音信息,确定所述语音信息对应的关键词信息;A keyword information recognition unit, used to recognize the voice information and determine the keyword information corresponding to the voice information;

耳机模式获取单元,用于获取耳机当前的耳机模式;A headset mode acquisition unit, used to acquire the current headset mode of the headset;

模式切换单元,用于若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向所述耳机发送模式切换指令,以使所述耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式。A mode switching unit is used to send a mode switching instruction to the headset if the keyword information contains a preset keyword and the current headset mode does not correspond to the preset keyword, so that the headset switches the current headset mode to the headset mode corresponding to the preset keyword.

在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:

关键词库获取单元,用于获取预设的关键词库,其中,所述预设的关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式。The keyword library acquisition unit is used to acquire a preset keyword library, wherein the preset keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode.

在一些实施例中,所述预设的关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,In some embodiments, the preset keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode.

所述模式切换单元,具体用于:The mode switching unit is specifically used for:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode and the voice information is recognized to include a first preset keyword, a mode switching instruction is sent to the headset so that the headset switches the noise reduction mode to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将非降噪模式切换成降噪模式。If the current earphone mode is the non-noise reduction mode and the voice information is recognized to include the second preset keyword, a mode switching instruction is sent to the earphone to switch the earphone from the non-noise reduction mode to the noise reduction mode.

在一些实施例中,所述模式切换单元还用于:In some embodiments, the mode switching unit is further configured to:

若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则不向所述耳机发送模式切换指令。If the keyword information includes a preset keyword, and the current earphone mode corresponds to the preset keyword, no mode switching instruction is sent to the earphone.

第六方面,本申请实施例提供一种模式控制装置,应用于耳机,所述耳机通信连接电子设备,所述装置包括:In a sixth aspect, an embodiment of the present application provides a mode control device, which is applied to a headset, wherein the headset is communicatively connected to an electronic device, and the device includes:

语音信息获取单元,用于获取语音信息;A voice information acquisition unit, used to acquire voice information;

语音信息发送单元,用于向电子设备发送语音信息;A voice information sending unit, used for sending voice information to an electronic device;

耳机模式反馈单元,用于向电子设备发送当前的耳机模式;A headphone mode feedback unit, used for sending the current headphone mode to the electronic device;

模式切换单元,用于当接收到模式切换指令时,切换当前的耳机模式。The mode switching unit is used to switch the current earphone mode when receiving a mode switching instruction.

在一些实施例中,所述耳机模式包括降噪模式和非降噪模式,所述模式切换单元还用于:In some embodiments, the headphone mode includes a noise reduction mode and a non-noise reduction mode, and the mode switching unit is further configured to:

若当前的耳机模式为降噪模式,根据模式切换指令将当前的耳机模式切换成非降噪模式;If the current headphone mode is the noise reduction mode, switch the current headphone mode to the non-noise reduction mode according to the mode switching instruction;

若当前的耳机模式为非降噪模式,根据模式切换指令将当前的耳机模式切换成降噪模式。If the current headphone mode is a non-noise reduction mode, the current headphone mode is switched to a noise reduction mode according to the mode switching instruction.

第七方面,本申请实施例提供一种模式控制装置,应用于电子设备,所述电子设备通信连接耳机,所述装置包括:In a seventh aspect, an embodiment of the present application provides a mode control device, which is applied to an electronic device, wherein the electronic device is communicatively connected to a headset, and the device includes:

关键词库获取单元,用于获取关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;A keyword library acquisition unit, used to acquire a keyword library, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode;

关键词库发送单元,用于向耳机发送所述关键词库。The keyword library sending unit is used to send the keyword library to the headset.

在一些实施例中,所述关键词库发送单元还用于:In some embodiments, the keyword library sending unit is further used to:

当所述电子设备中的关键词库被更新之后,向所述耳机发送所述关键词库,以使所述耳机更新自身存储的关键词库。After the keyword library in the electronic device is updated, the keyword library is sent to the headset so that the headset updates the keyword library stored in itself.

第八方面,本申请实施例提供一种模式控制装置,应用于耳机,所述耳机通信连接一电子设备,所述装置包括:In an eighth aspect, an embodiment of the present application provides a mode control device, which is applied to a headset, wherein the headset is communicatively connected to an electronic device, and the device includes:

语音信息获取单元,用于获取语音信息;A voice information acquisition unit, used to acquire voice information;

关键词信息识别单元,用于识别所述语音信息,确定所述语音信息对应的关键词信息;A keyword information recognition unit, used to recognize the voice information and determine the keyword information corresponding to the voice information;

模式切换单元,用于若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式。The mode switching unit is used to switch the current headphone mode to a headphone mode corresponding to the preset keyword if the keyword information contains a preset keyword and the current headphone mode does not correspond to the preset keyword.

在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:

关键词库接收单元,用于接收所述电子设备发送的关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;所述关键词信息识别单元,具体用于根据所述关键词库,确定所述关键词信息中是否包含预设的关键词。The keyword library receiving unit is used to receive the keyword library sent by the electronic device, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode; the keyword information identification unit is specifically used to determine whether the keyword information contains a preset keyword based on the keyword library.

在一些实施例中,所述关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,In some embodiments, the keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode.

所述模式切换单元,具体用于:The mode switching unit is specifically used for:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode, and the voice information is recognized to include the first preset keyword, the noise reduction mode is switched to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则将非降噪模式切换成降噪模式。If the current earphone mode is a non-noise reduction mode and it is recognized that the voice information includes a second preset keyword, the non-noise reduction mode is switched to the noise reduction mode.

在一些实施例中,所述模式切换单元还用于:若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则保持当前的耳机模式。In some embodiments, the mode switching unit is further configured to: if the keyword information includes a preset keyword, and the current headphone mode corresponds to the preset keyword, maintain the current headphone mode.

第九方面,本申请实施例提供一种电子设备,包括:In a ninth aspect, an embodiment of the present application provides an electronic device, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上所述第一方面或第三方面所述的模式控制方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the mode control method described in the first aspect or the third aspect as described above.

第十方面,本申请实施例提供一种耳机,包括:In a tenth aspect, an embodiment of the present application provides an earphone, comprising:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上所述第二方面或第四方面所述的模式控制方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the mode control method described in the second aspect or the fourth aspect as described above.

第十一方面,本申请实施例提供一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使电子设备执行如上第一方面或第三方面所述的模式控制方法。In the eleventh aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable an electronic device to execute the mode control method described in the first aspect or the third aspect above.

第十二方面,本申请实施例提供一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使耳机执行如上第二方面或第四方面所述的模式控制方法。In the twelfth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the headset to execute the mode control method described in the second aspect or the fourth aspect above.

第十三方面,本申请实施例提供一种计算机程序,所述计算机程序包含程序指令,在所述程序指令由电子设备中的一个或多个处理器执行时,使所述电子设备执行上述第一方面或第三方面所述的模式控制方法。In the thirteenth aspect, an embodiment of the present application provides a computer program, which includes program instructions. When the program instructions are executed by one or more processors in an electronic device, the electronic device executes the mode control method described in the first or third aspect above.

第十四方面,本申请实施例提供一种计算机程序,所述计算机程序包含程序指令,在所述程序指令由耳机中的一个或多个处理器执行时,使所述耳机执行上述第二方面或第四方面所述的模式控制方法。In a fourteenth aspect, an embodiment of the present application provides a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by one or more processors in the headset, the headset executes the mode control method described in the second aspect or the fourth aspect above.

本申请实施例的有益效果是:区别于现有技术的情况下,本申请实施例提供的模式控制方法,通过判断语音信息对应的关键词信息是否包含预设的关键词,若关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向耳机发送模式切换指令,以使耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式,本申请实施例能够智能化控制耳机模式。The beneficial effect of the embodiments of the present application is as follows: different from the prior art, the mode control method provided by the embodiments of the present application determines whether the keyword information corresponding to the voice information contains preset keywords. If the keyword information contains preset keywords and the current headphone mode does not correspond to the preset keywords, a mode switching instruction is sent to the headset to enable the headset to switch the current headphone mode to the headphone mode corresponding to the preset keywords. The embodiments of the present application can intelligently control the headphone mode.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件或模块,除非有特别申明,附图中的图不构成比例限制。One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements or modules, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

图1是本申请实施例提供的一种通信系统的示意图;FIG1 is a schematic diagram of a communication system provided in an embodiment of the present application;

图2是本申请实施例一提供的一种模式控制方法的流程示意图;FIG2 is a flow chart of a mode control method provided in Embodiment 1 of the present application;

图3是本申请实施例一提供的另一种模式控制方法的流程示意图;FIG3 is a flow chart of another mode control method provided in Embodiment 1 of the present application;

图4是本申请实施例二提供的一种模式控制方法的流程示意图;FIG4 is a flow chart of a mode control method provided in Embodiment 2 of the present application;

图5是本申请实施例二提供的另一种模式控制方法的流程示意图;FIG5 is a flow chart of another mode control method provided in Embodiment 2 of the present application;

图6是本申请实施例三提供的一种模式控制装置的结构示意图;FIG6 is a schematic diagram of the structure of a mode control device provided in Embodiment 3 of the present application;

图7是本申请实施例三提供的另一种模式控制装置的结构示意图;FIG7 is a schematic diagram of the structure of another mode control device provided in Embodiment 3 of the present application;

图8是本申请实施例四提供的一种模式控制装置的结构示意图;FIG8 is a schematic diagram of the structure of a mode control device provided in Embodiment 4 of the present application;

图9是本申请实施例四提供的另一种模式控制装置的结构示意图;FIG9 is a schematic diagram of the structure of another mode control device provided in Embodiment 4 of the present application;

图10是本申请实施例五提供的一种电子设备的结构示意图;FIG10 is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present application;

图11是本申请实施例六提供的一种耳机的结构示意图。FIG11 is a schematic diagram of the structure of an earphone provided in Example 6 of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

需要说明的是,如果不冲突,本申请实施例中的各个特征可以相互结合,均在本申请的保护范围之内。另外,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。再者,本申请所采用的“第一”、“第二”、“第三”等字样并不对数据和执行次序进行限定,仅是对功能和作用基本相同的相同项或相似项进行区分。It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

对本申请进行详细说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释。Before explaining the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

(1)耳机模式,指的是耳机当前的工作模式,其包括降噪模式和非降噪模式,其中,所述降噪模式为处于播放状态的一种模式,非降噪模式可以包括多种模式,例如:静音模式、非降噪播放模式等模式。(1) Headphone mode refers to the current working mode of the headphones, which includes a noise reduction mode and a non-noise reduction mode. The noise reduction mode is a mode in a playback state, and the non-noise reduction mode may include multiple modes, such as a silent mode, a non-noise reduction playback mode, and the like.

需要说明的是,在本申请的实施例中,该电子设备可以是移动终端,还可以是PC机(Personal Computer,个人计算机),该移动终端可以是智能手机、平板电脑、个人数字助理、音响等具有各种操作系统的硬件设备。其中,该电子设备上需具备通信模块,以实现与耳机直接的通信,可以理解的是,所述电子设备上还包括基带等通信模块,以实现与其他电子设备之间的通话功能。It should be noted that in the embodiments of the present application, the electronic device can be a mobile terminal or a PC (Personal Computer), and the mobile terminal can be a smart phone, tablet computer, personal digital assistant, stereo and other hardware devices with various operating systems. Among them, the electronic device needs to have a communication module to achieve direct communication with the headset. It can be understood that the electronic device also includes a baseband and other communication modules to achieve the call function with other electronic devices.

请参阅图1,图1是本申请实施例提供的一种通信系统的示意图;Please refer to FIG1 , which is a schematic diagram of a communication system provided in an embodiment of the present application;

如图1所示,该通信系统包括电子设备和耳机,其中,所述耳机包括左耳机以及右耳机,其中,所述电子设备与所述左耳机和右耳机通过蓝牙进行通信连接,用于实现所述电子设备与所述左耳机和右耳机之间的通信连接,以使所述电子设备与所述左耳机和右耳机能够进行数据传输。其中,所述左耳机和所述右耳机之间也通过蓝牙进行通信连接,以实现两者之间的数据传输。可以理解的是,所述电子设备、所述左耳机、右耳机均包括通信模块,其中,所述电子设备还包括触控屏等其他部件,其属于现有技术的范畴,在此不再赘述。As shown in FIG1 , the communication system includes an electronic device and earphones, wherein the earphones include a left earphone and a right earphone, wherein the electronic device is communicatively connected to the left earphone and the right earphone via Bluetooth, for realizing a communication connection between the electronic device and the left earphone and the right earphone, so that the electronic device and the left earphone and the right earphone can perform data transmission. The left earphone and the right earphone are also communicatively connected via Bluetooth to realize data transmission therebetween. It can be understood that the electronic device, the left earphone, and the right earphone all include a communication module, wherein the electronic device also includes other components such as a touch screen, which belong to the scope of the prior art and will not be described in detail here.

实施例一Embodiment 1

请参阅图2,图2是本申请实施例一提供的一种模式控制方法的流程示意图;Please refer to FIG. 2 , which is a flow chart of a mode control method provided in Embodiment 1 of the present application;

其中,该模式控制方法,应用于电子设备,所述耳机通信连接所述电子设备,在本申请实施例中,所述耳机包括无线耳机,例如:蓝牙耳机,具体的,该模式控制方法的执行主体为所述电子设备的至少一个处理器。Among them, the mode control method is applied to an electronic device, and the headset is communicatively connected to the electronic device. In an embodiment of the present application, the headset includes a wireless headset, such as a Bluetooth headset. Specifically, the executor of the mode control method is at least one processor of the electronic device.

如图2所示,该模式控制方法,包括:As shown in FIG. 2 , the mode control method includes:

步骤S201:接收耳机发送的语音信息;Step S201: receiving voice information sent by the earphone;

具体的,所述耳机包括收音单元,用于接收语音信息,其中,所述语音信息为用户本人或其他用户的语音信息,其中,所述耳机包括第一耳机和第二耳机,即左耳机和右耳机,其中,所述左耳机包括第一收音单元,所述右耳机包括第二收音单元,所述语音信息由所述第一收音单元和/或第二收音单元获取。Specifically, the earphone includes a sound receiving unit for receiving voice information, wherein the voice information is voice information of the user himself or other users, wherein the earphone includes a first earphone and a second earphone, i.e. a left earphone and a right earphone, wherein the left earphone includes a first sound receiving unit, and the right earphone includes a second sound receiving unit, and the voice information is acquired by the first sound receiving unit and/or the second sound receiving unit.

步骤S202:识别所述语音信息,确定所述语音信息对应的关键词信息;Step S202: Identify the voice information and determine keyword information corresponding to the voice information;

具体的,所述电子设备接收所述耳机发送的语音信息,将所述语音信息转换为文本信息,并对所述文本信息进行识别,以确定所述文本信息中的关键词信息,其中,所述关键词信息包括词语,例如:名词、动词等词语。Specifically, the electronic device receives voice information sent by the headset, converts the voice information into text information, and identifies the text information to determine keyword information in the text information, wherein the keyword information includes words, such as nouns, verbs, and other words.

步骤S203:获取耳机当前的耳机模式。Step S203: Obtain the current headphone mode of the headphone.

具体的,电子设备通信连接耳机时,电子设备可以通过请求的方式向耳机获取耳机当前的耳机模式,或者,耳机可以主动向电子设备反馈耳机当前的耳机模式。其中,所述耳机模式可以包括降噪模式和非降噪模式。Specifically, when the electronic device is connected to the headset for communication, the electronic device can obtain the current headset mode of the headset from the headset by request, or the headset can actively feedback the current headset mode of the headset to the electronic device. The headset mode may include a noise reduction mode and a non-noise reduction mode.

步骤S204:若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向所述耳机发送模式切换指令,以使所述耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式。Step S204: If the keyword information includes a preset keyword and the current earphone mode does not correspond to the preset keyword, a mode switching instruction is sent to the earphone to enable the earphone to switch the current earphone mode to the earphone mode corresponding to the preset keyword.

其中,若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则不向所述耳机发送模式切换指令。If the keyword information includes a preset keyword and the current earphone mode corresponds to the preset keyword, no mode switching instruction is sent to the earphone.

其中,所述预设的关键词由用户预先设置,例如:接收用户输入的关键词,建立预设的关键词库。The preset keywords are pre-set by the user, for example, receiving keywords input by the user and establishing a preset keyword library.

具体的,获取预设的关键词库,其中,所述预设的关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式。Specifically, a preset keyword library is obtained, wherein the preset keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode.

具体的,所述预设的关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,所述若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,向所述耳机发送模式切换指令,以使所述耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式,包括:Specifically, the preset keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode, and if the keyword information includes a preset keyword and the current headphone mode does not correspond to the preset keyword, sending a mode switching instruction to the headphone so that the headphone switches the current headphone mode to the headphone mode corresponding to the preset keyword, including:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode and the voice information is recognized to include a first preset keyword, a mode switching instruction is sent to the headset so that the headset switches the noise reduction mode to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将非降噪模式切换成降噪模式。If the current earphone mode is the non-noise reduction mode and it is recognized that the voice information includes the second preset keyword, a mode switching instruction is sent to the earphone to switch the earphone from the non-noise reduction mode to the noise reduction mode.

具体的,将所述关键词信息中的每一词语与所述预设的关键词库进行比对,若至少有一个词语比对成功,则证明存在预设的关键词,并进一步根据比对成功的是词语属于第一预设关键词还是第二预设关键词,从而确定所述语音信息中是否包含第一预设关键词或者第二预设关键词。Specifically, each word in the keyword information is compared with the preset keyword library. If at least one word is successfully compared, it is proved that the preset keyword exists, and further, based on whether the successfully compared word belongs to the first preset keyword or the second preset keyword, it is determined whether the voice information contains the first preset keyword or the second preset keyword.

请再参阅图3,图3是本申请实施例一提供的另一种模式控制方法的流程示意图;其中,该模式控制方法,应用于耳机,所述耳机通信连接电子设备。Please refer to FIG. 3 again, which is a flow chart of another mode control method provided in the first embodiment of the present application; wherein the mode control method is applied to a headset, and the headset is communicatively connected to an electronic device.

如图3所示,该模式控制方法,包括:As shown in FIG3 , the mode control method includes:

步骤S301:获取语音信息。Step S301: Acquire voice information.

具体的,所述耳机包括收音单元,用于获取语音信息,其中,所述语音信息为用户本人或其他用户的语音信息,其中,所述耳机包括第一耳机和第二耳机,即左耳机和右耳机,其中,所述左耳机包括第一收音单元,所述右耳机包括第二收音单元,所述语音信息由所述第一收音单元和/或第二收音单元获取。Specifically, the earphone includes a sound receiving unit for obtaining voice information, wherein the voice information is voice information of the user himself or other users, wherein the earphone includes a first earphone and a second earphone, i.e. a left earphone and a right earphone, wherein the left earphone includes a first sound receiving unit, and the right earphone includes a second sound receiving unit, and the voice information is obtained by the first sound receiving unit and/or the second sound receiving unit.

步骤S302:向电子设备发送语音信息。Step S302: Sending voice information to the electronic device.

具体的,耳机可以将获取的语音信息实时发送到电子设备。Specifically, the earphone can send the acquired voice information to the electronic device in real time.

步骤S303:当接收到模式切换指令时,切换当前的耳机模式。Step S303: When a mode switching instruction is received, the current earphone mode is switched.

具体的,所述耳机模式包括降噪模式和非降噪模式,当接收到模式切换指令时,切换当前的耳机模式,包括:Specifically, the headphone mode includes a noise reduction mode and a non-noise reduction mode. When a mode switching instruction is received, the current headphone mode is switched, including:

若当前的耳机模式为降噪模式,根据模式切换指令将当前的耳机模式切换成非降噪模式;If the current headphone mode is the noise reduction mode, switch the current headphone mode to the non-noise reduction mode according to the mode switching instruction;

若当前的耳机模式为非降噪模式,根据模式切换指令将当前的耳机模式切换成降噪模式。If the current headphone mode is a non-noise reduction mode, the current headphone mode is switched to a noise reduction mode according to the mode switching instruction.

在本申请其他变更实施例中,该模式控制方法,还包括:当没有接收到模式切换指令时,保持当前的耳机模式。In other modified embodiments of the present application, the mode control method further includes: when no mode switching instruction is received, maintaining the current headphone mode.

在本申请实施例中,耳机在接收到模式切换指令时,结合其当前的耳机模式,切换所述耳机模式,本申请能够更好地进行模式切换,以提高用户的使用体验。In an embodiment of the present application, when the headset receives a mode switching instruction, it switches the headset mode in combination with its current headset mode. The present application can better perform mode switching to improve the user experience.

实施例二Embodiment 2

请再参阅图4,图4是本申请实施例二提供的一种模式控制方法的流程示意图;其中,该模式控制方法,应用于电子设备,所述电子设备通信连接耳机,在本申请实施例中,所述耳机包括无线耳机,例如:蓝牙耳机,具体的,该模式控制方法的执行主体为所述电子设备的至少一个处理器。Please refer to Figure 4 again, which is a flow chart of a mode control method provided in Example 2 of the present application; wherein the mode control method is applied to an electronic device, wherein the electronic device is communicatively connected to a headset, and in the embodiment of the present application, the headset includes a wireless headset, such as a Bluetooth headset, and specifically, the executor of the mode control method is at least one processor of the electronic device.

如图4所示,该模式控制方法,包括:As shown in FIG4 , the mode control method includes:

步骤S401:获取关键词库。Step S401: Acquire a keyword library.

其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;The keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode;

步骤S402:向耳机发送预设的关键词库;Step S402: sending a preset keyword library to the headset;

具体的,所述耳机设置有存储单元和处理单元,所述存储单元用于存储所述预设的关键词库,所述处理单元用于识别所述语音信息得到关键词信息,以及根据所述关键词库,判断所述关键词信息中是否包含预设的关键词;Specifically, the headset is provided with a storage unit and a processing unit, the storage unit is used to store the preset keyword library, the processing unit is used to identify the voice information to obtain keyword information, and determine whether the keyword information contains preset keywords according to the keyword library;

在本申请实施例中,所述存储单元和所述处理单元通信连接,其中,可以理解的是,本申请实施例中的耳机包括左耳机和右耳机,当左耳机和右耳机中有一个不处于佩戴状态时,其不存在降噪模式和非降噪模式切换的必要性,因此,为了使得本申请实施例中的模式控制方法能够顺利执行,本申请实施例通过在所述左耳机或者右耳机中分别设置存储单元或者处理单元,例如:在所述左耳机中设置处理单元,在所述右耳机中设置存储单元,或者,在所述左耳机中设置存储单元,在所述右耳机中设置处理单元,当左耳机和右耳机的任一耳机不处于佩戴状态或者工作状态时,其处理单元和存储单元不能协同工作,从而保证本申请实施例中的模式控制方法的顺利进行。In an embodiment of the present application, the storage unit and the processing unit are communicatively connected, wherein it can be understood that the earphones in the embodiment of the present application include a left earphone and a right earphone, and when one of the left earphone and the right earphone is not in a wearing state, there is no need to switch between a noise reduction mode and a non-noise reduction mode. Therefore, in order to enable the mode control method in the embodiment of the present application to be executed smoothly, the embodiment of the present application respectively sets a storage unit or a processing unit in the left earphone or the right earphone, for example: a processing unit is set in the left earphone and a storage unit is set in the right earphone, or a storage unit is set in the left earphone and a processing unit is set in the right earphone. When either the left earphone or the right earphone is not in a wearing state or a working state, its processing unit and storage unit cannot work together, thereby ensuring the smooth execution of the mode control method in the embodiment of the present application.

在本申请实施例中,所述方法还包括:In an embodiment of the present application, the method further includes:

当所述电子设备中的关键词库被更新之后,向所述耳机发送所述更新后的关键词库,以使所述耳机更新自身存储的关键词库。After the keyword library in the electronic device is updated, the updated keyword library is sent to the headset so that the headset updates the keyword library stored in itself.

具体的,当所述电子设备中的关键词库被更新之后,所述电子设备向所述耳机发送所述更新后的关键词库,以使所述耳机的存储单元更新其存储的关键词库。Specifically, after the keyword library in the electronic device is updated, the electronic device sends the updated keyword library to the headset, so that the storage unit of the headset updates the keyword library stored therein.

在本申请实施例中,由于在耳机中加入了存储单元和处理单元,因此可以通过向所述耳机发送预设的关键词库,由耳机完成判断,进而进行模式切换,本申请能够智能化控制耳机模式,增强用户体验。In the embodiment of the present application, since a storage unit and a processing unit are added to the headset, a preset keyword library can be sent to the headset, and the headset can make a judgment and then switch the mode. The present application can intelligently control the headset mode and enhance the user experience.

请参阅图5,图5是本申请实施例二提供的另一种模式控制方法的流程图;其中,该模式控制方法,应用于耳机,具体的,应用于耳机的一个或多个处理器。Please refer to FIG. 5 , which is a flow chart of another mode control method provided in Embodiment 2 of the present application; wherein the mode control method is applied to headphones, specifically, to one or more processors of the headphones.

如图5所示,该模式控制方法,包括:As shown in FIG5 , the mode control method includes:

步骤S501:获取语音信息;Step S501: Acquire voice information;

具体的,所述耳机包括收音单元,用于接收语音信息,其中,所述语音信息为用户本人或其他用户的语音信息,其中,所述耳机包括第一耳机和第二耳机,即左耳机和右耳机,其中,所述左耳机包括第一收音单元,所述右耳机包括第二收音单元,所述语音信息由所述第一收音单元和/或第二收音单元获取。Specifically, the earphone includes a sound receiving unit for receiving voice information, wherein the voice information is voice information of the user himself or other users, wherein the earphone includes a first earphone and a second earphone, i.e. a left earphone and a right earphone, wherein the left earphone includes a first sound receiving unit, and the right earphone includes a second sound receiving unit, and the voice information is acquired by the first sound receiving unit and/or the second sound receiving unit.

步骤S502:识别所述语音信息,确定所述语音信息对应的关键词信息;Step S502: Identify the voice information and determine keyword information corresponding to the voice information;

具体的,所述耳机获取到所述语音信息之后,将所述语音信息转换为文本信息,并对所述文本信息进行识别,以确定所述文本信息中的关键词信息,其中,所述关键词信息包括词语,例如:名词、动词等词语。Specifically, after the headset acquires the voice information, it converts the voice information into text information, and recognizes the text information to determine keyword information in the text information, wherein the keyword information includes words, such as nouns, verbs and other words.

步骤S503:若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式。Step S503: If the keyword information includes a preset keyword, and the current earphone mode does not correspond to the preset keyword, the current earphone mode is switched to an earphone mode corresponding to the preset keyword.

具体的,在确定所述语音信息对应的关键词信息之后,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式,其中,所述预设的关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式。Specifically, after determining the keyword information corresponding to the voice information, and the current headphone mode does not correspond to the preset keyword, the current headphone mode is switched to the headphone mode corresponding to the preset keyword, wherein the preset keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode.

具体的,所述预设的关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,Specifically, the preset keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode.

所述若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式,包括:If the keyword information includes a preset keyword, and the current earphone mode does not correspond to the preset keyword, switching the current earphone mode to an earphone mode corresponding to the preset keyword includes:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode, and the voice information is recognized to include the first preset keyword, the noise reduction mode is switched to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则将非降噪模式切换成降噪模式。If the current earphone mode is a non-noise reduction mode and it is recognized that the voice information includes a second preset keyword, the non-noise reduction mode is switched to the noise reduction mode.

具体的,将所述关键词信息中的每一词语与所述预设的关键词库进行比对,若至少有一个词语比对成功,则证明存在预设的关键词,并进一步根据比对成功的是词语属于第一预设关键词还是第二预设关键词,从而确定所述语音信息中是否包含第一预设关键词或者第二预设关键词。Specifically, each word in the keyword information is compared with the preset keyword library. If at least one word is successfully compared, it is proved that the preset keyword exists, and further, based on whether the successfully compared word belongs to the first preset keyword or the second preset keyword, it is determined whether the voice information contains the first preset keyword or the second preset keyword.

在本申请实施例中,所述方法还包括:In an embodiment of the present application, the method further includes:

若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则保持当前的耳机模式。If the keyword information includes a preset keyword, and the current earphone mode corresponds to the preset keyword, the current earphone mode is maintained.

具体的,所述耳机设置有存储单元和处理单元,所述存储单元用于存储所述预设的关键词库,所述处理单元用于识别所述语音信息得到关键词信息,以及根据所述关键词库,判断所述关键词信息中是否包含预设的关键词;Specifically, the headset is provided with a storage unit and a processing unit, the storage unit is used to store the preset keyword library, the processing unit is used to identify the voice information to obtain keyword information, and determine whether the keyword information contains preset keywords according to the keyword library;

在本申请实施例中,所述存储单元和所述处理单元通信连接,其中,可以理解的是,本申请实施例中的耳机包括左耳机和右耳机,当左耳机和右耳机中有一个不处于佩戴状态时,其不存在降噪模式和非降噪模式切换的必要性,因此,为了使得本申请实施例中的模式控制方法能够顺利执行,本申请实施例通过在所述左耳机或者右耳机中分别设置存储单元或者处理单元,例如:在所述左耳机中设置处理单元,在所述右耳机中设置存储单元,或者,在所述左耳机中设置存储单元,在所述右耳机中设置处理单元,当左耳机和右耳机的任一耳机不处于佩戴状态或者工作状态时,其处理单元和存储单元不能协同工作,从而保证本申请实施例中的模式控制方法的顺利进行。In an embodiment of the present application, the storage unit and the processing unit are communicatively connected, wherein it can be understood that the earphones in the embodiment of the present application include a left earphone and a right earphone, and when one of the left earphone and the right earphone is not in a wearing state, there is no need to switch between a noise reduction mode and a non-noise reduction mode. Therefore, in order to enable the mode control method in the embodiment of the present application to be executed smoothly, the embodiment of the present application respectively sets a storage unit or a processing unit in the left earphone or the right earphone, for example: a processing unit is set in the left earphone and a storage unit is set in the right earphone, or a storage unit is set in the left earphone and a processing unit is set in the right earphone. When either the left earphone or the right earphone is not in a wearing state or a working state, its processing unit and storage unit cannot work together, thereby ensuring the smooth execution of the mode control method in the embodiment of the present application.

其中,所述耳机的处理单元根据所述存储单元中存储的关键词库,判断所述关键词信息中是否包含预设的关键词,具体的,将所述关键词信息中的每一词语与所述预设的关键词库进行比对,若至少有一个词语比对成功,则证明存在预设的关键词。Among them, the processing unit of the headset determines whether the keyword information contains preset keywords based on the keyword library stored in the storage unit. Specifically, each word in the keyword information is compared with the preset keyword library. If at least one word is successfully compared, it proves that the preset keyword exists.

本申请实施例提供的模式控制方法,通过耳机获取语音信息并识别得到关键词信息,且在当前的耳机模式与预设的关键词不对应时,将当前的耳机模式切换成与预设的关键词对应的耳机模式。本申请能够提高耳机控制的交互性。The mode control method provided in the embodiment of the present application obtains voice information through the earphone and recognizes keyword information, and when the current earphone mode does not correspond to the preset keyword, the current earphone mode is switched to the earphone mode corresponding to the preset keyword. The present application can improve the interactivity of earphone control.

实施例三Embodiment 3

请参阅图6,图6是本申请实施例三提供的一种模式控制装置的结构示意图;其中,该模式控制装置60,应用于电子设备,具体的,应用于电子设备的一个或多个处理器。Please refer to FIG. 6 , which is a schematic diagram of the structure of a mode control device provided in Embodiment 3 of the present application; wherein the mode control device 60 is applied to an electronic device, specifically, to one or more processors of the electronic device.

如图6所示,该模式控制装置60,应用于电子设备,所述装置包括:As shown in FIG6 , the mode control device 60 is applied to an electronic device, and the device includes:

语音信息接收单元61,用于接收耳机发送的语音信息;A voice information receiving unit 61 is used to receive voice information sent by the earphone;

关键词信息识别单元62,用于识别所述语音信息,确定所述语音信息对应的关键词信息;A keyword information recognition unit 62, used to recognize the voice information and determine the keyword information corresponding to the voice information;

耳机模式获取单元63,用于获取耳机当前的耳机模式;The headset mode acquisition unit 63 is used to acquire the current headset mode of the headset;

模式切换单元64,用于若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向所述耳机发送模式切换指令,以使所述耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式。The mode switching unit 64 is used to send a mode switching instruction to the headset if the keyword information contains a preset keyword and the current headset mode does not correspond to the preset keyword, so that the headset switches the current headset mode to the headset mode corresponding to the preset keyword.

在本申请实施例中,所述装置还包括:In the embodiment of the present application, the device further includes:

关键词库获取单元(图未示),用于获取预设的关键词库,其中,所述预设的关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式。The keyword library acquisition unit (not shown) is used to acquire a preset keyword library, wherein the preset keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode.

在本申请实施例中,所述预设的关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,所述模式切换单元,具体用于:In an embodiment of the present application, the preset keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode, and the mode switching unit is specifically used to:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode and the voice information is recognized to include a first preset keyword, a mode switching instruction is sent to the headset so that the headset switches the noise reduction mode to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则向所述耳机发送模式切换指令,以使所述耳机将非降噪模式切换成降噪模式。If the current earphone mode is the non-noise reduction mode and it is recognized that the voice information includes the second preset keyword, a mode switching instruction is sent to the earphone to switch the earphone from the non-noise reduction mode to the noise reduction mode.

具体的,将所述关键词信息中的每一词语与所述预设的关键词库进行比对,若至少有一个词语比对成功,则证明存在预设的关键词,并进一步根据比对成功的是词语属于第一预设关键词还是第二预设关键词,从而确定所述语音信息中是否包含第一预设关键词或者第二预设关键词。Specifically, each word in the keyword information is compared with the preset keyword library. If at least one word is successfully compared, it is proved that the preset keyword exists, and further, based on whether the successfully compared word belongs to the first preset keyword or the second preset keyword, it is determined whether the voice information contains the first preset keyword or the second preset keyword.

所述模式切换单元还用于:The mode switching unit is also used for:

若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则不向所述耳机发送模式切换指令。If the keyword information includes a preset keyword, and the current earphone mode corresponds to the preset keyword, no mode switching instruction is sent to the earphone.

请再参阅图7,图7是本申请实施例三提供的另一种模式控制装置的结构示意图;其中,该模式控制装置70,应用于耳机,具体的,应用于耳机的一个或多个处理器,该耳机通信连接一电子设备。Please refer to Figure 7 again, which is a structural diagram of another mode control device provided in Example 3 of the present application; wherein the mode control device 70 is applied to headphones, specifically, to one or more processors of headphones, and the headphones are communicatively connected to an electronic device.

如图7所示,该模式控制装置70,包括:As shown in FIG. 7 , the mode control device 70 includes:

语音信息获取单元71,用于获取语音信息。The voice information acquiring unit 71 is used to acquire voice information.

其中,所述语音信息为用户本人或其他用户的语音信息。The voice information is the voice information of the user himself or other users.

语音信息发送单元72,用于向电子设备发送语音信息。The voice information sending unit 72 is used to send voice information to the electronic device.

具体的,语音信息发送单元72可以将获取的语音信息实时发送到电子设备。Specifically, the voice information sending unit 72 can send the acquired voice information to the electronic device in real time.

耳机模式反馈单元73,用于向电子设备发送当前的耳机模式。The earphone mode feedback unit 73 is used to send the current earphone mode to the electronic device.

模式切换单元74,用于当接收到模式切换指令时,切换当前的耳机模式。The mode switching unit 74 is used to switch the current earphone mode when receiving a mode switching instruction.

具体的,所述耳机模式包括降噪模式和非降噪模式,当接收到模式切换指令时,切换当前的耳机模式,包括:Specifically, the headphone mode includes a noise reduction mode and a non-noise reduction mode. When a mode switching instruction is received, the current headphone mode is switched, including:

若当前的耳机模式为降噪模式,根据模式切换指令将当前的耳机模式切换成非降噪模式;If the current headphone mode is the noise reduction mode, switch the current headphone mode to the non-noise reduction mode according to the mode switching instruction;

若当前的耳机模式为非降噪模式,根据模式切换指令将当前的耳机模式切换成降噪模式。If the current headphone mode is a non-noise reduction mode, the current headphone mode is switched to a noise reduction mode according to the mode switching instruction.

在本申请实施例中,耳机在接收到模式切换指令时,结合其当前的耳机模式,切换所述耳机模式,本申请能够更好地进行模式切换,以提高用户的使用体验。In an embodiment of the present application, when the headset receives a mode switching instruction, it switches the headset mode in combination with its current headset mode. The present application can better perform mode switching to improve the user experience.

需要说明的是,上述实施例三中所述装置可执行本申请实施例一所提供的模式控制方法,具备执行方法相应的功能模块和有益效果。未在装置实施例中详尽描述的技术细节,可参见本申请实施例一所提供的模式控制方法。It should be noted that the device described in the above embodiment 3 can execute the mode control method provided in the embodiment 1 of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in the device embodiment, please refer to the mode control method provided in the embodiment 1 of the present application.

实施例四Embodiment 4

请参阅图8,图8是本申请实施例四提供的一种模式控制装置的结构示意图;其中,该模式控制装置80,应用于电子设备,具体的,应用于电子设备的一个或多个处理器。Please refer to FIG. 8 , which is a schematic diagram of the structure of a mode control device provided in Embodiment 4 of the present application; wherein the mode control device 80 is applied to an electronic device, specifically, to one or more processors of the electronic device.

如图8所示,该模式控制装置80,包括:As shown in FIG8 , the mode control device 80 includes:

关键词库获取单元81,用于获取关键词库。The keyword library acquisition unit 81 is used to acquire a keyword library.

其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式。The keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode.

关键词库发送单元82,用于向耳机发送预设的关键词库。The keyword library sending unit 82 is used to send a preset keyword library to the headset.

在本申请实施例中,所述关键词库发送单元82还用于:In the embodiment of the present application, the keyword library sending unit 82 is also used for:

当所述电子设备中的关键词库被更新之后,向所述耳机发送所述更新后的关键词库,以使所述耳机的存储单元更新其存储的关键词库。After the keyword library in the electronic device is updated, the updated keyword library is sent to the headset so that the storage unit of the headset updates the keyword library stored therein.

请再参阅图9,图9是本申请实施例四提供的另一种模式控制装置的结构示意图;其中,该模式控制装置90,应用于耳机,具体的,应用于耳机的一个或多个处理器,该耳机通信连接一电子设备。Please refer to Figure 9 again, which is a structural diagram of another mode control device provided in Example 4 of the present application; wherein the mode control device 90 is applied to headphones, specifically, to one or more processors of headphones, and the headphones are communicatively connected to an electronic device.

如图9所示,该模式控制装置90,包括:As shown in FIG9 , the mode control device 90 includes:

语音信息获取单元91,用于获取语音信息;A voice information acquisition unit 91, used to acquire voice information;

关键词信息识别单元92,用于识别所述语音信息,确定所述语音信息对应的关键词信息;A keyword information recognition unit 92, used to recognize the voice information and determine the keyword information corresponding to the voice information;

模式切换单元93,用于若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式。The mode switching unit 93 is configured to switch the current headphone mode to a headphone mode corresponding to the preset keyword if the keyword information includes a preset keyword and the current headphone mode does not correspond to the preset keyword.

在本实施例的变更实施例中,所述模式控制装置90还包括:In a modified embodiment of this embodiment, the mode control device 90 further includes:

关键词库接收单元(图未示),用于接收所述电子设备发送的关键词库。The keyword library receiving unit (not shown) is used to receive the keyword library sent by the electronic device.

根据所述关键词库,关键词信息识别单元92可以确定所述关键词信息中是否包含预设的关键词。According to the keyword library, the keyword information identification unit 92 can determine whether the keyword information contains a preset keyword.

在本实施例的变更实施例中,所述关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,In a modified embodiment of this embodiment, the keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode.

所述模式切换单元,具体用于:The mode switching unit is specifically used for:

若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode, and the voice information is recognized to include the first preset keyword, the noise reduction mode is switched to the non-noise reduction mode;

若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则将非降噪模式切换成降噪模式。If the current earphone mode is a non-noise reduction mode and it is recognized that the voice information includes a second preset keyword, the non-noise reduction mode is switched to the noise reduction mode.

在本实施例的变更实施例中,所述模式切换单元还用于:若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则保持当前的耳机模式。In a variation of this embodiment, the mode switching unit is further configured to: if the keyword information includes a preset keyword, and the current headphone mode corresponds to the preset keyword, maintain the current headphone mode.

需要说明的是,上述实施例四中所述装置可执行本申请实施例二所提供的模式控制方法,具备执行方法相应的功能模块和有益效果。未在装置实施例中详尽描述的技术细节,可参见本申请实施例二所提供的模式控制方法。It should be noted that the device described in the above-mentioned embodiment 4 can execute the mode control method provided in the embodiment 2 of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the device embodiment, please refer to the mode control method provided in the embodiment 2 of the present application.

实施例五Embodiment 5

请参阅图10,图10为本申请各个实施例的一种电子设备的硬件结构示意图;Please refer to FIG. 10 , which is a schematic diagram of the hardware structure of an electronic device according to various embodiments of the present application;

如图10所示,该电子设备100包括但不限于:射频单元101、网络模块102、音频输出单元103、输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、处理器1010、以及电源1011等部件,所述电子设备100还包括摄像头。本领域技术人员可以理解,图10中示出的电子设备的结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本申请实施例中,电子设备包括但不限于电视机、手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。As shown in Figure 10, the electronic device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 1010, and a power supply 1011, and the electronic device 100 also includes a camera. It can be understood by those skilled in the art that the structure of the electronic device shown in Figure 10 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiment of the present application, the electronic device includes but is not limited to a television, a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

处理器1010,用于接收耳机发送的语音信息;识别语音信息,确定语音信息对应的关键词信息;获取耳机当前的耳机模式;若关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向耳机发送模式切换指令,以使耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式。通过判断语音信息对应的关键词信息是否包含预设的关键词,若关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则向耳机发送模式切换指令,以使耳机将当前的耳机模式切换成与预设的关键词对应的耳机模式,本申请实施例能够智能化控制耳机模式。Processor 1010 is used to receive voice information sent by the headset; recognize the voice information, determine the keyword information corresponding to the voice information; obtain the current headset mode of the headset; if the keyword information contains a preset keyword, and the current headset mode does not correspond to the preset keyword, send a mode switching instruction to the headset so that the headset switches the current headset mode to the headset mode corresponding to the preset keyword. By judging whether the keyword information corresponding to the voice information contains a preset keyword, if the keyword information contains a preset keyword, and the current headset mode does not correspond to the preset keyword, send a mode switching instruction to the headset so that the headset switches the current headset mode to the headset mode corresponding to the preset keyword, the embodiment of the present application can intelligently control the headset mode.

应当理解的是,本申请实施例中,射频单元101可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器1010处理;另外,将上行的数据发送给基站。通常,射频单元101包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元101还可以通过无线通信系统与网络和其他设备通信。It should be understood that in the embodiment of the present application, the RF unit 101 can be used for receiving and sending signals during information transmission or calls. Specifically, after receiving downlink data from the base station, it is sent to the processor 1010 for processing; in addition, uplink data is sent to the base station. Generally, the RF unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the RF unit 101 can also communicate with the network and other devices through a wireless communication system.

电子设备100通过网络模块102为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device 100 provides users with wireless broadband Internet access through the network module 102, such as helping users to send and receive emails, browse web pages, and access streaming media.

音频输出单元103可以将射频单元101或网络模块102接收的或者在存储器109中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元103还可以提供与电子设备100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元103包括扬声器、蜂鸣器以及受话器等。The audio output unit 103 can convert the audio data received by the RF unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output it as sound. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the electronic device 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, etc.

输入单元104用于接收音频或视频信号。输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的目标图像进行处理。处理后的图像帧可以显示在显示单元106上。经图形处理器1041处理后的图像帧可以存储在存储器109(或其它存储介质)中或者经由射频单元101或网络模块102进行发送。麦克风1042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元101发送到移动通信基站的格式输出。The input unit 104 is used to receive audio or video signals. The input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042. The graphics processor 1041 processes the target image of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the network module 102. The microphone 1042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode.

电子设备100还包括至少一种传感器105,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1061的亮度,接近传感器可在电子设备100移动到耳边时,关闭显示面板1061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器105还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the electronic device 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 105 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

显示单元106用于显示由用户输入的信息或提供给用户的信息。显示单元106可包括显示面板1061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1061。The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

用户输入单元107可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元107包括触控面板1071以及其他输入设备1072。触控面板1071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1071上或在触控面板1071附近的操作)。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1010,接收处理器1010发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1071。除了触控面板1071,用户输入单元107还可以包括其他输入设备1072。具体地,其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 1010, receives the command sent by the processor 1010 and executes it. In addition, the touch panel 1071 can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

进一步的,触控面板1071可覆盖在显示面板1061上,当触控面板1071检测到在其上或附近的触摸操作后,传送给处理器1010以确定触摸事件的类型,随后处理器1010根据触摸事件的类型在显示面板1061上提供相应的视觉输出。虽然在图10中,触控面板1071与显示面板1061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板1071与显示面板1061集成而实现电子设备的输入和输出功能,具体此处不做限定。Further, the touch panel 1071 may be covered on the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it is transmitted to the processor 1010 to determine the type of the touch event, and then the processor 1010 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in FIG10 , the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the electronic device, which is not limited here.

接口单元108为外部装置与电子设备100连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元108可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备100内的一个或多个元件或者可以用于在电子设备100和外部装置之间传输数据。The interface unit 108 is an interface for connecting an external device to the electronic device 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input/output (I/O) port, a video I/O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 100 or may be used to transmit data between the electronic device 100 and an external device.

存储器109可用于存储软件程序以及各种数据。存储器109可主要包括存储程序区和存储数据区,其中,存储程序区可存储至少一个功能所需的应用程序1091(比如声音播放功能、图像播放功能等)以及操作系统1092等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器109可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, wherein the program storage area can store at least one application 1091 required for a function (such as a sound playback function, an image playback function, etc.) and an operating system 1092, etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

处理器1010是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器109内的软件程序和/或模块,以及调用存储在存储器109内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器1010可包括一个或多个处理单元;优选的,处理器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。The processor 1010 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 1010 may include one or more processing units; preferably, the processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1010.

电子设备100还可以包括给各个部件供电的电源1011(比如电池),优选的,电源1011可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 100 may also include a power supply 1011 (such as a battery) for supplying power to each component. Preferably, the power supply 1011 may be logically connected to the processor 1010 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

另外,电子设备100包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 100 includes some functional modules not shown, which will not be described in detail here.

优选的,本申请实施例还提供一种电子设备,包括处理器1010,存储器109,存储在存储器109上并可在所述处理器1010上运行的计算机程序,该计算机程序被处理器1010执行时实现上述模式控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, an embodiment of the present application also provides an electronic device, including a processor 1010, a memory 109, and a computer program stored in the memory 109 and executable on the processor 1010. When the computer program is executed by the processor 1010, each process of the above-mentioned mode control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

实施例六Embodiment 6

请再参阅图11,图11是本申请各个实施例的一种耳机的结构示意图;Please refer to FIG. 11 again, which is a schematic diagram of the structure of an earphone according to various embodiments of the present application;

如图11所示,该耳机110包括:As shown in FIG. 11 , the earphone 110 includes:

一个或多个处理器111以及存储器112,图11中以一个处理器111为例。处理器111和存储器112可以通过总线或者其他方式连接,图11中以通过总线连接为例。One or more processors 111 and memory 112, one processor 111 is taken as an example in Fig. 11. The processor 111 and the memory 112 may be connected via a bus or other means, and the connection via a bus is taken as an example in Fig. 11.

处理器111,用于获取语音信息;识别语音信息,确定语音信息对应的关键词信息;若关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式。通过耳机获取语音信息并识别得到关键词信息,且在当前的耳机模式与预设的关键词不对应时,将当前的耳机模式切换成与预设的关键词对应的耳机模式。本申请能够提高耳机控制的交互性。Processor 111 is used to obtain voice information; recognize voice information and determine keyword information corresponding to the voice information; if the keyword information contains a preset keyword and the current headphone mode does not correspond to the preset keyword, the current headphone mode is switched to the headphone mode corresponding to the preset keyword. Voice information is obtained through the headphone and keyword information is recognized, and when the current headphone mode does not correspond to the preset keyword, the current headphone mode is switched to the headphone mode corresponding to the preset keyword. The present application can improve the interactivity of headphone control.

存储器112作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的模式控制方法对应的程序指令/模块。处理器111通过运行存储在存储器112中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施方式中的模式控制方法。The memory 112 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions/modules corresponding to the mode control method in the embodiment of the present application. The processor 111 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 112, that is, implements the mode control method in the above method implementation.

存储器112可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据语音控制智能家电的装置的使用所创建的数据等。此外,存储器112可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器112可选包括相对于处理器111远程设置的存储器,这些远程存储器可以通过网络连接至电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 112 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device for voice-controlled smart home appliances, etc. In addition, the memory 112 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 112 may optionally include a memory remotely arranged relative to the processor 111, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

所述一个或者多个模块存储在所述存储器112中,当被所述一个或者多个处理器111执行时,执行本申请实施例一或二中的模式控制方法。The one or more modules are stored in the memory 112, and when executed by the one or more processors 111, the mode control method in Embodiment 1 or 2 of the present application is executed.

上述产品可执行本申请各个实施例所提供的模式控制方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请各个实施例所提供的模式控制方法。The above-mentioned product can execute the mode control method provided in each embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the mode control method provided in each embodiment of the present application.

本申请实施例的耳机以多种形式存在,包括但不限于:有线耳机、无线耳机,其中,所述无线耳机包括蓝牙耳机,例如:真无线蓝牙耳机(True Wireless Stereo,TWS)。The earphones of the embodiments of the present application exist in various forms, including but not limited to: wired earphones, wireless earphones, wherein the wireless earphones include Bluetooth earphones, for example: True Wireless Stereo (TWS) earphones.

本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被一个或多个处理器执行时实现上述模式控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by one or more processors, each process of the above-mentioned mode control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

以上所描述的装置或设备实施例仅仅是示意性的,其中所述作为分离部件说明的单元模块可以是或者也可以不是物理上分开的,作为模块单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络模块单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是移动终端,个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile terminal, a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

最后应说明的是:以上结合附图描述的实施例仅用以说明本申请的技术方案,本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本申请的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the embodiments described above in conjunction with the accompanying drawings are only used to illustrate the technical solutions of the present application. The present application is not limited to the above-mentioned specific implementation methods, which are merely illustrative and not restrictive. Under the idea of the present application, the technical features in the above-mentioned embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above. For the sake of simplicity, they are not provided in detail. Although the present application has been described in detail with reference to the above-mentioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above-mentioned embodiments, or replace some of the technical features therein with equivalents. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (8)

1.一种模式控制方法,其特征在于,应用于电子设备,所述电子设备通信连接耳机,所述耳机设置有存储单元和处理单元,所述存储单元用于存储关键词库,所述处理单元用于识别语音信息得到关键词信息,以及根据关键词库,判断所述关键词信息中是否包含预设的关键词,所述存储单元和所述处理单元通信连接,所述耳机包括左耳机和右耳机,所述左耳机中设置有所述处理单元,所述右耳机中设置有所述存储单元,或者,所述左耳机中设置有所述存储单元,所述右耳机中设置有所述处理单元,所述方法包括:1. A mode control method, characterized in that it is applied to an electronic device, the electronic device is communicatively connected to an earphone, the earphone is provided with a storage unit and a processing unit, the storage unit is used to store a keyword library, the processing unit is used to identify voice information to obtain keyword information, and judge whether the keyword information contains preset keywords according to the keyword library, the storage unit and the processing unit are communicatively connected, the earphone includes a left earphone and a right earphone, the left earphone is provided with the processing unit, the right earphone is provided with the storage unit, or the left earphone is provided with the storage unit, the right earphone is provided with the processing unit, the method comprises: 获取关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;Acquire a keyword library, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode; 向耳机发送所述关键词库;Sending the keyword library to the headset; 所述方法还包括:The method further comprises: 当所述电子设备中的关键词库被更新之后,向所述耳机发送所述更新后的关键词库,以使所述耳机的存储单元更新其存储的关键词库。After the keyword library in the electronic device is updated, the updated keyword library is sent to the headset so that the storage unit of the headset updates the keyword library stored therein. 2.一种模式控制方法,其特征在于,应用于耳机,所述耳机通信连接电子设备,所述耳机设置有存储单元和处理单元,所述存储单元用于存储关键词库,所述处理单元用于识别语音信息得到关键词信息,以及根据关键词库,判断所述关键词信息中是否包含预设的关键词,所述存储单元和所述处理单元通信连接,所述耳机包括左耳机和右耳机,所述左耳机中设置有所述处理单元,所述右耳机中设置有所述存储单元,或者,所述左耳机中设置有所述存储单元,所述右耳机中设置有所述处理单元,所述方法包括:2. A mode control method, characterized in that it is applied to an earphone, the earphone is communicatively connected to an electronic device, the earphone is provided with a storage unit and a processing unit, the storage unit is used to store a keyword library, the processing unit is used to identify voice information to obtain keyword information, and judge whether the keyword information contains preset keywords according to the keyword library, the storage unit and the processing unit are communicatively connected, the earphone includes a left earphone and a right earphone, the left earphone is provided with the processing unit, the right earphone is provided with the storage unit, or the left earphone is provided with the storage unit, the right earphone is provided with the processing unit, the method comprises: 接收所述电子设备发送的关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;Receiving a keyword library sent by the electronic device, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode; 获取语音信息;Get voice information; 识别所述语音信息,确定所述语音信息对应的关键词信息;Recognize the voice information and determine keyword information corresponding to the voice information; 根据所述关键词库,确定所述关键词信息中是否包含预设的关键词;Determining, according to the keyword library, whether the keyword information contains a preset keyword; 若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式;If the keyword information includes a preset keyword, and the current earphone mode does not correspond to the preset keyword, switching the current earphone mode to the earphone mode corresponding to the preset keyword; 所述方法还包括:The method further comprises: 当所述左耳机和所述右耳机的任一耳机不处于佩戴状态或者工作状态时,使得所述存储单元或所述处理单元中的其中一个单独工作,以使所述耳机保持当前的耳机模式。When either the left earphone or the right earphone is not in a wearing state or a working state, one of the storage unit or the processing unit is made to work alone, so that the earphone maintains a current earphone mode. 3.根据权利要求2所述的方法,其特征在于,所述关键词库包括第一预设关键词和第二预设关键词,所述耳机模式包括降噪模式和非降噪模式,第一预设关键词对应非降噪模式,第二预设关键词对应降噪模式,3. The method according to claim 2, characterized in that the keyword library includes a first preset keyword and a second preset keyword, the headphone mode includes a noise reduction mode and a non-noise reduction mode, the first preset keyword corresponds to the non-noise reduction mode, and the second preset keyword corresponds to the noise reduction mode, 所述若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式,包括:If the keyword information includes a preset keyword, and the current earphone mode does not correspond to the preset keyword, switching the current earphone mode to an earphone mode corresponding to the preset keyword includes: 若当前的耳机模式为降噪模式,且识别到所述语音信息中包括第一预设关键词,则将降噪模式切换成非降噪模式;If the current headset mode is the noise reduction mode, and the voice information is recognized to include the first preset keyword, the noise reduction mode is switched to the non-noise reduction mode; 若当前的耳机模式为非降噪模式,且识别到所述语音信息中包括第二预设关键词,则将非降噪模式切换成降噪模式。If the current earphone mode is a non-noise reduction mode and it is recognized that the voice information includes a second preset keyword, the non-noise reduction mode is switched to the noise reduction mode. 4.根据权利要求2-3任一项所述的方法,其特征在于,所述方法还包括:若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词对应,则保持当前的耳机模式。4. The method according to any one of claims 2-3 is characterized in that the method further includes: if the keyword information contains a preset keyword and the current headphone mode corresponds to the preset keyword, then maintaining the current headphone mode. 5.一种模式控制装置,其特征在于,应用于电子设备,所述电子设备通信连接耳机,所述耳机设置有存储单元和处理单元,所述存储单元用于存储关键词库,所述处理单元用于识别语音信息得到关键词信息,以及根据关键词库,判断所述关键词信息中是否包含预设的关键词,所述存储单元和所述处理单元通信连接,所述耳机包括左耳机和右耳机,所述左耳机中设置有所述处理单元,所述右耳机中设置有所述存储单元,或者,所述左耳机中设置有所述存储单元,所述右耳机中设置有所述处理单元,所述装置包括:5. A mode control device, characterized in that it is applied to an electronic device, the electronic device is communicatively connected to an earphone, the earphone is provided with a storage unit and a processing unit, the storage unit is used to store a keyword library, the processing unit is used to identify voice information to obtain keyword information, and to determine whether the keyword information contains preset keywords according to the keyword library, the storage unit and the processing unit are communicatively connected, the earphone includes a left earphone and a right earphone, the left earphone is provided with the processing unit, the right earphone is provided with the storage unit, or the left earphone is provided with the storage unit, the right earphone is provided with the processing unit, the device comprises: 关键词库获取单元,用于获取关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;A keyword library acquisition unit, used to acquire a keyword library, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode; 关键词库发送单元,用于向耳机发送所述关键词库;当所述电子设备中的关键词库被更新之后,向所述耳机发送更新后的所述关键词库,以使所述耳机更新自身存储的关键词库。The keyword library sending unit is used to send the keyword library to the headset; when the keyword library in the electronic device is updated, the updated keyword library is sent to the headset, so that the headset updates the keyword library stored in itself. 6.一种模式控制装置,其特征在于,应用于耳机,所述耳机通信连接一电子设备,所述耳机设置有存储单元和处理单元,所述存储单元用于存储关键词库,所述处理单元用于识别语音信息得到关键词信息,以及根据关键词库,判断所述关键词信息中是否包含预设的关键词,所述存储单元和所述处理单元通信连接,所述耳机包括左耳机和右耳机,所述左耳机中设置有所述处理单元,所述右耳机中设置有所述存储单元,或者,所述左耳机中设置有所述存储单元,所述右耳机中设置有所述处理单元,所述装置包括:6. A mode control device, characterized in that it is applied to an earphone, the earphone is communicatively connected to an electronic device, the earphone is provided with a storage unit and a processing unit, the storage unit is used to store a keyword library, the processing unit is used to identify voice information to obtain keyword information, and judge whether the keyword information contains preset keywords according to the keyword library, the storage unit and the processing unit are communicatively connected, the earphone includes a left earphone and a right earphone, the left earphone is provided with the processing unit, the right earphone is provided with the storage unit, or the left earphone is provided with the storage unit, the right earphone is provided with the processing unit, the device comprises: 语音信息获取单元,用于获取语音信息;A voice information acquisition unit, used to acquire voice information; 关键词信息识别单元,用于识别所述语音信息,确定所述语音信息对应的关键词信息;接收所述电子设备发送的关键词库,其中,所述关键词库包括至少一个预设的关键词,每一关键词对应一个耳机模式;根据所述关键词库,确定所述关键词信息中是否包含预设的关键词;A keyword information recognition unit, configured to recognize the voice information and determine the keyword information corresponding to the voice information; receive a keyword library sent by the electronic device, wherein the keyword library includes at least one preset keyword, and each keyword corresponds to a headphone mode; and determine whether the keyword information contains a preset keyword according to the keyword library; 模式切换单元,用于若所述关键词信息中包含预设的关键词,且当前的耳机模式与预设的关键词不对应,则将当前的耳机模式切换成与预设的关键词对应的耳机模式;当所述左耳机和所述右耳机的任一耳机不处于佩戴状态或者工作状态时,使得所述存储单元或所述处理单元中的其中一个单独工作,以使所述耳机保持当前的耳机模式。A mode switching unit, configured to switch the current headphone mode to a headphone mode corresponding to the preset keyword if the keyword information contains a preset keyword and the current headphone mode does not correspond to the preset keyword; and to enable one of the storage unit or the processing unit to work alone to enable the headphone to maintain the current headphone mode when either the left headphone or the right headphone is not in a wearing state or a working state. 7.一种电子设备,其特征在于,包括:7. An electronic device, comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1所述的模式控制方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the mode control method according to claim 1. 8.一种耳机,其特征在于,包括:8. An earphone, comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求2-4任一项所述的模式控制方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the mode control method according to any one of claims 2 to 4.
CN202110247155.5A 2021-03-05 2021-03-05 Mode control method and device, electronic equipment and earphone Active CN115037831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110247155.5A CN115037831B (en) 2021-03-05 2021-03-05 Mode control method and device, electronic equipment and earphone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110247155.5A CN115037831B (en) 2021-03-05 2021-03-05 Mode control method and device, electronic equipment and earphone

Publications (2)

Publication Number Publication Date
CN115037831A CN115037831A (en) 2022-09-09
CN115037831B true CN115037831B (en) 2024-07-19

Family

ID=83118168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110247155.5A Active CN115037831B (en) 2021-03-05 2021-03-05 Mode control method and device, electronic equipment and earphone

Country Status (1)

Country Link
CN (1) CN115037831B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810814B (en) * 2021-08-17 2023-12-01 百度在线网络技术(北京)有限公司 Earphone mode switching control method and device, electronic equipment and storage medium
CN115567823A (en) * 2022-10-11 2023-01-03 昆腾微电子股份有限公司 Signal processing device, method, apparatus and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429963A (en) * 2018-05-08 2018-08-21 歌尔股份有限公司 A kind of earphone and noise-reduction method
CN110493678A (en) * 2019-08-14 2019-11-22 Oppo(重庆)智能科技有限公司 The control method and device of earphone

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5202859B2 (en) * 2007-03-26 2013-06-05 Necカシオモバイルコミュニケーションズ株式会社 Portable terminal device and program
KR101442027B1 (en) * 2013-04-29 2014-09-25 (주)다하미 커뮤니케이션즈 Sound processing system to recognize earphones for portable devices using sound patterns, mathod for recognizing earphone for portable devices using sound patterns, and mathod for sound processing using thereof
JP2015019400A (en) * 2014-09-05 2015-01-29 泰章 岩井 Information processing system and information processing method
CN105100455A (en) * 2015-07-06 2015-11-25 珠海格力电器股份有限公司 Method and device for answering incoming call through voice control
CN105554664A (en) * 2015-12-22 2016-05-04 王晓晖 Headset based sound processing method and apparatus, and headset
CN105635878B (en) * 2016-02-03 2018-01-26 深圳市汇顶科技股份有限公司 A method for switching the working mode of an earphone and an earphone
CN106254642A (en) * 2016-07-30 2016-12-21 吴凤彪 A kind of assist earphone and call method thereof
CN206490796U (en) * 2016-08-16 2017-09-12 北京金锐德路科技有限公司 Acoustic control intelligent earphone
CN106998398A (en) * 2017-03-28 2017-08-01 杭州三为电子技术有限公司 Telephone operation machine voice input system
KR102161554B1 (en) * 2017-06-29 2020-10-05 네이버 주식회사 Method and apparatus for function of translation using earset
CN107564523B (en) * 2017-09-28 2021-06-22 歌尔科技有限公司 Earphone answering method and device and earphone
CN109243445A (en) * 2018-09-30 2019-01-18 Oppo广东移动通信有限公司 Sound control method, device, electronic equipment and storage medium
CN109413526B (en) * 2018-09-30 2020-02-14 Oppo广东移动通信有限公司 Earphone control method, earphone control device, electronic equipment and storage medium
JP7396796B2 (en) * 2019-01-25 2023-12-12 株式会社ディーアンドエムホールディングス earphone device
CN110475170A (en) * 2019-07-10 2019-11-19 深圳壹账通智能科技有限公司 Method, device, mobile terminal and storage medium for controlling playback state of earphones
CN111405105B (en) * 2020-03-20 2022-03-29 深圳市未艾智能有限公司 Method and apparatus for controlling bluetooth headset, and storage medium
CN111462746B (en) * 2020-04-08 2023-08-29 歌尔科技有限公司 TWS earphone-based control method, system, device and equipment
CN111464905A (en) * 2020-04-09 2020-07-28 电子科技大学 Hearing enhancement method and system based on intelligent wearable device and wearable device
CN112230877A (en) * 2020-10-16 2021-01-15 惠州Tcl移动通信有限公司 Voice operation method and device, storage medium and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429963A (en) * 2018-05-08 2018-08-21 歌尔股份有限公司 A kind of earphone and noise-reduction method
CN110493678A (en) * 2019-08-14 2019-11-22 Oppo(重庆)智能科技有限公司 The control method and device of earphone

Also Published As

Publication number Publication date
CN115037831A (en) 2022-09-09

Similar Documents

Publication Publication Date Title
US12197816B2 (en) Prompting method and mobile terminal
CN107770760B (en) A kind of method and mobile terminal of the type identifying bluetooth equipment
US20230254395A1 (en) Electronic Device and Control Method Thereof
WO2021063249A1 (en) Control method for electronic device and electronic device
WO2021129529A1 (en) Device switching method and related device
CN109639863B (en) Voice processing method and device
CN108684029A (en) A kind of Bluetooth pairing connection method and system, bluetooth equipment and terminal
WO2021204045A1 (en) Audio control method and electronic device
CN111093137B (en) A volume control method, device and computer-readable storage medium
CN107911445A (en) A kind of information push method, mobile terminal and storage medium
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN111694536A (en) Audio control method, electronic device and computer-readable storage medium
CN107948874A (en) A kind of terminal control method, mobile terminal
CN108683980B (en) Audio signal transmission method and mobile terminal
WO2021136141A1 (en) Playback method and electronic device
WO2021238844A1 (en) Audio output method and electronic device
WO2021197311A1 (en) Volume adjustment display method and electronic apparatus
CN108307048B (en) A message output method and device and mobile terminal
JP7526810B2 (en) Method for switching audio output modes and electronic device
CN108235288B (en) A kind of Bluetooth audio frequency playback method and mobile terminal
CN115037831A (en) A mode control method, device, electronic device and earphone
CN109981443A (en) Voice interactive method, device and terminal device
CN113411702B (en) Sound channel configuration method and electronic equipment
CN110839108A (en) Noise reduction method and electronic device
CN110505349A (en) A kind of based reminding method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250220

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Country or region after: China

Address before: 518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Patentee before: ONEPLUS TECHNOLOGY (SHENZHEN) Co.,Ltd.

Country or region before: China