Position detection method and electronic device

By using a microphone in an electronic device to obtain the action sound data of the camera module and using voiceprint feature information to determine its position, the complex construction and high cost problems caused by the need to add Hall devices in the prior art are solved, and the effect of simplifying design and reducing costs is achieved.

CN118447872BActive Publication Date: 2025-05-02HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311818124.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-05-02
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

Existing electronic devices need to add Hall devices when detecting camera module positions, resulting in complex construction and high cost.

Method used

The action sound data of the camera module is obtained through the microphone on the electronic device, and the position of the camera module is determined using the voiceprint feature information to avoid adding Hall devices.

Benefits of technology

This enables detection of camera module position without adding Hall devices, reducing the construction complexity and cost of electronic devices, while reducing the weight and stacking space of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447872B_ABST
    Figure CN118447872B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a position detection method and electronic device, which relates to the field of electronic devices. The position of the camera module can be detected by a microphone on the electronic device, and there is no need to add a Hall device in the electronic device, thereby avoiding the complexity of the structure of the electronic device and reducing the cost of the electronic device. The specific scheme is: obtaining first sound data through a first microphone, and determining the voiceprint feature information of the first sound data; determining the position of the camera module according to the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data corresponding to the camera module; wherein the action sound data includes the action sound data of the camera module being placed in the storage mechanism and the action sound data of the camera module being taken out of the storage mechanism; the position of the camera module is that the camera module is located in the storage mechanism or the camera module is located outside the storage mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic equipment, and in particular to a position detection method and electronic equipment. Background Art

[0002] At present, in order to increase the screen-to-body ratio of electronic devices such as laptops, more and more electronic devices such as laptops use detachable camera modules. The detachable camera module can be placed in a storage mechanism of electronic devices such as laptops. When the user needs to use the camera module, the user can take the camera module out of the storage mechanism, and when the user does not need to use the camera module, the user can put the camera module into the storage mechanism.

[0003] Usually, for the convenience of users, electronic devices such as laptops can detect the position of the camera module through a Hall device, thereby prompting the user of the current position of the camera module, that is, prompting the user whether the camera module is in the storage mechanism or taken out of the storage mechanism.

[0004] However, in order to enable electronic devices such as laptop computers to detect the position of the camera module, it is necessary to add Hall devices to the electronic devices such as laptop computers, which will lead to complex structures and high costs for electronic devices such as laptop computers. Summary of the invention

[0005] The embodiments of the present application provide a position detection method and an electronic device, which can detect the position of a camera module through a microphone on the electronic device without adding a Hall device to the electronic device, thereby avoiding the complexity of the structure of the electronic device and reducing the cost of the electronic device.

[0006] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:

[0007] In a first aspect, an embodiment of the present application provides a position detection method, which is applied to an electronic device, and the electronic device may include a first microphone, a camera module, and a storage mechanism corresponding to the camera module. The position detection method may include: acquiring first sound data through the first microphone, and determining voiceprint feature information of the first sound data; determining the position of the camera module according to the voiceprint feature information of the first sound data and the voiceprint feature information of action sound data corresponding to the camera module; wherein the action sound data includes action sound data of the camera module being placed in the storage mechanism and action sound data of the camera module being taken out of the storage mechanism; the position of the camera module is that the camera module is located in the storage mechanism or the camera module is located outside the storage mechanism.

[0008] Based on the method described in the first aspect, since the electronic device can obtain the action sound corresponding to the camera module through the microphone, the position of the camera module can be determined according to the action sound of the camera module. Therefore, the solution of the present application does not need to add a Hall device to the electronic device, thereby avoiding the complexity of the structure of the electronic device and reducing the cost of the electronic device. And the solution of the present application does not need to add a flexible circuit board FPC, a connector BTB and a power supply corresponding to the Hall device to the electronic device, thereby further avoiding the complexity of the structure of the electronic device and reducing the cost of the electronic device, and avoiding the electronic device from using a larger stacking space, while reducing the weight of the electronic device.

[0009] In combination with the first aspect, in another possible implementation manner, the voiceprint feature information of the above-mentioned action sound data may include first voiceprint feature information and second voiceprint feature information, the first voiceprint feature information may be the voiceprint feature information corresponding to the action sound data taken out by the camera module from the storage mechanism, and the second voiceprint feature information may be the voiceprint feature information corresponding to the action sound data put into the storage mechanism by the camera module; the above-mentioned determining the position of the camera module based on the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data may include: matching the voiceprint feature information of the first sound data with the first voiceprint feature information and the second voiceprint feature information; when the voiceprint feature information of the first sound data matches the first voiceprint feature information, determining the position of the camera module is that the camera module is located outside the storage mechanism; when the voiceprint feature information of the first sound data matches the second voiceprint feature information, determining the position of the camera module is that the camera module is located in the storage mechanism.

[0010] Based on this possible implementation, since the electronic device can match the voiceprint feature information of the sound data acquired by the microphone with the voiceprint feature information corresponding to the action sound data of the camera module taking out from the storage mechanism and the voiceprint feature information corresponding to the action sound data of the camera module being placed in the storage mechanism, it can accurately determine whether the voiceprint feature information of the sound data acquired by the microphone is the action sound data of the camera module taking out from the storage mechanism or the action sound data of the camera module being placed in the storage mechanism. Thus, the electronic device can accurately determine the position of the camera module.

[0011] In combination with the first aspect, in another possible implementation manner, the first microphone is a microphone within a preset range of the camera module.

[0012] Based on this possible implementation, since the first microphone is a microphone within the preset range of the camera module, that is, the first microphone can be the microphone closest to the camera module. Therefore, the action sound data of the camera module can be accurately acquired through the microphone closest to the camera module. It is then possible to accurately determine whether the sound data acquired by the microphone is the action sound data of the camera module being taken out of the storage mechanism or the action sound data of the camera module being placed in the storage mechanism.

[0013] In combination with the first aspect, in another possible implementation, the microphone may further include a second microphone, which is a microphone outside a preset range of the camera module. The position detection method may further include: obtaining second sound data through the second microphone; determining the position of the camera module based on the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data may include: when the second sound data is ambient sound data, performing noise reduction processing on the first sound data according to the second sound data to obtain third sound data; determining the voiceprint feature information of the third sound data; and determining the position of the camera module according to the voiceprint feature information of the third sound data and the voiceprint feature information of the action sound data.

[0014] Based on this possible implementation, since the second microphone is a microphone outside the preset range of the camera module, that is, the second microphone can be a microphone relatively far from the camera module. Therefore, the ambient sound data can be accurately acquired through the microphone relatively far from the camera module. Then, the sound data acquired by the first microphone can be subjected to noise reduction processing according to the ambient sound data, so that accurate action sound data of the camera module can be acquired, and the ambient sound can be prevented from interfering with the action sound data of the camera module, resulting in inaccurate position detection.

[0015] In combination with the first aspect, in another possible implementation manner, the determining the voiceprint feature information of the first sound data may include: determining the voiceprint feature information of the first sound data when the first sound data is an action sound.

[0016] Based on this possible implementation, when the first sound data is an action sound, the voiceprint feature information of the first sound data is determined. Thus, the position of the camera module is determined by the voiceprint feature information of the first sound data. This can avoid the electronic device from determining the position of the camera module for all the sound data acquired by the first microphone, thereby reducing the workload of the electronic device.

[0017] In combination with the first aspect, in another possible implementation, when the position of the camera module is that the camera module is outside the storage mechanism, the above-mentioned position detection method may also include: displaying a first prompt information; the first prompt information is used to prompt the user that the position of the camera module is that the camera module is outside the storage mechanism.

[0018] Based on this possible implementation method, since when the position of the camera module is that the camera module is outside the storage mechanism, the electronic device can display prompt information to remind the user that the position of the camera module is that the camera module is outside the storage mechanism, thereby making it convenient for the user to know the position of the camera module.

[0019] In combination with the first aspect, in another possible implementation, the first prompt information may include a first incorrect option, and the position detection method may further include: receiving a trigger operation of the user on the first incorrect option; in response to the user's trigger operation on the first incorrect option, obtaining the position of the camera module through the central processing unit CPU of the electronic device, and calibrating the first voiceprint feature information according to the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data.

[0020] Based on this possible implementation, when the electronic device displays the first prompt information, the user can trigger an incorrect option of the first prompt information, and the electronic device can calibrate the first voiceprint feature information according to the position of the camera module and the voiceprint feature information of the first sound data acquired by the CPU. This can improve the accuracy of the first voiceprint feature information (i.e., the voiceprint feature information corresponding to the action sound data taken out by the camera module from the storage mechanism).

[0021] In combination with the first aspect, in another possible implementation, when the position of the camera module is that the camera module is located in a storage mechanism, the above-mentioned position detection method may further include: displaying a second prompt information; the second prompt information is used to prompt the user that the position of the camera module is that the camera module is located outside the storage mechanism.

[0022] Based on this possible implementation method, since when the position of the camera module is that the camera module is located in the storage mechanism, the electronic device can display prompt information to prompt the user that the position of the camera module is that the camera module is located in the storage mechanism, thereby making it convenient for the user to know the position of the camera module.

[0023] In combination with the first aspect, in another possible implementation, the second prompt information may include a second incorrect option, and the position detection method may further include: receiving a trigger operation of the second incorrect option by the user; in response to the trigger operation of the second incorrect option by the user, obtaining the position of the camera module through the central processing unit CPU of the electronic device, and calibrating the second voiceprint feature information according to the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data.

[0024] Based on this possible implementation, when the electronic device displays the second prompt information, the user can trigger an incorrect option of the second prompt information, and the electronic device can calibrate the second voiceprint feature information according to the position of the camera module and the voiceprint feature information of the second sound data acquired by the CPU. This can improve the accuracy of the second voiceprint feature information (i.e., the voiceprint feature information corresponding to the action sound data of placing the camera module into the storage mechanism).

[0025] In a second aspect, an embodiment of the present application provides a position detection device, which can be applied to an electronic device to implement the method in the first aspect. The function of the position detection device can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, such as an acquisition module and a determination module.

[0026] The acquisition module may be used to acquire first sound data through a first microphone.

[0027] The determination module can be used to determine the voiceprint feature information of the first sound data.

[0028] The determination module can also be used to determine the position of the camera module based on the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data corresponding to the camera module; wherein the action sound data includes the action sound data of the camera module being placed in the storage mechanism and the action sound data of the camera module being taken out of the storage mechanism; the position of the camera module is that the camera module is located in the storage mechanism or the camera module is located outside the storage mechanism.

[0029] In a third aspect, a position detection device is provided, which has the function of implementing the method described in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0030] In a fourth aspect, a position detection device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the position detection device is running, the processor executes the computer execution instructions stored in the memory to enable the power consumption control device to perform a position detection method as described in any one of the above-mentioned first aspects.

[0031] In a fifth aspect, a position detection device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute a position detection method as described in any one of the above-mentioned first aspects according to the instructions.

[0032] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device implements a position detection method as described in any one of the first aspect or possible implementations of the first aspect.

[0033] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising a computer readable code, which, when executed in an electronic device, enables the electronic device to implement a position detection method as described in any one of the first aspect or possible implementations of the first aspect.

[0034] In an eighth aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.

[0035] It should be understood that the beneficial effects of the second to eighth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of the position of a camera module of an electronic device in the related art;

[0037] Figure 2 A schematic diagram of the position of a storage mechanism corresponding to a camera module of an electronic device in the related art;

[0038] Figure 3 It is a structural schematic diagram of a camera module of an electronic device and its corresponding storage mechanism in the related art;

[0039] Figure 4 A schematic diagram of a position detection method provided in an embodiment of the present application Figure 1 ;

[0040] Figure 5 A schematic diagram of the structure of a storage mechanism corresponding to a microphone and a camera module of an electronic device provided in an embodiment of the present application;

[0041] Figure 6 A schematic structural diagram of a camera module of an electronic device and its corresponding storage mechanism provided in an embodiment of the present application;

[0042] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0043] Figure 8 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0044] Fig. 9 A schematic diagram of a position detection method provided in an embodiment of the present application Figure 2 ;

[0045] Fig.10 A schematic diagram of the voiceprint characteristics of the sound data taken out from the storage mechanism by the camera module provided in an embodiment of the present application;

[0046] Fig.11 A schematic diagram of the voiceprint characteristics of the sound data of the camera module placed in the storage mechanism provided in the embodiment of the present application;

[0047] Fig.12 A display interface diagram of an electronic device provided in an embodiment of the present application Figure 1 ;

[0048] Fig.13 A display interface diagram of an electronic device provided in an embodiment of the present application Figure 2 ;

[0049] Fig.14 A schematic diagram of the structure of a position detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0052] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include plural expressions, unless the context clearly indicates otherwise. It should also be understood that " / " means or, for example, A / B can mean A or B; "and / or" in the text is merely a description of the association relationship of associated characters, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0053] With the development of electronic equipment technology, electronic equipment such as laptop computers all have camera modules (i.e., cameras, which may also be referred to as cameras). Usually, in order to facilitate the use of the camera module, the camera module of electronic equipment such as laptop computers is arranged on the frame of the screen.

[0054] However, the camera modules of electronic devices such as laptops are set on the borders of the screen, which will affect the screen-to-body ratio of electronic devices such as laptops, resulting in a decrease in the screen-to-body ratio of electronic devices such as laptops. The screen-to-body ratio is the ratio of the screen area of ​​an electronic device to the area of ​​the front panel of the body, which is used to measure the proportion of the screen size of the electronic device in the appearance design. The higher the screen-to-body ratio, the greater the proportion of the screen to the body, and the better the visual experience.

[0055] For example, taking the electronic device as a laptop computer, Figure 1 As shown, the camera module 101 of the laptop is usually located in the frame above the screen of the laptop. When the camera module 101 of the laptop is usually located in the frame above the screen of the laptop, the screen ratio of the laptop will be reduced, affecting the user experience.

[0056] In order to increase the screen-to-body ratio of electronic devices such as laptops, more and more electronic devices such as laptops use detachable camera modules. The detachable camera module can be placed in a storage mechanism of electronic devices such as laptops. When the user needs to use the camera module, the user can take the camera module out of the storage mechanism, and when the user does not need to use the camera module, the user can put the camera module into the storage mechanism.

[0057] For example, taking a laptop computer as an example, in order to increase the screen-to-body ratio of an electronic device such as a laptop computer, the laptop computer may use a detachable camera module. Figure 2 As shown, the laptop computer may include a storage mechanism 201 .

[0058] The detachable camera module can be placed in the storage mechanism 201. When the user needs to use the camera module, the user can take the camera module out of the storage mechanism 201, and when the user does not need to use the camera module, the user can put the camera module into the storage mechanism 201. This does not affect the user's use and can increase the screen-to-body ratio of the laptop.

[0059] Usually, for the convenience of users, electronic devices such as laptops can detect the position of the camera module through a Hall device, thereby prompting the user of the current position of the camera module, that is, prompting the user whether the camera module is in the storage mechanism or taken out of the storage mechanism.

[0060] However, in order to enable electronic devices such as laptop computers to detect the position of the camera module, it is necessary to add Hall devices to the electronic devices such as laptop computers, which will lead to complex structures and high costs for electronic devices such as laptop computers.

[0061] The Hall device can detect the magnetic field strength corresponding to the camera module when the camera module is placed in the storage mechanism, thereby determining that the camera module is in the storage mechanism, that is, the camera module is in the placed state, based on the magnetic field strength corresponding to the camera module. The Hall device can also detect the magnetic field strength corresponding to the camera module when the camera module is taken out of the storage mechanism, thereby determining that the camera module is outside the storage mechanism, that is, the camera module is in the taken out state, based on the magnetic field strength corresponding to the camera module.

[0062] It should be noted that in order for electronic devices such as laptops to detect the position of the camera module through the Hall device, the laptop not only needs to add a Hall device, but also needs to add a flexible printed circuit (FPC), a connector (board to board, BTB) and a power supply corresponding to the Hall device. This will further lead to a complex structure and high cost of electronic devices such as laptops.

[0063] For example, continue to take the electronic device as a laptop computer, and the camera module is in the removed state (that is, the camera module is taken out from the storage mechanism) as an example, combined with Figure 3As shown, in order for the laptop to detect the position of the camera module through the Hall device, the laptop needs to add a Hall device 301 in the storage mechanism corresponding to the camera module 301, as well as a flexible circuit board FPC302, a connector BTB303 and a power supply (not shown in the figure) corresponding to the Hall device. The power supply can provide power for the Hall device 301.

[0064] like Figure 3 As shown, the storage mechanism corresponding to the camera module 301 may further include a push-push structure (ie, a Push-Push structure) 304. Through the Push-Push structure 304, the camera module 301 can be placed in the storage mechanism and taken out from the storage mechanism.

[0065] In the Push-Push mechanism 304, when a certain part of the camera module is pressed, the spring compresses and pushes other parts until they reach the correct position and lock together, so that the camera module 301 is taken out of the storage mechanism. When a certain part of the camera module 301 is pressed again, the spring compresses and pushes other parts until they reach the correct position and lock together, so that the camera module 301 is placed in the storage mechanism.

[0066] That is, the Hall device 301 can be welded on the flexible circuit board FPC302, and then connected to the main board of the laptop computer through the connector BTB303. Afterwards, when the camera module 301 is placed in the storage mechanism through the Push-Push structure 304 or the camera module 301 is taken out of the storage mechanism, the Hall device 301 can detect the magnetic field strength corresponding to the camera module 301.

[0067] After the Hall device 301 detects the magnetic field strength corresponding to the camera module 301, the magnetic field strength corresponding to the camera module 301 can be sent to the processor in the motherboard of the laptop computer through the connector BTB303, so that the processor of the laptop computer can determine the position of the camera module 301 according to the magnetic field strength corresponding to the camera module 301, that is, whether the camera module 301 is in the inserted state or the removed state.

[0068] After the processor of the notebook computer determines the position of the camera module 301 , the notebook computer may provide corresponding prompts to inform the user of the position of the camera module.

[0069] Since the laptop computer needs to add a Hall device 301 in the storage mechanism corresponding to the camera module 301, as well as a flexible circuit board FPC302, a connector BTB303 and a power supply corresponding to the Hall device, in order to realize that the laptop computer detects the position of the camera module through the Hall device, this will lead to a complex structure of the laptop computer and a high cost.

[0070] In addition, the Hall device 301, the flexible circuit board FPC302, the connector BTB303 and the power supply corresponding to the Hall device will occupy a larger stacking space and increase the weight of the laptop computer, which is contrary to the trend of thin and light electronic products.

[0071] In view of the above problems, an embodiment of the present application provides a position detection method, which is applied to an electronic device (such as a laptop computer, etc.), which includes a detachable camera module and a storage mechanism corresponding to the camera module. The position method may include obtaining the action sound corresponding to the camera module through a microphone on the electronic device when the camera module is placed in the storage mechanism or taken out of the storage mechanism. Then, the voiceprint judgment is performed based on the action sound corresponding to the camera module, so as to determine whether the action sound is the sound when the camera module is placed in the storage mechanism or the sound when the camera module is taken out of the storage mechanism.

[0072] When the electronic device determines that the action sound is the sound of the camera module being placed in the storage mechanism, the electronic device can determine that the state of the camera module is the placement state (i.e., the camera module is located in the storage mechanism). When the electronic device determines that the action sound is the sound of the camera module being taken out of the storage mechanism, the electronic device can determine that the state of the camera module is the removal state (i.e., the camera module is located outside the storage mechanism).

[0073] In the solution of the present application, the electronic device can obtain the action sound corresponding to the camera module through the microphone, thereby determining the position of the camera module according to the action sound of the camera module. Therefore, the solution of the present application does not need to add a Hall device to the electronic device, thereby avoiding the complexity of the structure of the electronic device and reducing the cost of the electronic device.

[0074] Furthermore, the solution of the present application does not require the addition of a flexible circuit board FPC, a connector BTB, and a power supply corresponding to the Hall device in the electronic device, thereby further avoiding the complexity of the structure of the electronic device and reducing the cost of the electronic device, and avoiding the electronic device from using a larger stacking space while reducing the weight of the electronic device.

[0075] Combine the following Figure 4 , the principle of the position detection method provided in the embodiment of the present application is schematically explained. Figure 4 As shown, the position detection method provided in the embodiment of the present application may include the following process.

[0076] After the detection method provided in the embodiment of the present application is started, the microphone (MIC) of the electronic device can detect the sound.

[0077] After the microphone of the electronic device detects the sound, the electronic device can determine whether the detected sound is an action sound. That is, the electronic device can determine whether the detected sound is the action sound of the camera module. The action sound of the camera module may include the sound of the camera module being placed in the storage mechanism and the sound of the camera module being taken out of the storage mechanism.

[0078] After the electronic device determines that the sound detected by the microphone is the action sound of the camera module, the electronic device can perform voiceprint judgment on the action sound of the camera module. Thus, it can be determined whether the voiceprint corresponding to the action sound of the camera module is a placement voiceprint or a removal voiceprint. The placement voiceprint is the voiceprint corresponding to the sound of the camera module being placed in the storage mechanism. The removal voiceprint is the voiceprint corresponding to the sound of the camera module being taken out of the storage mechanism.

[0079] When the electronic device determines that the voiceprint corresponding to the action sound of the camera module is a removal voiceprint, the housekeeper application in the electronic device can record the state of the camera module as the removal state, that is, the position of the camera module is outside the storage mechanism.

[0080] Afterwards, the housekeeper application of the electronic device can display a prompt window, which can be used to remind the user that the location of the camera module is outside the storage mechanism.

[0081] When the electronic device determines that the voiceprint corresponding to the action sound of the camera module is the placement voiceprint, the housekeeper application in the electronic device can record the state of the camera module as the placement state, that is, the position of the camera module is in the storage mechanism.

[0082] Afterwards, the housekeeper application of the electronic device can display a prompt window, which can be used to remind the user that the location of the camera module is in the storage mechanism.

[0083] In some examples, the electronic device may have one or more microphones. When the electronic device has multiple microphones (also referred to as a microphone array), the electronic device may detect the action sound of the camera module through the microphone closest to the storage mechanism. Thus, the electronic device may determine the state of the camera module (i.e., the position of the camera module) based on the action sound of the camera module detected by the microphone closest to the storage mechanism.

[0084] When the electronic device has multiple microphones, the electronic device can also detect the action sound of the camera module through the multiple microphones. Thus, the electronic device can determine the state of the camera module (i.e., the position of the camera module) according to the action sound of the camera module detected by the multiple microphones.

[0085] For example, the electronic device is a laptop computer, and the laptop computer includes three microphones. Figure 5As shown, the laptop computer may include three microphones, namely microphone 502, microphone 503 and microphone 504. Microphone 502 is closest to the storage mechanism 501 on the laptop computer, while microphone 503 and microphone 504 are relatively far away from the storage mechanism 501 on the laptop computer.

[0086] When the laptop computer detects the position of the camera module in the storage mechanism 501, the laptop computer can detect the action sound of the camera module through the microphone 502 which is closest to the storage mechanism 501. Thus, the laptop computer can determine the state of the camera module (i.e., the position of the camera module) based on the action sound of the camera module detected by the microphone 502 which is closest to the storage mechanism 501.

[0087] When the laptop detects the position of the camera module in the storage mechanism 501, the laptop can also detect the action sound of the camera module through the microphones 502, 503 and 504. Thus, the laptop can determine the state of the camera module (i.e., the position of the camera module) based on the action sound of the camera module detected by the microphones 502, 503 and 504.

[0088] For another example, continue to take the electronic device as a laptop computer, and the camera module is in a taken-out state (that is, the camera module is taken out from the storage mechanism). Figure 6 As shown, the laptop computer may include a camera module 601 , a Push-Push mechanism 602 , and a microphone 603 which is closest to the camera module 601 .

[0089] When the laptop detects the position of the camera module 601 in the storage mechanism, the laptop can detect the action sound of the camera module 601 through the microphone 603 that is closest to the storage mechanism (i.e., the distance between the microphone 603 and the camera module is closest). Thus, the laptop can determine the state of the camera module 601 (i.e., the position of the camera module 601) based on the action sound of the camera module 601 detected by the microphone 603 that is closest to the storage mechanism.

[0090] In some examples, when the electronic device has multiple microphones, the electronic device can detect the action sound of the camera module through the microphone closest to the storage mechanism. At the same time, the electronic device can detect the ambient sound through other microphones. Thus, the electronic device can determine the state of the camera module (i.e., the position of the camera module) based on the action sound of the camera module detected by the microphone closest to the storage mechanism and the ambient sound detected by other microphones.

[0091] That is, the electronic device can reduce the noise in the action sound of the camera module detected by the microphone closest to the storage mechanism based on the ambient sound detected by other microphones, so as to accurately determine whether the action sound of the camera module detected by the microphone closest to the storage mechanism is the sound of the camera module being placed in the storage mechanism or the sound of the camera module being taken out of the storage mechanism. Thus, the state of the camera module (i.e., the position of the camera module) can be accurately determined.

[0092] The position detection method provided in the embodiment of the present application is described below.

[0093] The position detection method provided in the embodiment of the present application can be applied to electronic devices. In some examples, the electronic device can be a handheld computer, a personal computer (PC) (such as a laptop), a personal digital assistant (PDA), and other electronic devices having a microphone, a detachable camera module, and a storage mechanism corresponding to the camera module. The embodiment of the present application does not limit the specific form of the electronic device. In the embodiment of the present application, the electronic device is illustrated as a laptop computer.

[0094] For example, taking the electronic device as a laptop computer, Figure 7 A schematic structural diagram of a notebook computer provided in an embodiment of the present application is shown.

[0095] like Figure 7 As shown, the laptop computer may include: a processor 710, a fan 711, an external memory interface 720, an internal memory 721, a universal serial bus (USB) interface 730, a charging management module 740, a power management module 741, a battery 742, a display screen 750, an antenna, a wireless communication module 760, an audio module 770, a speaker (i.e., a horn) 770A, a microphone 770C, a headphone interface 770B, a touchpad 780, a keyboard 790, and a camera 791 (which may also be referred to as a camera module in the embodiment of the present application), etc.

[0096] Among them, other components except the display screen 750 (such as the processor 710, the fan 711, the external memory interface 720, the internal memory 721, the USB interface 730, the charging management module 740, the power management module 741, the battery 742, the antenna, the wireless communication module 760, the audio module 770, the touch panel 780, the speaker 770A, the microphone 770C, the headphone interface 770B, the keyboard 790, etc.) can be set on the base of the notebook computer. The camera 791 can be set in the storage mechanism of the notebook computer (the storage mechanism is not shown in the figure).

[0097] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the laptop computer. In other embodiments, the laptop computer may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0098] The processor 710 may include one or more processing units, for example, the processor 710 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0099] The controller can be the nerve center and command center of the laptop computer. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0100] The processor 710 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 710 is a cache memory. The memory may store instructions or data that the processor 710 has just used or cyclically used. If the processor 710 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 710, and thus improves the efficiency of the system.

[0101] In some embodiments, the processor 710 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0102] It is understandable that the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the notebook computer. In other embodiments, the notebook computer may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0103] The charging management module 740 is used to receive charging input from a charger (such as a wireless charger or a wired charger) to charge the battery 742. The power management module 741 is used to connect the battery 742, the charging management module 740 and the processor 710. The power management module 741 receives input from the battery 742 and / or the charging management module 740 to power various components of the laptop computer.

[0104] The wireless communication function of the notebook computer can be realized through the antenna and the wireless communication module 760, the modem processor and the baseband processor.

[0105] Antennas are used to transmit and receive electromagnetic wave signals. Each antenna in a laptop can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0106] In some embodiments, the antenna of the laptop is coupled to the wireless communication module 760, so that the laptop can communicate with the network and other devices through wireless communication technology. The wireless communication module 760 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (blue tooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), nearfield communication technology (nearfield communication, NFC), infrared technology (infrared, IR), etc. applied to the laptop.

[0107] The laptop computer can realize display functions through a GPU, a display screen 750, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 750 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 710 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 750 is used to display images, videos, etc.

[0108] A touch sensor is integrated in the touch panel 780. The notebook computer can receive control commands from the user to the notebook computer through the touch panel 780 and the keyboard 790.

[0109] The laptop computer can realize the shooting function through the ISP, the camera 791, the video codec, the GPU, the display screen 450 and the application processor. The ISP is used to process the data fed back by the camera 791. In some embodiments, the ISP can be set in the camera 791. The camera 791 is used to capture a static image or a video. In some embodiments, the laptop computer can include 1 or N cameras 791, where N is a positive integer greater than 1.

[0110] The external memory interface 720 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the laptop computer. The internal memory 721 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 710 executes various functional applications and data processing of the laptop computer by running the instructions stored in the internal memory 721. For example, in an embodiment of the present application, the processor 710 can execute the instructions stored in the internal memory 721, and the internal memory 721 may include a program storage area and a data storage area.

[0111] The notebook computer can implement audio functions such as music playing and recording through the audio module 770, the speaker 770A, the microphone 770C, the headphone jack 770B, and the application processor.

[0112] The audio module 770 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio input into digital audio signals. The audio module 770 can also be used to encode and decode audio signals. In some embodiments, the audio module 770 can be arranged in the processor 710, or some functional modules of the audio module 770 can be arranged in the processor 710. The speaker 770A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The microphone 770C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone interface 770B is used to connect wired headphones. The headphone interface 770B can be a USB interface 730, or it can be a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, the American Cellular Telecommunications Industry Association (cellular telecommunicationsindustry association of the USA, CTIA) standard interface.

[0113] The laptop computer described in the embodiment of the present application may include one or more speakers 770A and one or more microphones 770C.

[0114] The fan 712 is used to dissipate heat from the notebook computer. The processor 710 can control the fan 712 to run at different speeds to dissipate heat from the notebook computer.

[0115] Of course, it is understandable that the above Figure 7 The electronic device is shown as an exemplary embodiment of a notebook computer. If the electronic device is a handheld computer, PDA or other device, the structure of the electronic device may include Figure 7 The structure shown in the figure is less than Figure 7 More structures are shown in the figure, which are not limited here.

[0116] It is understandable that, generally speaking, the realization of electronic device functions requires not only hardware support but also software cooperation.

[0117] In the following, the electronic device includes a plurality of microphones (i.e., microphone 1 to microphone n), the electronic device includes a detachable camera module, the camera module can be arranged in a storage mechanism of the electronic device, and microphone 1 is the microphone closest to the camera module. Figure 8, a schematic diagram is provided to illustrate the coordination process between the hardware and software of the electronic device in the process of implementing the position detection solution provided in the embodiment of the present application.

[0118] like Figure 8 As shown, to implement the position detection solution provided in the embodiment of the present application, the electronic device may include multiple microphones (i.e., microphone 1 to microphone n), wherein microphone 1 is the microphone closest to the camera module, and therefore, microphone 1 can detect the action sound of the camera module, thereby obtaining the action sound data of the camera module. Since microphones 2 to microphone n are relatively far away from the camera module, microphones 2 to microphone n can detect the ambient sound, thereby obtaining the ambient sound data.

[0119] like Figure 8 As shown, in order to implement the position detection solution provided in the embodiment of the present application, the CPU of the electronic device may further include an audio algorithm module and a housekeeper application module (also referred to as a housekeeper application). The audio algorithm module may obtain the state of the camera module (i.e., the position of the camera module) based on the action sound data of the camera module acquired by microphone 1 and the environmental sound data acquired by microphones 2 to n. The housekeeper application module may be used to display corresponding prompt information (also referred to as a pop-up window) based on the state of the camera module (i.e., the position of the camera module) obtained by the audio algorithm module to prompt the user of the position of the camera module.

[0120] like Figure 8 As shown, the audio algorithm module may include an action sound feature recognition module, an environmental sound feature recognition module, a noise reduction module, and a status indication module.

[0121] The action sound feature recognition module can obtain the action sound feature corresponding to the action sound data based on the action sound data of the camera module detected by microphone 1. The environmental sound feature recognition module can obtain the environmental sound feature corresponding to the environmental sound data based on the environmental sound data detected by microphones 2 to n.

[0122] The noise reduction module can reduce the noise of the action sound features corresponding to the action sound data according to the environmental sound features corresponding to the environmental sound data, thereby obtaining the action sound features corresponding to the action sound data after noise reduction. In other words, the noise reduction module can remove the environmental noise in the action sound, thereby obtaining an accurate action sound.

[0123] The state indication module can perform feature recognition on the action sound features corresponding to the action sound data after noise reduction, thereby determining the state of the camera module (i.e., the position of the camera module). In other words, the state indication module can perform feature recognition on the action sound features corresponding to the action sound data after noise reduction, thereby determining whether the action sound features corresponding to the action sound data after noise reduction are the action sound features corresponding to the action sound of taking the camera module out of the storage mechanism, or the action sound features corresponding to the action sound of putting the camera module into the storage mechanism.

[0124] In the state indication module, when it is determined that the action sound feature corresponding to the action sound data after noise reduction is the action sound feature corresponding to the action sound of taking the camera module out of the storage mechanism, the state indication module can determine that the state of the camera module is the removal state (i.e., the position of the camera module is outside the storage mechanism). In the state indication module, when it is determined that the action sound feature corresponding to the action sound data after noise reduction is the action sound feature corresponding to the action sound of putting the camera module into the storage mechanism, the state indication module can determine that the state of the camera module is the insertion state (i.e., the position of the camera module is inside the storage mechanism).

[0125] After the status indication module determines the status of the camera module (i.e., the position of the camera module), the status indication module can send a corresponding status notification to the pop-up prompt module included in the housekeeper application module. That is, when the status indication module determines that the status of the camera module is the removal status, the status indication module can send a removal status notification to the pop-up prompt module included in the housekeeper application module. When the status indication module determines that the status of the camera module is the insertion status, the status indication module can send a insertion status notification to the pop-up prompt module included in the housekeeper application module.

[0126] like Figure 8 As shown, the butler application module may include a pop-up prompt module. The pop-up prompt module may display corresponding prompt information (i.e., a prompt pop-up window) according to the status notification sent by the status indication module included in the audio algorithm module. That is, when the status notification sent by the status indication module to the pop-up prompt module included in the butler application module is a removal status notification, the pop-up prompt module may display the removal prompt information, thereby prompting the user that the state of the camera module is the removal state (i.e., the position of the camera module is outside the storage mechanism). When the status notification sent by the status indication module to the pop-up prompt module included in the butler application module is a placement status notification, the pop-up prompt module may display the placement prompt information, thereby prompting the user that the state of the camera module is the placement state (i.e., the position of the camera module is inside the storage mechanism).

[0127] It should be noted that if Figure 8As shown, the housekeeper application module may also include an exception handling module. The exception handling module may be used to calibrate the prompt information displayed by the pop-up prompt module when the prompt information displayed by the pop-up prompt module is wrong. The exception handling module may also be used to calibrate the audio algorithm (i.e., calibrate the algorithm in the status indication module in the audio algorithm module) based on the sound features corresponding to the action sound corresponding to the erroneous prompt information when the prompt information displayed by the pop-up prompt module is wrong.

[0128] The following is combined with Fig. 9 , taking the electronic device including multiple microphones (i.e., a first microphone and a second microphone), the electronic device including a detachable camera module, the camera module can be set in the storage mechanism of the electronic device, and the first microphone is a microphone within a preset range of the camera module (i.e., the first microphone is the microphone closest to the camera module) as an example, the position detection method provided in the embodiment of the present application is described in detail. Fig. 9 As shown, the position detection method may include the following S901-S911.

[0129] S901. The electronic device obtains first sound data through a first microphone.

[0130] The electronic device may include a microphone, and the electronic device may acquire the first sound data through the microphone.

[0131] In some examples, the electronic device may include one microphone or multiple microphones. When the electronic device includes one microphone, the microphone is the first microphone.

[0132] When the electronic device includes multiple microphones, such as a first microphone and a second microphone, the first microphone may be a microphone within a preset range of the camera module. In other words, the first microphone is the microphone closest to the camera module. It should be noted that the preset range may be set according to actual conditions, and is not limited in the embodiments of the present application.

[0133] The second microphone may be a microphone outside the preset range of the camera module, that is, the second microphone is a microphone relatively far away from the camera module.

[0134] In some examples, the first microphone may be one or more, and the specific number of the first microphones is not limited in the embodiments of the present application. In other words, the first microphone is one or more microphones within the preset range of the camera module, and the one or more first microphones are closest to the camera module. In the embodiments of the present application, one first microphone is used as an example for schematic illustration.

[0135] In some examples, the second microphone may be one or more, and the specific number of the second microphones is not limited in the embodiments of the present application. That is, the second microphone is one or more microphones outside the preset range of the camera module, and the distance between the one or more second microphones and the camera module is relatively far (relative to the distance between the first microphone and the camera module). In the embodiments of the present application, multiple second microphones are used as an example for schematic illustration.

[0136] When executing the position detection method provided in the embodiment of the present application, the first microphone can obtain the first sound data. That is to say, the first sound data can be the action sound data corresponding to the camera module. The action of the camera module can be the camera module being taken out of the storage mechanism included in the electronic device, or the camera module being placed in the storage mechanism included in the electronic device. That is to say, the action sound data corresponding to the camera module can be the sound data when the camera module is taken out of the storage mechanism included in the electronic device, or the sound data when the camera module is placed in the storage mechanism included in the electronic device.

[0137] It should be noted that the first sound data may also be other sound data, such as environmental sound data. Therefore, after the first microphone acquires the first sound data, the electronic device may judge the first sound data to determine whether the first sound data is the action sound data corresponding to the camera module. When determining that the first sound data is the action sound data corresponding to the camera module, the electronic device may determine the position of the camera module (i.e., the state of the camera module, whether it is in the storage mechanism or outside the storage mechanism) based on the first sound data.

[0138] In some examples, when executing the position detection method provided in the embodiments of the present application, the user can trigger the housekeeper application in the electronic device to open (also referred to as start). After the housekeeper application in the electronic device is opened, the housekeeper application can notify the first microphone to detect the sound, that is, the first microphone can obtain the first sound data. Thus, after the first microphone obtains the first sound data, the electronic device can determine the position of the camera module (that is, the state of the camera module, whether it is in the storage mechanism or outside the storage mechanism) according to the first sound data.

[0139] In some examples, when the electronic device includes multiple microphones, such as a first microphone and a second microphone, and the electronic device obtains the first sound data through the first microphone, the electronic device can also obtain the second sound data (such as environmental sound data) through the second microphone. Thus, when the first microphone obtains the first sound data and the electronic device determines that the first sound data is the action sound data corresponding to the camera module, when the electronic device determines the position of the camera module based on the first sound data, the electronic device can perform noise reduction processing on the first sound data (i.e., remove the environmental sound data in the first sound data) based on the second sound data (i.e., environmental sound data), so as to obtain accurate first sound data (i.e., accurate action sound data corresponding to the camera module).

[0140] S902: The electronic device determines whether the first sound data is action sound data corresponding to the camera module.

[0141] After the electronic device acquires the first sound data through the first microphone, the electronic device can determine whether the first sound data is the action sound data corresponding to the camera module. In other words, the electronic device can determine whether the first sound data is the action sound data corresponding to the camera module (i.e., the sound data when the camera module is taken out of the storage mechanism included in the electronic device, or the sound data when the camera module is placed in the storage mechanism included in the electronic device), or other sound data, such as environmental sound data.

[0142] In some examples, the electronic device determines whether the first sound data is the action sound data corresponding to the camera module, which may include that the electronic device first obtains the voiceprint feature information corresponding to the first sound data. It should be noted that the voiceprint feature information corresponding to the first sound data may include the amplitude information corresponding to the first sound data (such as the size of the amplitude, the number of peak values ​​of the amplitude). The voiceprint feature information may also include other feature information corresponding to the first sound data. In the embodiment of the present application, the specific type of the voiceprint feature information corresponding to the first sound data is not limited, and it is sufficient that it can reflect the characteristics corresponding to the first sound data. In the embodiment of the present application, the voiceprint feature information corresponding to the first sound data includes the amplitude information corresponding to the first sound data as an example for schematic explanation. The electronic device can obtain the voiceprint feature information corresponding to the first sound data through a voiceprint recognition algorithm. In the embodiment of the present application, the specific type of the voiceprint recognition algorithm is not limited, and it is sufficient that the voiceprint feature information corresponding to the first sound data can be obtained.

[0143] Afterwards, the electronic device can determine whether the first sound data is the action sound data corresponding to the camera module based on the voiceprint feature information corresponding to the first sound data and the pre-stored voiceprint feature information of the action sound data corresponding to the camera module.

[0144] That is, after the electronic device obtains the voiceprint feature information corresponding to the first sound data, the electronic device can match the voiceprint feature information corresponding to the first sound data with the voiceprint feature information of the action sound data corresponding to the camera module stored in advance (which may also be referred to as the voiceprint feature information of the action sound data corresponding to the camera module in the embodiment of the present application). When the voiceprint feature information corresponding to the first sound data matches the voiceprint feature information of the action sound data corresponding to the camera module stored in advance, the electronic device can determine that the first sound data is the action sound data corresponding to the camera module. When the voiceprint feature information corresponding to the first sound data does not match the voiceprint feature information of the action sound data corresponding to the camera module stored in advance, the electronic device can determine that the first sound data is not the action sound data corresponding to the camera module.

[0145] It should be noted that the voiceprint feature information of the action sound data corresponding to the camera module that is pre-stored may include the amplitude information corresponding to the action sound data corresponding to the camera module that is pre-stored (such as the size of the amplitude, the number of peak values ​​of the amplitude). The voiceprint feature information of the action sound data corresponding to the camera module that is pre-stored may also include other feature information corresponding to the action sound data corresponding to the camera module that is pre-stored. In the embodiment of the present application, the specific type of the voiceprint feature information corresponding to the action sound data corresponding to the camera module that is pre-stored is not limited, and it is sufficient that it can reflect the features corresponding to the action sound data corresponding to the camera module that is pre-stored. In the embodiment of the present application, the voiceprint feature information corresponding to the action sound data corresponding to the camera module that is pre-stored includes the amplitude information corresponding to the action sound data corresponding to the camera module that is pre-stored is used as an example for schematic explanation.

[0146] The pre-stored voiceprint feature information of the action sound data corresponding to the camera module may include the voiceprint feature information corresponding to the sound data when the camera module is taken out of the storage mechanism included in the electronic device, and the voiceprint feature information corresponding to the sound data when the camera module is placed in the storage mechanism included in the electronic device.

[0147] Combine the following Fig.10 Taking the voiceprint feature information corresponding to the action sound data corresponding to the pre-stored camera module, including the amplitude information corresponding to the action sound data corresponding to the pre-stored camera module, as an example, the voiceprint feature information of the action sound data corresponding to the pre-stored camera module, including the voiceprint feature information corresponding to the sound data when the camera module is placed in the storage mechanism included in the electronic device, is schematically explained.

[0148] like Fig.10As shown, the electronic device can use a microphone (such as a first microphone) to collect sound data (i.e., sound signals) multiple times when the camera module is placed in a storage mechanism included in the electronic device, thereby obtaining amplitude information (i.e., voiceprint feature information) corresponding to the sound data when the camera module is placed in the storage mechanism included in the electronic device.

[0149] like Fig.10 As shown, it can be seen that when the camera module is placed in the storage mechanism included in the electronic device, the Push-Push structure in the storage mechanism will act twice continuously, so there will be two continuous special action soundprints. In other words, the amplitude information corresponding to the sound data when the camera module is placed in the storage mechanism included in the electronic device will include the amplitude information corresponding to two continuous action soundprints.

[0150] That is, after the electronic device obtains the voiceprint feature information corresponding to the first sound data, the electronic device can match the voiceprint feature information corresponding to the first sound data with the voiceprint feature information of the action sound data corresponding to the camera module stored in advance. When the voiceprint feature information corresponding to the first sound data matches the voiceprint feature information of the action sound data corresponding to the camera module stored in advance, that is, when the voiceprint feature information corresponding to the first sound data includes amplitude information corresponding to two consecutive action voiceprints, the electronic device can determine that the first sound data is the action sound data corresponding to the camera module.

[0151] Combine the following Fig.11 Taking the voiceprint feature information corresponding to the action sound data corresponding to the pre-stored camera module, including the amplitude information corresponding to the action sound data corresponding to the pre-stored camera module, as an example, the voiceprint feature information of the action sound data corresponding to the pre-stored camera module, including the voiceprint feature information corresponding to the sound data when the camera module is taken out from the storage mechanism included in the electronic device, is schematically explained.

[0152] like Fig.11 As shown, the electronic device can use a microphone (such as a first microphone) to collect sound data (i.e., sound signals) multiple times when the camera module is taken out of the storage mechanism included in the electronic device, thereby obtaining amplitude information (i.e., voiceprint feature information) corresponding to the sound data when the camera module is taken out of the storage mechanism included in the electronic device.

[0153] like Fig.11 As shown, it can be seen that when the camera module is taken out of the storage mechanism included in the electronic device, the Push-Push structure in the storage mechanism will move once, thereby generating a special action soundprint. In other words, the amplitude information corresponding to the sound data when the camera module is taken out of the storage mechanism included in the electronic device will include the amplitude information corresponding to an action soundprint.

[0154] That is, after the electronic device obtains the voiceprint feature information corresponding to the first sound data, the electronic device can match the voiceprint feature information corresponding to the first sound data with the voiceprint feature information of the action sound data corresponding to the camera module stored in advance. When the voiceprint feature information corresponding to the first sound data matches the voiceprint feature information of the action sound data corresponding to the camera module stored in advance, that is, when the voiceprint feature information corresponding to the first sound data includes amplitude information corresponding to one action voiceprint, the electronic device can determine that the first sound data is the action sound data corresponding to the camera module.

[0155] In the case where the electronic device determines that the first sound data is not the action sound data corresponding to the camera module, the electronic device can continue to obtain the first sound data through the first microphone, that is, it can continue to execute the above S901. In the case where the electronic device determines that the first sound data is the action sound data corresponding to the camera module, the electronic device can determine the first sound data for voiceprint judgment, so as to determine whether the first sound data is the sound data of taking out the action sound or the sound data of putting in the action sound, that is, it can continue to execute the following S903. That is to say, in the case where the electronic device determines that the first sound data is the action sound data corresponding to the camera module, the electronic device can determine the position of the camera module based on the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data.

[0156] In some examples, an electronic device determines whether first sound data is action sound data corresponding to a camera module, which may include, after the electronic device acquires the first sound data through a first microphone, an action sound recognition module in a CPU of the electronic device can be used to determine whether the first sound data is action sound data corresponding to the camera module.

[0157] In some examples, when the electronic device includes multiple microphones, such as a first microphone and a second microphone, and the electronic device obtains the first sound data through the first microphone, the electronic device can also obtain the second sound data (such as ambient sound data) through the second microphone. After the electronic device obtains the second sound data through the second microphone, the ambient sound recognition module in the CPU of the electronic device can be used to recognize the second sound data, thereby determining whether the second sound data is ambient sound data.

[0158] S903: The electronic device determines whether the first sound data is sound data of an extraction action sound or sound data of an insertion action sound.

[0159] After the electronic device determines that the first sound data is the action sound data corresponding to the camera module, the electronic device may further determine whether the first sound data is the sound data of the extraction action sound or the sound data of the insertion action sound.

[0160] When the electronic device determines that the first sound data is the sound data of the taking-out action sound, the electronic device can determine that the state of the camera module is the taking-out state (i.e., the position of the camera module is outside the storage mechanism), and can continue to execute the following S904-907. When the electronic device determines that the first sound data is the sound data of the putting-in action sound, the electronic device can determine that the state of the camera module is the putting-in state (i.e., the position of the camera module is inside the storage mechanism), and can continue to execute the following S908-911.

[0161] In some examples, the electronic device determines whether the first sound data is the sound data of the sound of the action of taking out or the sound data of the sound of the action of putting in, which may include that the electronic device first obtains the voiceprint feature information corresponding to the first sound data. It should be noted that the voiceprint feature information corresponding to the first sound data may include the amplitude information corresponding to the first sound data (such as the size of the amplitude, the number of peaks of the amplitude). The voiceprint feature information may also include other feature information corresponding to the first sound data. In the embodiment of the present application, the specific type of the voiceprint feature information corresponding to the first sound data is not limited, and it is sufficient that it can reflect the characteristics corresponding to the first sound data. In the embodiment of the present application, the voiceprint feature information corresponding to the first sound data includes the amplitude information corresponding to the first sound data as an example for schematic explanation. The electronic device can obtain the voiceprint feature information corresponding to the first sound data through a voiceprint recognition algorithm. In the embodiment of the present application, the specific type of the voiceprint recognition algorithm is not limited, and it is sufficient that the voiceprint feature information corresponding to the first sound data can be obtained.

[0162] Afterwards, the electronic device can determine whether the first sound data is the sound data of the action sound being taken out or the sound data of the action sound being put in based on the voiceprint feature information corresponding to the first sound data and the voiceprint feature information of the action sound data pre-stored corresponding to the camera module (i.e., the voiceprint feature information corresponding to the sound data of the action sound being taken out pre-stored and the voiceprint feature information corresponding to the sound data of the action sound being put in pre-stored).

[0163] That is, after the electronic device obtains the voiceprint feature information corresponding to the first sound data, the electronic device can match the voiceprint feature information corresponding to the first sound data with the voiceprint feature information of the action sound data corresponding to the camera module stored in advance (i.e., the voiceprint feature information corresponding to the sound data of the sound of the sound of the take-out action stored in advance and the voiceprint feature information corresponding to the sound data of the sound ...

[0164] When the voiceprint feature information corresponding to the first sound data matches the voiceprint feature information corresponding to the pre-stored voice data of the sound of the taking-out action, the electronic device can determine that the first sound data is the voice data of the taking-out action sound. When the voiceprint feature information corresponding to the first sound data matches the voiceprint feature information corresponding to the pre-stored voice data of the sound of the putting-in action, the electronic device can determine that the first sound data is the voice data of the putting-in action sound. That is, the electronic device determines the position of the camera module according to the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data, which can include: the electronic device matches the voiceprint feature information of the first sound data with the first voiceprint feature information and the second voiceprint feature information. When the voiceprint feature information of the first sound data matches the first voiceprint feature information, the electronic device can determine that the first sound data is the voice data of the taking-out action sound, so that the electronic device can determine that the position of the camera module is that the camera module is located outside the storage mechanism. When the voiceprint feature information of the first sound data matches the second voiceprint feature information, the electronic device can determine that the position of the camera module is that the camera module is located in the storage mechanism, so that the electronic device can determine that the position of the camera module is that the camera module is located in the storage mechanism. .

[0165] It should be noted that the voiceprint feature information corresponding to the sound data of the pre-stored taking-out action sound may include the amplitude information (such as the size of the amplitude, the number of amplitude peaks) corresponding to the sound data pre-stored by the camera module from the storage mechanism included in the electronic device. The voiceprint feature information corresponding to the sound data of the pre-stored taking-out action sound may also include other feature information corresponding to the sound data pre-stored by the camera module from the storage mechanism included in the electronic device. In the embodiment of the present application, the specific type of the voiceprint feature information corresponding to the sound data of the pre-stored taking-out action sound is not limited, and it is sufficient that it can reflect the voiceprint features corresponding to the sound data of the pre-stored taking-out action sound. In the embodiment of the present application, the voiceprint feature information corresponding to the sound data of the pre-stored taking-out action sound includes the amplitude information corresponding to the pre-stored sound data of the taking-out action sound as an example for schematic explanation.

[0166] The voiceprint feature information corresponding to the pre-stored sound data of the sound of the action of putting in may include the amplitude information (such as the size of the amplitude, the number of peak values ​​of the amplitude) corresponding to the pre-stored sound data of the camera module being put into the storage mechanism included in the electronic device. The voiceprint feature information corresponding to the pre-stored sound data of the sound of the action of putting in may also include other feature information corresponding to the pre-stored sound data of the camera module being put into the storage mechanism included in the electronic device. In the embodiment of the present application, the specific type of the voiceprint feature information corresponding to the pre-stored sound data of the sound of the action of putting in is not limited, and it is sufficient that it can reflect the voiceprint features corresponding to the pre-stored sound data of the sound of the action of putting in. In the embodiment of the present application, the voiceprint feature information corresponding to the pre-stored sound data of the sound of the action of putting in includes the amplitude information corresponding to the pre-stored sound data of the sound of the action of putting in as an example for schematic explanation.

[0167] In some examples, the electronic device determines that the first sound data is the sound data of the sound of the taking-out action or the sound data of the sound of the putting-in action, which may include that after the electronic device acquires the first sound data through the first microphone, the action sound recognition module in the CPU of the electronic device can be used to determine whether the first sound data is the action sound data corresponding to the camera module. After the action sound recognition module in the CPU of the electronic device determines that the first sound data is the action sound data corresponding to the camera module, the status indication module in the CPU of the electronic device can be used to determine that the first sound data is the sound data of the taking-out action sound or the sound data of the putting-in action sound.

[0168] In some examples, when the electronic device includes multiple microphones, such as a first microphone and a second microphone, and the electronic device obtains the first sound data through the first microphone, the electronic device can also obtain the second sound data (such as environmental sound data) through the second microphone. After the electronic device obtains the first sound data through the first microphone, the electronic device can determine whether the first sound data is action sound data. At the same time, after the electronic device obtains the second sound data through the second microphone, the environmental sound recognition module in the CPU of the electronic device can be used to identify the second sound data, thereby determining whether the second sound data is environmental sound data.

[0169] When the electronic device determines that the first sound data is action sound data and the second sound data is environmental sound data, the electronic device can perform noise reduction processing on the first sound data through a noise reduction module in the CPU of the electronic device. In other words, the noise reduction module in the CPU of the electronic device can perform noise reduction processing on the first sound data according to the second sound data, thereby removing the environmental sound data from the first sound data.

[0170] That is, when the electronic device obtains the first sound data through the first microphone, the electronic device may also obtain the second sound data through the second microphone. Afterwards, the electronic device determines the position of the camera module based on the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data, which may include: when the second sound data is environmental sound data, the electronic device may perform noise reduction processing on the first sound data based on the second sound data to obtain the third sound data. Afterwards, the electronic device may determine the voiceprint feature information of the third sound data. Afterwards, the electronic device may determine the position of the camera module based on the voiceprint feature information of the third sound data and the voiceprint feature information of the action sound data.

[0171] S904: When the electronic device determines that the first sound data is sound data of a taking-out action sound, the electronic device determines that the position of the camera module is outside the storage mechanism.

[0172] When the electronic device determines that the first sound data is sound data of a taking-out action sound, the electronic device may determine that the position of the camera module is outside the storage mechanism.

[0173] For example, when the electronic device determines that the first sound data is the sound data of the sound of the taking-out action, the electronic device determines that the position of the camera module is outside the storage mechanism, which may include: when the status indication module in the CPU of the electronic device determines that the first sound data is the sound data of the sound of the taking-out action, the status indication module in the CPU of the electronic device can determine that the position of the camera module is outside the storage mechanism, that is, the status indication module in the CPU of the electronic device can record that the state of the camera module is the taking-out state. Thus, the status indication module in the CPU of the electronic device can send a taking-out state notification to the housekeeper application in the electronic device.

[0174] S905. The electronic device displays a first prompt message, where the first prompt message is used to prompt the user that the camera module is located outside the storage mechanism, and the first prompt message includes a first incorrect option.

[0175] When the electronic device determines that the position of the camera module is outside the storage mechanism, the electronic device may display a first prompt message. The first prompt message may be used to prompt the user that the position of the camera module is outside the storage mechanism. For example, the first prompt message may include "the state of the camera module is taken out" to prompt the user that the position of the camera module is outside the storage mechanism.

[0176] The first prompt information may include a first incorrect option. The first incorrect option may be used to trigger the electronic device to confirm that the first prompt information is wrong. That is, when the electronic device displays the first prompt information for prompting the user that the camera module is located outside the storage mechanism, if the electronic device receives a trigger operation from the user for the first incorrect option included in the first prompt information, such as a click operation, in response, the electronic device may determine that the first prompt information is wrong, that is, the first prompt information prompts the user that the camera module is located outside the storage mechanism, which is wrong.

[0177] For example, the electronic device displays the first prompt information, which may include: when the status indication module in the CPU of the electronic device determines that the first sound data is the sound data of the taking-out action sound, the status indication module in the CPU of the electronic device can determine that the position of the camera module is outside the storage mechanism, that is, the status indication module in the CPU of the electronic device can record the state of the camera module as the taking-out state. Afterwards, the status indication module in the CPU of the electronic device can send a taking-out status notification to the housekeeper application in the electronic device. After the housekeeper application in the electronic device receives the taking-out status notification, the pop-up prompt module included in the housekeeper application in the electronic device can display the first prompt information, and the first prompt information is used to prompt the user that the position of the camera module is outside the storage mechanism. The first prompt information may include a first incorrect option.

[0178] In some examples, the first prompt information may further include a first correct option. The first correct option may be used to trigger the electronic device to confirm that the first prompt information is correct. That is, when the electronic device displays the first prompt information for prompting the user that the camera module is located outside the storage mechanism, if the electronic device receives a trigger operation of the user on the first correct option included in the first prompt information, such as a click operation, in response, the electronic device may determine that the first prompt information is correct, that is, the first prompt information prompts the user that the camera module is located outside the storage mechanism.

[0179] For example, when the electronic device determines that the camera module is located outside the storage mechanism, Fig.12 As shown, the electronic device may display a first prompt message 1201. The first prompt message 1201 may be used to prompt the user that the camera module is located outside the storage mechanism. Fig.12 As shown, the first prompt information 1201 may include words such as "the state of the camera module is removed" to prompt the user that the position of the camera module is outside the storage mechanism. The first prompt information 1201 may also include a first incorrect option 1202 and a first correct option 1203. The first incorrect option 1202 may be used to trigger the electronic device to confirm that the first prompt information is wrong. The first correct option 1203 may be used to trigger the electronic device to confirm that the first prompt information is correct.

[0180] That is, when the electronic device receives a trigger operation, such as a click operation, on the first incorrect option 1202 by the user, the electronic device can confirm that the first prompt information is wrong, that is, the first prompt information prompts the user that the position of the camera module is outside the storage mechanism. When the electronic device receives a trigger operation, such as a click operation, on the first correct option 1203 by the user, the electronic device can confirm that the first prompt information is correct, that is, the first prompt information prompts the user that the position of the camera module is outside the storage mechanism.

[0181] S906: The electronic device receives a trigger operation of the user on the first incorrect option.

[0182] S907: In response to the user's triggering operation on the first incorrect option, the electronic device corrects the first prompt information.

[0183] When the electronic device receives a trigger operation, such as a click operation, from the user on the first incorrect option, in response, the electronic device can determine that the first prompt information is wrong, that is, the electronic device can determine that the first prompt information prompts the user that the location of the camera module is outside the storage mechanism. Thus, the electronic device can correct the first prompt information.

[0184] In some examples, the electronic device corrects the first prompt information, which may include the electronic device correcting the first prompt information through an exception handling module included in a housekeeper application, so that the first prompt information can be used to prompt the user that the location of the camera module is within the storage mechanism.

[0185] That is to say, the exception handling module can be used to calibrate the prompt information displayed by the pop-up prompt module when the prompt information displayed by the pop-up prompt module is wrong. The exception handling module can also be used to calibrate the audio algorithm (i.e., calibrate the algorithm in the state indication module in the audio algorithm module in the CPU of the electronic device) according to the sound characteristics corresponding to the action sound corresponding to the erroneous prompt information when the prompt information displayed by the pop-up prompt module is wrong.

[0186] In some examples, after the electronic device receives the user's trigger operation on the first incorrect option, in response to the user's trigger operation on the first incorrect option, the electronic device may obtain the position of the camera module through the central processing unit CPU of the electronic device. Afterwards, the electronic device may calibrate the first voiceprint feature information (i.e., the pre-stored voiceprint feature information corresponding to the action sound data of the camera module taken out of the storage mechanism) according to the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data.

[0187] It should be noted that the central processing unit CPU of the electronic device can obtain the position of the camera module by detecting the connection, position sensing and other methods. The connection detection method means that the camera module and the electronic device are usually connected through some form of interface or connector. When the camera module is inserted into the storage mechanism, the CPU of the electronic device can detect that this connection may trigger a certain signal or level change, thereby detecting the position of the camera module. The position sensing method means that when the CPU of the electronic device detects that the camera module is connected, the CPU of the electronic device will determine the position of the camera module by querying or reading a specific register or sensor. The specific method for the CPU of the electronic device to obtain the position of the camera module in the embodiment of the present application is not limited.

[0188] In some examples, when the electronic device calibrates the first voiceprint feature information based on the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data, the electronic device may calibrate the first voiceprint feature information (i.e., the pre-stored voiceprint feature information corresponding to the action sound data taken out of the storage mechanism by the camera module) based on the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data after the number of voiceprint feature information of the first sound data reaches a preset number.

[0189] In some examples, after the CPU of the electronic device obtains the position of the camera module, when the position of the camera module obtained by the CPU does not match the position of the camera module indicated by the first display information, the electronic device may also correct the first display information according to the position of the camera module obtained by the CPU.

[0190] S908: When the electronic device determines that the first sound data is the sound data of the placing action sound, the electronic device determines that the position of the camera module is located in the storage mechanism.

[0191] When the electronic device determines that the first sound data is sound data of a placement action sound, the electronic device may determine that the camera module is located in the storage mechanism.

[0192] For example, when the electronic device determines that the first sound data is the sound data of the sound of the putting action, the electronic device determines that the position of the camera module is located in the storage mechanism, which may include: when the state indication module in the CPU of the electronic device determines that the first sound data is the sound data of the putting action sound, the state indication module in the CPU of the electronic device can determine that the position of the camera module is located in the storage mechanism, that is, the state indication module in the CPU of the electronic device can record the state of the camera module as the putting state. Thus, the state indication module in the CPU of the electronic device can send a putting state notification to the housekeeper application in the electronic device.

[0193] S909. The electronic device displays a second prompt message, where the second prompt message is used to prompt the user that the camera module is located in the storage mechanism, and the second prompt message includes a second incorrect option.

[0194] When the electronic device determines that the position of the camera module is located in the storage mechanism, the electronic device may display a second prompt message. The second prompt message may be used to prompt the user that the position of the camera module is located in the storage mechanism. For example, the second prompt message may include "the state of the camera module is the insertion state" to prompt the user that the position of the camera module is located in the storage mechanism.

[0195] The second prompt information may include a second incorrect option. The second incorrect option may be used to trigger the electronic device to confirm that the second prompt information is wrong. That is, when the electronic device displays the second prompt information for prompting the user that the camera module is located in the storage mechanism, if the electronic device receives a trigger operation from the user for the second incorrect option included in the second prompt information, such as a click operation, in response, the electronic device may determine that the second prompt information is wrong, that is, the second prompt information prompts the user that the camera module is located in the storage mechanism incorrectly.

[0196] For example, the electronic device displays the second prompt information, which may include: when the status indication module in the CPU of the electronic device determines that the first sound data is the sound data of the placement action sound, the status indication module in the CPU of the electronic device can determine that the position of the camera module is located in the storage mechanism, that is, the status indication module in the CPU of the electronic device can record the state of the camera module as the placement state. Afterwards, the status indication module in the CPU of the electronic device can send a placement status notification to the housekeeper application in the electronic device. After the housekeeper application in the electronic device receives the placement status notification, the pop-up prompt module included in the housekeeper application in the electronic device can display the second prompt information, and the second prompt information is used to prompt the user that the position of the camera module is located in the storage mechanism. The second prompt information may include a second incorrect option.

[0197] In some examples, the second prompt information may further include a second correct option. The second correct option may be used to trigger the electronic device to confirm that the second prompt information is correct. That is, when the electronic device displays the second prompt information to prompt the user that the camera module is located in the storage mechanism, if the electronic device receives a trigger operation of the user on the second correct option included in the second prompt information, such as a click operation, in response, the electronic device may determine that the second prompt information is correct, that is, the second prompt information prompts the user that the camera module is located in the storage mechanism correctly.

[0198] For example, when the electronic device determines that the camera module is located in the storage mechanism, Fig.13 As shown, the electronic device may display the second prompt information 1301. The second prompt information 1301 may be used to prompt the user that the camera module is located outside the storage mechanism. Fig.13 As shown, the second prompt information 1301 may include words such as "the state of the camera module is the inserted state" to prompt the user that the position of the camera module is located in the storage mechanism. The second prompt information 1301 may also include a second incorrect option 1302 and a second correct option 1303. The second incorrect option 1302 may be used to trigger the electronic device to confirm that the second prompt information is incorrect. The second correct option 1303 may be used to trigger the electronic device to confirm that the second prompt information is correct.

[0199] That is, when the electronic device receives a trigger operation, such as a click operation, on the second incorrect option 1302, the electronic device can confirm that the second prompt information is wrong, that is, the second prompt information prompts the user that the position of the camera module is located in the storage mechanism. When the electronic device receives a trigger operation, such as a click operation, on the second correct option 1303, the electronic device can confirm that the second prompt information is correct, that is, the second prompt information prompts the user that the position of the camera module is located in the storage mechanism.

[0200] S910: The electronic device receives a trigger operation of a user on a second incorrect option.

[0201] S911. In response to the user's triggering operation on the second incorrect option, the electronic device corrects the second prompt information.

[0202] When the electronic device receives a trigger operation, such as a click operation, from the user on the second incorrect option, the electronic device can determine in response that the second prompt information is wrong, that is, the electronic device can determine that the second prompt information prompts the user that the location of the camera module is in the storage mechanism. Thus, the electronic device can correct the second prompt information.

[0203] In some examples, the electronic device corrects the second prompt information, which may include the electronic device correcting the second prompt information through an exception handling module included in a housekeeper application, so that the second prompt information can be used to prompt the user that the location of the camera module is outside the storage mechanism.

[0204] That is to say, the exception handling module can be used to calibrate the prompt information displayed by the pop-up prompt module when the prompt information displayed by the pop-up prompt module is wrong. The exception handling module can also be used to calibrate the audio algorithm (i.e., calibrate the algorithm in the state indication module in the audio algorithm module in the CPU of the electronic device) according to the sound characteristics corresponding to the action sound corresponding to the erroneous prompt information when the prompt information displayed by the pop-up prompt module is wrong.

[0205] In some examples, after the electronic device receives the user's trigger operation on the second incorrect option, in response to the user's trigger operation on the second incorrect option, the electronic device may obtain the position of the camera module through the central processing unit (CPU) of the electronic device. Afterwards, the electronic device may calibrate the second voiceprint feature information (i.e., the pre-stored voiceprint feature information corresponding to the action sound data of the camera module being placed in the storage mechanism) according to the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data.

[0206] In some examples, when the electronic device calibrates the second voiceprint feature information based on the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data, the electronic device may calibrate the second voiceprint feature information (i.e., the voiceprint feature information corresponding to the pre-stored action sound data of the camera module being placed in the storage mechanism) based on the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data after the number of voiceprint feature information of the second sound data reaches a preset number.

[0207] In some examples, after the CPU of the electronic device obtains the position of the camera module, when the position of the camera module obtained by the CPU does not match the position of the camera module indicated by the second display information, the electronic device may also correct the second display information according to the position of the camera module obtained by the CPU.

[0208] In the solution of the present application, when the camera module is placed in or taken out of the storage mechanism, the action sound corresponding to the camera module is obtained through the microphone on the electronic device. Then, the voiceprint judgment is performed based on the action sound corresponding to the camera module, so as to determine whether the action sound is the sound when the camera module is placed in the storage mechanism or the sound when the camera module is taken out of the storage mechanism.

[0209] Since the electronic device can obtain the action sound corresponding to the camera module through the microphone, the position of the camera module can be determined according to the action sound of the camera module. Therefore, the solution of the present application does not need to add a Hall device to the electronic device, thereby avoiding the complexity of the electronic device structure and reducing the cost of the electronic device.

[0210] Furthermore, the solution of the present application does not require the addition of a flexible circuit board FPC, a connector BTB, and a power supply corresponding to the Hall device in the electronic device, thereby further avoiding the complexity of the structure of the electronic device and reducing the cost of the electronic device, and avoiding the electronic device from using a larger stacking space while reducing the weight of the electronic device.

[0211] Corresponding to the method in the above-mentioned embodiment, the embodiment of the present application further provides a position detection device. The position detection device can be applied to an electronic device to implement the method in the above-mentioned embodiment. The function of the position detection device can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0212] For example, Fig.14 A schematic diagram of the structure of a position detection device 1400 is shown. Fig.14 As shown, the position detection device 1400 may include: an acquisition module 1401, a determination module 1402, and the like.

[0213] The acquisition module 1401 may be configured to acquire first sound data through a first microphone.

[0214] The determination module 1402 may be configured to determine voiceprint feature information of the first sound data.

[0215] The determination module 1402 can also be used to determine the position of the camera module based on the voiceprint feature information of the first sound data and the voiceprint feature information of the action sound data corresponding to the camera module; wherein the action sound data includes the action sound data of the camera module being placed in the storage mechanism and the action sound data of the camera module being taken out of the storage mechanism; the position of the camera module is that the camera module is located in the storage mechanism or the camera module is located outside the storage mechanism.

[0216] In another possible implementation, the voiceprint feature information of the action sound data includes first voiceprint feature information and second voiceprint feature information. The first voiceprint feature information is the voiceprint feature information corresponding to the action sound data taken out by the camera module from the storage mechanism, and the second voiceprint feature information is the voiceprint feature information corresponding to the action sound data put into the storage mechanism by the camera module.

[0217] The above-mentioned position detection device 1400 may further include: a matching module 1403. The matching module 1403 may be used to match the voiceprint feature information of the first sound data with the first voiceprint feature information and the second voiceprint feature information.

[0218] The determination module 1402 may also be used to determine that the position of the camera module is outside the storage mechanism when the voiceprint feature information of the first sound data matches the first voiceprint feature information.

[0219] The determination module 1402 may also be used to determine that the position of the camera module is located in the storage mechanism when the voiceprint feature information of the first sound data matches the second voiceprint feature information.

[0220] In another possible implementation, the first microphone is a microphone within a preset range of the camera module.

[0221] In another possible implementation, the microphone further includes a second microphone, and the second microphone is a microphone outside a preset range of the camera module.

[0222] The acquisition module 1401 may also be configured to acquire second sound data through a second microphone.

[0223] The position detection device 1400 may further include a noise reduction module 1404. The noise reduction module 1404 may be configured to perform noise reduction processing on the first sound data according to the second sound data to obtain third sound data when the second sound data is environmental sound data.

[0224] The determination module 1402 may also be used to determine voiceprint feature information of the third sound data.

[0225] The determination module 1402 may also be used to determine the position of the camera module according to the voiceprint feature information of the third sound data and the voiceprint feature information of the action sound data.

[0226] In another possible implementation, the determination module 1402 may also be used to determine the voiceprint feature information of the first sound data when the first sound data is an action sound.

[0227] In another possible implementation, the position detection device 1400 may further include: a display module 1405. The display module 1405 may be used to display first prompt information; the first prompt information is used to prompt the user that the position of the camera module is outside the storage mechanism.

[0228] In another possible implementation, the first prompt information includes a first incorrect option.

[0229] The above-mentioned position detection device 1400 may further include: a receiving module 1406. The receiving module 1406 may be configured to receive a triggering operation of a user on the first incorrect option.

[0230] The position detection device 1400 may further include a calibration module 1407. The calibration module 1407 may be used to obtain the position of the camera module through the central processing unit (CPU) of the electronic device in response to the user's triggering operation on the first incorrect option, and calibrate the first voiceprint feature information according to the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data.

[0231] In another possible implementation, the display module 1405 may also be used to display a second prompt message; the second prompt message is used to prompt the user that the location of the camera module is outside the storage mechanism.

[0232] In another possible implementation, the second prompt information includes a second incorrect option.

[0233] The receiving module 1406 may also be configured to receive a triggering operation of the user on the second incorrect option.

[0234] The calibration module 1407 can also be used to respond to the user's triggering operation on the second incorrect option, obtain the position of the camera module through the central processing unit CPU of the electronic device, and calibrate the second voiceprint feature information according to the position of the camera module obtained by the CPU and the voiceprint feature information of the first sound data.

[0235] It should be understood that the division of units or modules (hereinafter referred to as units) in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. And the units in the device can all be implemented in the form of software calling through processing elements; or all in the form of hardware; or some units can be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware.

[0236] For example, each unit can be a separately established processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in a memory in the form of a program, and called and executed by a certain processing element of the device. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element described here can also be called a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or in the form of software called by a processing element.

[0237] In one example, the unit in the above apparatus may be one or more integrated circuits configured to implement the above method, such as one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.

[0238] For another example, when the units in the device can be implemented in the form of a processing element scheduling program, the processing element can be a general-purpose processor, such as a CPU or other processor that can call a program. For another example, these units can be integrated together and implemented in the form of a system on a chip SOC.

[0239] In one implementation, the units of the above apparatus implementing the corresponding steps in the above method can be implemented in the form of a processing element scheduling program. For example, the apparatus may include a processing element and a storage element, and the processing element calls the program stored in the storage element to execute the method described in the above method embodiment. The storage element may be a storage element on the same chip as the processing element, that is, an on-chip storage element.

[0240] In another implementation, the program for executing the above method may be in a storage element on a different chip from the processing element, i.e., an off-chip storage element. In this case, the processing element calls or displays the program on the on-chip storage element from the off-chip storage element to call and execute the method described in the above method embodiment.

[0241] For example, an embodiment of the present application may also provide a device, such as an electronic device, which may include a processor and a memory for storing instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the position detection method described in the above embodiment. The memory may be located inside the electronic device or outside the electronic device. And the processor includes one or more.

[0242] In another implementation, the unit of the device implementing each step in the above method may be configured as one or more processing elements, which may be arranged on the corresponding electronic device, and the processing element here may be an integrated circuit, for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these integrated circuits. These integrated circuits may be integrated together to form a chip.

[0243] For example, the present application also provides a chip, which can be applied to the above electronic device. The chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit to implement the method described in the above method embodiment.

[0244] An embodiment of the present application also provides a computer program product, including computer instructions executed by the above-mentioned electronic device.

[0245] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0246] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0247] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0249] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, such as a program. The software product is stored in a program product, such as a computer-readable storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0250] For example, the embodiment of the present application may also provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by an electronic device, the electronic device implements the position detection method as described in the above method embodiment.

[0251] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A position detection method, characterized in that: Applied to an electronic device, the electronic device comprises a first microphone, a camera module, a storage mechanism corresponding to the camera module and a central processing unit (CPU), the camera module is detachably arranged in the storage mechanism, the storage mechanism comprises a push-push structure, the CPU is connected to the camera module, and the method comprises: Acquire first sound data through the first microphone, and determine voiceprint feature information of the first sound data, wherein the first sound data includes action sound data corresponding to the camera module, the action sound data is generated based on the camera module being placed in the storage mechanism, or is generated based on the camera module being taken out of the storage mechanism, and the voiceprint feature information includes amplitude information; match the voiceprint feature information with preset voiceprint feature information, wherein the preset voiceprint feature information includes first voiceprint feature information and second voiceprint feature information, the first voiceprint feature information includes first amplitude information corresponding to when the camera module is taken out of the storage mechanism, the first amplitude information is generated based on a single movement of the Push-Push structure, and the second voiceprint information includes second amplitude information corresponding to when the camera module is placed in the storage mechanism, and the second amplitude information is generated based on two consecutive movements of the Push-Push structure; When the voiceprint feature information matches the first voiceprint feature information, determining that the camera module is taken out from the storage mechanism; When the voiceprint feature information matches the second voiceprint feature information, it is determined that the camera module is located in the storage mechanism; the CPU detects the connection interface between it and the camera module to calibrate the position of the camera module to obtain the calibrated position of the camera module, and the position of the camera module includes that the camera module is located in the storage mechanism and that the camera module is located outside the storage mechanism.

2. The method according to claim 1, characterized in that The first microphone is a microphone within a preset range of the camera module.

3. The method according to claim 2, characterized in that The microphone further includes a second microphone, the second microphone is a microphone outside a preset range of the camera module, and the second microphone is used to obtain second sound data. The matching of the voiceprint feature information with the preset voiceprint feature information includes: In a case where the acquired second sound data is environmental sound data, performing noise reduction processing on the first sound data according to the second sound data to obtain the voiceprint feature information corresponding to the first sound data after the noise reduction processing; The voiceprint feature information corresponding to the first sound data after noise reduction processing is matched with the preset voiceprint feature information.

4. The method according to claim 1, characterized in that: After determining that the camera module is taken out from the storage mechanism, the method further includes: The first prompt information is displayed, where the first prompt information is used to prompt the user that the position of the camera module is that the camera module is located outside the storage mechanism.

5. The method according to claim 4, characterized in that After displaying the first prompt information, the method further includes: receiving a triggering operation of a user on a first incorrect option in the first prompt information; In response to the user's triggering operation on the first incorrect option, the step of detecting the connection interface between the CPU and the camera module to calibrate the position of the camera module to obtain the calibrated position of the camera module is executed.

6. The method according to claim 1, characterized in that After determining that the camera module is located in the storage mechanism, the method further includes: Display a second prompt message; the second prompt message is used to prompt the user that the position of the camera module is that the camera module is located outside the storage mechanism.

7. The method according to claim 6, characterized in that After the second prompt information is displayed, the method further includes: receiving a triggering operation of a user on a second incorrect option in the second prompt information; In response to the user's triggering operation on the second incorrect option, the step of detecting the connection interface between the CPU and the camera module to calibrate the position of the camera module to obtain the calibrated position of the camera module is executed.

8. An electronic device, characterized in that: The electronic device comprises a processor and a memory for storing instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method as claimed in any one of claims 1 to 7.

9. A computer-readable storage medium having computer program instructions stored thereon; characterized in that: When the computer program instructions are executed by an electronic device, the electronic device implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for determining telescopic state of camera component and electronic device

    CN110198372A

  • State identification method of electronic equipment, and electronic equipment

    CN110415711A