Electronic device control method, electronic device, and storage medium

By detecting and controlling the interference of sound waves in electronic devices, the interference problem caused by the overlap of ultrasonic bands and gyroscope sensor bands is solved, ensuring the stability of equipment functions and picture clarity.

CN118450035BActive Publication Date: 2024-12-10HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311171974.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2024-12-10
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

The ultrasonic frequency band emitted by the electronic device overlaps with the driving frequency band of the gyroscope sensor, causing the gyroscope sensor to resonate, affecting the functional performance of the electronic device, such as the shooting image is unclear.

Method used

The second device (such as a handset) transmits acoustic waves to avoid interference by detecting whether the emitted sound waves of the second device (such as a gyroscope sensor), and control the second device to turn off the emitted sound waves according to priority.

Benefits of technology

It effectively avoids interference from ultrasonic waves on the gyroscope sensor, ensuring the stability of the shooting screen and normal function operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118450035B_ABST
    Figure CN118450035B_ABST
Patent Text Reader

Abstract

The present application provides a control method of an electronic device, an electronic device and a storage medium, and relates to the technical field of electronic devices. The present application can determine whether the sound waves emitted by the electronic device interfere with certain specific devices, for example, whether the ultrasonic waves emitted by the earpiece cause ultrasonic interference to the gyroscope sensor. When it is determined that the sound waves emitted by the electronic device interfere with the specific device, if the priority of the specific device is higher than the priority of the device that emits the sound waves, the device that emits the sound waves is controlled to turn off the emission of the sound waves to avoid interference with the specific device, thereby avoiding abnormalities in the application using the specific device. For example, when the electronic device is shooting, if the ultrasonic waves emitted by the earpiece cause ultrasonic interference to the gyroscope sensor, the ultrasonic waves can be turned off to avoid the ultrasonic waves from causing ultrasonic interference to the gyroscope sensor, causing the shooting picture of the electronic device to become blurred.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to a control method of an electronic equipment, an electronic equipment and a storage medium. Background Art

[0002] In order to meet the distance measurement needs of electronic devices, currently, electronic devices such as mobile phones and tablets can detect the distance of the object being measured by emitting ultrasonic waves. However, the frequency band of the ultrasonic waves emitted by electronic devices may overlap with the driving frequency band of certain specific sensors (gyroscope sensors) in electronic devices. For example, the frequency band of the ultrasonic waves emitted by electronic devices is usually 20kHz-24kHz, and the driving frequency band of the gyroscope sensor is usually 20kHz-30kHz. Since the frequency band of the ultrasonic waves emitted by electronic devices overlaps with the driving frequency band of the gyroscope sensor in the range of 20kHz-24kHz, when the electronic device emits ultrasonic waves, it will cause the gyroscope sensor to resonate, resulting in abnormal data detected by the gyroscope sensor, causing some functions of the electronic device to be abnormal, such as unclear images.

[0003] Therefore, how to prevent the ultrasonic waves emitted by electronic devices from interfering with the sensors of the electronic devices has become a technical problem that needs to be solved. Summary of the invention

[0004] Some embodiments of the present application provide a control method of an electronic device, an electronic device, and a computer-readable storage medium. The present application is introduced from multiple aspects below, and the embodiments and beneficial effects of the following aspects can be referenced to each other.

[0005] In a first aspect, the present application provides a control method for an electronic device, which is used for the electronic device, and the electronic device includes a first device and a second device. The method includes: running a first application, and the first application controls the operation of the first device required by the first application; detecting that the second application controls the second device to emit sound waves, and determining whether the sound waves emitted by the second device interfere with the first device; corresponding to determining that the sound waves emitted by the second device interfere with the first device, determining whether the priority of the first application is higher than the priority of the second application; corresponding to determining that the priority of the first application is higher than the priority of the second application, controlling the second device to turn off the emission of sound waves.

[0006] The first application may be a camera application, a game application, a map application, etc. The second application may be a non-call application such as an LBS application, a navigation application, a sports and health application, or a call application.

[0007] The first device may be a gyroscope sensor, or other devices similar to the gyroscope sensor that rely on their own vibration to detect data. The second device may be a device that emits sound waves, such as a receiver, a speaker, an ultrasonic proximity sensor, etc. The sound waves may be ultrasonic waves, or sound waves of other frequency bands.

[0008] According to an implementation of the present application, when an electronic device (such as a mobile phone) runs a first application (such as a camera application), the first application can control the operation of a first device (such as a gyroscope sensor). During the operation of the first application, when the electronic device detects that a second application (such as a call application) controls a second device (such as a receiver) to emit sound waves, it can be determined whether the sound waves emitted by the second device will interfere with the first device. When it is determined that the sound waves emitted by the second device will interfere with the first device, if the priority of the first application is higher than the priority of the second application, the electronic device will control the second device to turn off the emission of sound waves to avoid interference with the first device, causing the first application to be abnormal.

[0009] In some embodiments, determining whether the sound waves emitted by the second device interfere with the first device includes: controlling the second device to emit the sound waves; during the process of the second device emitting the sound waves, acquiring multiple data output by the first device within a set time period; and determining whether the sound waves emitted by the second device interfere with the first device based on the multiple data.

[0010] The set time length may be 10 seconds, etc. The data mentioned in the present application may be angular velocity data.

[0011] According to an implementation of the present application, during the process of the second device emitting sound waves, whether the sound waves emitted by the second device interfere with the first device is determined based on multiple data output by the first device within a set time period, thereby improving the accuracy of the judgment.

[0012] In some embodiments, controlling the second device to emit sound waves includes: determining whether the electronic device is in a stationary state; and corresponding to determining that the electronic device is in a stationary state, controlling the second device to emit sound waves.

[0013] According to the implementation manner of the present application, when the electronic device is in a stationary state, the second device is controlled to emit sound waves for testing, thereby avoiding interference caused by the movement of the electronic device.

[0014] In some embodiments, determining whether an electronic device is in a stationary state includes: obtaining N data output by a first device, where N is an integer; calculating a first noise of the first device based on the N data; and determining that the electronic device is in a stationary state when it is determined that the first noise is less than a first threshold and the N data are all less than a second threshold.

[0015] Exemplarily, 100 (as an example of N) data output by the gyroscope sensor can be obtained, and then the noise of the gyroscope sensor (i.e., the first noise) can be calculated based on the 100 data. If the noise is less than 0.014 (as an example of the first threshold value) and the 100 data are all less than 0.01 (as an example of the second threshold value), it can be determined that the electronic device is in a stationary state.

[0016] According to the implementation manner of the present application, whether the gyro sensor is in a stationary state is judged by using a plurality of data continuously output by the gyro sensor and the noise of the gyro sensor, thereby improving the accuracy of the judgment.

[0017] In some embodiments, determining whether the sound waves emitted by the second device interfere with the first device based on multiple data includes: calculating a second noise of the first device based on the multiple data; and determining whether the sound waves emitted by the second device interfere with the first device based on the second noise.

[0018] The second noise may be the noise noise_gyro2 mentioned in this application.

[0019] According to the implementation of the present application, when the sound waves emitted by the second device interfere with the first device, the first device will have abnormal noise. In the process of the second device emitting sound waves, it is more intuitive and accurate to judge whether the sound waves emitted by the second device interfere with the first device based on the noise of the first device.

[0020] In some embodiments, based on the second noise, determining whether the sound waves emitted by the second device interfere with the first device includes: corresponding to determining that the second noise is greater than a third threshold, based on multiple data, calculating the power spectral density of the first device; determining whether there is a target resonant frequency in the power spectral density; if so, determining that the sound waves emitted by the second device interfere with the first device; if not, determining that the sound waves emitted by the second device do not interfere with the first device.

[0021] Among them, the power spectral density may be PSD_gyro2. The target resonant frequency may be greater than a periodic resonant frequency of 10 Hz. The third threshold may be determined based on the noise of the second device when the first device does not emit sound waves, for example, the third threshold may be 10*noise_gyro1, where noise_gyro1 is the noise of the first device when the electronic device is in a stationary state and the second device does not emit sound waves. For example, when it is determined that the mobile phone is in a stationary state and the earpiece does not emit ultrasonic waves, the data output by the gyroscope sensor within 10 seconds is obtained, and then the noise noise_gyro1 of the gyroscope sensor is calculated based on the data.

[0022] According to the implementation mode of the present application, when the sound waves emitted by the second device interfere with the first device, there must be a target resonant frequency in the power spectrum density of the first device. Whether the sound waves emitted by the second device interfere with the first device is determined based on whether the target resonant frequency exists in the power spectrum density of the first device, thereby improving the accuracy of the judgment.

[0023] In some embodiments, determining whether the priority of a first application is higher than the priority of a second application includes: corresponding to determining that the electronic device is in a first state, determining that the priority of the first application is higher than the priority of the second application; corresponding to determining that the electronic device is in a second state, determining that the priority of the first application is lower than the priority of the second application.

[0024] The first state may be a state where the second device is not required to emit sound waves, and the second state may be a state where the second device is required to emit sound waves.

[0025] For example, the first application is a camera application, and the second application is a call application. When the phone is in shooting state and the phone is not in a call gesture (that is, the user uses the phone's receiver to make a call at the ear), the stability of the shooting picture needs to be ensured, and the receiver does not need to emit ultrasonic waves at this time. The priority of the camera application is higher than the priority of the call application. Accordingly, the priority of the gyroscope sensor is higher than the priority of the receiver. At this time, the phone needs to control the receiver to turn off the emission of ultrasonic waves. When the phone is in a call gesture, in order to avoid accidental touches on the phone's screen, the receiver needs to emit ultrasonic waves. The priority of the call application is higher than the priority of the camera application. Accordingly, the priority of the receiver is higher than the priority of the gyroscope sensor. At this time, the phone does not need to control the receiver to turn off ultrasonic waves.

[0026] For another example, the first application is a camera application and the second application is an LBS application. In a scenario where the mobile phone is in shooting mode and the LBS application controls the receiver to transmit ultrasound, since the mobile phone is in shooting mode and needs to ensure the stability of the shooting image, the receiver does not need to transmit ultrasound at this time, and the priority of the camera application is higher than that of the LBS application.

[0027] In some embodiments, the method further includes: setting the first mark to a first value in response to determining that the sound waves emitted by the second device interfere with the first device; and setting the first mark to a second value in response to determining that the sound waves emitted by the second device do not interfere with the first device.

[0028] In some embodiments, the first mark may be a flag bit mentioned in the present application, the first value may be true or 1, etc., and the second value may be false or 0, etc.

[0029] In some embodiments, the method also includes: when the first application is run next time and it is detected that the second application controls the second device to emit sound waves, based on the first mark, determining whether the sound waves emitted by the second device interfere with the first device; corresponding to the first mark being a first value, determining that the sound waves emitted by the second device interfere with the first device; corresponding to the first mark being a second value, determining that the sound waves emitted by the second device do not interfere with the first device.

[0030] After first determining whether the ultrasonic wave emitted by the mobile phone receiver generates ultrasonic interference to the gyroscope sensor, a flag bit may be set to indicate whether the ultrasonic wave emitted by the mobile phone receiver generates interference to the gyroscope sensor, so as to determine whether to initiate an avoidance scheme by reading the flag bit.

[0031] Exemplarily, when it is first determined that the ultrasonic waves emitted by the mobile phone receiver will cause ultrasonic interference to the gyroscope sensor, the flag bit can be set to true. When it is determined that the ultrasonic waves emitted by the mobile phone receiver will not cause ultrasonic interference to the gyroscope sensor, the flag bit can be set to false. Among them, the setting method of the flag bit is only for illustrative purposes, and the flag bit can also be set in other ways, such as setting the flag bit to 1 or 0, etc., without limitation. In the subsequent mobile phone sports camera application, when it is detected that the LBS application controls the receiver to emit ultrasonic waves, the mobile phone can directly determine whether the ultrasonic waves emitted by the receiver will interfere with the gyroscope sensor by reading the flag bit, without having to execute a judgment process, thereby improving the efficiency of the judgment.

[0032] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, when the processor executes the instructions in the memory, the electronic device can execute the method described in the first aspect of the present application. The beneficial effects that can be achieved in the second aspect can refer to the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here.

[0033] In a third aspect, the present application provides a computer-readable storage medium on which instructions are stored, and when the instructions are executed on a computer, the computer can execute the method described in any embodiment of the first aspect. The beneficial effects that can be achieved in the third aspect can refer to the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here.

[0034] In a fourth aspect, the embodiments of the present application provide a computer program product, including a computer program / instruction, which, when executed, causes a computer to execute the method described in any embodiment of the first aspect. The beneficial effects that can be achieved in the fourth aspect can refer to the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1A An example diagram of an application of a call scenario provided in an embodiment of the present application;

[0036] Figure 1B An example diagram of ultrasound provided in an embodiment of the present application;

[0037] Figure 2 An example diagram of a shooting scene provided in an embodiment of the present application;

[0038] Figure 3A Figure 1 is a structural example of a MEMS gyroscope sensor provided in an embodiment of the present application;

[0039] Figure 3B Structural example of the MEMS gyroscope sensor provided in the embodiment of the present application Figure 2 ;

[0040] Figure 4A Figure 1 is an example of a waveform of a gyro sensor during ultrasonic interference provided in an embodiment of the present application;

[0041] Figure 4B An example diagram of a shooting scene during ultrasonic interference provided in an embodiment of the present application;

[0042] Figure 5A FIG1 is an example of a flow chart of a control method for an electronic device according to an embodiment of the present application;

[0043] Figure 5B An example of a control method for an electronic device according to an embodiment of the present application Figure 2 ;

[0044] Fig. 6A This is an example diagram of the waveform of the noise of the gyroscope sensor when there is no ultrasonic interference provided by the embodiment of the present application;

[0045] Figure 6B An example of the waveform of the noise of the gyroscope sensor during ultrasonic interference provided in the embodiment of the present application Figure 2 ;

[0046] Figure 7 An example diagram of the ultrasonic interference judgment process provided in an embodiment of the present application;

[0047] Fig. 8A An example waveform diagram of the power spectrum density of a gyroscope sensor during ultrasonic interference provided in an embodiment of the present application;

[0048] Figure 8B An example waveform diagram of the power spectrum density of the gyroscope sensor provided in an embodiment of the present application when there is no ultrasonic interference;

[0049] Fig. 9A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0050] The embodiment of the present application is used to provide a control method of an electronic device. The control method of the present application can prevent the ultrasonic waves emitted by the electronic device from interfering with a specific sensor in the electronic device.

[0051] The present application does not limit the specific form of the electronic device, and the electronic device may be a mobile phone, a laptop computer, a tablet, a wearable device (e.g., a watch, smart glasses, a helmet), an augmented reality (AR) / virtual reality (VR) device, a personal digital assistant (PDA), etc. The following description will take a mobile phone as an example of an electronic device.

[0052] For ease of understanding, the application scenarios of the electronic device of the present application are first introduced below.

[0053] (1) Call scenario

[0054] like Figure 1A As shown, in a call scenario, the receiver (RCV) (or "receiver") in the mobile phone will emit ultrasonic waves, and then the microphone (MIC) of the mobile phone will collect the ultrasonic waves reflected by the face, and send the collected ultrasonic waves to the audio processing unit (or "audio module") (not shown in the figure). After the audio processing unit receives the reflected ultrasonic waves, it can determine the distance between the mobile phone screen and the face according to the emission time and reflection time of the ultrasonic waves, so as to control the mobile phone screen to turn off when the mobile phone screen is close to the face. For example, the mobile phone screen can be controlled to turn off when the distance between the mobile phone screen and the face is detected to be 5 cm, thereby avoiding accidental touches. The frequency range of the ultrasonic waves emitted by the receiver is generally set within the range of 20kHz-24kHz. For example, if Figure 1B As shown, the handset of a mobile phone can emit ultrasonic waves of 20.2kHz-22.5kHz.

[0055] (2) Shooting scene

[0056] like Figure 2As shown, the user can use the camera application on the mobile phone to shoot, such as taking photos or recording videos. During the shooting process, in order to improve the picture quality, the mobile phone will start the gyroscope sensor to detect the motion posture of the mobile phone, obtain data such as the angular velocity of the mobile phone, and then send the data detected by the gyroscope sensor to the central processor. After the central processor receives the data detected by the gyroscope sensor, it can determine the electronic image stabilization (EIS) data and / or the optical image stabilization (OIS) data based on these data, and then perform motion compensation on the shooting picture according to the EIS data and / or OIS data to ensure the stability of the shooting picture and obtain a clearer shooting picture.

[0057] In the present application, the gyro sensor may be a mechanical gyro sensor, an optical gyro sensor, a micro-electro-mechanical systems (MEMS) gyro sensor, etc., without limitation. The principle of the gyro sensor is described below using a MEMS gyro sensor as an example.

[0058] Figure 3A The following is a structural example diagram of a MEMS gyroscope sensor provided for the embodiment of the present application. Figure 3A As shown, in a stationary state, the MEMS gyroscope sensor will drive the Mass block 10 to oscillate back and forth along the default motion direction according to a set driving frequency, such as 20kHz, so that the comb arms 11 on the Mass block 10 slide back and forth in the slide groove 20 formed by the capacitor plate 21 and the capacitor plate 22. When the MEMS gyroscope sensor rotates, a Coriolis force (a tangential force on a rotating object during radial motion) is generated. Figure 3B As shown, under the action of the Coriolis force, the movement direction of the Mass mass block 10 changes, so that the movement direction and movement amplitude of the comb arm 11 on the Mass mass block 10 in the slide slot 20 also change, causing the comb arm 11 to tilt between the capacitor plate 21 and the capacitor plate 22, so that the area of ​​the comb arm 11 and the capacitor plate 21 and the capacitor plate 22 in the vertical direction changes. This also causes the size of the dielectric constant between the capacitor plate 21 and the capacitor plate 22 to change, thereby causing the size of the capacitance between the capacitor plate 21 and the capacitor plate 22 to change. Since the capacitance change between the capacitor plate 21 and the capacitor plate 22 can reflect the angular velocity of the MEMS gyroscope sensor rotation, the angular velocity of the MEMS gyroscope sensor rotation can be determined by measuring the capacitance between the capacitor plate 21 and the capacitor plate 22.

[0059] In order to prevent common sound waves from interfering with the gyro sensor, the driving frequency of the gyro sensor is generally set within the range of 20kHz-30kHz, that is, the vibration frequency of the Mass block in the gyro sensor is generally within the range of 20kHz-30kHz. The ultrasonic frequency band emitted by the mobile phone receiver is usually set within the range of 20kHz-24kHz. Since the frequency band of the ultrasonic wave emitted by the mobile phone receiver overlaps with the driving frequency band of the gyro sensor, if the receiver and the gyro sensor work at the same time, the ultrasonic wave emitted by the receiver will cause the gyro sensor to resonate, resulting in increased noise and reduced accuracy of the gyro sensor. Figure 4A As shown, when the ultrasonic wave emitted by the earpiece generates ultrasonic interference to the gyro sensor, the gyro sensor will have abnormal noise, and the noise exceeds the normal level, for example, the amplitude of the noise is greater than 0.014.

[0060] Based on this, usually, in shooting scenes, the handset of the mobile phone will not be activated to prevent the ultrasonic waves emitted by the handset from causing ultrasonic interference to the gyroscope sensor, resulting in blurred pictures taken by the mobile phone. However, in some cases, some third-party applications (such as sports and health applications, navigation applications, mobile location-based services (LBS) applications, etc.) may call the handset of the mobile phone to emit ultrasonic waves when the mobile phone is shooting, causing ultrasonic interference to the gyroscope sensor.

[0061] For example, Figure 4B As shown in the figure, during the process of shooting with a mobile phone, if the LBS application is running in the background, the LBS application may call the handset of the mobile phone to emit ultrasonic waves to detect the distance between the mobile phone and surrounding objects, so as to obtain more accurate location information and navigate for the user in the background. At this time, the ultrasonic waves emitted by the handset of the mobile phone will cause ultrasonic interference to the gyroscope sensor, causing the picture taken by the mobile phone to be blurred.

[0062] In order to solve the above technical problems, the present application provides a control method for an electronic device. In the present application, it can be determined whether the sound waves (such as ultrasound) emitted by the first device (such as a handset) of the electronic device interfere with the second device (such as a gyroscope sensor) in the electronic device. In the case where it is determined that the sound waves emitted by the first device interfere with the second device, in the process where the first device and the second device are working at the same time, when it is determined that the sound waves emitted by the first device will interfere with the application using the second device, such as the ultrasound emitted by the handset affects the camera application shooting, the electronic device can control the first device to turn off the emission of sound waves. In this way, it is possible to avoid the first device emitting sound waves to interfere with the second device, thereby avoiding abnormal data of the second device.

[0063] It can be understood that the sound waves emitted by the first device can be ultrasonic waves or sound waves in other frequency bands.

[0064] It can be understood that the frequency band of the ultrasonic wave emitted by the first device and the driving frequency band of the second device are both preset, and the preset frequency band information can be obtained to determine whether the ultrasonic wave emitted by the first device causes ultrasonic interference to the second device. It is also possible to compare the noise of the second device when the first device emits ultrasonic waves and when it does not emit ultrasonic waves, and then determine whether the ultrasonic wave emitted by the first device causes ultrasonic interference to the second device based on the comparison result. It is also possible to obtain the data of the second device when the first device emits ultrasonic waves, calculate the spectrum density of the second device based on the data, and then determine whether the ultrasonic wave emitted by the first device causes ultrasonic interference to the second device based on the frequency density of the second device.

[0065] It is understandable that the first device may be a handset, and the second device may be a gyroscope sensor. In the shooting scene, the priority of the gyroscope sensor is higher than that of the handset because the clarity of the shot needs to be ensured. At this time, the ultrasonic wave needs to be turned off to avoid interference with the gyroscope sensor. However, in the call scene, the priority of the handset is higher than that of the gyroscope sensor because it is necessary to avoid accidental touches between the face and the phone screen during a call without ensuring the clarity of the shot. At this time, there is no need to turn off the ultrasonic wave.

[0066] In the present application, the earpiece may also be other sensors that emit ultrasonic waves, such as ultrasonic proximity sensors, etc. The gyroscope sensor may also be other similar sensors, which is not limited.

[0067] The embodiments of the present application are described in detail below.

[0068] Figure 5A FIG1 is an example of a process flow of a control method for an electronic device according to an embodiment of the present application. The present application does not limit the specific form of the electronic device, and the electronic device may be a mobile phone, a laptop computer, a tablet, a wearable device (e.g., a watch, smart glasses, a helmet), an AR / VR device, etc. The following description will be made using a mobile phone as an example.

[0069] S101, running a first application, where the first application controls the running of a first device required by the first application.

[0070] The first application may be a camera application, a game application, a map application, etc. The first device may be a gyroscope sensor, or other devices that rely on their own vibration to detect data. For ease of understanding, the following description is made by taking the first application as a camera application as an example.

[0071] For example, when a user opens the camera application on a mobile phone to shoot, the mobile phone starts and runs the camera application. At this time, in order to improve the stability of the shooting picture, the camera application will control the gyroscope sensor to run. When running, the gyroscope sensor can provide the camera application with the posture data of the mobile phone, such as angular velocity, so that the camera application can perform motion compensation on the shooting picture according to the data provided by the gyroscope sensor to improve the stability of the shooting picture.

[0072] S102, it is detected that the second application controls the second device to emit sound waves, and it is determined whether the sound waves emitted by the second device interfere with the first device. If yes, step S103 is executed. If no, step S104 is executed.

[0073] The sound waves in the embodiment of the present application may be ultrasonic waves or sound waves of other frequency bands, and are not limited thereto. The second device may be a device that emits sound waves, such as a receiver, a speaker, an ultrasonic proximity sensor, etc. The second application may be a non-call application such as an LBS application, a navigation application, a sports and health application, or a call application.

[0074] For ease of understanding, the following description is given by taking the second application as a call application, the second device as a receiver, and the sound wave as ultrasonic wave as an example.

[0075] For example, during the process of shooting with a mobile phone, when the mobile phone detects that the LBS application controls the earpiece to emit ultrasonic waves, it is necessary to determine whether the ultrasonic waves emitted by the earpiece interfere with the gyroscope sensor, so as to avoid the interference of the ultrasonic waves with the gyroscope sensor, resulting in abnormal data of the gyroscope sensor, thereby causing blurry pictures taken by the mobile phone.

[0076] In some embodiments, the data of the gyroscope sensor within a certain time period (e.g., 10 seconds) can be obtained during the process of the earpiece emitting ultrasonic waves. The power spectrum density of the gyroscope sensor is calculated based on the data of the gyroscope sensor, and then it is determined based on the power spectrum density whether the ultrasonic waves emitted by the earpiece interfere with the gyroscope sensor. For example, if the power spectrum density has a periodic resonant frequency (target resonant frequency) greater than a set frequency (e.g., 10 Hz), it can be determined that the ultrasonic waves emitted by the earpiece will interfere with the gyroscope sensor.

[0077] In other embodiments, data of the gyroscope sensor within a certain time period (e.g., 10 seconds) can be obtained during the process of the earpiece emitting ultrasonic waves. The noise of the gyroscope sensor is calculated based on the data of the gyroscope sensor, and then it is determined based on the noise whether the ultrasonic waves emitted by the earpiece interfere with the gyroscope sensor. For example, if the amplitude of the noise is more than 10 times higher than the amplitude of the noise of the gyroscope sensor when the earpiece does not emit ultrasonic waves, it can be determined that the ultrasonic waves emitted by the earpiece will interfere with the gyroscope sensor.

[0078] In other embodiments, the first frequency band information of the ultrasonic wave emitted by the earpiece and the second frequency band information of the driving gyro sensor to vibrate can be obtained, and then it is determined whether the ultrasonic wave emitted by the earpiece interferes with the gyro sensor according to the first frequency band information and the second frequency band information. Specifically, if the frequency band of the ultrasonic wave emitted by the earpiece overlaps with the driving frequency of the gyro sensor, it can be determined that the ultrasonic wave emitted by the earpiece will interfere with the gyro sensor.

[0079] For the sake of narrative coherence, the process of determining whether the ultrasonic waves emitted by the earpiece interfere with the gyroscope sensor is described in detail below.

[0080] S103, determine whether the priority of the first application is higher than the priority of the second application. If yes, execute step S105. If no, execute step S106.

[0081] In some embodiments, when the electronic device is in a first state, it can be determined that the priority of the first application is higher than the priority of the second application, and when the electronic device is in a second state, it can be determined that the priority of the first application is lower than the priority of the second application. The first state may be a state in which the second device is not required to emit sound waves, and the second state may be a state in which the second device is required to emit sound waves.

[0082] For example, the first application is a camera application, and the second application is a call application. When the phone is in shooting state and the phone is not in a call gesture (that is, the user uses the phone's receiver to make a call at the ear), the stability of the shooting picture needs to be ensured, and the receiver does not need to emit ultrasonic waves at this time. The priority of the camera application is higher than the priority of the call application. Accordingly, the priority of the gyroscope sensor is higher than the priority of the receiver. At this time, the phone needs to control the receiver to turn off the emission of ultrasonic waves. When the phone is in a call gesture, in order to avoid accidental touches on the phone's screen, the receiver needs to emit ultrasonic waves. The priority of the call application is higher than the priority of the camera application. Accordingly, the priority of the receiver is higher than the priority of the gyroscope sensor. At this time, the phone does not need to control the receiver to turn off ultrasonic waves.

[0083] For another example, the first application is a camera application and the second application is an LBS application. In a scenario where the mobile phone is in shooting mode and the LBS application controls the receiver to transmit ultrasound, since the mobile phone is in shooting mode and needs to ensure the stability of the shooting image, the receiver does not need to transmit ultrasound at this time, and the priority of the camera application is higher than that of the LBS application.

[0084] S105, controlling the second device to stop emitting sound waves.

[0085] For example, when the phone is in the shooting state and in the call gesture, it can be determined that the priority of the camera application is higher than the priority of the call application, and accordingly, the priority of the gyroscope sensor is higher than the priority of the earpiece. At this time, the phone can control the earpiece to turn off the ultrasonic wave to avoid interference with the gyroscope sensor, resulting in blurred shooting images.

[0086] S106, controlling the second device to keep emitting sound waves.

[0087] For example, when the mobile phone is in a call gesture, it can be determined that the priority of the camera application is lower than the priority of the call application, and accordingly, the priority of the gyroscope sensor is lower than the priority of the earpiece. At this time, the mobile phone does not need to control the earpiece to turn off the ultrasonic wave emission, but can control the earpiece to keep emitting ultrasonic waves to avoid accidental touches during a call.

[0088] In an embodiment of the present application, when an electronic device (such as a mobile phone) runs a first application (such as a camera application), the first application can control the operation of a first device (such as a gyroscope sensor). During the operation of the first application, when the electronic device detects that a second application (such as a call application) controls a second device (such as a receiver) to emit sound waves, it can be determined whether the sound waves emitted by the second device will interfere with the first device. When it is determined that the sound waves emitted by the second device will interfere with the first device, if the priority of the first application is higher than the priority of the second application, the electronic device will control the second device to turn off the emission of sound waves to avoid interference with the first device, causing the first application to be abnormal.

[0089] Figure 5B An example of a control method for an electronic device according to an embodiment of the present application Figure 2 The present application does not limit the specific form of the electronic device, and the electronic device may be a mobile phone, a laptop computer, a tablet, a wearable device (e.g., a watch, smart glasses, a helmet), an AR / VR device, etc. The following description continues to use a mobile phone as an example of an electronic device.

[0090] refer to Figure 5B , the method comprises the following steps:

[0091] S201, when the mobile phone is in a stationary state, the ultrasonic and gyroscope sensors are turned on to obtain data from the gyroscope sensors.

[0092] In the embodiment of the present application, when the mobile phone is turned on for the first time and the mobile phone is in a stationary state, the ultrasonic and gyroscope sensors can be turned on to perform the ultrasonic interference judgment process and record the judgment result. In this way, it is only necessary to perform a judgment once when the mobile phone is turned on for the first time, and it is not necessary to judge the ultrasonic interference once every time the mobile phone turns on the ultrasonic and gyroscope sensors, thereby reducing the number of judgments and saving power consumption.

[0093] After the phone turns on ultrasound, that is, after the earpiece of the phone emits ultrasound, the gyroscope sensor can detect the posture of the phone according to the set sampling frequency (for example, 100Hz, 200Hz, etc.) and obtain corresponding data (such as angular velocity).

[0094] It should be noted that the ultrasonic wave in the present application may also be a sound wave in other frequency bands. The present application may also detect whether the sound waves in other frequency bands generate ultrasonic interference to the gyroscope sensor, and this is not limited.

[0095] S202, judging whether there is abnormal noise according to the data of the gyro sensor, if yes, executing step S203, if no, executing step S204.

[0096] Fig. 6A The noise of the gyro sensor without ultrasonic interference is shown. Figure 6B The noise of the gyro sensor when ultrasonic interference is applied. Fig. 6A and Figure 6B It can be seen that when the gyro sensor is interfered by ultrasonic waves, the noise of the gyro sensor will become larger, causing the gyro sensor to have abnormal noise.

[0097] In some embodiments, the noise of the gyro sensor can be calculated based on the data output by the gyro sensor, and then it is determined whether the gyro sensor has noise abnormality based on the noise level of the gyro sensor.

[0098] Specifically, the noise of the gyro sensor can be calculated by the following formula (1).

[0099]

[0100] Among them, noise_gyro is the noise of the gyroscope sensor, array_gyro is the array of data of the gyroscope sensor, the array_gyro array includes the data output by the gyroscope sensor within a set time (such as 10s, etc.), STD() is the standard deviation, and ODR1 is the sampling rate of the gyroscope sensor, such as 100Hz, 200Hz, etc.

[0101] For example, the noise of the gyro sensor without ultrasonic interference can be calculated by the above formula (1): And through the above (1), the noise of the gyro sensor during ultrasonic interference can be calculated:

[0102] In this embodiment, after the noise of the gyro sensor is calculated by the above formula (1), it can be determined whether the noise of the gyro sensor is greater than a preset first threshold, such as 0.014. If so, it is determined that the gyro sensor has a noise abnormality. If not, it is determined that the gyro sensor does not have a noise abnormality.

[0103] S203, determining that the ultrasonic waves emitted by the mobile phone can interfere with the gyroscope sensor, and initiating an avoidance plan.

[0104] When it is determined that the noise of the gyroscope sensor is abnormal, it can be determined that the ultrasonic waves emitted by the mobile phone can interfere with the operation of the gyroscope sensor and an avoidance plan is initiated.

[0105] In some embodiments, after determining whether the ultrasonic wave emitted by the mobile phone receiver generates ultrasonic interference to the gyroscope sensor, a flag bit can be set to indicate whether the ultrasonic wave emitted by the mobile phone receiver generates interference to the gyroscope sensor, so as to determine whether to initiate an avoidance solution by reading the flag bit.

[0106] For example, when it is determined that the ultrasonic wave emitted by the mobile phone receiver will cause ultrasonic interference to the gyroscope sensor, the flag bit can be set to true, and when it is determined that the ultrasonic wave emitted by the mobile phone receiver will not cause ultrasonic interference to the gyroscope sensor, the flag bit can be set to false. The setting method of the flag bit is only for illustrative purposes, and the flag bit can also be set in other ways, such as setting the flag bit to 1 or 0, etc., which is not limited to this.

[0107] When it is determined that the ultrasonic wave emitted by the mobile phone receiver will cause ultrasonic interference to the gyroscope sensor, the mobile phone can read a flag bit indicating the initiation of an avoidance scheme, such as true, and then initiate the avoidance scheme based on the flag bit.

[0108] S204: If there is no interference problem with the mobile phone, the avoidance solution will not be entered.

[0109] When it is determined that the ultrasonic wave emitted by the handset of the mobile phone will not cause ultrasonic interference to the gyroscope sensor, the mobile phone can read a flag bit indicating that the avoidance solution is not started, such as false, and then the avoidance solution is not started based on the flag bit. In this case, the handset and the gyroscope sensor can work at the same time, and the ultrasonic wave emitted by the handset will not interfere with the gyroscope sensor.

[0110] S205, determine whether the mobile phone is in a call state. If not, execute step S206. If yes, execute step S208.

[0111] In some embodiments, after the mobile phone starts the avoidance scheme, the data of the accelerometer sensor can be obtained to determine whether the mobile phone is currently in a call state based on the data of the accelerometer sensor. When it is determined that the mobile phone is in a call state, it can be determined that the priority of the earpiece is higher than the priority of the gyroscope sensor, and at this time, there is no need to control the earpiece to turn off the emission of ultrasonic waves. When it is determined that the mobile phone is not in a call state, it can be determined that the priority of the earpiece is lower than the priority of the gyroscope sensor, and at this time, it is necessary to control the earpiece to turn off the emission of ultrasonic waves.

[0112] S206, determine whether there is a non-call application registered to turn on ultrasonic wave. If yes, execute step S207. If no, execute step S205.

[0113] In the embodiment of the present application, since third-party applications (non-call applications) such as sports and health applications, navigation applications, and LBS applications are not restricted, even if the mobile phone is not in a call state, these third-party applications may register with the system to turn on ultrasonic waves. For example, when the LBS application is running in the background, in order to provide more accurate location information, the LBS application may register with the system to turn on ultrasonic waves. After the LBS application registration is completed, the mobile phone will control the handset to emit ultrasonic waves.

[0114] S207, turn off the ultrasonic wave.

[0115] When it is determined that a non-call application has registered to turn on ultrasonic waves, since the phone is not in a call state, the ultrasonic waves can be turned off to avoid interference with the gyroscope sensor.

[0116] S208, determining whether the mobile phone posture is within the call gesture. If yes, executing step S209. If no, executing step S210.

[0117] In some embodiments, the pitch angle and roll angle of the mobile phone can be calculated based on data from an acceleration sensor built into the mobile phone, and then it is determined whether the mobile phone is within a call gesture based on the pitch angle and the roll angle.

[0118] Specifically, the pitch angle of the mobile phone can be calculated by the following formula (2).

[0119]

[0120] Among them, pitch is the pitch angle of the phone, tan() is the sine function, acc_x is the acceleration of the phone on the x-axis, acc_y is the acceleration of the phone on the y-axis, and acc_z is the acceleration of the phone on the z-axis.

[0121] Specifically, the roll angle of the mobile phone can be calculated by the following formula (3).

[0122]

[0123] Among them, roll is the roll angle of the mobile phone.

[0124] In some embodiments, when pitch ≥ 0 and 50 < roll < 90, it can be determined that the mobile phone is in the right - hand call posture, that is, the user holds the mobile phone with the right hand to make a call near the right ear; when pitch ≥ 0 and - 90 < roll < - 50, it can be determined that the mobile phone is in the left - hand call posture, that is, the user holds the mobile phone with the left hand to make a call near the left ear.

[0125] S209, Turn on the ultrasonic wave to work normally.

[0126] When it is determined that the mobile phone is in the call gesture, it means that the user is using the mobile phone to make a call near the ear. At this time, it is necessary to turn on the ultrasonic wave to work normally to avoid accidental touch when the user uses the mobile phone to make a call near the ear.

[0127] S210, Determine whether it is in the shooting state. If so, execute step S211. If not, execute step S209.

[0128] When it is determined that the mobile phone is not in the call gesture, it means that the user is not using the mobile phone to make a call near the ear, but using the speaker to make a call or using headphones to make a call. At this time, it is necessary to determine whether the mobile phone is in the shooting state.

[0129] S211, Turn off the ultrasonic wave.

[0130] When it is determined that the mobile phone is in the shooting state, in order to ensure the clarity of the shooting picture, it is necessary to turn off the ultrasonic wave to avoid ultrasonic interference on the gyroscope sensor, resulting in a blurred shooting picture.

[0131] S212, Exit the shooting state and turn on the ultrasonic wave after entering the call gesture.

[0132] After detecting that the mobile phone exits the shooting state and re - enters the call gesture, turn on the ultrasonic wave again to avoid accidental touch.

[0133] In the embodiments of the present application, when the mobile phone is first powered on, it can be determined whether the ultrasonic wave emitted by the mobile phone causes ultrasonic interference to the gyroscope sensor. When it is determined that the mobile phone causes ultrasonic interference to the gyroscope sensor, the mobile phone can start an avoidance scheme, so that when the mobile phone is in the shooting state, the ultrasonic wave is turned off. To avoid ultrasonic interference on the gyroscope sensor, thus affecting the clarity of the mobile phone shooting picture and ensuring the clarity of the shooting picture.

[0134] Figure 7This is an example diagram of the ultrasonic interference judgment process provided in the embodiment of the present application. The present application does not limit the specific form of the electronic device, and the electronic device can be a mobile phone, a laptop computer, a tablet, a wearable device (for example, a watch, smart glasses, a helmet), an AR / VR device, etc. The following continues to describe the mobile phone as an example of an electronic device.

[0135] like Figure 7 As shown, the determination of ultrasonic interference includes the following steps:

[0136] S301, when the ultrasonic wave is turned off, the noise of the gyro sensor is calculated in real time.

[0137] In some embodiments, when the ultrasonic wave is turned off, the data output by the gyroscope sensor can be acquired in real time, and the noise of the gyroscope sensor can be calculated in real time by the above formula (1).

[0138] S302, determine whether 100 consecutive data are less than 0.01 and whether the noise is less than 0.014. If yes, execute step S303. If no, execute step S301.

[0139] In some embodiments, 100 (as an example of a set number N, where N is an integer) data continuously output by the gyroscope sensor may be obtained, and the noise of the 100 data may be calculated according to the above formula (1), and then it is determined whether the 100 data are all less than 0.01 (as an example of the second threshold value) and whether the noise of the gyroscope sensor is less than 0.014 (as an example of the first threshold value). If so, it indicates that the mobile phone is in a stationary state. If not, it indicates that the mobile phone is in a non-stationary state.

[0140] It should be noted that in the embodiment of the present application, the set number N can also be 50, 150, 200, etc., the first threshold can also be 0.02, 0.03, etc., and the second threshold can also be 0.013, 0.015, etc., without any limitation here.

[0141] S303, the mobile phone is in a stationary state, and the data of the gyroscope sensor and the acceleration sensor are captured for 10 seconds and stored in arrays respectively.

[0142] When it is determined that the mobile phone is currently in a stationary state, data of the gyroscope sensor and the acceleration sensor within 10 seconds (as an example of setting the time length) can be obtained and stored in arrays respectively.

[0143] It should be noted that the set duration can also be 15s, 20s, 25s, etc., without any limitation here.

[0144] S304 , respectively calculating the noises noise_gyro1 and noise_acc1 of the gyro sensor and the acceleration sensor.

[0145] After acquiring the data of the gyro sensor and the acceleration sensor, the noise noise_gyro1 of the gyro sensor can be calculated by the above formula (1), and the noise noise_acc1 of the acceleration sensor can be calculated by the following formula (4).

[0146]

[0147] Wherein, noise_acc is the noise of the acceleration sensor, array_acc is the array of data of the acceleration sensor, the array_acc data includes the data (such as acceleration) output by the acceleration sensor within a set time length (such as 10s, etc.), STD() is the standard deviation, and ODR2 is the sampling rate of the acceleration sensor, such as 100Hz, 200Hz, etc.

[0148] S305, calculating the power spectrum density PSD_gyro1 of the gyroscope sensor.

[0149] After calculating the noise noise_gyro1 of the gyroscope sensor and the noise noise_acc1 of the acceleration sensor, the power spectral density PSD_gyro1 of the gyroscope sensor may be calculated according to the data of the gyroscope sensor.

[0150] S306, turn on the ultrasound after the calculation is completed.

[0151] After calculating the power spectral density PSD_gyro1 of the gyroscope sensor, turn on the ultrasonic wave of the mobile phone.

[0152] S307, re-capture the data of the gyro sensor and the acceleration sensor for 10 seconds, and calculate the noise noise_gyro2 and noise_acc2 respectively.

[0153] After the mobile phone turns on the ultrasonic wave again, the data of the gyroscope sensor and the acceleration sensor can be recaptured for 10 seconds (as an example of setting the duration), and then the noise noise_gyro2 of the gyroscope sensor is calculated by the above formula (1), and the noise noise_acc2 of the acceleration sensor is calculated by the above formula (4).

[0154] S308 , recalculate the power spectrum density PSD_gyro2 of the gyroscope sensor.

[0155] After respectively calculating the noise noise_gyro2 of the gyroscope sensor and the noise noise_acc2 of the acceleration sensor, the power spectrum density PSD_gyro2 of the gyroscope sensor may be recalculated according to the data of the gyroscope sensor.

[0156] S309, determine whether noise_acc1<0.004&noise_acc2<0.004&noise_gyro1<0.014. If not, execute step S301. If yes, execute step S310.

[0157] It can be determined whether the noise noise_acc1 of the acceleration sensor before turning on the ultrasonic wave and the noise noise_acc2 of the acceleration sensor before turning on the ultrasonic wave are less than 0.004 (as an example of the third threshold value), and whether the noise noise_gyro1 of the gyroscope sensor before turning on the ultrasonic wave is less than 0.014 (as an example of the first threshold value). If not, it means that there is external interference when the mobile phone turns on the ultrasonic wave, such as external ultrasonic interference, etc. At this time, the ultrasonic wave can be turned off and the ultrasonic interference judgment process is re-executed, that is, step S301 is re-executed. If yes, it means that there is no external interference when the mobile phone turns on the ultrasonic wave, and the subsequent process can be continued.

[0158] S310, determine whether noise_gyro2>10*noise_gyro1. If not, execute step S311. If yes, execute step S312.

[0159] In some embodiments, when it is determined that there is no external interference when the mobile phone turns on the ultrasonic wave, it can be determined whether noise_gyro2 is greater than 10*noise_gyro1. If not, it means that the ultrasonic wave has no interference with the gyroscope sensor. If so, further determination is required.

[0160] For example, the above formula (1) is used to calculate noise_gyro2>10*noise_gyro1.

[0161] In the embodiment of the present application, the comparison between noise_gyro2 and noise_gyro1 is only used as an exemplary explanation and does not constitute a limitation to the present application. In other embodiments, other methods can also be used to compare the relationship between noise_gyro2 and noise_gyro1. For example, it can be determined whether noise_gyro2 is greater than 9*noise_gyro1, or it can be determined whether noise_gyro2 is greater than 8*noise_gyro1, or it can be determined whether noise_gyro2 is greater than noise_gyro1+M, for example, M can be 0.1, etc. The relationship between noise_gyro2 and noise_gyro1 can be determined according to the actual application scenario, and there is no limitation on this.

[0162] S311, Ultrasonic wave has no interference to gyro sensor.

[0163] In some embodiments, when noise_gyro2 is less than or equal to 10*noise_gyro1, it indicates that the ultrasonic waves emitted by the mobile phone do not interfere with the gyroscope sensor.

[0164] S312, whether PSD_gyro2 has a periodic resonant frequency with a fundamental frequency greater than 10 Hz. If not, execute step S311. If yes, execute step S313.

[0165] Resonance is also called "resonance". The periodic resonant frequency can be understood as the frequency generated by the periodic resonance of the gyroscope sensor under the action of ultrasound.

[0166] In some embodiments, when noise_gyro2 is greater than 10*noise_gyro1, it can be determined whether there is a periodic resonant frequency greater than 10 Hz (as an example of a target resonant frequency) in the power spectrum density PSD_gyro2 of the gyroscope sensor after the ultrasonic wave is turned on. If so, it means that the ultrasonic wave emitted by the mobile phone interferes with the gyroscope sensor, and if not, it means that the ultrasonic wave emitted by the mobile phone does not interfere with the gyroscope sensor.

[0167] Fig. 8A FIG. 4 shows an example waveform of the power spectrum density of the gyroscope sensor when there is no ultrasonic interference. Fig. 8A As shown in FIG. 1 , when there is no ultrasonic interference, there is no periodic resonance frequency greater than 10 Hz in the power spectrum density of the gyroscope sensor. Figure 8B FIG. 4 shows an example waveform of the power spectrum density of a gyro sensor when ultrasonic interference occurs. Figure 8B As shown, when ultrasonic interference occurs, there are periodic resonant frequencies greater than 10 Hz in the power spectrum density of the gyroscope sensor, for example, periodic resonant frequencies of 18 Hz, 24 Hz, 30 Hz, 36 Hz, 42 Hz and 48 Hz.

[0168] It should be noted that the target resonant frequency can be 9 Hz, 11 Hz, 12 Hz, etc. in addition to 10 Hz, and can be set according to actual scene requirements, without any limitation here.

[0169] S313, Ultrasonic wave interferes with the gyro sensor.

[0170] In some embodiments, when it is determined that a periodic resonance frequency greater than 10 Hz exists in the power spectrum density PSD_gyro2 of the gyroscope sensor after ultrasonic waves are turned on, it can be determined that the ultrasonic waves emitted by the mobile phone interfere with the gyroscope sensor.

[0171] In the embodiment of the present application, when judging whether the ultrasonic wave interferes with the gyroscope sensor, external interference, such as external ultrasonic wave interference, vibration interference, etc., can be excluded, thereby improving the reliability of the judgment. Moreover, in the judgment process, not only the noise level of the gyroscope sensor before and after the ultrasonic wave is turned on is compared, but also the spectral density of the gyroscope sensor is further used to judge whether the gyroscope sensor is interfered by the ultrasonic wave, thereby improving the accuracy of the judgment.

[0172] Fig. 9 The schematic diagram of the structure of the electronic device 100 is shown. The electronic device 100 may be a mobile phone mentioned in the present application, or may be a tablet computer, a laptop computer, a wearable device, etc. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0173] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split 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.

[0174] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). In some embodiments, the processor 110 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, and a SIM interface.

[0175] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0176] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0177] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0178] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0179] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0180] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0181] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0182] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0183] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0184] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0185] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0186] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0187] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0188] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.

[0189] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0190] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or by other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to, a floppy disk, an optical disk, an optical disk, a read-only memory, a magneto-optical disk, a read-only memory, a random access memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a magnetic card or an optical card, a flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier wave, infrared signal digital signal, etc.) using the Internet in an electrical, optical, acoustic or other form of propagation signal. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0191] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0192] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0193] It should be noted that, in the examples and description of the present application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the statement "comprise one" do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.

[0194] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. A control method for an electronic device, used in an electronic device, characterized in that: The electronic device comprises a first device and a second device, and the method comprises: Running a first application, wherein the first application controls the running of the first device required by the first application; detecting that the second application controls the second device to emit sound waves, and determining whether the sound waves emitted by the second device interfere with the first device; Corresponding to determining that the sound waves emitted by the second device interfere with the first device, determining whether the priority of the first application is higher than the priority of the second application; In response to determining that the priority of the first application is higher than the priority of the second application, controlling the second device to stop emitting the sound wave; The determining whether the sound wave emitted by the second device interferes with the first device includes: controlling the second device to emit sound waves; In the process of the second device emitting sound waves, acquiring a plurality of data output by the first device within a set time period; Based on the plurality of data, determining whether the sound waves emitted by the second device interfere with the first device; The determining, based on the plurality of data, whether the sound wave emitted by the second device interferes with the first device comprises: Based on the plurality of data, calculating and obtaining a second noise of the first device; Based on the second noise, it is determined whether the sound wave emitted by the second device interferes with the first device.

2. The method according to claim 1, characterized in that: The controlling the second device to emit sound waves comprises: determining whether the electronic device is in a stationary state; Corresponding to determining that the electronic device is in a stationary state, the second device is controlled to emit sound waves.

3. The method according to claim 2, characterized in that The determining whether the electronic device is in a stationary state comprises: Acquire N data output by the first device, where N is an integer; Based on the N data, a first noise of the first device is calculated; Corresponding to determining that the first noise is smaller than a first threshold and the N data are all smaller than a second threshold, it is determined that the electronic device is in a stationary state.

4. The method according to claim 1, characterized in that: The determining, based on the second noise, whether the sound wave emitted by the second device interferes with the first device includes: Corresponding to determining that the second noise is greater than a third threshold, calculating a power spectral density of the first device based on the plurality of data; determining whether a target resonant frequency exists in the power spectral density; If yes, it is determined that the sound waves emitted by the second device interfere with the first device; If not, it is determined that the sound waves emitted by the second device do not interfere with the first device.

5. The method according to claim 1, characterized in that The determining whether the priority of the first application is higher than the priority of the second application includes: Corresponding to determining that the electronic device is in the first state, determining that the priority of the first application is higher than the priority of the second application; Corresponding to determining that the electronic device is in the second state, determining that the priority of the first application is lower than the priority of the second application.

6. The method according to claim 1, characterized in that The method further comprises: corresponding to determining that the sound wave emitted by the second device interferes with the first device, setting the first flag to a first value; corresponding to determining that the sound wave emitted by the second device does not interfere with the first device, setting the first flag to a second value; The first mark indicates whether the sound waves emitted by the second device interfere with the first device.

7. The method according to claim 6, characterized in that The method further comprises: When the first application is run next time and it is detected that the second application controls the second device to emit sound waves, determining whether the sound waves emitted by the second device interfere with the first device based on the first mark; Corresponding to the first mark being the first value, determining that the sound wave emitted by the second device interferes with the first device; Corresponding to the first mark being the second value, it is determined that the sound wave emitted by the second device does not interfere with the first device.

8. An electronic device, characterized in that: include: a memory for storing instructions executed by one or more processors of the electronic device; A processor, when the processor executes the instructions in the memory, can enable the electronic device to execute the control method of the electronic device according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the control method of the electronic device according to any one of claims 1 to 7.