Cross-device focus switching method, and electronic device and communication system

By detecting the user's head orientation and using keyboard and mouse sharing and hand-eye coordination to switch focus between multiple electronic devices, the problem of inconvenience in switching focus between multiple devices is solved, thus improving the user experience.

WO2026233342A1PCT designated stage Publication Date: 2026-11-12HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/095105
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-24
Filing Date
2026-05-07
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

How to more easily switch input device focus between multiple electronic devices to improve user experience.

Method used

By detecting the user's head orientation, the system determines the user's desired input device focus and uses keyboard and mouse sharing and hand-eye coordination to switch focus between different electronic devices, while providing prompts to guide the user's operation.

Benefits of technology

It improves the convenience and accuracy of users switching focus between multiple devices, meets user needs, and avoids unnecessary device switching operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026095105_12112026_PF_FP_ABST
    Figure CN2026095105_12112026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a cross-device focus switching method, and an electronic device and a communication system. The present application relates to the technical field of terminals. In the method, the orientation of a user's head is determined to control the focus of an input device to switch between different electronic devices. In this way, the behavior of a user is captured to determine an electronic device that the user intends to use next, and then the focus of an input device is switched to the electronic device that the user intends to use next, thereby facilitating an improvement in the user experience when the user switches the focus of the input device.
Need to check novelty before this filing date? Find Prior Art

Description

A method for switching focus across devices, an electronic device and a communication system

[0001] This application claims priority to Chinese Patent Application No. 202510592528.0, filed on May 8, 2025, entitled "A Method for Switching Focus Across Devices, Electronic Device and Communication System", and Chinese Patent Application No. 202510679796.6, filed on May 24, 2025, entitled "A Method for Switching Focus Across Devices, Electronic Device and Communication System", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to a method for switching focus across devices, an electronic device, and a communication system. Background Technology

[0003] Users can use multiple electronic devices simultaneously. To make it easier for users to operate these devices, they can provide keyboard and mouse sharing functionality, allowing multiple electronic devices to share input devices such as keyboards, mice, and touchpads. When the focus of an input device is on a particular electronic device, that device can respond to the operation applied to that input device and perform the corresponding action. How to more conveniently switch the focus of an input device between multiple electronic devices is a problem that urgently needs to be solved in this field. Summary of the Invention

[0004] This application provides a method, electronic device, and communication system for switching focus across devices, which can control the switching of the focus of an input device between different electronic devices by determining the orientation of the user's head.

[0005] In a first aspect, this application provides a method for switching focus across devices. This method is applied to a communication system comprising: a first electronic device, a second electronic device, and a first input device. The first electronic device and the second electronic device have established a communication connection, and / or the first electronic device and the second electronic device are logged into the same account. The first input device is connected to the first electronic device. The method includes: the first electronic device displaying the focus of the first input device; the first electronic device and / or the second electronic device detecting that a user's head is facing the second electronic device; in response to a first operation received on the first input device, the first electronic device stopping displaying the focus of the first input device and sending a first message to the second electronic device; and in response to the first message, the second electronic device displaying the focus of the first input device.

[0006] In some implementations, the method of the first aspect is not limited to the above-mentioned communication system, but can also be applied to various communication systems provided in this application, such as the communication systems shown in Figures 1A-1F and more communication systems.

[0007] In this way, by capturing user behavior to determine the electronic device that the user intends to use next, and then switching the focus of the input device to the electronic device that the user intends to use, it helps to improve the user experience when the user switches the focus of the input device.

[0008] Furthermore, after anticipating the user's intended electronic device, the system further determines this desired device based on the user's actions. This avoids situations where the user merely turns their head to view the displayed content on an electronic device without intending to use it further, thus better aligning with user needs.

[0009] In conjunction with the first aspect, in some embodiments, the second electronic device displaying the focus of the first input device specifically includes: the second electronic device displaying the focus of the first input device at a first position on the display screen, wherein the first position is the center of the display screen, or the first position is the position where the focus was most recently displayed on the display screen, or the first position corresponds to the position of the focus of the first input device on the display screen of the first electronic device, or the first position is the position of the first interface element displayed in the second electronic device, or the first position is any input box displayed on the display screen.

[0010] For example, the position of the first interface element mentioned above can refer to the first interface element in the current interface based on the user's reading habits. For instance, if the user's reading habits are from top to bottom and from left to right, then the first interface element can refer to the topmost and leftmost interface element displayed on the screen of the second electronic device. In this embodiment, the first interface element mentioned above is only illustrative and is not limited thereto. Furthermore, for example, when an input box is displayed on the screen of the second electronic device, such as when the second electronic device is in a document editing or web search scenario, the first position can also be the position of that input box. In this embodiment, the first position mentioned above is only illustrative and is not limited thereto.

[0011] In some implementations, the user can also determine the specific location of the first position on the display screen.

[0012] In this way, after the focus of the first input device is switched to the second electronic device, it can be displayed on the screen of the second electronic device, providing users with a more convenient way to use the second electronic device.

[0013] In conjunction with the first aspect, in some embodiments, before the first electronic device and / or the second electronic device detects that the user's head is facing the second electronic device, the method further includes: the first electronic device activating a first function; and the second electronic device activating the first function.

[0014] For example, the first function could refer to keyboard and mouse sharing and hand-eye coordination.

[0015] In some implementations, once all electronic devices in the communication system have activated the first function, they can determine the user's head orientation in real time. Taking the first electronic device as an example, if the first electronic device detects that the user's head is facing it, it will not switch the focus of the first input device and will continue to display the user's head on the first electronic device. If the first electronic device detects that the user's head is facing the second electronic device, it will switch the focus of the first input device to the second electronic device.

[0016] In this way, users can decide whether to use the cross-device focus switching method provided in the embodiments of this application.

[0017] In conjunction with the first aspect, in some embodiments, enabling the first function on the first electronic device specifically includes: the first electronic device enabling the first function by setting a first control provided by an application, or a second control provided by the status bar, or a third control provided by the control center; enabling the first function on the second electronic device specifically includes: the second electronic device enabling the first function by setting a first control provided by an application, or the second control provided by the status bar, or the third control provided by the control center. For example, the specific process of activating the keyboard and mouse sharing function and the hand-eye coordination function in an electronic device can be referred to the relevant descriptions of the embodiments corresponding to Figures 10 to 14 below.

[0018] In conjunction with the first aspect, in some embodiments, after the first electronic device and / or the second electronic device detects that the user's head is facing the second electronic device, the method further includes: the second electronic device displaying a first prompt message, the first prompt message being used to prompt the user to switch the focus of the first input device, or the first prompt message being used to prompt the user to switch the focus of the first input device to the second electronic device, or the first prompt message being used to prompt the user to input the first operation to switch the focus of the first input device to the second electronic device.

[0019] In this way, the initial prompts can help users quickly understand how to switch input device focus between different electronic devices, improving the accuracy of operation and enabling users to become more proficient in using the keyboard and mouse sharing function and the hand-eye coordination function.

[0020] In conjunction with the first aspect, in some embodiments, the first prompt message includes text content and / or an icon. For example, reference can be made to the first prompt messages shown in application scenarios 1 to 6 below, without limitation.

[0021] In conjunction with the first aspect, in some embodiments, the method further includes: the first electronic device displaying the first prompt information. That is, it is not limited to the second electronic device displaying the first prompt information; other electronic devices in the communication system can also display the first prompt information. This allows for a more comprehensive prompting of the user.

[0022] In conjunction with the first aspect, in some embodiments, when the first input device is a keyboard, the first operation includes: operating on a first key in the first input device;

[0023] When the first input device is a mouse, the first operation includes: moving the first input device.

[0024] In this embodiment, the first operation is used to trigger a switch of the focus of the input device. For example, the first operation can be referenced from the contents shown in Table 1 below. In one possible implementation, the specific implementation of the first operation can also be set by the user.

[0025] In this way, after anticipating the user's intended use of a particular electronic device, the system further determines that device based on the user's actions. This avoids situations where the user simply turns their head to view the displayed content on an electronic device without intending to use it further, thus better aligning with user needs.

[0026] In conjunction with the first aspect, in some embodiments, the detection of a user's head facing the second electronic device by the first electronic device and / or the second electronic device specifically includes: the first electronic device and / or the second electronic device determining a first relative position between the first electronic device and the second electronic device; and the first electronic device and / or the second electronic device determining that the user's head is facing the second electronic device based on the first relative position, the user's head posture in the image captured by the first electronic device, and the user's head posture in the image captured by the second electronic device.

[0027] In conjunction with the first aspect, in some embodiments, the detection by the first electronic device and / or the second electronic device of the user's head facing the second electronic device specifically includes: the first electronic device and / or the second electronic device acquiring a first angle and a second angle, wherein the first angle is the angle between the first electronic device and the user's head, and the second angle is the angle between the second electronic device and the user's head; if the first angle is greater than the second angle, the first electronic device and / or the second electronic device determining that the user's head is facing the second electronic device.

[0028] In addition to the two methods for determining the user's head orientation mentioned above, other methods can also be used in this application embodiment to determine which electronic device the user's head is facing.

[0029] In this way, the direction of the user's head can be used to determine which electronic device the user expects to use, and thus determine which electronic device the input device's focus should be switched to, which better meets the user's needs.

[0030] In conjunction with the first aspect, in some embodiments, after the second electronic device displays the focus of the first input device in response to the first message, the method further includes: in response to a second operation received on the first input device, the second electronic device performing an action corresponding to the second operation.

[0031] In this way, after switching the focus of the first input device to the second electronic device, the user can use the second electronic device through the first input device.

[0032] In conjunction with the first aspect, in some embodiments, after the second electronic device displays the focus of the first input device in response to the first message, the method further includes: the first electronic device and / or the second electronic device detecting that a user's head is facing the first electronic device; in response to the first operation received on the first input device, the second electronic device stopping the display of the focus of the first input device and sending a second message to the first electronic device; and in response to the second message, the first electronic device displaying the focus of the first input device.

[0033] In other words, after the focus of the first input device is switched to the second electronic device, it can be switched back to the first electronic device.

[0034] In conjunction with the first aspect, in some embodiments, the first communication system further includes a third electronic device that has established a communication connection with the first electronic device and the second electronic device. After the second electronic device displays the focus of the first input device in response to the first message, the method further includes: the second electronic device and / or the third electronic device detecting that the user's head is facing the third electronic device; in response to receiving the first operation on the first input device, the second electronic device stopping the display of the focus of the first input device and sending a third message to the third electronic device; and in response to the third message, the third electronic device displaying the focus of the first input device.

[0035] In other words, after the focus of the first input device is switched to the second electronic device, it can also be switched to the third electronic device.

[0036] In conjunction with the first aspect, in some embodiments, the first communication system further includes a second input device connected to the first electronic device, and the method further includes: the first electronic device displaying the focus of the second input device; and the second electronic device displaying the focus of the second input device in response to the first message.

[0037] In one possible implementation, when the first electronic device displays the focus of two input devices, the focus of both input devices can be switched to the second electronic device simultaneously.

[0038] In conjunction with the first aspect, in some embodiments, the first communication system further includes a second input device connected to the first electronic device, and the method further includes: the first electronic device displaying the focus of the second input device; and in response to receiving the first operation on the first input device, the first electronic device stopping the display of the focus of the first input device.

[0039] In one possible implementation, when the first electronic device displays the focus of two input devices, the user can decide how to switch the focus of the two input devices to the second electronic device. For example, the user can choose to switch the focus of one input device to the second electronic device, or they can choose to switch the focus of both input devices to the second electronic device. This allows the user to select the input device to switch focus, increasing user engagement and making the result of switching the focus of the input devices more in line with the user's needs.

[0040] Secondly, this application provides a method for switching focus across devices. The method is applied to a second electronic device, a first electronic device having established a communication connection with the second electronic device, and / or the first electronic device and the second electronic device being logged into the same account, and a first input device being connected to the first electronic device. The method includes: the second electronic device detecting that a user's head is facing the second electronic device; the second electronic device receiving a first message sent by the first electronic device; and in response to the first message, the second electronic device displaying the focus of the first input device.

[0041] In this way, by capturing user behavior to determine the electronic device that the user intends to use next, and then switching the focus of the input device to the electronic device that the user intends to use, it helps to improve the user experience when the user switches the focus of the input device.

[0042] Furthermore, after anticipating the user's intended electronic device, the system further determines this desired device based on the user's actions. This avoids situations where the user merely turns their head to view the displayed content on an electronic device without intending to use it further, thus better aligning with user needs.

[0043] In conjunction with the second aspect, in some embodiments, the second electronic device displaying the focus of the first input device specifically includes: the second electronic device displaying the focus of the first input device at a first position on the display screen, wherein the first position is the center of the display screen, or the first position is the position where the focus was most recently displayed on the display screen, or the first position corresponds to the position of the focus of the first input device on the display screen of the first electronic device, or the first position is the position of the first interface element displayed in the second electronic device, or the first position is any input box displayed on the display screen.

[0044] In this way, after the focus of the first input device is switched to the second electronic device, it can be displayed on the screen of the second electronic device, providing users with a more convenient way to use the second electronic device.

[0045] In conjunction with the second aspect, in some embodiments, before the second electronic device detects that the user's head is facing the second electronic device, the method further includes: the second electronic device activating the first function.

[0046] In some implementations, once all electronic devices in the communication system have activated the first function, they can determine the user's head orientation in real time. Taking the first electronic device as an example, if the first electronic device detects that the user's head is facing it, it will not switch the focus of the first input device and will continue to display the user's head on the first electronic device. If the first electronic device detects that the user's head is facing the second electronic device, it will switch the focus of the first input device to the second electronic device.

[0047] In this way, users can decide whether to use the cross-device focus switching method provided in the embodiments of this application.

[0048] In conjunction with the second aspect, in some embodiments, enabling the first function of the second electronic device specifically includes: enabling the first function through a first control provided by a settings application, or a second control provided by the status bar, or a third control provided by the control center.

[0049] In conjunction with the second aspect, in some embodiments, after the second electronic device detects that the user's head is facing the second electronic device, the method further includes: the second electronic device displaying a first prompt message, the first prompt message being used to prompt the user to switch the focus of the first input device, or the first prompt message being used to prompt the user to switch the focus of the first input device to the second electronic device, or the first prompt message being used to prompt the user to input the first operation to switch the focus of the first input device to the second electronic device.

[0050] In this way, the initial prompts can help users quickly understand how to switch input device focus between different electronic devices, improving the accuracy of operation and enabling users to become more proficient in using the keyboard and mouse sharing function and the hand-eye coordination function.

[0051] In conjunction with the second aspect, in some embodiments, when the first input device is a keyboard, the first operation includes: operating on a first key in the first input device; when the first input device is a mouse, the first operation includes: moving the first input device.

[0052] In this embodiment, the first operation is used to trigger a switch of the focus of the input device. For example, the first operation can be referenced from the contents shown in Table 1 below. In one possible implementation, the specific implementation of the first operation can also be set by the user.

[0053] In this way, after anticipating the user's intended use of a particular electronic device, the system further determines that device based on the user's actions. This avoids situations where the user simply turns their head to view the displayed content on an electronic device without intending to use it further, thus better aligning with user needs.

[0054] In conjunction with the second aspect, in some embodiments, the second electronic device detecting that the user's head is facing the second electronic device specifically includes: the second electronic device determining a first relative position between the first electronic device and the second electronic device; and the second electronic device determining that the user's head is facing the second electronic device based on the first relative position, the user's head posture in the image acquired by the first electronic device, and the user's head posture in the image acquired by the second electronic device.

[0055] In conjunction with the second aspect, in some embodiments, the second electronic device detecting that the user's head is facing the second electronic device specifically includes: the second electronic device acquiring a first angle and a second angle, wherein the first angle is the angle between the first electronic device and the user's head, and the second angle is the angle between the second electronic device and the user's head; if the first angle is greater than the second angle, the second electronic device determines that the user's head is facing the second electronic device.

[0056] In addition to the two methods for determining the user's head orientation mentioned above, other methods can also be used in this application embodiment to determine which electronic device the user's head is facing.

[0057] In this way, the direction of the user's head can be used to determine which electronic device the user expects to use, and thus determine which electronic device the input device's focus should be switched to, which better meets the user's needs.

[0058] In conjunction with the second aspect, in some embodiments, the method further includes, after the second electronic device displays the focus of the first input device in response to the first message, the second electronic device performing an action corresponding to the second operation in response to a second operation received on the first input device.

[0059] In this way, after switching the focus of the first input device to the second electronic device, the user can use the second electronic device through the first input device.

[0060] Thirdly, a communication system includes: a first electronic device, a second electronic device, and a first input device, wherein the first electronic device and the second electronic device have a communication connection, and / or the first electronic device and the second electronic device are logged into the same account, the first input device is connected to the first electronic device, the first electronic device is used to perform the method of the first aspect or any embodiment of the first aspect, and the second electronic device is used to perform the method of the first aspect or any embodiment of the first aspect.

[0061] Fourthly, this application provides an electronic device including a memory, a processor, and computer instructions stored in the memory, the processor executing the computer program to implement the method of the second aspect or any embodiment of the second aspect described above.

[0062] Fifthly, this application provides a chip system including a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit. The processing circuit is used to allow the code instructions to execute the methods of any of the embodiments of the second or third aspect described above.

[0063] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a processor, implements the method of any of the embodiments of the second or third aspect described above.

[0064] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when run on a processor, implements the method described in the second aspect or any of the embodiments of the second aspect.

[0065] The benefits of the fourth to seventh aspects can be referenced from the first aspect mentioned above. Attached Figure Description

[0066] Figures 1A-1F are schematic diagrams of several communication systems provided in the embodiments of this application;

[0067] Figures 2A-2E are schematic diagrams of application scenario 1 provided in the embodiments of this application;

[0068] Figures 3A-3E are schematic diagrams of application scenario 2 provided in the embodiments of this application;

[0069] Figures 4A-4E are schematic diagrams of application scenario 3 provided in the embodiments of this application;

[0070] Figures 5A-5E are schematic diagrams of application scenario 4 provided in the embodiments of this application;

[0071] Figures 6A-6E are schematic diagrams of application scenario 5 provided in the embodiments of this application;

[0072] Figures 7A-7E are schematic diagrams of application scenario 6 provided in the embodiments of this application;

[0073] Figure 8 is a schematic flowchart of a method for switching focus across devices provided in an embodiment of this application;

[0074] Figure 9 is a schematic flowchart of a method for switching focus across devices provided in an embodiment of this application;

[0075] Figure 10 is a schematic diagram of the interface for setting an application window in an electronic device 100 according to an embodiment of this application;

[0076] Figure 11 is a schematic diagram of a keyboard and mouse sharing interface that displays a device list according to an embodiment of this application;

[0077] Figure 12 is a schematic diagram of a keyboard and mouse sharing interface in an electronic device 100 provided in an embodiment of this application;

[0078] Figure 13 is a schematic diagram of the interface for setting up an application in an electronic device 500 according to an embodiment of this application;

[0079] Figure 14 is a schematic diagram of the interface of the control center in an electronic device 500 provided in an embodiment of this application;

[0080] Figure 15 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0081] Figure 16 is a schematic diagram of the software architecture of an electronic device provided in an embodiment of this application. Detailed Implementation

[0082] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions “a,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one or more (including two). “At least one of the following” or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0083] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0084] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0085] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.

[0086] First, let's introduce some terms and concepts involved in the embodiments of this application.

[0087] Keyboard and mouse sharing function

[0088] In some scenarios, users can use multiple electronic devices simultaneously. To make it easier for users to operate electronic devices, these devices can offer keyboard and mouse sharing functionality, allowing multiple electronic devices to share input devices such as keyboards, mice, touchpads, etc.

[0089] Input device focus

[0090] The focus of an input device can refer to a specific element in the user interface that is currently capable of receiving user input operations (such as keyboard key presses, mouse clicks, etc.). In other words, the electronic device displaying the focus of the input device is capable of receiving operations applied to that input device. For example, the focus of the input device can be displayed in the user interface as a cursor. The cursor can be, but is not limited to, the following forms: arrow, text pointer, hand cursor, etc. In this embodiment, the form of the cursor is not limited.

[0091] The following describes some communication systems provided in the embodiments of this application.

[0092] Figure 1A illustrates an exemplary communication system 10 provided in an embodiment of this application.

[0093] As shown in Figure 1A, the communication system 10 includes: electronic device 100, electronic device 200, and input device 300. Electronic device 100 and electronic device 200 have a communication connection, and / or, electronic device 100 and electronic device 200 are logged into the same account. Input device 300 has a communication connection with electronic device 100. Optionally, input device 300 has a communication connection with electronic device 200.

[0094] Users can use electronic device 100 through input device 300, or they can use electronic device 200 through input device 300.

[0095] Figure 1B illustrates an exemplary communication system 20 provided in an embodiment of this application.

[0096] As shown in Figure 1B, the communication system 20 includes: electronic device 100, electronic device 200, and input device 400. Electronic device 100 and electronic device 200 establish a communication connection, and / or, electronic device 100 and electronic device 200 are logged into the same account. Input device 400 establishes a communication connection with electronic device 100. Optionally, input device 400 establishes a communication connection with electronic device 200.

[0097] Users can use electronic device 100 through input device 400, or they can use electronic device 200 through input device 400.

[0098] Figure 1C illustrates an exemplary communication system 30 provided in an embodiment of this application.

[0099] As shown in Figure 1C, the communication system 30 includes: electronic device 100, electronic device 200, input device 300, and input device 400. Electronic device 100 and electronic device 200 have a communication connection, and / or, electronic device 100 and electronic device 200 are logged into the same account. Input device 300 has a communication connection with electronic device 100, and input device 400 has a communication connection with electronic device 100. Optionally, input device 300 has a communication connection with electronic device 200, and input device 400 has a communication connection with electronic device 200.

[0100] Users can use electronic device 100 through input device 300 and input device 400, and can also use electronic device 200 through input device 300 and input device 400.

[0101] Figure 1D illustrates an exemplary communication system 40 provided in an embodiment of this application.

[0102] As shown in Figure 1D, the communication system 40 includes: electronic device 100, electronic device 200, electronic device 500, and input device 300. Communication connections are established between electronic device 100 and electronic device 200, between electronic device 100 and electronic device 500, and between electronic device 200 and electronic device 500; and / or, electronic devices 100, 200, and 500 are logged into the same account. Input device 300 is connected to electronic device 100. Optionally, communication connections are established between input device 300 and electronic device 200, and between input device 300 and electronic device 500.

[0103] Users can use electronic device 100, electronic device 200, and electronic device 500 through input device 300.

[0104] Figure 1E illustrates an exemplary communication system 50 provided in an embodiment of this application.

[0105] As shown in Figure 1E, the communication system 50 includes: electronic device 100, electronic device 200, electronic device 500, and input device 400. Communication connections are established between electronic device 100 and electronic device 200, between electronic device 100 and electronic device 500, and between electronic device 200 and electronic device 500; and / or, electronic devices 100, 200, and 500 are logged into the same account. Input device 400 is connected to electronic device 100. Optionally, communication connections are established between input device 400 and electronic device 200, and between input device 400 and electronic device 500.

[0106] Users can use electronic device 100, electronic device 200, and electronic device 500 through input device 400.

[0107] Figure 1F illustrates an exemplary communication system 60 provided in an embodiment of this application.

[0108] As shown in Figure 1F, the communication system 60 includes: electronic device 100, electronic device 200, electronic device 500, input device 300, and input device 400. Communication connections are established between electronic device 100 and electronic device 200, between electronic device 100 and electronic device 500, and between electronic device 200 and electronic device 500, and / or electronic devices 100, 200, and 500 are logged into the same account. Communication connections are established between input device 300 and electronic device 100, and between input device 400 and electronic device 100. Optionally, communication connections are established between input device 300 and electronic device 200, between input device 300 and electronic device 500, between input device 400 and electronic device 200, and between input device 400 and electronic device 500.

[0109] Users can use electronic device 100 through input device 400, electronic device 200 through input device 400, and electronic device 500 through input device 400.

[0110] The communication connection described above can be wired or wireless, such as Bluetooth or Wi-Fi; there is no limitation in this regard. The account described above can be a system account or a third-party account; there is no limitation in this regard.

[0111] In one possible implementation, the distance between the electronic devices in the various communication systems described above is less than a preset distance. For example, the distance between electronic device 100 and electronic device 200 is less than a preset distance. The distance between electronic device 100 and electronic device 500 is less than a preset distance. The distance between electronic device 200 and electronic device 500 is less than a preset distance. For example, the preset distance can be 50 cm.

[0112] For example, the electronic devices in the various communication systems described above, such as electronic device 100, electronic device 200, and electronic device 500, can be mobile phones, tablets, personal computers (PCs), desktop computers, laptops, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices, and / or smart city devices. This application embodiment does not impose any special restrictions on the specific types of electronic devices in the various communication systems, such as electronic device 100, electronic device 200, and electronic device 500.

[0113] For example, the input devices in the above-mentioned communication systems, such as input device 300 and input device 400, can be keyboards, mice, touchpads, gamepads, etc. The embodiments of this application do not impose special restrictions on the specific types of input devices 300 and 400.

[0114] The electronic devices in the aforementioned communication systems, such as electronic device 100, electronic device 200, and electronic device 500, all have displays. Users can use various functions provided by the electronic devices in each communication system. For example, users can browse web pages through electronic device 100, watch videos through electronic device 200, and engage in social chat through electronic device 500. This is not limited in the embodiments of this application. The electronic devices in the aforementioned communication systems can also display user interfaces for performing their respective functions. These user interfaces can include various interface elements. Taking a user interface providing social chat (hereinafter referred to as the chat interface) as an example, the chat interface can include a title bar, a chat content display area, and a chat content input area. The title bar can include a return control and the name of the chat partner. The return control can be used to exit the current chat window. The chat content display area can be used to display the chat history between the user and the chat partner. The specific content of the chat history is not limited in the embodiments of this application. The chat content input area can be used to input voice, text, emoticons, or send pictures, videos, etc. The chat content input area can include an input bar, which can be used to input chat content such as voice, text, and emoticons.

[0115] It should be noted that the interfaces provided in the embodiments of this application are all exemplary interfaces. Each interface may include more or fewer content and / or controls, and the specific content and / or controls included in each interface, as well as the display style of the content and / or controls, are not limited in the embodiments of this application. It is worth noting that the user interface displayed by the electronic device in the above-mentioned communication systems may or may not include input boxes.

[0116] In the aforementioned communication systems, when the focus of the input device is on a particular electronic device, that electronic device can display a cursor. This cursor indicates the focus of the input device. In other words, operations performed by the user through the input device can be applied to the electronic device displaying the cursor.

[0117] In subsequent embodiments, electronic device 100 is exemplarily a PC, electronic device 200 is a tablet computer, electronic device 500 is a mobile phone, input device 300 is a mouse, and input device 400 is a keyboard.

[0118] In the embodiments of this application, the various communication systems shown in Figures 1A-1F are merely illustrative examples. The communication systems provided in the embodiments of this application may also include a greater number of electronic devices and a greater number of input devices, and there is no limitation thereto. For example, the communication system may also include in-vehicle equipment, such as a central control screen, passenger screen, armrest screen, rear control screen (door panel screen), and ceiling-mounted screen in the cabin.

[0119] Based on the above description of the communication system, embodiments of this application provide a method for switching focus across devices. In this method, the focus of the input device is switched between different electronic devices by determining the user's head orientation. Thus, by capturing user behavior to determine the electronic device the user subsequently intends to use, and then switching the input device's focus to that desired electronic device, the user experience when switching input device focus is improved.

[0120] Furthermore, after anticipating the user's intended electronic device, the system further determines this desired device based on the user's actions. This avoids situations where the user merely turns their head to view the displayed content on an electronic device without intending to use it further, thus better aligning with user needs.

[0121] It is understood that the cross-device focus switching function of the electronic device involved in the embodiments of this application can also be referred to as the hand-eye coordination function or the hand-eye cooperation function. For ease of description, it will be referred to as the hand-eye coordination function below.

[0122] To gain a more detailed understanding of the cross-device focus switching method provided in this application, several application scenarios provided in the embodiments of this application are introduced below.

[0123] In one possible implementation, when the keyboard and mouse sharing function and the hand-eye coordination function are activated in each electronic device of the following communication system, the following application scenario can be achieved: the focus of the input device can be switched between the various electronic devices in the communication system. The specific process of activating the keyboard and mouse sharing function and the hand-eye coordination function in the electronic device can be referred to the relevant descriptions of the embodiments corresponding to Figures 10 to 14 below, which will not be repeated here.

[0124] Application Scenario 1: Implement focus switching of input device 300 in communication system 10.

[0125] Figures 2A-2E exemplarily illustrate application scenario 1 provided by the embodiments of this application.

[0126] As shown in Figure 2A, the input device 300 is focused on the electronic device 100, and the user's head is facing the electronic device 100. When the input device 300 is focused on the electronic device 100, the electronic device 100 can respond to user input via the input device 300 and perform corresponding actions. For example, when the focus of the input device 300 is on the "Recycle Bin" option, the electronic device 100 can respond to the user clicking the left button on the input device 300, launch the Recycle Bin application, and display the user interface provided by the Recycle Bin application.

[0127] As shown in Figure 2B, when electronic device 100 detects that the user's head has switched from facing electronic device 100 to facing electronic device 200, electronic device 100 still displays the focus of input device 300, while electronic device 200 displays a prompt message. This prompt message is used to remind the user that the focus of input device 300 can be switched at this time. For example, the prompt message can be presented in the form of text and / or icons. For instance, the prompt message includes the text "Move the mouse to switch the cursor to this screen" and the smiley face icon shown in Figure 2B. In this embodiment of the application, the specific content of the above-mentioned prompt message is only illustrative and is not intended to limit the scope.

[0128] As shown in Figure 2C, electronic device 100 receives an operation to trigger a focus switch via input device 300, stops displaying the focus of input device 300, and electronic device 200 displays the focus of input device 300. That is, the focus of input device 300 is switched from electronic device 100 to electronic device 200. The operation to trigger the focus switch can be set by default by each electronic device in communication system 10, or it can be set by the user; there is no limitation on this. For example, the operation to trigger the focus switch includes moving input device 300. When the focus of input device 300 is displayed in electronic device 200, electronic device 100 can respond to user operations input through input device 300 and perform corresponding actions. For example, when the focus of input device 300 is in the video playback interface, electronic device 100 can respond to the user clicking the left button on input device 300 to pause or play the video currently playing in the video playback interface.

[0129] As shown in Figure 2D, when electronic device 200 detects that the user's head has switched from facing electronic device 200 to facing electronic device 100, electronic device 200 still displays the focus of input device 300, while electronic device 100 displays a prompt message. This prompt message is used to remind the user that the focus of input device 300 can be switched at this time. For example, the prompt message can be presented in the form of text and / or icons. For instance, the prompt message includes the text "Move the mouse to switch the cursor to this screen" and the smiley face icon shown in Figure 2D. In this embodiment, the specific content of the prompt message is only illustrative and is not intended to limit the scope of the application.

[0130] As shown in Figure 2E, electronic device 200 receives an operation from input device 300 to trigger a focus switch, stops displaying the focus of input device 300, and electronic device 100 displays the focus of input device 300. That is, the focus of input device 300 is switched from electronic device 200 to electronic device 100. For example, the operation to trigger the focus switch includes moving input device 300.

[0131] In this way, in the communication system 10, the focus of the input device 300 can be switched between the electronic device 100 and the electronic device 200.

[0132] Application Scenario 2: Implement focus switching of input device 400 in communication system 20.

[0133] Figures 3A-3E exemplarily illustrate application scenario 2 provided by the embodiments of this application.

[0134] As shown in Figure 3A, the input device 400 is focused on the electronic device 100, and the user's head is facing the electronic device 100. When the input device 400 is focused on the electronic device 100, the electronic device 100 can respond to user input via the input device 400 and perform corresponding actions. For example, when the input device 400 is focused on the "Recycle Bin" option, the electronic device 100 can respond to the user pressing the Enter key on the input device 400, launching the Recycle Bin application and displaying its user interface. As another example, the electronic device 100 can respond to the user clicking a button on the input device 400 to display text content.

[0135] As shown in Figure 3B, when electronic device 100 detects that the user's head has switched from facing electronic device 100 to facing electronic device 200, electronic device 100 still displays the focus of input device 400, while electronic device 200 displays a prompt message. This prompt message is used to remind the user that the focus of input device 400 can be switched at this time. For example, the prompt message can be presented in the form of text and / or icons. For instance, the prompt message includes the text "Press the Ctrl key to switch the cursor to this screen" and the smiley face icon shown in Figure 3B. In this embodiment, the specific content of the prompt message is only illustrative and is not intended to limit its scope.

[0136] As shown in Figure 3C, electronic device 100 receives an operation to trigger a focus switch via input device 400, stops displaying the focus of input device 400, and electronic device 200 displays the focus of input device 400. That is, the focus of input device 400 is switched from electronic device 100 to electronic device 200. The operation to trigger the focus switch can be set by default by each electronic device in communication system 20, or it can be set by the user; there is no limitation on this. For example, the operation to trigger the focus switch includes pressing the Ctrl key on input device 400. When the focus of input device 400 is displayed on electronic device 200, electronic device 100 can respond to user operations input through input device 400 and perform corresponding actions. For example, when the focus of input device 400 is in the video playback interface, electronic device 100 can respond to the user pressing the space bar on input device 300 to pause or play the video currently playing in the video playback interface.

[0137] As shown in Figure 3D, when electronic device 200 detects that the user's head has switched from facing electronic device 200 to facing electronic device 100, electronic device 200 still displays the focus of input device 400, while electronic device 100 displays a prompt message. This prompt message is used to remind the user that the focus of input device 400 can be switched at this time. For example, the prompt message can be presented in the form of text and / or icons. For instance, the prompt message includes the text "Press the Ctrl key to switch the cursor to this screen" and a smiley face icon as shown in Figure 3D. In this embodiment, the specific content of the prompt message is only illustrative and is not intended to limit its scope.

[0138] As shown in Figure 3E, electronic device 200 receives an operation from input device 400 to trigger a focus switch, stops displaying the focus of input device 400, and electronic device 100 displays the focus of input device 400. That is, the focus of input device 400 switches from electronic device 200 to electronic device 100. For example, the operation to trigger the focus switch includes pressing the Ctrl key on input device 400.

[0139] In this way, in the communication system 20, the focus of the input device 400 can be switched between the electronic device 100 and the electronic device 200.

[0140] Application Scenario 3: Implement the switching of focus between input device 300 and input device 400 in communication system 30.

[0141] Figures 4A-4E exemplarily illustrate application scenario 3 provided by the embodiments of this application.

[0142] As shown in Figure 4A, electronic device 100 displays the focus of input device 300 and input device 400, at which time the user's head is facing electronic device 100. As shown in Figure 4B, electronic device 100 detects that the user's head has switched from facing electronic device 100 to facing electronic device 200. At this time, electronic device 100 still displays the focus of input device 300 and input device 400, while electronic device 200 displays a prompt message. As shown in Figure 4C, electronic device 100 receives an operation from input device 400 to trigger a focus switching, stops displaying the focus of input device 300 and input device 400, and electronic device 200 displays the focus of input device 300 and input device 400. That is, the focus of input device 300 and input device 400 is switched from electronic device 100 to electronic device 200. As shown in Figure 4D, electronic device 200 detects that the user's head has switched from facing electronic device 200 to facing electronic device 100. At this time, electronic device 200 still displays the focus of input device 300 and input device 400, while electronic device 100 displays a prompt message. This prompt message indicates to the user that the focus of input device 300 and input device 400 can be switched at this time. As shown in Figure 4E, electronic device 200 receives an operation to trigger the focus switching through input device 300 or input device 400, stops displaying the focus of input device 300 and input device 400, and electronic device 100 displays the focus of input device 300 and input device 400. That is, the focus of input device 300 and input device 400 is switched from electronic device 200 to electronic device 100. For example, the operation to trigger the focus switching includes pressing the Ctrl key on input device 400.

[0143] For details on application scenario 3, please refer to the above descriptions of application scenario 1 and application scenario 2, which will not be repeated here.

[0144] In one possible implementation, the focus of input device 300 and input device 400 shown in Figures 4A-4E is not limited to being the same focus on the electronic device; they can also be two different focuses. For example, in a text input scenario, the focus of input device 400 displays the position of the text to be entered, while the focus of input device 300 displays in another area. In application scenario 3, regardless of whether the focus of input device 300 and input device 400 is the same focus, cross-device focus switching can be achieved.

[0145] In this way, in the communication system 30, the focus of the input device 300 and the focus of the input device 400 can be switched between the electronic device 100 and the electronic device 200.

[0146] Application Scenario 4: Implement focus switching of input device 300 in communication system 40.

[0147] Figures 5A-5E exemplarily illustrate application scenario 4 provided by the embodiments of this application.

[0148] As shown in Figure 5A, the input device 300 is focused on the electronic device 100, and the user's head is facing the electronic device 100. When the input device 300 is focused on the electronic device 100, the electronic device 100 can respond to user input via the input device 300 and perform corresponding actions. For example, when the focus of the input device 300 is on the "Recycle Bin" option, the electronic device 100 can respond to the user clicking the left button on the input device 300, launch the Recycle Bin application, and display the user interface provided by the Recycle Bin application.

[0149] As shown in Figure 5B, when electronic device 100 detects that the user's head has switched from facing electronic device 100 to facing electronic device 200, electronic device 100 still displays the focus of input device 300, while electronic device 200 displays a prompt message. This prompt message is used to inform the user that the focus of input device 300 can be switched at this time. For example, the prompt message can be presented in the form of text and / or icons. For instance, the prompt message includes the text "Move the mouse to switch the cursor to this screen" and the smiley face icon shown in Figure 5B. In this embodiment, the specific content of the prompt message is only illustrative and is not intended to limit its scope.

[0150] As shown in Figure 5C, electronic device 100 receives an operation to trigger a focus switch via input device 300, stops displaying the focus of input device 300, and electronic device 200 displays the focus of input device 300. That is, the focus of input device 300 is switched from electronic device 100 to electronic device 200. The operation to trigger the focus switch can be set by default by each electronic device in communication system 10, or it can be set by the user; there is no limitation on this. For example, the operation to trigger the focus switch includes moving input device 300. When the focus of input device 300 is displayed in electronic device 200, electronic device 100 can respond to user operations input through input device 300 and perform corresponding actions. For example, when the focus of input device 300 is in the video playback interface, electronic device 100 can respond to the user clicking the left button on input device 300 to pause or play the video currently playing in the video playback interface.

[0151] As shown in Figure 5D, when electronic device 200 detects that the user's head has switched from facing electronic device 200 to facing electronic device 500, electronic device 200 still displays the focus of input device 300, while electronic device 500 displays a prompt message. This prompt message is used to inform the user that the focus of input device 300 can be switched at this time. For example, the prompt message can be presented in the form of text and / or icons. For instance, the prompt message includes the text "Move the mouse to switch the cursor to this screen" and the smiley face icon shown in Figure 5D. In this embodiment, the specific content of the prompt message is only illustrative and is not intended to limit its scope.

[0152] As shown in Figure 5E, electronic device 200 receives an operation from input device 300 to trigger a focus switch, stopping the display of the focus on input device 300, and electronic device 500 displays the focus on input device 300. That is, the focus of input device 300 is switched from electronic device 200 to electronic device 500. For example, the operation to trigger the focus switch may include moving input device 300.

[0153] In this way, in the communication system 40, the focus of the input device 300 can be switched between electronic devices 100, 200 and 500.

[0154] Similarly, the focus switching of input device 400 in communication system 50 can be referred to the relevant description in application scenario 4 above, and will not be repeated here. In communication system 50, the focus of input device 400 can be switched between electronic device 100, electronic device 200 and electronic device 500.

[0155] Application Scenario 5: Implement the switching of focus of input device 300 and input device 300 focus in communication system 60.

[0156] Figures 6A-6E exemplarily illustrate application scenario 5 provided by the embodiments of this application.

[0157] As shown in Figure 6A, electronic device 100 displays the focus of input device 300 and input device 400, at which time the user's head is facing electronic device 100. As shown in Figure 6B, electronic device 100 detects that the user's head has switched from facing electronic device 100 to facing electronic device 200. At this time, electronic device 100 still displays the focus of input device 300 and input device 400, while electronic device 200 displays a prompt message. As shown in Figure 6C, electronic device 100 receives an operation from input device 400 to trigger a focus switching, stops displaying the focus of input device 300 and input device 400, and electronic device 200 displays the focus of input device 300 and input device 400. That is, the focus of input device 300 and input device 400 is switched from electronic device 100 to electronic device 200. As shown in Figure 6D, electronic device 200 detects that the user's head has switched from facing electronic device 200 to facing electronic device 500. At this time, electronic device 200 still displays the focus of input device 300 and input device 400, while electronic device 500 displays a prompt message. This prompt message is used to inform the user that the focus of input device 300 and input device 400 can be switched at this time. As shown in Figure 6E, electronic device 200 receives an operation to trigger the focus switching through input device 300 or input device 400, stops displaying the focus of input device 300 and input device 400, and electronic device 500 displays the focus of input device 300 and input device 400. That is, the focus of input device 300 and input device 400 is switched from electronic device 200 to electronic device 500. For example, the operation to trigger the focus switching includes pressing the Ctrl key on input device 400.

[0158] For details on application scenario 5, please refer to the above description of application scenario 3, which will not be repeated here.

[0159] In one possible implementation, the focus of input device 300 and input device 400 shown in Figures 6A-6E is not limited to being the same focus on the electronic device; they can also be two different focuses. For example, in a text input scenario, the focus of input device 400 displays the position of the text to be entered, while the focus of input device 300 displays in another area. In application scenario 3, regardless of whether the focus of input device 300 and input device 400 is the same focus, cross-device focus switching can be achieved.

[0160] In this way, in the communication system 60, the focus of the input device 300 and the focus of the input device 400 can be switched between electronic devices 100, 200 and 500.

[0161] In one possible implementation, it is not limited to switching the focus of multiple input devices displayed on an electronic device to another electronic device together, but it is also possible to switch the focus of some input devices to another electronic device.

[0162] Application Scenario 6: Another way to switch the focus of input device 300 and input device 400 in communication system 30.

[0163] Figures 7A-7E exemplarily illustrate application scenario 6 provided by the embodiments of this application.

[0164] As shown in Figure 7A, electronic device 100 displays the focus of input device 300 and input device 400, at which time the user's head is facing electronic device 100. As shown in Figure 7B, electronic device 100 detects that the user's head has switched from facing electronic device 100 to facing electronic device 200. At this time, electronic device 100 still displays the focus of input device 300 and input device 400, while electronic device 200 displays a prompt message. This prompt message is used to prompt the user to switch the focus of input device 300 and / or input device 400 to electronic device 200. For example, the prompt message includes the text "Press '1' to switch the keyboard to this screen, press '2' to switch the mouse to this screen, and press '3' to switch both the keyboard and mouse to this screen simultaneously." As shown in Figure 7C, electronic device 100 receives an operation from input device 400 to trigger the focus switching, such as pressing key "1", stopping the display of the focus of input device 400 and displaying the focus of input device 300. Electronic device 200 then displays the focus of input device 400. That is, the focus of input device 400 switches from electronic device 100 to electronic device 200, while the focus of input device 300 remains on electronic device 100. As shown in Figure 7D, electronic device 200 detects that the user's head has switched from facing electronic device 200 to facing electronic device 100. At this time, electronic device 200 still displays the focus of input device 400, while electronic device 100 displays the focus of input device 300, and displays a prompt message. This prompt message is used to suggest that the user can choose to switch the focus of input device 300 and / or input device 400 to electronic device 100. As shown in Figure 7E, electronic device 200 receives an operation to trigger the focus switching through input device 300 or input device 400, such as pressing button "3", stopping the display of the focus of input device 400, and electronic device 100 displays the focus of input device 300 and input device 400. That is, the focus of input device 400 switches from electronic device 200 to electronic device 100 again.

[0165] Thus, in the communication system 30, the user can decide how to switch the focus of the input device 300 and the input device 400 between the electronic device 100 and the electronic device 200.

[0166] In the embodiments of this application, the application scenarios mentioned above are not limited to the above-mentioned application scenarios. The method for switching focus across devices mentioned in this application can also be applied to more scenarios, and there are no limitations on this.

[0167] Based on the various application scenarios described above, this application provides a method for switching focus across devices. This method is applied to a communication system comprising a first electronic device, a second electronic device, and a first input device. For example, electronic device 100 may be referred to as the first electronic device, electronic device 200 as the second electronic device, and input device 300 as the first input device.

[0168] Figure 8 illustrates an exemplary method flow for switching focus across devices provided in an embodiment of this application.

[0169] The method includes:

[0170] S801, The first electronic device displays the focus of the first input device.

[0171] In this embodiment of the application, the first electronic device and the second electronic device establish a communication connection, and / or the first electronic device and the second electronic device log in to the same account, and the first input device is connected to the first electronic device.

[0172] The focus of the first input device can be presented in the form of a cursor. For example, the cursor can be, but is not limited to, the following forms: arrow, text pointer, hand cursor, etc. In this embodiment, the form of the cursor is not limited.

[0173] S802, the first electronic device and / or the second electronic device detects that the user's head is facing the second electronic device.

[0174] Before executing S802, the first electronic device and the second electronic device need to activate the keyboard and mouse sharing function and the hand-eye coordination function. Specifically, the first electronic device and the second electronic device can activate the keyboard and mouse sharing function and the hand-eye coordination function through a first control provided by the settings application, a second control provided by the status bar, or a third control provided by the control center. The specific process for activating the keyboard and mouse sharing function and the hand-eye coordination function in the electronic device can be referred to the relevant descriptions of the embodiments corresponding to Figures 10 to 14 below, which will not be elaborated here.

[0175] In some implementations, the first electronic device and / or the second electronic device can determine the user's head orientation. Specifically, this can be achieved using eye recognition technology and / or face detection technology. For example, when the first electronic device and / or the second electronic device are AR glasses, they can determine the user's head orientation using eye recognition technology.

[0176] In some implementations, S802 may specifically include: obtaining the relative positional relationship between the first electronic device and the second electronic device, and determining the direction of the user's head toward the second electronic device based on the relative position, the user's head posture in the image acquired by the first electronic device, and the user's head posture in the image acquired by the second electronic device.

[0177] In one possible implementation, S802 may specifically include: obtaining a first included angle and a second included angle, wherein the first included angle is the angle between the first electronic device and the user's head, and the second included angle is the angle between the second electronic device and the user's head. If the first included angle is greater than the second included angle, it is determined that the user's head is facing the second electronic device.

[0178] Taking the execution of S802 by the first electronic device as an example, S802 may specifically include: determining a first angle between the first electronic device and the user's head, and obtaining a second angle from the second electronic device; wherein, the second angle is the angle between the second electronic device and the user's head; if the first angle is greater than the second angle, the first electronic device detects that the user's head is facing the second electronic device.

[0179] For example, a first electronic device is equipped with a camera, and a second electronic device is equipped with a camera. When a user uses both the first and second electronic devices simultaneously, the first electronic device can capture an image containing the user's head through its camera, and the second electronic device can also capture a headshot containing the user's head through its camera.

[0180] When the user's head turns from the first electronic device to the second electronic device, the camera of the first electronic device can capture an image including the user's head. Based on the captured image, the first electronic device can calculate the angle between the straight line between its camera and the user's head and the direction the user's head is facing (referred to as the first angle). The camera of the second electronic device can also capture an image including the user's head. Based on the captured image, the second electronic device can calculate the angle between the straight line between its camera and the user's head and the direction the user's head is facing (referred to as the second angle). For example, the straight line between the camera of the first electronic device and the user's head could refer to the straight line between the camera of the first electronic device and the user's brow. The straight line between the camera of the second electronic device and the user's head could refer to the straight line between the camera of the second electronic device and the user's brow. Not limited to the user's brow, in this embodiment, it could also refer to the straight line between the camera and the midpoint of the user's forehead, the inner corner of the eyebrow, the arch of the eyebrow, the outer corner of the eyebrow, the center of the pupil of the eye, the tip of the nose, the two sides of the nostrils, the midpoint of the upper lip, the midpoint of the lower lip, the chin, cheekbone, etc., without limitation. The aforementioned user head orientation describes the user's facing direction in a three-dimensional environment, and may refer to the user's line of sight. However, it is not limited to the user's line of sight; in this embodiment, the user's head orientation may also be represented by other data, and there is no limitation on this.

[0181] After obtaining the first and second included angles, the first electronic device and / or the second electronic device can determine the user's head orientation by comparing the first and second included angles. Taking the first electronic device as an example, the second electronic device can send the calculated second included angle to the first electronic device. Then, the first electronic device can determine the user's head orientation by comparing the sizes of the first and second included angles.

[0182] If the first angle is greater than the second angle, it indicates that the angle between the user's head and the first electronic device is relatively large, while the angle between the user's head and the second electronic device is relatively small. This can also be interpreted as the user's head being turned towards the second electronic device, and the user's attention shifting to the second electronic device. Therefore, it is worth considering switching the focus of the first input device from the first electronic device to the second electronic device.

[0183] In some implementations, detecting the user's head orientation can be performed by a first electronic device, a second electronic device, or both. In one possible implementation, S802 can also be performed by a server and then sent to the first and / or second electronic devices.

[0184] In one possible implementation, other electronic devices in the communication system can also determine the user's head orientation and identify the direction the user's head is facing towards the second electronic device.

[0185] After executing S802 and before executing S803, the second electronic device may further display a first prompt message. The first prompt message may be used to prompt the user to switch the focus of the first input device, or to prompt the user to switch the focus of the first input device to the second electronic device, or to prompt the user to input the first operation to switch the focus of the first input device to the second electronic device. In this embodiment, the aforementioned first prompt message may also include more prompting functions, which are not limited thereto.

[0186] In one possible implementation, the first electronic device may also display the first prompt message.

[0187] Understandably, in S802, if the first electronic device detects that the user's head is facing the second electronic device, the first electronic device can send information to the second electronic device, instructing the second electronic device to display a first prompt message. If the second electronic device detects that the user's head is facing the second electronic device, the second electronic device can display the first prompt message based on the user's head orientation.

[0188] The aforementioned first prompt information includes text content and / or an icon. For example, the icon can be a smiley face icon or other icons; this embodiment of the application is not limited to any particular icon. The text content may include "Press the Ctrl key to switch the cursor to this screen," and the text content may include more or less information; this embodiment of the application is not limited to any particular text content.

[0189] The initial prompts help users quickly understand how to switch input device focus between different electronic devices, improving operational accuracy and enabling them to become more proficient in using keyboard and mouse sharing and hand-eye coordination features.

[0190] S803, In response to the first operation received on the first input device, the first electronic device stops displaying the focus of the first input device and sends a first message to the second electronic device.

[0191] The first message is used to instruct the switching of focus from the first input device to the second electronic device. Optionally, the first message may also include the position coordinates of the first focus point within the first electronic device.

[0192] In some implementations, when the first input device is a keyboard, the first operation includes acting on a first key. When the first input device is a mouse, the first operation includes moving the mouse.

[0193] For example, when the first input device is a mouse or a keyboard, the first operation can be a different operation.

[0194] Table 1

[0195] Table 1 illustrates specific examples of the first operation. For example, when the first input device is a keyboard, the first operation can be an operation performed on the Ctrl key. When the first input device is a keyboard, the first operation can also be an operation performed on the Alt, Tap, Enter, or scape keys. When the first input device is a mouse, the first operation can be shaking the mouse three times within 2 seconds. When the first input device is a mouse, the first operation can be moving the mouse 40 VP towards the second electronic device.

[0196] In the embodiments of this application, the specific examples of the first operation shown in Table 1 above are only illustrative examples. The operation that triggers the focus switching of the input device may include more or fewer operations, and there is no limitation on this.

[0197] S804, In response to the first message, the second electronic device displays the focus of the first input device.

[0198] In some implementations, the second electronic device can respond to a user operation received from the first input device and perform an action corresponding to that user operation. That is, after executing S804, the second electronic device gains control of the first input device, and the user can use the functions provided by the second electronic device through the first input device.

[0199] In some implementations, the second electronic device can display the focus of the first input device at a first position on the display screen. This first position can be the center of the display screen, or the position where the focus was most recently displayed on the second electronic device's display screen, or the position corresponding to the focus of the first input device on the first electronic device's display screen, or the position of the first interface element displayed on the second electronic device, or any input box displayed on the second electronic device's display screen. Here, the first interface element refers to a visible interface element. For example, the position of the first interface element can refer to the first interface element in the current interface based on the user's reading habits. For instance, if the user's reading habits are from top to bottom and from left to right, then the first interface element can refer to the topmost and leftmost interface element displayed on the second electronic device's display screen. In this embodiment, the first interface element is only illustrative and not intended to be limiting. Furthermore, for example, when an input box is displayed on the second electronic device's display screen, such as when the second electronic device is in a document editing or web search scenario, the first position can also be the position of that input box.

[0200] In the embodiments of this application, the first position described above is only for illustrative purposes and is not intended to limit the first position.

[0201] In this way, by capturing user behavior to determine the electronic device that the user intends to use next, and then switching the focus of the input device to the electronic device that the user intends to use, it helps to improve the user experience when the user switches the focus of the input device.

[0202] Furthermore, after anticipating the user's intended electronic device, the system further determines this desired device based on the user's actions. This avoids situations where the user merely turns their head to view the displayed content on an electronic device without intending to use it further, thus better aligning with user needs.

[0203] In one possible implementation, a single electronic device may also display the focus of multiple input devices. In S801, the first electronic device may also display the focus of a second input device. For example, the second input device may refer to input device 300. In S804, the second electronic device may also display the focus of the second input device. That is, the focus of the first input device and the focus of the second input device can be switched to the second electronic device simultaneously. Furthermore, in this embodiment, there is no limitation on whether the focus of the first input device and the focus of the second input device are presented as the same focus.

[0204] In one possible implementation, after executing S804, the first electronic device and / or the second electronic device detects that the user's head is facing the first electronic device. In response to receiving a first operation on the first input device, the second electronic device stops displaying the focus of the first input device and sends a second message to the first electronic device. In response to the second message, the first electronic device displays the focus of the first input device. That is, the focus of the first input device can switch not only from the first electronic device to the second electronic device, but also from the second electronic device back to the first electronic device.

[0205] In one possible implementation, after executing S804, the first electronic device and / or the second electronic device detects that the user's head is facing the third electronic device. For example, the third electronic device may refer to electronic device 500. In response to receiving a first operation on the first input device, the second electronic device stops displaying the focus of the first input device and sends a third message to the third electronic device. In response to the third message, the third electronic device displays the focus of the first input device. That is, the focus of the first input device can switch not only from the first electronic device to the second electronic device, but also from the second electronic device to the third electronic device.

[0206] The following describes a method for switching focus across devices provided by an embodiment of this application.

[0207] Figure 9 illustrates an exemplary method flow for switching focus across devices provided in an embodiment of this application.

[0208] S901, enable keyboard and mouse sharing function and hand-eye coordination function.

[0209] Specifically, the first and second electronic devices enable keyboard and mouse sharing and hand-eye coordination.

[0210] In this embodiment, the first electronic device can be any electronic device with keyboard and mouse sharing functionality and hand-eye coordination functionality. Furthermore, when the first electronic device and other devices implement the method of this embodiment, the first electronic device can act as the master device. The master device can be understood as the initiator of the keyboard and mouse sharing functionality, and one or more devices capable of keyboard and mouse sharing can be selected within the master device. The master device can also receive and process data from other keyboard and mouse sharing devices. For example, the first electronic device may include the electronic device 100 in the above embodiments.

[0211] The second electronic device can be any electronic device with keyboard and mouse sharing functionality and hand-eye coordination functionality. Furthermore, when the second electronic device and other devices implement the methods of the embodiments of this application, the second electronic device can act as a slave device (or auxiliary device). For example, the second electronic device may include the electronic device 200 in the above embodiments.

[0212] It is understood that, since one or more keyboard and mouse sharing devices are selected on electronic device 100, electronic device 100 can act as the master device, and other keyboard and mouse sharing devices can act as slave devices or auxiliary devices respectively. Electronic device 100 determines the user's head orientation by judging the included angles reported by multiple slave devices. The optional master device can also be any of the multiple electronic devices in the various communication systems mentioned in this application, that is, any electronic device among the multiple keyboard and mouse sharing devices. This application embodiment does not limit this.

[0213] Input devices may include devices such as keyboards, mice, or touchscreens that can be shared among multiple electronic devices.

[0214] S902, A communication connection is established between electronic devices in a communication system, wherein the first electronic device displays the focus of the first input device.

[0215] S903: Acquire images containing the user's head posture.

[0216] For example, the first electronic device and / or the second electronic device acquire, in real time, the head pose angle in the image calculated by their respective detection algorithms (e.g., the Swing algorithm).

[0217] S904. Determine that the user's head is facing the second electronic device.

[0218] The first and / or second electronic devices determine the user's head orientation based on real-time acquired head posture angles using their respective multimodal sensor data platforms (MSDPs). Then, they determine that the user's head is facing the second electronic device. Specifically, the first and / or second electronic devices acquire a first angle and a second angle, where the first angle is the angle between the first electronic device and the user's head, and the second angle is the angle between the second electronic device and the user's head. If the first angle is greater than the second angle, the first and / or second electronic devices determine that the user's head is facing the second electronic device.

[0219] S905, The first prompt message is displayed in the second electronic device.

[0220] For information about S905, please refer to the description of the first prompt information in Figure 8 above; no further limitations will be made.

[0221] S906, Receive the first operation, which is used to trigger the focus switch.

[0222] For information about S905, please refer to the description of the first prompt information in Figure 8 above; no further limitations will be made.

[0223] S907, the first electronic device sends a first message to the second electronic device, and the second electronic device displays the focus of the first input device.

[0224] Specifically, the first electronic device and the second electronic device can call their respective focus switching management modules to implement S907.

[0225] The following description, in conjunction with Figures 10 to 13, explains how to enable the keyboard and mouse sharing function and the hand-eye coordination function in electronic devices 100 and 500, respectively. Figures 10 to 12 show the method for enabling these functions in electronic device 100, and Figure 13 shows the method for enabling them in electronic device 500. It is understood that enabling these functions on other electronic devices is similar to that in electronic devices 100 and 500, and will not be repeated here.

[0226] For example, as shown in Figure 10, this is a schematic diagram of the interface of the settings application window 701 in the interface of the electronic device 100. The window 701 may include a first display area 702 and a second display area 703. The first display area 702 is used to display the icon of the settings application, the settings title, the search box, account information, and multiple settings items, etc. The second display area 703 is used to display the detailed interface of a certain settings item.

[0227] In the first display area 702, a search box can be used to quickly search for content that the user wants to find. The search box may include a search icon and search suggestions, whereby the search suggestions are used to prompt the user to quickly find the content they want by entering keywords. In response to the user triggering the search icon, the electronic device 100 can search for relevant content based on the keywords in the search box.

[0228] Account information may include the user's profile picture, username, and account identifier (ID).

[0229] Multiple settings can include, for example, WLAM, Bluetooth, network, multi-device collaboration, desktop and personalization, display and brightness, sound, notifications and status bar, system settings, etc. Each setting can include a setting icon and a setting name. For example, taking multi-device collaboration setting 704 as an example, multi-device collaboration setting 704 can include a multi-device collaboration icon 7041 and a multi-device collaboration name 7042.

[0230] In response to a user triggering the multi-device collaboration settings 704, the electronic device 100 can display the keyboard and mouse sharing interface 705 in the second display area 703. This triggering operation can include triggering any location within the multi-device collaboration settings 704.

[0231] Optionally, in response to a user triggering an action on multi-device collaboration setting 704, multi-device collaboration setting 704 may be displayed differently from other settings. For example, the background (such as color) of multi-device collaboration setting 704 may be different from other settings, or the multi-device collaboration icon 7041 and / or the multi-device collaboration name 7042 may be highlighted.

[0232] It is understood that, in the embodiments of this application, the highlighting display may include, but is not limited to, one or more of the following display methods: changing the color of the font and / or icon, changing the size of the font and / or icon, changing the grayscale of the font and / or icon, and making the font bold.

[0233] In the second display area 703, the keyboard and mouse sharing interface 705 may include a return control, a keyboard and mouse sharing title, a full-screen control, a minimize control, a close control, a keyboard and mouse sharing icon, a keyboard and mouse sharing prompt, a keyboard and mouse sharing option 706, a prompt message corresponding to option 706, a keyboard and mouse sharing device option 707, an option to allow the keyboard and mouse to move to the screen of a nearby device to connect to the device 708, a prompt message corresponding to option 708, a hand-eye coordination option 709, and a prompt message corresponding to option 709, etc.

[0234] The back control is used to exit the current keyboard and mouse sharing interface or return to the previous interface. The maximize control is used to display the settings application window 701 in full screen. The minimize control is used to hide or minimize the display window 701, such as by shrinking the window 701 to the taskbar of the electronic device 100 so that the window 701 does not occupy the screen space of the electronic device 100. The close control is used to close the window 701.

[0235] Keyboard and mouse sharing prompts may include, for example, "Move your mouse to the edge of the screen on your computer, and then continue moving it to the screen of another nearby device to experience cross-device keyboard and mouse sharing and file dragging and dropping. Learn more." Keyboard and mouse sharing prompts may also include more or less information, which is not limited in this embodiment. The "Learn more" prompt may be displayed as a hyperlink. In response to a user triggering the "Learn more" action, the electronic device 100 can open and display the details within the hyperlink corresponding to "Learn more." Optionally, "Learn more" may be highlighted, allowing users to quickly locate the hyperlink and easily view its details, thereby improving the user experience.

[0236] The keyboard and mouse sharing option 706 may include an option name (e.g., "Keyboard and Mouse Sharing") and a switch control 7061 for the keyboard and mouse sharing function. The switch control 7061 can be used to turn the keyboard and mouse sharing function on (or enable / disable). For example, when the switch control 7061 is in the off state, the keyboard and mouse sharing function is disabled. In response to a user triggering the switch control 7061, the switch control 7061 may be displayed in the on state (as shown in Figure 10), and the electronic device 100 may enable the keyboard and mouse sharing function. When the switch control 7061 is in the on state, the keyboard and mouse sharing function is enabled. In response to a user triggering the switch control 7061, the switch control 7061 may be displayed in the off state, and the electronic device 100 may disable the keyboard and mouse sharing function.

[0237] The prompt message corresponding to option 706 may include, for example, "This service requires the use of Bluetooth or WLAN for sharing mouse and keyboard operations between devices. By turning on the switch, you agree to the above." The prompt message corresponding to option 706 may also include more or less information, which is not limited in this embodiment.

[0238] The device option 707 for keyboard and mouse sharing may include the option name of option 707 (e.g., "devices for keyboard and mouse sharing"), a prompt message 7071, and a drop-down control 7072.

[0239] The prompt message 7071 is used to indicate the connection status of the device currently sharing a keyboard and mouse with the electronic device 100. For example, if the electronic device 100 is not currently connected to any keyboard and mouse sharing device, the prompt message 7071 can display "No device connected". If the electronic device 100 is currently connected to a keyboard and mouse sharing device, the prompt message 7071 can be used to display relevant information about the keyboard and mouse sharing device. It is understood that the device's relevant information can be used to uniquely identify the device, making it easier for users to distinguish the connected device. For example, the device's relevant information may include, but is not limited to, one or more of the following: device model, device icon, device name, device ID, and the username of the user logging into the device. The specific content displayed in the prompt message 7071 is not limited in this embodiment, as long as the content displayed in the prompt message 7071 corresponds to the information of the keyboard and mouse sharing device connected to the electronic device 100.

[0240] The drop-down control 7072 can be used to display a list of devices that can be shared with the electronic device 100 via keyboard and mouse.

[0241] Option 708, which allows the keyboard and mouse to move within the screen of a nearby device to connect, may include an option name (e.g., "Allow the keyboard and mouse to move within the screen of a nearby device to connect") and a switch control 7081. The switch control 7081 can be used to turn the function of allowing the keyboard and mouse to move within the screen of a nearby device to connect on or off. For example, when the switch control 7081 is in the off state, the electronic device 100 does not allow the keyboard and mouse to move within the screen of a nearby device to connect. In response to a user triggering an operation on the switch control 7081, the switch control 7081 may be displayed in the on state (as shown in Figure 10), and the electronic device 100 allows the keyboard and mouse to move within the screen of a nearby device to connect. When the switch control 7081 is in the on state, the electronic device 100 allows the keyboard and mouse to move within the screen of a nearby device to connect. In response to a user triggering an operation on the switch control 7081, the switch control 7081 may be displayed in the off state, and the electronic device 100 does not allow the keyboard and mouse to move within the screen of a nearby device to connect.

[0242] The prompt message corresponding to option 708 may include, for example, "When the mouse moves to the edge of the screen, it can continuously move to the screen of another nearby device logged in with the same account to connect to the device." The prompt message corresponding to option 708 may also include more or less information, which is not limited in this embodiment.

[0243] The hand-eye coordination option 709 may include an option name (e.g., "Hand-eye Coordination") and a switch control 7091 for the hand-eye coordination function. The switch control 7091 can be used to turn the hand-eye coordination function on or off. For example, when the switch control 7091 is in the off state, the hand-eye coordination function is disabled. In response to a user triggering the switch control 7091, the switch control 7091 may be displayed in the on state (as shown in Figure 10), and the electronic device 100 may enable the hand-eye coordination function. When the switch control 7091 is in the on state, the hand-eye coordination function is enabled. In response to a user triggering the switch control 7091, the switch control 7091 may be displayed in the off state, and the electronic device 100 may disable the hand-eye coordination function.

[0244] The prompt message corresponding to option 709 may include, for example, "When sharing keyboard and mouse, you can switch the cursor to the screen you are looking at by looking at the screen and using the Ctrl key. This function needs to be enabled on both devices. How to use it?". The prompt message corresponding to option 709 may also include more or less information, which is not limited in this embodiment. The "How to use it?" in the prompt message corresponding to option 709 may be displayed as a hyperlink. In response to the user triggering the "How to use it?" operation, the electronic device 100 may open and display the details in the hyperlink corresponding to "How to use it?". Optionally, "How to use it?" may be highlighted, so that the user can quickly find the location of the hyperlink and easily view the details in the hyperlink, thereby improving the user experience.

[0245] In response to a user triggering the operation of the drop-down control 7072 in the device option 707 for keyboard and mouse sharing, the electronic device 100 can display a device list, which can be used to display options for one or more devices that can be shared with the electronic device 100 for keyboard and mouse.

[0246] It is understood that, since one or more keyboard and mouse sharing devices are selected on electronic device 100, electronic device 100 can act as the master device, and other keyboard and mouse sharing devices can act as slave or secondary devices respectively. Electronic device 100 determines the user's face orientation by judging the included angles reported by multiple slave devices. Optionally, the master device can also be any electronic device among multiple keyboard and mouse sharing devices; this embodiment of the application does not limit this. For ease of description, electronic device 100 will be used as the master device in the following description.

[0247] For example, as shown in Figure 11a, the electronic device 100 can display a device list 803 near the drop-down control 802 in the keyboard and mouse sharing interface 801. Optionally, the device list 803 can be displayed in any possible location in the keyboard and mouse sharing interface 801, which is not limited in this embodiment. Taking a tablet and an electronic device 500 as devices that can share a keyboard and mouse with the electronic device 100, the device list 803 can display a tablet option 8031 ​​and an electronic device 500 option 8032. The tablet option 8031 ​​can include an icon and an account name corresponding to the tablet, for example, the account name of the tablet is "My Tablet". The electronic device 500 option 8032 can include an icon and an account name corresponding to the electronic device 500. For example, the account name of the electronic device 500 is "My Electronic Device 500".

[0248] Users can select one or more devices from device list 803 that they wish to share keyboard and mouse with electronic device 100. For example, in response to a user triggering operation of tablet option 8031, as shown in Figure 11b, check icon 8033 can be displayed in tablet option 8031. Then electronic device 100 and tablet can establish a communication connection for keyboard and mouse sharing.

[0249] Optionally, in response to a user triggering an action on tablet option 8031, tablet option 8031 ​​can be displayed differently from other device options. For example, the background (such as color) of tablet option 8031 ​​can be different from other settings, or the icons and / or text in tablet option 8031 ​​can be highlighted.

[0250] Similarly, in response to a user triggering an operation on option 8032 of electronic device 500, as shown in Figure 11b, a checkmark icon 8034 can be displayed in option 8032 of electronic device 500. Then, electronic device 100 and electronic device 500 can establish a communication connection for keyboard and mouse sharing.

[0251] After the user selects one or more devices to share the keyboard and mouse with electronic device 100, in response to the user's operation in an area outside the device list 803 of the keyboard and mouse sharing interface 801, electronic device 100 can close (or, in other words, not display) the device list 803 and display the keyboard and mouse sharing interface 901 as shown in Figure 12a. Alternatively, if all device options in device list 803 are selected, electronic device 100 can close device list 803 and display the keyboard and mouse sharing interface 901 as shown in Figure 12a.

[0252] As shown in Figure 12a, in the keyboard and mouse sharing interface 901, the prompt information 9021 of the keyboard and mouse sharing device option 902 no longer displays the "No device connected" prompt information as shown in Figure 10, but instead displays the relevant information of the connected keyboard and mouse sharing device. The specific device information can be found in the device information involved in the prompt information 7071 in the corresponding embodiment of Figure 10, and will not be repeated here. Taking the account name of the logged-in device as an example, the prompt information 7071 may include "My Tablet" and "My Electronic Device 500". The specific device information displayed in the prompt information 7071 is not limited in this embodiment, as long as it can uniquely identify the device and facilitate user differentiation of the connected device.

[0253] When the electronic device 100 establishes a communication connection with the keyboard and mouse sharing device, the keyboard and mouse sharing interface 901 can also display screen arrangement options 903. Screen arrangement options 903 may include an option name (e.g., "Screen Arrangement") and an editing control 9031. In response to the user triggering the editing control 9031, as shown in Figure 12b, the electronic device 100 can display a screen arrangement pop-up window 904 in the keyboard and mouse sharing interface 901. The screen arrangement pop-up window 904 may include a screen arrangement title, a screen arrangement area 9041, and a completion control 9042.

[0254] Within the screen arrangement area 9041, the user can adjust the relative position and screen arrangement order between the electronic device 100 and other devices sharing a keyboard and mouse. In response to the user triggering the completion control 9042, the electronic device 100 can display the keyboard and mouse sharing interface 901 as shown in Figure 12a, and the electronic device 100 can implement the keyboard and mouse sharing function according to the adjusted screen arrangement order. For example, if the user sets the screen of the electronic device 100 to the left side of the tablet, when the user moves the mouse to the right edge of the screen of the electronic device 100, the mouse cursor will automatically appear on the tablet screen. Thus, based on the screen arrangement order, the user can naturally move the mouse between electronic devices, thereby performing cross-screen operations more smoothly.

[0255] Figure 13 shows how to enable the keyboard and mouse sharing function and the hand-eye coordination function in the electronic device 500.

[0256] As shown in Figure 13a, the interface 1000 for setting up applications in the electronic device 500 can include a search bar, an account area, and multiple settings items.

[0257] The search bar can be used to instruct the electronic device 500 to quickly search for the user's input. The search bar can include a search icon and search suggestions. The search suggestions indicate that the user can quickly find the desired content by entering keywords. In response to the user triggering the search icon, the electronic device 500 can search for relevant content based on the keywords in the search box.

[0258] The account area can display account information, account avatar, cloud storage information, etc. It can also include cloud storage controls and a device finder control. Responding to user actions triggered by the cloud storage controls, users can store and manage their data in the cloud, including pictures, videos, contacts, memos, etc., and maintain data synchronization across multiple electronic devices logged into the user's account. Responding to user actions triggered by the device finder control, users can quickly locate electronic devices.

[0259] Multiple settings can include WLAN, Bluetooth, mobile network, satellite network, multi-device collaboration, desktop and personalization, display and brightness, sound and vibration, notification and status bar, general settings, etc. Each setting can include a setting icon, a setting name, and a control to access the setting details page. For example, taking the multi-device collaboration setting as an example, the multi-device collaboration setting can include a multi-device collaboration icon 1001, a multi-device collaboration name 1002, and a control 1003 to access the multi-device collaboration interface.

[0260] In response to a user's triggering of an operation to enter the multi-device collaboration interface, as shown in Figure 13b, the electronic device 500 can display the multi-device collaboration interface 1004. This triggering operation can include triggering any location within the multi-device collaboration settings, such as triggering the control 1003 to access the multi-device collaboration details page. The multi-device collaboration interface 1004 can include multiple settings, such as sharing, connection, cross-device clipboard, cross-device interoperability, and keyboard / mouse sharing. Each setting can include a setting name and a control to access the setting details page. For example, taking the keyboard / mouse sharing setting as an example, the keyboard / mouse sharing setting can include a keyboard / mouse sharing name 1005 and a control 1006 to access the keyboard / mouse sharing interface.

[0261] In response to a user's triggering of an operation to enter the keyboard and mouse sharing interface, as shown in Figure 13c, the electronic device 500 can display the keyboard and mouse sharing interface 1007. This triggering operation can include triggering any location within the keyboard and mouse sharing settings, such as triggering control 1006. The keyboard and mouse sharing interface 1007 can include a return control, a keyboard and mouse sharing title, a keyboard and mouse sharing icon, a keyboard and mouse sharing prompt, a keyboard and mouse sharing option 1008, and corresponding prompt information for option 1008.

[0262] The return control is used to exit the current keyboard and mouse sharing interface or return to the previous interface.

[0263] Keyboard and mouse sharing prompts may include, for example, "By dragging the mouse to the edge of the screen and across to another device's screen, you can share your keyboard and mouse across devices and drag and drop files." Keyboard and mouse sharing prompts may also include more or less information, which is not limited in this embodiment.

[0264] The keyboard and mouse sharing option 1008 may include an option name (e.g., "Keyboard and Mouse Sharing") and a switch control 1009 for the keyboard and mouse sharing function. The switch control 1009 can be used to turn the keyboard and mouse sharing function on or off. For example, when the switch control 1009 is in the off state (as shown in Figure 13c), the keyboard and mouse sharing function is disabled. In response to a user triggering the switch control 1009, the switch control 1009 may be displayed in the on state (as shown in Figure 13d), and the electronic device 500 may enable the keyboard and mouse sharing function. When the switch control 1009 is in the on state, the keyboard and mouse sharing function is enabled. In response to a user triggering the switch control 1009, the switch control 1009 may be displayed in the off state, and the electronic device 500 may disable the keyboard and mouse sharing function.

[0265] The prompt message corresponding to option 1008 may include, for example, "This service requires the use of Bluetooth or WLAN for sharing mouse and keyboard operations between devices. By turning on the switch, you agree to the above." The prompt message corresponding to option 1008 may also include more or less information, which is not limited in this embodiment.

[0266] In response to a user triggering the operation of the switch control 1009, the electronic device 500 can display the keyboard and mouse sharing interface 1007 as shown in Figure 13d. Compared with the keyboard and mouse sharing interface 1007 shown in Figure 13c, the switch control 1009 in the keyboard and mouse sharing interface 1007 shown in Figure 13d is displayed in an open state, and the keyboard and mouse sharing interface 1007 may also include a hand-eye coordination option 1010.

[0267] The hand-eye coordination option 1010 may include an option name (e.g., "Hand-eye Coordination") and a switch control 1011 for the hand-eye coordination function. The switch control 1011 can be used to turn the hand-eye coordination function on or off. For example, when the switch control 1011 is in the off state, the hand-eye coordination function is disabled. In response to a user triggering the switch control 1011, the switch control 1011 may be displayed in the on state (as shown in d of Figure 13), and the electronic device 500 may enable the hand-eye coordination function. When the switch control 1011 is in the on state, the hand-eye coordination function is enabled. In response to a user triggering the switch control 1011, the switch control 1011 may be displayed in the off state, and the electronic device 500 may disable the hand-eye coordination function.

[0268] The prompt message corresponding to option 1010 may include, for example, "When sharing keyboard and mouse, you can switch the cursor to the screen you are looking at by looking at the screen and using the Ctrl key. This function needs to be enabled on both devices. How to use it?". The prompt message corresponding to option 1010 may also include more or less information, which is not limited in this embodiment. The "How to use it?" in the prompt message corresponding to option 1010 may be displayed as a hyperlink. In response to the user triggering the "How to use it?" operation, the electronic device 500 may open and display the details in the hyperlink corresponding to "How to use it?". Optionally, "How to use it?" may be highlighted, so that the user can quickly find the location of the hyperlink and easily view the details in the hyperlink, thereby improving the user experience.

[0269] Optionally, in Figure 13b, in response to a user triggering an operation to enter the keyboard and mouse sharing interface (e.g., triggering the operation of control 1006), the electronic device 500 may also display the keyboard and mouse sharing interface 1007 shown in Figure 13d, instead of displaying the keyboard and mouse sharing interface 1007 shown in Figure 13c. That is, when displaying the keyboard and mouse sharing interface, the interface can simultaneously include both keyboard and mouse sharing options and hand-eye coordination options, instead of only displaying the hand-eye coordination option when the keyboard and mouse sharing function is enabled.

[0270] For example, Figure 14 illustrates a status bar user interface 2000 provided by a mobile phone. The user interface 2000 includes an option 2001. The electronic device can turn the keyboard and mouse sharing function on or off in response to a click operation on option 2001. Optionally, turning on the keyboard and mouse sharing function via option 2001 can be understood as simultaneously activating both the keyboard and mouse sharing function and the hand-eye coordination function.

[0271] In the embodiments of this application, the various user interfaces described above are merely illustrative examples, and there is no limitation on the various interface elements contained in the user interface. The user interface may also include more or fewer interface elements.

[0272] Figure 15 illustrates a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application.

[0273] The following description uses electronic device 100 as an example to illustrate the embodiment. It should be understood that the electronic device 100 shown in FIG. 15 is merely an example, and the electronic device 100 may have more or fewer components than those shown in FIG. 15, may combine two or more components, or may have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0274] For example, electronic device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. This application embodiment does not impose any special restrictions on the specific type of electronic device 100.

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

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

[0277] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0278] In this embodiment of the application, the processor 110 is used to determine that the user's head is facing the second electronic device, and the processor 110 is also used to determine that the focus of the first input device, which will be displayed in the first electronic device, is switched to the second electronic device.

[0279] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0280] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

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

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

[0284] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

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

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

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

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

[0289] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0290] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-CDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0291] In this embodiment, the mobile communication module 150 and / or the wireless communication module 160 are used to establish communication connections with other electronic devices and input devices in the communication system.

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

[0293] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0294] In this embodiment, the display screen 194 is used to display the focus of the first input device.

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

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

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

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

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

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

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

[0302] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0303] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0304] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals.

[0305] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.

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

[0307] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.

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

[0309] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.

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

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

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

[0313] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature processing strategy.

[0314] The touch sensor 180K is also known as a "touch panel". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also known as a "touch screen".

[0315] The bone conduction sensor 180M can acquire vibration signals.

[0316] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0317] Motor 191 can generate vibration alerts.

[0318] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0319] The SIM card interface 195 is used to connect the SIM card.

[0320] Not limited to electronic device 100, the electronic devices provided in the embodiments of this application can refer to the hardware structure shown in FIG15 above, and there is no limitation thereto.

[0321] Figure 16 is a schematic diagram of the software architecture of an electronic device according to an embodiment of this application.

[0322] For example, the software architecture of an electronic device is illustrated below using the Harmony operating system. It should be noted that the embodiments of this application can also be applied to other operating systems, such as... system, system, Systems, etc., can also achieve the solution of this application as long as the functions implemented by each functional module are similar to those in the embodiments of this application.

[0323] A layered software architecture can divide software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the HarmonyOS system may include an application layer, a framework layer, a system infrastructure service layer, and a kernel layer, etc.

[0324] The application layer can include system applications and third-party applications, such as keyboard and mouse sharing applications, settings applications, camera applications, gallery applications, video applications, etc. In some scenarios, the application layer can also be called the application layer. In the embodiments of this application, the keyboard and mouse sharing application can instruct the electronic device to display a first prompt message. In order to realize the switching of screen focus between multiple electronic devices, the user can turn on the keyboard and mouse sharing function and the hand-eye coordination function in the settings application. The specific way to turn them on can be referred to the relevant descriptions in the embodiments of Figures 10 to 14, which will not be repeated here.

[0325] The framework layer provides multi-language user program frameworks (Java / C / C++ / JavaScript, etc.) for HarmonyOS applications, as well as multi-language framework application programming interfaces for various software and hardware services. In some scenarios, the framework layer can also be called the application framework layer. In this embodiment, the framework layer may include a multimodal sensor data platform (MSDP). The MSDP can be used to estimate the user's head pose and calculate the angle between the user's face and the electronic device, thereby determining the user's face orientation.

[0326] The system foundation service layer is the core capability set of the HarmonyOS system, supporting HarmonyOS in providing application services through the framework layer in multi-device deployment scenarios. The system foundation service layer may include, but is not limited to, one or more of the following components: system basic capability subsystem set, basic software service subsystem set, enhanced software service subsystem set, hardware service subsystem set, proprietary hardware service subsystem set, HarmonyOS driver framework, and hardware abstraction layer.

[0327] The system's basic capabilities subsystem set provides the foundational capabilities for the operation and scheduling of distributed applications across multiple devices within the HarmonyOS system. This set may include, but is not limited to, one or more of the following components: distributed task scheduling, distributed storage and data management, distributed soft bus, Ark runtime, and multi-modal input subsystem.

[0328] For example, in the embodiments of this application, the distributed soft bus provides communication-related capabilities for data transmission and information interconnection between multiple electronic devices, including wireless local area network (WLAN) service capabilities, Bluetooth service capabilities, soft bus, inter-process communication (remote procedure call, RPC) and other communication capabilities.

[0329] A multimodal input subsystem can integrate input from multiple dimensions. For example, a multimodal input subsystem can receive input events from input devices such as keyboards, mice, touchscreens, and touchpads based on the kernel subsystem and driver framework, and pass the input events to applications (such as keyboard and mouse sharing applications).

[0330] The basic software service subsystem provides common and general software services for HarmonyOS, and may consist of subsystems such as graphics and image software services and distributed media software services. The enhanced software service subsystem provides differentiated capability-enhancing software services for different devices, and may consist of subsystems such as tablet business software services and smart screen business software services. The hardware service subsystem provides common and adaptable hardware services for HarmonyOS, and may include subsystems such as power services. The proprietary hardware service subsystem provides differentiated hardware services for different devices, and may include subsystems such as tablet-specific hardware services and wearable-specific hardware services.

[0331] It is understandable that the above service subsystems can be deployed in different device configurations, and each subsystem can be tailored to its functional granularity.

[0332] The HarmonyOS driver framework and hardware abstraction layer form the foundation for the open hardware ecosystem of the HarmonyOS system. They provide hardware capability abstraction at the top and development frameworks and runtime environments for various peripheral drivers at the bottom. For example, in this embodiment, the hardware abstraction layer may include a facial landmark detection module. This module can be used to obtain facial landmark information based on images captured by a camera.

[0333] The HarmonyOS system employs a multi-kernel design, which may include, for example, the Linux kernel, the Harmony microkernel, and LiteOS. This design allows electronic devices with different capabilities to select the appropriate system kernel. This application provides an electronic device including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the aforementioned method for displaying notifications.

[0334] This application provides an electronic device including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the above-described method for switching focus across devices.

[0335] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0336] This application also provides a computer program product, including a computing program, which, when run on a computer, enables the computer to perform the steps in the various method embodiments described above.

[0337] This application also provides a chip system, which includes a processing circuit interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0338] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0339] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.

[0340] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0341] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

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

[0343] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0344] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for switching focus across devices, characterized in that, The method is applied to a communication system, which includes: a first electronic device, a second electronic device, and a first input device. The first electronic device and the second electronic device have a communication connection, and / or the first electronic device and the second electronic device are logged into the same account. The first input device is connected to the first electronic device. The method includes: The first electronic device displays the focus of the first input device; The first electronic device and / or the second electronic device detects that the user's head is facing the second electronic device; In response to a first operation received on the first input device, the first electronic device stops displaying the focus of the first input device and sends a first message to the second electronic device; In response to the first message, the second electronic device displays the focus of the first input device.

2. The method according to claim 1, characterized in that, The second electronic device displays the focus of the first input device, specifically including: The second electronic device displays the focus of the first input device at a first position on the display screen, wherein the first position is the center of the display screen, or the first position is the position where the focus was most recently displayed on the display screen, or the first position corresponds to the position of the focus of the first input device on the display screen of the first electronic device, or the first position is the position of the first interface element displayed in the second electronic device, or the first position is any input box displayed on the display screen.

3. The method according to claim 1 or 2, characterized in that, Before the first electronic device and / or the second electronic device detects that the user's head is facing the second electronic device, the method further includes: The first electronic device activates the first function; The second electronic device activates the first function.

4. The method according to claim 3, characterized in that, The first electronic device activating the first function specifically includes: The first electronic device enables the first function by using a first control provided by the settings application, a second control provided by the status bar, or a third control provided by the control center; Enabling the first function in the second electronic device specifically includes: The second electronic device enables the first function through a first control provided by the settings application, or a second control provided by the status bar, or a third control provided by the control center.

5. The method according to any one of claims 1-4, characterized in that, After the first electronic device and / or the second electronic device detects that the user's head is facing the second electronic device, the method further includes: The second electronic device displays a first prompt message, which prompts the user to switch the focus of the first input device, or prompts the user to switch the focus of the first input device to the second electronic device, or prompts the user to input the first operation to switch the focus of the first input device to the second electronic device.

6. The method according to claim 5, characterized in that, The first prompt message includes text content and / or icons.

7. The method according to claim 5 or 6, characterized in that, The method further includes: The first electronic device displays the first prompt message.

8. The method according to any one of claims 1-7, characterized in that, When the first input device is a keyboard, the first operation includes: operating on a first key in the first input device; When the first input device is a mouse, the first operation includes: moving the first input device.

9. The method according to any one of claims 1-8, characterized in that, The first electronic device and / or the second electronic device detecting that the user's head is facing the second electronic device specifically includes: The first electronic device and / or the second electronic device determine a first relative position between the first electronic device and the second electronic device; The first electronic device and / or the second electronic device determine the direction of the user's head toward the second electronic device based on the first relative position, the user's head posture in the image captured by the first electronic device, and the user's head posture in the image captured by the second electronic device.

10. The method according to any one of claims 1-8, characterized in that, The first electronic device and / or the second electronic device detecting that the user's head is facing the second electronic device specifically includes: The first electronic device and / or the second electronic device acquire a first included angle and a second included angle, wherein the first included angle is the angle between the first electronic device and the user's head, and the second included angle is the angle between the second electronic device and the user's head; When the first included angle is greater than the second included angle, the first electronic device and / or the second electronic device determine that the user's head is facing the second electronic device.

11. The method according to any one of claims 1-10, characterized in that, After the second electronic device responds to the first message and displays the focus of the first input device, the method further includes: In response to a second operation received on the first input device, the second electronic device performs an action corresponding to the second operation.

12. The method according to any one of claims 1-11, characterized in that, After the second electronic device responds to the first message and displays the focus of the first input device, the method further includes: The first electronic device and / or the second electronic device detects that the user's head is facing the first electronic device; In response to the first operation received on the first input device, the second electronic device stops displaying the focus of the first input device and sends a second message to the first electronic device; In response to the second message, the first electronic device displays the focus of the first input device.

13. The method according to any one of claims 1-11, characterized in that, The first communication system further includes a third electronic device, which establishes a communication connection with the first electronic device and the second electronic device. After the second electronic device responds to the first message and displays the focus of the first input device, the method further includes: The second electronic device and / or the third electronic device detects that the user's head is facing the third electronic device; In response to receiving the first operation on the first input device, the second electronic device stops displaying the focus of the first input device and sends a third message to the third electronic device; In response to the third message, the third electronic device displays the focus of the first input device.

14. The method according to any one of claims 1-11, characterized in that, The first communication system further includes a second input device connected to the first electronic device, and the method further includes: The first electronic device displays the focus of the second input device; In response to the first message, the second electronic device displays the focus of the second input device.

15. The method according to any one of claims 1-11, characterized in that, The first communication system further includes a second input device connected to the first electronic device, and the method further includes: The first electronic device displays the focus of the second input device; In response to receiving the first operation on the first input device, the first electronic device stops displaying the focus of the first input device.

16. A method for switching focus across devices, characterized in that, The method is applied to a second electronic device, wherein a communication connection is established between the first electronic device and the second electronic device, and / or the first electronic device and the second electronic device are logged into the same account, and the first input device is connected to the first electronic device. The method includes: The second electronic device detects that the user's head is facing the second electronic device; The second electronic device receives the first message sent by the first electronic device; In response to the first message, the second electronic device displays the focus of the first input device.

17. The method according to claim 16, characterized in that, The second electronic device displays the focus of the first input device, specifically including: The second electronic device displays the focus of the first input device at a first position on the display screen, wherein the first position is the center of the display screen, or the first position is the position where the focus was most recently displayed on the display screen, or the first position corresponds to the position of the focus of the first input device on the display screen of the first electronic device, or the first position is the position of the first interface element displayed in the second electronic device, or the first position is any input box displayed on the display screen.

18. The method according to claim 16 or 17, characterized in that, Before the second electronic device detects that the user's head is facing the second electronic device, the method further includes: The second electronic device activates the first function.

19. The method according to claim 18, characterized in that, Enabling the first function in the second electronic device specifically includes: The second electronic device enables the first function through a first control provided by the settings application, or a second control provided by the status bar, or a third control provided by the control center.

20. The method according to any one of claims 16-19, characterized in that, After the second electronic device detects that the user's head is facing the second electronic device, the method further includes: The second electronic device displays a first prompt message, which prompts the user to switch the focus of the first input device, or prompts the user to switch the focus of the first input device to the second electronic device, or prompts the user to input the first operation to switch the focus of the first input device to the second electronic device.

21. The method according to any one of claims 16-20, characterized in that, When the first input device is a keyboard, the first operation includes: operating on a first key in the first input device; When the first input device is a mouse, the first operation includes: moving the first input device.

22. The method according to any one of claims 16-21, characterized in that, The second electronic device detects that the user's head is facing the second electronic device, specifically including: The second electronic device determines a first relative position between the first electronic device and the second electronic device; The second electronic device determines the direction of the user's head towards the second electronic device based on the first relative position, the user's head posture in the image captured by the first electronic device, and the user's head posture in the image captured by the second electronic device.

23. The method according to any one of claims 16-21, characterized in that, The second electronic device detects that the user's head is facing the second electronic device, specifically including: The second electronic device acquires a first included angle and a second included angle, wherein the first included angle is the angle between the first electronic device and the user's head, and the second included angle is the angle between the second electronic device and the user's head; When the first included angle is greater than the second included angle, the second electronic device determines that the user's head is facing the second electronic device.

24. The method according to any one of claims 16-23, characterized in that, After the second electronic device responds to the first message and displays the focus of the first input device, the method further includes: In response to a second operation received on the first input device, the second electronic device performs an action corresponding to the second operation.

25. A communication system, characterized in that, The communication system includes: a first electronic device, a second electronic device, and a first input device. The first electronic device and the second electronic device have a communication connection, and / or the first electronic device and the second electronic device are logged into the same account. The first input device is connected to the first electronic device. The first electronic device is used to perform the method of any one of claims 1-15, and the second electronic device is used to perform the method of any one of claims 1-15.

26. An electronic device, characterized in that, The electronic device includes a memory, a processor, and computer instructions stored in the memory, the processor executing the computer program to implement the method of any one of claims 16-24.

27. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 16-24.

28. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the method of any one of claims 16-24.