Device identification method and related apparatus

The device identification method uses a camera and wireless positioning to intuitively display and control nearby devices in augmented reality, addressing the complexity of existing interaction methods and enhancing user experience.

JP7537828B2Active Publication Date: 2024-08-21HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023507686
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-10-29
Filing Date
2021-08-05
Publication Date
2024-08-21
Estimated Expiration
2041-08-05

AI Technical Summary

Technical Problem

Existing methods for selecting and interacting with multiple electronic devices are complex, requiring users to navigate through menus, lists, or use technologies like NFC, which complicates the user experience.

Method used

A device identification method using a camera to capture and recognize nearby devices, combined with wireless positioning, displays intuitive labels and control interfaces in real-time augmented reality, simplifying the selection and interaction process.

Benefits of technology

This method enhances user experience by providing straightforward device identification and control, reducing operational complexity and improving interaction efficiency with multiple electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007537828000021
    Figure 0007537828000021
  • Figure 0007537828000039
    Figure 0007537828000039
  • Figure 0007537828000064
    Figure 0007537828000064
Patent Text Reader

Abstract

A device identification method and related apparatus are disclosed. The method includes: a first electronic device receives a first operation, displays a first interface, and activates a camera, causing the first interface to include a preview image captured by the camera, the preview image including a second electronic device; the first electronic device determines a display position of a first label of the second electronic device in the preview image according to image recognition and wireless positioning techniques, so that the first label is used to identify the second electronic device; and, upon detecting a user operation on the first label, outputs a second interface, causing the second interface to include one or more controls for controlling the second electronic device. In this application, correspondence between the first label and the second electronic device is presented in real time using an augmented reality display method, and interaction between the first electronic device and the second electronic device is performed using the first label, thereby implementing cooperative control between multiple devices and improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] TECHNICAL FIELD This application relates to the field of electronic technology, and in particular to device identification methods and related apparatus. [Background technology]

[0002] With the development of technology, smart interconnection devices are becoming more and more popular. A relatively large number of users own multiple electronic devices, such as smartphones, computers, smart TVs, tablets, and smart sound boxes. In addition, there may also be other electronic devices in the home, such as smart audio and video devices, routers / Wi-Fi boxes, smart vacuum cleaners, smart kitchen appliances, and smart lighting systems.

[0003] When a user needs to select one or more specific devices for interaction (e.g., control, pairing, data transmission, and projection), the user may find and select the target device(s) among multiple devices by using a menu / list, a map, NFC, etc. As a result, the user operation is relatively complicated. Summary of the Invention

[0004] The embodiments of the present application provide a device identification method and related apparatus, so as to intuitively display the identification information of nearby devices by using simple operations and provide interaction paths between devices, thereby implementing cooperative control between multiple devices and effectively improving user experience.

[0005] It should be noted that in the embodiments provided herein, there may be multiple possible implementations of the order in which the steps are performed, and some or all of the steps may be performed sequentially or in parallel.

[0006] According to a first aspect, the present application provides a device identification method applicable to a first electronic device equipped with a camera, the method including: receiving a first operation on the first electronic device; displaying a first interface in response to the first operation, the first interface including a preview image captured by the camera, the preview image including a second electronic device; obtaining first position information of the second electronic device relative to the first electronic device; determining a display position of a first label in the preview image based on the first position information and a display area of ​​the second electronic device in the preview image and displaying the first label at the display position, the first label being used to identify the second electronic device; receiving a second operation for the first label on the first electronic device; and displaying a second interface in response to the second operation, the second interface including one or more controls for controlling the second electronic device.

[0007] In an embodiment of the present application, a first electronic device receives a first operation, displays a first interface, activates a camera, and displays an image captured by the camera in real time on the first interface. The first electronic device identifies the electronic device in the image and the device type of the electronic device, for example, a second electronic device (e.g., a sound box, a computer, or a tablet computer) according to an image recognition technology. Furthermore, the first electronic device obtains location information of the second electronic device relative to the first electronic device according to a wireless positioning technology (e.g., UWB positioning, Bluetooth positioning, Wi-Fi positioning, etc.), where the location information includes one or more of distance, direction, or angle. The first electronic device determines a display position of a first label of the second electronic device in the preview image based on the location information, where the first label is used to identify the second electronic device, for example, to identify the device name or device type of the second electronic device, and the display position of the first label is related to the display position of the second electronic device. When the first electronic device detects a user operation for the first label, the first electronic device outputs a second interface, where the second interface includes one or more controls for controlling the second electronic device, and the second interface may be overlaid on the first interface for display, or the electronic device may jump from the first interface to display the second interface. In this application, the correspondence between the first label and the second electronic device is presented in real time in an augmented reality display manner, and the interaction between the first electronic device and the second electronic device is performed by using the first label, thereby implementing cooperative control between multiple devices and improving the user experience.

[0008] In some possible implementations, the first electronic device obtaining first position information of the second electronic device relative to the first electronic device specifically includes: the first electronic device broadcasting a detection request, the detection request including an identification of the first electronic device; and, when the first electronic device receives a detection response transmitted by the second electronic device based on the detection request, the first electronic device determining first position information of the second electronic device and the first electronic device based on the detection response, the detection response including the identification of the second electronic device. Thus, the first position information includes the relative position of the second electronic device relative to the first electronic device, such as a distance, direction, or angle. The first electronic device may calculate the distance between the second electronic device and the first electronic device (the distance is equal to the time difference multiplied by the propagation speed of electromagnetic waves) based on the time difference between transmitting the detection request and receiving the detection response. The first electronic device may calculate the angle of arrival of the detection response based on the detection response, and then determine the azimuth angle of the second electronic device relative to the first electronic device.

[0009] Optionally, the detection response includes the identification and first location information of the second electronic device. The first electronic device determines the first location information of the second electronic device and the first electronic device based on the detection response. Specifically, the second electronic device calculates the relative position of the second electronic device with respect to the first electronic device based on the received detection request. The detection request includes a transmission time. The second electronic device determines a time difference based on the transmission time and the time the second electronic device receives the detection request to calculate the distance between the second electronic device and the first electronic device. The second electronic device may calculate the angle of arrival of the detection request based on the received detection request, and then determine the azimuth angle of the second electronic device with respect to the first electronic device. The second electronic device transmits a detection response to the first electronic device. The detection response includes the identification and first location information of the second electronic device.

[0010] In some possible implementations, the display position of the first label in the preview image partially or completely overlaps with the display area of ​​the second electronic device in the preview image, and the first label may be displayed in the display area of ​​the second electronic device, at an edge of the display area of ​​the second electronic device, or at a position close to the display area of ​​the second electronic device.

[0011] In some possible implementations, the method further includes: the first electronic device obtaining second position information of the third electronic device relative to the first electronic device; the first electronic device detecting that the third electronic device is not included in the preview image and determining, based on the second position information, that the third electronic device is within a viewfinder range of the camera; and the first electronic device determining, based on the second position information, a display position of a second label in the preview image, wherein the second label is used to indicate one or more of the following: identification information of the third electronic device, occlusion of the third electronic device, and the second position information. Thus, when the first electronic device detects that the relative position of the third electronic device is within the viewfinder range of the camera but the preview image does not include an image of the third electronic device, the first electronic device determines that the third electronic device is occluded and outputs a second label of the third electronic device to indicate one or more of the identification information of the third electronic device, occlusion, and the occluded position in the preview image.

[0012] In some possible implementations, the method further includes: the first electronic device detecting that the third electronic device is not included in the preview image and determining, based on the second position information, that the third electronic device is not within the viewfinder range of the camera; and the first electronic device determining, based on the second position information, a display position of a third label in the preview image, wherein the third label is used to indicate one or more of the following: identification information of the third electronic device and the second position information. Thus, when the first electronic device detects that the relative position of the third electronic device is outside the viewfinder range of the camera and the preview image does not include an image of the third electronic device, the first electronic device determines that the third electronic device is not within the viewfinder frame and outputs a second label of the third electronic device to indicate one or more of the identification information of the third electronic device and its relative position (direction, angle, distance, etc.) with respect to the first electronic device.

[0013] In some possible implementations, the preview image includes an image of the fourth electronic device. After the first electronic device displays the first interface, the method further includes the first electronic device determining, based on the preview image, that the device type of the fourth electronic device is a first type; determining, among electronic devices associated with or connected to the first electronic device, a first target device having a device type of the first type; and displaying a fourth label by the first electronic device, the fourth label being used to indicate that the image of the fourth electronic device is associated with the first target device. Thus, if the first electronic device cannot detect the location information of the fourth electronic device and the image of the fourth electronic device is in the preview image, the first electronic device identifies the device type of the fourth electronic device according to image recognition technology and detects whether a target device of that device type is among devices logged in to the same account (e.g., a Huawei account) as the first electronic device. If so, the first electronic device considers the target device to be the fourth electronic device and outputs a fourth label identifying the target device.

[0014] In some possible implementations, the preview image includes an image of a fifth electronic device, and after the first electronic device displays the first interface, the method includes: the first electronic device determines, based on the preview image, that the device type of the fifth electronic device is a second type; the first electronic device obtains third location information of the first electronic device, and the first electronic device stores a correspondence between the electronic device and the location information; and the first electronic device determines, based on the correspondence and the third location information, that the device type is No. 2The method further includes determining a second target device of the fifth electronic device type, where the location information of the target device is the same as the third location information, and the first electronic device displaying a fifth label, where the fifth label is used to indicate that the image of the fifth electronic device is associated with the second target device. Thus, if the first electronic device cannot detect the location information of the fifth electronic device and the image of the fifth electronic device is in the preview image, the first electronic device stores correspondences between electronic devices and location information (e.g., a smart sound box and a living room, a smart desk lamp and a bedroom, a computer and an office, etc.), so the first electronic device identifies the device type of the fifth electronic device based on the current geographic location of the first electronic device using image recognition technology, and then detects whether a target device of that device type exists among devices in the same geographic location as the first electronic device. If so, the first electronic device determines that the target device is the fifth electronic device and outputs a fifth label identifying the target device.

[0015] In some possible implementations, the first user interface further includes a first icon, the first icon being associated with data to be shared, and the method further includes the first electronic device receiving a third operation, the third operation being an operation for the first label and / or the first icon, and the first electronic device transmitting the data to be shared to the second electronic device in response to the third operation. The third operation includes, but is not limited to, a drag operation, a tap operation, etc. A data sharing method is provided, in which a second electronic device that needs to be shared is selected in the first interface, and the data to be shared is transmitted to the second electronic device. This simplifies user operations for data sharing, intuitively displays device information, and improves user experience.

[0016] In some possible implementations, before the first electronic device receives the third operation, the method further includes the first electronic device displaying a first label in a first display format in the first interface based on a data type of the data to be shared. The first label in the first display format is used to prompt a user that the second electronic device supports output of the data to be shared. The first display format may be highlighting (changing brightness, color, etc.) a display area of ​​the first label.

[0017] In some possible implementations, the preview image includes an image of a third electronic device and a third label, the third label being associated with the third electronic device, and the method is for the first electronic device to undergo a fourth operation, the fourth operation being 3 Label and / or 1 and the first electronic device outputting a prompt message in response to the fourth operation, the prompt message being used to prompt a user that the third electronic device does not support output of the data to be shared.

[0018] According to a second aspect, the present application provides an electronic device including one or more processors and a memory, the memory including computer instructions, the electronic device being configured to, when the one or more processors invoke the computer instructions, perform the following: an action of receiving a first operation; an act of displaying a first interface in response to a first operation, the first interface including a preview image captured by a camera, the preview image including a first target device; obtaining first relative position information of a first target device; an operation of determining a display position of a first label in a preview image based on the first relative position information and determining a display position of a first target device in the preview image, wherein the first label is used to indicate identification information of the first target device; receiving a second operation for the first label; and displaying a second interface in response to a second operation, the second interface including one or more controls for controlling the first target device. can be executed.

[0019] In an embodiment of the present application, the first electronic device receives an operation, displays an interface, activates a camera, and displays an image captured by the camera in the interface in real time. The electronic device identifies the electronic device in the image and the device type of the electronic device, for example, the first target device (e.g., a sound box, a computer, or a tablet computer) according to image recognition technology. Furthermore, the electronic device obtains location information of the first target device relative to the electronic device according to wireless positioning technology (e.g., UWB positioning, Bluetooth positioning, Wi-Fi positioning, etc.), where the location information includes one or more of distance, direction, or angle. The electronic device determines a display position of a label of the first target device in the preview image based on the location information, where the label is used to identify the first target device, for example, to identify the device name or device type of the first target device, and the display position of the label is related to the display position of the first target device. When the electronic device detects a user operation for the label, the electronic device outputs a second interface, where the second interface includes one or more controls for controlling the first target device, and the second interface may be overlaid on the interface for display, or the electronic device may jump from the interface to display the second interface. In this application, the correspondence between the first label and the first target device is presented in the first interface of the electronic device in real time in an augmented reality display manner, and the interaction between the electronic device and the first target device is performed by using the first label, thereby implementing cooperative control between multiple devices and improving the user experience.

[0020] In some possible implementations, when one or more processors invoke the computer instructions, the electronic device can perform an operation of obtaining first relative position information of a first target device, the operation particularly including: broadcasting a detection request, the detection request including an identification of the electronic device; and, when a detection response sent by the first target device based on the detection request is received, determining first relative position information of the first target device based on the detection response, the detection response including the identification of the first target device.

[0021] Optionally, the detection response includes identification and first relative position information of the first target device. The electronic device determines first relative position information, such as the distance, direction, or angle of the first target device relative to the electronic device, based on the detection response. Specifically, the first target device calculates the relative position of the first target device relative to the electronic device based on the received detection request. The detection request includes a transmission time. The first target device determines a time difference based on the transmission time and the time when the first target device receives the detection request, and calculates the relative position of the first target device. and electricity The first target device may calculate the distance between the first target device and the child device based on the received detection request, and then determine the azimuth angle of the first target device relative to the electronic device. The first target device may send a detection response to the electronic device, the detection response including the identification of the first target device and the first relative position information.

[0022] In some possible implementations, the display position of the first label in the preview image partially or completely overlaps the display position of the first target device in the preview image, and the first label may be displayed in the display area of ​​the first target device, at an edge of the display area of ​​the first target device, or at a position close to the display area of ​​the first target device.

[0023] In some possible implementations, when one or more processors invoke the computer instructions, the electronic device performs the following operations: obtain second relative position information of a second target device; , th detecting that a second target device is not included in the preview image and determining that a second target device is within a viewfinder range of the camera based on second relative position information; , th and an operation of determining a display position of a second label in the preview image based on the second relative position information, wherein the second label is used to indicate one or more of the following information: identification information of the second target device, occlusion of the second target device, and second relative position information.

[0024] In some possible implementations, when one or more processors invoke a computer instruction, the electronic device: , th detecting that a second target device is not included in a preview image and determining, based on second relative position information, that the second target device is not within the viewfinder range of the camera; , th and an operation of determining a display position of a third label in the preview image based on the second relative position information, wherein the third label is used to indicate one or more of the following: identification information of the second target device and the second relative position information.

[0025] In some possible implementations, the preview image includes an image of a third target device, and when one or more processors invoke computer instructions, after the electronic device can perform the operation of displaying the first interface, the electronic device can further perform the following operations: determining, based on the preview image, that the device type of the third target device is a first type; determining identification information of devices associated with or coupled to the electronic device that have a device type of the first type; and displaying a fourth label, where the fourth label is used to indicate that the image of the third target device is associated with the identification information.

[0026] In some possible implementations, the preview image includes an image of the fourth target device, and when the one or more processors invoke the computer instructions, after the electronic device can perform the operation of displaying the first interface, the electronic device next performs an operation of determining, based on the preview image, that the device type of the fourth target device is a second type; and an operation of obtaining location information of the electronic device, wherein the electronic device stores a correspondence between the electronic device and the location information. ,versus Based on the response and third location information, the device type is 2 The method may further perform the operations of determining an identity of the device that is a type, and displaying a fifth label, the fifth label used to indicate that the image of the fourth target device is associated with the identity.

[0027] In some possible implementations, the first interface further includes a first icon, the first icon being associated with data to be shared, and when the one or more processors invoke the computer instructions, the electronic device can further perform the following operations: receiving a third operation, the third operation being an operation for the first label and / or the first icon; and transmitting the data to be shared to the first target device in response to the third operation. The third operation includes, but is not limited to, a drag operation, a tap operation, etc. A data sharing method is provided, in which a first target device that needs to be shared is selected in the first interface, and the data to be shared is transmitted to the first target device. This simplifies user operations for data sharing, intuitively displays device information, and improves user experience.

[0028] In some possible implementations, when the one or more processors invoke the computer instructions, before the electronic device can perform the operation of receiving the third operation, the electronic device can further perform the operation of displaying a first label in a first display format in the first interface based on a data type of the data to be shared, where the first label in the first display format is used to prompt a user that the first target device supports output of the data to be shared. The first display format can be to highlight (change brightness, color, etc.) a display area of ​​the first label.

[0029] In some possible implementations, the preview image includes an image of a second target device and a third label, the third label being associated with the second target device, and the electronic device is operable to undergo a fourth operation when the one or more processors invoke the computer instructions, the fourth operation being: 3 Label and / or 1The method may further perform an operation, which is an operation for the icon, and an operation of outputting a prompt message in response to the fourth operation, the prompt message being used to prompt the user that the second target device does not support output of the data to be shared.

[0030] According to a third aspect, the present application provides a photo sharing method applicable to a first electronic device, the method including: displaying a photo-taking preview interface of the first electronic device, the photo-taking preview interface including a thumbnail of a first photo and a preview image captured by a camera of the first electronic device; identifying a sixth electronic device included in the preview image; determining a relative position of the sixth electronic device with respect to the first electronic device; displaying a label of the sixth electronic device in the preview image based on the identified sixth electronic device and its relative position, the label being used to identify the sixth electronic device; receiving a fifth operation on the thumbnail of the first photo; and, in response to the fifth operation, moving the thumbnail of the first photo to a display area of ​​the sixth electronic device identified by the label in the preview image; and transmitting the first photo to the sixth electronic device.

[0031] In an embodiment of the present application, the camera application main interface that is displayed after a user taps the camera application icon may be referred to as a "photography preview interface," and the image presented in the photography preview interface may be referred to as a "preview picture" or "preview image."

[0032] It should be understood that in the embodiment of the present application, the photo-taking preview interface may display an interface including a preview image, a photo-taking shutter button, a local album icon, a camera switching icon, etc. If the display content in the interface changes, for example, an identified device label is displayed, the interface may still be referred to as a photo-taking preview interface. Details will not be described again later.

[0033] It should be noted that the preview image may be acquired by the front camera or the rear camera of the mobile phone. The camera that takes the photo is not limited in the embodiment of the present application. For example, a portrait photo is acquired by the front camera of the mobile phone. When a user needs to identify the electronic device by using the rear camera, the user may tap a camera switching button to switch. Alternatively, a portrait photo is acquired by the rear camera of the mobile phone. When a user needs to identify the electronic device by using the front camera, the user may tap a camera switching button to switch. This is not limited in the embodiment of the present application.

[0034] In the above implementation, the mobile phone may determine in advance the electronic devices included in the preview image, and when the user enables the photo sharing function, the mobile phone may immediately display the identified electronic device names in the interface to speed up the mobile phone's identification of objects in the preview image. For example, after the mobile phone identifies the sixth electronic device included in the current preview image, the user may drag the thumbnail of the first photo to the sixth electronic device to be shared according to the user's requirements.

[0035] For the above implementation process, it should be understood that the mobile phone may detect and identify other electronic devices included in the preview image in multiple different ways, such as image detection, 3D scanning technology, and machine vision, etc. The manner in which the mobile phone identifies other electronic devices in the preview image is not limited in the embodiments of the present application.

[0036] In a possible implementation, the thumbnail of the first photo may be a local album icon, for example, the local album icon displays the most recent first photo taken by the user.

[0037] In other possible implementations, the thumbnail of the first photo may have the same format or appearance as the local album icon, and the thumbnail of the first photo is displayed above the photo taking preview interface in a floating manner. With reference to the third aspect and the above implementations, in some implementations of the third aspect, the method further includes receiving a sixth operation on the album icon, and displaying the thumbnail of the first photo above the photo taking preview interface in a floating manner in response to the sixth operation.

[0038] With reference to the third aspect and the above implementations, in some implementations of the third aspect, the fifth operation is a drag operation on the thumbnail of the first photo, and the sixth operation is a long press operation on the local album icon.

[0039] In the above method, the long press operation is used as an example to describe the operation of a user long pressing a local album icon to trigger a photo sharing process. In the embodiment of the present application, the photo sharing process provided in the embodiment of the present application may alternatively be triggered by using other preset operations, or the mobile phone may be triggered by using other preset operations to identify the electronic device in the preview image, for example, the preset operations are not limited to long pressing a local album icon, double tapping a local album icon, or drawing a fixed pattern in the photo taking preview interface. This is not limited in the embodiment of the present application.

[0040] With reference to the third aspect and the implementations described above, in some implementations of the third aspect, the label of the sixth electronic device is used to identify the name of the sixth electronic device, and / or the label of the sixth electronic device is used to identify the location of the sixth electronic device.

[0041] In an embodiment of the present application, after identifying the sixth electronic device included in the preview image, the mobile phone may determine a position for displaying a label for the sixth electronic device based on the display position of the sixth electronic device in the current preview image. In a possible aspect, the mobile phone may display the label for the sixth electronic device in the area where the sixth electronic device is located in the preview image.

[0042] Optionally, the label of the sixth electronic device may be displayed in an area near the positioning device of the sixth electronic device. Alternatively, the label of the sixth electronic device may be displayed in a blank area in the preview image so as not to obscure other objects in the preview image.

[0043] The icon display method described above can mark the identified electronic device without blocking other objects in the preview image, which does not affect the user's vision and visual recognition and improves the user experience.

[0044] According to the above method, in the process of taking a photo, the user can use the preset operation to enable the device identification function and positioning function of the mobile phone, and refer to the identification function and positioning function of the mobile phone to identify other electronic devices included in the preview image of the camera. The user can directly drag the photo to be shared to the area where the other electronic devices are located to immediately share the photo with other surrounding electronic devices. In this process, the operation procedure for sharing photos is simplified, the time required to share photos is shortened, and the user experience is improved.

[0045] With reference to the third aspect, in some implementations of the third aspect, the first electronic device includes a first positioning chip, and the sixth electronic device includes a second positioning chip, and identifying the sixth electronic device included in the preview image and determining a relative position of the sixth electronic device with respect to the first electronic device includes identifying the sixth electronic device included in the preview image and determining a relative position of the sixth electronic device with respect to the first electronic device based on the first positioning chip, the second positioning chip, and the preview image, The first positioning chip includes at least one of a Bluetooth positioning chip and an ultra-wideband UWB positioning chip, and the second positioning chip includes at least one of a Bluetooth positioning chip and an ultra-wideband UWB positioning chip.

[0046] In an embodiment of the present application, the mobile phone may identify other electronic devices in the preview image and locate the position of the other electronic devices by using a number of possible positioning techniques. Optionally, the positioning techniques in an embodiment of the present application may include Bluetooth-based wireless sensing positioning, ultra-wideband (UWB), and the like. - The positioning method may include one of the following technologies: wireless sensing positioning based on ultra-wideband (UWB) sensing, and computer vision-based positioning, or a combination of the above-listed positioning technologies, or even other positioning technologies. The method for positioning other electronic devices by a mobile phone is not limited to the embodiments of the present application.

[0047] With reference to the third aspect and the above implementations, in some implementations of the third aspect, the photo-taking preview interface further includes a photo-taking shutter button, and the method further includes receiving a seventh operation on the photo-taking shutter button and taking the first photograph in response to the seventh operation.

[0048] Optionally, in the method, when a user takes a photo by using a camera application, the user may directly share the first photo taken most recently with other devices, or may share the first photo with the most recent date in a local album with other devices.

[0049] With reference to the third aspect and the above implementations, in some implementations of the third aspect, before the photo taking preview interface displays the thumbnail of the first photo, the method may include: receiving an eighth operation; 8 a ninth operation; and a ninth operation. In response to the operation, displaying a photo list in the photo taking preview interface, the photo list including a first photo and a plurality of second photos, the second photos being located before the data of the first photo. 9and selecting at least one second photograph from the list of photographs in response to the operation. After moving the thumbnail of the first photograph to a display area of ​​the sixth electronic device identified by a label in the preview image, the method further includes transmitting the first photograph and the selected at least one second photograph to the sixth electronic device.

[0050] With reference to the third aspect and the above implementations, in some implementations of the third aspect, the eighth operation is a slide operation along a preset direction by using a local album icon as a starting point, and the ninth operation is a tap operation.

[0051] According to the above method, during the photo-taking process, the user can use the preset operation to enable the device identification function and positioning function of the mobile phone, and refer to the device identification function and positioning function of the mobile phone to identify other electronic devices included in the camera preview image. The user can select multiple photos to be shared and directly move the multiple photos to be shared to the area where the other electronic devices are located in order to immediately share the photos with other surrounding electronic devices. In this process, the operation procedure for sharing photos is simplified, the time required for sharing photos is shortened, and the user experience is improved.

[0052] When possible, the photos in the photo list may be arranged according to the user's photographic order, e.g., the first photo is the most recent photo taken by the user, and the second photo was taken before the first photo.

[0053] Alternatively, the photos in the photo list may be arranged in other possible arrangement orders. For example, if it is detected that the photo was taken at a company, the photos taken at the company may be displayed in the photo list. This is not a limitation of the embodiment of the present application.

[0054] When possible, after a user triggers the display of a photo list in the interface by using a swipe-up operation, the first photo in the photo list may be selected by default. If the user does not expect to share the first photo, the user may tap the selection box in the lower right corner of the first photo to cancel the selection of the first photo. Similarly, if the user expects to share the first photo and at least one second photo, the user may tap the selection box in the lower right corner of each second photo to select multiple photos to be shared. Details will not be described again here.

[0055] Optionally, in the embodiment of the present application, the process of sharing multiple photos provided in the embodiment of the present application may be triggered by using other preset operations, or the mobile phone may be triggered by using other preset operations to identify the electronic device in the preview image, for example, the preset operations are not limited to selecting a local album icon and dragging it upward, double-tapping a local album icon, or drawing a fixed pattern in the photo taking preview interface, which is not limited in the embodiment of the present application.

[0056] With reference to the third aspect and the above implementations, in some implementations of the third aspect, when a thumbnail of the first photo is moved to a display area of ​​a sixth electronic device identified by a label, a display effect of the label of the sixth electronic device changes, where the display effect includes one or more of a color, a size, or an animation effect of the label of the sixth electronic device.

[0057] Specifically, the user may drag the thumbnail of the first photo to the location of the sixth electronic device and then release the thumbnail. To prompt the user to share the currently taken first photo with the sixth electronic device identified in the preview image, the icon of the sixth electronic device may be presented in a different color or display other dynamic effects such as changing size, jumping, and blinking.

[0058] Alternatively, in the process of the user dragging the thumbnail of the first photo, a reminder control may be further displayed on the preview image. For example, the reminder control may be an arrow, etc., which may be statically displayed, jump, or blink to prompt the user to drag the thumbnail of the first photo to the position identified by the arrow to perform the photo sharing function. The display manner of the reminder control is not limited to the embodiment of the present application.

[0059] With reference to the third aspect and the above implementations, in some implementations of the third aspect, when the sixth electronic device is occluded in the preview image or when it is detected that the sixth electronic device is located outside the range corresponding to the preview image, the method further includes displaying prompt information in the photo-taking preview interface, wherein the prompt information is used to prompt the user to position the sixth electronic device so that the sixth electronic device is displayed in the preview image of the first electronic device, or the prompt information is used to prompt the user to adjust the position of the first electronic device.

[0060] It should be noted that the mobile phone may communicate with other nearby electronic devices in multiple possible ways, such as Bluetooth and wireless fidelity (Wi-Fi) modules. In this case, the mobile phone may detect nearby electronic devices. Alternatively, the mobile phone may determine that other nearby electronic devices are present by using wireless positioning technology, such as UWB, and identify the type of the electronic device, and display the type of the electronic device in the photo preview interface. In the embodiments of the present application, the communication interaction method and connection establishment method between the mobile phone and other nearby electronic devices are not limited.

[0061] According to the above method, when the mobile phone identifies that there is another electronic device in the preview image and the electronic device is blocked by an obstacle, in the process of sharing the photo by the user, reminder information such as text or an icon may be displayed on the photo-taking preview interface to prompt the user to locate the blocked electronic device, and the user can further share the taken photo with the location of the blocked electronic device immediately. In this way, a possible way for the user to share photos with the blocked electronic device is provided, and the operation steps of sharing photos by the user are simplified.

[0062] In a possible scenario, the mobile phone may use wireless positioning technology to identify that the sixth electronic device is nearby and the sixth electronic device is not displayed in the mobile phone's current preview image. For this scenario, in an embodiment of the present application, reminder information may be further displayed in the photo-taking preview interface to remind the user that the sixth electronic device is in a specific orientation.

[0063] Optionally, in the embodiment of the present application, in addition to the text reminder in the reminder window, an icon reminder may also be included. For example, in addition to the reminder window, the photo-taking preview interface of the mobile phone may further include an icon, such as a statically displayed arrow, a dynamically blinking arrow, or a jumping arrow, that marks the position of the sixth electronic device that is obstructed.

[0064] Alternatively, in another possible manner, the user may rotate the orientation of the mobile phone based on the reminder information in the interface, so that the camera of the mobile phone can acquire the detected sixth electronic device and display the sixth electronic device with which the user should share photos in the preview image, so that the taken photos can be immediately shared with other electronic devices according to the above method.

[0065] The mobile phone may identify that there is another electronic device nearby by using wireless positioning technology, and if the electronic device is not displayed in the mobile phone's current preview image, for this scenario, in an embodiment of the present application, reminder information may be further displayed in the photo-taking preview interface to remind the user that another electronic device is present in a certain direction.

[0066] In summary, according to the photo sharing method provided in the embodiment of the present application, in the process of taking a photo or running a camera application, a user can enable the device identification function and positioning function of the electronic device by using a preset operation. In addition, other electronic devices included in the camera's preview image are identified based on the identification function and positioning function of the electronic device. The user can select one or more photos to be shared by using a shortcut operation and directly drag the one or more photos to be shared to the area where the other electronic devices are located to immediately share the one or more photos with other surrounding electronic devices. In addition, in the embodiment of the present application, a user-friendly interaction interface is provided to the user for multiple scenarios, such as a scenario where other electronic devices are obstructed in the preview image, so that the user can share one or more photos by using a shortcut operation. In this process, the operation procedure for sharing photos is simplified, the time for sharing photos is shortened, and the user experience is improved.

[0067] According to a fourth aspect, there is provided a first electronic device including a processor and a memory, wherein the memory stores one or more instructions, which, when executed by the processor, can cause the first electronic device to perform the following steps: displaying a photo-taking preview interface of the first electronic device, the photo-taking preview interface including a thumbnail of the first photograph and a preview image captured by a camera of the first electronic device; identifying a sixth electronic device included in the preview image; determining a relative position of the first electronic device with respect to the first electronic device; displaying a label of the sixth electronic device in the preview image based on the identified sixth electronic device and its relative position; receiving a fifth operation on the thumbnail of the first photograph; and, in response to the fifth operation, moving the thumbnail of the first photograph to a display area of ​​the sixth electronic device identified by the label in the preview image; and transmitting the first photograph to the sixth electronic device.

[0068] With reference to the fourth aspect, in some implementations of the fourth aspect, the first electronic device includes a first positioning chip, and the sixth electronic device includes a second positioning chip, and when the one or more instructions are executed by a processor, the first electronic device can perform the following steps: identifying a sixth electronic device included in the preview image based on the first positioning chip, the second positioning chip, and the preview image; and determining a relative position of the sixth electronic device with respect to the first electronic device. The first positioning chip includes at least one of a Bluetooth positioning chip and an ultra-wideband UWB positioning chip, and the second positioning chip includes at least one of a Bluetooth positioning chip and an ultra-wideband UWB positioning chip.

[0069] With reference to the fourth aspect and the above implementations, in some implementations of the fourth aspect, the photo taking preview interface includes an album icon, and when the one or more instructions are executed by the processor, the first electronic device can perform the following steps: receiving a sixth operation on the album icon; and, in response to the sixth operation, displaying a thumbnail of the first photo above the photo taking preview interface in a floating manner.

[0070] With reference to the fourth aspect and the above implementations, in some implementations of the fourth aspect, the fifth operation is a drag operation on the thumbnail of the first photo, and the sixth operation is a long press operation on the local album icon.

[0071] With reference to the fourth aspect and the above implementations, in some implementations of the fourth aspect, the photo-taking preview interface further includes a photo-taking shutter button, and when the one or more instructions are executed by the processor, the first electronic device can perform the following steps: receiving a seventh operation on the photo-taking shutter button; and taking a first photograph in response to the seventh operation.

[0072] With reference to the fourth aspect and the implementations described above, in some implementations of the fourth aspect, when the one or more instructions are executed by the processor, the first electronic device undergoes an eighth operation: 8 a step of displaying a photo list in a photo taking preview interface in response to the operation, the photo list including a first photo and a plurality of second photos, the second photos being located before the data of the first photo; a ninth step of receiving the operation; 9 and selecting at least one second photograph from the photograph list in response to the operation, and after moving a thumbnail of the first photograph to a display area of ​​the sixth electronic device identified by a label in the preview image, the first photograph and the selected at least one second photograph are transmitted to the sixth electronic device.

[0073] With reference to the fourth aspect and the above implementations, in some implementations of the fourth aspect, the eighth operation is a slide operation along a preset direction by using a local album icon as a starting point, and the ninth operation is a tap operation.

[0074] With reference to the fourth aspect and the implementations described above, in some implementations of the fourth aspect, the label of the sixth electronic device is used to identify the name of the sixth electronic device, and / or the label of the sixth electronic device is used to identify the location of the sixth electronic device.

[0075] With reference to the fourth aspect and the above implementations, in some implementations of the fourth aspect, when a thumbnail of the first photo is moved to a display area of ​​a sixth electronic device identified by a label, a display effect of the label of the sixth electronic device changes, where the display effect includes one or more of a color, a size, or an animation effect of the label of the sixth electronic device.

[0076] With reference to the fourth aspect and the above implementations, in some implementations of the fourth aspect, when the sixth electronic device is occluded in the preview image, when the one or more instructions are executed by the processor, the first electronic device is further configured to perform a next step of displaying prompt information in a photo-taking preview interface, wherein the prompt information is used to prompt a user to position the sixth electronic device so that the sixth electronic device is displayed in the preview image of the first electronic device, or the prompt information is used to prompt a user to adjust the position of the first electronic device.

[0077] According to a fifth aspect, an embodiment of the present application provides a computer storage medium comprising computer instructions, which, when executed on an electronic device, enable the electronic device to perform a method according to any possible implementation of the above aspects.

[0078] According to a sixth aspect, an embodiment of the present application provides a computer program product, which, when run on a computer, enables the computer to perform a method according to any possible implementation of the above aspects. [Brief explanation of the drawings]

[0079] [Figure 1] FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application. [Figure 2] 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application; [Figure 3] FIG. 2 is a schematic diagram of the structure of another electronic device according to an embodiment of the present application. [Figure 4] 1 is a schematic diagram of a scenario of a device identification method according to an embodiment of the present application; [Figure 5A] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 5B] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 5C] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 5D] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 5E] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 5F] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 5G] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 5H] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 6A] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 6B] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 7A]FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 7B] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 7C] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 8A] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 8B] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 8C] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 8D] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 8E] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 9A] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 9B] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 9C] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 9D] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 9E] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 10A] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 10B] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 10C] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 11A] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 11B]FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 11C] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 11D] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 12A] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 12B] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 12C] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 12D] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 12E] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 12F] FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application. [Figure 13(a)] FIG. 1 is a schematic diagram of an example graphical user interface of a photo sharing process. [Figure 13(b)] FIG. 1 is a schematic diagram of an example graphical user interface of a photo sharing process. [Figure 13(c)] FIG. 1 is a schematic diagram of an example graphical user interface of a photo sharing process. [Figure 13(d)] FIG. 1 is a schematic diagram of an example graphical user interface of a photo sharing process. [Figure 13(e)] FIG. 1 is a schematic diagram of an example graphical user interface of a photo sharing process. [Figure 14(a)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 14(b)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 14(c)]FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 14(d)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 14(e)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 15(a)] FIG. 10 is a schematic diagram of a graphical user interface of another example of a photo sharing process according to an embodiment of the present application. [Figure 15(b)] FIG. 10 is a schematic diagram of a graphical user interface of another example of a photo sharing process according to an embodiment of the present application. [Figure 15(c)] FIG. 10 is a schematic diagram of a graphical user interface of another example of a photo sharing process according to an embodiment of the present application. [Figure 15(d)] FIG. 10 is a schematic diagram of a graphical user interface of another example of a photo sharing process according to an embodiment of the present application. [Figure 16] FIG. 2 is a schematic diagram of an example graphical user interface for receiving photos according to an embodiment of the present application; [Figure 17(a)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 17(b)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 17(c)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 17(d)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 17(e)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 17(f)] FIG. 2 is a schematic diagram of an example graphical user interface of a photo sharing process according to an embodiment of the present application. [Figure 18] FIG. 10 is a schematic diagram of another example graphical user interface of photo reception according to an embodiment of the present application; [Figure 19A] 1 is a simplified flowchart of an example of a photo sharing method according to an embodiment of the present application. [Figure 19B] 1 is a simplified flowchart of an example of a photo sharing method according to an embodiment of the present application. [Figure 20] 1 is a flowchart of a positioning method according to an embodiment of the present application. [Figure 21] 1 is a schematic diagram illustrating the principle of a positioning method according to an embodiment of the present application; [Figure 22] 1 is a schematic flowchart of a device identification method according to an embodiment of the present application; [Figure 23] FIG. 1 is a schematic diagram of a software architecture according to an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION

[0080] The following describes the technical solutions of the embodiments of the present application with reference to the accompanying drawings. In the description of the embodiments of the present application, unless otherwise stated, " / " indicates "or." For example, A / B may indicate A or B. The term "and / or" in this specification simply describes an association relationship describing related objects, and indicates that three relationships may exist. For example, A and / or B may indicate the following three cases: only A exists, both A and B exist, or only B exists. Furthermore, in the description of the embodiments of the present application, "plurality of" means two or more.

[0081] The following terms "first" and "second" are intended merely for descriptive purposes and should not be understood as an indication or implication of the relative importance of the identified technical features or an implicit indication of the number of identified technical features. Thus, features qualified by "first" and "second" may explicitly or implicitly include one or more features. In the description of embodiments of the present application, unless otherwise stated, "plurality" means two or more than two.

[0082] An embodiment of the present application provides a device identification method based on augmented reality. Augmented reality (AR) is a method of overlaying virtual information and a real environment in the same image or space by using computer graphics and visualization technologies that incorporate three-dimensional display technology, interaction technology, sensor technology, computer vision technology, multimedia technology, etc.

[0083] In the provided method, the electronic device 100 enters a first interface, activates a camera, displays an image captured by using the camera in real time in the first interface, and sends a detection request using wireless positioning technology. Based on the received detection response to the detection request, the electronic device 100 determines devices near the electronic device 100, device names of the nearby devices, device types of the nearby devices, and physical distances and angles between the nearby devices and the electronic device 100. The electronic device 100 performs image recognition on the image captured by the camera to identify the electronic device in the image and its device type (e.g., sound box, computer, or tablet computer). Based on the physical distance and angle between the nearby device and the electronic device 100, the electronic device 100 determines a display area of ​​the image of the nearby device in the first interface. 100displays a device icon in the first interface in real time in an augmented reality display manner. The device icon may be used by the electronic device 100 to interact with a nearby device. For example, the electronic device 100 detects a user operation for the device icon, and in response to the user operation, the electronic device 100 outputs a control interface for the nearby device corresponding to the device icon. According to the method, an interaction between the electronic device and the nearby device is performed, and the correspondence between the device icon and the device is presented in real time in an augmented reality display manner, thereby improving the user experience.

[0084] In this application, device icons may alternatively be referred to as device labels.

[0085] The following describes a communication system provided in an embodiment of the present application.

[0086] 1 is a schematic diagram of an example of a communication system 10 according to an embodiment of the present application. As shown in FIG. 1, the communication system 10 includes an electronic device 100, an electronic device 201, an electronic device 202, an electronic device 203, an electronic device 204, etc. The electronic device 100 may assist a user in selecting and controlling various electronic devices (e.g., a sound box, a television, a refrigerator, and an air conditioner). In the present application, the electronic device 100 may alternatively be referred to as a first electronic device, and the electronic device 201 (or the electronic device 202, the electronic device 203, the electronic device 204, etc.) may alternatively be referred to as a second electronic device.

[0087] The electronic device (e.g., electronic device 100, electronic device 201, electronic device 202, electronic device 203, or electronic device 204) may be an ultra-wideband (UWB) - wide -The electronic device 100 may include a UWB (Ultra Wideband) communication module, and may further include one or more of a Bluetooth communication module, a WLAN communication module, and a GPS communication module. Electronic device 100 is used as an example. Electronic device 100 may detect and scan for electronic devices (e.g., electronic device 201, electronic device 202, electronic device 203, or electronic device 204) near electronic device 100 by transmitting signals through one or more of the UWB communication module, the Bluetooth communication module, the WLAN communication module, and the Global Positioning System (GPS) communication module, thereby enabling electronic device 100 to discover nearby electronic devices, establish wireless communication connections to nearby electronic devices, and transmit data to nearby electronic devices by using one or more short-range communication protocols such as UWB, Bluetooth, WLAN, and GPS.

[0088] The type of electronic device (e.g., electronic device 100, electronic device 201, electronic device 202, electronic device 203, or electronic device 204) is not particularly limited herein. In some implementations, the electronic device of the present embodiment may be a portable device such as a mobile phone, a wearable device (e.g., a smart band), a tablet computer, a laptop, a handheld computer, a computer, an ultra-mobile personal computer (UMPC), a cellular phone, a personal digital assistant (PDA), or an augmented reality (AR) / virtual reality (VR) device. Electronic Devicesmay alternatively be a device such as a sound box, a television, a refrigerator, an air conditioner, an in-car device, a printer, or a projector. Example embodiments of electronic devices include, but are not limited to, electronic devices using iOS®, Android®, Microsoft®, or other operating systems.

[0089] In possible implementations, electronic device 100, electronic device 201, electronic device 202, electronic device 203, and electronic device 204 may communicate directly with each other. In possible implementations, electronic device 100, electronic device 201, electronic device 202, electronic device 203, and electronic device 204 may be connected to a local area network (LAN) using a wired or wireless fidelity (Wi-Fi) connection. For example, electronic device 100, electronic device 201, electronic device 202, electronic device 203, and electronic device 204 may all be connected to the same electronic device 301, and electronic device 100, electronic device 201, electronic device 202, electronic device 203, and electronic device 240 may communicate indirectly with each other using electronic device 301. The electronic device 301 may be one of the electronic devices 100, 201, 202, 203, and 204, or may be an additional third-party device, such as a router, a cloud server, or a gateway. The cloud server may be a hardware server or may be embedded in a virtualized environment. For example, the cloud server may be a virtual machine running on a hardware server that may include one or more other virtual machines. The electronic device 301 may transmit data to the electronic devices 100, 201, 202, 203, and 204 by using a network, or may receive data transmitted by the electronic devices 100, 201, 202, 203, and 204.

[0090] The electronic device 301 may include a memory, a processor, and a transceiver. The memory may be configured to store a program related to UWB positioning. The memory may be further configured to store orientation parameters of an electronic device (e.g., the electronic device 201) acquired by using UWB positioning technology. The memory may be further configured to store messages exchanged by using the electronic device 301 and data and / or settings related to the electronic device 100 and nearby devices. When acquiring orientation parameters of multiple nearby devices in a local area network, the processor may be configured to determine a target device to respond to based on the orientation parameters of the multiple nearby devices. The transceiver may be configured to communicate with electronic devices connected to the local area network. Note that in this embodiment of the present application, the multiple nearby electronic devices may or may not be connected to the same local area network. This is not particularly limited herein.

[0091] It may be understood that the structure shown in this embodiment does not constitute a specific limitation on the communication system 10. In some other embodiments of the present application, the communication system 10 may include more or fewer devices than are shown.

[0092] The following describes the electronic device 100 in an embodiment of the present application.

[0093] FIG. 2 is a schematic diagram of an example structure of an electronic device 100 according to an embodiment of the present application.

[0094] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identification module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0095] It may be understood that the structures shown in the embodiments of the present application do not constitute specific limitations on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or some components may be combined, or some components may be separated, or a different component arrangement may be used. The components shown may be implemented by hardware, software, or a combination of software and hardware.

[0096] Processor 110 may include one or more processing units. For example, processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DPS), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be separate components or may be integrated into one or more processors.

[0097] The controller may be the brain and command center of the electronic device 100. The controller may generate operation control signals based on instruction operation codes and time series signals to complete the control of instruction fetching and instruction execution.

[0098] Memory may also be located in processor 110 and configured to store instructions and data. In some embodiments, the memory in processor 110 is a cache. The memory may store instructions or data that have been used or are used periodically by processor 110. When processor 110 needs to use the instructions or data again, the processor may retrieve the instructions or data directly from memory. This avoids repeated accesses, reduces latency for processor 110, and improves system efficiency.

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

[0100] The I2C interface consists of a serial data line (SDA) and a serial clock line ( serial The I2C bus is a two-way synchronous serial bus including a clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be separately coupled to the touch sensor 180K, a charger, a flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through an I2C interface, whereby the processor 110 communicates with the touch sensor 180K through the I2C bus interface to implement touch functions of the electronic device 100.

[0101] The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple groups of I2S buses. Processor 110 may be coupled to audio module 170 through the I2S bus to implement communication between processor 110 and audio module 170. In some embodiments, audio module 170 may send audio signals to wireless communication module 160 through the I2S interface to implement a function for answering a call via a Bluetooth headset.

[0102] The PCM interface may also be used to perform audio communication and to sample, quantize, and encode analog signals. In some embodiments, audio module 170 may be coupled to wireless communication module 160 through a PCM bus interface. In some embodiments, audio module 170 may also send audio signals to wireless communication module 160 through the PCM interface to implement functions such as answering a call via a Bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.

[0103] The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a two-way communication bus. The bus converts transmitted data between serial and parallel communication. In some embodiments, the UART interface is generally configured to connect the processor 110 to the wireless communication module 160. For example, the processor 110 communicates with a Bluetooth module in the wireless communication module 160 through the UART interface to perform Bluetooth functions. In some embodiments, the audio module 170 may send audio signals to the wireless communication module 160 through the UART interface to perform a function of playing music through a Bluetooth headset.

[0104] The MIPI interface may be configured to connect the processor 110 to peripheral components such as the display 194 or the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 via the CSI interface to perform picture-taking functions of the electronic device 100. The processor 110 communicates with the display 194 via the DSI interface to perform display functions of the electronic device 100.

[0105] The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or a data signal. In some embodiments, the GPIO interface may be configured to connect the processor 110 to the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface may alternatively be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0106] The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a mini USB interface, a micro USB interface, a USB Type-C interface, etc. The USB interface 130 may be configured to connect to a charger to charge the electronic device 100, to transmit data between the electronic device 100 and a peripheral device, or to connect to a headset to play audio through the headset. The interface may further be configured to connect to other electronic devices, such as an AR device.

[0107] It may be understood that the inter-module interface connection relationships shown in this embodiment of the present application are merely an example for descriptive purposes and do not constitute limitations on the structure of the electronic device 100. In some other embodiments of the present application, the electronic device 100 may alternatively use an interface connection scheme different from that of the above embodiment, or a combination of multiple interface connection schemes.

[0108] The charge management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive the wireless charging input through a wireless charging coil of the electronic device 100. The charge management module 140 provides power to the electronic device through the power management module 141 while charging the battery 142.

[0109] Power management module 141 is configured to connect to battery 142, charging management module 140, and processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140 to provide power to processor 110, internal memory 121, external memory, display 194, camera 193, wireless communication module 160, etc. Power management module 141 may be further configured to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage or impedance). In some other embodiments, power management module 141 may alternatively be located in processor 110. In some other embodiments, power management module 141 and charging management module 140 may alternatively be located in the same device.

[0110] The wireless communication functions of the electronic device 100 may be implemented by using an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a modem processor, a baseband processor, and the like.

[0111] Antenna 1 and Antenna 2 are configured to transmit and receive electromagnetic signals. Each antenna of electronic device 100 may be configured to cover one or more communication frequency bands. Different antennas may also be multiplexed to improve antenna utilization. For example, Antenna 1 may be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, antennas may be used with tuning switches.

[0112] Mobile communication module 150 may provide a solution for providing electronic device 100 with wireless communication, such as 2G / 3G / 4G / 5G. Mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. Mobile communication module 150 may receive electromagnetic waves through antenna 1, perform processing, such as filtering and amplification, on the received electromagnetic waves, and send the electromagnetic waves to a modem processor for demodulation. Mobile communication module 150 may also amplify signals modulated by the modem processor and convert the signals into electromagnetic waves radiated by antenna 1. In some embodiments, at least some functional modules in mobile communication module 150 may be located in processor 110. In some embodiments, at least some functional modules of mobile communication module 150 may be located in the same device as at least some modules of processor 110.

[0113] The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into an intermediate / high-frequency signal. The demodulator is configured to demodulate a received electromagnetic signal into a low-frequency baseband signal. The demodulator then sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then sent to the application processor. The application processor outputs an acoustic signal through an audio device (such as, but not limited to, speaker 170A, receiver 170B, etc.) or displays an image or video through display 194. In some embodiments, the modem processor may be a separate component. In some other embodiments, the modem processor may be separate from processor 110 and located in the same device as mobile communication module 150 or other functional modules.

[0114] The wireless communication module 160 may be any of a variety of wireless communication technologies, including UWB, wireless local area network (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth ( BThe wireless communication module 160 may provide wireless communication solutions applied to the electronic device 100, including Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) technology, infrared (IR) technology, etc. The wireless communication module 160 may be one or more components incorporating at least one communication processor module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processes on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may further receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on the signals, and convert the signals into electromagnetic waves to be radiated by the antenna 2.

[0115] In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 of electronic device 100 are coupled, thereby enabling electronic device 100 to communicate with networks and other devices by using wireless communication technologies such as global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TDMA), and the like. TD-CDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, IR technologies, and / or the like. GNSS includes global positioning system (GPS), global navigation satellite system (GLONASS), BeiDou navigation satellite system ( BeiDou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite-based augmentation system (SAS) system , SBAS).

[0116] In this embodiment of the present application, when a photo needs to be shared between two electronic devices, it should be understood that the transmission may be performed in any one of the communication methods listed above, for example, multiple possible methods such as Bluetooth and wireless fidelity (Wi-Fi) modules, etc. This is not limited in this embodiment of the present application.

[0117] UWB wireless communication is a wireless personal area network communication technology with low power consumption and high-speed transmission. Unlike the continuous carrier mode used by general communication technologies, UWB uses pulse signals to transmit data. UWB uses non-sinusoidal narrow pulse signals of nanoseconds (ns) to picoseconds (ps) to transmit data, and time modulation technology can significantly improve the transmission rate. Because very short pulses are used, the transmission power of UWB devices is only a few percent of that of current continuous carrier systems during high-speed communication. Therefore, power consumption is low.

[0118] Compared with traditional narrowband systems, UWB systems have the advantages of strong penetration, low power consumption, excellent anti-multipath effect, high security, low system complexity, and high positioning accuracy. UWB can be used in wireless communication applications requiring high quality of service, such as wireless personal area networks (WPANs), home network connections, and short-range radar. UWB will become a technological means to resolve the conflict between the demand for high-speed Internet access in businesses, homes, and public places and the allocation of increasingly congested frequency resources.

[0119] In this embodiment of the present application, the electronic device 100 can perform distance and receive signal strength indicator (RSSI) measurements by using one UWB antenna, and can perform angle of arrival (AOA) measurements by using at least two UWB antennas.

[0120] In some embodiments, the UWB communication module of the electronic device 100 may be in a powered-on state when the electronic device is in a standby state.

[0121] In some embodiments, the electronic device 100 may perform distance and AOA measurements by using Bluetooth.

[0122] Electronic device 100 may perform display functions through a GPU, a display 194, an application processor, etc. A GPU is a microprocessor for image processing and is connected to display 194 and the application processor. A GPU is configured to perform mathematical and geometric calculations and render images. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0123] The display 194 is configured to display images, videos, etc. The display 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (ALD), or a display panel. - emitting diode, AMOLED), flexible light emitting diode ( flexible light-emitting diode (FLED), mini LED, micro LED, micro OLED, quantum dot light emitting diode (quantum dot light - emitting diode , QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than one.

[0124] In some embodiments of the present application, display 194 displays interface content currently being output by the system. Electronic device 100 cooperates with the GPU, display 194, and application processor to perform the display functions of the electronic device, displaying images, application interfaces, buttons, icons, windows, etc. on the display of electronic device 100. For example, the interface content may be the interface provided by an instant messaging application.

[0125] The electronic device 100 can implement the picture-taking function by using an ISP, a camera 193, a video codec, a GPU, a display 194, an application processor, and the like.

[0126] The ISP is configured to process data fed back by the camera 193. For example, during photography, the shutter is pressed and light is transmitted through the lens to the camera's photosensitive elements. The light signal is converted into an electronic signal, which the camera's photosensitive elements send to the ISP for processing to convert the electrical signal into a visible image. The ISP may further perform algorithmic optimization for image noise, brightness, and appearance. The ISP may also optimize parameters such as exposure and color temperature for the photography scenario. In some embodiments, the ISP may be located in the camera 193.

[0127] The camera 193 is configured to capture still images or video. An optical image of an object is generated through a lens and projected onto a photosensitive element. The photosensitive element may be a charge coupled device (CCD). - The photosensitive elements may be CCD (charge coupled device) or complementary metal-oxide-semiconductor (CMOS) phototransistors. The photosensitive elements convert the optical signals into electrical signals, which are then sent to the ISP for conversion into digital image signals. The ISP outputs the digital image signals to the DSP for processing. The DSP converts the digital image signals into image signals in a standard format, such as RGB or YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0128] The digital signal processor is configured to process digital signals, and may process other digital signals in addition to digital image signals, for example, if the electronic device 100 selects a frequency, the digital signal processor may be configured to perform a Fourier transform or the like on the frequency energy.

[0129] A video codec is configured to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record video in multiple coding formats, such as Moving Picture Experts Group (MPEG)-1, MPEG-2, MPEG-3, and MPEG-4.

[0130] The NPU is a neural network (NN) computing processor that processes input information immediately by referencing the structure of biological neural networks, such as the transfer mode between neurons in the human brain, and may also continuously perform self-learning. Applications such as intelligent cognition in the electronic device 100, such as image recognition, face recognition, speed recognition, and text understanding, may be implemented by the NPU.

[0131] The external memory interface 120 may be used to connect an external storage card, such as a microSD card, to expand the storage capabilities of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, the external memory card stores files such as music and video files.

[0132] The internal memory 121 may be configured to store computer-executable program code. The executable program code includes instructions. The processor 110 executes the instructions stored in the internal memory 121 to perform various functional applications and data processing of the electronic device 100. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, applications required by at least one function (e.g., audio playback function or image playback function), etc. The data storage area may store data generated during use of the electronic device 100 (e.g., audio data and a phone book), etc. Furthermore, the internal memory 121 may include high-speed random access memory or non-volatile memory, such as at least one magnetic disk storage device, flash memory, or universal flash storage (UFS).

[0133] Electronic device 100 may implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headset jack 170D, application processor, and the like.

[0134] Audio module 170 is configured to convert digital audio information into analog audio signals for output, and to convert analog audio signals into digital audio signals. Audio module 170 may further be configured to encode and decode audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules of audio module 170 may be located in processor 110.

[0135] The speaker 170A, also called a "loudspeaker," is configured to convert audio electrical signals into acoustic signals. The electronic device 100 can be used with the speaker 170A to answer calls in hands-free mode or to listen to music.

[0136] Receiver 170B, also referred to as an "earpiece," is configured to convert an audio electrical signal into an acoustic signal. When answering a phone call or receiving speech information on electronic device 100, receiver 170B may be placed near a person's ear to hear the sound.

[0137] Microphone 170C, also referred to as a "microphone" or "mic," is configured to convert acoustic signals into electrical signals. When making a phone call or sending a voice message, a user may position their mouth near microphone 170C to generate sound and input the acoustic signal into microphone 170C. At least one microphone 170C may be disposed on electronic device 100. In some other embodiments, two microphones 170C may be disposed on electronic device 100 to collect acoustic signals and implement noise reduction functions. In some other embodiments, three, four, or more microphones 170C may alternatively be disposed on electronic device 100 to collect acoustic signals, perform noise reduction, identify sound sources, implement directional recording functions, and the like.

[0138] The headset jack 170D is configured to connect to a wired headset and may be a USB interface 130, a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of USA (CTIA) standard interface.

[0139] Pressure sensor 180A is configured to detect a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be located on display 194. In some optional embodiments herein, pressure sensor 180A may be configured to capture a pressure value generated when a user's finger portion touches the display and send the pressure value to a processor, whereby the processor identifies the finger portion through which the user inputs a user action.

[0140] There are several types of pressure sensor 180A, such as resistive pressure sensor, inductive pressure sensor, and capacitive pressure sensor. A capacitive pressure sensor may include at least two parallel plates made of a conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure strength based on the change in capacitance. When a touch operation is performed on display 194, electronic device 100 detects the strength of the touch operation through pressure sensor 180A. Electronic device 100 may also calculate the touch position based on the detection signal of pressure sensor 180A. In some embodiments, touch operations performed at different touch positions may correspond to different operation commands. In some optional embodiments, pressure sensor 180A may further calculate the number of touch points based on the detected signal and send the calculated value to a processor, so that the processor can identify that the user inputs a user operation using one finger or multiple fingers.

[0141] The gyroscope sensor 180B may be configured to determine the motion orientation of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the X, Y, and Z axes of the electronic device) may be determined by the gyroscope sensor 180B. The gyroscope sensor 180B may be configured to perform image stabilization during photography. For example, to perform image stabilization when the shutter is pressed, the gyroscope sensor 180B detects the angle at which the electronic device 100 is shaken, and based on the angle, calculates the distance the lens module needs to compensate, allowing the lens to perform an inverse motion to offset the shake of the electronic device 100. The gyroscope sensor 180B may also be used in navigation and motion-sensing gaming scenarios.

[0142] The barometric pressure sensor 180C is configured to measure barometric pressure. In some embodiments, the electronic device 100 calculates altitude from the barometric pressure measured by the barometric pressure sensor 180C to assist in positioning and navigation.

[0143] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip cover by using the magnetic sensor 180D. In some embodiments, when the electronic device is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Furthermore, a mechanism such as an automatic unlock when the flip cover is opened can be set based on the detected open or closed state of the flip cover or the detected open or closed state of the leather case.

[0144] The acceleration sensor 180E may detect acceleration in various directions (typically in three axes) of the electronic device 100. When the electronic device 100 is stationary, the magnitude and direction of gravity may be detected. The acceleration sensor 180E may be further configured to identify the orientation of the electronic device, which may be used in applications such as switching between landscape and portrait modes and a pedometer. In some optional embodiments of the present application, the acceleration sensor 180E may be configured to capture acceleration values ​​generated when a portion of a user's finger touches the display (or a rear side bezel of the side bezels of the electronic device 100) and send the acceleration values ​​to the processor, which then identifies the portion of the finger that the user uses to input a user action.

[0145] In this embodiment of the present application, the electronic device 100 may determine a change in the attitude of the electronic device 100 by using a gyroscope sensor and / or an acceleration sensor to further identify the user operation. For example, the current user operation is identified as an uplift operation based on a change in the attitude of the electronic device 100. The uplift operation may be that the electronic device 100 is placed horizontally (in this case, the display 194 of the electronic device is parallel to the horizontal direction, and the uplift angle is the angle between the display and the horizontal direction, i.e., 0 degrees). The user lifts the electronic device 100 in a vertical horizontal direction within a preset time (in this case, the display 194 of the electronic device is perpendicular to the horizontal direction, and the uplift angle is the angle between the display and the horizontal direction, i.e., 90 degrees). In this case, the uplift change angle within the preset time is 90 degrees (90 degrees minus 0 degrees). If the electronic device 100 detects that the uplift change angle within a preset time exceeds a preset angle, the electronic device 100 may consider the current user operation to be an uplift operation. The preset angle may be, for example, 30 degrees.

[0146] In some embodiments, when the electronic device 100 detects that the uplift angle change within a preset time exceeds a preset angle, and the uplift angle at a point in time within the preset time is within a preset angle range, the electronic device 100 considers the current user operation to be an uplift operation. The preset angle range may be from 60 degrees to 90 degrees.

[0147] In this embodiment of the present application, the electronic device 100 may determine the attitude change of the electronic device 100 by using a gyroscope sensor and / or an acceleration sensor to further identify a steady state, which may be that the angle change detected by the gyroscope sensor of the electronic device 100 within a preset time is within a preset range, and the velocity change detected by the acceleration sensor within a preset time is below a threshold.

[0148] The distance sensor 180F is configured to measure distance. The electronic device 100 may measure distance using an infrared method or a laser method. In some embodiments, in a photography scenario, the electronic device 100 may measure distance using the distance sensor 180F to perform fast focusing.

[0149] The optical proximity sensor 180G may include a light-emitting diode (LED) and a photodetector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 100 emits infrared light using the light-emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using the photodiode. If sufficient reflected light is detected, it may be determined that the electronic device is near the electronic device 100. If sufficient reflected light is not detected, the electronic device 100 may determine that no object is near the electronic device 100. By using the optical proximity sensor 180G, the electronic device 100 may detect when a user is holding the electronic device 100 close to their ear for a phone call and automatically turn off the display to save power. The optical proximity sensor 180G may also be configured to automatically unlock and lock the screen in flip cover mode and pocket mode.

[0150] The ambient light sensor 180L is configured to detect the brightness of ambient light. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the detected brightness of ambient light. The ambient light sensor 180L may also be configured to automatically adjust the white balance during photography. The ambient light sensor 180L may also cooperate with the optical proximity sensor 180G to detect whether the electronic device 100 is in a pocket to avoid accidental touches.

[0151] Fingerprint sensor 180H is configured to collect fingerprints, and electronic device 100 can use the collected fingerprint characteristics to perform fingerprint-based unlocking, application access locking, fingerprint-based photo taking, fingerprint-based phone answering, etc.

[0152] Temperature sensor 180J is configured to detect temperature. In some embodiments, electronic device 100 executes a temperature handling policy based on the temperature detected by temperature sensor 180J. For example, if the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 reduces the performance of a processor near temperature sensor 180J to reduce power consumption for thermal protection. In some other embodiments, if the temperature is lower than another threshold, electronic device 100 heats battery 142 to prevent the electronic device from abnormally shutting down due to low temperature. In some other embodiments, if the temperature is lower than yet another threshold, electronic device 100 increases the output voltage of battery 142 to avoid abnormal shutdown caused by low temperature.

[0153] The touch sensor 180K is also referred to as a touch panel. The touch sensor 180K may be disposed on the display 194, and the touch sensor 180K and the display 194 form a touchscreen, also referred to as a "touch screen." The touch sensor 180K is configured to detect touches made at or near the touch sensor 180K. A touch is when a user touches the display 194 using a hand, elbow, stylus, etc. The touch sensor may forward the detected touch to an application processor to determine the type of touch event. A visual output related to the touch may be provided by the display 194. In some other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a location different from the location of the display 194.

[0154] The bone conduction sensor 180M may acquire vibration signals. In some embodiments, the bone conduction sensor 180M may acquire vibration signals of the vibrating bones of a human vocal cord region. The bone conduction sensor 180M may also be in contact with a human pulse to receive blood pressure pulsation signals. In some embodiments, the bone conduction sensor 180M may alternatively be disposed in a headset to form a bone conduction headset. The audio module 170 may acquire voice signals by parse based on the vibration signals of the vibrating bones of the vocal cord region acquired by the bone conduction sensor 180M to perform a voice function. The application processor may parse heartbeat information based on the blood pressure pulsation signals acquired by the bone conduction sensor 180M to perform a heartbeat detection function.

[0155] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may include: button Receives inputs related to functional control and user settings of the electronic device 100. button A signal input may be generated.

[0156] The motor 191 may generate a vibration prompt. The motor 191 may be configured to provide an incoming call vibration prompt or a touch vibration prompt. For example, touch operations performed for different applications (e.g., taking a photo and playing audio) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations performed on different areas of the display 194. Different application scenarios (e.g., time reminders, receiving information, alarm clocks, and games) may also correspond to different vibration feedback effects. The touch vibration feedback effects may be further customized.

[0157] The indicator 192 may be an indicator light and may be configured to indicate charging status and power changes, or may be configured to indicate messages, missed calls, notifications, and the like.

[0158] The SIM card interface 195 is configured to connect to a SIM card, which can be inserted into or removed from the SIM card interface 195 to effect attachment and detachment of the SIM card from the electronic device 100.

[0159] The following uses the electronic device 202 as an example to describe the structure of other electronic devices according to embodiments of the present application.

[0160] 3 is a schematic diagram of an example of the structure of an electronic device 202 according to an embodiment of the present application. For the electronic device 201, the electronic device 203, and the electronic device 204, please refer to the schematic diagram of the structure shown in FIG.

[0161] As shown in FIG. 3 , the electronic device 202 may include a processor 401, a memory 402, a wireless communication processing module 403, an antenna 404, a power switch 405, a wired LAN communication processing module 406, a USB communication processing module 407, an audio module 408, and a display 409. 。

[0162] The processor 401 may be configured to read and execute computer-readable instructions. In a specific implementation, the processor 401 may mainly include a controller, an arithmetic unit, and a register. The controller is mainly responsible for decoding instructions and sending control signals for operations corresponding to the instructions. register are mainly responsible for storing register operands, intermediate operation results, etc. that are temporarily stored during instruction execution. In a specific implementation, the hardware architecture of the processor 401 may be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, an NP architecture, etc.

[0163] In some embodiments, the processor 401 may be configured to parse signals received by the wireless communication module 403 and / or the wired LAN communication processing module 406, such as a detection request broadcast by the electronic device 100. The processor 401 may be configured to perform corresponding processing operations based on the parsing result, such as to generate a detection response.

[0164] In some embodiments, the processor 401 may be further configured to generate a signal, such as a Bluetooth broadcast signal, to be transmitted by the wireless communication module 403 and / or the wired LAN communication processing module 406 .

[0165] The memory 402 is coupled to the processor 401 and configured to store various software programs and / or groups of instructions. In a specific implementation, the memory 402 may include a high-speed random access memory and may further include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory, or other non-volatile solid-state storage devices. The memory 402 may store an operating system, such as an embedded operating system such as uCOS, VxWorks, or RTLinux. The memory 402 may further store a communication program, which may be used to communicate with the electronic device 100, one or more servers, or nearby devices.

[0166] The wireless communication module 403 includes a UWB communication module 403A, a Bluetooth communication module 403B, and a WLAN communication module 403C. 3 C, and GPS communication module 40 3 D. The UWB communication module 403A may be incorporated into a chip (System on Chip, SOC), or alternatively, the UWB communication module 403A may be integrated with another communication module (e.g., Bluetooth communication module 403B) based on hardware (or software).

[0167] In some embodiments, a UWB communication module 403A, a Bluetooth communication module 403B, a WLAN communication module 40 3 C, and GPS communication module 40 3 One or more of D may listen to signals, such as measurement signals or scan signals, transmitted by other devices (e.g., electronic device 100), and may transmit response signals, such as measurement responses or scan responses, to enable other devices (e.g., electronic device 100) to discover electronic device 202, and establish wireless communication connections to other devices (e.g., electronic device 100) by using one or more short-range communication technologies, such as UWB, Bluetooth, WLAN, or infrared, to transmit data.

[0168] In some other embodiments, the UWB communication module 403A, the Bluetooth communication module 403B, and the WLAN communication module 40 3 C, and GPS communication module 40 3 One or more of D may also transmit signals, e.g., broadcast UWB measurement signals, so that other devices (e.g., electronic device 100) can discover electronic device 202, and may establish wireless communication connections to other devices (e.g., electronic device 100) by using one or more wireless communication technologies of UWB, Bluetooth, WLAN, or infrared to transmit data.

[0169] The wireless communication module 403 may further include a cellular mobile communication module (not shown). Faith The module may communicate with other devices (eg, servers) by using cellular mobile communication technology.

[0170] The antenna 404 may be configured to transmit and receive electromagnetic signals. To improve antenna utilization, the antennas of different communication modules may be multiplexed or may be independent of each other. For example, the Bluetooth communication module 403 B The antenna is a WLAN communication module 403 C For example, the UWB communication module 403A needs to use an independent UWB antenna.

[0171] In this embodiment of the present application, to perform UWB communication, the electronic device 202 is equipped with at least one UWB antenna.

[0172] The power switch 405 may be configured to control a power source to provide power to the electronic device 202 .

[0173] The wired LAN communication processing module 406 may be configured to communicate with other devices in the same LAN by using a wired LAN, and may further be configured to connect to a WAN by using the wired LAN to communicate with devices in the WAN.

[0174] The USB communication processing module 407 may be configured to communicate with other devices via a USB interface (not shown).

[0175] The audio module 408 may be configured to output an audio signal through an audio output interface, thereby enabling the electronic device 202 to support audio playback. The audio module may be configured to receive audio data through an audio input interface. The electronic device 202 may be a media playback device such as a television.

[0176] The display 409 is configured to display images, videos, etc. The display 409 may be a liquid crystal display (LCD), an organic light-emitting diode (OLED) display, an active-matrix organic light-emitting diode (AMOLED) display, a flexible light-emitting diode (FLED) display, a quantum dot light-emitting diode (QLD) display, or the like. - emitting diode , QLED) display, etc.

[0177] In some embodiments, the electronic device 202 may further include a serial interface, such as an RS-232 interface, which may be connected to another device, for example, an audio speaker device, such as a sound box, so that the display cooperates with the audio speaker device to play audio and video.

[0178] 3 does not constitute any specific limitations on electronic device 202. In some other embodiments of the present application, electronic device 202 may include more or fewer components than shown, combine some components, separate some components, or have a different component arrangement. The components shown may be implemented by hardware, software, or a combination of software and hardware.

[0179] The present application provides a device identification method based on augmented reality. After detecting a first operation, the electronic device 100 enters a first interface, activates a camera, and displays a preview image captured by the camera in real time on the first interface. The electronic device 100 identifies the type of a second electronic device (e.g., a sound box, a computer, a tablet, or a computer) in the preview image of the first interface by using computer vision technology. Furthermore, the electronic device 100 determines orientation information (e.g., latitude and longitude information, or physical distance and angle from the electronic device) and identification information of the second electronic device within communication range of the electronic device 100 by using wireless positioning technology (e.g., UWB positioning, Bluetooth positioning, Wi-Fi positioning, or GPS positioning).

[0180] The electronic device 100 determines the position of the second device in the preview image based on the relative distance and relative angle between the electronic device 100 and the second electronic device and the camera's shooting angle range. For example, as shown in FIG. 4, the electronic device 100 and nearby devices are included in FIG. 4. The nearby devices include electronic device 201, electronic device 202, electronic device 203, and electronic device 204. The second electronic device may be any of the nearby devices. FIG. 4 illustrates example positional relationships between the electronic device 100, electronic device 201, electronic device 202, electronic device 203, and electronic device 204 on a horizontal plane in some application scenarios of the present application.

[0181] In an embodiment of the present application, to facilitate the description of the positional relationship between the electronic device 100 and a nearby device, a reference point (e.g., a center location point) on the electronic device 100 may be used to represent the position of the electronic device in a plan view. For example, the center location point of the electronic device 100 may be used to represent the position of the electronic device on a horizontal plane. In this embodiment of the present application, by using the center location point of the electronic device 100 as the starting point, the direction indicated by a vector that is perpendicular to the top edge of the touchscreen of the electronic device 100 may be used as the reference direction of the electronic device 100, or may be referred to as the 0-degree direction of the electronic device 100.

[0182] Thus, as shown in FIG. 4, electronic device 201 may be 1 m at a 0 degree orientation of electronic device 100, electronic device 202 may be 1.2 m at a 330 degree clockwise orientation of electronic device 100, electronic device 203 may be 0.5 m at a 300 degree clockwise orientation of electronic device 100, and electronic device 204 may be 0.8 m at a 30 degree clockwise orientation of electronic device 100.

[0183] Generally, the horizontal angle of the camera's shooting angle is 60 to 80 degrees, and the vertical angle is about 45 degrees, which vary according to different mobile phone brands and camera settings. It can be seen that when the horizontal angle of the shooting angle of electronic device 100 is 60 degrees, electronic device 201, electronic device 202, electronic device 203, and electronic device 204 are all within the shooting range of electronic device 100. Based on the length, width, and physical distance from different electronic devices to electronic device 100, it can be determined whether electronic device 201, electronic device 202, electronic device 203, and electronic device 204 are fully or partially displayed in the photo-taking interface of electronic device 100.

[0184] In this embodiment of the present application, there may be more or fewer nearby devices than the electronic device 100, and the nearby devices are not limited to the four electronic devices in Fig. 4. In Fig. 4, the four electronic devices are merely used as an example to explain the present application and should not constitute a limitation. Fig. 4 shows an example of the relative positional relationship between the above four electronic devices (electronic device 201, electronic device 202, electronic device 203, and electronic device 204) and the electronic device 100, which is merely an example to explain the present embodiment of the present application and should not constitute a limitation.

[0185] After determining the orientation information of the second electronic device, the electronic device 100 determines a display image and display area of ​​the second electronic device in the preview image, and displays a device icon in the first interface in real time in an augmented reality display manner. When a user triggers the device icon, the electronic device 100 may output a control interface for the second electronic device to implement interaction between the user and the second electronic device.

[0186] In some embodiments, a display area of ​​the device icon in the first interface corresponds to a display area of ​​the second electronic device in the preview image.

[0187] The following describes the augmented reality based device identification method in this application with reference to an application scenario.

[0188] In the UI embodiment shown in Figures 5A to 5F, an example of an operation process is shown in which a first operation by a user causes a first electronic device to enter a first interface, and the electronic device displays a device icon in the first interface in real time.

[0189] 5A shows an example of a user interface 510 of electronic device 100. User interface 510 may include a status bar 511, a tray 512, and one or more application icons.511 may include one or more signal strength indicators 513 for a mobile communication signal (alternatively referred to as a cellular signal), one or more signal strength indicators 514 for a wireless fidelity (Wi-Fi) signal, a Bluetooth indicator 515, a battery status indicator 516, and a time indicator 517. When the Bluetooth module of electronic device 100 is in an on state (i.e., the electronic device provides power to the Bluetooth module), Bluetooth indicator 515 is displayed on the display interface of electronic device 100.

[0190] The tray 512 containing application icons " phone ” icon, " contact address ” icon, " message ” Icons, and " One or more application icons may be displayed. " Gallery ” icon, " browser ” icon, " App Store ” icon, " setting ” icon, " Email ” icon, " Cloud Sharing ” Icons, and " Notes ” Includes icons.

[0191] The electronic device 100 can launch and run multiple applications simultaneously to provide different services or functions to the user. Running multiple applications simultaneously on the electronic device 100 means that the electronic device 100 launches multiple applications without closing the applications or deleting resources such as memory occupied by the applications. Multiple applications simultaneously occupy resources such as memory in the background. Multiple applications are not required to simultaneously interact with the user in the foreground. For example, the electronic device 100 can run three applications: " Email ” , " Gallery ” , and " Instant messaging ” Start the three applications in order, " Email ” , " Gallery ” , and " Instant messaging ” are executed simultaneously.

[0192] When a user uses an application, if the application is switched to or the home screen is displayed for operation, the electronic device 100 does not close the application previously used by the user, but keeps the previously used application in the multitasking queue as a background application.

[0193] When the electronic device 100 executes multiple applications simultaneously, the electronic device may generate cards corresponding to each application based on the multiple applications in the multitasking queue. The multiple cards in the multitasking interface are arranged horizontally in parallel according to a preset ordering policy. For example, in the ordering policy, the electronic device 100 arranges cards corresponding to different applications according to the chronological order in which the different applications are executed.

[0194] Electronic device 100 displays multitasking interface 520 after detecting a user action that directs opening multitasking interface 520. Multitasking interface 520 includes cards corresponding to multiple applications running on electronic device 100. There may be multiple user actions that direct opening of the multitasking interface.

[0195] For example, when the electronic device 100 detects an up slide operation on a button of the electronic device 100, the electronic device 100 displays a multitasking interface 520 in response to the operation, as shown in FIG. 5B.

[0196] Multitasking interface 520 may include card 521, card 522, and delete icon 523. Card 521 is fully displayed and card 522 is partially displayed.

[0197] The delete icon 523 can be used to close the application corresponding to the card that is fully displayed in the current multitasking interface 520. Closing an application means deleting resources, such as memory, occupied by that application. In some embodiments, the delete icon 523 may be used to close the applications corresponding to all cards in the current multitasking interface 520.

[0198] Please note that the accompanying drawings are merely illustrative. The multitasking interface 520 shown in the accompanying drawings is an interface displayed on a touchscreen within the frame of the electronic device 100. Portions of cards within the frame of the electronic device 100 can be displayed on the touchscreen of the electronic device 100, and portions of cards outside the frame of the electronic device cannot be displayed on the touchscreen of the electronic device 100.

[0199] In the multitasking interface 520, the user may switch the display of cards by sliding left or right in the multitasking interface 520. For example, when the electronic device 100 detects a rightward sliding operation on the multitasking interface 520, the cards in the multitasking interface 520 move sequentially to the right in response to the operation. In this case, the electronic device 100 may fully display card 522 and partially display card 521. When the electronic device 100 detects a leftward sliding operation on the multitasking interface 520, the cards in the multitasking interface 520 move sequentially to the left in response to the operation. Because card 521 is the first card counting from the right in the multitasking interface 520 and there are no other cards to the right of card 521, the electronic device 100 detects the leftward sliding operation after fully displaying card 521. 5C, in response to the manipulation, electronic device 100 partially displays preset area 524 and continues to slide leftward, as shown in FIG. 5D, electronic device 100 fully displays preset area 524. In some embodiments, at this point, electronic device 100 triggers the display of a viewfinder interface corresponding to preset area 524. The viewfinder interface may be an image captured by the rear camera of electronic device 100, or may be an image captured by the front camera.

[0200] As shown in FIG. 5E, FIG. 5E illustrates an example of a viewfinder interface 530. Images captured using the camera are displayed in real time on the viewfinder interface 530. Optionally, the electronic device 100 may further transmit a detection request using wireless positioning technology. The electronic device 100 determines devices near the electronic device 100 based on the received detection response to the detection request, and further determines one or more of the following information: device name, device type, and physical distance or angle between the nearby device and the electronic device 100. The electronic device 100 performs image recognition on the image captured by the camera to identify the electronic device (e.g., a sound box, a computer, or a tablet computer) in the image. The display content in the viewfinder interface 530 of FIG. 5E is the image captured by the camera, including device image 531, device image 532, device image 533, and device image 534.

[0201] 4, in the present application, device image 531 is an image of electronic device 202 captured by electronic device 100 and displayed in viewfinder interface 530, device image 532 is an image of electronic device 201 captured by electronic device 100 and displayed in viewfinder interface 530, device image 533 is an image of electronic device 203 captured by electronic device 100 and displayed in viewfinder interface 530, and device image 534 is an image of electronic device 204 captured by electronic device 100 and displayed in viewfinder interface 530. 204 This is an image of.

[0202] The electronic device 100 determines a display area of ​​a corresponding device image of each device in the viewfinder interface 530 based on the physical distance and angle between the electronic device 100 and the electronic device 201, the electronic device 202, the electronic device 203, and the electronic device 204. The electronic device 100 displays a device icon in real time in the viewfinder interface 530 in an augmented reality manner. The device icon indicates the electronic device corresponding to the device image in the viewfinder interface 530. Optionally, the display area of ​​the device icon corresponds to the device image in the viewfinder interface 530.

[0203] In some optional aspects, the device icon may be displayed at a fixed position in the viewfinder interface 530, or may be displayed in correspondence with the device image, for example, displayed around the corresponding device image or displayed at a center position of the corresponding device image. The display area of ​​the device icon and the display area of ​​the corresponding device image may completely overlap, partially overlap, or not overlap (e.g., the display area of ​​the device icon may be displayed in an upper area close to the display area of ​​the corresponding device image).

[0204] As shown in FIG. 5F , the display area of ​​device icon 5311 completely overlaps with device image 531, and device icon 5311 indicates that the device name corresponding to device image 531 is Matepad (tablet computer). The display area of ​​device icon 5321 partially overlaps with device image 532, and device icon 5321 indicates that the device name corresponding to device image 532 is HUAWEI soundX (Huawei sound box). The display area of ​​device icon 5331 completely overlaps with device image 533, and device icon 5331 indicates that the device name corresponding to device image 531 is Matebook (computer). The display area of ​​device icon 5341 partially overlaps with device image 534, and device icon 5341 indicates that the device name corresponding to device image 534 is Matebook (computer).

[0205] In this application, a device icon may alternatively be referred to as a device label. When the device 201 is referred to as a second electronic device, the device icon 5321 may alternatively be referred to as a first label.

[0206] In some embodiments, the display area of ​​the device icon corresponds to the position of the device's positioning chip (e.g., UWB chip or Bluetooth chip) in the device image. The electronic device 100 receives a detection response from the positioning chip of the electronic device 201 and determines the orientation (physical distance and angle from the electronic device 100) of the positioning chip of the electronic device 201. Based on the orientation of the positioning chip of the electronic device 201, the electronic device 100 determines a corresponding position of the positioning chip of the electronic device 201 in the viewfinder interface 530, and the electronic device 100 displays the device icon of the device 201 at the corresponding position. For example, the device icon 5321 device image 532In this case, the same applies to the device icon 5311 and the device icon 5331.

[0207] In some embodiments, the location of the device's positioning tip is not within the viewfinder interface 530. For example, the electronic device corresponding to the device image 534 204 The positioning chip is not within the viewfinder interface 530. 204 Based on the position and size of the electronic device relative to the electronic device 100 204 The electronic device 100 may calculate the physical distance and orientation of visually significant points (e.g., the four corners of the screen) of the electronic device 100. When the electronic device 100 captures one or more visually significant points, the electronic device 100 displays a device icon in the viewfinder interface 530.

[0208] In some application scenarios, a device icon may not only indicate the identification information of the device corresponding to the device image, but may also be associated with a control card of the device corresponding to the device image. When the electronic device 100 detects a user operation on a device icon, the electronic device 100 outputs a control card of the device corresponding to the device icon. As shown in FIG. 5G, when the electronic device 100 detects a user operation on a device icon 5321, the electronic device associated with the device icon 5321 is the HUAWEI soundX. As shown in FIG. 5H, the electronic device 100 outputs a control card 540 of the HUAWEI soundX. The control card 540 may include one or more of the following: an application title bar 601, a connection card 602, a music card 603, an audio projection card 604, a refresh control 605, and a close control 606.

[0209] The application title bar 601 indicates that the device of the control card 540 is HUAWEI soundX.

[0210] The connection card 602 may include instruction information 602A and a connection method 602B. The instruction information 602A is used to indicate whether the device (electronic device 201) corresponding to the device image 532 is currently online or offline. The online state means that the electronic device 201 is currently connected to the Internet, and the offline state means that the electronic device 201 is currently not connected to the Internet. The connection method 602B is used to indicate the current connection method between the electronic device 201 and the electronic device 100. If the current connection method between the electronic device 201 and the electronic device 100 is Bluetooth connection, the connection method 602B may be presented as a Bluetooth icon. If the current connection method between the electronic device 201 and the electronic device 100 is Wi-Fi connection, the connection method 602B may be presented as a Wi-Fi icon.

[0211] The music card 603 may include a music name 603A, a position control 603B, a back control 603C, a forward control 603D, a progress bar 603E, a volume 603F, and an additional control 603H.

[0212] The paging control 603B can receive a user input operation (eg, a tap operation), and in response to the detected user operation, the electronic device 201 pauses music playback.

[0213] The return control 603C may receive a user input operation (e.g., a tap operation), and in response to the detected user operation, the electronic device 201 may play the song previous to the currently playing song in the music list.

[0214] The forwarding control 603D may receive a user input operation (e.g., a tap operation), and in response to the detected user operation, the electronic device 201 may play the next song in the music list after the currently playing song.

[0215] The progress bar 603E may indicate the total duration of the song being played (eg, 04:42) and the playing duration (eg, 00:42).

[0216] The volume 603F can receive a user input operation (for example, a slide operation), and in response to the detected user operation, the electronic device 201 adjusts the playback volume of the electronic device 201.

[0217] The additional control 603H can receive a user input operation (e.g., a slide operation), and in response to the detected user operation, the electronic device 100 can display further functional options for the music card, such as share, delete, and download.

[0218] The audio projection card 604 is configured to instruct the electronic device 100 to output audio to the electronic device 201. When the electronic device 100 detects a user operation on the audio projection card 604, audio of the electronic device 100 is output to the electronic device 201 in response to the operation.

[0219] The refresh control 605 is configured to refresh the display interface of the current control card 540 and the electronic device 100 reacquires the current status of the device 201 .

[0220] The close control 606 is configured to close the control card 540. When the electronic device 100 detects a user action on the control 606, the card 540 is closed and the electronic device 100 displays the viewfinder interface 530 shown in FIG.

[0221] 5H, the electronic device 100 may interact with the device image 532 in other ways, which are not particularly limited here. For example, when the electronic device 100 detects a user operation on the device icon 5321, the electronic device 100 directly opens and jumps to application software related to the electronic device corresponding to the device image 532, and executes the application software of the device image 532, such as Smart Life and Fitness & health The application interface of application software such as the above may be displayed.

[0222] In this application, the viewfinder interface 530 may alternatively be referred to as a first interface. The electronic device 100 determines orientation information of devices near the electronic device 100 by using computer identification technology and wireless positioning technology, determines the display image and display area of ​​the nearby device in the preview image of the viewfinder interface 530, and displays a device icon in real time in the photography interface in an augmented reality manner, thereby achieving a real-time preview effect. The user may trigger the device icon, and the electronic device 100 outputs a corresponding control interface of the electronic device to implement interaction between the user and the nearby device.

[0223] In some application scenarios, the application does not run in the background of the electronic device 100, and the application does not run in the multitasking queue. In other words, the multitasking interface 520 does not include a card 521 or a card 522. When the electronic device 100 displays the user interface 510 and detects an upward sliding operation on a button of the electronic device 100, the electronic device 100 displays the multitasking interface in response to the operation. Because there are no cards in the multitasking interface, the electronic device 100 directly enters the viewfinder interface 530. The electronic device 100 activates the camera, collects images in real time by using the camera, and displays the images in the viewfinder interface 530.

[0224] In some application scenarios, after the electronic device 100 enters the viewfinder interface 530, if there is only one device in the viewfinder interface 530, the user does not need to tap a device icon, and the electronic device 100 can directly enter the control interface of that device. For example, as shown in FIG. 6A , the viewfinder interface 530 of FIG. 6A includes a device image 532. A device icon 5321 is displayed near the device image 532. The device icon 5321 partially overlaps the display area of ​​the device image 532. If the electronic device 100 detects that there is only one device in the viewfinder interface 530, the electronic device 100 directly outputs the control card 540 of the device image 532, as shown in FIG. 6B . In this implementation, if there is only one device image in the viewfinder interface 530, it may be assumed that the user wants to interact with the electronic device corresponding to that device image. In this case, the electronic device 100 skips the user's trigger operation and directly enters the control interface of the electronic device, thereby improving the user experience.

[0225] 5A to 5D are optional methods of entering the viewfinder interface 530. Alternatively, the electronic device 100 may enter the viewfinder interface 530 in other ways. For example, FIGS. 7A and 7B further provide methods of entering the viewfinder interface 530.

[0226] As shown in Fig. 7A, a user interface 510 is displayed in Fig. 7A. For a description of the user interface 510, please refer to the related description of Fig. 5A. When the electronic device 100 detects a user operation on the left side of a button on the electronic device, or when the electronic device 100 detects a user operation on the right side of a button on the electronic device, the electronic device 100 displays a user interface 710 shown in Fig. 7B.

[0227] The user interface 710 may include one or more of the following: a connected device selection bar 701 , a control 702A, a control 702B, a device display bar 703 , and a real-time viewfinder control 704 .

[0228] The connection device selection bar 701 includes device options (which may alternatively be referred to as device icons) for one or more nearby devices, such as a HUAWEI Vision, a Matepad, a Matebook, or a Sound box. The device options displayed in area 1202 are used to trigger a share operation. In response to a detected operation performed on a device option (e.g., a tap operation on a device icon), the electronic device 100 triggers a process to share selected data or a task with the device corresponding to the device option selected in the operation. The process may include the electronic device 100 establishing a communication connection to the device corresponding to the selected device option and then transmitting the selected data or task to the device corresponding to the device option by using the communication connection.

[0229] Control 702B indicates a preset mode. In the preset mode, one or more devices can be controlled in a unified manner. For example, the preset mode is a home mode. In the home mode, the electronic devices corresponding to device icons 703B, 703C, and 703F are automatically turned on, and the electronic devices corresponding to device icons 703A and 703D are automatically turned off.

[0230] Control 702B indicates another preset mode. In the preset mode, one or more devices can be controlled in a unified manner. For example, a preset mode is an away mode. In the away mode, the electronic devices corresponding to device icons 703B, 703C, and 703F are automatically turned off, and the electronic devices corresponding to device icons 703A and 703D are automatically turned on.

[0231] The device display bar 703 includes a plurality of device icons, such as a Huawei AI sound box 703A, a smart TV 703B, an air purifier 703C, a smart desk lamp 703D, a Bluetooth headset 703E, and an air conditioning partner 703F. Any one of the plurality of device icons displayed in the device display bar 703 can receive a user input operation (e.g., a tap operation), and in response to the detected input operation, the electronic device 100 displays a control interface for the device.

[0232] The air purifier 703C includes a control 7031, which is configured to control the air purifier 703C on and off. The smart desk lamp 703D and the air conditioning partner 703F also include the same control as the control 7031. Devices such as the Huawei AI sound box 703A and the smart TV 703B cannot be turned on and off by using the user interface 710.

[0233] The real-time viewfinder control 704 is configured to trigger entry into the viewfinder interface. When the electronic device 100 detects a user operation on the real-time viewfinder control 704, the electronic device 100 displays the viewfinder interface 530 shown in Figure 5F. Optionally, the electronic device 100 displays the viewfinder interface 530 shown in Figure 5E, and then displays the viewfinder interface 530 shown in Figure 5F.

[0234] In some embodiments, the real-time viewfinder control 704 of the user interface 710 is optional, and the electronic device 100 may not display the real-time viewfinder control 704. When the electronic device 100 displays the user interface 710 and the electronic device 100 detects an uplift operation, the electronic device 100 may display the viewfinder interface 530. As shown in FIG. 7C , FIG. 7C illustrates an example of an uplift operation. The electronic device 100 displays the user interface 710 at a time T1. When the electronic device 100 detects the uplift operation, the electronic device 100 displays the viewfinder interface 530 at a time T2. The time interval between the time T1 and the time T2 is less than a threshold.

[0235] It can be appreciated that the uplift operation is just one example of a user operation, and that the electronic device 100 may also enter the viewfinder interface 530 by using other user operations.

[0236] The present application is not limited to the above methods of opening the viewfinder interface 530. In the present application, to enter the viewfinder interface 530, the camera may be activated, for example, by using a camera application, or other applications, such as an instant messaging application or a payment application, may be used to trigger entering the viewfinder interface 530.

[0237] In the present application, the display format of device icon 5311, device icon 5321, device icon 5331, and device icon 5341 in viewfinder interface 530 shown in FIG. 5F is arbitrary. FIGS. 8A to 8D provide alternative display formats of device icons. The device icon may change along with the display content of the viewfinder interface. At a first time point, the display area of ​​the device is at a first position in the viewfinder interface, and the device icon of the device is displayed at or near the first position in the viewfinder interface. At a second time point, if the display area of ​​the device is at a second position in the viewfinder interface, the device icon of the device is displayed at or near the second position in the viewfinder interface.

[0238] As shown in Figure 8A, user interface 530 is displayed in Figure 8A. For an explanation of Figure 8A, see the associated description of Figure 5F. For example, viewfinder interface 530 in Figure 8A includes device image 534, and device icon 5341 is displayed near device image 534 in viewfinder interface 530, where device icon 5341 partially overlaps the display area of ​​device image 534. Viewfinder interface 530 includes device image 531, and device icon 5311 is displayed near device image 531 in viewfinder interface 530, where device icon 5311 completely overlaps the display area of ​​device image 531.

[0239] It can be seen that the display area of ​​a device icon corresponds to the display area of ​​the corresponding device image.

[0240] In some embodiments, if the display content of the viewfinder interface keeps changing, the electronic device 100 does not display the device icon until the duration of the steady state of the electronic device 100 exceeds a preset time, and the electronic device 100 displays the device icon based on the display content of the viewfinder interface. Specifically, the electronic device 100 may determine the steady state of the electronic device 100 by using an acceleration sensor and / or a gyroscope sensor.

[0241] In some embodiments, the display area of ​​a device icon is relative to the display areas of other device icons, e.g., the display areas of the device icons are not occluded by each other.

[0242] Compared with Figure 8A, the shooting direction or angle in Figure 8B is different from that in Figure 8A. In the viewfinder interface 810 in Figure 8B, there is an additional display portion of the device image 534, and the display area of ​​the device icon 5341 completely overlaps with the display area of ​​the device image 534.

[0243] 8A, in the viewfinder interface 820 of FIG. 8C, device image 531 partially overlaps device image 533, and device icon 5311 is displayed above device image 531 and close to the display area of ​​device image 531. The display area of ​​device icon 5311 does not overlap the display area of ​​device image 531.

[0244] It is understood that the display area of ​​the device icon may vary along with the display area of ​​the device image. For example, the display area of ​​the device icon may be at the center (or any position) of the display area of ​​the device image according to the display area of ​​the device image in the viewfinder interface 530. The display area of ​​the device icon may be at the top (bottom, left, or right) of the device image.

[0245] In some embodiments, if a device is not within camera range, the viewfinder interface of electronic device 100 does not include a device image for that device. A device icon for the device may be displayed in a particular manner in the viewfinder interface.

[0246] The electronic device 100 enters a viewfinder interface, activates a camera, displays an image captured by using the camera in real time in the viewfinder interface, and sends a detection request using wireless positioning technology. The electronic device 100 determines devices near the electronic device 100 based on the received detection responses to the detection request, and further determines one or more of the following information: device name, device type, and physical distance or angle from the nearby devices. The electronic device 100 performs image recognition on the image captured by the camera to identify the electronic device (e.g., a sound box, a computer, or a tablet computer) in the image.

[0247] When the electronic device 100 receives four detection responses, the electronic device detects that there are four nearby electronic devices. The detection responses carry device identification information, such as device names and device types. The electronic device 100 determines the device names, device types, etc. of the four electronic devices, such as Matepad (device type: tablet computer), HUAWEI soundX (device type: sound box), Matebook (device type: computer), and Matebook (device type: computer), and also determines orientation information (physical distances and angles between the four electronic devices and the electronic device 100) by using wireless positioning technology.

[0248] The image captured by the electronic device 100 includes images of only three electronic devices. The electronic device 100 determines, based on the orientation information of the four electronic devices, that one of the electronic devices is not within the field of view of the camera of the electronic device 100, or the electronic device 100 identifies the device types of the three electronic devices by using computer vision technology and determines the electronic devices and device types that are not in the image by referring to the device types of the four electronic devices. Then, the electronic device 100 displays device icons of the electronic devices that are not in the image in a first preset manner. For example, the first preset manner may be to display them at a fixed position in a viewfinder interface, or to display them at a position related to the orientation information.

[0249] For example, as shown in FIG. 8A, in viewfinder interface 530 of FIG. 8A, device image 531 is a partially displayed image of device 202, device icon 5311 is displayed near device image 531 in viewfinder interface 530, and the display area of ​​device icon 5341 completely overlaps the display area of ​​device image 534.

[0250] Compared with FIG. 8A , the shooting direction or angle in FIG. 8B is different from that in FIG. 8A . In this case, device 202 is not within the camera's field of view, and viewfinder interface 810 in FIG. 8B does not include a device image of device 202. Viewfinder interface 810 displays icon 801 and prompt 802. Prompt 802 is configured to prompt the user that icon 801 is a special icon. Icon 801 is displayed on the left edge of viewfinder interface 810 of electronic device 100 to prompt the user that device Matepad is outside the field of view of the camera of electronic device 100. Optionally, icon 801 may trigger the electronic device to display a control interface for device image 531.

[0251] In some embodiments, icon 801 or prompt 802 may indicate the orientation of the device (including angle, distance, etc.). For example, icon 801 is displayed on the left edge of electronic device viewfinder interface 810 to prompt the user that device Matepad is on the left side of electronic device 100 and out of the field of view of the camera of electronic device 100. Optionally, the orientation of the device may be indicated in text form.

[0252] In this application, when the above device Matepad is referred to as a third electronic device, the icon 801 or the prompt 802 may alternatively be referred to as a third label.

[0253] In some embodiments, if a device is occluded by another object, the viewfinder interface of electronic device 100 does not include a device image for that device. A device icon for that device may be displayed in the viewfinder interface in a particular manner.

[0254] When the electronic device 100 receives four detection responses, the electronic device detects that there are four nearby electronic devices. The detection responses carry device identification information, such as device names and device types. The electronic device 100 determines the device names, device types, etc. of the four electronic devices, such as Matepad (device type: tablet computer), HUAWEI soundX (device type: sound box), Matebook (device type: computer), and Matebook (device type: computer), and also determines orientation information (physical distances and angles between the four electronic devices and the electronic device 100) by using wireless positioning technology.

[0255] The image captured by the electronic device 100 includes images of only three electronic devices. Based on the orientation information of the four electronic devices, the electronic device 100 detects that all four electronic devices are within the field of view of the camera of the electronic device 100 and then determines that one electronic device is occluded. The electronic device 100 identifies the device types of the three electronic devices in the image by using computer vision technology and determines the occluded electronic device and its device type by referring to the device types of the four electronic devices. The electronic device 100 displays the device icons of the occluded electronic devices in the image in a second preset manner. For example, the second preset manner may be to display the device icons at a fixed position in the viewfinder interface or at a position related to the orientation information.

[0256] For example, as shown in Figure 8C, compared with Figure 8A, the viewfinder interface 820 of Figure 8C does not include the device image 532. The viewfinder interface 820 displays an icon 803 and a prompt 804. The prompt 804 is configured to prompt the user that the icon 803 is a special icon. The icon 803 is displayed in the central area of ​​the viewfinder interface 820 of the electronic device 100 to prompt the user that the device HUAWEI soundX is within the shooting range of the camera of the electronic device 100. Optionally, the icon 803 may trigger the electronic device 100 to display a control interface of the device image 532 (i.e., the HUAWEI soundX).

[0257] In some embodiments, icon 803 or prompt 804 may indicate the orientation of the device (including angle, distance, etc.). For example, icon 803 is displayed above device image 5331 in viewfinder interface 820 of electronic device 100 and is used to prompt the user that device HUAWEI soundX is occluded by device 203 corresponding to device image 5331. Optionally, the orientation of the device may alternatively be indicated in text form (e.g., "HUAWEI soundX is directly behind device image 5331"), or that the device is occluded in text form.

[0258] Optionally, the display area of ​​icon 803 does not overlap with the display areas of other device images and device icons. Electronic device 100 determines the display area of ​​icon 803 based on the display areas of device image 531, device image 533, device image 534, device icon 5311, device icon 5331, and device icon 5341 displayed in viewfinder interface 820.

[0259] In this application, when the device HUAWEI soundX is referred to as a third electronic device, the icon 803 or the prompt 804 may alternatively be referred to as a second label.

[0260] In some embodiments, if the other device does not have wireless positioning technology that can be used for identification, electronic device 100 identifies the type of other device (e.g., a mobile phone, tablet, television, or sound box) by using computer vision to find the device type that corresponds to a device logged into the same account as electronic device 100.

[0261] For example, when the electronic device 100 receives three detection responses, the electronic device detects that there are three electronic devices nearby. The detection responses carry device identification information, such as device name and device type. The electronic device 100 determines that the three electronic devices are a Matepad (device type: tablet computer), a HUAWEI soundX (device type: sound box), and a Matebook (device type: computer), respectively, and also determines orientation information (physical distances and angles between the three electronic devices and the electronic device 100) by using wireless positioning technology.

[0262] The image captured by the electronic device 100 includes images of four electronic devices. The electronic device 100 uses computer vision recognition technology to determine the display areas of the images of the four electronic devices in the viewfinder interface and determine that the device types of the four electronic devices are a tablet computer, a sound box, a computer, and a computer, respectively. In this case, the electronic device 100 searches for a computer among devices logged in using the same account as the electronic device 100. Each electronic device has its own login account. An account can be associated with one or more electronic devices. The electronic device 100 searches for an associated electronic device whose device type is a computer under the account of the electronic device 100. If so, the electronic device 100 considers that the computer has an association relationship with the device image in the image. The electronic device 100 displays the device icon of the computer in the image in a preset manner. For example, the preset manner may be to display the device icon at a fixed position in the viewfinder interface or at a position related to the display area of ​​the device image in the image.

[0263] For example, as shown in Figure 8D, compared to Figure 8A, viewfinder interface 830 includes device icon 805 and prompt 806. Prompt 806 indicates that device icon 805 is an uncertain icon, indicating that there is an uncertain association relationship between the device corresponding to device image 533 and device icon 805.

[0264] In this application, when the device corresponding to device image 533 is referred to as a fourth electronic device, device icon 805 or icon 806 may alternatively be referred to as a fourth label.

[0265] In some embodiments, if the other device does not have wireless positioning technology that can be used for identification, electronic device 100 identifies the device type (e.g., cell phone, tablet, television, or sound box) by using computer vision and locates devices of the same device type that are in the same geographic location as electronic device 100 by using GPS information of electronic device 100.

[0266] For example, when the electronic device 100 receives three detection responses, the electronic device detects that there are three electronic devices nearby. The detection responses carry device identification information, such as device name and device type. The electronic device 100 determines that the three electronic devices are a Matepad (device type: tablet computer), a HUAWEI soundX (device type: sound box), and a Matebook (device type: computer), respectively, and also determines orientation information (physical distances and angles between the three electronic devices and the electronic device 100) by using wireless positioning technology.

[0267] The image captured by the electronic device 100 includes images of four electronic devices. The electronic device 100 determines the display areas of the images of the four electronic devices in the viewfinder interface by using computer vision recognition technology, and determines that the device types of the four electronic devices are a tablet computer, a sound box, a computer, and a computer, respectively. In this case, the electronic device 100 searches for a computer among electronic devices in the same geographic location as the electronic device 100.

[0268] The setting interface of each electronic device may include a geographic location setting. For example, if the electronic device 100 is paired with and connected to a smart desk lamp, the user sets the device location of the smart desk lamp to "room" in the application software (e.g., Smart Life) associated with the smart desk lamp. If the electronic device 100 is paired with and connected to a smart sound box, the user sets the device location of the smart sound box to "living room" in the application software (e.g., Smart Life) associated with the smart sound box. If the electronic device 100 is paired with and connected to a computer, the user sets the device location of the computer to "office" in the application software (e.g., Smart Life) associated with the computer. The electronic device 100 determines the area in which the electronic device 100 is located based on the geographic location of the electronic device. For example, the electronic device 100 determines through GPS positioning that the location of the electronic device 100 is within the office, and then searches for electronic devices whose device type is "computer" among the electronic devices whose device location is set to "office." If so, the electronic device 100 considers the computer to have an association relationship with the device image in the image. The electronic device 100 displays the device icon of the computer in the image in a preset manner. For example, the preset manner may be to display it at a fixed position in the viewfinder interface, or to display it at a position relative to the display area of ​​the device image in the image. For the content of this part, please refer to the related description of FIG. 8D.

[0269] In this application, when the device corresponding to device image 533 is referred to as a fifth electronic device, device icon 805 or icon 806 may alternatively be referred to as a fifth label.

[0270] In some embodiments, if the other device does not have wireless positioning technology that can be used for identification and electronic device 100 cannot accurately identify the location information of two devices of the same type, the electronic device outputs two labels for the user to choose from.

[0271] For example, an image captured by electronic device 100 includes images of two electronic devices. Electronic device 100 determines the display areas of the images of the two electronic devices in a viewfinder interface by using computer vision recognition technology and determines that the device types of the two electronic devices are sound boxes. Electronic device 100 does not receive a detection response and cannot determine the encirclement of the two sound boxes.

[0272] The electronic device 100 may search for whether a corresponding device type exists among devices logged in to the same account as the electronic device 100, or may search for whether a corresponding device type exists among devices in the same geographic location as the electronic device 100, by using the methods described in the above two embodiments. When the electronic device 100 determines a device whose device type is a sound box in the two methods, the electronic device 100 displays a device icon of the sound box in the image in a preset manner. For example, the preset manner may be to display it at a fixed position in the viewfinder interface, or to display it at a position related to the display area of ​​the device image in the image.

[0273] When the electronic device 100 determines two devices whose device type is sound box in two ways, the electronic device cannot associate the two sound box devices with the two sound box images in the image one-to-one, so the electronic device 100 displays the two sound box device icons in the image in a preset manner. The preset manner may be, for example, displaying the device icons at fixed positions in the viewfinder interface, or, as another example, presenting the device icons in the viewfinder interface in the form of a control. When the electronic device 100 detects a user operation on the control, the electronic device 100 outputs two device icons for the user to select.

[0274] The present application further provides a display format of device icons to achieve the effect of preventing the display areas of device icons from overlapping. As shown in FIG. 8E , FIG. 8E illustrates a display format in which device icons are displayed in the upper area of ​​the display area of ​​a device image by using lines. As shown in FIG. 8E , device image 531 and device icon 5311 are connected by a line indicating that device icon 5311 corresponds to device image 531, device image 532 and device icon 5321 are connected by a line indicating that device icon 5321 corresponds to device image 532, device image 533 and device icon 5331 are connected by a line indicating that device icon 5331 corresponds to device image 533, and device image 534 and device icon 5341 are connected by a line indicating that device icon 5341 corresponds to device image 534.

[0275] In some embodiments, when electronic device 100 detects that the display areas of device icons overlap each other, or the shortest distance between the display areas of two device icons in the viewfinder interface is less than a threshold, electronic device 100 outputs the device icon shown in FIG. 8E to prevent the display areas of the device icons from overlapping.

[0276] Based on the viewfinder interface 530, the present application further provides a data transmission method. A user can immediately share selected data (e.g., an image, a file, or a video) with other devices in the viewfinder interface 530 by performing a slide operation (or a tap operation). In this way, the operation steps for sharing data by a user can be simplified, and the efficiency of sharing data with other devices can be improved. The following uses three application scenarios separately as examples to explain the data transmission method in detail.

[0277] Application Scenario 1: In the UI embodiment shown in Figures 9A to 9E as an example, a user may trigger a share function in the multitasking interface based on an augmented reality display to share an application or application data within the multitasking interface with another device.

[0278] As shown in Fig. 9A, a user interface 520 is displayed in Fig. 9A. For a description of the user interface 520, please refer to the related description in Fig. 5B. For example, when the electronic device 100 detects a long press operation 901 on the card 521, the electronic device enters a sharing interface corresponding to the card 521. The electronic device 100 extracts the application corresponding to the card 521 and the type of data that can be shared in the current interface of the card 521, and presents them in the sharing interface in an icon format.

[0279] As shown in Figure 9B, electronic device 100 activates the camera, captures images in real time by using the camera, and displays the images in sharing interface 920. The display content of sharing interface 920 includes the images captured by the camera. Figure 9B shows the content of sharing interface 920. Sharing interface 920 includes device image 531, device image 532, device image 533, and device image 534.

[0280] For specific descriptions of device image 531, device image 532, device image 533, device image 534, device icon 5311, device icon 5321, device icon 5331, and device icon 5341 in sharing interface 920, please refer to the relevant descriptions of device image 531, device image 532, device image 533, device image 534, device icon 5311, device icon 5321, device icon 5331, and device icon 5341 in FIG. 5F , and the details will not be described again here.

[0281] The sharing interface 920 may further include one or more icons, each identifying a type of data that can be shared, such as an application icon 902 and a file icon 903. The application icon 902 is associated with the application on the card 521, and the file icon 903 is associated with the "Novel 1" PDF document on the card 521.

[0282] The user may drag an icon to the display area of ​​the corresponding device by dragging. After the user releases the icon, the electronic device 100 transmits the data corresponding to the icon to the device. As shown in FIG. 9 , after selecting the file icon 903, the user drags the file icon 903 in the sharing interface 920 and drags the file icon 903 to the active area of ​​the device image 534. The active area is an area where the user can instruct the electronic device 100 to share data with the electronic device (electronic device 204) corresponding to the device image 534. After the user releases the icon, the electronic device 100 transmits the PDF document of "Novel 1" associated with the file icon 903 to the electronic device (electronic device 204) corresponding to the device image 534 via wireless communication.

[0283] Specifically, wireless communication methods include, but are not limited to, Zig-Bee, Bluetooth, Wireless Fidelity (Wi-Fi), Ultra-Wideband (UWB), Near Field Communication (NFC), Wi-Fi Direct, and the like.

[0284] In some embodiments, when a user drags a file icon 903 to the display area of ​​a device image 534, electronic device 100 increases the brightness of the display area of ​​device image 534 in sharing interface 920 to indicate that the user is dragging the current file icon 903 to the display area of ​​device image 534.

[0285] In some embodiments, the user drags file icon 903 to the display area of ​​device icon 5341. After the user releases the icon, electronic device 100 wirelessly transmits the PDF document of "Novel 1" associated with file icon 903 to the electronic device corresponding to device image 534 (electronic device 204).

[0286] As shown in FIG. 9D , the electronic device 204 receives the PDF document of "Novel 1" sent by the electronic device and outputs a prompt box 1001 on the display interface 1000 of the electronic device 204. The text content of the prompt box 1001 may be "A PDF file from your electronic device has been received. Tap the prompt box to confirm." When the electronic device 204 detects a tap operation on the prompt box 1001, the electronic device 204 opens the PDF document of "Novel 1." As shown in FIG. 9E , the PDF document of "Novel 1" is displayed on the display interface 1002 of the electronic device 204. In some embodiments, FIG. 9D is optional. When the electronic device 204 receives the PDF document of "Novel 1" sent by the electronic device, the electronic device 204 directly opens the document, as shown in FIG. 9E .

[0287] In this application, the icon to be shared may alternatively be referred to as the first icon. After selecting the file icon 903, the user drags the file icon 903 in the sharing interface 920 and drags the file icon 903 to the active area of ​​the device image 534. The drag operation may alternatively be referred to as the third operation.

[0288] In some embodiments, the electronic device 100 may determine whether the target device can support the output of the data type based on the type of data the user wants to share. If the target device does not support the output of the data type, prompt information is displayed to prompt the user to select another device other than the target device.

[0289] 10A and 10B , the electronic device drags a file icon 903 to the display area of ​​the device image 532 in a dragging manner. The device type of the electronic device 201 corresponding to the device image 532 is an audio device, and the device attributes of the electronic device 201 do not include a display function. Therefore, when the electronic device 100 detects that the user has dragged the file icon 903 to the display area of ​​the device image 532, the electronic device 100 outputs prompt information 1100 stating "HUAWEI soundX cannot perform the task" to indicate that the electronic device corresponding to the device image 532 cannot output the PFD document corresponding to the file icon 903. Optionally, after the user drags the file icon 903 to the display area of ​​the device image 532 and releases the icon, the electronic device 100 outputs prompt information 1100.

[0290] The present application is not limited to the manner shown in Figures 10A and 10B. In some embodiments, a user may be prompted with selectable devices for data sharing by using a device icon display format.

[0291] As shown in FIG. 10C , the user selects file icon 903. Because file icon 903 is associated with the PDF document "Novel 1," when the electronic device detects that file icon 903 is selected, the display areas of device icons 5311, 5331, and 5341 in viewfinder interface 920 become brighter (or the icon color changes). Optionally, the display areas of device images 531, 533, and 534 become brighter. This indicates that electronic device 202, electronic device 203, and electronic device 204, which correspond to device images 531, 533, and 534, respectively, indicated by device icon 5311, device icon 5331, and device icon 5341, are devices that support output of the PDF document associated with file icon 903. The user is prompted to drag file icon 903 to the display areas of these devices for data sharing.

[0292] Optionally, the brightness (or color) of the display area of ​​device icon 5321 is different compared to that of device icon 5311, device icon 5331, and device icon 5341, indicating that the electronic device 201 corresponding to device icon 5321 does not support output of the PDF document associated with file icon 903, and prompting the user not to drag file icon 903 into the display area of ​​device image 532.

[0293] In this application, the display formats of device icon 5311, device icon 5331, and device icon 5341 may alternatively be referred to as a first display format, and the display format of device icon 5321 may alternatively be referred to as a second display format. Additional display formats of device icons may exist, and this is not a limitation of this application.

[0294] Application Scenario 2: In the UI embodiment shown in Figures 11A to 11D as an example, a user can use a screenshot operation to trigger a sharing function based on the augmented reality display to share the screenshot image with other devices.

[0295] 11A , which illustrates a user interface 1110. Optionally, the user interface 1110 may be any display interface of an electronic device. When the electronic device 100 displays the user interface 1110 and receives a screenshot operation, the electronic device 100 collects the display content of the current interface and generates a picture file. The screenshot operation may be triggered by using one or more virtual buttons or may be triggered by using one or more physical buttons.

[0296] As shown in FIG. 11B , the electronic device 100 receives a screenshot operation, collects the display content of the current interface, and generates a picture file. A screenshot thumbnail 1111 is displayed on the current user interface 1110. The screenshot thumbnail 1111 is associated with a corresponding picture file. As shown in FIG. 11C , the user long-presses the screenshot thumbnail 1111. When the electronic device 100 detects the long-press operation on the screenshot thumbnail 1111, the sharing function is triggered, and the electronic device displays the sharing interface 1120 shown in FIG. 11D . The electronic device activates the camera, captures images in real time by using the camera, and displays the images in the sharing interface 1120. The display content of the sharing interface 1120 includes the images captured by the camera. As shown in FIG. 11D , FIG. 11D illustrates an example of the sharing interface 1120. The sharing interface 1120 includes a device image 531, a device image 532, a device image 533, and a device image 534.

[0297] The sharing interface 1120 further includes a screenshot thumbnail 1111. A user may freely drag the screenshot thumbnail 1111. When a user drags the screenshot thumbnail 1111 in the sharing interface 1120 to the display area of ​​any device, after the user releases the thumbnail, the electronic device 100 sends the picture file associated with the screenshot thumbnail 1111 to that device.

[0298] It should be noted that, based on the same inventive concept, the principle of a user dragging the screenshot thumbnail 1111 to the display area of ​​another device for sharing in this embodiment of the present application is similar to the principle of a user dragging the file icon 903 to the display area of ​​another device for sharing. Therefore, for the implementation of a user dragging the screenshot thumbnail 1111 to the display area of ​​another device for sharing, please refer to the corresponding description of the implementation of a user dragging the file icon 903 to the display area of ​​another device for sharing, for example, refer to the implementation and corresponding description shown in Figures 9C to 9E. The details will not be described again here.

[0299] Application Scenario 3: In the UI embodiment shown in Figures 12A to 12E as an example, when the electronic device detects an operation of selecting an image for sharing, the user may trigger a sharing function based on the augmented reality display to share one or more picture files with other devices.

[0300] 12A illustrates an example of a user interface 1201. As illustrated in FIG. 12A, the user interface 1201 may include one or more of the following areas: area 1201, area 1202, and area 1203. 。

[0301] Area 1201 is " Gallery ”The area 1201 may be used to display one or more pictures in the area 1201, and the one or more pictures may include a picture selected by the user, for example, a selected picture 1205. In some embodiments, a mark 1206 may be displayed on the selected picture 1205, and the mark 1206 may indicate that the picture 1205 corresponding to the mark 1206 has been selected by the electronic device 100 (i.e., the picture has been selected by the user). In some other embodiments, the user may switch or update by using a left or right sliding gesture or the like in the area 1201. The picture 1205 may be a thumbnail. The original picture corresponding to the picture displayed in the area 1205 may be a picture stored on the electronic device 100 or may be stored on a cloud server.

[0302] One or more service options (e.g., " browser ” and " message ” ) may be displayed in area 1203. An application or protocol corresponding to the service option may support sharing a picture selected by a user with a contact or a server. In some embodiments, electronic device 100 may trigger a process of sharing the selected picture with a cloud contact or a server by using the application or protocol corresponding to the service option in response to an operation performed on the service option and detected in area 1203 (e.g., a touch operation on a “Message” icon). The process may include electronic device 100 opening the application or protocol, displaying a user interface of the application or protocol, and, upon detecting a user operation to share data in the user interface, sharing the selected picture with the cloud contact or the server by using the application or protocol in response to the operation.

[0303] Area 1202 may be used to display nearby device options automatically discovered by electronic device 100, such as Huawei Vision, Mate 30 Pro, Matebook X, or a printer. The device options (e.g., Mate 30 Pro or Matebook X) displayed in area 1202 may be used to trigger a share operation. In response to a detected operation performed on a device option (e.g., a touch operation on a device icon), electronic device 100 may trigger a process to share a selected picture with a device corresponding to the device option selected in the operation. The process may include electronic device 100 establishing a communication connection to the device corresponding to the selected device option and then transmitting the selected picture to the device corresponding to the device option by using the communication connection.

[0304] The user interface 1210 further includes a real-time viewfinder sharing control 1204, 1204 is configured to trigger entering the sharing interface. share control 1204 12B, the electronic device 100 activates the camera and displays the sharing interface 1220 shown in FIG. 12B. The sharing interface includes an image captured by the camera, a device icon, and a to-be-shared picture bar 1221.

[0305] In some embodiments, the real-time viewfinder of the user interface 1210 share Control 1204 is optional and the electronic device 100 may include a real-time viewfinder. shareThe control 1204 may not be displayed. When the electronic device displays the user interface 1210 and the electronic device 100 detects an uplift operation, the electronic device 100 triggers the display of the sharing interface 1220. For the uplift operation, see the description of FIG. 7C . In this embodiment, the electronic device 100 displays the user interface 1210 at a time T1, and when the electronic device 100 detects an uplift operation, the electronic device 100 displays the sharing interface 1220 at a time T2. The time interval between the time T1 and the time T2 is less than the threshold value.

[0306] It may be understood that the uplift operation is just one example of a user operation, and that the electronic device 100 may also enter the sharing interface 1220 by using other user operations.

[0307] Picture Bar 1221 is " Gallery ” 12. The one or more pictures may include a picture selected by a user, such as a selected picture 1205. In some embodiments, a mark 1206 may be displayed over the selected picture 1205, and the mark 1206 may indicate that the picture 1205 corresponding to the mark 1206 has been selected by the electronic device 100 (i.e., the picture has been selected by the user). In some other embodiments, the user may switch or update by using a left or right sliding gesture or the like in the area 1201.

[0308] After selecting one or more pictures, the user selects a device in the sharing interface. When electronic device 100 detects a user action on a device icon (e.g., a tap action on the device icon), electronic device 100 may trigger a process to share the selected pictures with the device corresponding to the device icon selected by the user. The process may include electronic device 100 establishing a communication connection to the device corresponding to the selected device icon and then transmitting the selected pictures to the device corresponding to the device icon by using the communication connection.

[0309] As shown in FIG. 12C, after selecting the picture 1205, the user taps on the device icon 5311. The electronic device 100 detects the user's operation on the device icon 5311 and sends the picture 1205 to the electronic device 202 corresponding to the device image 531. As shown in FIG. 12D, the electronic device 202 receives the picture 1205 sent by the electronic device 100 and outputs a prompt box 1211 on the display interface of the electronic device 202. The text content of the prompt box 1211 reads, "From the electronic device Picture When the electronic device 202 detects a tap operation on the prompt box 1211, the electronic device 202 opens the picture 1205. 12 As shown in Figure 12E, the picture 1205 is displayed in the display interface of the electronic device 202. In some embodiments, Figure 12D is optional. The electronic device 202 receives the picture 1205 sent by the electronic device, and the electronic device 202 opens the picture directly, as shown in Figure 12E.

[0310] In some embodiments, the user may be prompted with selectable devices for data sharing by using a device icon display format.

[0311] 12F , the user selects picture 1205. Because the data type of picture 1205 is picture, when the electronic device detects that picture 1205 is selected, the display areas of device icon 5311, device icon 5331, and device icon 5341 in the viewfinder interface 920 become brighter (or the color of the icon changes). Optionally, the display areas of device image 531, device image 533, and device image 534 become brighter. This indicates that electronic device 202, electronic device 203, and electronic device 204, which correspond to device image 531, device image 533, and device image 534, respectively, indicated by device icon 5311, device icon 5331, and device icon 5341, are devices that support the output of picture 1205. The user is prompted to tap the device icons of these devices to share the data.

[0312] Optionally, the brightness (or color, etc.) of the display area of ​​device icon 5321 is different compared to that of device icon 5311, device icon 5331, and device icon 5341, indicating that the electronic device 201 corresponding to device icon 5321 does not support output of picture 1205 and prompting the user not to tap the display area of ​​device image 532.

[0313] In the present application, the device icon may be displayed in further formats, which is not a limitation of the present application.

[0314] In the three exemplary scenarios, data transmission between devices is performed based on the device identification method provided in the embodiments of the present application, thereby simplifying the operation steps of users sharing data and improving the efficiency of sharing data with other devices. Specifically, the embodiments of the present application further provide a photo sharing method, which allows users to immediately share photos in the photo capture preview interface of the camera application. The photo sharing method is described in detail below.

[0315] In an environment with many terminals, sharing pictures, files, etc. between multiple terminals is becoming more and more common. How to quickly and efficiently find the target terminal with which a user expects to share, and how to improve the efficiency and experience of users searching for the target terminal, becomes very important.

[0316] A mobile phone is used as an example. After taking photos by using a mobile phone, users often need to share the photos with other users or other electronic devices. In the current process of sharing photos by users, users need to perform a series of complicated operations, such as: " Gallery ” Multiple operations need to be performed, such as opening the app, selecting a photo, tapping to share, searching for other electronic devices, selecting the target electronic device, and sending the photo to share the photo with the target electronic device. In the photo sharing process, the operations are complicated, there are multiple interaction procedures, and the efficiency of sharing photos is low.

[0317] 13(a), 13(b), 13(c), 13(d), and 13(e) are schematic diagrams of graphical user interfaces (GUI) for an example photo sharing process. FIG. 13(a) shows interface content 1301 currently output by a mobile phone in unlocked mode. The interface content 1301 includes: " music ” ," setting ” , " Gallery ” , and " camera ” It should be understood that the interface content 1301 may further include more applications, which is not limited in this embodiment of the present application.

[0318] As shown in Figure 13(a), a user taps the icon of the camera application, and in response to the user's tapping operation, the mobile phone enters the main interface 1302 of the camera application, or the "photo-taking preview interface," shown in Figure 13(b). The image presented in the photo-taking preview interface is called a "preview picture" or "preview image."

[0319] 13(b), it should be understood that the photo-taking preview interface 1302 may include a preview image in the center and buttons, menu options, etc. of the camera application displayed in upper and lower regions of the interface. In subsequent embodiments, both the photo-taking preview interface and the preview image may be used to describe the photo-taking interface of the camera application, and for example, "displaying a reminder window in the photo-taking preview interface" or "displaying a reminder window in the preview image" are not strictly distinguished. Details will not be described again subsequently.

[0320] It should be further understood that in this embodiment of the present application, the photo-taking preview interface may display an interface including a preview image, a photo-taking shutter button, a local album icon, a camera switching icon, etc. If the display content of the interface changes, for example, the label of the identified device is displayed, the interface may still be referred to as a photo-taking preview interface. Details will not be described again thereafter.

[0321] The main interface 1302 of the camera application includes multiple buttons and menu options, such as a photo-taking shutter button 31, a local album icon 32, and a camera switching button 33. A user can perform different operations by using the multiple buttons and menu options. A user may perform operation 1 shown in FIG. 13(b) to tap the photo-taking shutter button 31. In response to the user's photo-taking operation, the mobile phone takes a photo and saves the captured photo in the local album.

[0322] When a user expects to share the currently taken photo or other photos in the local album with other electronic devices, the user may perform operation 2 shown in FIG. 13(b) to tap the local album icon 32 in the main interface 1302 of the camera application, and in response to the user's tapping operation, the mobile phone enters a photo display interface 1303. The photo display interface 1303 may display the currently taken photo. As shown in FIG. 13(c), the user taps the "Share" button in the photo display interface 1303, and then the mobile phone enters a photo sharing interface 1304.

[0323] The photo sharing interface 1304 may include a photo area and a sharing menu area. The photo area may display multiple photos taken, and the user may tap the "Select" box in the lower right corner of the photo to select the photo they wish to share. The sharing menu area may provide the user with multiple photo sharing methods, such as "Huawei Share," "Send to a Friend," "Bluetooth," "Send to a Friend," "Weibo," "Message," "Email," and "Notes." Different photo sharing methods may be associated with different applications (e.g., WeChat), and the details will not be described again here.

[0324] As shown in Fig. 13(d), the user taps the "Huawei Share" button in the photo sharing interface 1304, and the mobile phone enters the interface shown in Fig. 13(e), displaying multiple electronic devices that can be shared, such as Ma's P30 and MateBook. The user may select the icon of the target electronic device to be shared according to the user's requirements to share the selected photo with the target electronic device.

[0325] Accordingly, after a user taps a target electronic device with which the user expects to share a photo, a receiving window may pop up on the target electronic device, and the receiving window may be used to select whether to receive the currently shared photo.

[0326] The above describes a process for a user to take a photo by using a camera application and then share the photo with other electronic devices. " Gallery ”Multiple user operations are successively performed, such as opening the app, selecting a picture, tapping Share, selecting a sharing method, searching for other electronic devices, selecting a target electronic device, and sending the picture, and then the taken photo can be shared with the target electronic device. This photo sharing process is complicated, involves multiple interaction procedures, and has low efficiency in sharing photos.

[0327] Therefore, embodiments of the present application provide a photo sharing method. In the UI embodiments shown in Figures 14(a), 14(b), 14(c), 14(d), and 14(e) through 18, a user can instantly share photos with other electronic devices by using a camera application.

[0328] 14(a), 14(b), 14(c), 14(d), and 14(e) are schematic diagrams of graphical user interfaces of an example of a photo sharing process according to an embodiment of the present application. As shown in FIG. 14(a), in unlocked mode, a user taps the icon of a camera application in interface content 1401 currently output by the mobile phone. In response to the user's tapping operation, the mobile phone displays a photo-taking preview interface 1402 shown in FIG. 14(b). In the photo-taking preview interface 1402, the user taps the photo-taking shutter button 31. In response to the user's photo-taking operation, the mobile phone takes a photo and saves the captured photo in a local album.

[0329] The user performs the operation shown in Fig. 14(c) to long press the local album icon 32. In response to the user's long press operation, the mobile phone displays the interface 1404 shown in Fig. 14(d), which displays thumbnail, or also called "photo thumbnail," icons 30 in the interface 1404. Furthermore, the mobile phone activates a device identification function and, based on the preview image presented in the current photo taking preview interface 1404, identifies whether the preview image includes other electronic devices.

[0330] 14(d), if the currently presented preview image includes a mobile phone 10 and a personal computer (PC) 20 on a table, the mobile phone may identify the mobile phone 10 and the PC 20 in the preview image and display the names of the identified mobile phone 10 and the identified PC 20 in the interface 1404. For example, the name of the mobile phone 10 is "P40" and the name of the PC 20 is "MateBook."

[0331] Optionally, the mobile phone may not display the names of other electronic devices in the preview image that are identified, but may simply mark them as "Device 1," "Device 2," etc. This is not a limitation in this embodiment of the present application.

[0332] It should be noted here that the preview images shown in Figures 14(b) and 14(c) can be captured by the front camera or rear camera of a mobile phone. The camera that captures the photo is not limited in this embodiment of the present application. For example, if the figure photo in Figure 14(b) is captured by the front camera of a mobile phone, and the user needs to identify the electronic device by using the rear camera, the user may tap the camera switching button 33 to perform the switch. As another example, if the figure photo in Figure 14(b) is captured by the rear camera of a mobile phone, and the user needs to identify the electronic device by using the front camera, the user may tap the camera switching button 33 to perform the switch.

[0333] It should be further noted here that in the above embodiment, the long press operation is used as an example to describe the operation of a user long pressing the local album icon 32 to trigger a photo sharing process. In the embodiment of the present application, the photo sharing process provided in the embodiment of the present application may alternatively be triggered by using other preset operations, or the mobile phone may be triggered by identifying the electronic device in the preview image by using other preset operations, for example, the preset operations are not limited to long pressing the local album icon 32, double tapping the local album icon 32, or drawing a fixed pattern in the photo taking preview interface 1403. This is not limited in the embodiment of the present application.

[0334] In a possible implementation, the mobile phone triggers the identification function of the mobile phone after detecting a long press operation performed by the user on the local album icon 32. In other words, if the mobile phone does not detect a long press operation performed by the user on the local album icon 32, the mobile phone may display the image shown in FIG. 14(c) without identifying the object in the preview image. After detecting a long press operation performed by the user on the local album icon 32, the mobile phone triggers the identification of the object in the preview image and marks the names of the identified electronic devices, "P40" and "MateBook," as shown in FIG. 14(d). In the above implementation, it may be avoided that the mobile phone is always in a state of identifying the object in the preview image, thereby reducing the power consumption of the mobile phone.

[0335] In another possible implementation, the mobile phone may always enable the device identification function. Specifically, the mobile phone continuously identifies objects in the preview image, and after detecting a long press operation performed by a user on the local album icon 32, marks the name of the identified electronic device and displays the icons “P40” and “MateBook” as shown in FIG. 14(d).

[0336] In the above implementation, the mobile phone can determine in advance the objects contained in the preview image, and when the user activates the photo sharing function by long pressing the local album icon 32, the mobile phone immediately displays the name of the identified electronic device on the interface, thereby improving the speed at which the mobile phone identifies the objects in the preview image.

[0337] After the mobile phone identifies the P40 and MateBook included in the current preview image, the user may long press the thumbnail photo icon 30 according to the user's requirements and drag the thumbnail photo icon 30 to the target device to be shared.

[0338] 14(d), the icons for "P40" and "MateBook" are displayed in the preview image. The user presses and holds the thumbnail photo icon 30, drags the thumbnail photo icon 30 to the icon area of ​​the P40, and then releases the icon 30. Alternatively, the user presses and holds the thumbnail photo icon 30, drags the thumbnail photo icon 30 to any position within the area where the P40 is located, and then releases the icon.

[0339] Optionally, the user may drag the thumbnail photo icon 30 to the location of the P40 icon and then release the icon. The P40 icon may be presented in a different color or display other dynamic effects, such as resizing, jumping, and flashing lights, to prompt the user to share the currently taken photo with the P40 identified in the preview image. For example, as shown in FIG. 14(e), when the user drags the thumbnail photo icon 30 to the location of the P40 icon, the color of the "P40" icon changes. In this case, the user releases the thumbnail photo icon 30 to allow the currently taken photo to be shared with the P40.

[0340] In yet another possible implementation, a reminder control may be further displayed on the preview image in the process of the user dragging the thumbnail photo icon 30. For example, as shown in Fig. 14(e), the reminder control may be an arrow 40 or the like, which may be displayed statically, jumping, or blinking to prompt the user to drag the thumbnail photo icon 30 to the position identified by the arrow 40 to perform the photo sharing function. The display manner of the reminder control is not limited to the embodiments of the present application.

[0341] Regarding the above implementation process, it should be understood that the mobile phone can detect and identify other electronic devices included in the preview image through multiple different methods, such as image detection, 3D scanning technology, and machine vision, etc. The method by which the mobile phone identifies other electronic devices in the preview image is not limited to the embodiments of the present application.

[0342] It should be understood that in embodiments of the present application, the mobile phone may identify and locate other electronic devices within the preview image by using a number of possible positioning techniques.

[0343] Optionally, the positioning technology in the embodiments of the present application may include one of the following technologies: Bluetooth-based wireless sensing positioning, ultra-wideband (UWB) sensing-based wireless sensing positioning, and computer vision-based positioning, or a combination of the above positioning technologies, or other positioning technologies. The method of locating other electronic devices by a mobile phone is not limited to the embodiments of the present application.

[0344] Furthermore, in this embodiment of the present application, after identifying other electronic devices included in the preview image, the mobile phone may determine the position to display the electronic device icon based on the display position of the object in the current preview image.

[0345] In one possible embodiment, the mobile phone may display, on the preview image, icons marking other electronic devices in the area the electronic device is located in. For example, as shown in Figure 14(d), after identifying a P40 and a MateBook in the preview image, the mobile phone displays an icon marked "P40" at the location of the identified mobile phone and an icon marked "MateBook" at the location of the PC.

[0346] Optionally, an icon marking another electronic device may be displayed in an area near the positioning device of the electronic device. For example, a mobile phone communicates with the P40 by using a UWB chip to determine the location of the P40 in the preview image. If the UWB chip of the P40 is installed in the upper right corner of the P40, an icon including "P40" in FIG. 14(d) may be displayed in the area where the UWB chip in the upper right corner of the P40 is located. This is not a limitation of this embodiment of the present application.

[0347] In another possible embodiment, icons marking other electronic devices may be displayed in blank areas within the preview image and do not obscure other objects within the preview image. For example, as shown in FIG. 14(d), after identifying the P40 and the MateBook in the preview image, the mobile phone displays an icon marked "P40" on the left border of the preview image so as not to obscure the PC to the right of the P40, and also displays an icon marked "MateBook" on the right border of the preview image so as not to obscure the mobile phone to the left of the MateBook.

[0348] The above icon display method can mark the identified electronic device without blocking other objects in the preview image, which does not affect the user's vision and visual perception, and improves the user's visual experience.

[0349] According to the above method, in the process of taking a photo, the user can use the preset operation to enable the device identification function and positioning function of the mobile phone, and refer to the identification function and positioning function of the mobile phone to identify other electronic devices included in the preview image of the camera. To immediately share the photo with other surrounding electronic devices, the user can directly drag the photo to be shared to the area where the other electronic devices are located. In this process, the operation procedure for sharing the photo is simplified, the time for sharing the photo is shortened, and the user experience is improved.

[0350] In another possible scenario, when the mobile phone identifies another electronic device in the preview image, the identified electronic device may be blocked by an obstacle, that is, the electronic device cannot be seen in the preview image. For this scenario, the embodiment of the present application further provides a photo sharing method for immediately sharing a captured photo with the electronic device blocked in the preview image.

[0351] 15(a), 15(b), 15(c), and 15(d) are schematic diagrams of graphical user interfaces of another example of a photo sharing process according to an embodiment of the present application. As shown in FIG. 15(a), in a photo-taking preview interface 1501, the mobile phone identifies the PC 20 in the preview image as a MateBook and displays a "MateBook" symbol. Furthermore, the mobile phone identifies that an occluded device 1 exists behind the MateBook. In this scenario, the MateBook is occluding device 1, and a reminder window 50 may be displayed in the mobile phone's photo-taking preview interface 1501. The reminder window 50 may include text information used to remind the user of the detected device 1.

[0352] Optionally, in this embodiment of the present application, in addition to the text reminder in the reminder window 50, the reminder may further include an icon reminder. For example, in addition to the reminder window 50, the photo-taking preview interface 1501 of the mobile phone may further include an icon marking the position of the electronic device that is obstructed, such as a statically displayed arrow, a dynamically blinking arrow, or a jumping arrow. This is not limited in this embodiment of the present application.

[0353] For example, as shown in FIG. 15(a), reminder window 50 displays "Device 1 detected. Do you want to share?" After the user taps reminder window 50, the mobile phone displays interface 1502 shown in FIG. 15(b). Interface 1502 includes photo sharing window 60. The user may tap the "Share" button in photo sharing window 60 to decide to share the currently taken photo with occluded device 1.

[0354] Alternatively, after the user taps the reminder window 50 shown in Fig. 15(a), the mobile phone may no longer further display the interface of Fig. 15(b) and directly share the captured photo with the occluded device 1. This is not limited in this embodiment of the present application.

[0355] It should be noted that the mobile phone may communicate with other nearby electronic devices in multiple possible ways, such as Bluetooth and wireless fidelity (Wi-Fi) modules. In this case, the mobile phone may detect nearby electronic devices. Alternatively, the mobile phone may use wireless positioning technology, such as UWB, to determine the presence of other nearby electronic devices, identify the type of the electronic device, and display the type of the electronic device in the photo preview interface. In the embodiment of the present application, the communication interaction method and positioning method between the mobile phone and other nearby electronic devices are not limited.

[0356] According to the above method, when the mobile phone identifies that there is another electronic device in the preview image and that the electronic device is blocked by an obstacle, in the process of sharing the photo by the user, reminder information such as text or an icon may be displayed in the photo-taking preview interface to prompt the user to locate the blocked electronic device, and the user can further share the taken photo with the blocked electronic device immediately. In this way, a possible way for the user to share photos with the blocked electronic device is provided, and the operation steps of sharing photos by the user are simplified.

[0357] In another possible scenario, the mobile phone identifies that there is another electronic device nearby by using wireless positioning technology, but the electronic device is not displayed in the mobile phone's current preview image. For this scenario, in an embodiment of the present application, reminder information may be further displayed in the photo-taking preview interface to remind the user of the presence of the other electronic device in a specific way.

[0358] 15(c), in the photo taking preview interface 1503, the preview image captured by the mobile phone camera does not include any electronic devices, but the mobile phone may detect three electronic devices in the left area outside the preview image. In this scenario, a reminder window 70 may be displayed in the interface 1503, and the reminder window 70 may include text information used to remind the user of the multiple detected electronic devices.

[0359] Optionally, in this embodiment of the present application, in addition to the text reminder in the reminder window 70, the reminder may further include an icon reminder. For example, in addition to the reminder window 70, the photo-taking preview interface 1503 of the mobile phone may further include an icon marking the position of the electronic device that is obstructed, such as a statically displayed arrow, a dynamically blinking arrow, or a jumping arrow. This is not limited in this embodiment of the present application.

[0360] For example, as shown in FIG. 15(c), the reminder window 70 displays, "Three electronic devices have been detected. Please rotate the camera to obtain information about the electronic devices." After the user taps the reminder window 70, the mobile phone displays an interface 1504 shown in FIG. 15(d). The interface 1504 includes a device list window 80. The user can tap any device in the device list window 80, for example, device 3, to share the currently captured image with device 3.

[0361] Alternatively, in another possible aspect, the user may rotate the mobile phone based on the reminder information on interface 1503, so that the camera of the mobile phone may acquire the three detected electronic devices and display device 3 with which the user should share photos in the preview image, so that the taken photos can be immediately shared with other devices according to the methods described in Figures 14(a), 14(b), 14(c), 14(d), and 14(e).

[0362] According to the above method, when there are no other electronic devices in the preview image captured by the mobile phone camera, but the mobile phone detects the presence of other electronic devices nearby, reminder information such as text or an icon may be displayed in the photo-taking preview interface to prompt the user with information, locations, etc. of other nearby electronic devices with which the user can share photos. In this way, in the photo sharing process, the user can immediately share the taken photo with the electronic device by dragging the photo to another electronic device in the preview image, thereby providing the user with another possible photo sharing method and simplifying the operation steps of the user to share photos.

[0363] In this embodiment of the present application, the mobile phone may be used as a sending device, and the electronic device that receives the photos shared by the user may be used as a “receiving device.” For the photo sharing process of Figures 14(a), 14(b), 14(c), 14(d), and 14(e), and Figures 15(a), 15(b), 15(c), and 15(d), after the user drags the thumbnail photo icon 30 to the receiving device identified by the mobile phone, a photo receiving window may appear on the receiving device accordingly.

[0364] 16 is a schematic diagram of an example of a graphical user interface for receiving photos according to an embodiment of the present application. For example, FIG. 16(a) shows a possible interface 1601 of a receiving device. The interface 1601 may be, but is not limited to, a home screen of the receiving device, an execution interface of any application, etc. This is not a limitation of this embodiment of the present application.

[0365] A home screen 1601 of the receiving device is used as an example. After a user performs a photo sharing operation on a mobile phone, the receiving device displays an interface 1602 shown in Fig. 16(b). The interface 1602 includes a photo receiving window 90. Optionally, the photo receiving window 90 may provide the user with buttons such as "Confirm" and "Close", so that the user can immediately view the shared photos by using the receiving device.

[0366] Optionally, the photo receiving window 90 may automatically dismiss or hide in the notification bar of the receiving device after a preset period of time for displaying the photos on the interface of the receiving device. up You can view the photo sharing results in the notification bar by using the operation, or even close the photo sharing results in the notification bar by using the pull-down operation. For this process, please refer to the related operations in the prior art, and the details will not be described again here.

[0367] It should be understood that the user may drag the thumbnail photo icon 30 in the identified preview image to the receiving device, and then, after releasing the thumbnail photo icon 30, the mobile phone may transmit the currently captured photo to the receiving device. For example, the transmission method may be, but is not limited to, multiple possible high-rate communication methods, such as Bluetooth transmission, Wi-Fi transmission, near-field communication (NFC) transmission, and future fifth-generation (5G) mobile communication systems. The photo transmission method is not limited in this embodiment of the present application.

[0368] It should be further understood that the shared photo may be the latest photo currently being taken by the user by tapping the photo-taking shutter button, or may be a photo previously taken by the user, or may be a picture from another source stored on the user's mobile phone, which is not limited in this embodiment of the present application.

[0369] In other words, a user can open the camera application, and without taking a photo, directly long-press and drag the local album icon to share the first photo in the local album whose photo date and time is closest to the current date and time, or a picture from another source recorded on the user's mobile phone, with the receiving device, which is not limited in this embodiment of the present application.

[0370] The above describes the process of a user sharing one photo by using a camera application. In addition, the embodiment of the present application further provides a photo sharing method. A user may share multiple photos with a receiving device identified in a preview image by using the camera application.

[0371] 17(a), 17(b), 17(c), 17(d), 17(e), and 17(f) are schematic diagrams of graphical user interfaces of an example of a photo sharing process according to an embodiment of the present application. As shown in FIG. 17(a), in an unlocked mode, a mobile phone currently displays a home screen 1701. A user taps a camera application icon in the home screen 1701, and in response to the user's tapping operation, the mobile phone displays a photo-taking preview interface 1702 shown in FIG. 17(b). In the photo-taking preview interface 1702, the user taps the photo-taking shutter button 31. In response to the user's photo-taking operation, the mobile phone takes a photo and saves the captured photo to a local album.

[0372] The user performs the operation shown in Fig. 17(c), specifically, selects the local album icon 32 and drags the local album icon 32 upward along the direction indicated by the arrow. In response to the user's drag operation, the mobile phone displays an interface 1704 shown in Fig. 17(d). A photo list is displayed in the interface 1704. As shown in Fig. 17(d), the photo list may display thumbnails of multiple photos, such as Photo 1, Photo 2, and Photo 3. Optionally, the photo list may be displayed in a lower area of ​​the interface 1704, and the display of the preview image in the interface 1704 is not affected, thereby ensuring that the user can see the content of the preview image.

[0373] Where possible, photos in the photo list may be arranged according to the user's photo-taking order, e.g., Photo 1 is the most recent photo taken by the user, and the photo-taking times of Photo 2 and Photo 3 are earlier than the photo-taking time of Photo 1.

[0374] Alternatively, the photos in the photo list may be arranged according to other possible arrangement orders, for example, if it is detected that the photo location is a company, the photos whose photo location is the company may be arranged in the photo list, which is not limited in this embodiment of the present application.

[0375] When possible, after a user performs the operation shown in FIG. 17(c) to display a photo list, the first photo in the photo list may be selected by default. In other words, the bottom right corner of Photo 1 in FIG. 17(d) is identified by default as the selected photo to be shared. If the user does not intend to share Photo 1, the user may tap the selection box in the bottom right corner of Photo 1 to deselect Photo 1. Similarly, if the user intends to share Photo 1, Photo 2, and Photo 3 simultaneously, the user may tap the selection box in the bottom right corner of each photo to select multiple photos to be shared. Details will not be described again here.

[0376] After the user selects Photo 1, Photo 2, and Photo 3 to be shared, the user may use a finger to press and hold on any area of ​​Photo 1, Photo 2, and Photo 3 to be shared. In response to the user's press and hold operation, the mobile phone displays interface 1705 shown in FIG. 17(e) and displays thumbnail photo icon 30 in interface 1705.

[0377] Furthermore, the mobile phone enables a device identification function and identifies whether the preview image includes other electronic devices based on the preview image presented in the current photo taking preview interface 1705. Optionally, only one thumbnail of any one of Photo 1, Photo 2, and Photo 3 to be shared may be displayed in the thumbnail photo icon 30. This is not limited in this embodiment of the present application.

[0378] Optionally, in this embodiment of the present application, the process of sharing multiple photos provided in this embodiment of the present application may be triggered by using other preset operations, or the mobile phone may be triggered by using other preset operations to identify the electronic device in the preview image, for example, the preset operations are not limited to selecting the local album icon 32 and dragging it upward, double-tapping the local album icon 32, or drawing a fixed pattern in the photo taking preview interface 1703. This is not limited in this embodiment of the present application.

[0379] For example, as shown in FIG. 17(e), if the currently presented preview image includes the mobile phone 10 and the PC 20 on a table, the mobile phone may identify the mobile phone 10 and the PC 20 in the preview image and display the names of the identified mobile phone 10 and the identified PC 20 in the preview image. For example, the name of the mobile phone 10 is "P40" and the name of the PC 20 is "MateBook." Optionally, the mobile phone may not display the names of other electronic devices in the preview image that are identified, but may simply mark them as "Device 1," "Device 2," etc. This is not a limitation of this embodiment of the present application.

[0380] After the mobile phone identifies the P40 and MateBook in the preview image of the interface 1705, the user may drag the thumbnail photo icon 30 to the target device to be shared according to the user's requirements.

[0381] For example, as shown in FIG. 17(f), the icons for "P40" and "MateBook" are displayed in the preview image. The user can move the thumbnail photo icon 30 to the MateBook icon. To Icon Alternatively, the user can drag the thumbnail photo icon 30 to any position within the area where the MateBook is located and then release the icon, meaning that Selected Photo 1, Selected Photo 2, and Selected Photo 3 can be shared with the MateBook.

[0382] Optionally, the user drags the thumbnail photo icon 30 to the location of the MateBook icon and then releases the icon, which may be presented in a different color or display other dynamic effects such as changing size, jumping, and flashing lights to prompt the user to share the currently taken photo with the MateBook identified in the preview image.

[0383] If possible, a reminder control may be displayed on the preview image while the user is in the process of dragging the thumbnail photo icon 30. For example, as shown in Fig. 17(f), the reminder control may be an arrow 40 or the like, which may be displayed statically, jumping, or blinking to prompt the user to drag the thumbnail photo icon 30 to the position identified by the arrow 40 to perform the photo sharing function. The display manner of the reminder control is not limited to the embodiments of the present application.

[0384] It should be noted that in the description of the embodiments of Figures 17(a), 17(b), 17(c), 17(d), 17(e), and 17(f), reference should be made to the corresponding descriptions above for possible processes, possible implementations, etc. that are the same as those described in Figures 14(a), 14(b), 14(c), 14(d), and 14(e), and Figures 15(a), 15(b), 15(c), and 15(d), and the details will not be described again here.

[0385] Similarly, in the process of sharing multiple photos, the receiving device in the preview image may also be blocked. For specific implementation processes, please refer to the relevant descriptions in Figures 15(a), 15(b), 15(c), and 15(d). The details will not be described again here.

[0386] According to the above method, in the process of taking photos, the user can use the preset operation to enable the device identification function and positioning function of the mobile phone, and refer to the identification function and positioning function of the mobile phone to identify other electronic devices included in the preview image of the camera. The user can select multiple photos to be shared and directly drag the multiple photos to the area where other electronic devices are located to immediately share the photos with other surrounding electronic devices. In this process, the operation procedure for sharing photos is simplified, the time for sharing photos is shortened, and the user experience is improved.

[0387] For the photo sharing process of Figures 17(a), 17(b), 17(c), 17(d), 17(e), and 17(f), after the user drags the thumbnail photo icon 30 to the PC 20 identified by the mobile phone, a photo receiving window may appear on the PC 20 accordingly.

[0388] 18 is a schematic diagram of another example of a graphical user interface for receiving photos according to an embodiment of the present application. For example, FIG. 18(a) shows a possible interface of the PC 20. The PC 20 may display an interface presented by using different systems, such as the Windows system and the HarmonyOS system, and the interface may be any implementation interface in the use process of the PC 20. The display interface of the PC 20 is not limited in this embodiment of the present application.

[0389] For example, the MateBook uses a Windows system. After a user performs an operation to share three photos on the mobile phone, the MateBook may display a photo receiving window 1801 shown in FIG. 18(b). Optionally, the photo receiving window 1801 may display thumbnails of Photo 1, Photo 2, and Photo 1 shared by the user. Furthermore, buttons such as "Confirm" and "Close" may be provided to the user, allowing the user to immediately view the shared photos.

[0390] Optionally, the photo receiving window 1801 may be displayed on the interface of the receiving device for a preset period of time, and then automatically retract or hide in the status bar at the bottom of the MateBook. The user can view the photo sharing results or close the photo sharing results in the status bar by tapping the status bar. For this process, please refer to the related operations in the prior art. The details will not be described again here.

[0391] It should be understood that the mobile phone may transmit the currently captured photo to the MateBook after the user drags the thumbnail photo icon 30 to the MateBook in the identified preview image and then releases the thumbnail photo icon 30. For example, the transmission method between the mobile phone and the MateBook may be limited to multiple possible high-rate communication methods, such as Bluetooth transmission, Wi-Fi transmission, near-field communication (NFC) transmission, and future 5th generation (5G) mobile communication systems, which are not limited in this embodiment of the present application.

[0392] It should be further understood that the shared photo may be the latest photo currently being taken by the user by tapping the photo-taking shutter button, or may be a photo previously taken by the user, or may be a picture from another source stored in the user's mobile phone. This is not limited in this embodiment of the present application. In other words, the user may open the camera application, and without taking a photo, directly press and hold the local album icon and drag it to share the first photo in the local album whose photo date and time is closest to the current date and time with the receiving device. This is not limited in this embodiment of the present application.

[0393] In summary, according to the photo sharing method provided in the embodiment of the present application, in the process of taking a photo or running a camera application, a user can enable the device identification function and positioning function of the electronic device by using a preset operation. In addition, other electronic devices included in the camera's preview image are identified based on the identification function and positioning function of the electronic device. The user can select one or more photos to be shared by using a shortcut operation and directly drag the one or more photos to be shared to the area where the other electronic devices are located to immediately share the one or more photos with other surrounding electronic devices. In addition, in the embodiment of the present application, a user-friendly interaction interface is provided to the user for multiple scenarios, such as a scenario where other electronic devices are obstructed in the preview image, so that the user can share one or more photos by using a shortcut operation. In this process, the operation procedure for sharing photos is simplified, the time for sharing photos is shortened, and the user experience is improved.

[0394] With reference to Figures 14(a), 14(b), 14(c), 14(d), and 14(e) through 18, the above embodiments describe a photo sharing method from the user interaction layer. With reference to Figures 19A and 19B, the following describes a photo sharing method provided in an embodiment of the present application from the software enforcement policy layer. It should be understood that the method can be implemented in a structural electronic device (e.g., a mobile phone, a tablet computer, or a computer) shown in Figures 2 and 3 and equipped with a touch screen, a camera assembly, etc.

[0395] 19A and 19B are schematic flowcharts of an example of a photo sharing method according to an embodiment of the present application. A mobile phone is used as an example, and as shown in FIG. 19A and FIG. 19B, the method may include the following steps:

[0396] 1901: Launch the camera application.

[0397] Specifically, the mobile phone launches the camera application and displays a photo-taking preview interface. For example, the implementation process of step 1901 can be shown in Figure 14(a) or Figure 17(a).

[0398] 1902: The user taps the capture shutter button to take a photo.

[0399] It should be understood that step 1902 is an optional step. Specifically, the photo sharing method may be applied to a scenario in which a user takes a photo. The photo to be shared may be the latest photo taken by the user by tapping the photo-taking shutter button, or may be a photo taken by the user previously, or may be a picture from another source stored in the user's mobile phone. This is not limited in this embodiment of the present application.

[0400] For example, if the photo to be shared is a photo currently being taken by the user, the process continues with steps 1903 and 1904 as shown in FIG. 14(b).

[0401] 1903: Detect a long press operation performed by a user on a local album icon.

[0402] 1904: When a long press operation performed by a user on a local album icon is detected, trigger the display of a thumbnail photo icon, where the thumbnail photo icon is in a draggable mode and the device identification function is enabled at the same time.

[0403] Optionally, in addition to the long press operation performed by the user on the local album icon, in this embodiment of the present application, the photo sharing process provided in this embodiment of the present application may alternatively be triggered by using other preset operations, or the mobile phone may be triggered by using other preset operations to identify the electronic device in the preview image, for example, the preset operations are not limited to long press on the local album icon, double tap on the local album icon, or drawing a fixed pattern in the photo taking preview interface, which is not limited in this embodiment of the present application.

[0404] In a possible implementation, if the mobile phone does not detect a long press operation performed by a user on a local album icon, the mobile phone may not identify objects in the preview image. For example, after detecting a long press operation performed by a user on a local album icon, the mobile phone triggers the identification of objects in the preview image and marks the names of the identified electronic devices, "P40" and "MateBook," as shown in FIG. 14(d). In this way, the mobile phone can be prevented from always being in a state of identifying objects in the preview image, thereby reducing the power consumption of the mobile phone.

[0405] In another possible implementation, the mobile phone may always enable the device identification function. Specifically, the mobile phone continuously identifies objects in the preview image. After detecting a long press operation performed by the user on the local album icon, the mobile phone marks the names of the identified electronic devices, "P40" and "MateBook," as shown in FIG. 14(d). In this way, the mobile phone can determine in advance the objects included in the preview image. When the user activates the photo sharing function by long pressing the local album icon, the mobile phone immediately displays the names of the identified electronic devices on the interface, thereby improving the speed at which the mobile phone identifies objects in the preview image.

[0406] For the scenario of steps 1901 to 1904, the subsequent process of steps 1909 to 1911 may continue.

[0407] 1909: Identifying other electronic devices included in the preview image and marking the identified electronic devices.

[0408] It should be understood that the mobile phone may communicate with other nearby electronic devices in multiple possible ways, such as Bluetooth, a Wi-Fi module, and NFC. In this case, the mobile phone may detect nearby electronic devices. Alternatively, the mobile phone may determine that other nearby electronic devices are present by using wireless positioning technology such as UWB, identify the type of the electronic device, and display the type of the electronic device in the photo-taking preview interface. In the embodiment of the present application, the communication interaction method and positioning method between the mobile phone and other nearby electronic devices are not limited.

[0409] The mobile phone may display icons in the preview image to mark other electronic devices in the area where the electronic device is located, or may display icons in blank areas in the preview image without blocking other objects in the preview image. For specific display methods, please refer to the above description. The details will not be described again here.

[0410] 1910: Detecting that a user drags a thumbnail photo icon to another electronic device identified in the preview image.

[0411] 1911: The user drags the thumbnail photo icon to share the photo with the electronic device they reach.

[0412] Optionally, the user may drag the thumbnail photo icon to a position that marks the icon of the other electronic device and then release the icon. The icon may be presented in a different color or may display other dynamic effects such as changing size, jumping, or flashing lights to prompt the user to share the currently captured photo with the other electronic device identified in the preview image.

[0413] For example, as shown in Figure 14(e), when the user drags the thumbnail photo icon 30 to the position of the P40 icon, the color of the "P40" icon changes. In this case, the user releases the thumbnail photo icon 30, so that the currently taken photo can be shared with P40.

[0414] Alternatively, for example, as shown in Figure 17(f), the user drags the thumbnail photo icon 30 to the location of the MateBook icon and then releases the icon. To prompt the user to share the currently taken photo with the MateBook identified in the preview image, the MateBook icon may be presented in a different color or may display other dynamic effects such as changing size, jumping, and flashing lights.

[0415] In other possible scenarios, the user may expect to share multiple photos, or the shared photo is not currently being taken, for which the process of steps 1905 through 1911 may be performed.

[0416] 1905: Detect a slide operation performed by the user on a local album icon.

[0417] 1906: A photo list of a local album is displayed, and it is detected that the user has selected multiple photos to be shared from the photo list.

[0418] For example, if the photos to be shared are pictures from other sources stored in the user's mobile phone, the user may launch the camera application, and without taking a photo, long press and drag the local album icon to find and select the photos to be shared in the photo list, as shown in Figures 17(d) and 17(e), which is not limited in this embodiment of the present application.

[0419] For example, as shown in FIG. 17(c), after a slide operation performed by a user on a local album icon is detected, a photo list may be displayed, and the first photo in the photo list may be selected by default. If the user does not expect to share photo 1, the user may tap the selection box in the lower right corner of photo 1 to deselect photo 1. Similarly, if the user expects to share photo 1, photo 2, and photo 3 simultaneously, the user may tap the selection box in the lower right corner of each photo to select multiple photos to be shared. Details will not be described again here.

[0420] 1907: Detect a long press operation performed by a user on multiple photos to be shared.

[0421] 1908: When a long press operation performed by a user on multiple photos to be shared is detected, trigger display of thumbnail photo icons, where the thumbnail photo icons are in a draggable mode and the device identification function is enabled simultaneously.

[0422] Optionally, after the user selects Photo 1, Photo 2, and Photo 3 to be shared, they can use their finger to press and hold any area of ​​Photo 1, Photo 2, and Photo 3 to be shared to drag the three photos.

[0423] 1909: Identifying other electronic devices included in the preview image and marking the identified electronic devices.

[0424] 1910: Drag the thumbnail photo icon to another electronic device identified in the preview image.

[0425] 1911: The user drags the thumbnail photo icon to share the photo with the electronic device they reach.

[0426] It should be noted here that for the procedure of the implementation process, please refer to the above specific descriptions of Figures 14(a), 14(b), 14(c), 14(d), and 14(e) to 18. For some of the same operation processes, possible implementations, etc., please refer to the above corresponding descriptions. The details will not be described again here.

[0427] According to the above method, in the process of taking photos, the user can use the preset operation to enable the device identification function and positioning function of the mobile phone, and refer to the identification function and positioning function of the mobile phone to identify other electronic devices included in the preview image of the camera. The user can select multiple photos to be shared and directly drag the multiple photos to the area where other electronic devices are located to immediately share the photos with other surrounding electronic devices. In this process, the operation procedure for sharing photos is simplified, the time for sharing photos is shortened, and the user experience is improved.

[0428] The above describes the implementation of the display interface and method of the present application. The following uses UWB wireless positioning technology as an example to explain in detail how the electronic device 100 performs distance and angle measurement to other electronic devices.

[0429] 20, an electronic device 100 and an electronic device 201 are used as an example. The electronic device 100 initiates a UWB measurement request. The electronic device 100 determines the distance between the electronic device 100 and the electronic device 201 based on the measurement response of the electronic device 201. Specifically, the above device control method includes, but is not limited to, steps S101 to S105.

[0430] S101: The electronic device 100 broadcasts a UWB measurement request, and the electronic device 201 receives the UWB measurement request.

[0431] In some embodiments, the electronic device 100 initiates a UWB measurement request, and the electronic device 100 determines the distance between the electronic device 100 and the electronic device 201 by using a ranging algorithm 3 .

[0432] Step S101 specifically includes: the electronic device 100 broadcasts a first measurement request at a time T11, and records the sending time of the first measurement request as T11. The sending time T11 of the first measurement request carries identification information (e.g., the ID and MAC address of the electronic device) of the electronic device 100. The electronic device 201 receives the first measurement request sent by the electronic device 100 at a time T12, and records the receiving time of the first measurement request as T12.

[0433] S102: The electronic device 201 sends a first measurement response to the electronic device 100.

[0434] The electronic device 201 receives a first measured response at time T13. 100 The first measurement request carries T12, T13, the identification information of the electronic device 100, and the identification information of the electronic device 201. 100 At time T14, the electronic device 201 and records the time of receiving the first measurement response as T14.

[0435] S103: The electronic device 100 determines orientation parameters of the electronic device 201 based on the measurement responses transmitted by the electronic device 201.

[0436] Specifically, the orientation parameters of the electronic device 201 may include one or more of the physical distance between the electronic device 201 and the electronic device 100, the AOA of the signal of the electronic device 201, and the RRSI of the signal transmitted by the electronic device. The following describes the three orientation parameters separately in detail.

[0437] 1. The physical distance between the electronic device 201 and the electronic device 100: The time difference between the time T11 when the first measurement request is sent and the time T14 when the first measurement response is received is equal to Round1, the time difference between the time T12 when the first measurement request is received and the time T13 when the first measurement response is sent is equal to Trelay1, and the one-way flight time T is T=(Tround1-Trelay 1 ) / 2.

[0438] The electronic device 100 can determine the one-way flight time of the signal according to the above formula, and then determine that the physical distance D between the electronic device 100 and the electronic device 201 is C×T according to the one-way flight time T and the propagation speed C of the electromagnetic wave.

[0439] 2. AOA of Electronic Devices 201 : The electronic device 100 may calculate the direction of reception of the signal based on the phase difference between the UWB antennas at different locations where the first measurement responses arrive to determine the direction of the electronic device 201 relative to the electronic device 100.

[0440] 21, the electronic device 100 receives a wireless signal transmitted by the electronic device 201, and the AOA of the signal at the electronic device 100 (i.e., the angle of incidence θ of the wireless signal with respect to the connecting line between the receiving antenna 1 and the receiving antenna 2) can be determined based on the phase difference φ of the signal at the receiving antenna 1 and the receiving antenna 2 of the electronic device 100. φ can be expressed as follows: φ=2×π×d×(cos(θ) / λ)+Φ(θ)

[0441] where λ is the wavelength and Φ(θ) is the antenna hardware phase difference. The incident angle θ, i.e., the AOA of the signal of the electronic device 201, can be determined by using the above formula. For example, if the incident angle θ of the electronic device is 60 degrees, the electronic device 201 is 30 degrees clockwise from the electronic device 100.

[0442] 3. RRSI of the signal transmitted by the electronic device 201 :The electronic device 100 determines the RRSI of the signal transmitted by the electronic device 201 based on an average value of the RRSIs corresponding to the first measurement request and the first measurement response. In some embodiments, the electronic device 100 determines the RRSI of the signal transmitted by the electronic device 201 based on the RRSIs corresponding to the first measurement request and the first measurement response.

[0443] In this embodiment of the present application, whether there is an obstacle between the electronic device 100 and the electronic device 201 may be determined based on the RRSI of the signal transmitted by the electronic device 201.

[0444] In a non-line-of-sight (NLOS) propagation condition where there are obstacles, the signal attenuation is relatively large, and in a line-of-sight (LOS) propagation condition where there are no obstacles, the signal attenuation is relatively small. Under the same propagation condition, the longer the distance, the greater the signal attenuation. In this embodiment of the present application, whether an obstacle exists between the electronic device 100 and the electronic device 201 can be determined based on the RRSI of the first measurement request and the first measurement response and the physical distance between the electronic device 201 and the electronic device 100.

[0445] In some embodiments, a preset RRSI of a signal transmitted by the electronic device and received by the electronic device 100 may be determined based on the distance between the electronic device 100 and the electronic device 201. When the RRSI of the received signal transmitted by the electronic device 201 is smaller than the preset RRSI, it is determined that there is an obstacle between the electronic device 100 and the electronic device 201. When the RRSI of the received signal transmitted by the electronic device 201 is equal to or greater than the preset RRSI, it is determined that there is no obstacle between the electronic device 100 and the electronic device 201.

[0446] In some embodiments, the orientation parameters of the electronic device 201 may include the physical distance between the electronic device 100 and the electronic device 201, the AOAOA of the signal, and a first identification. The first identification of the electronic device 201 is used to indicate whether there is an obstacle between the electronic device 100 and the electronic device 201. For example, if the first identification is equal to 1, it indicates that there is an obstacle, and if the first identification is equal to 0, it indicates that there is no obstacle.

[0447] S104: The electronic device 100 sends a connection request to the electronic device 201, and the electronic device 201 receives the connection request sent by the electronic device 100.

[0448] S105: The electronic device 201 sends first capability information and corresponding connection parameters to the electronic device 100, where the first capability information is used to represent a communication mode that can be supported by the electronic device 201.

[0449] In some embodiments, if the first capability information indicates a Wi-Fi communication mode, the corresponding connection parameters may include parameters such as a device ID, a MAC address, and a pairing key. E By using the connection process in the 802.11 standard, a Wi-Fi connection to the electronic device 201 may be established based on the above connection parameters.

[0450] In some embodiments, if the first capability information represents a Bluetooth communication mode, the corresponding connection parameters may include parameters such as a key, an encryption mode, and a Service Set Identifier (SSID). E By using the connection process in the 802.15.1 standard, a Bluetooth connection may be established to the electronic device 201 based on the above connection parameters.

[0451] In some embodiments, if the first capability information indicates a Wi-Fi communication mode and a Bluetooth communication mode, the electronic device 100 preferably E The connection process in the 802.11 standard may be used to establish a WI-Fi connection to the electronic device 201 based on the above connection parameters.

[0452] In some embodiments, the first measurement request may further carry second capability information, which is used to represent all communication modes that can be supported by the electronic device 100, for example, Bluetooth and Wi-Fi. The first measurement response may further carry the first capability information and corresponding connection parameters. The second capability information includes the first capability information, and the first measurement response may further carry the first capability information and corresponding connection parameters. 1 The capability information is determined by the electronic device 201 based on the second capability information. In this way, after step S103, the electronic device 100 may directly establish a connection to the electronic device 201 based on the first capability information and corresponding connection parameters in the first measurement response, without needing to send a connection request again.

[0453] In some embodiments, to reduce distance and angle measurement errors, the electronic device 100 may alternatively initiate multiple measurement requests and determine one-way time-of-flight and AOA average values ​​based on the multiple measurement requests and multiple measurement responses.

[0454] In the present application, the above UWB positioning method is not limited, and the location information of the electronic device 201 relative to the electronic device 100 can also be obtained by other methods. For example, the electronic device 100 broadcasts a UWB measurement request. The measurement request includes a transmission time. After receiving the measurement request, the electronic device 201 determines a time difference based on the transmission time and the time when the electronic device 201 receives the measurement request, and calculates the distance between the electronic device 201 and the electronic device 100 (the distance is equal to the time difference multiplied by the propagation speed of electromagnetic waves). The electronic device 201 may calculate the angle of arrival of the measurement request based on the received measurement request, and then determine the orientation angle of the electronic device 201 relative to the electronic device 100. The electronic device 201 sends a detection response to the electronic device 100. The detection response includes the identification and first location information of the second electronic device 201. The electronic device 100 receives the detection response and obtains and determines the orientation parameters of the electronic device 201 relative to the electronic device 100.

[0455] In this application, a measurement request (first measurement request) may alternatively be referred to as a detection request, and a measurement response (first measurement response) may alternatively be referred to as a detection response.

[0456] In this application, the positioning is not limited to being performed by the UWB method, but may also be performed by the Bluetooth, Wi-Fi, or GPS method.

[0457] The present application provides a device identification method applied to a first electronic device equipped with a camera. As shown in Figure 22, the method includes the following steps:

[0458] S201: A first electronic device receives a first operation.

[0459] The first operation may be any one or more of the user operations shown in Figures 5A to 5D, or any one or more of the user operations shown in Figures 7A to 7C. For details, please refer to the embodiments shown in Figures 5A to 5D or 7A to 7C. The details will not be described again here.

[0460] S202: The first electronic device displays a first interface in response to a first operation, the first interface including a preview image captured by a camera, and the preview image includes a second electronic device.

[0461] The first interface may be the above-described viewfinder interface 530. The second electronic device may be, for example, electronic device 201 corresponding to device image 532 of Figure 5G.

[0462] S203: The first electronic device obtains first location information of the second electronic device relative to the first electronic device.

[0463] S204: The first electronic device determines a display position of the first label in the preview image based on the first position information and the display area of ​​the second electronic device in the preview image, and displays the first label at that display position, where the first label is used to identify the second electronic device.

[0464] The second electronic device may be, for example, electronic device 201 corresponding to device image 532 in FIG. 5G, and the first label may be, for example, device icon 5321.

[0465] S205: The first electronic device receives a second operation for the first label. The second operation may be a user operation on the first device 532 in FIG. 5G.

[0466] S206: The first electronic device displays a second interface in response to the second operation, the second interface including one or more controls for controlling the second electronic device. The second interface may be the display interface of FIG. 5H. The second interface may be overlaid on the first interface for display, or the electronic device may jump from the first interface to display the second interface. In this application, the correspondence between the first label and the second electronic device is presented in real time in an augmented reality display manner, and the interaction between the first electronic device and the second electronic device is implemented by using the first label, thereby implementing cooperative control between multiple devices and improving the user experience.

[0467] In some possible implementations, the first electronic device obtaining first position information of the second electronic device relative to the first electronic device specifically includes: the first electronic device broadcasting a detection request, the detection request including an identification of the first electronic device; and, when the first electronic device receives a detection response transmitted by the second electronic device based on the detection request, the first electronic device determining first position information of the second electronic device and the first electronic device based on the detection response, the detection response including the identification of the second electronic device. Thus, the first position information includes the relative position of the second electronic device relative to the first electronic device, such as a distance, direction, or angle. The first electronic device may calculate the distance between the second electronic device and the first electronic device (the distance is equal to the time difference multiplied by the propagation speed of electromagnetic waves) based on the time difference between transmitting the detection request and receiving the detection response. The first electronic device may calculate the angle of arrival of the detection response based on the detection response, and then determine the azimuth angle of the second electronic device relative to the first electronic device.

[0468] Optionally, the detection response includes the identification and first location information of the second electronic device. The first electronic device determines the first location information of the second electronic device and the first electronic device based on the detection response. Specifically, the second electronic device calculates the relative position of the second electronic device with respect to the first electronic device based on the received detection request. The detection request includes a transmission time. The second electronic device determines a time difference based on the transmission time and the time the second electronic device receives the detection request to calculate the distance between the second electronic device and the first electronic device. The second electronic device may calculate the angle of arrival of the detection request based on the received detection request, and then determine the azimuth angle of the second electronic device with respect to the first electronic device. The second electronic device transmits a detection response to the first electronic device. The detection response includes the identification and first location information of the second electronic device.

[0469] In some possible implementations, the display position of the first label in the preview image partially or completely overlaps with the display area of ​​the second electronic device in the preview image, and the first label may be displayed in the display area of ​​the second electronic device, at an edge of the display area of ​​the second electronic device, or at a position close to the display area of ​​the second electronic device.

[0470] In some possible implementations, the method further includes: the first electronic device obtaining second position information of the third electronic device relative to the first electronic device; the first electronic device detecting that the third electronic device is not included in the preview image and determining, based on the second position information, that the third electronic device is within a viewfinder range of the camera; and the first electronic device determining, based on the second position information, a display position of a second label in the preview image, wherein the second label is used to indicate one or more of the following: identification information of the third electronic device, occlusion of the third electronic device, and the second position information. Thus, when the first electronic device detects that the relative position of the third electronic device is within the viewfinder range of the camera but the preview image does not include an image of the third electronic device, the first electronic device determines that the third electronic device is occluded and outputs a second label of the third electronic device to indicate one or more of the identification information of the third electronic device, occlusion, and the occluded position in the preview image.

[0471] The second label may be, for example, icon 803 of FIG. 8C, where the image of the third electronic device is not in the first interface and the third electronic device is obscured by device image 533.

[0472] In some possible implementations, the method further includes: the first electronic device detecting that the third electronic device is not included in the preview image and determining, based on the second position information, that the third electronic device is not within the viewfinder range of the camera; and the first electronic device determining, based on the second position information, a display position of a third label in the preview image, wherein the third label is used to indicate one or more of the following: identification information of the third electronic device and the second position information. Thus, when the first electronic device detects that the relative position of the third electronic device is outside the viewfinder range of the camera and the preview image does not include an image of the third electronic device, the first electronic device determines that the third electronic device is not within the viewfinder frame and outputs a second label of the third electronic device to indicate one or more of the identification information of the third electronic device and its relative position (direction, angle, distance, etc.) with respect to the first electronic device.

[0473] The third label is, for example, the icon in Figure 8B 803 and the image of the third electronic device is not in the first interface and the third electronic device is outside the viewfinder range of the camera.

[0474] In some possible implementations, the preview image includes an image of the fourth electronic device. After the first electronic device displays the first interface, the method further includes the first electronic device determining, based on the preview image, that the device type of the fourth electronic device is a first type; determining, among electronic devices associated with or connected to the first electronic device, a first target device having a device type of the first type; and displaying a fourth label by the first electronic device, the fourth label being used to indicate that the image of the fourth electronic device is associated with the first target device. Thus, if the first electronic device cannot detect the location information of the fourth electronic device and the image of the fourth electronic device is in the preview image, the first electronic device identifies the device type of the fourth electronic device according to image recognition technology and detects whether a target device of that device type is among devices logged in to the same account (e.g., a Huawei account) as the first electronic device. If so, the first electronic device considers the target device to be the fourth electronic device and outputs a fourth label identifying the target device.

[0475] The third label may be, for example, icon 805 of FIG. 8D, where an image of the fourth electronic device is in the first interface and the first electronic device cannot locate the fourth electronic device.

[0476] In some possible implementations, the preview image includes an image of a fifth electronic device, and after the first electronic device displays the first interface, the method includes: the first electronic device determines, based on the preview image, that the device type of the fifth electronic device is a second type; the first electronic device obtains third location information of the first electronic device, and the first electronic device stores a correspondence between the electronic device and the location information; and the first electronic device determines, based on the correspondence and the third location information, that the device type is No. 2The method further includes determining a second target device of the fifth electronic device type, where the location information of the target device is the same as the third location information, and the first electronic device displaying a fifth label, where the fifth label is used to indicate that the image of the fifth electronic device is associated with the second target device. Thus, if the first electronic device cannot detect the location information of the fifth electronic device and the image of the fifth electronic device is in the preview image, the first electronic device stores correspondences between electronic devices and location information (e.g., a smart sound box and a living room, a smart desk lamp and a bedroom, a computer and an office, etc.), so the first electronic device identifies the device type of the fifth electronic device based on the current geographic location of the first electronic device using image recognition technology, and then detects whether a target device of that device type exists among devices in the same geographic location as the first electronic device. If so, the first electronic device determines that the target device is the fifth electronic device and outputs a fifth label identifying the target device.

[0477] In some possible implementations, the first user interface further includes a first icon, the first icon being associated with data to be shared, and the method further includes the first electronic device receiving a third operation, the third operation being an operation for the first label and / or the first icon, and the first electronic device transmitting the data to be shared to the second electronic device in response to the third operation. The third operation includes, but is not limited to, a drag operation, a tap operation, etc. A data sharing method is provided, in which a second electronic device that needs to be shared is selected in the first interface, and the data to be shared is transmitted to the second electronic device. This simplifies user operations for data sharing, intuitively displays device information, and improves user experience.

[0478] For example, the first icon may be icon 902 or icon 903 in FIG. 9B, or the first icon may be thumbnail 1111 in FIG. 11D, or the first icon may be picture 1205 in FIG. 12B.

[0479] In some possible implementations, before the first electronic device receives the third operation, the method further includes the first electronic device displaying a first label in a first display format in the first interface based on a data type of the data to be shared. The first label in the first display format is used to prompt a user that the second electronic device supports output of the data to be shared. The first display format may be highlighting (changing brightness, color, etc.) a display area of ​​the first label. The first display format may be, for example, the display format of device icon 5311, device icon 5331, and device icon 5341 in FIG. 10C .

[0480] In some possible implementations, the preview image includes an image of a third electronic device and a third label, the third label being associated with the third electronic device, and the method is for the first electronic device to undergo a fourth operation, the fourth operation being 3 Label and / or 1 and the first electronic device outputting a prompt message in response to the fourth operation, the prompt message being used to prompt the user that the third electronic device does not support output of the data to be shared. The prompt message may be, for example, the information displayed in prompt box 1100 in FIG. 10B .

[0481] In an embodiment of the present application, a first electronic device receives a first operation, displays a first interface, activates a camera, and displays an image captured by the camera in real time on the first interface. The first electronic device identifies the electronic device in the image and the device type of the electronic device, for example, a second electronic device (e.g., a sound box, a computer, or a tablet computer) according to an image recognition technology. Furthermore, the first electronic device obtains location information of the second electronic device relative to the first electronic device according to a wireless positioning technology (e.g., UWB positioning, Bluetooth positioning, Wi-Fi positioning, etc.), where the location information includes one or more of distance, direction, or angle. The first electronic device determines a display position of a first label of the second electronic device in the preview image based on the location information, where the first label is used to identify the second electronic device, for example, to identify the device name or device type of the second electronic device, and the display position of the first label is related to the display position of the second electronic device. When the first electronic device detects a user operation for the first label, the first electronic device outputs a second interface, where the second interface includes one or more controls for controlling the second electronic device, and the second interface may be overlaid on the first interface for display, or the electronic device may jump from the first interface to display the second interface. In this application, the correspondence between the first label and the second electronic device is presented in real time in an augmented reality display manner, and the interaction between the first electronic device and the second electronic device is performed by using the first label, thereby implementing cooperative control between multiple devices and improving the user experience.

[0482] In an embodiment of the present application, the software system of an electronic device (e.g., the electronic device 100) may use a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In an embodiment of the present application, the Android system with a layered architecture is used as an example to describe the software structure of the electronic device 100. The Android system is only an example of the system of the electronic device 100 in an embodiment of the present application. The present application may also be applicable to other types of operating systems, such as iOS, Windows, and HarmonyOS, which are not limited in the present application. The following only uses the Android system as an example of the operating system of the electronic device 100.

[0483] 23 is a block diagram of an example software structure of an electronic device according to an embodiment of the present application. The electronic device may determine orientation parameters (e.g., distance, signal AOA, and RRSI) of nearby devices by using UWB positioning technology, determine display positions of images of the nearby devices in a viewfinder interface based on the orientation parameters of multiple nearby devices, display device icons of the nearby devices, and trigger the device icons to perform interactions between the electronic device and the nearby devices. The electronic device may establish a wireless communication connection to the target device by using one or more wireless communication protocols of UWB, Bluetooth, WLAN, and infrared to transmit data.

[0484] As shown in Figure 23, the software is divided into several layers using a layered architecture, with each layer having a distinct role and task. The layers communicate with each other using software interfaces. In some embodiments, the Android system is divided from top to bottom into an application layer, an application framework layer, a protocol stack, and a kernel layer. 。

[0485] The application layer includes a series of application packages such as Smart life, Bluetooth, and WLAN, and may further include applications such as camera, gallery, phone, music, and video.

[0486] The Smart life application is a software protocol that can select and control various smart home devices in the home and is installed on the electronic device used by the user. The Smart life application may be an application that is installed before the delivery of the electronic device, or may be an application that is downloaded from a network or obtained from another device by the user in the process of using the electronic device.

[0487] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0488] As shown in Figure 23, the application framework layer provides APIs and system services. Service). The APIs are used to implement communication between the application layer and the protocol stack, HAL, or kernel layer. For example, communication between "Smart life" and the kernel layer may be provided. The APIs may include one or more of a UWB API, a Bluetooth API, a WLAN API, and an infrared API. Correspondingly, the system services may include one or more of a UWB service, a Bluetooth service, a WLAN service, and an infrared service. The electronic device 100 may call a corresponding system service by calling one or more of a UWB API, a Bluetooth API, a WLAN API, and an infrared API to detect orientation parameters of a device near the electronic device 100. Alternatively, the corresponding system service may be called by calling one or more of a UWB API, a Bluetooth API, a WLAN API, and an infrared API to establish a wireless communication connection to a nearby device and transmit data.

[0489] The UWB service may specifically include one or more services, such as a UWB positioning service. The UWB positioning service may include orientation parameter measurements, which may include one or more of distance measurements, AOA measurements, and RRSI measurements. For example, the electronic device 100 may call the UWB positioning service by using a UWB API to detect orientation parameters of devices near the electronic device 100.

[0490] The Android runtime includes a kernel library and a virtual machine, and is responsible for scheduling and managing the Android system.

[0491] The kernel library contains two parts: one part is the performance functions that need to be called by the Java language, and the other part is the Android kernel library.

[0492] The application layer and the application framework layer are executed in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as library files. The virtual machine is configured to perform functions such as object lifecycle management, stack management, thread management, safety and execution management, and garbage collection.

[0493] The system library consists of multiple functional modules, such as the surface manager, the media library, and the Library ), a 3D graphics processing library (e.g., OpenGL for Embedded Systems (OpenGL ES)), and a 2D graphics engine (e.g., Skia Graphics Library (SGL)).

[0494] The surface manager is configured to manage the display subsystem and provide blending of 2D and 3D layers for multiple applications.

[0495] The Media Library supports playback and recording of several commonly used audio and video formats, as well as still image files. The Media Library may support multiple audio and video encoding formats, including Motion Picture Expert Group 4 (MPEG4), Advanced Video Coding (MPEG-4 Part 10 Advanced Video Coding, MPEG-4 AVC / H.264), Moving Image Expert Compression Standard Audio Layer 3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR), Joint Photographic Experts Group (JPEG / JPG), and Portable Network Graphics (PNG).

[0496] The 3D graphics processing library is configured to perform 3D graphics drawing, image rendering, compositing, layer processing, and the like.

[0497] The 2D graphics engine is a drawing engine for 2D drawing.

[0498] The kernel layer is a layer between hardware and software. The kernel layer may include one or more of a UWB chip driver, a Bluetooth chip driver, and a WLAN chip driver, and may further include a display driver, a camera driver, an audio driver, a sensor driver, etc. The kernel layer is configured to perform corresponding operations in response to functions called by subsystem services in the application framework layer. For example, in response to a UWB measurement command sent by a UWB positioning service by calling a UWB protocol stack, the UWB chip driver sends a UWB measurement request by using a hardware device (e.g., a UWB chip).

[0499] In the present example, the software architecture framework may reside on electronic device 100, or may reside on electronic device 201, electronic device 202, electronic device 203, or electronic device 204.

[0500] The following uses a device identification scenario in the embodiment as an example to describe the operating procedures of the software and hardware of the electronic device 100.

[0501] The acceleration sensor and / or gyroscope sensor detects the uplift operation (e.g., FIG. 7C), and a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the tap operation into an original input event. The original input event is stored in the kernel layer. The application framework layer obtains the original input event from the kernel layer and identifies the input event (e.g., electronic device 201) as pairing and connection to the electronic device. The Smart Life application calls a UWB API in the application framework layer to start the UWB positioning service. The UWB positioning service sends a UWB measurement command to the UWB HAL interface in the HAL by calling the UWB protocol stack. The UWB HAL sends a UWB measurement request to the kernel. The kernel layer drives the UWB chip according to the UWB measurement request to broadcast the measurement request (e.g., a first measurement request) by calling the UWB chip driver, and records the timestamp of sending the UWB measurement request by using the UWB time management module.

[0502] In some embodiments, after determining the target device, the UWB service in the application framework layer sends a connection request to the kernel layer by invoking a UWB protocol stack. The UWB chip in the kernel layer drives the UWB chip to send the connection request to the electronic device 201 to request establishing a UWB communication connection and transmitting data. Optionally, the UWB service in the application framework layer may further invoke a Bluetooth service, a WLAN service, or an infrared service to send the connection request to the electronic device 201. For example, the UWB service starts a Bluetooth service and uses the Bluetooth service to invoke a Bluetooth protocol stack to send a first connection request to the kernel layer. The Bluetooth chip in the kernel layer drives the Bluetooth chip to send the connection request to the electronic device 201 to request establishing a Bluetooth communication connection and transmitting data.

[0503] When an integrated unit is used, the electronic device 100 may include a processing module, a storage module, and a communication module. The processing module may be configured to control and manage the operation of the electronic device, for example, to support the electronic device in executing steps performed by the display unit, detection unit, and processing unit. The storage module may be configured to support the electronic device to store program code, data, etc. The communication module may be configured to support communication between the electronic device and other devices.

[0504] The processing module may be a processor or a controller, and may implement or execute the various exemplary logical blocks, modules, and circuits described with reference to the subject matter disclosed herein. A processor may alternatively be a combination that implements computing functions, such as a combination that includes one or more microprocessors, or a digital signal processor. processor The storage module may be a memory. The communication module may be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.

[0505] In an embodiment, when the processing module is a processor and the storage module is a memory, the electronic device of this embodiment may be a device having the structure shown in FIG.

[0506] The embodiments further provide a computer-readable storage medium having stored thereon computer instructions, which, when executed on an electronic device, can cause the electronic device to perform associated method steps to implement the photo sharing method of the above embodiments.

[0507] All or part of the above embodiments may be implemented using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, all or part of the embodiments may be implemented 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 into a computer and executed, the procedures or functions of the embodiments herein are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, or digital subscriber line) or wireless (e.g., infrared, propagation, or microwave) method. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device, such as a server or data center, that includes one or more available media. The usable media may be magnetic media (eg, floppy disk, hard disk, or magnetic tape), optical media (eg, DVD), semiconductor media (eg, solid state drive), and the like.

[0508] Those skilled in the art may understand that all or part of the procedures of the methods of the embodiments may be implemented by a computer program that instructs relevant hardware. The program may be stored in a computer-readable storage medium. When the program is executed, the procedures of the method embodiments may be included. The storage medium includes any medium that can store program code, such as a ROM, a random access memory RAM, a magnetic disk, or an optical disk.

[0509] This application claims priority to Chinese Patent Application No. 202010889841.2, filed on August 5, 2020, with the State Intellectual Property Office of the People's Republic of China, entitled "DEVICE IDENTIFICATION METHOD AND RELATED APPRATUS," and to Chinese Patent Application No. 202010782270.8, filed on August 5, 2020, with the State Intellectual Property Office of the People's Republic of China, entitled "PHOTO SHARING METHOD AND ELECTRONIC DEVICE," and to Chinese Patent Application No. 202011183311.8, filed on October 29, 2020, with the State Intellectual Property Office of the People's Republic of China, entitled "DEVICE IDENTIFICATION METHOD AND RELATED APPRATUS," each of which is incorporated herein by reference in its entirety.

Claims

1. 1. A device identification method applied to a first electronic device equipped with a camera, comprising: receiving a first operation by the first electronic device; displaying a first interface by the first electronic device in response to the first operation, the first interface having a preview image captured by the camera, the preview image including images of a plurality of electronic devices including a second electronic device; performing a detection process by the first electronic device to acquire position information of each of the plurality of electronic devices relative to the first electronic device, and acquiring first position information of the second electronic device; receiving a second operation by the first electronic device; and determining, by the first electronic device, based on the first position information and a display area of ​​the second electronic device in the preview image, that the second operation pertains to the second electronic device; displaying, by the first electronic device, a second interface in response to the second operation, the second interface including one or more controls for controlling the second electronic device; and determining a device type of an electronic device that is included as an image in the preview image but whose position information cannot be obtained in the detection process based on the preview image; if the electronic device is a fourth electronic device of a first type, determining a first target device of the first type among electronic devices associated with the first electronic device or associated with an account of the first electronic device, and displaying a fourth label indicating that the image of the fourth electronic device in the preview image is associated with the first target device; or if the electronic device is a fifth electronic device of a second type, acquire third location information of the first electronic device, and determine a second target device, whose device type is the second type, among electronic devices whose location information is the same as the third location information based on the acquired third location information and the correspondence between electronic devices and location information stored in the first electronic device, and display a fifth label indicating that the image of the fifth electronic device in the preview image is related to the second target device; The method according to claim 1,

2. obtaining, by the first electronic device, first position information of the second electronic device relative to the first electronic device, broadcasting a discovery request by the first electronic device, the discovery request including an identification of the first electronic device; determining, by the first electronic device, the first location information of the second electronic device relative to the first electronic device based on the detection response when the first electronic device receives a detection response transmitted by the second electronic device based on the detection request, the detection response including an identification of the second electronic device; In particular, The method of claim 1.

3. determining, by the first electronic device, based on the first position information and a display area of ​​the second electronic device in the preview image, that the second operation relates to the second electronic device; determining, by the first electronic device, a display position of a first label in the preview image based on the first position information and the display area of ​​the second electronic device in the preview image, and displaying the first label at the display position, wherein the first label is used to identify the second electronic device; determining, by the first electronic device, based on the touching of the first label, that the second action pertains to the second electronic device; having The method of claim 1.

4. the display position of the first label in the preview image partially or completely overlaps with the display area of ​​the second electronic device in the preview image; The method according to claim 3.

5. The method comprises: obtaining, by the first electronic device, second location information of a third electronic device relative to the first electronic device; detecting, by the first electronic device, that the third electronic device is not included in the preview image and determining, based on the second position information, that the third electronic device is within a viewfinder range of the camera; determining, by the first electronic device, a display position of a second label in the preview image based on the second position information, the second label being used to indicate one or more of the following information: identification information of the third electronic device, occlusion of the third electronic device, and the second position information; Further comprising The method of claim 1.

6. The method comprises: obtaining, by the first electronic device, second location information of a third electronic device relative to the first electronic device; detecting, by the first electronic device, that the third electronic device is not included in the preview image and determining, based on the second position information, that the third electronic device is not within a viewfinder range of the camera; determining, by the first electronic device, a display position of a third label in the preview image based on the second position information, the third label being used to indicate one or more of the following: identification information of the third electronic device and the second position information; Further comprising The method of claim 1.

7. The first interface further includes a first icon, the first icon associated with data to be shared, and the method further comprises: receiving a third operation by the first electronic device, the third operation being an operation for the first label and / or the first icon; and transmitting, by the first electronic device, the data to be shared to the second electronic device in response to the third operation; Further comprising The method according to claim 3.

8. Prior to receiving a third operation by the first electronic device, the method further comprises: displaying, by the first electronic device, the first label in a first display format in the first interface based on a data type of the data to be shared; the first label in the first display format is used to prompt a user that the second electronic device supports output of the data to be shared. The method of claim 7.

9. the preview image includes an image of a third electronic device and a third label, the third label associated with the third electronic device, the method comprising: receiving a fourth operation by the first electronic device, the fourth operation being an operation for the third label and / or the first icon; and outputting a prompt message by the first electronic device in response to the fourth operation, the prompt message being used to prompt a user that the third electronic device does not support output of the data to be shared; Further comprising The method of claim 7.

10. 1. An electronic device having one or more processors and a memory, the memory having computer instructions; When the one or more processors invoke the computer instructions, the electronic device: An action of receiving a first operation; an operation of displaying a first interface in response to the first operation, the first interface having a preview image captured by a camera of the electronic device, the preview image including images of a plurality of devices including a first target device; performing a detection process to obtain position information of each of the plurality of devices relative to the electronic device, and obtaining first relative position information between the electronic device and the first target device; An action of receiving a second operation; and determining, based on the first relative position information and a display area of ​​the first target device in the preview image, that the second operation relates to the first target device; an act of displaying a second interface in response to the second operation, the second interface including one or more controls for controlling the first target device; and determining a device type of a device that is included as an image in the preview image but whose location information cannot be obtained in the detection process based on the preview image; if the device is a third target device of a first type, determining an identity of a device associated with the electronic device or associated with an account of the electronic device that has a device type of the first type, and displaying a fourth label indicating that an image of the third target device in the preview image is associated with the identity; or if the device is a fourth target device of a second type, acquiring location information of the electronic device, and determining an identification of a device whose device type is the second type among devices whose location information is the same as the acquired location information of the electronic device based on the acquired location information and a correspondence between devices and location information stored in the electronic device, and displaying a fifth label indicating that an image of the fourth target device in the preview image is associated with the identification information; can be performed, Electronic devices.

11. When the one or more processors invoke the computer instructions, the electronic device is capable of performing the operation of obtaining the first relative position information of the first target device, broadcasting a discovery request, the discovery request including an identification of the electronic device; determining the first relative location information of the first target device based on a detection response transmitted by the first target device based on the detection request when the detection response is received, the detection response including an identification of the first target device; In particular, 11. The electronic device of claim 10.

12. determining that the second operation relates to the first target device based on the first relative position information and a display area of ​​the first target device in the preview image; determining a display position of a first label in the preview image based on the first relative position information and the display area of ​​the first target device in the preview image, and displaying the first label at the display position, wherein the first label is used to identify the first target device; determining, based on the touching of the first label, that the second operation pertains to the first target device; having 11. The electronic device of claim 10.

13. the display position of the first label in the preview image partially or completely overlaps with the display position of the first target device in the preview image; 13. The electronic device of claim 12.

14. When the one or more processors invoke the computer instructions, the electronic device: obtaining second relative position information of a second target device; detecting that the second target device is not included in the preview image and determining that the second target device is within a viewfinder range of the camera based on the second relative position information; and an operation of determining a display position of a second label in the preview image based on the second relative position information, the second label being used to indicate one or more of the following information: identification information of the second target device, occlusion of the second target device, and the second relative position information. can be performed, 11. The electronic device of claim 10.

15. When the one or more processors invoke the computer instructions, the electronic device: detecting that the second target device is not included in the preview image and determining, based on the second relative position information, that the second target device is not within the viewfinder range of the camera; determining a display position of a third label in the preview image based on the second relative position information, the third label being used to indicate one or more of: the identification information of the second target device; and can be performed, 15. The electronic device of claim 14.

16. The first interface further includes a first icon, the first icon being associated with data to be shared, and when the one or more processors invoke the computer instructions, the electronic device performs the following: an action of receiving a third operation, the third operation being an operation for the first label and / or the first icon; and transmitting the data to be shared to the first target device in response to the third operation; may further be carried out, 13. The electronic device of claim 12.

17. When the one or more processors invoke the computer instruction, before the electronic device can execute the operation subject to the third operation, the electronic device performs The method may further comprise the steps of: displaying the first label in a first display format in the first interface based on a data type of the data to be shared; the first label in the first display format is used to prompt a user that the first target device supports output of the data to be shared.

17. The electronic device of claim 16.

18. The preview image includes an image of a second target device and a third label, the third label being associated with the second target device, and when the one or more processors invoke the computer instructions, the electronic device performs the following: an action of receiving a fourth operation, the fourth operation being an operation for the third label and / or the first icon; and an operation of outputting a prompt message in response to the fourth operation, the prompt message being used to prompt a user that the second target device does not support output of the data to be shared; may further be carried out, 17. The electronic device of claim 16.

19. A computer-readable medium configured to store one or more programs, comprising: The one or more programs have instructions configured to cause one or more processors to carry out a method according to any one of claims 1 to 9. Computer-readable medium.

20. A computer program which, when executed by one or more processors, causes the one or more processors to carry out a method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Mobile terminal

    EP3687144A1

  • Program of portable device, portable device, and control method of portable device

    JP2012217126A

  • Program of mobile device, mobile device, and method of controlling mobile device

    JP2012235440A

  • Portable terminal, control program of portable terminal, and display system including portable terminal

    JP2013161246A

  • Portable terminal, information processing device, image forming device, control methods therefor, program, and information processing system

    JP2013235331A