A noise reduction method and device, electronic equipment and wireless charging system

CN120748355BActive Publication Date: 2026-10-09HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411192692.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2026-10-09
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

本申请可以解决第一电子设备在处于无线充电过程,且需要采集目标音频的场景下,所得到的目标音频数据受到第二电子设备中风扇的噪音影响的问题

Benefits of technology

[0025] The noise reduction device provided in this application embodiment can identify the current scene if the first electronic device is simultaneously in at least one of the following scenarios during wireless charging: hands-free calling, video calling, hands-free voice calling, recording, and video recording. Furthermore, after determining that it is in a target scene, the first electronic device can control the fan speed of the second electronic device to reduce the noise of the collected target audio data. Additionally, the first electronic device can use an algorithm to denoise the target audio data, obtaining denoised target audio data. Thus, this application enables the target audio data collected in the target scene to have a good noise reduction effect, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120748355B_ABST
    Figure CN120748355B_ABST
Patent Text Reader

Abstract

The application provides a noise reduction method and device, electronic equipment and a wireless charging system. The method comprises: a first electronic device determines a target scene, the target scene comprising a scene in which the first electronic device calls a built-in microphone to collect target audio and obtain target audio data during a wireless charging process, the microphone comprising a first microphone, the first microphone being adjacent to a fan in a second electronic device; in the case that the first electronic device is in the target scene, the first electronic device reduces the rotation speed of the fan based on interaction with the second electronic device, and / or eliminates noise of the first microphone based on a first algorithm to obtain noise-reduced target audio data. The application can solve the problem that target audio data obtained by the first electronic device in a scene in which the first electronic device is in a wireless charging process and needs to collect target audio is affected by noise of a fan in the second electronic device. The application achieves noise reduction of target audio data and improves user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a noise reduction method, device, electronic device and wireless charging system. Background Technology

[0002] Wireless charging technology is a technology that allows for the transfer of electrical energy between a transmitting and receiving device without a physical connection. The transmitting device can be, for example, a charging dock, and the receiving device can be, for example, a mobile phone. The phone needs to be placed on the surface of the charging dock so that the dock can supply power to the phone. When the charging dock supplies a large amount of power to the phone, it generates heat. To dissipate heat, the charging dock is usually equipped with a fan. The higher the power of the electrical energy, the faster the fan rotates, and the more noise it produces.

[0003] During wireless charging, users may be in situations such as making calls or recording audio. In these scenarios, the phone typically needs to capture audio through its microphone, which can be human voice or other sounds. Because the phone is placed on the surface of the charging dock, the microphone at the bottom of the phone is relatively close to the fan. The audio data it captures is easily affected by the fan noise, resulting in poor audio quality and impacting the user experience. Summary of the Invention

[0004] This application provides a noise reduction method, apparatus, electronic device, and wireless charging system. This application addresses the problem that when a first electronic device is wirelessly charging and needs to collect target audio data, the obtained target audio data is affected by the noise from a fan in a second electronic device. This application achieves noise reduction of the target audio data, improving the user experience.

[0005] In a first aspect, embodiments of this application provide a noise reduction method, comprising: a first electronic device determining that it is in a target scene, the target scene including a scene in which the first electronic device calls its built-in microphone to collect target audio and obtain target audio data during wireless charging, wherein the microphone includes a first microphone, the first microphone is adjacent to a fan in a second electronic device, the second electronic device is used to supply power to the first electronic device during wireless charging, and the fan is used for heat dissipation; when the first electronic device is in the target scene, the first electronic device reduces the fan speed based on interaction with the second electronic device, and / or, based on a first algorithm, eliminates the noise of the first microphone to obtain the noise-reduced target audio data.

[0006] The noise reduction method provided in this application allows for scene recognition if the first electronic device is simultaneously in at least one of the following scenarios during wireless charging: hands-free calling, video calling, hands-free voice communication, recording, and video recording. Furthermore, after determining it is in a target scene, the first electronic device can control the fan speed of the second electronic device to reduce noise in the collected target audio data. Additionally, the first electronic device can use an algorithm to denoise the target audio data, obtaining denoised target audio data. Thus, this application enables the target audio data collected in the target scene to have a good noise reduction effect, improving the user experience.

[0007] In one implementation, when the first electronic device is in the target scene, after the first electronic device reduces the fan speed based on interaction with the second electronic device, and / or eliminates noise from the first microphone based on the first algorithm to obtain noise-reduced target audio data, the implementation further includes: the first electronic device determining to exit the target scene; and, upon exiting the target scene, the first electronic device restoring the fan speed based on interaction with the second electronic device, and disabling the first algorithm. Using this implementation, after exiting the target scene, the first electronic device can restore the fan speed, ensuring heat dissipation performance during wireless charging.

[0008] In one implementation, determining that the first electronic device is in a target scenario includes: the first electronic device detecting a wireless charging event and determining whether it is in an audio scenario, wherein the audio scenario is a scenario in which the first electronic device calls its microphone to collect target audio, and the audio scenario includes at least one of a hands-free call scenario, a video call scenario, a hands-free voice scenario, a recording scenario, and a video recording scenario; if the first electronic device detects a wireless charging event and determines that it is in an audio scenario, the first electronic device determines that it is in the target scenario. Using this implementation, this application illustrates a specific method by which the first electronic device determines that it is in a target scenario, ensuring the accuracy of the identified target scenario.

[0009] In one implementation, the first electronic device detects a wireless charging event, including: the power management unit (Charger) at the hardware layer detecting the wireless charging event; the power management driver at the kernel layer obtaining the wireless charging event from the Charger; the power management driver reporting the wireless charging event to the power management module of the Hardware Abstraction Layer (HAL); and the power management module reporting the wireless charging event to the power management service at the Java layer. Using this implementation, this application illustrates a specific method for the first electronic device to detect wireless charging events. In this way, the first electronic device can obtain its current wireless charging status and thus accurately identify the target scenario.

[0010] In one implementation, determining whether an audio scene is in progress includes: in response to at least one audio application enabling its audio function, the audio application sends a first message to an audio service in the Java layer, the first message including a first configuration function for configuring at least one of an audio stream and an audio device corresponding to the audio function; the audio service sends the first message to an audio server in the Native layer of the local service; the audio server sends the first message to the audio module of the HAL; and the audio module determines whether an audio scene is in progress based on the first configuration function in the first message. This implementation illustrates a specific method for identifying audio scenes to facilitate accurate identification of the target scene.

[0011] In one implementation, the audio module determines that it is in an audio scene based on a first configuration function in a first message. This includes: the audio module parsing the first configuration function to detect a first audio stream, thereby determining that it is in an audio scene. The first audio stream includes at least one of STREAM_VOICE_CALL and STREAM_VOIP_TX. This implementation illustrates a specific method for identifying audio scenes to facilitate accurate identification of the target scene.

[0012] In one implementation, when a first electronic device detects a wireless charging event and determines that it is in an audio scene, the first electronic device determines that it is in a target scene. This includes: a power management service broadcasting the wireless charging event to the system of the first electronic device; an audio service receiving the broadcast and then sending the wireless charging event to an audio server; the audio server sending the wireless charging event to an audio module; and the audio module, after storing the wireless charging event and determining that it is in an audio scene, determining that it is in the target scene. This implementation illustrates the specific method by which the first electronic device determines that it is in a target scene, ensuring the accuracy of the identified target scene.

[0013] In one implementation, the first electronic device reduces the fan speed based on interaction with the second electronic device. This includes: after the audio module determines that it is in a target scene, it sends a second message to the power management driver, which notifies the power management driver to control the fan speed; in response to the second message, the power management driver sends a first instruction to the power management unit, which instructs the fan to reduce its speed to a first preset speed; the power management unit sends the first instruction to the second electronic device, causing the second electronic device to respond to the first instruction and reduce the fan speed. This implementation illustrates the specific way the first and second electronic devices interact. Thus, the first electronic device can reduce the fan speed in the second electronic device based on the current interaction, thereby reducing fan noise and consequently reducing fan noise in the acquired target audio data.

[0014] In one implementation, noise from the first microphone is eliminated based on a first algorithm to obtain denoised target audio data. This includes: after the audio module determines that it is in a target scene, it sends a third message to the audio processing unit at the hardware layer. The third message is used to activate the algorithm module, which stores the first algorithm. In response to the third message, the audio processing unit activates the algorithm module to execute the first algorithm, thereby eliminating the noise from the first microphone and obtaining the denoised target audio data. By adopting this implementation, an algorithm module is added to the first electronic device, and the method of activating the algorithm module in the target scene is implemented. Thus, the first electronic device can use the first algorithm in the algorithm module to denoise the target audio data.

[0015] In one implementation, the microphone further includes a second microphone located opposite the first microphone in the first electronic device. Based on a first algorithm, noise from the first microphone is eliminated to obtain denoised target audio data. This includes: the first electronic device acquiring first audio data and second audio data, wherein the first audio data is obtained by the second microphone capturing the target audio and is used as the first audio data path, and the second audio data is obtained by the first microphone capturing the target audio; the first electronic device replacing the second audio data with the first audio data, and the replaced first audio data being used as the second audio data path; and the first electronic device integrating the first audio data path and the second audio data path to obtain the denoised target audio data. This implementation illustrates a first implementation of the first algorithm. Since the first audio data captured by the second microphone does not have a significant audio background noise, replacing the second audio data with the first audio data based on the first algorithm and integrating the first audio data from both paths results in target audio data with good noise reduction performance.

[0016] In one implementation, noise from the first microphone is eliminated based on a first algorithm to obtain denoised target audio data. This includes: when the algorithm module is enabled, the first electronic device inputs first audio data and second audio data into the algorithm module; the algorithm module executes the first algorithm on the first and second audio data; when it is determined that the first audio data was collected by the second microphone, the first algorithm outputs the first audio data as the first audio channel; when it is determined that the second audio data was collected by the first microphone, the first algorithm replaces the second audio data with the first audio data and outputs the first audio data as the second audio channel; the algorithm module integrates the first and second audio data to obtain the denoised target audio data. This implementation illustrates a specific implementation of the first algorithm. Because an algorithm module is added to the first electronic device, and this algorithm module can be enabled in the target scenario, the first electronic device can use the first algorithm in the algorithm module to denoise the target audio data, resulting in target audio data with good denoising performance.

[0017] In one implementation, the microphone further includes a second microphone located opposite the first microphone in the first electronic device. Based on a first algorithm, noise from the first microphone is eliminated to obtain denoised target audio data. This includes: based on the first algorithm, the first electronic device disables the first microphone and acquires first audio data, using the first audio data as the denoised target audio data. The first audio data is obtained by the second microphone acquiring the target audio. This implementation also illustrates a second implementation of the first algorithm. Since the audio data acquired by the second microphone does not have a high audio noise floor, disabling the first microphone based on the first algorithm and using the first audio data as the target audio data can achieve a better denoising effect for the target audio data.

[0018] In one implementation, noise from the first microphone is eliminated based on a first algorithm to obtain denoised target audio data. This includes: when the algorithm module is started, a first electronic device modifies the channel quantity configuration item and channel type configuration item in the algorithm module based on the first algorithm to output first audio data, making the first audio data the denoised target audio data. The channel quantity configuration item is used to configure the number of channels to 1, so that the algorithm module outputs one audio data stream based on the channel. The channel type configuration item is used to configure the channel type matching the first audio data, so that the output audio data stream is the first audio data. This implementation illustrates a specific configuration method for the algorithm module. Based on this method, the first algorithm can be implemented, resulting in better denoising performance for the target audio data.

[0019] In one implementation, the first electronic device exits the target scenario, including: the first electronic device does not detect a wireless charging event, or, if it is determined that it is not in an audio scenario, the first electronic device determines to exit the target scenario. Using this implementation, this application illustrates a specific method by which the first electronic device determines to exit the target scenario, allowing the fan to resume its speed without significantly affecting the fan's cooling effect.

[0020] In one implementation, the first electronic device does not detect a wireless charging event, including: the Charger, not detecting the wireless charging event, stops reporting the wireless charging event to the power management driver, so that the audio module does not receive the wireless charging event; the audio module removes the historically stored wireless charging events and does not receive the currently broadcast wireless charging event, thus determining that no wireless charging event has been detected. Using this implementation, this application illustrates a specific method by which the first electronic device determines that no wireless charging event has been detected. In this way, the first electronic device can determine to exit the target scenario, allowing the fan to resume its speed without significantly affecting the fan's cooling effect.

[0021] In one implementation, determining that an audio scene is not in progress includes: in response to at least one audio application disabling its audio function, the audio application sends a fourth message to an audio service, the fourth message notifying that the audio function has been disabled; the audio service sends a fourth message to an audio server; the audio server sends a fourth message to an audio module; and the audio module determines that it is not in an audio scene based on the fourth message. Using this implementation, this application illustrates a specific method by which a first electronic device determines that it is not in an audio scene. This allows the first electronic device to determine that it is exiting the target scene, enabling the fan to resume its speed without significantly impacting the fan's cooling performance.

[0022] In one implementation, when the first electronic device exits the target scene, it restores the fan speed based on interaction with the second electronic device. This includes: after the audio module determines that it is no longer in an audio scene, it sends a fifth message to the power management driver, which notifies the power management driver to stop controlling the fan speed; in response to the fifth message, the power management driver sends a second instruction to the power management unit, which instructs the fan to restore its initial speed; and the power management unit sends a second instruction to the second electronic device, causing the second electronic device to restore the fan speed. Using this implementation, the first electronic device, through interaction with the second electronic device, can restore the fan speed without significantly affecting the fan's cooling performance.

[0023] In one implementation, disabling the first algorithm includes: after the audio module determines that it is exiting the target scene, it sends a sixth message to the audio processing unit, the sixth message being used to shut down the algorithm module; in response to the sixth message, the audio processing unit shuts down the algorithm module to disable the first algorithm. This implementation illustrates a specific method by which the first electronic device disables the first algorithm, ensuring that the audio data collected by the microphone of the first electronic device is not interfered with by the algorithm module in non-target scenes.

[0024] Secondly, embodiments of this application provide a noise reduction device applied to a first electronic device, comprising: a determining module, configured to determine that the device is in a target scene, the target scene including a scene in which the first electronic device, during wireless charging, calls its built-in microphone to collect target audio and obtain target audio data, wherein the microphone includes a first microphone, the first microphone being adjacent to a fan in a second electronic device, the second electronic device being used to supply power to the first electronic device during wireless charging; an interaction module, configured to interact with the second electronic device when the first electronic device is in the target scene, in order to reduce the fan speed; and an algorithm module, configured to eliminate noise from the first microphone based on a first algorithm, in order to obtain noise-reduced target audio data.

[0025] The noise reduction device provided in this application embodiment can identify the current scene if the first electronic device is simultaneously in at least one of the following scenarios during wireless charging: hands-free calling, video calling, hands-free voice calling, recording, and video recording. Furthermore, after determining that it is in a target scene, the first electronic device can control the fan speed of the second electronic device to reduce the noise of the collected target audio data. Additionally, the first electronic device can use an algorithm to denoise the target audio data, obtaining denoised target audio data. Thus, this application enables the target audio data collected in the target scene to have a good noise reduction effect, improving the user experience.

[0026] Thirdly, embodiments of this application provide an electronic device, including: a memory, a microphone, and a processor; the memory, the microphone, and the processor are coupled; wherein, the memory stores computer program code, the computer program code including computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the noise reduction method as described in the first aspect and any implementation thereof.

[0027] Fourthly, embodiments of this application provide a wireless charging system, which includes a first electronic device and a second electronic device. The first electronic device may be the electronic device described in the third aspect above. The second electronic device supplies power to the first electronic device and is equipped with a fan for heat dissipation. The first electronic device controls the rotational speed of the fan in the second electronic device.

[0028] Fifthly, embodiments of this application provide a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a noise reduction method as described in the first aspect and any implementation thereof.

[0029] Sixthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the noise reduction method as described in the first aspect and any possible implementation thereof.

[0030] It is understood that the beneficial effects that the technical solutions provided in the second to sixth aspects above can achieve can be referred to the beneficial effects of the first aspect and any of its possible implementations, which will not be repeated here. Attached Figure Description

[0031] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram illustrating a scenario where an electronic device is wirelessly charged.

[0033] Figure 2 This is a schematic diagram of a scenario where an electronic device collects audio.

[0034] Figure 3 This is a schematic diagram of the hardware structure of the first electronic device provided in an embodiment of this application;

[0035] Figure 4 This is a schematic diagram of the software structure of the first electronic device provided in an embodiment of this application;

[0036] Figure 5 This is a schematic diagram of the structure of the second electronic device provided in the embodiments of this application;

[0037] Figure 6 This is a schematic diagram illustrating a scenario where a first electronic device and a second electronic device establish a communication connection, as provided in an embodiment of this application.

[0038] Figure 7This is the first flowchart of the noise reduction method provided in the embodiments of this application;

[0039] Figure 8 This is a schematic diagram of the microphone provided in an embodiment of this application;

[0040] Figure 9 This is the second flowchart of the noise reduction method provided in the embodiments of this application;

[0041] Figure 10 This is the first interactive diagram of the noise reduction method provided in the embodiments of this application;

[0042] Figure 11 This is a schematic diagram of an audio scene provided in an embodiment of this application;

[0043] Figure 12 This is the third flowchart of the noise reduction method provided in the embodiments of this application;

[0044] Figure 13 This is the fourth flowchart of the noise reduction method provided in the embodiments of this application;

[0045] Figure 14 This is a schematic diagram of the first use case of the algorithm module provided in the embodiments of this application;

[0046] Figure 15 This is a schematic diagram of a second use case of the algorithm module provided in the embodiments of this application;

[0047] Figure 16 This is the second interactive diagram of the noise reduction method provided in the embodiments of this application;

[0048] Figure 17 This is a schematic diagram of the third use case of the algorithm module provided in the embodiments of this application;

[0049] Figure 18 This is a schematic diagram of a noise reduction device provided in an embodiment of this application;

[0050] Figure 19 This is a schematic diagram of the structure of a chip system provided in an embodiment of this application. Detailed Implementation

[0051] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are all within the protection scope of this application.

[0052] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.

[0053] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0054] The application scenarios of the embodiments of this application will be described below first.

[0055] Wireless charging technology is a technology that can transfer electrical energy to electronic devices without a physical connection. This technology can be implemented based on various principles such as electromagnetic induction, electromagnetic resonance, or radio frequency transmission.

[0056] The following embodiments in this application are merely illustrative examples of wireless charging technology based on the principle of electromagnetic induction. In fact, the embodiments of this application can be applied to various types of wireless charging technologies, and this application does not limit them.

[0057] Figure 1 This is a schematic diagram illustrating a scenario where an electronic device is wirelessly charged.

[0058] like Figure 1 As shown, wireless charging technology is typically implemented between two components: a charging base 10 and an electronic device 20. The charging base 10 can act as a transmitter, and the electronic device 20 can act as a receiver.

[0059] In wireless charging technology based on the principle of electromagnetic induction, the charging base 10 generates an alternating electromagnetic field through its built-in coil. The coil built into the electronic device 20 will generate electromagnetic induction with this alternating electromagnetic field, thereby producing a current. This current can be converted into direct current by the circuit in the electronic device 20 to power the battery in the electronic device 20.

[0060] Since the intensity of the electromagnetic field weakens rapidly with increasing distance, the electronic device 20 needs to be kept close to the charging base 10 during wireless charging. The electronic device 20 usually needs to be placed on the surface of the charging base 10.

[0061] Charging docks 10 typically include different types such as flat docks and upright docks. Figure 1 The charging base 10 shown is a vertical base, which may include a support base 11 and an inclined plate 12. The inclined plate 12 is disposed on the support base 11 at a certain inclination angle. The coil built into the charging base 10 may be disposed within the inclined plate 12. The inclined plate 12 may also include a support frame 121 disposed perpendicular to the surface of the inclined plate. The bottom of the electronic device 20 may be placed on the support frame 121, and its rear shell may be in contact with the inclined plate 12. In this way, the coil built into the electronic device 20 may generate electromagnetic induction with the coil in the inclined plate 12, thereby enabling the electronic device 20 to obtain power.

[0062] During this wireless charging process, as the charging base 10 outputs electrical energy, some of the energy is lost as heat, causing the charging base 10 to heat up. To dissipate heat, the charging base 10 is typically equipped with a fan 13. The fan 13 improves the heat dissipation efficiency of the charging base 10, ensuring that the charging base 10 operates within a safe temperature range and preventing device damage. The higher the output power of the electrical energy output by the charging base 10, the faster the fan 13 rotates, and the more noise the fan 13 will generate.

[0063] In such Figure 1 In the vertical charging base 10 shown, the fan 13 can be installed inside the inclined plate 12. In this way, when the bottom of the electronic device 20 is placed on the support frame 121, it is in close proximity to the fan 13.

[0064] It should be noted that the charging base 10 can also have other structures (not shown in the accompanying drawings), such as a structure where the supporting surface of the support base 11 and the charging surface of the inclined plate 12 form an obtuse angle. In this way, the bottom of the electronic device 20 can be placed on the support base 11, its rear shell can fit against the inclined plate 12, and the fan 13 can be disposed within the support base 11. When the electronic device 20 is charged in a charging base 10 with this structure, it is also in close proximity to the fan 13.

[0065] The specific structure of the charging base 10 is not limited in the embodiments of this application.

[0066] Figure 2 This is a schematic diagram of a scenario where an electronic device collects audio.

[0067] like Figure 2As shown, a microphone 21 is typically located at the bottom of the electronic device 20. This microphone 21 can capture audio in certain audio scenarios. These audio scenarios may include at least one of the following: hands-free calling, video calling, hands-free voice calling, recording, and video recording. Figure 2 This illustrates a scenario where, during a hands-free call, electronic device 20 captures audio using its bottom microphone 21. In this scenario, the bottom of electronic device 20 is connected to fan 13 (see...) Figure 1 When microphone 21 is used to collect audio, it tends to capture a lot of fan noise, resulting in poor audio data quality.

[0068] It should be noted that the above embodiments are only illustrative of the electronic device 20 being placed vertically on the charging dock 10. In reality, the electronic device 20 can also be placed horizontally on the charging dock 10, or laid flat on other types of charging docks 10 (such as a horizontal charging dock). Depending on how the electronic device 20 is placed on the charging dock 10, the microphone 21 of the electronic device 20 will be affected by fan noise to varying degrees. This application does not limit the placement method of the electronic device 20. Different placement methods of the electronic device 20 may result in a significant amount of fan noise being collected when using the microphone 21 to collect audio.

[0069] In other words, when the electronic device 20 is in the process of wireless charging and needs to collect audio, the audio data obtained may be affected by fan noise, which affects the user experience.

[0070] The noise reduction method provided in this application can be applied to a wireless charging system. The wireless charging system may include a first electronic device and a second electronic device, where the first electronic device can be a receiving device and the second electronic device can be a transmitting device.

[0071] The first electronic device includes, but is not limited to, mobile phones, tablets, personal computers, workstations, large-screen devices (e.g., smart screens, smart TVs), wearable devices (e.g., smart bracelets, smartwatches), handheld game consoles, home game consoles, virtual reality devices, augmented reality devices, mixed reality devices, and in-vehicle smart terminals. This application does not limit the specific technology or form of the first electronic device.

[0072] Figure 3 This is a schematic diagram of the hardware structure of the first electronic device provided in the embodiments of this application.

[0073] like Figure 3As shown, the first electronic device 100 may include a processor 110, a memory 120, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, a camera 192, a display screen 193, and a Subscriber Identification Module (SIM) card interface 194, etc. The sensor module 180 may include a touch sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a geomagnetic sensor 180D, an accelerometer sensor 180E, a proximity sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, etc. Among them, the gyroscope sensor 180B, the barometric pressure sensor 180C, the geomagnetic sensor 180D, and the accelerometer sensor 180E can all be used to detect the motion state of the first electronic device, and therefore can also be called motion sensors.

[0074] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the first electronic device 100. In other embodiments of this application, the first electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0075] Processor 110 may include one or more processing units, such as 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). These different processing units may be independent devices or integrated into one or more processors.

[0076] In this embodiment, the processor 110 may include a microcontroller unit (MCU). The MCU can execute software instructions corresponding to the proprietary protocol stored in the memory 120 to control the interaction between the first electronic device 100 and the second electronic device. In this embodiment, the DSP may be an audio digital signal processor (ADSP). An ADSP is a processor specifically designed for audio processing, possessing high computing power and capable of real-time decoding, processing, and optimization of audio signals to improve sound quality and listening experience.

[0077] The memory 120 can be used to store computer executable program code, including instructions. The memory 120 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the first electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, Universal Flash Storage (UFS), etc. The processor 110 executes various functional applications and data processing of the first electronic device 100 by running instructions stored in the memory 120 and / or instructions stored in memory disposed in the processor.

[0078] In this embodiment of the application, the memory 120 can be used to store software instructions corresponding to a private protocol, so that the first electronic device and the second electronic device can interact based on the software instructions.

[0079] USB interface 130 is a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge the first electronic device 100, and can also be used for data transfer between the first electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other first electronic devices, such as AR devices.

[0080] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the first electronic device 100. In other embodiments of this application, the first electronic device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0081] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the first electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the first electronic device via the power management module 141.

[0082] In this embodiment, the charging management module 140 is used to receive charging input from a second electronic device (e.g., a wireless charger).

[0083] The power management module 141 connects 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, providing power to the processor 110, memory 120, display screen 193, camera 192, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0084] In this embodiment, the power management module 141 can be used to detect wireless charging events and further report the wireless charging events.

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

[0086] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0087] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the first electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0088] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 193. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0089] The wireless communication module 160 can provide solutions for wireless communication applications on the first electronic device 100, including Wireless Local Area Networks (WLANs) (such as Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR) technologies. 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 antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0090] In some embodiments, antenna 1 of the first electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the first electronic device 100 to communicate with networks and other devices via wireless communication technology. Wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc.

[0091] The first electronic device 100 implements display functions through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 193 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, which execute program instructions to generate or modify display information.

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

[0093] The first electronic device 100 can perform shooting functions through an ISP, camera 192, video codec, GPU, display screen 193, and application processor.

[0094] The ISP (Image Signal Processor) is used to process data fed back from the camera 192. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set within the camera 192.

[0095] Camera 192 is used to capture still images or videos. An object passes through the lens to generate an optical image that is projected onto a photosensitive element. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP (Internet Service Provider) for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP (Digital Signal Processor) for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB, RYYB, and YUV. In some embodiments, the first electronic device 100 may include one or N cameras 192, where N is a positive integer greater than 1.

[0096] The first electronic device 100 can implement audio functions, such as music playback and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor.

[0097] In this embodiment, the microphone 170C may include a first microphone disposed at the bottom of the first electronic device 100 and a second microphone disposed at the top of the first electronic device 100. The first microphone and the second microphone can jointly collect audio to realize audio functions such as calls and recording.

[0098] Touch sensor 180A, also known as a "touch device," can be disposed on display screen 193. The touch sensor 180A and display screen 193 together form a touchscreen, also known as a "touchscreen." Touch sensor 180A is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 193. In other embodiments, touch sensor 180A may also be disposed on the surface of the first electronic device 100, in a different location than display screen 193.

[0099] In this embodiment, the touch sensor 180A can transmit the detected touch operation to the application processor, so that the application processor can determine whether there is a click operation for the audio application, and then determine whether to launch the audio application.

[0100] The gyroscope sensor 180B can be used to determine the motion attitude of the first electronic device 100. In some embodiments, the angular velocity of the first electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B.

[0101] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the first electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.

[0102] The geomagnetic sensor 180D includes a Hall sensor. The first electronic device 100 can use the geomagnetic sensor 180D to detect the opening and closing of the flip cover.

[0103] In this embodiment, the first electronic device 100 can use a Hall sensor to detect the magnetic field strength, and then detect the current value. In this way, the first electronic device 100 can dynamically adjust the fan speed based on the current value.

[0104] The accelerometer 180E can detect the magnitude of acceleration of the first electronic device 100 in various directions (generally three axes). When the first electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the first electronic device and can be applied to applications such as screen orientation switching and pedometers.

[0105] Distance sensor 180F is used to measure distance.

[0106] The proximity light sensor 180G may include, for example, a light-emitting diode and a light detector, such as a photodiode.

[0107] The fingerprint sensor 180H is used to collect fingerprints.

[0108] Temperature sensor 180J is used to detect temperature. In some embodiments, the first electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, the first electronic device 100 reduces the performance of the processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, the first electronic device 100 heats battery 142 to prevent abnormal shutdown of the first electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, the first electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature. Button 190 includes a power button, volume buttons, etc. Button 190 can be a mechanical button or a touch button. The first electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of the first electronic device 100.

[0109] Motor 191 can generate vibration alerts.

[0110] The SIM card interface 194 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to make contact with and separate from the first electronic device 100. The first electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 194 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 194 is also compatible with different types of SIM cards. The SIM card interface 194 is also compatible with external memory cards. The first electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the first electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the first electronic device 100 and cannot be separated from the first electronic device 100.

[0111] In this application, the first electronic device 100 can detect relevant scenarios of SIM card calls based on the SIM card interface 194.

[0112] The software system of the first electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of the first electronic device 100.

[0113] Figure 4 This is a schematic diagram of the software structure of the first electronic device provided in the embodiments of this application.

[0114] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, [the following is omitted as the text is incomplete and likely refers to a specific implementation or feature]. The system is divided into five layers, from top to bottom: the application layer, the application framework layer, the system library and Android runtime, the Hardware Abstraction Layer (HAL), and the kernel layer. The system library and Android runtime can be further divided into the Java layer and the native services layer.

[0115] The application layer can include a series of application packages.

[0116] like Figure 4 As shown, the application package may include applications such as battery management, camera, gallery, calendar, call, map, navigation, music, video, and SMS.

[0117] This application embodiment includes multiple audio applications, which typically utilize the microphone built into the first electronic device to capture audio. These audio applications include, for example, chat applications, recording applications, and camera applications.

[0118] The application framework layer provides an Application Programming Interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0119] like Figure 4 As shown, the application framework layer may include a window manager, an input manager, a sensor manager, a phone manager, a resource manager, a notification manager, etc.

[0120] The input manager can be used to listen to user input events, such as click events and swipe events performed by the user's finger on the display screen 193 of the first electronic device 100. By listening to input events, the first electronic device 100 can determine whether it is in use.

[0121] The sensor manager is used to monitor data returned by various sensors in the first electronic device, such as motion sensor data, proximity sensor data, and temperature sensor data. Using the data returned by these sensors, the first electronic device can determine whether it is experiencing vibration or whether the display screen 193 is obstructed.

[0122] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0123] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0124] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0125] System libraries can include multiple functional modules. For example: Surface Manager, Media Libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0126] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0127] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0128] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0129] A 2D graphics engine is a graphics engine for 2D drawing.

[0130] In this embodiment of the application, when the system library and Android runtime layer are further divided into Java layer and Native layer, the Java layer can be configured with audio service and power management service.

[0131] Audio services are components in an operating system that provide audio functionality, enabling audio playback, recording, and processing.

[0132] Power management services are components in an operating system used to control and optimize power usage. They can provide power-saving modes, monitor power status, and control the power usage of applications.

[0133] In this embodiment, both the power management service and the audio service are used for the transmission of wireless charging events.

[0134] The native layer can be equipped with an audio server. The audio server can act as the central node for audio processing, responsible for the management and distribution of audio data.

[0135] Hardware Abstraction Layer (HAL) is an interface layer designed to abstract hardware. HAL hides the hardware interface details of a specific platform, providing the operating system with a virtual hardware platform that is hardware-independent and portable across multiple platforms. HAL provides a standard interface that exposes the device's hardware functionality to the Java layer above it. HAL comprises multiple library modules, each implementing an interface for a specific type of hardware component; for example, HAL includes an audio module (Audio HAL) and a power management module (Charger HAL).

[0136] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver, camera driver, audio driver, sensor driver, and power management driver (Charger Kernel).

[0137] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the first electronic device 100. In other embodiments of this application, the first electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0138] Figure 5 This is a schematic diagram of the structure of the second electronic device provided in the embodiments of this application.

[0139] Figure 6 This is a schematic diagram illustrating a scenario where a first electronic device and a second electronic device establish a communication connection, as provided in an embodiment of this application.

[0140] like Figure 5 and Figure 6 As shown, the second electronic device 200 is used as a charging base for illustrative purposes. The second electronic device 200 may include a wireless charging control chip 201, a DC-DC converter 202, an inverter bridge 203, and a wireless transmitting coil 204.

[0141] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the second electronic device 200. In other embodiments of this application, the second electronic device 200 may include more or fewer components than those shown in the figures, and this application does not limit this.

[0142] The second electronic device 200 has a matching power adapter 210. The output port of the power adapter 210 can be plugged into the input port of the second electronic device 200 to supply power to the second electronic device 200.

[0143] After the second electronic device 200 is powered on, the startup phase can be configured through the wireless charging control chip 201. Specifically, during the startup phase, the wireless charging control chip 201 controls the DC-DC converter 202 to adjust the voltage transmitted from the power adapter 210 to the second electronic device 200 to power the inverter bridge 203. During this process, the wireless charging control chip 201 needs to control the DC-DC converter 202 to maintain a low output voltage for the inverter bridge 203 to use, so that the inverter bridge 203 can convert DC power into high-frequency AC power at this output voltage. Furthermore, the AC power can generate an alternating magnetic field through the wireless transmitting coil 204.

[0144] In this way, the second electronic device 200 can supply power to the first electronic device 100. During this power supply process, the electrical energy of the second electronic device 200 will be converted into heat energy, that is, the second electronic device 200 will generate heat.

[0145] For heat dissipation, the second electronic device 200 is equipped with a fan 220. The wireless charging control chip 201 can be electrically connected to the fan 220 to control the fan speed.

[0146] The wireless charging control chip 201 can adjust the fan speed 220 based on factors such as current temperature, power output, and foreign object detection. (The fan speed control method will be specifically described in subsequent embodiments of this application). During the startup phase, the fan 220 typically has a preset initial speed, such as 1000 revolutions per minute (RPM). It should be noted that the initial speed value in this embodiment is for illustrative purposes only, and this application does not limit the specific value of the initial speed.

[0147] After the second electronic device 200 completes the configuration during the startup phase, the first electronic device 100 and the second electronic device 200 can establish a communication connection.

[0148] Specifically, the user needs to place the first electronic device 100 on the charging area of ​​the surface of the second electronic device 200. In this way, the second electronic device 200 can detect metal in the first electronic device 100 based on its integrated metal detection technology, and after detecting metal, it will send a ping signal to the first electronic device 100.

[0149] The first electronic device 100 can respond to the Ping signal to power on and initialize communication in order to establish a handshake connection with the second electronic device 200.

[0150] It should be noted that the wireless charging control chip 201 may also integrate a protocol control chip. The second electronic device can achieve a handshake connection based on the protocol control chip. In fact, the protocol control chip can also be a discrete device, and this embodiment of the application does not limit this. The wireless charging control chip 201 may also integrate a fan driver chip. The wireless charging control chip 201 can adjust the speed of the fan 220 based on the fan driver chip. In fact, the fan driver chip can also be a discrete device, and this embodiment of the application does not limit this.

[0151] Specifically, the first electronic device 100 may have a built-in wireless receiving coil corresponding to the wireless transmitting coil 204. This wireless receiving coil can sense the alternating magnetic field generated by the second electronic device 200 to generate an induced electromotive force according to Faraday's law of electromagnetic induction. Furthermore, a built-in conversion circuit in the first electronic device 100 can convert the induced electromotive force into direct current for power supply.

[0152] A handshake connection is the initial connection established between the first electronic device 100 and the second electronic device 200 for communication and data transmission. The first electronic device 100 and the second electronic device 200 can identify each other through specific signals or data packets. For example, in response to a Ping signal emitted by the second electronic device 200, the first electronic device 100 sends a first acknowledgment (ACK) signal to the second electronic device 200. In this way, the first electronic device 100 and the second electronic device 200 complete the initial identification.

[0153] After the first electronic device 100 establishes a handshake connection with the second electronic device 200, it performs protocol interaction with the second electronic device 200 to determine the target protocol used between the first electronic device 100 and the second electronic device 200.

[0154] The first electronic device 100 typically includes proprietary protocols and public protocols. Proprietary protocols are communication protocols developed and used by specific manufacturers, such as the Fast Charge Protocol (FCP) and the Super Charge Protocol (SCP). Public protocols are communication protocols developed by standardization organizations and are widely accepted and used. Examples include the Power Delivery (PD) protocol and the Quick Charge (QC) protocol. This application does not limit the specific types of proprietary and public protocols.

[0155] During the protocol interaction between the first electronic device 100 and the second electronic device 200, the first electronic device 100 and the second electronic device 200 can confirm whether the target protocol used between them is a public protocol or a private protocol by exchanging specific data packets, specific identifiers or specific commands.

[0156] The following is an exemplary description of the protocol interaction process between the first electronic device 100 and the second electronic device 200.

[0157] Specifically, the first electronic device 100 and the second electronic device 200 can first exchange keys. After exchanging keys, the second electronic device 200 can sign its identity information based on the private key in the key and send the signature and identity information to the first electronic device 100. The first electronic device 100 uses the public key in the key to verify the validity of the signature. If the verification is successful, the first electronic device 100 confirms that the second electronic device 200 is a trusted device, thus completing the authentication. After completing the authentication, the first electronic device 100 and the second electronic device 200 can use the exchanged key to encrypt the communication channel. In this way, the first electronic device 100 and the second electronic device 200 can negotiate the target protocol in the encrypted communication channel.

[0158] It should be noted that the specific process of the above-described protocol interaction is only for illustrative purposes, and the embodiments of this application do not limit the specific process of the protocol interaction.

[0159] Among these, proprietary protocols can provide higher charging efficiency and faster charging speeds. For example, the target protocol used between the first electronic device 100 and the second electronic device 200 is a proprietary protocol.

[0160] Thus, based on this proprietary protocol, the first electronic device 100 and the second electronic device 200 can negotiate an initial power. The second electronic device 200 can output first electrical energy to the first electronic device 100 based on this initial power, and correspondingly, the first electronic device 100 receives the first electrical energy.

[0161] Electrical energy refers to the energy possessed by an electric charge in an electric field due to the action of the electric field force. It is a fundamental form of energy in physics and can be generated, converted, and used in various ways.

[0162] Furthermore, based on this proprietary protocol, the first electronic device 100 and the second electronic device 200 can further negotiate the rotational speed of the fan 220 so that the initial rotational speed of the fan 220 can be adaptively adjusted according to different charging conditions and temperatures.

[0163] For example, when the first electronic device 100 detects that its own temperature is too high based on a temperature sensor, the first electronic device 100 can negotiate with the second electronic device 200 to increase the speed of the fan 220, thereby improving the heat dissipation capacity of the fan 220. When the first electronic device 100 detects that its own temperature has decreased, the first electronic device 100 can negotiate with the second electronic device 200 again to decrease the speed of the fan 220.

[0164] Based on this, the first electronic device 100 and the second electronic device 200 enter the wireless charging process. During this process, since the first electronic device 100 may be affected by the noise of the fan 220 in the second electronic device 200, the first electronic device 100 can adopt the noise reduction method provided in the embodiments of this application.

[0165] The noise reduction method provided in the embodiments of this application will be further described below.

[0166] Figure 7 This is the first flowchart of the noise reduction method provided in the embodiments of this application.

[0167] like Figure 7 As shown, in one implementation, the method includes steps S11-S14.

[0168] Step S11: The first electronic device determines that it is in the target scene.

[0169] The target scenario includes a scenario where the first electronic device, during wireless charging, calls its built-in microphone to collect target audio and obtain target audio data.

[0170] Figure 8 This is a schematic diagram of a microphone provided in an embodiment of this application.

[0171] like Figure 8 As shown, the first electronic device 100 can be equipped with multiple microphones. A microphone is a device that converts sound signals into electrical signals. It can capture changes in air pressure generated by sound waves and convert these changes into corresponding voltage changes, thereby enabling sound recording or transmission. Microphones can be used in scenarios such as telephone communication, voice recognition, recording, and video recording.

[0172] The microphone may include at least one first microphone 110 disposed at the bottom of the first electronic device 100 and at least one second microphone 120 disposed at the top of the first electronic device 100.

[0173] The first microphone 110, located at the bottom, assists in identifying the direction of sound sources to adapt to the voice recognition or augmented reality functions of the first electronic device 100. The first microphone 110 can also capture ambient sounds during calls, allowing the first electronic device 100 to adjust the call volume as needed and protect user privacy. In speakerphone mode, the first microphone 110 can also capture ambient sounds so that the first electronic device 100 can hear sounds from the surrounding environment during the call.

[0174] The second microphone 120, as the top microphone, can have a noise suppression function. Based on this function, the second microphone 120 can identify and filter out background noise, so that the other party in the call can hear the user's voice more clearly.

[0175] The first microphone 110 can work in conjunction with the second microphone 120 to achieve stereo recording, which can capture richer sound details and provide a more realistic audio experience.

[0176] In this embodiment, the process of the first electronic device 100 calling its built-in microphone to collect target audio and obtain target audio data can specifically be the process of calling the first microphone 110 and the second microphone 120 to collect the user's voice and obtain the user's voice data. This embodiment does not limit the type of target audio; the target audio can be human voice, animal sounds, natural sounds, etc.

[0177] If the first electronic device 100 is in the process of wireless charging, the first microphone 110 will be adjacent to the fan 220 based on its placement on the second electronic device 200. Therefore, the first electronic device 100 needs to identify the current target scene for subsequent processing.

[0178] In one implementation, step S11 includes steps S111-S112.

[0179] In step S111, the first electronic device detects the wireless charging event and determines whether it is in an audio scene.

[0180] The process of the first electronic device detecting a wireless charging event is explained in detail below.

[0181] Figure 9 This is the second flowchart of the noise reduction method provided in the embodiments of this application.

[0182] Figure 10 This is the first interactive diagram of the noise reduction method provided in the embodiments of this application.

[0183] like Figure 9 and Figure 10As shown, in one implementation, step S111 includes steps S1111-S1114.

[0184] In step S1111, the power management unit Charger in the hardware layer detects a wireless charging event.

[0185] A power management unit (Charger), also known as a power management chip, is an integrated circuit used to manage and control the power supply in electronic devices, ensuring that the various components in the electronic device receive the appropriate voltage and current.

[0186] For example, the Charger in this application embodiment may include a wireless charging receiver module, which may include, for example, the wireless charging receiver coil and conversion circuit shown in the foregoing embodiment, so that the Charger can convert AC power into DC power.

[0187] In this process, the Charger can detect wireless charging events by detecting at least one of changes in magnetic field, voltage, current, and power. This application does not limit the specific method by which the Charger detects wireless charging events.

[0188] In this embodiment, the Charger can be integrated into the ADSP chip. Since this application also involves the recognition of audio scenes, the Charger can work better with the audio processing unit located on the ADSP chip. Furthermore, integrating the Charger into the ADSP chip reduces the Charger's dependence on the external charging management chip, simplifies the system design, and reduces the system size.

[0189] It should be noted that in this embodiment, the Charger can also be a discrete device, and the specific configuration of the Charger is not limited in this embodiment. Step S1112: The kernel-level power management driver obtains wireless charging events from the Charger.

[0190] A power management driver is a kernel-level software component used to manage and optimize power usage efficiency in electronic devices. Power management drivers can interact with hardware through a series of interfaces to monitor and control various power-related hardware states; for example, they can acquire wireless charging events based on interactions with the Charger.

[0191] In step S1113, the power management driver reports the wireless charging event to the power management module of HAL.

[0192] In step S1114, the power management module reports the wireless charging event to the power management service in the Java layer.

[0193] At this point, the wireless charging event reporting process is completed in the first electronic device.

[0194] Furthermore, the first electronic device also needs to determine whether it is in an audio context.

[0195] An audio scenario is a scenario in which a first electronic device calls its microphone to collect target audio. This audio scenario includes at least one of the following: hands-free calling scenario, video calling scenario, hands-free voice scenario, recording scenario, and video recording scenario. The audio scenario in this application embodiment may also include other scenarios in which a microphone is called to collect target audio, such as various scenarios involved in Voice Over Internet Protocol (VoIP) communication and various scenarios involved in SIM card calls. This application embodiment does not limit the type of audio scenario.

[0196] Figure 11 This is a schematic diagram of an audio scene provided in an embodiment of this application.

[0197] like Figure 11 As shown, the first electronic device 100 includes a main interface 101, which may include a first icon 102 corresponding to a chat application, a second icon 103 corresponding to a recording application, a third icon 104 corresponding to a camera application, etc.

[0198] The following example illustrates the concept of a video call scenario.

[0199] In response to a user's click on the first icon 102, the first electronic device 100 launches a chat application and displays a first interface 105. The first interface 105 may include a contact list, which may include at least one contact control 106. In response to a click on the contact control 106, the first electronic device 100 displays a contact chat interface 107. The contact chat interface 107 may include a multi-function control 108. In response to a click on the multi-function control 108, the first electronic device 100 displays a multi-function interface and displays a video call control 109 within the multi-function interface. In response to a click on the video call control 109, the first electronic device 100 can initiate a video call, i.e., enter a video call scenario.

[0200] In a video call scenario, the first electronic device 100 can call the first microphone 110 and the second microphone 120 to collect target audio.

[0201] The following is a detailed explanation of the process by which the first electronic device determines that it is in an audio scene.

[0202] Further as Figure 9 and Figure 10As shown, in one implementation, step S111 further includes steps S1115-S1118.

[0203] In step S1115, in response to at least one audio application enabling its audio function, the audio application sends a first message to the audio service in the Java layer. The first message includes a first configuration function, which is used to configure at least one of the audio stream and audio device corresponding to the audio function.

[0204] In this application embodiment, the audio application refers to an application that calls the microphone to collect audio. The audio application may be, for example, the chat application, recording application, and camera application mentioned in the foregoing embodiments. This application embodiment does not limit the specific type of audio application.

[0205] Audio functionality refers to the ability to capture audio using a microphone. Examples of audio functionality include hands-free calling, video calling, hands-free voice recording, audio recording, and video recording. This application does not limit the specific type of audio functionality. In this implementation, the audio functionality can be hands-free calling, video calling, hands-free voice recording, etc.

[0206] In one implementation, the first configuration function can be a `Setparam` function, which is used to pass audio-related parameters or configurations to the underlying audio hardware or software module. The `Setparam` function can store audio stream configurations, such as sampling rate, number of channels, and bit depth; audio device configurations, such as the speakers, microphones, headphones, or other audio devices used; audio routing configurations, such as the path of a specific audio data stream; audio effect configurations, such as specific sound effect processing configurations and equalizer configurations; and audio session management configurations. In practice, the first configuration function can also be other functions depending on the programming language, such as the `Setproperty` function. This application embodiment does not limit the specific type of the first configuration function.

[0207] In this embodiment of the application, when the first configuration function is the Setparam function, the Setparam function can store the relevant configurations of the audio stream and the relevant configurations of the audio device. The relevant configurations of the audio stream can be, for example, a first audio stream, which includes at least one of STREAM_VOICE_CALL and STREAM_VOIP_TX.

[0208] Among them, STREAM_VOICE_CALL can correspond to the audio stream during a call, and STREAM_VOIP_TX can correspond to the audio stream during a voice call in a chat application.

[0209] The `Setparam` function can also store configuration information for audio devices, such as the first audio device (`SPEAKER`). The first audio device can refer to the microphone.

[0210] The Setparam function may also include other configurations. This application does not limit the specific configurations included in the Setparam function.

[0211] In step S1116, the audio service sends the first message to the audio server in the Native layer.

[0212] In step S1117, the audio server sends the first message to the audio module of HAL.

[0213] In step S1118, the audio module determines that it is in an audio scene based on the first configuration function in the first message.

[0214] In one implementation, the audio module parses a first configuration function to detect a first audio stream and / or a first audio device, thereby determining that it is in an audio scene.

[0215] The aforementioned audio scenarios may include at least one of hands-free calling scenarios, video calling scenarios, and hands-free voice scenarios.

[0216] Figure 12 This is the third flowchart of the noise reduction method provided in the embodiments of this application. Figure 12 As shown, in one implementation, step S111 further includes steps S1119-S1120.

[0217] In step S1119, in response to at least one audio application enabling its audio function, the audio application sends a first notification to the audio service, the first notification being used to notify the audio service that the audio application has started the recording function.

[0218] In step S1120, the audio service determines that it is currently in an audio scene based on the first notification.

[0219] The aforementioned audio scenarios may include at least one of recording scenarios and video recording scenarios.

[0220] Steps S1115-S1118 and S1119-S1120 can be implemented in different audio scenarios, and steps S1111-S1114 can be executed together with one of steps S1115-S1118 and steps S1119-S1120.

[0221] It should be noted that the process of the first electronic device detecting the wireless charging event and determining whether it is in an audio scene can be performed simultaneously or sequentially. This application embodiment does not restrict the order of steps S1111-S1114 and steps S1115-S1118. Correspondingly, this application embodiment does not restrict the order of steps S1111-S1114 and steps S1119-S1120.

[0222] In step S112, if the first electronic device detects a wireless charging event and determines that it is in an audio scene, the first electronic device determines that it is in a target scene.

[0223] If the first electronic device needs to determine both that a wireless charging event has been detected and that it is in an audio context, then the first electronic device needs to achieve this through the interaction between the power management service and the audio service in its Java layer.

[0224] Further as Figure 9 and Figure 12 As shown, in one implementation, step S112 includes steps S1121-S1124.

[0225] S1121, the power management service broadcasts the wireless charging event to the system of the first electronic device.

[0226] S1122, after the audio service receives the broadcast, it sends the wireless charging event to the audio server.

[0227] The audio service may have been pre-registered with the system broadcast component, for example... The Broadcast Receiver component in the system is used to listen for wireless charging events. This way, when the power management service sends a broadcast, the audio service can receive the broadcast and thus obtain the wireless charging event.

[0228] S1123, the audio server sends the wireless charging event to the audio module.

[0229] S1124, the audio module determines the target scene after storing the wireless charging event and determining that it is in an audio scene.

[0230] It should be noted that after the aforementioned step S1120, the audio service can send a second notification to the audio module to notify the audio module that the first electronic device is currently in an audio scene.

[0231] In one implementation, the audio module, upon receiving a wireless charging event and determining that it is in an audio scene, can match it with its pre-stored state table to determine the target scene.

[0232] Specifically, the audio module can pre-store a state table. The state table can be shown in Table 1 below.

[0233] Table 1:

[0234]

[0235]

[0236] The state table can define parameters in different ways. The "yes" or "no" in the state table can be represented by Boolean values, i.e., "True" or "False". Thus, in the state table, the state corresponding to obtaining a wireless charging event can be defined as "True", the state corresponding to not obtaining a wireless charging event can be defined as "False", the state corresponding to being in an audio scene can be defined as "True", and the state corresponding to not being in an audio scene can be defined as "False".

[0237] In other words, when the audio module obtains the wireless charging event and determines that it is in an audio scene, the corresponding state is "True" or "True", which matches the state in the state table where the wireless charging event is "True" and the audio scene is "True". The audio module can determine that it is in the target scene. In this way, the first electronic device can further perform subsequent noise reduction operations, i.e., step S12.

[0238] It should be noted that different programming languages ​​define parameters in different ways. In C language, parameters can also be represented by integers, i.e., "1" or "0". This application does not limit the specific representation of the state table.

[0239] In other implementations, after acquiring a wireless charging event and determining that it is in an audio scene, the audio module can also match it with other types of data tables, such as pre-stored look-up tables (LUTs) and parameter tables, to determine that it is in a target scene. The audio module can also determine the target scene based on software algorithms; however, this application does not limit the specific method by which the audio module determines the target scene.

[0240] In one implementation, a scene recognition state machine can be set in the audio module to determine the target scene based on the scene recognition state machine.

[0241] A scene recognition state machine is a mechanism used in automated systems and intelligent applications. This mechanism automatically identifies changing scenes and switches to corresponding states. A scene refers to the system's state at a specific moment. A state machine is a computational model that describes how a system transitions between different states. A state machine includes states, conditions triggering state transitions, and state transition rules. Scene recognition refers to the system's ability to recognize and respond to different environments, automatically adjusting to the appropriate scene.

[0242] In this embodiment of the application, the scene recognition state machine can recognize wireless charging events and audio scenes, and then determine whether to execute the subsequent step S12.

[0243] It should be noted that in this application, the audio module can also determine that it is in the target scene based on other methods. The specific method by which the audio module determines that it is in the target scene is not limited in the embodiments of this application.

[0244] Step S12: When the first electronic device is in the target scene, the first electronic device reduces the fan speed based on the interaction with the second electronic device, and / or eliminates the noise of the first microphone based on the first algorithm to obtain the noise-reduced target audio data.

[0245] Further as Figure 9 and Figure 12 As shown, in one implementation, step S12 includes steps S121-S123.

[0246] In step S121, after the audio module determines that it is in the target scene, it sends a second message to the power management driver. The second message is used to notify the power management driver to control the fan speed.

[0247] In step S122, the power management driver responds to the second message by sending a first instruction to the Charger, which instructs the fan to reduce its speed to a first preset speed.

[0248] In one implementation, the first preset rotational speed is 50% of the initial rotational speed. It should be noted that the specific value of the first preset rotational speed is not limited in the embodiments of this application.

[0249] In step S123, Charger sends a first command to the second electronic device, causing the second electronic device to respond to the first command and reduce the fan speed.

[0250] In one implementation, the first instruction can be sent to the second electronic device in the form of a Control Error Packet (CEP). A CEP typically refers to a data packet used to exchange information between the first and second electronic devices during wireless charging. This information may include charging status, power level, error codes, etc., to ensure the charging process proceeds correctly.

[0251] In this embodiment of the application, a first instruction can be formed by storing the fan speed setting command in the CEP package.

[0252] For example, the data structure in a CEP (Content Processing Epitaxy) may include a header structure, a parameter structure, a timestamp, a checksum, and a tail structure. The header structure can be used to identify the type and version of the data packet. The parameter structure can be used to store values ​​for parameters such as voltage, current, power, efficiency, error count, and fan speed. The timestamp can record the transmission and reception times of the data packet. The checksum can be used to check the integrity of the data in the data packet. The tail structure may contain an end marker or a sequence number.

[0253] It should be noted that the embodiments of this application are only illustrative of the data structure of CEP. CEP may also have other forms of data structure, which are not limited in this application.

[0254] Thus, in a CEP packet with the data structure shown in the example, the parameter structure can include a fan speed parameter. In non-target scenarios, the fan speed parameter can be dynamically adjusted based on changes in factors such as transmission power, voltage, and temperature between the first and second electronic devices. In target scenarios, the first electronic device can modify the fan speed parameter to a first preset speed. In this way, the first electronic device can send a first command with the first preset speed to the second electronic device, causing the second electronic device to respond to the first command and reduce the fan speed.

[0255] In one implementation, based on the structure of the second electronic device in the foregoing embodiments, the second electronic device may respond to the first command based on its built-in wireless charging chip. In this way, the wireless charging chip can control the fan speed to reduce the fan speed.

[0256] It should be noted that the first instruction can also use other types of data structures, and this application embodiment does not limit this.

[0257] Furthermore, after receiving the first instruction, the second electronic device can send a second ACK signal to the first electronic device to notify the first electronic device that it can now respond to the first instruction.

[0258] The second electronic device responds to the first command and reduces the fan speed, which can significantly reduce fan noise. However, since the bottom of the first electronic device is close to the fan, even if the fan noise is reduced, the target audio data collected by the microphone of the first electronic device still contains a large amount of fan noise.

[0259] Therefore, the first electronic device also needs to further reduce noise in the target audio data based on algorithms.

[0260] In one implementation, step S12 further includes steps S124-S125.

[0261] In step S124, after the audio module determines that it is in the target scene, it sends a third message to the audio processing unit of the hardware layer. The third message is used to enable the algorithm module, and the algorithm module is used to store the first algorithm.

[0262] In this embodiment, the audio processing unit can be integrated into an ADSP chip. The audio processing unit can be a hardware module, which can contain audio processing-related devices such as filters and mixers. These devices can efficiently perform audio processing-related mathematical operations.

[0263] In this embodiment of the application, an algorithm module is added to the audio processing unit. The algorithm module can be activated after the audio module recognizes the target scene. In this way, the first electronic device can reduce noise on the target audio data based on the first algorithm in the algorithm module.

[0264] In one implementation, taking the target scenario as a recording scenario as an example, the third message sent by the audio module to the audio processing unit may include the following data structure. Based on this data structure, the audio module can notify the audio processing unit to create a recording stream.

[0265] The data structure is as follows:

[0266] Handset_Mic+Instance_1+DEVICEPP_TX_HONOR_RECORD+PCM_Record.

[0267] The Handset_Mic can be used to indicate the selected microphone.

[0268] Instance_1 can be used to represent the number of output channels.

[0269] DEVICEPP_TX_HONOR_RECORD can be used to indicate the first algorithm to be executed.

[0270] PCM_Record can be used to represent the output audio format.

[0271] Pulse Code Modulation (PCM) is an uncompressed audio format that can be used for high-quality audio recording.

[0272] The specific methods for creating an audio stream based on this data structure and for denoising the audio stream will be described in subsequent embodiments of this application.

[0273] In step S125, in response to the third message, the audio processing unit enables the algorithm module to execute the first algorithm, thereby eliminating the noise of the first microphone to obtain the noise-reduced target audio data.

[0274] It should be noted that the process of the first electronic device reducing the fan speed based on the interaction with the second electronic device and the process of the first electronic device eliminating the noise of the first microphone based on the first algorithm can be performed simultaneously or sequentially. The order of steps S121-S123 and steps S124-S125 is not limited in the embodiments of this application.

[0275] Figure 13 This is the fourth flowchart of the noise reduction method provided in the embodiments of this application.

[0276] Figure 14 This is a schematic diagram of the first use case of the algorithm module provided in the embodiments of this application.

[0277] like Figure 13 and Figure 14 As shown, in one implementation, step S125 includes steps S1251-S1253.

[0278] In step S1251, the first electronic device acquires first audio data and second audio data, wherein the first audio data is obtained by the second microphone collecting the target audio and is used as the first audio data, and the second audio data is obtained by the first microphone collecting the target audio.

[0279] Specifically, in the target scenario, the first electronic device can simultaneously collect target audio by calling the first microphone at the bottom and the second microphone at the top through the audio processing unit, forming two audio data streams.

[0280] In this way, the two microphones can capture the left and right channels of sound separately, thus achieving a stereo effect and providing a realistic audio experience. Furthermore, the audio processing unit can apply specific algorithms to process the two audio data obtained from the two microphones to identify and suppress noise, thereby improving speech clarity.

[0281] In one implementation, the audio processing unit can acquire two audio data streams based on a token key value (Tkv). The Tkv can be a data structure used to manage and process data within the software system. In the audio processing unit, the Tkv may be involved in identifying and accessing different control parameters. This structure allows the audio processing unit to efficiently read and write audio control parameters, thereby achieving precise microphone control.

[0282] However, the second audio data captured by the first microphone is significantly affected by fan noise.

[0283] In step S1252, based on the first algorithm, the first electronic device replaces the second audio data with the first audio data, and the replaced first audio data is used as the second audio data.

[0284] Specifically, when the algorithm module is enabled, the audio processing unit inputs the acquired first audio data and second audio data into the algorithm module, so that the algorithm module executes a first algorithm on the first audio data and second audio data. When it is determined that the first audio data was collected by the second microphone, the first algorithm uses the first audio data as the first audio data output. When it is determined that the second audio data was collected by the first microphone, the first algorithm replaces the second audio data with the first audio data, so that the first audio data is used as the second audio data output.

[0285] In other words, since the second audio data is significantly affected by fan noise, after the first electronic device acquires the second audio data, during the processing of the first and second audio data, the first algorithm first identifies the first and second audio data to filter out the second audio data with greater noise. Secondly, the first algorithm copies the first audio data and replaces the second audio data with the copied first audio data. Finally, both audio data are output as the first audio data.

[0286] In this way, neither of these audio data streams has significant fan noise.

[0287] In step S1253, the first electronic device integrates the first audio data and the second audio data to obtain the noise-reduced target audio data.

[0288] Specifically, the algorithm module integrates the first audio data and the second audio data to obtain the noise-reduced target audio data.

[0289] Since the data content in the first audio stream and the second audio stream is the same, the algorithm module can integrate the first audio stream and the second audio stream into a single audio stream.

[0290] In this embodiment, integration may include a mixing operation. This embodiment does not limit the specific form of integration. Thus, the first and second audio data can be mixed together in a certain proportion to form a mono signal, i.e., the noise-reduced target audio data. This results in the target audio data having better sound clarity, improving the user experience.

[0291] The algorithm module can also include a noise reduction algorithm, such as an active noise cancellation (ANC) algorithm, a real-time noise reduction algorithm based on a statistical model, a subspace algorithm, a microphone array directional enhancement algorithm, a noise reduction algorithm based on machine learning, and so on. This application embodiment does not limit the type of noise reduction algorithm.

[0292] In one implementation, the algorithm module integrates the first audio data and the second audio data, and then further processes the integrated audio data through a noise reduction algorithm to obtain the noise-reduced target audio data.

[0293] In this way, the target audio data processed by the noise reduction algorithm has a better noise reduction effect.

[0294] It should be noted that the first algorithm in this application embodiment has other implementation forms. This application embodiment does not limit the specific implementation of the first algorithm. The following embodiments will specifically describe other implementation forms of the first algorithm.

[0295] Figure 15 This is a schematic diagram of the second use case of the algorithm module provided in the embodiments of this application.

[0296] like Figure 15 As shown, in one implementation, step S125 includes step S1254.

[0297] Step S1254: Based on the first algorithm, the first electronic device disables the first microphone and acquires the first audio data so that the first audio data is used as the target audio data after noise reduction, wherein the first audio data is obtained by the second microphone collecting the target audio.

[0298] It should be noted that steps S1251-S1253 and step S1254 can be two implementations of step S125. Step S125 can execute one of steps S1251-S1253 and step S1254. This application embodiment does not limit the specific implementation of step S125.

[0299] Specifically, when the algorithm module is started, the first electronic device modifies the channel quantity configuration item and channel type configuration item in the algorithm module based on the first algorithm to output the first audio data, so that the first audio data is used as the target audio data after noise reduction.

[0300] The channel quantity configuration item is used to configure the number of channels to 1, so that the algorithm module outputs one audio data based on the channel. The channel type configuration item is used to configure the channel type that matches the first audio data, so that the output audio data is the first audio data.

[0301] See further the data structure of the third message shown in the foregoing embodiments.

[0302] Based on the first algorithm DEVICEPP_TX_HONOR_RECORD, the first electronic device configures the channel quantity configuration item to hexadecimal 0x0001 (equivalent to decimal 1) through Instance_1, and configures the channel type configuration item to PCM_CHANNEL_L based on PCM_Record.

[0303] PCM_CHANNEL_L indicates that the output channel is the left channel, which is the channel corresponding to the second microphone. Correspondingly, it is the channel corresponding to the first audio data.

[0304] In this way, the first electronic device will output one audio data channel, which is the target audio data determined based on the first audio data, and the target audio data will not have fan noise.

[0305] If the first electronic device exits the audio scene, or stops wireless charging, the first electronic device needs to perform the following steps.

[0306] Step S13: The first electronic device determines to exit the target scene.

[0307] In one implementation, step S13 includes step S131.

[0308] In step S131, if the first electronic device does not detect a wireless charging event, or if it is determined that it is not in an audio scene, the first electronic device determines to exit the target scene.

[0309] Figure 16 This is the second interactive diagram of the noise reduction method provided in the embodiments of this application.

[0310] like Figure 16 As shown, in one implementation, step S131 includes steps S1311-S1316.

[0311] In step S1311, if the Charger does not detect a wireless charging event, it stops reporting the wireless charging event to the power management driver so that the audio module does not receive the wireless charging event.

[0312] If the user removes the first electronic device from the second electronic device, the second electronic device stops supplying power to the first electronic device. Consequently, Charge will not detect at least one of the following: changes in magnetic field, voltage, current, and power. Therefore, Charger cannot detect wireless charging events.

[0313] In step S1312, the audio module removes the historically stored wireless charging events and does not receive the currently broadcast wireless charging event, thus determining that no wireless charging event has been detected.

[0314] The audio module does not store wireless charging events for a long time after receiving them. Instead, it only temporarily stores them and removes them after a short period of time. In this way, if the audio module does not receive new wireless charging events within a certain period of time, it can be determined that no wireless charging event has been detected.

[0315] In step S1313, in response to at least one audio application disabling its audio function, the audio application sends a fourth message to the audio service, the fourth message indicating that the audio function has been disabled.

[0316] For example, the fourth message may include an audio function shutdown event, and based on the audio function shutdown event, the fourth message may notify that the audio function has been shut down layer by layer.

[0317] In step S1314, the audio service sends a fourth message to the audio server.

[0318] In step S1315, the audio server sends a fourth message to the audio module.

[0319] In step S1316, the audio module determines, based on the fourth message, that it is not in an audio scene.

[0320] In one implementation, if the audio module determines that no wireless charging event has been detected or that it is not in an audio scene, it can match its pre-stored state table to determine whether to exit the target scene.

[0321] In other words, if the audio module determines that no wireless charging event has been detected, or determines that it is not in an audio scene, the corresponding state may include "False", "True", "True", "False", "False", "False", "False", which matches the state in the state table. The audio module can determine that it is not in the target scene. In this way, the first electronic device can further perform subsequent operations, i.e., step S14.

[0322] In step S14, if the first electronic device exits the target scene, the first electronic device restores the fan speed and disables the first algorithm based on the interaction with the second electronic device.

[0323] In one implementation, step S14 includes steps S141-S143.

[0324] In step S141, after the audio module determines that it is not in an audio scene, it sends a fifth message to the power management driver. The fifth message is used to notify the power management driver to stop controlling the fan speed.

[0325] In step S142, the power management driver responds to the fifth message by sending a second instruction to the power management unit. The second instruction is used to instruct the fan to restore its speed to the initial speed.

[0326] In step S143, the power management unit sends a second command to the second electronic device so that the second electronic device responds to the second command and restores the fan speed.

[0327] In this way, in non-target scenarios, the second electronic device can restore the fan speed and thus restore its heat dissipation capacity without significantly affecting the heat dissipation effect of the second electronic device.

[0328] In one implementation, step S14 further includes steps S144-S145.

[0329] In step S144, after the audio module determines that it is exiting the target scene, it sends a sixth message to the audio processing unit. The sixth message is used to shut down the algorithm module.

[0330] In step S145, in response to the sixth message, the audio processing unit shuts down the algorithm module to disable the first algorithm.

[0331] Figure 17 This is a schematic diagram of the third use case of the algorithm module provided in the embodiments of this application.

[0332] like Figure 17 As shown, when the algorithm module is off, after acquiring the first audio data and the second audio data, the audio processing unit will output the first audio data as the first audio channel and the second audio data as the second audio channel, according to the initial settings within the audio processing unit, to form stereo sound. In this way, the audio data captured by the microphone of the first electronic device will not be interfered with by the algorithm module in non-target scenarios.

[0333] In other words, after the first electronic device leaves the target scene, since it is no longer affected by fan noise, the microphones at both ends can be called back to collect audio, ensuring audio quality.

[0334] The noise reduction method provided in this application allows for scene recognition if the first electronic device is simultaneously in at least one of the following scenarios during wireless charging: hands-free calling, video calling, hands-free voice communication, recording, and video recording. Furthermore, after determining it is in a target scene, the first electronic device can control the fan speed of the second electronic device to reduce noise in the collected target audio data. Additionally, the first electronic device can use an algorithm to denoise the target audio data, obtaining denoised target audio data. Thus, this application enables the target audio data collected in the target scene to have a good noise reduction effect, improving the user experience.

[0335] The foregoing primarily describes the solutions provided in the embodiments of this application from the perspective of electronic devices. It is understood that, in order to achieve the aforementioned functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the noise reduction method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by software-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0336] This application embodiment can divide the above-described electronic device into functional modules or functional units according to the above method examples. For example, each function can be divided into its own functional modules or functional units, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module or functional unit. The module or unit division in this application embodiment is illustrative and represents only one logical functional division; other division methods may be used in actual implementation.

[0337] Figure 18 This is a structural schematic diagram of a noise reduction device provided in an embodiment of this application.

[0338] like Figure 18 As shown, this application embodiment also provides a noise reduction device 300. This noise reduction device 300 can be applied to the first electronic device described above. The noise reduction device 300 may include:

[0339] The determining module 301 is used to determine that the target scene is in the target scene. The target scene includes a scene in which the first electronic device calls its built-in microphone to collect target audio and obtain target audio data during wireless charging. The microphone includes a first microphone, which is adjacent to the fan in the second electronic device. The second electronic device is used to supply power to the first electronic device during wireless charging, and the fan is used for heat dissipation.

[0340] Interaction module 302 is used to interact with the second electronic device when the first electronic device is in the target scene in order to reduce the fan speed.

[0341] Algorithm module 303 is used to eliminate noise from the first microphone based on a first algorithm to obtain noise-reduced target audio data.

[0342] This application also provides a first electronic device, which includes a display screen, a memory, a processor, and a communication module. These devices can be connected via one or more communication buses. The processor may include one or more processing units, such as an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor, a baseband processor, and / or a neural network processor. Different processing units may be independent devices or integrated into one or more processors. The memory is coupled to the processor and is used to store various software programs and / or computer instructions. The memory may include volatile memory and / or non-volatile memory. When the processor executes computer instructions, it can perform the various functions or steps performed by the first electronic device in the above method embodiments.

[0343] This application also provides a second electronic device, which may be, for example, a charging dock, and may have the structure shown in the foregoing embodiments, such as a wireless charging control chip. The wireless charging control chip may execute the various functions or steps performed by the second electronic device in the above method embodiments.

[0344] This application also provides a wireless charging system, including a first electronic device and a second electronic device. The first electronic device can perform the various functions or steps performed by the first electronic device in the above method embodiments. The second electronic device can perform the various functions or steps performed by the second electronic device in the above method embodiments.

[0345] Figure 19 This is a schematic diagram of the structure of a chip system provided in an embodiment of this application.

[0346] like Figure 19As shown, the chip system 400 provided in this application embodiment, for example, a SoC, includes at least one processor 401 and at least one interface circuit 402. The processor 401 and the interface circuit 402 are interconnected via lines. For example, the interface circuit 402 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 402 can be used to send signals to other devices (e.g., the processor 401 or the touchscreen of an electronic device). Exemplarily, the interface circuit 402 can read instructions stored in the memory and send the instructions to the processor 401. When the instructions are executed by the processor 401, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application embodiment.

[0347] This application also provides a computer-readable storage medium including computer instructions that, when executed on the electronic device, cause the electronic device to perform the various functions or steps described in the method embodiments.

[0348] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps described in the above method embodiments.

[0349] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above 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.

[0350] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0351] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0352] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0353] If the integrated unit is implemented as 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 solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0354] It is readily understood that, based on the several embodiments provided in this application, those skilled in the art can combine, split, or reorganize the embodiments of this application to obtain other embodiments, none of which exceed the protection scope of this application.

[0355] The above specific embodiments further illustrate the purpose, technical solution and beneficial effects of this application. It should be understood that the above are only specific embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of this application should be included within the scope of protection of this application.

Claims

1. A noise reduction method, characterized in that, include: The first electronic device is determined to be in a target scenario, which includes a scenario in which the first electronic device calls its built-in microphone to collect target audio and obtain target audio data during wireless charging. The microphone includes a first microphone, which is adjacent to a fan in the second electronic device. The second electronic device is used to supply power to the first electronic device during the wireless charging process, and the fan is used for heat dissipation. When the first electronic device is in the target scene, the first electronic device reduces the fan speed based on its interaction with the second electronic device, and / or eliminates the noise of the first microphone based on the first algorithm, so as to obtain the noise-reduced target audio data; The first electronic device reduces the fan speed based on its interaction with the second electronic device, including: after the audio module of the hardware abstraction layer (HAL) of the first electronic device determines that it is in the target scene, it sends a second message to the power management driver of the kernel layer of the first electronic device. The second message is used to notify the power management driver to control the fan speed; in response to the second message, the power management driver sends a first instruction to the power management unit (Charger) of the hardware layer of the first electronic device. The first instruction is used to instruct the fan to reduce its speed to a first preset speed; the power management unit sends the first instruction to the second electronic device, so that the second electronic device responds to the first instruction and reduces the fan speed. The step of eliminating noise from the first microphone based on the first algorithm to obtain the noise-reduced target audio data includes: After determining that it is in the target scene, the audio module sends a third message to the audio processing unit of the hardware layer. The third message is used to activate the algorithm module, and the algorithm module is used to store the first algorithm. In response to the third message, the audio processing unit activates the algorithm module to execute the first algorithm, thereby eliminating the noise from the first microphone to obtain the noise-reduced target audio data.

2. The noise reduction method according to claim 1, characterized in that, After the first electronic device, when in the target scene, reduces the fan speed based on interaction with the second electronic device, and / or eliminates noise from the first microphone based on a first algorithm to obtain the noise-reduced target audio data, the method further includes: The first electronic device determines to exit the target scenario; When the first electronic device exits the target scene, the first electronic device restores the fan speed and deactivates the first algorithm based on its interaction with the second electronic device.

3. The noise reduction method according to claim 2, characterized in that, The first electronic device is determined to be in the target scene, including: The first electronic device detects a wireless charging event and determines whether it is in an audio scene. The audio scene is a scene in which the first electronic device calls the microphone to collect the target audio. The audio scene includes at least one of a hands-free call scene, a video call scene, a hands-free voice scene, a recording scene, and a video recording scene. When the first electronic device detects the wireless charging event and determines that it is in the audio scene, the first electronic device determines that it is in the target scene.

4. The noise reduction method according to claim 3, characterized in that, The first electronic device detects the wireless charging event, including: The Charger detected the wireless charging event; The power management driver obtains the wireless charging event from the Charger; The power management driver reports the wireless charging event to the power management module of the HAL; The power management module reports the wireless charging event to the power management service in the Java layer.

5. The noise reduction method according to claim 4, characterized in that, Determining whether it is an audio scene includes: In response to at least one audio application enabling its audio function, the audio application sends a first message to the audio service of the Java layer, the first message including a first configuration function, the first configuration function being used to configure at least one of the audio stream and audio device corresponding to the audio function; The audio service sends the first message to the audio server in the Native layer of the local service. The audio server sends the first message to the audio module; The audio module determines that it is in the audio scene based on the first configuration function in the first message.

6. The noise reduction method according to claim 5, characterized in that, The audio module determines that it is in the audio scene based on the first configuration function in the first message, including: The audio module parses the first configuration function to detect the first audio stream and then determines that it is in the audio scene. The first audio stream includes at least one of STREAM_VOICE_CALL and STREAM_VOIP_TX.

7. The noise reduction method according to claim 5, characterized in that, The step of determining that the first electronic device is in the target scene when it detects the wireless charging event and determines that it is in the audio scene includes: The power management service broadcasts the wireless charging event to the system of the first electronic device; After the audio service receives the broadcast, it sends the wireless charging event to the audio server. The audio server sends the wireless charging event to the audio module; The audio module, after storing the wireless charging event and determining that it is in the audio scene, determines that it is in the target scene.

8. The noise reduction method according to claim 7, characterized in that, The microphone further includes a second microphone located opposite the first microphone in the first electronic device. The step of eliminating noise from the first microphone based on the first algorithm to obtain the noise-reduced target audio data includes: The first electronic device acquires first audio data and second audio data, wherein the first audio data is obtained by the second microphone from the target audio and is used as the first audio data, and the second audio data is obtained by the first microphone from the target audio; Based on the first algorithm, the first electronic device replaces the second audio data with the first audio data, and the replaced first audio data is used as the second audio data. The first electronic device integrates the first audio data and the second audio data to obtain the noise-reduced target audio data.

9. The noise reduction method according to claim 8, characterized in that, The step of eliminating noise from the first microphone based on the first algorithm to obtain the noise-reduced target audio data includes: When the algorithm module is enabled, the first electronic device inputs the first audio data and the second audio data into the algorithm module; The algorithm module executes the first algorithm on the first audio data and the second audio data; When it is determined that the first audio data was collected by the second microphone, the first algorithm uses the first audio data as the first audio data to be output. When it is determined that the second audio data was collected by the first microphone, the first algorithm replaces the second audio data with the first audio data and uses the first audio data as the output second audio data. The algorithm module integrates the first audio data and the second audio data to obtain the noise-reduced target audio data.

10. The noise reduction method according to claim 7, characterized in that, The microphone further includes a second microphone located opposite the first microphone in the first electronic device. The step of eliminating noise from the first microphone based on the first algorithm to obtain the noise-reduced target audio data includes: Based on the first algorithm, the first electronic device disables the first microphone and acquires first audio data, so that the first audio data is used as the noise-reduced target audio data, wherein the first audio data is obtained by the second microphone collecting the target audio.

11. The noise reduction method according to claim 10, characterized in that, The step of eliminating noise from the first microphone based on the first algorithm to obtain the noise-reduced target audio data includes: When the algorithm module is started, the first electronic device modifies the channel quantity configuration item and channel type configuration item in the algorithm module based on the first algorithm to output the first audio data, so that the first audio data is used as the target audio data after noise reduction; The channel quantity configuration item is used to configure the number of channels to 1, so that the algorithm module outputs one audio data based on the channel. The channel type configuration item is used to configure the channel type that matches the first audio data, so that the output audio data is the first audio data.

12. The noise reduction method according to claim 7, characterized in that, The first electronic device exits the target scenario, including: If the first electronic device does not detect the wireless charging event, or determines that it is not in the audio scene, the first electronic device determines to exit the target scene.

13. The noise reduction method according to claim 12, characterized in that, The first electronic device did not detect a wireless charging event, including: If the Charger does not detect the wireless charging event, it stops reporting the wireless charging event to the power management driver, so that the audio module does not receive the wireless charging event. The audio module removes the historically stored wireless charging events and does not receive the currently broadcast wireless charging event, thus determining that the wireless charging event has not been detected.

14. The noise reduction method according to claim 13, characterized in that, The determination that the audio scene is not being performed includes: In response to at least one audio application disabling its audio functionality, the audio application sends a fourth message to the audio service, the fourth message being used to notify that the audio functionality has been disabled; The audio service sends the fourth message to the audio server; The audio server sends the fourth message to the audio module; Based on the fourth message, the audio module determines that it is not in the audio scene.

15. The noise reduction method according to claim 14, characterized in that, When the first electronic device exits the target scene, the first electronic device restores the fan speed based on its interaction with the second electronic device, including: After determining that it is not in the audio scene, the audio module sends a fifth message to the power management driver. The fifth message is used to notify the power management driver to stop controlling the fan speed. In response to the fifth message, the power management driver sends a second instruction to the power management unit, the second instruction being used to instruct the fan to restore its speed to the initial speed; The power management unit sends the second instruction to the second electronic device, so that the second electronic device responds to the second instruction and restores the fan speed.

16. The noise reduction method according to claim 15, characterized in that, The disabling of the first algorithm includes: After the audio module determines that it is exiting the target scene, it sends a sixth message to the audio processing unit, which is used to shut down the algorithm module. In response to the sixth message, the audio processing unit shuts down the algorithm module to disable the first algorithm.

17. A noise reduction device, characterized in that, Applied to a first electronic device, including: The determining module is used to determine that a target scene is in which the first electronic device calls its built-in microphone to collect target audio and obtain target audio data during the wireless charging process. The microphone includes a first microphone, which is adjacent to a fan in the second electronic device. The second electronic device is used to supply power to the first electronic device during the wireless charging process. An interaction module is configured to interact with the second electronic device when the first electronic device is in the target scene, in order to reduce the fan speed. Specifically, the interaction module controls the audio module of the Hardware Abstraction Layer (HAL) of the first electronic device to send a second message to the power management driver of the kernel layer of the first electronic device after determining that it is in the target scene. The second message is used to notify the power management driver to control the fan speed. The power management driver, in response to the second message, sends a first instruction to the power management unit (Charger) of the hardware layer of the first electronic device. The first instruction instructs the fan to reduce its speed to a first preset speed. The power management unit then sends the first instruction to the second electronic device, causing the second electronic device to respond to the first instruction and reduce the fan speed. An algorithm module is configured to eliminate noise from the first microphone based on a first algorithm to obtain the noise-reduced target audio data. Specifically, the algorithm module is configured to control the audio module to send a third message to the audio processing unit of the hardware layer after determining that it is in the target scene. The third message is used to enable the algorithm module, and the algorithm module is used to store the first algorithm. In response to the third message, the audio processing unit is controlled to enable the algorithm module to execute the first algorithm, thereby eliminating the noise from the first microphone to obtain the noise-reduced target audio data.

18. An electronic device, characterized in that, include: The device includes a memory, a microphone, and a processor; the memory, the microphone, and the processor are coupled together; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the noise reduction method as described in any one of claims 1-16.

19. A wireless charging system, characterized in that, The wireless charging system includes a first electronic device and a second electronic device, wherein the first electronic device is the electronic device as described in claim 18; The second electronic device is used to supply power to the first electronic device, and the second electronic device is equipped with a fan for heat dissipation. The first electronic device is used to control the speed of the fan in the second electronic device.

Citation Information

Patent Citations

  • Electronic equipment assembly, wireless charging base and wireless charging method

    CN113394843A