Mouse operation method, electronic device, mouse, and computer-readable storage medium

By maintaining a full-screen view in electronic devices, obtaining the mouse cursor position, and switching operation permissions, the problem of cross-screen switching relying on system-level APIs is solved, and the universality of cross-screen switching is achieved.

CN117666819BActive Publication Date: 2026-11-27HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211006892.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2026-11-27
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

In the existing technology, the cross-screen switching function of mouse operation permissions relies on the system-level API provided by the operating system of the electronic device, which makes it impossible to achieve cross-screen switching between multiple electronic devices with different operating systems.

Method used

By maintaining a full-screen view on an electronic device, the position of the mouse cursor on the entire screen is obtained, and when the mouse moves, it is determined whether the target position is located at the edge of the screen. If so, the operation permission is switched to another electronic device with the mouse cross-screen switching service installed, thus realizing cross-screen switching.

Benefits of technology

It enables cross-screen switching of mouse operation permissions across multiple electronic devices without relying on system-level APIs, expanding the application scope and making it suitable for devices with different operating systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666819B_ABST
    Figure CN117666819B_ABST
Patent Text Reader

Abstract

Embodiments of the present application are applicable to the technical field of computer, and provide a mouse operation method, an electronic device, a mouse and a computer readable storage medium, the method is applied to a first electronic device, and includes: obtaining a first position of a cursor of a mouse on a first screen of the first electronic device based on a full-screen view maintained in the background, a mouse cross-screen switching service is installed in the first electronic device; determining a target position of the cursor on the first screen after the cursor is synchronously moved after the mouse is moved; if the target position is located at an edge of the first screen, switching operation permission of the mouse to a second electronic device in which the mouse cross-screen switching service is installed, and the cursor of the mouse after the switching is located at a second position at an edge of a second screen of the second electronic device. By using the above method, the switching of the operation permission of the mouse between multiple electronic devices can be realized without relying on an application programming interface of a system level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a mouse operation method, an electronic device, a mouse, and a computer-readable storage medium. Background Technology

[0002] The cross-screen switching function for mouse operation permissions refers to the ability to switch the operation permissions of the same mouse across multiple electronic device screens. For example, if a user is operating the mouse on the screen of a first electronic device, and the mouse cursor is moved to the edge of the screen, the mouse operation permission will be switched to a nearby second electronic device. The user can then use the same mouse on the screen of the second electronic device.

[0003] In existing technologies, cross-screen switching of mouse operation permissions relies on the system-level application programming interfaces (APIs) provided by the operating systems (OS) of each electronic device. Electronic devices can obtain and set the mouse cursor position based on these APIs. However, for multiple electronic devices using different operating systems, since the operating systems may not provide system-level APIs, cross-screen switching of mouse operation permissions cannot be directly achieved using the aforementioned methods. Summary of the Invention

[0004] This application provides a mouse operation method, an electronic device, a mouse, and a computer-readable storage medium to solve the problem in the prior art that mouse operation permissions need to be switched between multiple electronic devices by relying on system-level APIs provided by the operating system of the electronic device.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] A first aspect of this application provides a mouse operation method applied to a first electronic device, comprising:

[0007] Based on the full-screen view maintained in the background, the first position of the mouse cursor on the first screen of the first electronic device is obtained, and the first electronic device has a mouse cross-screen switching service installed.

[0008] After the mouse is moved, the target position of the cursor on the first screen after synchronous movement is determined;

[0009] If the target location is located at the edge of the first screen, the operation permission of the mouse is switched to the second electronic device that has the mouse cross-screen switching service installed, and the cursor of the mouse after the switch is located at the second position at the edge of the second screen of the second electronic device.

[0010] Compared with the prior art, the mouse operation method provided in this application has the following advantages:

[0011] The first electronic device maintains a full-screen view in the background, allowing it to obtain the initial cursor position on its screen based on this view. This solves the problem in existing technologies where electronic devices using partial operating systems can only obtain the cursor position within a specific view, enabling the device to obtain the cursor's position relative to the entire screen based on the full-screen view. When the mouse moves, causing the cursor to move synchronously, the first electronic device can determine, based on the first position, whether the target position of the moved cursor is located at the edge of its screen. If the target position is at the edge of the screen, it indicates that the user may wish to use the mouse on an adjacent second electronic device. In this case, mouse operation permissions can be switched to the second electronic device. The mouse operation method provided in this application overcomes the dependence on system-level APIs when switching mouse operation permissions across screens. Even if some of the multiple electronic devices involved in the cross-screen switching of mouse operation permissions have operating systems that do not provide system-level APIs, cross-screen switching of mouse operation permissions can still be achieved, greatly expanding the application scope of cross-screen switching of mouse operation permissions.

[0012] In one possible implementation of this application, obtaining the first position of the mouse cursor on the first screen of the first electronic device based on the background-maintained full-screen view includes: the first electronic device switching the full-screen view to the foreground; the first electronic device obtaining the cursor position in the full-screen view. Since the view switched to the foreground is full-screen and its size is the same as the screen size of the first electronic device, the cursor position in the full-screen view is the same as the first position of the cursor on the first screen of the first electronic device. Thus, the first electronic device accurately obtains the cursor position on the screen of the first electronic device. Then, the first electronic device can switch the full-screen view to the background.

[0013] In one possible implementation of this application, determining the target position of the cursor on the first screen after the mouse movement includes: receiving the relative displacement of the mouse transmitted by the mouse after the mouse movement, wherein the relative displacement is the distance and direction of movement of the mouse itself; and determining the target position of the cursor on the first screen based on the first position and the relative displacement of the mouse. Since the first position is the initial position of the cursor relative to the screen of the first electronic device, and the movement of the cursor is basically the same as the movement of the mouse, the target position of the cursor on the first electronic device screen after movement can be accurately calculated based on the first position and the relative displacement of the mouse.

[0014] In one possible implementation of this application, switching the operation permission of the mouse to a second electronic device equipped with the mouse cross-screen switching service includes: sending the target location to the mouse via the mouse cross-screen switching service to notify the mouse to switch the operation permission to the adjacent second electronic device. That is, for multiple connected mice, the mouse cross-screen switching service on the first electronic device can notify the mouse to connect to the second electronic device, thereby achieving the switching of operation permissions.

[0015] In another possible implementation of this application, switching the mouse operation permission to a second electronic device equipped with the mouse cross-screen switching service includes: sending the target location to the second electronic device via the mouse cross-screen switching service, so as to instruct the second electronic device to set the mouse cursor to the second position on the second screen based on a pre-established virtual mouse device. That is, the cross-screen switching of mouse operation permissions is completed by sending the target location information from the mouse cross-screen switching service on the first electronic device to the mouse cross-screen switching service on the second electronic device.

[0016] In one possible implementation of this application embodiment, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be the same; alternatively, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be different. Wherein, the first operating system or the second operating system may be... System. Exemplarily, the first electronic device is for use... The system's electronic devices, the second electronic device is a non-electronic device. The system's electronic devices; or, both the first and second electronic devices can be used. The system's electronic equipment.

[0017] A second aspect of this application provides a mouse operation method applied to a second electronic device, comprising:

[0018] When the mouse operation permission is switched from the first electronic device to the second electronic device, the second position at the edge of the second screen of the second electronic device is determined. Both the first electronic device and the second electronic device have a mouse cross-screen switching service installed.

[0019] Based on the full-screen view maintained in the background, obtain the current position of the mouse cursor on the second screen;

[0020] Determine the relative mouse displacement between the current position and the second position;

[0021] The relative displacement of the mouse is sent to the mouse through the mouse cross-screen switching service, so as to move the cursor of the mouse to the second position.

[0022] In one possible implementation of this application, determining the second position at the edge of the second screen of the second electronic device includes: determining the target position of the cursor of the mouse at the edge of the first screen of the first electronic device; and determining the second position at the edge of the second screen based on the target position.

[0023] In one possible implementation of this application, determining the target position of the mouse cursor at the edge of the first screen of the first electronic device includes: receiving the target position sent by the mouse through the mouse cross-screen switching service; or, receiving the target position sent by the first electronic device through the mouse cross-screen switching service.

[0024] In one possible implementation of this application, obtaining the current position of the mouse cursor on the second screen based on the full-screen view maintained in the background includes: switching the full-screen view to the foreground; obtaining the cursor position of the cursor in the full-screen view, wherein the cursor position in the full-screen view is the same as the current position of the cursor on the second screen; and switching the full-screen view to the background.

[0025] In one possible implementation of this application embodiment, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be the same; alternatively, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be different. Wherein, the first operating system or the second operating system may be... System. Exemplarily, the first electronic device is for use with non- The system's electronic devices, the second electronic device is for use The system's electronic devices; or, both the first and second electronic devices can be used. The system's electronic equipment.

[0026] A third aspect of this application provides a mouse operation method, applied to a mouse, including:

[0027] A first channel and a second channel for data transmission are maintained between the mouse and the first electronic device, wherein the first electronic device is equipped with a mouse cross-screen switching service.

[0028] After the mouse is moved, the relative mouse displacement is sent to the operating system of the first electronic device through the first channel, and the relative mouse displacement is sent to the mouse cross-screen switching service on the first electronic device through the second channel.

[0029] When an instruction to switch operation permissions is received from the mouse cross-screen switching service on the first electronic device, the operation permissions are switched to the second electronic device, which has the mouse cross-screen switching service installed.

[0030] In one possible implementation of this application embodiment, after switching the operation permission to the second electronic device, the method further includes: maintaining a third channel and a fourth channel for data transmission between the mouse and the second electronic device; receiving, through the third channel, a relative mouse displacement sent by the mouse cross-screen switching service on the second electronic device, wherein the relative mouse displacement is the displacement of the mouse cursor from its current position to a second position on the second screen of the second electronic device, and the second position is the position at the edge of the second screen; and sending the relative mouse displacement to the operating system of the second electronic device through the fourth channel to set the mouse cursor to the second position.

[0031] In one possible implementation of this application, receiving the relative mouse displacement sent by the mouse cross-screen switching service on the second electronic device through the third channel includes: sending information about the target position of the mouse cursor at the edge of the first screen of the first electronic device to the mouse cross-screen switching service on the second electronic device through the third channel; and receiving the relative mouse displacement returned by the mouse cross-screen switching service on the second electronic device for the target position through the third channel.

[0032] A fourth aspect of this application provides a mouse operating device, applied to a first electronic device, comprising:

[0033] The acquisition module is used to acquire the first position of the mouse cursor on the first screen of the first electronic device based on the full-screen view maintained in the background. The first electronic device has a mouse cross-screen switching service installed.

[0034] The determination module is used to determine the target position of the cursor on the first screen after the mouse is moved synchronously;

[0035] The switching module is used to switch the operation permission of the mouse to a second electronic device that has the mouse cross-screen switching service installed if the target position is located at the edge of the first screen. After the switch, the cursor of the mouse is located at a second position at the edge of the second screen of the second electronic device.

[0036] In one possible implementation of this application embodiment, the acquisition module may be used to: switch the full-screen view to the foreground; acquire the cursor position of the cursor in the full-screen view, wherein the cursor position in the full-screen view is the same as the first position of the cursor on the first screen; and switch the full-screen view to the background.

[0037] In one possible implementation of this application, the determining module may be specifically used to: after the mouse moves, receive the relative displacement of the mouse transmitted by the mouse, wherein the relative displacement of the mouse is the moving distance and moving direction of the mouse itself; and determine the target position of the cursor on the first screen based on the first position and the relative displacement of the mouse.

[0038] In one possible implementation of this application, the switching module may be used to: send the target location to the mouse through the mouse cross-screen switching service, so as to notify the mouse to switch the operation permission to the adjacent second electronic device.

[0039] In another possible implementation of this application embodiment, the switching module can also be used to: send the target position to the second electronic device through the mouse cross-screen switching service, so as to instruct the second electronic device to set the cursor of the mouse on the second screen at the second position based on a pre-established virtual mouse device.

[0040] In this embodiment, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be the same; alternatively, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be different. Wherein, the first operating system or the second operating system may be... System. Exemplarily, the first electronic device is for use with non- The system's electronic devices, the second electronic device is for use The system's electronic devices; or, both the first and second electronic devices can be used. The system's electronic equipment.

[0041] A fifth aspect of this application provides a mouse operating device, applied to a second electronic device, comprising:

[0042] The position determination module is used to determine the second position at the edge of the second screen of the second electronic device when the mouse operation permission is switched from the first electronic device to the second electronic device. Both the first electronic device and the second electronic device have a mouse cross-screen switching service installed.

[0043] The position acquisition module is used to acquire the current position of the mouse cursor on the second screen based on the full-screen view maintained in the background;

[0044] A relative displacement determination module is used to determine the relative mouse displacement between the current position and the second position;

[0045] The mouse switching module is used to send the relative displacement of the mouse to the mouse through the mouse cross-screen switching service, so as to move the cursor of the mouse to the second position.

[0046] In one possible implementation of this application embodiment, the position determination module may specifically be used to: determine the target position of the cursor of the mouse at the edge of the first screen of the first electronic device; and determine the second position at the edge of the second screen based on the target position.

[0047] In another possible implementation of this application embodiment, the position determination module can also be used to: receive the target position sent by the mouse through the mouse cross-screen switching service; or, receive the target position sent by the first electronic device through the mouse cross-screen switching service.

[0048] In one possible implementation of this application embodiment, the position acquisition module may be used to: switch the full-screen view to the foreground; acquire the cursor position of the cursor in the full-screen view, wherein the cursor position in the full-screen view is the same as the current position of the cursor on the second screen; and switch the full-screen view to the background.

[0049] In this embodiment, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be the same; alternatively, the first operating system used by the first electronic device and the second operating system used by the second electronic device may be different. Wherein, the first operating system or the second operating system may be... System. Exemplarily, the first electronic device is for use with non- The system's electronic devices, the second electronic device is for use The system's electronic devices; or, both the first and second electronic devices can be used. The system's electronic equipment.

[0050] A sixth aspect of this application provides a mouse operating device, applied to a mouse, comprising:

[0051] A maintenance module is used to maintain a first channel and a second channel for data transmission between the mouse and a first electronic device, wherein the first electronic device is equipped with a mouse cross-screen switching service.

[0052] The sending module is configured to send the relative mouse displacement to the operating system of the first electronic device through the first channel after the mouse is moved, and send the relative mouse displacement to the mouse cross-screen switching service on the first electronic device through the second channel.

[0053] The switching module is used to switch the operation permission to the second electronic device when it receives an instruction from the mouse cross-screen switching service on the first electronic device to switch the operation permission to the second electronic device, wherein the mouse cross-screen switching service is installed on the second electronic device.

[0054] In one possible implementation of this application embodiment, the maintaining module is further configured to: maintain a third channel and a fourth channel for data transmission between the mouse and the second electronic device;

[0055] The sending module is further configured to: receive the relative mouse displacement sent by the mouse cross-screen switching service on the second electronic device through the third channel, wherein the relative mouse displacement is the displacement of the mouse cursor from its current position to a second position on the second screen of the second electronic device, and the second position is the position at the edge of the second screen; and send the relative mouse displacement to the operating system of the second electronic device through the fourth channel to set the mouse cursor to the second position.

[0056] In one possible implementation of this application embodiment, the sending module can also be used to: send information about the target position of the mouse cursor at the edge of the first screen of the first electronic device to the mouse cross-screen switching service on the second electronic device through the third channel;

[0057] The device further includes a receiving module, which is configured to: receive, via the third channel, the relative mouse displacement returned by the mouse cross-screen switching service on the second electronic device for the target position.

[0058] A seventh aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the mouse operation method as described in any one of the first or second aspects above.

[0059] An eighth aspect of the embodiments of this application provides a mouse for implementing the mouse operation method described in any of the third aspects above.

[0060] A ninth aspect of this application provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned related method steps to implement the mouse operation method described in any one of the first or second aspects. When the computer instructions are executed on a mouse, the mouse performs the aforementioned related method steps to implement the mouse operation method described in any one of the third aspects.

[0061] A tenth aspect of this application provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the mouse operation method described in any one of the first, second, or third aspects.

[0062] It is understood that the beneficial effects of aspects two through ten above can be found in the relevant descriptions in aspect one above, and will not be repeated here. Attached Figure Description

[0063] Figure 1 This is a schematic diagram illustrating the scenario to which the mouse operation method provided in the embodiments of this application is applicable;

[0064] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0065] Figure 3 This is a software structure block diagram of an electronic device provided in an embodiment of this application;

[0066] Figure 4 This is a schematic diagram of a mouse operation method provided in an embodiment of this application;

[0067] Figure 5 This is a schematic diagram of a full-screen view provided in an embodiment of this application;

[0068] Figure 6 This is a schematic diagram illustrating how to determine the target position of a moved cursor according to an embodiment of this application;

[0069] Figure 7 This is a schematic diagram illustrating how to set the cursor at a crossing point, as provided in an embodiment of this application.

[0070] Figure 8 This is a schematic diagram of a mouse operation provided in an embodiment of this application;

[0071] Figure 9 This is a schematic diagram of another mouse operation provided in an embodiment of this application;

[0072] Figure 10 This is a flowchart illustrating the steps of a mouse operation method provided in an embodiment of this application;

[0073] Figure 11 This is a flowchart illustrating the steps of another mouse operation method provided in an embodiment of this application;

[0074] Figure 12 This is a flowchart illustrating the steps of another mouse operation method provided in an embodiment of this application;

[0075] Figure 13 This is a structural block diagram of a mouse operating device provided in an embodiment of this application;

[0076] Figure 14 This is a structural block diagram of another mouse operating device provided in an embodiment of this application;

[0077] Figure 15 This is a structural block diagram of another mouse operating device provided in the embodiments of this application. Detailed Implementation

[0078] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and purpose. For example, "first electronic device," "second electronic device," etc., are merely used to distinguish different electronic devices and do not impose any other limitations on them.

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

[0080] The business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0081] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "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 are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0082] The steps involved in the mouse operation method provided in this application are merely examples. Not all steps are mandatory, nor are all information or message contents mandatory. They can be added or removed as needed during use.

[0083] In this application, the same step or a step or message with the same function can be referenced and learned from each other in different embodiments.

[0084] Typically, implementing cross-screen switching of mouse operation permissions relies on system-level APIs provided by the operating systems of electronic devices, and requires pre-installed software on each of the devices involved in the cross-screen switching. The system-level API enables the pre-installed software to obtain and set the mouse cursor position when the user operates the mouse. For example, if pre-installed software assisting in cross-screen mouse switching is installed on both the first and second electronic devices, and the software detects that the mouse cursor on the first device has moved to the edge of the screen adjacent to the second device while the user is using the mouse on the first device, it will notify the mouse to switch its connection to the second device. Upon receiving the connection switch instruction, the second device can set the mouse cursor on its screen, thus achieving cross-screen switching of mouse operation permissions. In this process, the system-level API can be used to support the pre-installed software in sensing and setting the cursor position. However, in some types of operating systems, such as... The system, due to The system does not provide a system-level API. When using a mouse on an electronic device, the cursor position can only be obtained within a specific view; it cannot perceive or set a globally-based cursor position. Therefore, the aforementioned method for cross-screen switching of mouse operation permissions can only be applied to devices using certain operating systems, such as those using… System and Mac The system's devices. For other types of operating systems, especially electronic devices that involve cross-screen switching of mouse operation permissions, the use of... When using electronic devices within the system, it is not possible to switch operating permissions across screens using the method described above.

[0085] Some manufacturers have proposed a software implementation solution to extend native keyboards and mice to other devices. This involves modifying the operating system of electronic devices and adding system-level APIs to enable cross-screen switching of mouse operation permissions. For example, in... Provided A new system-level API has been added to the system. This allows applications to... The system's electronic devices can switch mouse operation permissions across screens with other electronic devices that provide system-level APIs. For example, applications... System or Mac The system's first electronic device, and its application The system's second electronic device can be pre-networked and established with the first electronic device. By capturing mouse data on the first electronic device, a virtual input device can be created on the second electronic device, enabling the transfer of mouse data from the first to the second electronic device and facilitating cross-screen switching of mouse operation permissions. However, this solution relies on a newly added system-level API to obtain and set the mouse cursor position, making it unsuitable for use on other unmodified devices.

[0086] To address the issue that current methods for switching mouse operation permissions across screens rely on system-level APIs provided by the operating system, this application provides a mouse operation method that uses a universal way of obtaining and setting the cursor position. This allows the cross-screen switching technology for operation permissions to be independent of whether the operating system of the electronic device provides the corresponding system-level API, thus enabling cross-screen switching of mouse operation permissions across electronic devices using various operating systems.

[0087] This application provides a mouse operation method that can be applied to multiple electronic devices. For example... Figure 1 The diagram shown is a schematic representation of a scenario in which the mouse operation method provided in this application is applicable. Figure 1 The system includes a first electronic device 101, a second electronic device 102, and a mouse 103. The operating system used by the first electronic device 101 and the second electronic device 102 can be the same or different. For example, the operating system used by the first electronic device 101 may provide system-level APIs. System or The operating system used by the second electronic device 102 may not provide a system-level API. Alternatively, the operating system used by the first electronic device 101 may not provide a system-level API. The operating system used by the second electronic device 102 may be a Mac operating system that provides system-level APIs. The system. Alternatively, the operating systems used by the first electronic device 101 and the second electronic device 102 may both be systems that do not provide system-level APIs. The system or other systems. By applying the mouse operation method provided in the embodiments of this application, the operation permission of the mouse used on the first electronic device 101 can be switched to the second electronic device 102, or the operation permission of the mouse used on the second electronic device 102 can be switched to the first electronic device 101.

[0088] Figure 1The illustration shown is merely an example of one scenario in an embodiment of this application, and the example includes two electronic devices. In practical applications, cross-screen switching of mouse operation permissions can be applied across a larger number of electronic devices. For example, it may also include a third electronic device and a fourth electronic device, etc. The number of electronic devices is not limited in this embodiment.

[0089] In this embodiment, the first electronic device 101 or the second electronic device 102 may be a tablet computer, laptop computer, personal computer (PC), netbook, or other electronic device that can be connected to input devices such as a keyboard and mouse. This embodiment does not limit the specific type of the first electronic device 101 or the second electronic device 102.

[0090] In this embodiment of the application, the first electronic device 101 and the second electronic device 102 can be of the same type of electronic device. For example, both the first electronic device 101 and the second electronic device 102 can be laptops; or both the first electronic device 101 and the second electronic device 102 can be tablets. Alternatively, in this embodiment of the application, the first electronic device 101 and the second electronic device 102 can be of different types of electronic devices. For example, the first electronic device 101 can be a laptop and the second electronic device 102 can be a tablet; or the first electronic device 101 can be a tablet and the second electronic device 102 can be a personal computer.

[0091] For example, Figure 2 A schematic diagram of the structure of an electronic device 200 is shown. The structures of the first electronic device 101 and the second electronic device 102 described above can be referenced from the structure of electronic device 200.

[0092] Electronic device 200 may include processor 210, external memory interface 220, internal memory 221, universal serial bus (USB) interface 230, charging management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, headphone jack 270D, sensor module 280, button 290, indicator 291, camera 292, display screen 293, etc.

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

[0094] Processor 210 may include one or more processing units. For example, processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0095] The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

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

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

[0098] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments of this application, the processor 210 may include multiple I2C buses. The processor 210 can couple to a touch sensor, charger, flash, camera 292, etc., through different I2C bus interfaces. For example, the processor 210 can couple to a touch sensor through an I2C interface, enabling the processor 210 and the touch sensor to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 200.

[0099] The I2S interface can be used for audio communication. In some embodiments of this application, the processor 210 may include multiple I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to realize communication between the processor 210 and the audio module 270. In some embodiments of this application, the audio module 270 can transmit audio signals to the wireless communication module 260 via the I2S interface to realize the function of listening to audio through Bluetooth headphones.

[0100] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments of this application, the audio module 270 and the wireless communication module 260 can be coupled via the PCM bus interface. In some embodiments of this application, the audio module 270 can also transmit audio signals to the wireless communication module 260 via the PCM interface, enabling the function of listening to audio through Bluetooth headphones.

[0101] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments of this application, the UART interface is typically used to connect the processor 210 and the wireless communication module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless communication module 260 via the UART interface to implement Bluetooth functionality. In some embodiments of this application, the audio module 270 can transmit audio signals to the wireless communication module 260 via the UART interface to enable music playback via Bluetooth headphones.

[0102] The MIPI interface can be used to connect the processor 210 to peripheral devices such as the display 293 and the camera 292. The MIPI interface includes the camera serial interface (CSI) and the display serial interface (DSI).

[0103] In some embodiments of this application, the processor 210 and the camera 292 communicate via a CSI interface to enable the electronic device 200 to capture images. The processor 210 and the display screen 293 communicate via a DSI interface to enable the electronic device 200 to display images.

[0104] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments of this application, the GPIO interface can be used to connect the processor 210 to a camera 292, a display screen 293, a wireless communication module 260, an audio module 270, a sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0105] USB port 230 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, or USB Type-C port. USB port 230 can be used to connect a charger to charge electronic device 200, and can also be used for data transfer between electronic device 200 and peripheral devices. USB port 230 can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

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

[0107] The charging management module 240 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 240 receives charging input from the wired charger via a USB interface 230. In some wireless charging embodiments, the charging management module 240 receives wireless charging input via the wireless charging coil of the electronic device 200. While charging the battery 242, the charging management module 240 can also supply power to the electronic device via the power management module 241.

[0108] The power management module 241 connects the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, supplying power to the processor 210, internal memory 221, display screen 293, camera 292, wireless communication module 260, etc. The power management module 241 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance).

[0109] In some other embodiments, the power management module 241 may also be located within the processor 210. In other embodiments, the power management module 241 and the charging management module 240 may also be located in the same device.

[0110] The wireless communication function of electronic device 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor, and baseband processor.

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

[0112] The mobile communication module 250 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the electronic device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 250 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 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0113] In some embodiments of this application, at least some functional modules of the mobile communication module 250 may be housed in the processor 210. In some embodiments of this application, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 may be housed in the same device.

[0114] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 270A, receiver 270B, etc.) or displays images or videos through the display screen 293.

[0115] In some embodiments of this application, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and may be housed in the same device as the mobile communication module 250 or other functional modules.

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

[0117] In some embodiments of this application, antenna 1 of electronic device 200 is coupled to mobile communication module 250, and antenna 2 is coupled to wireless communication module 260, enabling electronic device 200 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-SCDMA), 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).

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

[0119] Display screen 293 is used to display images, videos, etc. Display screen 293 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0120] Electronic device 200 can perform shooting functions through ISP, camera 292, video codec, GPU, display screen 293 and application processor.

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

[0122] Camera 292 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 of this application, the electronic device 200 may include one or N cameras 292, where N is a positive integer greater than 1.

[0123] 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 200 selects a frequency, the DSP is used to perform Fourier transforms on the frequency energy.

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

[0125] An NPU (Neural Processing Unit) is a neural network (NN) computing processor that, by borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, rapidly processes input information and can continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

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

[0127] Internal memory 221 can be used to store computer executable program code, which includes instructions. Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of electronic device 200 (such as audio data, phone book, etc.).

[0128] In addition, the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory. For example, at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0129] The processor 210 executes various functional applications and data processing of the electronic device 200 by running instructions stored in the internal memory 221 and / or in the memory set in the processor.

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

[0131] The audio module 270 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 270 can also be used for encoding and decoding audio signals. In some embodiments of this application, the audio module 270 may be located in the processor 210, or some functional modules of the audio module 270 may be located in the processor 210.

[0132] The loudspeaker 270A, also known as a "speaker", is used to convert audio electrical signals into sound signals. Electronic device 200 can listen to music through the loudspeaker 270A.

[0133] The receiver 270B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 200 answers a telephone call or voice message, the receiver 270B can be brought close to the ear to listen to the voice.

[0134] Microphone 270C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When sending voice information, the user can speak by bringing their mouth close to microphone 270C, inputting the sound signal into microphone 270C. Electronic device 200 may have at least one microphone 270C. In some embodiments, electronic device 200 may have two microphones 270C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 200 may also have three, four, or more microphones 270C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0135] The headphone jack 270D is used to connect wired headphones. The headphone jack 270D can be a USB 230 interface, or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.

[0136] The sensor module 480 may include a pressure sensor 280A, a fingerprint sensor 280B, a temperature sensor 280C, a touch sensor 280D, an ambient light sensor 280E, etc.

[0137] Pressure sensor 280A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 280A may be disposed on display screen 293. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 280A, the capacitance between the electrodes changes. Electronic device 200 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 293, electronic device 200 detects the intensity of the touch operation based on pressure sensor 280A. Electronic device 200 may also calculate the touch position based on the detection signal from pressure sensor 280A.

[0138] In some embodiments of this application, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation commands.

[0139] The fingerprint sensor 280B is used to collect fingerprints. The electronic device 200 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, access to application locks, touch screen operation, etc.

[0140] Temperature sensor 280C is used to detect temperature. In some embodiments of this application, electronic device 200 uses the temperature detected by temperature sensor 280C to execute a temperature processing strategy. For example, when the temperature reported by temperature sensor 280C exceeds a threshold, electronic device 200 reduces the performance of a processor located near temperature sensor 280C to reduce power consumption and implement thermal protection.

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

[0142] An ambient light sensor 280E is used to sense the brightness of ambient light. Electronic device 200 can adaptively adjust the brightness of display screen 293 according to the sensed ambient light brightness.

[0143] Buttons 290 include a power button, volume buttons, and an input keypad. Buttons 290 can be mechanical buttons or touch-sensitive buttons. Electronic device 200 can receive button input and generate key signal inputs related to user settings and function control of electronic device 200.

[0144] Indicator 291 can be an indicator light, which can be used to indicate charging status, power changes, or to indicate messages, notifications, etc.

[0145] The software system of electronic device 200 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered architecture. Taking the system as an example, the software structure of electronic device 200 is illustrated.

[0146] Figure 3 This is a software structure block diagram of an electronic device 200 according to an embodiment of this application.

[0147] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments of this application, The system is divided into four layers, from top to bottom: application layer, application framework layer, ... runtime ( runtime and system libraries, as well as the kernel layer.

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

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

[0150] The application framework layer provides APIs and a programming framework for applications within the application layer. The application framework layer includes some predefined functions.

[0151] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, mouse cross-screen switching service, etc.

[0152] The window manager is used to manage windowed applications. It can retrieve screen size, determine if a status bar is present, lock the screen, and capture screenshots, among other things.

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

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

[0155] The phone manager is used to provide communication functions for electronic devices 200. For example, it manages call status (including connection, hang-up, etc.).

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

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

[0158] A mouse cross-screen switching service can be a software module that provides functionality related to switching mouse operation permissions across screens through software methods. Examples include obtaining and setting the mouse cursor position, enabling information exchange between the mouse and other devices, and facilitating information exchange between mouse cross-screen switching services on different electronic devices.

[0159] For example, Figure 1Both the first electronic device 101 and the second electronic device 102 can be equipped with a mouse cross-screen switching service. The mouse cross-screen switching service in the first electronic device 101 can be used to obtain and set the position of the mouse cursor on the screen of the first electronic device 101; and to realize information interaction with the mouse, such as receiving displacement data sent by the mouse through a private channel, and notifying the mouse to switch operation permissions to the second electronic device 102 through a private channel. Correspondingly, the mouse cross-screen switching service in the second electronic device 102 can also be used to obtain and set the position of the mouse cursor on the screen of the second electronic device 102; and to realize information interaction with the mouse, such as receiving the coordinates of the crossing point sent by the mouse through a private channel, and notifying the mouse to switch operation permissions to the first electronic device 101 through a private channel, etc. Furthermore, the mouse cross-screen switching services between different electronic devices can communicate directly. For example, when it is necessary to switch the mouse operation permission from the first electronic device 101 to the second electronic device 102, the mouse cross-screen switching service in the first electronic device 101 can forward mouse displacement data to the mouse cross-screen switching service in the second electronic device 102; or, when it is necessary to switch the mouse operation permission from the second electronic device 102 to the first electronic device 101, the mouse cross-screen switching service in the second electronic device 102 can notify the mouse cross-screen switching service in the first electronic device 101 to set the mouse cursor at a specified position on the screen of the first electronic device 101.

[0160] Runtime includes core libraries and a virtual machine. runtime is responsible for System scheduling and management.

[0161] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part is... The core library.

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

[0163] System libraries can include multiple functional modules. For example, a surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

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

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

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

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

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

[0169] The following embodiments use a terminal with the above-described hardware / software structure as an example to illustrate the mouse cross-screen switching method provided in this application.

[0170] Reference Figure 4 The diagram illustrates a mouse operation method provided in an embodiment of this application. The method may specifically include the following steps:

[0171] S401. By switching views, obtain the initial position of the cursor on the first electronic device.

[0172] In this embodiment, each electronic device may have a pre-installed mouse cross-screen switching service to assist in switching mouse operation permissions across multiple electronic devices. That is, the mouse operation permission can be switched from the first electronic device to the second electronic device, or vice versa, based on the mouse cross-screen switching service.

[0173] In certain operating systems, the first electronic device can only obtain the cursor position within a specific view and cannot perceive or set the global cursor position. For example, in applications... In the first electronic device of the system, if the mouse cursor is located inside a certain view, the first electronic device can only obtain the position of the cursor inside that view, and cannot perceive the global position of the cursor on the screen of the first electronic device.

[0174] To address the aforementioned issues, the mouse cross-screen switching service can maintain a full-screen view in the background of the first electronic device. For example, the mouse cross-screen switching service installed on the first electronic device can maintain a full-screen view in the background, and this full-screen view can be transparent. When it is necessary to obtain the initial position of the cursor, this full-screen view can be brought to the foreground of the first electronic device. Since this view is full-screen, its size is approximately equal to the screen size of the first electronic device. When the first electronic device obtains the cursor's position based on this full-screen view, it can be considered as having obtained the initial position of the cursor relative to the entire screen.

[0175] like Figure 5 The image shown is a schematic diagram of a full-screen view provided in an embodiment of this application. Figure 5 In the process, after the first electronic device 500 switches the full-screen view to the foreground, the full-screen view can cover the entire screen of the first electronic device. Since the full-screen view is transparent, the content seen by the user on the screen of the first electronic device remains unchanged. After obtaining the coordinates of the mouse cursor 510 based on the full-screen view, the first electronic device 500 has essentially obtained the initial position of the cursor 510 based on the entire screen. Then, the first electronic device 500 can switch the full-screen view to the background.

[0176] The first electronic device can switch between full-screen views in a very short time. That is, after switching the full-screen view to the foreground, the first electronic device can immediately switch the full-screen view to the background. Experiments have verified that the process of quickly switching the full-screen view from the background to the foreground and back to the background does not have any adverse effects on the user's use of the first electronic device.

[0177] S402. Based on the initial position of the cursor and the displacement data transmitted by the mouse, determine the target position of the cursor on the first electronic device after it has been moved.

[0178] In this embodiment, the mouse can maintain dual-channel motion data transmission. That is, the mouse can maintain data transmission with the first electronic device system and data transmission with the mouse cross-screen switching service. When the user uses the mouse, the relative displacement of the mouse generated by the mouse movement can be sent to the system and the mouse cross-screen switching service through the two channels respectively. The relative displacement of the mouse can include the mouse's own movement distance and direction.

[0179] like Figure 6The diagram shown is a schematic representation of determining the target position of a moved cursor according to an embodiment of this application. The relative displacement of the mouse can be represented as (dx, dy). After the mouse 610 moves, it can send the (dx, dy) to the system and the mouse cross-screen switching service respectively through the maintained dual channels. The mouse cross-screen switching service can calculate the target position of the moved cursor 620 in the first electronic device 600 based on the initial position of the cursor 620 and (dx, dy) obtained in S401. That is, the mouse cross-screen switching service can be based on... Figure 6 Given the initial position of cursor 620 and (dx, dy), calculate the position of cursor 620. Figure 6 The target position on the screen of the first electronic device 600 shown.

[0180] In a practical implementation, the initial position of the cursor can be represented by the coordinates of the cursor's position on the screen of the first electronic device. Therefore, the target position of the cursor, calculated based on the initial position of the cursor and the relative displacement of the mouse, can also be represented by the coordinates of the corresponding position on the first electronic device.

[0181] S403. Based on the target position of the cursor on the first electronic device, determine the crossing point position on the second electronic device, and set the cursor at the crossing point.

[0182] In this embodiment, the operating system used by the second electronic device may be the same as or different from the operating system used by the first electronic device. For example, if the operating system used by the first electronic device is... The operating system used by the second electronic device can also be... The system; or, the operating system used by the second electronic device can also be another operating system, such as System or Mac system.

[0183] The target's coordinates can be used to determine its exact location on the screen of the first electronic device. For example, the first electronic device can determine whether the mouse cursor is currently located in the center or at the edge of the screen based on the target location. If the first electronic device determines that the cursor is currently at the edge of the screen based on the target location, then it can be assumed that mouse operation permissions need to be switched to the adjacent second electronic device.

[0184] To help users intuitively perceive the process of switching mouse operation permissions from the first electronic device to the second electronic device, when the mouse performs the operation of switching operation permissions from the first electronic device to the second electronic device, the second electronic device can set the cursor at the crossing point, which is the edge position on the screen of the second electronic device adjacent to the first electronic device.

[0185] In a practical implementation, the second electronic device can determine the location of the crossing point based on the target position of the cursor on the first electronic device. For example, the second electronic device can proportionally set the crossing point based on the target position of the cursor on the first electronic device; or, the crossing point can be fixed. Figure 7 The diagram illustrates a method for setting a cursor at a crossing point according to an embodiment of this application. When the operation permission of the mouse 730 is switched from the first electronic device 710 to the second electronic device 720, the second electronic device 720 can obtain specific information about the target position of the cursor 740 on the first electronic device 710. For example, the proportional position of the target position relative to the side edge of the screen of the first electronic device 710. The second electronic device 720 can determine a point on the screen as the crossing point according to the same proportion. Alternatively, the second electronic device 720 can also set a fixed point on the side edge of the screen as the crossing point. For example, the center point of the side edge of the screen of the second electronic device 720 can be used as the crossing point. After determining the crossing point, the second electronic device 720 can set the cursor 740 at that crossing point.

[0186] In specific implementations, such as Figure 7 As shown, the mouse cross-screen switching service in the second electronic device 720 can first obtain the current position of the cursor 740 on the screen of the second electronic device 720. This position can be a fixed position set after the mouse is connected to the second electronic device 720. Then, the mouse cross-screen switching service can calculate the displacement (dx, dy) required for the cursor 740 to move from the current position to the crossing point based on the obtained coordinates of the current position and the coordinates of the crossing point, and notify the mouse 730 of the displacement information (dx, dy). After receiving the displacement information (dx, dy) sent by the cross-screen switching service, the mouse 730 can send the displacement information (dx, dy) to the system of the second electronic device 720, and the system will set the cursor 740 to the crossing point. In this way, when the operation permission of the mouse 730 is changed from... Figure 7 When the first electronic device 710 switches to the second electronic device 720, the second electronic device 720 can set the cursor 740 after the switch of operation permissions at the edge of the screen, so as to intuitively show the user the process of the mouse operation permissions crossing the screen.

[0187] Based on the above description, the mouse operation method provided in this application embodiment can switch mouse operation permissions between multiple electronic devices through edge detection and cross-point setting. Below, we will use... system Equipment and use of non Taking other devices in the system as an example, and combining specific examples, the operation permissions for the mouse are as follows: The handover process between this device and other devices is described. Among these, the other devices use non- The system can be System or Mac system.

[0188] (a) Mouse operation permissions are granted by Switching between devices across screens

[0189] like Figure 8 The diagram shown is a schematic representation of a mouse operation flow according to an embodiment of this application. The diagram illustrates the mouse operation permissions granted by... The specific process of switching between devices across screens.

[0190] exist Figure 8 In the illustrated process, the mouse should first be paired and connected to both devices, and both devices should have the mouse cross-screen switching service pre-installed. Initially, the mouse focus is on... On the equipment.

[0191] (1) Enable mouse cross-screen switching function

[0192] Specifically, users can... The device enables cross-screen switching of mouse operation permissions. (This is because the mouse is simultaneously on screen with...) When a device is paired and connected with other devices, enabling the cross-screen switching function for mouse operation permissions indicates that mouse operation permissions are... Figure 8 shown The ability to switch between devices across screens is enabled.

[0193] (2) Obtain the initial position of the cursor by switching views.

[0194] After the cross-screen switching function for mouse operation permissions is enabled... The mouse-over-screen switching service on the device can generate a full-screen transparent view in the background. This service can quickly bring the background view to the foreground, recording the initial cursor coordinates. Then, it brings the view back to the background and maintains it there.

[0195] (3) User moves mouse

[0196] Users can use the mouse normally. During this process, the mouse will move. The mouse can record the relative displacement caused by the movement; this relative displacement is the distance the mouse travels from its previous stationary position to its current stationary position. When the mouse moves, The cursor on the device will also move accordingly.

[0197] (4) Send mouse relative displacement

[0198] The mouse can maintain dual-channel movement data transmission, sending data to... The device system and the mouse cross-screen switching service send the aforementioned relative mouse displacement data. Specifically, after acquiring the relative mouse displacement, the mouse can send the relative mouse displacement to the device system via the Bluetooth Human Interface Device (HID) channel; simultaneously, the mouse can also send the relative mouse displacement to... via a private channel. The mouse cross-screen switching service in the device sends the aforementioned relative mouse displacement.

[0199] (5) Predict the target position of the cursor and determine whether it is located at the edge of the screen.

[0200] After receiving the relative mouse displacement data, the mouse cross-screen switching service in the device can calculate the target position of the cursor, which is the coordinate of the current position of the cursor after movement, using the coordinates of the initial position obtained in step (2). The mouse cross-screen switching service can determine whether the current position of the cursor is within... The cursor is determined by the edge of the device's screen. If the cursor's current position is determined to be... If the cursor reaches the edge of the device's screen, proceed to step (6); otherwise, continue with step (5) until the cursor reaches the edge. The device's screen edge or the user's mouse operation permissions can be switched across screens.

[0201] (6) Switch mouse operation permissions to other devices

[0202] There are two ways to switch mouse operation permissions across screens. Specifically, if the mouse is a multi-connected mouse, The device's in-device mouse cross-screen switching service allows users to directly switch operation permissions to other devices adjacent to the screen edge using the mouse; if a software implementation is adopted, then... The mouse cross-screen switching service in one device can notify the mouse cross-screen switching service in other adjacent devices to register a virtual mouse device on the other devices, thereby forwarding mouse movement data to the other devices and completing the switching of operation permissions.

[0203] (7) Complete cross-screen switching of mouse operation permissions.

[0204] For multi-connected mice, the mouse can switch the pointer to other adjacent devices, thus enabling cross-screen switching of mouse operation permissions to other adjacent devices.

[0205] because Operating systems like this can only obtain the cursor position within a specific view and cannot perceive or set the global cursor position. This application's embodiment maintains a full-screen view in the background of an electronic device using such an operating system. When needed, the full-screen view can be switched to the foreground of the electronic device, thereby obtaining the initial cursor position across the entire screen. Then, the target position after each cursor movement can be determined based on the relative displacement of the mouse. By determining whether the target position is located at the edge of the electronic device's screen, cross-screen switching of mouse operation permissions can be achieved.

[0206] (ii) Mouse operation permissions are switched across screens from other devices to [the desired device]. equipment

[0207] like Figure 9 The diagram shown is a schematic of another mouse operation process provided in an embodiment of this application, illustrating how mouse operation permissions are switched across screens from other devices to the user. The specific process of the equipment.

[0208] exist Figure 9 In the illustrated process, the mouse should first be paired and connected to both devices. Both devices should have the mouse cross-screen switching service pre-installed and enabled. Initially, the mouse focus is on the other device.

[0209] (1) The cursor reaches the edge of the screen.

[0210] Initially, the mouse focus is on another device. When the user operates the mouse on another device, the mouse cross-screen switching service installed on that device can determine whether the cursor has been moved to the edge of the other device's screen. If the mouse cross-screen switching service determines that the cursor has reached the screen edge, it can calculate the mouse cross-screen switch to... When the equipment is in place, the crossing point is The exact location of the edge of the device screen.

[0211] If the mouse is a multi-connected mouse, the mouse cross-screen switching service installed on other devices can directly notify the mouse to switch the operation permission to [the specified screen]. equipment.

[0212] (2) Send the coordinates of the crossing point

[0213] Specifically, if the mouse is a multi-connected mouse, it can notify the coordinates of the crossing point through a private channel. The mouse cross-screen switching service on the device; or, the mouse cross-screen switching service on other devices notifies the cross-screen coordinates of the crossing point. Mouse cross-screen switching service on the device.

[0214] (3) Obtain the current position of the cursor and calculate the relative displacement by switching views.

[0215] The mouse cross-screen switching service on the device can generate a full-screen transparent view in the background. Upon receiving the coordinates of the cross-screen mouse view, the mouse cross-screen switching service on the device can quickly switch the full-screen transparent view from the background to the foreground and record the coordinates of the current cursor position. Then, the mouse cross-screen switching service switches the full-screen transparent view back to the background and maintains the full-screen transparent view in the background.

[0216] The mouse cross-screen switching service on the device can calculate the relative displacement between the crossing point and the current position of the cursor based on the coordinates of the current position of the cursor and the coordinates of the crossing point obtained in step (2).

[0217] (4) Send relative displacement to the mouse

[0218] Specifically, The mouse cross-screen switching service on the device can send the relative displacement calculated in step (3) to the mouse through a private channel.

[0219] (5) Mouse movement The system sends relative displacement and sets the cursor at the crossing point.

[0220] Specifically, the mouse can transmit signals through the HID channel. The system sends relative displacement. After receiving the relative displacement sent by the mouse, the system can move the cursor accordingly, thereby moving the cursor to the crossing point and setting the cursor at the crossing point, intuitively demonstrating the effect of switching mouse operation permissions across screens.

[0221] In this embodiment of the application, by installing a mouse cross-screen switching service in various electronic devices, mouse operation permissions can be switched across screens between electronic devices using any operating system without modifying the operating system that does not provide a system-level API.

[0222] Based on the foregoing introduction, such as Figure 10 The diagram shows a step flow chart of a mouse operation method provided in an embodiment of this application. Figure 10 This application describes a mouse operation method provided in the embodiments of the first electronic device. The method may specifically include the following steps:

[0223] S1001. Based on the full-screen view maintained in the background, obtain the first position of the mouse cursor on the first screen of the first electronic device, wherein the first electronic device is equipped with a mouse cross-screen switching service.

[0224] In this embodiment, the first electronic device is equipped with a mouse cross-screen switching service, and the full-screen view maintained in the background of the first electronic device can refer to the full-screen view in the aforementioned embodiments. The full-screen view or full-screen transparent view maintained in the background of the device, the first screen may refer to the screen of the first electronic device in the aforementioned embodiments.

[0225] The first position of the mouse cursor on the first screen that the first electronic device wants to obtain can refer to the initial position of the cursor on the screen of the first electronic device as described in the foregoing embodiments. Specifically, the first electronic device can obtain the cursor position in the full-screen view by switching the background-maintained full-screen view to the foreground. At this time, the cursor position in the full-screen view is the same as its first position on the first screen of the first electronic device. Then, the first electronic device can switch the full-screen view to the background.

[0226] S1002. After the mouse moves, determine the target position of the cursor on the first screen after synchronous movement.

[0227] Mouse movement refers to the movement of the mouse in response to user input. When the mouse moves, the cursor on the first electronic device also moves synchronously. The target position of the cursor on the first screen after the movement refers to the position of the cursor on the screen of the first electronic device after it has moved synchronously with the mouse.

[0228] In this embodiment, determining the target position of the cursor on the first screen after synchronous movement can be achieved by receiving the relative displacement of the mouse (i.e., the mouse's own movement distance and direction) transmitted by the mouse cross-screen switching service after the mouse has moved. Then, the mouse cross-screen switching service on the first electronic device can determine the target position of the cursor on the first screen of the first electronic device based on the first position and the received relative mouse displacement.

[0229] S1003. If the target position is located at the edge of the first screen, the operation permission of the mouse is switched to the second electronic device that has the mouse cross-screen switching service installed, and the cursor of the mouse after the switch is located at the second position at the edge of the second screen of the second electronic device.

[0230] In this embodiment of the application, when the cursor is moved to the edge of the screen of the first electronic device, it means that the user may need to switch the operation permission of the currently used mouse to another adjacent electronic device, such as a second electronic device that also has a mouse cross-screen switching service installed.

[0231] In one example, the first electronic device uses a first operating system that differs from the second electronic device uses a second operating system. The first or second operating system can be... System. For example, the first operating system can be The system, the second operating system can be non- system.

[0232] In this embodiment of the application, switching the operation permission of the mouse to the second electronic device can be achieved in two ways.

[0233] For multiple connected mice, the target location can be sent to the mouse via the mouse cross-screen switching service on the first electronic device, so as to notify the mouse to switch the operation permission to the adjacent second electronic device.

[0234] Alternatively, the target location can be sent to the mouse cross-screen switching service on the second electronic device via the mouse cross-screen switching service on the first electronic device, instructing the second electronic device to set the mouse cursor to a second position on the second screen based on a pre-established virtual mouse device. The second position on the second screen can be the location of the crossing point at the edge of the screen of the second electronic device as described in the foregoing embodiments.

[0235] like Figure 11 The diagram shows a flowchart illustrating another mouse operation method provided in an embodiment of this application. Figure 11 This application describes the mouse operation method provided in the embodiments of the present application from the perspective of the second electronic device. The method may specifically include the following steps:

[0236] S1101. When the mouse operation permission is switched from the first electronic device to the second electronic device, a second position is determined at the edge of the second screen of the second electronic device. Both the first electronic device and the second electronic device have a mouse cross-screen switching service installed.

[0237] In one example, the first electronic device uses a first operating system that differs from the second electronic device uses a second operating system. The first or second operating system can be... System. For example, the first operating system can be non-standard. The system, the second operating system can be system.

[0238] In this embodiment, the second position at the edge of the second screen of the second electronic device can be the position of the crossing point of the edge of the screen of the second electronic device as described in the foregoing embodiments. This second position can be determined by determining the target position of the mouse cursor at the edge of the first screen of the first electronic device, and then based on that target position.

[0239] In a specific implementation, for multiple connected mice, the target location information can be obtained by receiving the target location sent by the mouse through the mouse cross-screen switching service on the second electronic device; or, the target location information can be obtained by receiving the target location sent by the mouse cross-screen switching service on the first electronic device through the mouse cross-screen switching service on the second electronic device.

[0240] After the second electronic device obtains relevant information about the target position at the edge of the screen of the first electronic device, the second electronic device can determine a position at its own screen edge as the second position, which is the position of the crossing point.

[0241] S1102. Based on the full-screen view maintained in the background, obtain the current position of the mouse cursor on the second screen.

[0242] In this embodiment, the current position of the mouse cursor on the second screen refers to the position of the cursor on the second electronic device screen when the mouse is switched from the first electronic device to the second electronic device. The second electronic device can obtain the coordinates of the current position of the cursor on the second electronic device screen by switching a background full-screen view to the foreground.

[0243] Specifically, the second electronic device can bring a full-screen view that has been maintained in the background to the foreground and obtain the cursor position within the full-screen view. At this point, the cursor position in the full-screen view is the same as its current position on the second screen of the second electronic device. Then, the second electronic device can switch the full-screen view back to the background.

[0244] S1103. Determine the relative mouse displacement between the current position and the second position.

[0245] The relative displacement of the mouse between the current position and the second position can refer to the relative displacement between the current position of the cursor and the crossing point on the second electronic device, that is, the displacement required for the cursor to move from the current position to the crossing point.

[0246] S1104. The relative displacement of the mouse is sent to the mouse through the mouse cross-screen switching service, and the mouse forwards the relative displacement of the mouse to the operating system of the second electronic device so as to move the cursor of the mouse to the second position.

[0247] After calculating the displacement required for the cursor to move from its current position to the crossing point, the mouse cross-screen switching service on the second electronic device can send this displacement data to the mouse, which then transmits the displacement data to the operating system of the second electronic device via the HID channel. Upon receiving the mouse's displacement data, the system can move the mouse by the corresponding displacement, thereby setting the cursor at the crossing point.

[0248] like Figure 12 The diagram shows a flowchart illustrating the steps of another mouse operation method provided in an embodiment of this application. Figure 12 This description refers to the mouse operation method provided in the embodiments of this application from the perspective of the mouse itself. The method may specifically include the following steps:

[0249] S1201. A first channel and a second channel for data transmission are maintained between the mouse and the first electronic device, wherein the first electronic device is equipped with a mouse cross-screen switching service.

[0250] In this embodiment, the first electronic device can be the first electronic device described in the foregoing embodiments, which is equipped with a mouse cross-screen switching server. The functions of the first electronic device can be found in the descriptions of the foregoing embodiments, and will not be repeated here.

[0251] In this embodiment, the mouse can maintain dual-channel data transmission with the first electronic device, namely a first channel and a second channel. In one example, the first channel and the second channel can be a private channel and an HID channel between the mouse and the first electronic device in the foregoing embodiments.

[0252] S1202. After the mouse is moved, the relative mouse displacement is sent to the operating system of the first electronic device through the first channel, and the relative mouse displacement is sent to the mouse cross-screen switching service on the first electronic device through the second channel.

[0253] In this embodiment of the application, when a user operates the mouse on the first electronic device, the mouse will move under the user's operation. The mouse can record its relative displacement and send the relative displacement of the mouse to the operating system of the first electronic device and the mouse cross-screen switching service on the first electronic device through the first channel and the second channel, respectively.

[0254] The mouse cross-screen switching service on the first electronic device can determine whether the mouse cursor has been moved to the edge of the screen of the first electronic device based on the received relative mouse displacement. If the mouse cursor has been moved to the edge of the screen of the first electronic device, the mouse cross-screen switching service can notify the mouse to switch the operation permission to the second electronic device. That is, it notifies the mouse to connect to the second electronic device so that the user can use the mouse to operate on the second electronic device.

[0255] S1203. When an instruction to switch operation permissions is received from the mouse cross-screen switching service on the first electronic device, the operation permission is switched to the second electronic device, which has the mouse cross-screen switching service installed.

[0256] The specific process of switching the mouse's operation permissions to the second electronic device can be found in the descriptions of the foregoing embodiments, and will not be repeated here.

[0257] In this embodiment of the application, after the mouse switches the operation permission to the second electronic device, it can also make the mouse cursor position at the crossing point position on the screen of the second electronic device through data interaction between the operating system of the second electronic device and the mouse cross-screen switching service on the second electronic device.

[0258] Therefore, the mouse can maintain a third and a fourth channel for data transmission with the second electronic device. These third and fourth channels can be the private channel and HID channel maintained between the mouse and the second electronic device in the aforementioned embodiments. After the mouse switches its operation permission to the second electronic device, the mouse can receive the relative mouse displacement sent by the mouse cross-screen switching service on the second electronic device through the third channel. This relative displacement is the displacement of the mouse cursor from its current position to a second position on the second screen of the second electronic device, where the second position is the edge of the second screen.

[0259] In the specific implementation, the mouse can send information about the target position of its cursor at the edge of the first screen on the first electronic device to the mouse cross-screen switching service on the second electronic device via a third channel. The mouse cross-screen switching service on the second electronic device can then determine the location of the crossing point, i.e., the specific location of the second position, based on the received target position information. Then, the mouse cross-screen switching service can calculate the relative displacement from the current position to the second position based on the current and second positions of the mouse cursor on the second screen; this relative displacement is the mouse's relative displacement. The mouse can then receive the relative displacement returned by the mouse cross-screen switching service on the second electronic device for the target position via the third channel.

[0260] After receiving the relative displacement of the mouse, the mouse can send the relative displacement to the operating system of the second electronic device through the fourth channel maintained between the mouse and the operating system of the second electronic device, so as to set the mouse cursor to the second position, that is, the crossing point position.

[0261] This application embodiment can divide the first electronic device and the second electronic device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or one or more functions can be integrated into a single functional module. The integrated module can be implemented in hardware or as a software functional module. The module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0262] Corresponding to the above embodiments, refer to Figure 13 This diagram illustrates a structural block diagram of a mouse operating device provided in an embodiment of this application. This device can be applied to the first electronic device in the foregoing embodiments. Specifically, the device may include the following modules: an acquisition module 1301, a determination module 1302, and a switching module 1303, wherein:

[0263] The acquisition module 1301 is used to acquire the first position of the mouse cursor on the first screen of the first electronic device based on the full-screen view maintained in the background. The first electronic device has a mouse cross-screen switching service installed.

[0264] The determining module 1302 is used to determine the target position of the cursor on the first screen after the mouse moves synchronously;

[0265] The switching module 1303 is used to switch the operation permission of the mouse to a second electronic device that has the mouse cross-screen switching service installed if the target position is located at the edge of the first screen. After the switch, the cursor of the mouse is located at a second position at the edge of the second screen of the second electronic device.

[0266] In one possible implementation of this application embodiment, the acquisition module 1301 may be used to: switch the full-screen view to the foreground; acquire the cursor position of the cursor in the full-screen view, wherein the cursor position in the full-screen view is the same as the first position of the cursor on the first screen; and switch the full-screen view to the background.

[0267] In one possible implementation of this application, the determining module 1302 may be specifically used to: after the mouse moves, receive the relative displacement of the mouse transmitted by the mouse, wherein the relative displacement of the mouse is the moving distance and moving direction of the mouse itself; and determine the target position of the cursor on the first screen based on the first position and the relative displacement of the mouse.

[0268] In one possible implementation of this application embodiment, the switching module 1303 may be used to: send the target location to the mouse through the mouse cross-screen switching service, so as to notify the mouse to switch the operation permission to the adjacent second electronic device.

[0269] In another possible implementation of this application embodiment, the switching module 1303 can also be used to: send the target position to the second electronic device through the mouse cross-screen switching service, so as to instruct the second electronic device to set the cursor of the mouse on the second screen at the second position based on a pre-established virtual mouse device.

[0270] In this embodiment, the first operating system used by the first electronic device is different from the second operating system used by the second electronic device. Wherein, the first operating system or the second operating system is... system.

[0271] Reference Figure 14 This diagram illustrates a structural block diagram of another mouse operating device provided in an embodiment of this application. This device can be applied to the second electronic device in the foregoing embodiments. Specifically, the device may include the following modules: a position determination module 1401, a position acquisition module 1402, a relative displacement determination module 1403, and a mouse switching module 1404, wherein:

[0272] The position determination module 1401 is used to determine the second position at the edge of the second screen of the second electronic device when the mouse operation permission is switched from the first electronic device to the second electronic device. Both the first electronic device and the second electronic device have a mouse cross-screen switching service installed.

[0273] The position acquisition module 1402 is used to acquire the current position of the mouse cursor on the second screen based on the full-screen view maintained in the background;

[0274] The relative displacement determination module 1403 is used to determine the relative displacement of the mouse between the current position and the second position;

[0275] The mouse switching module 1404 is used to send the relative displacement of the mouse to the mouse through the mouse cross-screen switching service, so as to move the cursor of the mouse to the second position.

[0276] In one possible implementation of this application embodiment, the position determination module 1401 may be used to: determine the target position of the cursor of the mouse at the edge of the first screen of the first electronic device; and determine the second position at the edge of the second screen based on the target position.

[0277] In another possible implementation of this application embodiment, the location determination module 1401 can also be used to: receive the target location sent by the mouse through the mouse cross-screen switching service; or, receive the target location sent by the first electronic device through the mouse cross-screen switching service.

[0278] In one possible implementation of this application embodiment, the position acquisition module 1402 may be used to: switch the full-screen view to the foreground; acquire the cursor position of the cursor in the full-screen view, wherein the cursor position in the full-screen view is the same as the current position of the cursor on the second screen; and switch the full-screen view to the background.

[0279] In this embodiment, the first operating system used by the first electronic device is different from the second operating system used by the second electronic device. Wherein, the first operating system or the second operating system is... system.

[0280] Reference Figure 15 This diagram illustrates a structural block diagram of another mouse operating device provided in an embodiment of this application. This device can be applied to the mice in the foregoing embodiments. Specifically, the device may include the following modules: a sustaining module 1501, a sending module 1502, and a switching module 1503, wherein:

[0281] The maintenance module 1501 is used to maintain a first channel and a second channel for data transmission between the mouse and the first electronic device, wherein the first electronic device is equipped with a mouse cross-screen switching service.

[0282] The sending module 1502 is used to send the relative mouse displacement to the operating system of the first electronic device through the first channel after the mouse is moved, and to send the relative mouse displacement to the mouse cross-screen switching service on the first electronic device through the second channel.

[0283] The switching module 1503 is used to switch the operation permission to the second electronic device when it receives the instruction to switch operation permission sent by the mouse cross-screen switching service on the first electronic device, wherein the mouse cross-screen switching service is installed in the second electronic device.

[0284] In one possible implementation of this application embodiment, the maintaining module 1501 is further configured to: maintain a third channel and a fourth channel for data transmission between the mouse and the second electronic device;

[0285] The sending module 1502 is further configured to: receive the relative mouse displacement sent by the mouse cross-screen switching service on the second electronic device through the third channel, wherein the relative mouse displacement is the displacement of the mouse cursor from its current position to a second position on the second screen of the second electronic device, and the second position is the position at the edge of the second screen; and send the relative mouse displacement to the operating system of the second electronic device through the fourth channel to set the mouse cursor to the second position.

[0286] In one possible implementation of this application embodiment, the sending module 1502 can also be used to: send information about the target position of the mouse cursor at the edge of the first screen of the first electronic device to the mouse cross-screen switching service on the second electronic device through the third channel;

[0287] The device further includes a receiving module, which is configured to: receive, via the third channel, the relative mouse displacement returned by the mouse cross-screen switching service on the second electronic device for the target position.

[0288] All relevant content of each step involved in the foregoing method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0289] This application also provides an electronic device, which may be the first electronic device or the second electronic device in the foregoing embodiments. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the mouse operation method in the foregoing embodiments.

[0290] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the mouse operation methods in the various embodiments described above.

[0291] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the mouse operation methods in the various embodiments described above.

[0292] Finally, it should be noted that the above description is only a specific implementation of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the protection scope of this application.

Claims

1. A mouse operation method, characterized in that, Applied to a first electronic device, the method includes: Based on the full-screen view maintained in the background, the first position of the mouse cursor on the first screen of the first electronic device is obtained, and the first electronic device has a mouse cross-screen switching service installed. After the mouse is moved, the target position of the cursor on the first screen after synchronous movement is determined; If the target location is located at the edge of the first screen, the operation permission of the mouse is switched to the second electronic device that has the mouse cross-screen switching service installed, and the cursor of the mouse after the switch is located at the second position at the edge of the second screen of the second electronic device.

2. The method according to claim 1, characterized in that, The method of obtaining the first position of the mouse cursor on the first screen of the first electronic device based on the background-maintained full-screen view includes: Switch the full-screen view to the foreground; The cursor position in the full-screen view is obtained, and the cursor position in the full-screen view is the same as the first position of the cursor on the first screen; Switch the full-screen view to the background.

3. The method according to claim 1 or 2, characterized in that, The step of determining the target position of the cursor on the first screen after the mouse movement includes: After the mouse moves, the relative displacement of the mouse transmitted by the mouse is received, wherein the relative displacement of the mouse is the moving distance and moving direction of the mouse itself; The target position of the cursor on the first screen is determined based on the first position and the relative displacement of the mouse.

4. The method according to any one of claims 1-3, characterized in that, The step of switching the operation permissions of the mouse to a second electronic device that has the mouse cross-screen switching service installed includes: The target location is sent to the mouse via the mouse cross-screen switching service on the first electronic device, so as to notify the mouse to switch the operation permission to the adjacent second electronic device.

5. The method according to any one of claims 1-3, characterized in that, The step of switching the operation permissions of the mouse to a second electronic device that has the mouse cross-screen switching service installed includes: The target position is sent to the second electronic device via the mouse cross-screen switching service on the first electronic device, so as to instruct the second electronic device to set the cursor of the mouse to the second position on the second screen based on a pre-established virtual mouse device.

6. A mouse operation method, characterized in that, Applied to a second electronic device, the method includes: When the mouse operation permission is switched from the first electronic device to the second electronic device, the second position at the edge of the second screen of the second electronic device is determined. Both the first electronic device and the second electronic device have a mouse cross-screen switching service installed. Based on the full-screen view maintained in the background, obtain the current position of the mouse cursor on the second screen; Determine the relative mouse displacement between the current position and the second position; The relative mouse displacement is sent to the mouse via the mouse cross-screen switching service, and the mouse forwards the relative mouse displacement to the operating system of the second electronic device to move the cursor of the mouse to the second position.

7. The method according to claim 6, characterized in that, Determining the second position at the edge of the second screen of the second electronic device includes: The cursor of the mouse is sensed to be at the target position at the edge of the first screen of the first electronic device; Based on the target location, determine the second position at the edge of the second screen.

8. The method according to claim 7, characterized in that, The sensing of the target position of the mouse cursor at the edge of the first screen of the first electronic device includes: The target location information sent by the mouse is received via the mouse cross-screen switching service on the second electronic device; or... The target location is received by the mouse cross-screen switching service on the first electronic device through the mouse cross-screen switching service on the second electronic device.

9. The method according to any one of claims 6-8, characterized in that, The method of obtaining the current position of the mouse cursor on the second screen based on the background-maintained full-screen view includes: Switch the full-screen view to the foreground; The cursor position in the full-screen view is obtained, and the cursor position in the full-screen view is the same as the current position of the cursor on the second screen; Switch the full-screen view to the background.

10. A mouse operation method, characterized in that, Applied to a mouse, the method includes: A first channel and a second channel for data transmission are maintained between the mouse and the first electronic device, wherein the first electronic device is equipped with a mouse cross-screen switching service. After the mouse is moved, the relative mouse displacement is sent to the operating system of the first electronic device through the first channel, and the relative mouse displacement is sent to the mouse cross-screen switching service on the first electronic device through the second channel. When an instruction to switch operation permissions is received from the mouse cross-screen switching service on the first electronic device, the operation permissions are switched to the second electronic device, which has the mouse cross-screen switching service installed.

11. The method according to claim 10, characterized in that, After switching the operation permission to the second electronic device, the method further includes: A third and a fourth channel for data transmission are maintained between the mouse and the second electronic device; The relative mouse displacement sent by the mouse cross-screen switching service on the second electronic device is received through the third channel. The relative mouse displacement is the displacement of the mouse cursor from its current position to a second position on the second screen of the second electronic device. The second position is the position at the edge of the second screen. The relative displacement of the mouse is sent to the operating system of the second electronic device through the fourth channel to set the cursor of the mouse to the second position.

12. The method according to claim 11, characterized in that, Receiving the relative mouse displacement sent by the mouse cross-screen switching service on the second electronic device through the third channel includes: The third channel is used to send information about the target position of the mouse cursor at the edge of the first screen of the first electronic device to the mouse cross-screen switching service on the second electronic device. The third channel receives the relative mouse displacement returned by the mouse cross-screen switching service on the second electronic device for the target position.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the mouse operation method as described in any one of claims 1-9.

14. A mouse, characterized in that, The mouse is used to implement the mouse operation method as described in any one of claims 10-12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the mouse operation method as described in any one of claims 1-9; or, when executed on a mouse, cause the mouse to perform the mouse operation method as described in any one of claims 10-12.

Citation Information

Patent Citations

  • State processing method, wireless mouse and multi-equipment wireless control system

    CN104598055A

  • Mouse pointer control method and device based on Android operating system

    CN104636158A