A voice interaction response method and electronic device

By enabling electronic devices to autonomously decide whether to respond to voice commands and leveraging their location relative to the user and other devices, the problem of voice interaction response delays has been solved, improving response speed and user experience.

CN115482811BActive Publication Date: 2026-05-29HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2021-05-31
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

When determining the main electronic device to respond to voice commands among multiple electronic devices, communication delays exist, affecting the user experience.

Method used

Electronic devices autonomously decide whether to respond to a user's voice command by obtaining their own location relationship with the user and with other devices.

Benefits of technology

It improves the speed of voice interaction responses and user experience, avoiding the delays associated with decision-making through the main electronic device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482811B_ABST
    Figure CN115482811B_ABST
Patent Text Reader

Abstract

The application provides a voice interaction response method and an electronic device. The method is applied to the electronic device. The electronic device acquires a voice instruction of a user. The position of the user can be determined according to the voice instruction. Different response regions are determined according to the position relationship between the electronic device and other electronic devices. When the user is located in the response region of the electronic device, the electronic device can directly respond to the voice instruction of the user, and the other electronic devices do not respond, so that the efficiency of voice interaction response is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a voice interaction response method and an electronic device. Background Technology

[0002] More and more electronic devices support voice commands. When a user controls an electronic device through voice commands, multiple electronic devices need to identify a master electronic device. Each electronic device sends the received voice command and sound intensity information to the master electronic device. The master electronic device then determines the electronic device that is closest to the user based on the sound intensity information and notifies that device to respond to the user's response. This process involves multiple rounds of communication and interaction, resulting in significant delays and severely impacting the user experience. Summary of the Invention

[0003] This application provides a voice interaction response method and an electronic device. The method allows the electronic device to autonomously decide whether to respond to the user's voice commands, thereby improving the response efficiency of the electronic device.

[0004] In a first aspect, a voice interaction response method is provided, which is applied to a first electronic device. The method includes: the first electronic device acquiring a first voice command from a user; the first electronic device determining a positional relationship between itself and the user based on the first voice command; the first electronic device determining whether to respond to the first voice command based on the positional relationship between itself and the user and the positional relationship between itself and a second electronic device; and, if it is determined that the first voice command should be responded to, the first electronic device responding to the first voice command by executing a response command.

[0005] In this embodiment, the first electronic device can directly determine whether to respond to the user's voice command based on the positional relationship between the first electronic device and the second electronic device, as well as the position between the first electronic device and the user. This avoids making decisions through the main electronic device, thereby improving the speed of voice interaction response and the user's experience.

[0006] In conjunction with the first aspect, in some implementations of the first aspect, the positional relationship between the first electronic device and the second electronic device includes distance information and orientation information between the first electronic device and the second electronic device, and the positional relationship between the first electronic device and the user includes distance information and orientation information between the first electronic device and the user.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, before determining whether to respond to the first voice command, the method further includes: the first electronic device dividing the area where the first electronic device and the second electronic device are located into multiple sub-regions based on distance information and orientation information between the first electronic device and the second electronic device, wherein the multiple sub-regions include a first sub-region, which is a sub-region closer to the first electronic device.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the first electronic device determines whether to respond to the first voice command based on the positional relationship between the first electronic device and the user and the positional relationship between the first electronic device and the second electronic device. This includes: the first electronic device determining whether the user is located in the first sub-region based on distance information and orientation information between the first electronic device and the user, thereby determining whether to respond to the first voice command; if it is determined that the first voice command should be responded to, the first electronic device executes a response command in response to the first voice command. This includes: if it is determined that the user is located in the first sub-region, the first electronic device determines that the first voice command should be responded to, and the first electronic device executes the response command in response to the first voice command.

[0009] In this embodiment, the first electronic device can determine a sub-region close to itself in the area where the first electronic device and the second electronic device are located, based on the positional relationship between the first electronic device and the second electronic device. Thus, when the user is in the sub-region, the first electronic device can directly determine and respond to the user's voice command, avoiding decision-making through the main electronic device, thereby improving the speed of voice interaction response and the user's experience.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, after the first electronic device determines whether to respond to the first voice command, the method further includes: if it is determined that the user is not located in the first sub-region, the first electronic device determines not to respond to the first voice command, and the first electronic device does not respond to the first voice command or execute the response command.

[0011] In this embodiment, the first electronic device can determine a sub-region close to itself in the area where the first electronic device and the second electronic device are located, based on the positional relationship between the first electronic device and the second electronic device. When the user is not in the sub-region close to the first electronic device, the first electronic device can directly determine not to respond to the user's voice command, avoiding decision-making through the main electronic device, thus improving the speed of voice interaction response and the user's experience.

[0012] In conjunction with the first aspect, in certain implementations of the first aspect, the positional relationship between the first electronic device and the second electronic device includes distance information between the first electronic device and the second electronic device, and the positional relationship between the first electronic device and the user includes distance information between the first electronic device and the user; wherein, the first electronic device determines whether to respond to the first voice command based on the positional relationship between the first electronic device and the user and the positional relationship between the first electronic device and the second electronic device, including: the first electronic device determines a preset distance based on the distance information between itself and the second electronic device; the first electronic device determines whether to respond to the first voice command based on the distance information between itself and the user and the preset distance; if it is determined that the first voice command should be responded to, the first electronic device executes a response command in response to the first voice command, including: if it is determined that the distance between the first electronic device and the user is less than the preset distance, the first electronic device determines that the first voice command should be responded to, and the first electronic device executes the response command in response to the first voice command.

[0013] Optionally, the preset distance can be half the distance between the first electronic device and the second electronic device.

[0014] In this embodiment, the first electronic device can determine a preset distance based on the distance relationship between the first electronic device and the second electronic device. When the first electronic device determines that the distance between the first electronic device and the user is less than the preset distance, the first electronic device can determine that the user is closer to the first electronic device, so that the first electronic device can directly respond to the user's voice command, avoiding decision-making through the main electronic device, improving the speed of voice interaction response and the user's experience.

[0015] In conjunction with the first aspect, in certain implementations of the first aspect, the positional relationship between the first electronic device and the second electronic device includes the second electronic device being located on a first side of the first electronic device; wherein, the first electronic device determines whether to respond to the first voice command based on the positional relationship between the first electronic device and the user and the positional relationship between the first electronic device and the second electronic device, including: the first electronic device determines whether the user is located on a second side based on the orientation information between the first electronic device and the user, the second side having a relative positional relationship with the first side; if it is determined that a response to the first voice command should be given, the first electronic device executes a response command in response to the first voice command, including: if it is determined that the user is located on the second side of the first electronic device, the first electronic device determines that a response to the first voice command should be given, and the first electronic device executes the response command in response to the first voice command.

[0016] In this embodiment, the first electronic device can divide the area where the first electronic device is located into two sides based on the positional relationship between the first electronic device and the second electronic device. The second electronic device is located on the first side of the first electronic device, and the first side and the second side are relative. When the first electronic device determines that the user is located on the second side of the first electronic device, the first electronic device can determine that the user is closer to the first electronic device. Thus, the first electronic device can directly respond to the user's voice commands, avoiding decision-making through the main electronic device, improving the speed of voice interaction response and the user's experience.

[0017] In conjunction with the first aspect, in some implementations of the first aspect, the positional relationship between the first electronic device and the second electronic device further includes distance information between the first electronic device and the second electronic device, and the positional relationship between the first electronic device and the user further includes distance information between the first electronic device and the user; the method further includes: when it is determined that the user is located on the first side of the first electronic device, the first electronic device further determines, based on the distance information between the first electronic device and the user, whether the distance between the first electronic device and the user is less than a critical distance, wherein the critical distance is determined by the first electronic device based on the positional relationship between the first electronic device and the second electronic device; when it is determined that the distance between the first electronic device and the user is less than the critical distance, the first electronic device determines to respond to the first voice command, and the first electronic device executes the response command in response to the first voice command.

[0018] In this embodiment, the first electronic device can determine multiple sub-regions based on the positional relationship between the first electronic device and the second electronic device. The first electronic device can determine whether the user responds to the user's voice command in different ways in different sub-regions, avoiding decision-making through the main electronic device, thereby improving the speed of voice interaction response and the user's experience.

[0019] In conjunction with the first aspect, in some implementations of the first aspect, when the first electronic device determines to respond to the first voice command, the second electronic device does not respond to the first voice command or execute the response command.

[0020] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first electronic device determining whether to respond to the first voice command without based on data or instructions sent by the second electronic device or other electronic devices.

[0021] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first voice instruction contains a wake word for waking up the first electronic device and the second electronic device.

[0022] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first electronic device includes a microphone array, the microphone array including multiple microphones; the first electronic device determines the positional relationship between the first electronic device and the user according to the first voice command, including: the first electronic device uses sound source localization technology to determine the positional relationship between the first electronic device and the user based on the phase information and time difference information of the first voice command received by the multiple microphones.

[0023] Alternatively, the first electronic device may also include millimeter-wave radar and / or Bluetooth antenna array and / or infrared sensor and / or WiFi antenna array, and the first electronic device may also determine the location relationship between the first electronic device and the user through millimeter-wave positioning technology and / or Bluetooth positioning technology and / or infrared positioning technology and / or WiFi positioning technology.

[0024] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first electronic device includes an ultra-wideband antenna array; the first electronic device determines the positional relationship between the first electronic device and the user according to the first voice command, including: after receiving the first voice command, the first electronic device determines the positional relationship between the first electronic device and the user through ultra-wideband positioning technology.

[0025] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first electronic device acquiring the positioning signal of the second electronic device; and the first electronic device determining the positional relationship between the first electronic device and the second electronic device based on the positioning signal.

[0026] Specifically, the microphone array in the first electronic device can receive ultrasonic signals sent by the second electronic device, and determine the positional relationship between the first electronic device and the second electronic device based on the time it takes for the ultrasonic signals to arrive at each microphone.

[0027] Alternatively, the first electronic device may also include a millimeter-wave radar and / or Bluetooth antenna array and / or infrared sensor and / or WiFi antenna array, and the first electronic device may also determine the location relationship between the first electronic device and the user by receiving millimeter-wave signals and / or Bluetooth signals and / or infrared signals and / or WiFi signals.

[0028] Secondly, an electronic device according to an embodiment of this application includes modules / units for performing the methods of the first aspect or any possible design of the first aspect; these modules / units can be implemented in hardware or by hardware executing corresponding software.

[0029] Thirdly, a chip according to an embodiment of this application is coupled to a memory in an electronic device and is used to call a computer program stored in the memory and execute the first aspect of the embodiment of this application and any possible technical solution designed by the first aspect; in the embodiments of this application, "coupling" means that two components are directly or indirectly combined with each other.

[0030] Fourthly, according to an embodiment of this application, a computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the technical solutions described in the first aspect and any possible design of the first aspect.

[0031] Fifthly, a computer program according to an embodiment of this application includes instructions that, when executed on a computer, cause the computer to perform the technical solutions described in the first aspect and any possible design of the first aspect.

[0032] For the beneficial effects of aspects two through five, please refer to the beneficial effects of aspect one, which will not be repeated here. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0034] Figure 2 This is a software structure block diagram of an electronic device provided in an embodiment of this application.

[0035] Figure 3 A schematic diagram illustrating the orientation identification of an electronic device provided in an embodiment of this application is shown.

[0036] Figure 4 An example diagram of distance detection by ultrasound provided in an embodiment of this application is shown.

[0037] Figure 5 This is a schematic flowchart illustrating the positioning between electronic devices provided in the embodiments of this application.

[0038] Figure 6 This is a schematic diagram of the electronic device determining the response area provided in the embodiments of this application.

[0039] Figure 7 This is a schematic diagram of the electronic device determining the response area provided in the embodiments of this application.

[0040] Figure 8 This is a schematic flowchart of the voice interaction response of an electronic device provided in the embodiments of this application.

[0041] Figure 9 This is a schematic diagram of the electronic device determining the response area provided in the embodiments of this application.

[0042] Figure 10 This is a schematic diagram of the electronic device determining the response area provided in the embodiments of this application.

[0043] Figure 11 This is a schematic diagram of the electronic device determining the response area provided in the embodiments of this application.

[0044] Figure 12 This is a schematic diagram of the electronic device determining the response area provided in the embodiments of this application. Detailed Implementation

[0045] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.

[0046] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0047] The following describes an electronic device, a user interface for such an electronic device, and embodiments for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or music player, such as a mobile phone, tablet computer, wearable electronic device with wireless communication capabilities (such as a smartwatch), etc. Exemplary embodiments of the portable electronic device include, but are not limited to, carrying... Alternatively, it could be a portable electronic device with another operating system. The aforementioned portable electronic device could also be other portable electronic devices, such as laptops. It should also be understood that in some other embodiments, the aforementioned electronic device may not be a portable electronic device, but rather a desktop computer.

[0048] For example, Figure 1 A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, 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, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0049] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the 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.

[0050] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent components or integrated into one or more processors. In some embodiments, electronic device 101 may also include one or more processors 110. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. In other embodiments, processor 110 may also include a memory for storing instructions and data. For example, the memory in processor 110 may be a cache memory. This memory can store instructions or data that processor 110 has just used or is reusing. If processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the electronic device 101 in processing data or executing instructions.

[0051] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. The USB interface 130 is a USB standard-compliant interface, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 101, and can also be used for data transfer between the electronic device 101 and peripheral devices. The USB interface 130 can also be used to connect headphones for audio playback.

[0052] 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 electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0053] 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 electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0054] 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, internal memory 121, external memory, display screen 194, camera 193, 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.

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

[0056] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in 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 tuning switches.

[0057] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the 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.

[0058] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (WiFi) 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.

[0059] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0060] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.

[0061] In some embodiments of this application, when the display panel uses materials such as OLED, AMOLED, and FLED, the above-mentioned Figure 1The display screen 194 can be bent. Here, "the display screen 194 can be bent" means that the display screen can be bent to any angle at any part and can maintain that angle. For example, the display screen 194 can be folded from the middle left to right. It can also be folded from the middle up to down.

[0062] The display screen 194 of electronic device 100 can be a flexible screen. Currently, flexible screens are attracting much attention due to their unique characteristics and enormous potential. Compared to traditional screens, flexible screens are highly flexible and bendable, providing users with new interaction methods based on their bendability and meeting more user needs for electronic devices. For electronic devices equipped with foldable displays, the foldable display can switch between a small screen in a folded state and a large screen in an unfolded state at any time. Therefore, users are increasingly using split-screen functionality on electronic devices equipped with foldable displays.

[0063] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0064] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. 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 in the camera 193.

[0065] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or more cameras 193.

[0066] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0067] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0068] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0069] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0070] Internal memory 121 can be used to store one or more computer programs, which include instructions. Processor 110 can execute the instructions stored in internal memory 121, thereby causing electronic device 101 to perform the methods provided in some embodiments of this application, as well as various applications and data processing. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system; the program storage area may also store one or more applications (such as a gallery, contacts, etc.). The data storage area may store data created during the use of electronic device 101 (such as photos, contacts, etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, processor 110 can execute instructions stored in internal memory 121 and / or instructions stored in memory disposed in processor 110 to cause electronic device 101 to perform the methods provided in embodiments of this application, as well as other applications and data processing. Electronic device 100 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0071] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0072] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive materials. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the touch position based on the detection signal from the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.

[0073] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 around three axes (i.e., the X, Y, and Z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.

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

[0075] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0076] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

[0077] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.

[0078] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects 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 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0079] Figure 2 This is a software structure block diagram of an electronic device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0080] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0081] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.

[0082] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0083] The window manager is used to manage window programs. The window manager can obtain the screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0084] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0085] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0086] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0087] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and so on.

[0088] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0089] 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.

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

[0091] 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.

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

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

[0094] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, and sensor drivers.

[0095] Before introducing the embodiments of this application, let's first introduce a few concepts related to the embodiments of this application.

[0096] Wireless positioning technology: This technology uses communication and parameter measurement to determine the direction and distance of a target. Wireless positioning technologies can include: sound source localization, ultra-wideband (UWB) positioning, Bluetooth positioning, WiFi positioning, infrared positioning, and radio frequency identification (RFID) positioning.

[0097] Sound source localization technology refers to the technology by which electronic devices determine the direction and distance of a sound source. Common sound source localization technologies include microphone array sound source localization, binaural hearing mechanism sound source localization, and optical sensor sound source localization. Microphone array sound source localization technology can include: controllable beamforming technology based on maximum output power, high-resolution spectrum estimation technology, and sound source localization technology based on time difference of arrival (TDOA). Binaural hearing mechanism sound source localization technology can include: inter-aural intensity difference (IID) sound source localization technology and inter-aural time difference (ITD) sound source localization technology. Optical sensor sound source localization technology can include: fiber optic microphone sensor sound source localization technology and visual microphone sensor sound source localization technology.

[0098] UWB positioning technology: UWB wireless communication is a communication method that does not use a carrier wave, but instead uses extremely narrow pulses. When positioning via UWB, positioning algorithms can measure the distance and direction from the target to a fixed target, and ultimately determine the location of the target.

[0099] It should be noted that when the target to be tested is a user, the user can carry a location tag, which may include a UWB module, and the location of the location tag can be represented as the user's location.

[0100] Bluetooth positioning technology: The target receives a positioning signal emitted by a Bluetooth beacon, calculates the distance between the target and the Bluetooth beacon based on the positioning algorithm, and finally determines the location of the target.

[0101] WiFi positioning technology: By deploying wireless signal access points in the area to be located, the target receives the WiFi signal sent by the wireless signal access points, and the distance between the target and the wireless signal access points is calculated according to the positioning algorithm, and the location of the target is finally determined.

[0102] Infrared positioning technology: Infrared positioning technology uses infrared markers to generate infrared signals, which are received by optical sensors, and the location of the target is obtained according to the positioning algorithm.

[0103] RFID positioning technology: RFID positioning technology uses radio frequency signals to communicate and exchange data bidirectionally, thereby achieving the purpose of identification and positioning. After receiving the processor's command, the RFID reader of the target object sends a signal at a fixed frequency. The RFID tags in the environment receive the message and send back their own identification to the RFID reader, which is then identified and processed by the processor.

[0104] Millimeter-wave positioning technology: Millimeter-wave radar emits directional millimeter waves through a transmitting antenna. When the millimeter waves encounter an obstacle or target, they are reflected back. The received millimeter waves are received by a receiving antenna, and the location of the target can be determined based on the waveband and timing of the millimeter waves.

[0105] It is understood that the above-described positioning technologies do not constitute a specific limitation on the positioning technologies used by the electronic devices in the embodiments of this application. The electronic devices in the embodiments of this application may employ one or more of the above-described positioning technologies, or one or more positioning technologies other than those described above.

[0106] For example, the positioning algorithm may be: using the signal time of flight (TOF), and / or the signal time of arrival (TOA), and / or the signal time difference of arrival (TDOA), and / or the signal angle of arrival (AOA), and / or the received signal strength indication (RSSI).

[0107] More and more electronic devices support voice command interaction. With the increase in electronic devices, multiple devices may respond simultaneously when a user controls them via voice commands. In some implementations, when multiple electronic devices are in a space, a master device can be designated between the user and the devices. When the user wakes up an electronic device or interacts with it via voice, multiple electronic devices need to send the sound intensity information (e.g., sound pressure level) of the received voice commands to the master device. The master device collects the sound intensity information of all electronic devices' voice commands, determines the distance relationship between the user and each electronic device based on the sound intensity information, and then determines which electronic device needs to respond and sends the control command. This process involves multiple rounds of communication interaction, which can lead to significant latency and negatively impact user experience. This application provides a voice interaction response method that avoids multiple rounds of communication interaction and improves the response speed of electronic devices by dividing the response area into different regions.

[0108] The following is combined with Figure 3 and Figure 4 This application provides a schematic diagram illustrating the identification of the location of electronic devices and the distance measurement between electronic devices.

[0109] Electronic devices can determine the location of a target and the distance between the electronic device and the target using sound source localization (SMU) and ultrasonic ranging (UTR) technologies. This embodiment uses the example of an electronic device determining its location relative to a user using TDR-based SMU, but this is not a limitation; other positioning technologies can also be used to determine the location relative to the user. TDR-based SMU can be divided into two steps: first, calculating the time difference between the sound source signal and the microphone array; then, establishing a SMU localization model based on the geometry of the microphone array and solving for the location information. For example... Figure 3As shown, the first electronic device includes three microphones, namely the first microphone, the second microphone, and the third microphone. The distances between the sound source and the first microphone, the second microphone, and the third microphone are r1, r2, and r3, respectively. The distance between the first microphone and the second microphone is s1, the distance between the first microphone and the third microphone is s2, and the distance between the second microphone and the third microphone is s3. When the sound source emits a sound source signal, the time delay of the sound source signal reaching the second microphone and the first microphone can be obtained according to formula (1):

[0110]

[0111] Where, τ 12 R1 is the time delay for the sound source signal to reach the second microphone and the first microphone, R2 is the distance between the sound source and the first microphone, and C is the speed of sound propagation.

[0112] Similarly, the time delay of the sound source signal reaching the third microphone and the first microphone can be obtained according to formula (2):

[0113]

[0114] Where, τ 13 r1 is the time delay for the sound source signal to reach the third microphone and the first microphone, r3 is the distance between the sound source and the first microphone, and c is the speed of sound propagation.

[0115] Similarly, the time delay of the sound source signal reaching the third and second microphones can be obtained according to formula (3):

[0116]

[0117] Based on the geometric relationship between the first microphone, the second microphone, and the third microphone, we can obtain formulas (4) to (6):

[0118]

[0119]

[0120]

[0121] Where, τ 12 τ 13 τ 23It can be obtained through time delay estimation. Time delay can be understood as the time difference between different sensor arrays (such as microphone arrays) receiving signals from the same source (such as a sound source) due to different transmission distances. Time delay estimation uses the theories and methods of parameter estimation and signal processing to estimate the time delay, and from this, further determine relevant parameters, such as the location of the signal source. Currently, commonly used time delay estimation methods mainly include the generalized cross-correlation method, the least mean square adaptive filtering method, and the cross-power spectrum phase method. τ is obtained through time delay estimation. 12 τ 13 τ 23 Then, by combining formulas (1)-(6), α1, α2, α3, α4, α5, and α6 can be obtained, and the orientation of the sound source and the first electronic device can be obtained from the above 6 angles.

[0122] It should be understood that the method for time delay estimation in the embodiments of this application is not limited, and can be one of the three methods mentioned above, or other time delay estimation methods.

[0123] It should also be understood that the electronic device in this application uses TDOA-based sound source localization technology to locate the target, but it is not limited to this. Other sound source localization technologies and localization algorithms may also be used in the electronic device in this application embodiment.

[0124] Electronic devices can also use ultrasonic ranging technology to measure the distance between the electronic device and the target being measured. For example... Figure 4 As shown, the electronic device sends an ultrasonic signal and starts timing at the moment the ultrasonic wave is emitted. When the ultrasonic wave hits the target to be measured, it is reflected back to the electronic device. The electronic device stops timing after receiving the reflected ultrasonic wave, so that the distance between the first electronic device and the user can be determined based on the speed of sound and time.

[0125] It should be understood that the example in this application embodiment uses ultrasonic waves to measure the distance between the electronic device and the target to be measured, but it is not limited to this. The electronic device in this application embodiment can also measure the distance between the electronic device and the target to be measured through technologies such as UWB, Bluetooth, and millimeter waves.

[0126] The following is combined with Figure 5 This application provides a schematic flowchart illustrating the positioning between electronic devices according to embodiments of the present application.

[0127] Figure 5 A schematic flowchart illustrating the positioning between electronic devices provided in an embodiment of this application is shown. The process includes:

[0128] S501 periodically sends positioning signals.

[0129] The first electronic device can periodically send a first positioning signal, and the second electronic device can periodically send a second positioning signal.

[0130] For example, the first positioning signal and the second positioning signal may be: ultrasonic signal, and / or Bluetooth signal, and / or WiFi signal, and / or infrared signal, and / or UWB signal, and / or radio frequency signal, and / or millimeter wave.

[0131] S502, the first electronic device receives the positioning signal to determine the position of the second electronic device.

[0132] When the first electronic device receives the second positioning signal sent by the second electronic device, the first electronic device can determine the location information of the second electronic device based on the received second positioning signal and through a positioning algorithm.

[0133] For example, the localization algorithm may be: TOF, and / or TOA, and / or TDOA, and / or AOA, and / or RSSI.

[0134] S503, the second electronic device receives the positioning signal to determine the position of the first electronic device.

[0135] When the second electronic device receives the first positioning signal sent by the first electronic device, the second electronic device can determine the location of the first electronic device based on the received first positioning signal and through a positioning algorithm.

[0136] For example, the localization algorithm may be: TOF, and / or TOA, and / or TDOA, and / or AOA, and / or RSSI.

[0137] In this embodiment of the application, the location and distance between electronic devices can be determined by Bluetooth positioning technology, UWB positioning technology, sound source positioning technology, infrared positioning technology, radio frequency identification positioning technology, millimeter wave radar positioning technology, and WiFi positioning technology.

[0138] Once the positions of the first and second electronic devices are determined, the surrounding areas of both devices can be further segmented based on these positions, thus defining the response areas for each device. When the user is within the response area of ​​the first electronic device, the first device responds to the user's voice commands and interacts with the user via voice. Similarly, when the user is within the response area of ​​the second electronic device, the second device responds to the user's voice commands and interacts with the user via voice. This allows each electronic device to autonomously decide whether to respond to the user's voice commands and interact with the user without relying on a master device, avoiding multi-round communication interactions between devices and improving the response speed of electronic devices to voice commands in scenarios with multiple devices.

[0139] It should be noted that voice commands can include wake words used by users to wake up electronic devices.

[0140] The following is combined with Figures 6-7 This application provides a schematic diagram illustrating the determination of a response region by an electronic device according to an embodiment.

[0141] Figure 6 A schematic diagram of an electronic device for determining a response region according to an embodiment of this application is shown.

[0142] like Figure 6 As shown, the first electronic device can receive a second positioning signal sent by the second electronic device. Based on the second positioning signal, the first electronic device obtains the second location information of the second electronic device through a positioning algorithm. The second location information includes the distance information between the second electronic device and the first electronic device, and the direction of the second electronic device relative to the first electronic device. For example, ... Figure 6 As shown, the second electronic device is located due east of the first electronic device, and the distance KP between the first electronic device and the second electronic device is d0.

[0143] The second electronic device can receive a first positioning signal sent by the first electronic device. Based on the first positioning signal, the second electronic device obtains the first position information of the first electronic device through a positioning algorithm. The first position information includes the distance between the first and second electronic devices and the direction of the first electronic device relative to the second electronic device. For example, Figure 6 As shown, the first electronic device is located due west of the second electronic device, and the distance KP between the first electronic device and the second electronic device is d0.

[0144] The first electronic device and the second electronic device can establish a Cartesian coordinate system based on the first positional relationship and the second positional relationship, and determine their respective definite response regions. For example, they can establish a Cartesian coordinate system as follows: Figure 6 The coordinate system shown includes an x-axis, a y1-axis, and a y2-axis. The x-axis is the coordinate axis determined by points K and P. The y1-axis is the coordinate axis perpendicular to the x-axis and passing through point K. The y2-axis is the coordinate axis perpendicular to the x-axis and passing through point P.

[0145] like Figure 6 As shown, the distance KP between the first electronic device and the second electronic device is d0, and point O is the midpoint of KP. Starting from point O, ray ON is perpendicular to the x-axis, and any point on ray ON is equidistant from points K and P.

[0146] The first and second electronic devices can set the area west of ray ON as the response area of ​​the first electronic device, such as... Figure 6 Area A is defined in the diagram. The distance between any point in Area A and the first electronic device is less than the distance between that point and the second electronic device.

[0147] The first and second electronic devices can set the area east of ray ON as the response area of ​​the second electronic device, such as... Figure 6 In area B, the distance between any point in area B and the first electronic device is greater than the distance between that point and the second electronic device.

[0148] It should be noted that if the area south of the x-axis is called the first region and the area north of the x-axis is called the second region, then this application embodiment takes the first region as an example to introduce the response regions of the first electronic device and the second electronic device. The response regions of the first electronic device and the second electronic device in the second region can be obtained by being symmetrical about the x-axis. For the sake of simplicity, it will not be described in detail here.

[0149] exist Figure 6 In the illustrated embodiment, when the positions of the first electronic device and the second electronic device are determined, the surrounding areas of the first and second electronic devices can be further divided into areas A and B based on the determined positions. Area A is designated as the response area of ​​the first electronic device, and area B is designated as the response area of ​​the second electronic device. When the user is in area A, the user is closer to the first electronic device, indicating that the user wishes to interact with the first electronic device. Therefore, the first electronic device responds to the user's voice command and engages in voice interaction. Similarly, when the user is in area B, the user is closer to the second electronic device, indicating that the user wishes to interact with the second electronic device. Therefore, the second electronic device responds to the user's voice command and engages in voice interaction. This allows the first and second electronic devices to autonomously decide whether to respond to the user's voice command and engage in voice interaction without relying on a master device. This avoids multi-round communication interactions between devices and improves the response speed of electronic devices to voice commands in scenarios with multiple electronic devices.

[0150] Figure 7 This illustration shows another schematic diagram of determining the response area of ​​an electronic device provided in an embodiment of this application.

[0151] like Figure 7 As shown, the first electronic device can receive a second positioning signal sent by the second electronic device, and obtain second location information of the second electronic device through a positioning algorithm. The second location information includes the distance information between the second electronic device and the first electronic device, and the direction of the second electronic device relative to the first electronic device. For example, ... Figure 7 As shown, the second electronic device is located due east of the first electronic device, and the distance KP between the first electronic device and the second electronic device is d0.

[0152] The second electronic device can receive a first positioning signal sent by the first electronic device and obtain first position information of the first electronic device through a positioning algorithm. The first position information includes the distance between the first and second electronic devices and the direction of the first electronic device relative to the second electronic device. For example, ... Figure 7 As shown, the first electronic device is located due west of the second electronic device, and the distance KP between the first electronic device and the second electronic device is d0.

[0153] The first electronic device and the second electronic device can establish a Cartesian coordinate system based on the first positional relationship and the second positional relationship, and determine their respective response regions. For example, they can establish a Cartesian coordinate system as follows: Figure 7 The coordinate system shown includes an x-axis, a y1-axis, and a y2-axis. The x-axis is the coordinate axis determined by points K and P. The y1-axis is the coordinate axis perpendicular to the x-axis and passing through point K. The y2-axis is the coordinate axis perpendicular to the x-axis and passing through point P.

[0154] like Figure 7 As shown, the distance KP between the first electronic device and the second electronic device is d0, and point O is the midpoint of KP. Starting from point O, ray ON is perpendicular to the x-axis, and any point on ray ON is equidistant from points K and P.

[0155] The first and second electronic devices can set the region west of the y1 axis as the response region of the first electronic device, such as... Figure 7 Area A is defined in the diagram. The distance between any point in Area A and the first electronic device is less than the distance between that point and the second electronic device.

[0156] The first and second electronic devices can set the region east of the y2 axis as the response region of the second electronic device, such as... Figure 7 In area B, the distance between any point in area B and the first electronic device is greater than the distance between that point and the second electronic device.

[0157] The first and second electronic devices can set the area east of axis y1 and west of axis y2 as a common area, such as... Figure 7 Area C in the diagram can include a first sub-area and a second public area, where the first sub-area is... Figure 7 In the CA region, the distance between any point in the first sub-region and the first electronic device is less than the distance between that point and the second electronic device; the second sub-region is... Figure 7 In the CB region, any point in the second sub-region is farther from the first electronic device than the point is farther from the second electronic device.

[0158] It should be noted that, in this embodiment, the first region is used as an example to introduce the response region and common region of the first electronic device and the second electronic device. The response region and common region of the first electronic device and the second electronic device in the second region can be obtained by being symmetrical about the x-axis. For the sake of simplicity, it will not be described in detail here.

[0159] exist Figure 7 In the illustrated embodiment, when the first electronic device and the second electronic device determine their relative positions, the surrounding areas of the first and second electronic devices can be further divided into areas A, B, and C based on the determined positions. Area C includes areas CA and CB. The response areas of the first electronic device are determined to be areas A and CA, and the response areas of the second electronic device are determined to be areas B and CB. The first electronic device can determine that the user is located in area A by measuring its position relative to the user. When the user is located in area A, the first electronic device can assume that the user wishes to interact with it and thus respond to the user's voice commands by engaging in voice interaction. Similarly, the second electronic device can determine that the user is located in area B by measuring its position relative to the user. When the user is located in area B, the first electronic device can assume that the user wishes to interact with it and thus respond to the user's voice commands by engaging in voice interaction. When the first electronic device determines the user's location as zone C, it needs to further measure the distance to determine whether the user is in zone CA or zone CB. If the user is in zone CA, the first electronic device assumes the user wishes to interact and responds to the user's voice command, engaging in voice interaction. Similarly, if the user is in zone CB, the second electronic device responds to the user's voice command and engages in voice interaction. This allows each electronic device to autonomously decide whether to respond to the user's voice command and engage in voice interaction without relying on a master device. Furthermore, it can determine whether to measure the distance to the user based on their location, avoiding multiple rounds of communication between devices, simplifying the decision-making process, and improving the response speed of electronic devices to voice commands in scenarios with multiple devices.

[0160] The following is combined with Figures 8-10 This application introduces a method for voice interaction in electronic devices, as provided in its embodiments.

[0161] Figure 8 This paper presents a schematic flowchart of a voice interaction response system for an electronic device according to an embodiment of this application. The process includes:

[0162] S801 periodically sends positioning signals.

[0163] The first electronic device can periodically transmit a first positioning signal, and the second electronic device can periodically transmit a second positioning signal. For a description of the first and second positioning signals, please refer to the foregoing embodiments, and will not be repeated here.

[0164] S802, the first electronic device determines the position of the second electronic device and determines the response area of ​​the first electronic device.

[0165] When the first electronic device receives the second positioning signal sent by the second electronic device, the first electronic device can determine the location of the second electronic device based on the second positioning signal and a positioning algorithm. The description of the positioning algorithm can be found above and will not be repeated here.

[0166] Once the first electronic device determines the location of the second electronic device, it can determine its response area based on the positional relationship with the second electronic device.

[0167] S803, the second electronic device determines the position of the first electronic device and determines the response area of ​​the second electronic device.

[0168] When the second electronic device receives the first positioning signal sent by the first electronic device, the first electronic device can determine its location based on the first positioning signal using a positioning algorithm. The description of the positioning algorithm can be found above and will not be repeated here.

[0169] Once the second electronic device determines the position of the first electronic device, it can determine its response area based on its positional relationship with the first electronic device.

[0170] S804, the first electronic device receives the user's voice command.

[0171] S805, the second electronic device receives the user's voice command.

[0172] S806, the first electronic device determines whether the user is in the response area of ​​the first electronic device.

[0173] After receiving the user's voice command, the first electronic device can determine the user's distance and location relative to the first electronic device using sound source localization technology and ultrasonic ranging technology.

[0174] When the first electronic device passes through, as Figure 6 When determining the response area using the method shown, the user's location can be determined by their orientation and distance. For example... Figure 9As shown, ray KM intersects ray ON at point D. Ray KM is deflected eastward by λ relative to the y1 axis, and the distance from KD is d1. Point D can be understood as the boundary between region A and region B. When the distance between any point on ray KM and point K is less than d1, that point is located in region A; when the distance between any point on ray KM and point K is greater than d1, that point is located in region B. For example, the first user and the second user are located at points R and L on ray KM, respectively. The first user is located south-east of the first electronic device by λ, at a distance of d2 from KR. Since d2 is less than d1, the first electronic device can determine that the first user is located in region A, i.e., the response region of the first electronic device. The second user is located south-east of the first electronic device by λ, at a distance of d3 from KL. Since d3 is greater than d1, the first electronic device can determine that the second user is located in region B, i.e., the response region of the second electronic device. It should be noted that, as... Figure 9 As shown, if ray KM' does not intersect with ray ON, the first electronic device can determine that the user is located in the response area of ​​the first electronic device after determining the distance between the user and ray KM'.

[0175] When the first electronic device passes through, as Figure 7 When determining the response area using the method shown, the user's position relative to the first electronic device can be determined first. Then, the first electronic device can determine whether to measure the distance to the user based on the user's position relative to the first electronic device. For example... Figure 10As shown, the second electronic device is located due east of the first electronic device. Therefore, the distance from any point west of the y1 axis to the first electronic device is less than the distance from that point to the second electronic device. Thus, when the first electronic device determines the user's location is west of the y1 axis, it can determine the user's location within its response area without knowing the distance between the user and itself. However, when the first electronic device determines the user's location is east of the y1 axis, it needs to determine the distance between the user and itself before determining the user's location. For example, the third user is located at point G on ray KE, and the fourth and fifth users are located at points H and T on ray KU, respectively. Ray KE is deflected westward by β relative to the y1 axis, and ray KU is deflected eastward by η relative to the y1 axis, intersecting ray ON at point F. When determining the location of the third user, since the third user's location is deflected westward by β relative to the y1 axis, the first electronic device can directly determine that the third user is within its response area without measuring the distance to the third user. When determining the positions of the fourth and fifth users, the first electronic device needs to measure the distances between itself and the fourth user, since the orientations of the fourth and fifth users are deviated eastward by η relative to the y1 axis. Specifically, the distances to KF and KH are d4, d5, and d6. If d5 is less than d4, the first electronic device can determine that the fourth user is located in the CA region, i.e., its response area. If d6 is greater than d4, the first electronic device can determine that the fifth user is located in the CB region, i.e., the response area of ​​the second electronic device.

[0176] S807, the second electronic device determines whether the user is in the response area of ​​the second electronic device.

[0177] After receiving the user's voice command, the second electronic device can determine the user's location. For a detailed description, please refer to S806; for brevity, it will not be repeated here.

[0178] Through such Figure 7 The method shown determines the response region, compared to methods such as... Figure 6 The method shown determines the response area, which can eliminate the step of measuring the distance between the user and the first and second electronic devices when the user is in the region west of the y1 axis or in the region east of the y2 axis. This can save computation and improve response speed to a certain extent.

[0179] In this embodiment, the first electronic device and the second electronic device determine their response areas by locating their positional relationship. When the first electronic device and the second electronic device receive a user's voice command, they can determine the area to which the user belongs. When the user is in the response area of ​​the first electronic device, the first electronic device can respond directly, or when the user is in the response area of ​​the second electronic device, the second electronic device can respond directly, thus improving the user's voice interaction experience.

[0180] It should be noted that the above embodiments use a first electronic device and a second electronic device as examples to describe the embodiments of this application, but the embodiments of this application are not limited thereto, and may also include more electronic devices. Figure 11 As shown, after the first electronic device, the second electronic device, and the third electronic device determine their respective positional relationships relative to the other two electronic devices, they can determine their respective response areas.

[0181] like Figure 11 As shown in (a), the first electronic device and the third electronic device can determine their positional relationship using positioning technology. The first electronic device and the third electronic device can establish a Cartesian coordinate system based on their positional relationship and determine their respective definite response areas. For example, a system like... Figure 11 The coordinate system shown in (a) contains the x2 axis, y3 axis, and y4 axis. The x-axis is the coordinate axis determined by points K and P, the y3 axis is the coordinate axis perpendicular to the x2 axis and passing through point K, and the y4 axis is the coordinate axis perpendicular to the x2 axis and passing through point Z. The distance KZ between the first electronic device and the third electronic device is d7, and point M is the midpoint of KZ. The first electronic device can determine that ray MS is the boundary between the region (area A) where the first electronic device determines the response and the region (area E) where the third electronic device determines the response. When the first electronic device determines that the user's region is area A, it responds; when it determines that the user's region is area E, it does not respond. Similarly, the third electronic device can also determine the user's region.

[0182] Similarly, the second and third electronic devices can also determine their respective specific response areas based on their positional relationship. For example... Figure 11As shown in (b), the distance ZP between the second and third electronic devices is d8, and point L is the midpoint of ZP. The first electronic device can determine that ray LT is the boundary between the region (region B) where the second electronic device determines the response and the region (region E) where the third electronic device determines the response. When the second electronic device determines that the user's region is region B, it responds; when it determines that the user's region is region E, the first electronic device does not respond. Similarly, the third electronic device can also determine the user's region.

[0183] Since there are two or more electronic devices simultaneously, their response regions may overlap when they are dividing their respective regions. Therefore, the electronic devices can further refine the overlapping regions based on the distances between the overlapping regions and the individual electronic devices. For example... Figure 11 As shown in (c), the region formed by triangle KZP is the overlapping part of the response regions of the first electronic device, the second electronic device, and the third electronic device. Therefore, the region formed by the four points ZMGL can be divided into region DE based on the distances between points in this region and each electronic device. The distance from any point in this region to the third electronic device is less than the distance from that point to the first and second electronic devices. Similarly, regions DA and DB can be divided, but for simplicity, they will not be elaborated upon here.

[0184] In summary, such as Figure 11 As shown in (c), the first electronic device, the second electronic device, and the third electronic device can set ray GS, ray GN, and ray GT as boundaries to divide their respective response regions.

[0185] In this embodiment, multiple electronic devices determine their respective response areas by locating the positional relationship between them. When multiple electronic devices receive a user's voice command, they can determine the area to which the user belongs. When the user is in the response area of ​​a certain electronic device, that electronic device can respond directly, thus improving the user's voice interaction experience.

[0186] In the above embodiments, electronic devices can directly respond to user voice commands even without a master device by dividing their respective response areas. In this embodiment, the electronic devices can also directly respond to user voice commands even without a master device by setting a first preset condition. For example, ... Figure 12As shown in (a), the distance KP between the first electronic device and the second electronic device is measured to be d0, and O is the midpoint of KP. The first electronic device can set the distance d0 / 2 of KO as a preset distance. When the distance between the first electronic device and the seventh user is less than d0 / 2, it can be determined that the distance between the seventh user and the first electronic device is less than the distance between the seventh user and the second electronic device, thereby directly responding to the user's voice command.

[0187] In this embodiment of the application, when the electronic device measures that the distance between the user and the electronic device meets the preset conditions, it can directly respond to the user's voice command, saving the location determination step and improving the response speed.

[0188] Optionally, the first electronic device can also be set with a second preset condition to enable it to directly respond to the user's voice commands even without a master device. For example... Figure 12 As shown in (b), the first electronic device determines that the second electronic device is located due east of the first electronic device. When the first electronic device detects that the eighth user is located in a slightly west direction relative to the first electronic device, it can be determined that the distance between the eighth user and the first electronic device is less than the distance between the eighth user and the second electronic device, and the user's voice command can be directly responded to.

[0189] In this embodiment of the application, when the electronic device measures that the distance between the user and the electronic device meets the preset conditions, it can directly respond to the user's voice command, saving the distance judgment step and improving the response speed.

[0190] Optionally, the first electronic device may combine a first preset condition and a second preset condition. For example, such as... Figure 12 As shown in (c), the distance between the first electronic device and the ninth user is greater than d0 / 2, which does not meet the first preset condition. However, the ninth user is located in the west direction of the first electronic device, so the first electronic device can determine that the distance between the ninth user and the first electronic device is less than the distance between the first electronic device and the second electronic device, and can directly respond to the user's voice command.

[0191] The methods provided in the embodiments of this application above are described from the perspective of an electronic device as the executing entity. To implement the functions of the methods provided in the embodiments of this application above, the electronic device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.

[0192] This application also provides an electronic device, including: a processor, a memory, one or more sensors, a power button, an application program, and a computer program. The aforementioned devices can be connected via one or more communication buses. The one or more computer programs are stored in the memory and configured to be executed by the one or more processors. The one or more computer programs include instructions that can be used to cause the electronic device to perform various steps of the interface display methods described in the above embodiments.

[0193] For example, the processor described above can specifically be... Figure 2 The processor 110 shown above, the memory mentioned above can specifically be... Figure 2 The internal memory 120 shown and / or the external memory connected to the electronic device, the aforementioned display screen may specifically be... Figure 2 The display screen 130 shown above, the aforementioned sensor can specifically be... Figure 2 The power button can be one or more sensors in the sensor module 150 shown. Figure 2 The power button 141 is shown. This application embodiment does not impose any limitations on this.

[0194] As used in the above embodiments, depending on the context, the terms "when..." or "after..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrases "when..." or "if (the stated condition or event) is detected" can be interpreted as meaning "if...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0195] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)). Where there is no conflict, the solutions in the above embodiments can be used in combination.

Claims

1. A voice interaction response method, the method being applied to a first electronic device, characterized in that, The method includes: The first electronic device acquires the user's first voice command; The first electronic device determines the positional relationship between itself and the user based on the first voice command; The first electronic device determines whether to respond to the first voice command based on the positional relationship between the first electronic device and the user, and the positional relationship between the first electronic device and the second electronic device. If it is determined that a response is needed to the first voice command, the first electronic device responds to the first voice command and executes the response command; The positional relationship between the first electronic device and the second electronic device includes the distance information between the first electronic device and the second electronic device, and the positional relationship between the first electronic device and the user includes the distance information between the first electronic device and the user; The first electronic device determines whether to respond to the first voice command based on the location relationship between the first electronic device and the user, and the location relationship between the first electronic device and the second electronic device, including: The first electronic device determines a preset distance based on the distance information between itself and the second electronic device; The first electronic device determines whether to respond to the first voice command based on the distance information between the first electronic device and the user and the preset distance; When it is determined that a response to the first voice command is required, the first electronic device responds to the first voice command by executing a response command, including: If it is determined that the distance between the first electronic device and the user is less than the preset distance, the first electronic device determines to respond to the first voice command, and the first electronic device executes the response command in response to the first voice command.

2. The method according to claim 1, characterized in that, The preset distance is half the distance between the first electronic device and the second electronic device.

3. The method according to claim 1 or 2, characterized in that, The method further includes: If the first electronic device determines that it will respond to the first voice command, the second electronic device will not respond to the first voice command or execute the response command.

4. The method according to claim 1 or 2, characterized in that, The method further includes: The first electronic device does not determine whether to respond to the first voice command based on data or instructions sent by the second electronic device or other electronic devices.

5. The method according to claim 1 or 2, characterized in that, The method further includes: The first voice command includes a wake word for waking up the first electronic device and the second electronic device.

6. The method according to claim 1 or 2, characterized in that, The method further includes: The first electronic device includes a microphone array, which includes a plurality of microphones; The first electronic device determines the location relationship between itself and the user based on the first voice command, including: The first electronic device uses sound source localization technology to determine the positional relationship between the first electronic device and the user based on the phase information and time difference information of the first voice command received by the multiple microphones.

7. The method according to claim 1 or 2, characterized in that, The method further includes: The first electron includes an ultra-wideband antenna array; The first electronic device determines the location relationship between itself and the user based on the first voice command, including: After receiving the first voice command, the first electronic device determines the location relationship between the first electronic device and the user using ultra-wideband positioning technology.

8. The method according to claim 1 or 2, characterized in that, The method further includes: The first electronic device acquires the positioning signal of the second electronic device; The first electronic device determines the positional relationship between itself and the second electronic device based on the positioning signal.

9. An electronic device, characterized in that, The device includes one or more processors; one or more memories; said one or more memories storing one or more computer programs, said one or more computer programs including instructions that, when executed by said one or more processors, cause the electronic device to perform the method of any one of claims 1 to 8.

10. A computer program product, characterized in that, When run on a computer, the computer performs the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 8.