Mouse sharing method and device, storage medium and electronic equipment

By establishing a communication connection on the receiving end, determining the cache duration and receiving mouse operation information, the problem of lag in mouse device sharing is solved, and a smooth mouse operation experience is achieved.

CN119883016APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311396775.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, mouse device sharing is prone to lag or jitter, affecting the user experience.

Method used

By responding to the mouse sharing request instruction at the sending end, a communication connection is established, and the on-site cache duration is determined according to the target communication type, the mouse operation information is received within that time, and the target mouse operation event is generated after the on-site cache duration.

Benefits of technology

Eliminates the lag in mouse operation events, ensures the smoothness of shared mouse operation, and improves the experience of end users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883016A_ABST
    Figure CN119883016A_ABST
Patent Text Reader

Abstract

The invention relates to a mouse sharing method and device, a storage medium and electronic equipment, and the mouse sharing method comprises the steps: responding to a received mouse sharing request instruction sent by a sending end, building communication connection with the sending end, determining a target communication type of the communication connection, and according to the target communication type, carrying out the mouse sharing according to the target communication type. The method comprises the steps of determining a standby cache time length, receiving mouse operation information sent by a sending end at a transmission rate corresponding to a target communication type within the standby cache time length, and generating a target mouse operation event according to the mouse operation information after the standby cache time length. According to the embodiment of the invention, the mouse operation information sent by the sending end is received within the standby cache duration, so that the target mouse operation event is stably and orderly generated according to the mouse operation information after the cache duration, and the lagging of the mouse operation event is eliminated, thereby ensuring the fluency of shared mouse operation and being beneficial to improving the experience of a terminal user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to a mouse sharing method, device, storage medium and electronic device. Background Art

[0002] With the development of technology, there are more and more scenarios where multiple terminal devices are needed for work. If a job requires the operation of multiple terminal devices, it will undoubtedly increase the complexity of user operations and reduce user work efficiency. People can use one mouse to operate multiple terminal devices by sharing the mouse. However, the current sharing of mouse devices is mostly achieved through near-field communication, which is prone to freezes or jitters, which is not conducive to improving user experience. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a mouse sharing method, device, storage medium and electronic device.

[0004] According to a first aspect of an embodiment of the present disclosure, a mouse sharing method is provided, the method comprising:

[0005] In response to receiving a mouse sharing request instruction sent by a sending end, establishing a communication connection with the sending end;

[0006] determining a target communication type of the communication connection;

[0007] Determining a standby cache duration according to the target communication type;

[0008] receiving the mouse operation information sent by the sending end at a transmission rate corresponding to the target communication type within the inactive cache time length;

[0009] After the inactive buffer time period, a target mouse operation event is generated according to the mouse operation information.

[0010] Optionally, the mouse operation information includes: at least two mouse operation events and an operation timestamp of each of the mouse operation events, and generating a target mouse operation event according to the mouse operation information after the inactive cache time period includes:

[0011] Determine, according to the operation timestamp of each of the at least two mouse operation events, a target generation order of each mouse operation event and a target time interval between two adjacent mouse operation events;

[0012] After the inactive buffer time period, each target mouse operation event is generated according to the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events.

[0013] Optionally, determining the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events according to the operation timestamp of each mouse operation event in the at least two mouse operation events includes:

[0014] Obtain the time difference between the current time and the operation timestamp corresponding to each mouse operation event;

[0015] Determining the target generation order of the at least two mouse operation events according to the time difference;

[0016] The target time interval between two adjacent mouse operation events is acquired according to the target generation order.

[0017] Optionally, after the inactive cache time period, generating each target mouse operation event according to the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events includes:

[0018] After the inactive cache time period, determining the first mouse operation event to be generated according to the target generation order;

[0019] Acquire the target time interval between the first mouse operation event and a second mouse operation event, where the second mouse operation event is a mouse operation event after the first mouse operation event in the target generation sequence;

[0020] After the first mouse operation event is generated, timing is started, and when the timing duration is greater than or equal to the target time interval, the second mouse operation event is generated.

[0021] Optionally, determining the standby cache duration according to the target communication type includes:

[0022] Acquire preset correspondence data, where the preset correspondence data is used to characterize the correspondence between a plurality of different communication types and a plurality of preset cache durations;

[0023] Determining a target preset cache duration corresponding to the target communication type from the preset corresponding relationship data;

[0024] The target preset cache duration is used as the standby cache duration.

[0025] Optionally, before receiving the mouse operation information sent by the sending end at the transmission rate corresponding to the target communication type within the inactive cache time length, the method further includes:

[0026] A target buffer area is generated according to the target communication type.

[0027] Optionally, the method further comprises:

[0028] After receiving the mouse operation information sent by the sending end at the transmission rate corresponding to the target communication type within the inactive cache time length, the mouse operation information is cached in the target cache area.

[0029] According to a second aspect of an embodiment of the present disclosure, a mouse sharing device is provided, comprising:

[0030] a communication establishing module, configured to establish a communication connection with the sending end in response to receiving a mouse sharing request instruction sent by the sending end;

[0031] A first determination module is configured to determine a target communication type of the communication connection;

[0032] A second determination module is configured to determine a standby cache duration according to the target communication type;

[0033] A receiving module, configured to receive the mouse operation information sent by the sending end at a transmission rate corresponding to the target communication type within the inactive cache time length;

[0034] The first generating module is configured to generate a target mouse operation event according to the mouse operation information after the inactive cache time period.

[0035] Optionally, the first generating module is configured to:

[0036] Determine, according to the operation timestamp of each of the at least two mouse operation events, a target generation order of each mouse operation event and a target time interval between two adjacent mouse operation events;

[0037] After the inactive buffer time period, each target mouse operation event is generated according to the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events.

[0038] Optionally, the first generating module is configured to:

[0039] Obtain the time difference between the current time and the operation timestamp corresponding to each mouse operation event;

[0040] Determining the target generation order of the at least two mouse operation events according to the time difference;

[0041] The target time interval between two adjacent mouse operation events is acquired according to the target generation order.

[0042] Optionally, the first generating module is configured to:

[0043] After the inactive cache time period, determining the first mouse operation event to be generated according to the target generation order;

[0044] Acquire the target time interval between the first mouse operation event and a second mouse operation event, where the second mouse operation event is a mouse operation event after the first mouse operation event in the target generation sequence;

[0045] After the first mouse operation event is generated, timing is started, and when the timing duration is greater than or equal to the target time interval, the second mouse operation event is generated.

[0046] Optionally, the second determining module is configured to:

[0047] Acquire preset correspondence data, where the preset correspondence data is used to characterize the correspondence between a plurality of different communication types and a plurality of preset cache durations;

[0048] Determining a target preset cache duration corresponding to the target communication type from the preset corresponding relationship data;

[0049] The target preset cache duration is used as the standby cache duration.

[0050] Optionally, the device further comprises:

[0051] The second generating module is configured to generate a target buffer area according to the target communication type.

[0052] Optionally, the device further comprises:

[0053] The cache module is configured to cache the mouse operation information into the target cache area after receiving the mouse operation information sent by the sender at a transmission rate corresponding to the target communication type within the inactive cache time period.

[0054] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the mouse sharing method provided in the first aspect of the present disclosure are implemented.

[0055] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0056] a memory having a computer program stored thereon;

[0057] A processor is used to execute the computer program in the memory to implement the steps of the mouse sharing method provided in the first aspect of the present disclosure.

[0058] Through the above scheme, in response to receiving a mouse sharing request instruction sent by the sender, a communication connection is established with the sender, the target communication type of the communication connection is determined, and the standby cache time length is determined according to the target communication type. The mouse operation information sent by the sender is received at a transmission rate corresponding to the target communication type within the standby cache time length. After the standby cache time length, a target mouse operation event is generated according to the mouse operation information. In this way, by receiving the mouse operation information sent by the sender within the standby cache time length, the target mouse operation event can be generated stably and orderly according to the mouse operation information after the cache time length, thereby eliminating the jamming of the mouse operation event, thereby ensuring the smoothness of the shared mouse operation, which is beneficial to improving the experience of the terminal user.

[0059] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0061] Figure 1 is a flow chart of a mouse sharing method according to an exemplary embodiment;

[0062] Figure 2 is based on Figure 1 A flowchart of a mouse sharing method shown in the illustrated embodiment;

[0063] Figure 3 is based on Figure 1 A flowchart of another mouse sharing method shown in the illustrated embodiment;

[0064] Figure 4 is based on Figure 1 A flowchart of another mouse sharing method shown in the illustrated embodiment;

[0065] Figure 5 is a flow chart of another mouse sharing method according to an exemplary embodiment;

[0066] Figure 6 is a block diagram of a mouse sharing device according to an exemplary embodiment;

[0067] Figure 7 is based on Figure 6 Another block diagram of a mouse sharing device shown in the illustrated embodiment;

[0068] Figure 8 is a block diagram of a device for a mouse sharing method according to an exemplary embodiment;

[0069] Fig. 9 The invention is a block diagram showing a device for a mouse sharing method according to an exemplary embodiment. DETAILED DESCRIPTION

[0070] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0071] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0072] Before introducing the specific implementation methods of the present disclosure in detail, the application scenarios of the present disclosure are first described as follows. The present disclosure can be applied to multiple operating systems to realize the operation of different devices by sharing a mouse. The multiple operating systems can be the same operating system, for example, Widows system and Widows system, Android system and Android system, etc., or different operating systems, for example, Widows system and Android system, Android system and IOS system, Unix system and Android system, etc. In the prior art, the local device obtains mouse information and converts it into standard HID (Human Interface Device) protocol information, which is transmitted to the opposite end through an established channel. The opposite end device receives the HID protocol information and generates a mouse operation event through the mouse information in the HID protocol information. However, when receiving the mouse information, the opposite end device is easily affected by factors such as the network environment, and the mouse operation shows freezes or jitters on the opposite end device, resulting in discontinuous generation of mouse operation events, which is not conducive to improving the user experience.

[0073] In order to solve the above technical problems, the present disclosure provides a mouse sharing method, device, storage medium and electronic device. The mouse sharing method establishes a communication connection with the sending end in response to receiving a mouse sharing request instruction sent by the sending end, determines the target communication type of the communication connection, determines the standby cache time length according to the target communication type, receives the mouse operation information sent by the sending end at a transmission rate corresponding to the target communication type within the standby cache time length, and generates a target mouse operation event according to the mouse operation information after the standby cache time length. In this way, by receiving the mouse operation information sent by the sending end within the standby cache time length, the target mouse operation event can be generated stably and orderly according to the mouse operation information after the cache time length, thereby eliminating the jamming of the mouse operation event, thereby ensuring the smoothness of the shared mouse operation, which is beneficial to improving the experience of the terminal user.

[0074] Figure 1 is a flowchart of a mouse sharing method according to an exemplary embodiment. Figure 1 As shown, the mouse sharing method may include the following steps:

[0075] In step 101, in response to receiving a mouse sharing request instruction sent by a sending end, a communication connection is established with the sending end.

[0076] The mouse sharing method can be applied to the receiving end, the sending end and the receiving end can be a PC (Personal Computer) or a tablet computer, or other electronic devices that can use a mouse to operate the interactive interface, and the operating systems of the sending end and the receiving end can be the same or different. For example, in one embodiment, the operating systems of the sending end and the receiving end can be Widows system, IOS system or Android system, etc. In another embodiment, the operating system of the sending end is Widows system, and the operating system of the receiving end can be Android system, IOS system or Unix system, etc. The communication connection can be a Bluetooth connection, a local area network connection, an NFC (Near Field Communication, short-range wireless communication technology) connection, or other connection methods in the prior art that can transmit information between multiple electronic devices.

[0077] For example, the sending end can obtain the device name of the receiving end through Bluetooth search, send a mouse sharing request instruction to the receiving end, and the receiving end establishes a Bluetooth communication connection with the sending end in response to receiving the mouse sharing request instruction sent by the sending end. It should be noted that in this step, the specific implementation method of establishing a communication connection can refer to the process of establishing a communication connection in the prior art. There are many related implementation methods in the prior art, and this disclosure does not limit this.

[0078] In step 102, a target communication type of the communication connection is determined.

[0079] The target communication type may be Bluetooth, Wi-Fi, local area network, NFC or Zigbee.

[0080] In step 103, the standby buffer duration is determined according to the target communication type.

[0081] Among them, the standby cache time length can be understood as the cache time length within a pre-set cache cycle. Different communication types can pre-set different or the same cache time lengths. The receiving end can determine the standby cache time length based on the communication type of the communication connection currently established with the sending end.

[0082] It should be noted that a plurality of correspondences between communication types and cache durations may be preset, and when the target communication type is determined, the standby cache duration corresponding to the target communication type is determined. For example, the standby cache duration corresponding to Bluetooth in the preset correspondence is 0.5s, and when it is determined that the target communication type of the current communication connection is Bluetooth, the standby cache duration may be determined to be 0.5s.

[0083] In step 104, the mouse operation information sent by the sending end is received at a transmission rate corresponding to the target communication type within the inactive buffer time length.

[0084] The mouse operation information may include a mouse operation event and an operation timestamp corresponding to the mouse operation event. The mouse operation event may be an operation such as clicking the mouse, moving the mouse, or sliding the mouse wheel, for example, clicking the right button of the mouse, double-clicking the right button of the mouse, or rolling the mouse wheel. The operation timestamp may be the time point corresponding to when the sender sends the mouse operation event to the receiver, for example, the time point corresponding to the right button click sent by the sender to the receiver is 10:30:32, and 10:30:32 is used as the operation timestamp corresponding to this mouse operation event (i.e., clicking the right button of the mouse). The transmission rate may be obtained by obtaining preset specified relationship data, which may include: a correspondence between multiple different communication types and multiple transmission rates, and determining the transmission rate corresponding to the target communication type from the preset specified relationship data.

[0085] For example, if the target communication type is Bluetooth, it can be determined that the corresponding transmission rate of Bluetooth is 3Mb / s, and the standby cache time is 0.5s. The sender sends mouse operation information to the receiver via Bluetooth connection. Within 0.5s, the receiver continuously receives the mouse operation information sent by the sender at the transmission rate of 3Mb / s corresponding to Bluetooth, and caches the received mouse operation information.

[0086] In step 105, after the inactive buffer time, a target mouse operation event is generated according to the mouse operation information.

[0087] For example, still taking the example shown in step 104 as an example, after the idle cache time, that is, after 0.5s, the receiving end suspends receiving mouse operation information, and sorts the mouse operation events corresponding to the multiple mouse operation information received via Bluetooth according to the operation timestamp corresponding to each mouse operation event, sorts the generation order of each mouse operation event, and determines the time interval between two adjacent mouse operation events, generates target mouse operation events according to the generation order and time interval, and the receiving end executes the target mouse operation events in a stable and orderly manner.

[0088] The above technical solution can receive the mouse operation information sent by the sender within the standby cache period, so that after the cache period, the target mouse operation events can be generated stably and orderly according to the mouse operation information, eliminating the lag of the mouse operation events, thereby ensuring the smoothness of the shared mouse operation, which is conducive to improving the experience of terminal users.

[0089] Figure 2 is based on Figure 1 The embodiment shown is a flowchart of a mouse sharing method, such as Figure 2 As shown, Figure 1 Step 103 may include the following steps:

[0090] In step 1031, preset correspondence data is obtained, where the preset correspondence data is used to characterize the correspondence between a plurality of different communication types and a plurality of preset cache durations.

[0091] The correspondence between the multiple different communication types and the multiple preset cache durations in the preset correspondence relationship data may be a one-to-one correspondence.

[0092] For example, as shown in Table 1, the correspondence between the multiple different communication types and the multiple preset cache durations in the preset correspondence data may include the following correspondence as shown in the table:

[0093] Communication Type Preset cache duration Bluetooth 0.5s WIFI 0.1s Zigbee 0.5s NFC 0.2s

[0094] Table 1

[0095] In step 1032, a target preset cache duration corresponding to the target communication type is determined from the preset corresponding relationship data.

[0096] For example, as shown in Table 1 above, if the target communication type is determined to be Bluetooth, the target preset cache time corresponding to the target communication type can be determined to be 0.5s; if the target communication type is determined to be WIFI, the target preset cache time corresponding to the target communication type can be determined to be 0.1s; if the target communication type is determined to be Zigbee, the target preset cache time corresponding to the target communication type can be determined to be 0.5s; if the target communication type is determined to be NFC, the target preset cache time corresponding to the target communication type can be determined to be 0.2s.

[0097] In step 1033, the target preset cache duration is used as the standby cache duration.

[0098] For example, if the target communication type is determined to be Bluetooth, the target preset cache time of 0.5s corresponding to Bluetooth can be used as the standby cache time; if the target communication type is determined to be WIFI, the target preset cache time of 0.1s corresponding to WIFI can be used as the standby cache time; if the target communication type is determined to be Zigbee, the target preset cache time of 0.5s corresponding to Zigbee can be used as the standby cache time; if the target communication type is determined to be NFC, the target preset cache time of 0.2s corresponding to NFC can be used as the standby cache time.

[0099] The above scheme determines the standby cache time length corresponding to the target communication type by presetting the corresponding relationship data, and can flexibly determine the standby cache time length according to different communication types, thereby improving the applicability of the mouse sharing method.

[0100] Figure 3 is based on Figure 1 The embodiment shown is a flowchart of another mouse sharing method, where the mouse operation information may include: at least two mouse operation events, and an operation timestamp for each mouse operation event, such as Figure 3 As shown, Figure 1 The step 105 shown may include the following steps:

[0101] In step 1051, a target generation order of each mouse operation event and a target time interval between two adjacent mouse operation events are determined according to the operation timestamp of each mouse operation event in at least two mouse operation events.

[0102] This step may be implemented by: obtaining the time difference between the current time and the operation timestamp corresponding to each mouse operation event; determining the target generation order of at least two mouse operation events according to the time difference; and obtaining the target time interval of two adjacent mouse operation events according to the target generation order.

[0103] In step 1052, after the inactive buffer time period, each target mouse operation event is generated according to the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events.

[0104] The implementation method of this step can be: after the inactive cache time period, determine the first mouse operation event to be generated according to the target generation order; obtain the target time interval between the first mouse operation event and the second mouse operation event, the second mouse operation event is the mouse operation event after the first mouse operation event in the target generation order; start timing after the first mouse operation event is generated, and generate the second mouse operation event when the timing duration is greater than or equal to the target time interval.

[0105] For example, the current time is 10:31:20, and the mouse operation events include right-clicking the mouse button, double-clicking the left mouse button, and rolling the mouse wheel backward. The operation timestamp corresponding to the right-clicking the mouse button is 10:30:20, the operation timestamp corresponding to the double-clicking the left mouse button is 10:30:22, and the operation timestamp corresponding to rolling the mouse wheel backward is 10:30:25. The time difference between the right-clicking the mouse button and the current time is 60s, the time difference between the double-clicking the left mouse button and the current time is 58s, and the time difference between rolling the mouse wheel backward and the current time is 55s, 60s>58s>55s. It can be determined that the target generation order is to first generate a single click of the right mouse button, then a double click of the left mouse button, and finally a backward scrolling of the mouse wheel. Through the operation timestamp corresponding to each mouse operation event, it can be determined that the time interval between a single click of the right mouse button and a double click of the left mouse button is 2s, and the time interval between a double click of the left mouse button and a backward scrolling of the mouse wheel is 3s. After the idle cache time, it can be determined that the first mouse operation event to be generated at present (i.e., 10:31:20) is a single click of the right mouse button, and the second mouse operation event to be generated at present (i.e., 10:31:20) is a double click of the left mouse button. After generating the mouse operation event of right-clicking the mouse, start timing for 2s (i.e., the time interval between right-clicking the mouse and double-clicking the left mouse button). The current time is 10:31:22. It can be determined that the first mouse operation event to be generated at present (i.e., 10:31:22) is double-clicking the left mouse button, and the second mouse operation event to be generated at present (i.e., 10:31:22) is rolling the mouse wheel backward. After generating the mouse operation event of double-clicking the left mouse button, start timing for 3s. Continue to generate mouse operation events according to the above steps until there is no second mouse operation event to be generated, and then end the above steps.

[0106] The above technical scheme, by determining the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events, can stably and orderly generate each target mouse operation event according to the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events, thereby eliminating the lag of mouse operation events, thereby ensuring the smoothness of shared mouse operations, and is conducive to improving the experience of terminal users.

[0107] Figure 4 is based on Figure 1 The embodiment shown is a flowchart of another mouse sharing method, as shown in FIG. Figure 4 As shown, the method may further include:

[0108] In step 106, a target buffer is generated according to the target communication type.

[0109] The target buffer area is used to buffer the mouse operation information received by the receiving end.

[0110] It should be noted that before generating the target cache area, the cache capacity of the target cache area can be obtained by multiplying the standby cache time by the transmission rate corresponding to the target communication type. The cache capacity is the maximum value of the number of mouse operation information sent by the sender that can be received at the transmission rate corresponding to the target communication type within the standby cache time. The receiving end generates the target cache area with this cache capacity.

[0111] For example, the standby cache time length can be 0.5s, the transmission rate corresponding to the target communication type is 1Mb / s, the product of the standby cache time length and the transmission rate corresponding to the target communication type is 1Mb, that is, the cache capacity of the target cache area is 1Mb, and the receiving end generates a target cache area with a cache capacity of 1Mb.

[0112] In step 107, after receiving the mouse operation information sent by the sender at a transmission rate corresponding to the target communication type within the standby buffer time, the mouse operation information is buffered in the target buffer area.

[0113] It should be noted that after the receiving end generates the target buffer area, it receives the mouse operation information sent by the sending end at the transmission rate corresponding to the target communication type within the standby cache period, caches the received mouse operation information in the target buffer area, and after the standby cache period, generates a target mouse operation event with the mouse operation information in the target buffer area.

[0114] The above technical solution can receive the mouse operation information sent by the sender within the standby cache period, so that after the cache period, the target mouse operation events can be generated stably and orderly according to the mouse operation information, eliminating the lag of the mouse operation events, thereby ensuring the smoothness of the shared mouse operation, which is conducive to improving the experience of terminal users.

[0115] Figure 5 is a flowchart of another mouse sharing method according to an exemplary embodiment. Figure 5 As shown, the mouse sharing method may further include the following steps:

[0116] In step 501, in response to receiving a mouse sharing request instruction sent by a sending end, a communication connection is established with the sending end.

[0117] The transmitting end and the receiving end may be a PC, a tablet computer, or other electronic devices that can use a mouse to operate the interactive interface. The operating systems of the transmitting end and the receiving end may be the same, for example, the operating systems of the transmitting end and the receiving end may be Widows, IOS, or Android, etc., or they may be different, for example, the operating system of the transmitting end is Widows, and the operating system of the receiving end may be Android, IOS, or Unix. The communication connection may be a Bluetooth connection, a local area network connection, an NFC (Near Field Communication) connection, or other connection methods in the prior art that can transmit information between multiple electronic devices.

[0118] In step 502, a target communication type of the communication connection is determined.

[0119] The target communication type may be Bluetooth, WIFI, LAN, NFC or Zigbee.

[0120] In step 503, the standby buffer duration is determined according to the target communication type.

[0121] Among them, the standby cache time length can be understood as the cache time length within a pre-set cache cycle. Different communication types can pre-set different or the same cache time lengths. The receiving end can determine the standby cache time length based on the communication type of the communication connection currently established with the sending end.

[0122] It should be noted that a plurality of correspondences between communication types and cache durations may be preset, and when the target communication type is determined, the standby cache duration corresponding to the target communication type is determined. For example, the standby cache duration corresponding to Bluetooth in the preset correspondence is 0.5s, and when it is determined that the target communication type of the current communication connection is Bluetooth, the standby cache duration may be determined to be 0.5s.

[0123] The implementation of this step may include: obtaining preset correspondence data, the preset correspondence data is used to characterize the correspondence between multiple different communication types and multiple preset cache durations. The correspondence between multiple different communication types and multiple preset cache durations in the preset correspondence data may be a one-to-one correspondence. Determine the target preset cache duration corresponding to the target communication type from the preset correspondence data. Use the target preset cache duration as the standby cache duration.

[0124] In step 504, a target buffer is generated according to the target communication type.

[0125] The target buffer area is used to buffer the mouse operation information received by the receiving end.

[0126] It should be noted that before generating the target cache area, the cache capacity of the target cache area can be obtained by multiplying the standby cache time by the transmission rate corresponding to the target communication type. The cache capacity is the maximum value of the number of mouse operation information sent by the sender that can be received at the transmission rate corresponding to the target communication type within the standby cache time. The receiving end generates the target cache area with this cache capacity.

[0127] In step 505, the mouse operation information sent by the sending end is received at a transmission rate corresponding to the target communication type within the inactive buffer time length.

[0128] The mouse operation information may include a mouse operation event and an operation timestamp corresponding to the mouse operation event. The mouse operation event may be an operation such as clicking a mouse, moving a mouse, or sliding a mouse wheel. The operation timestamp may be a time point corresponding to when the sending end sends the mouse operation event to the receiving end.

[0129] In step 506, the mouse operation information is cached in the target cache area.

[0130] It should be noted that after the receiving end generates the target buffer area, it receives the mouse operation information sent by the sending end at the transmission rate corresponding to the target communication type within the standby cache period, caches the received mouse operation information in the target buffer area, and after the standby cache period, generates a target mouse operation event with the mouse operation information in the target buffer area.

[0131] In step 507, after the inactive buffer time, a target mouse operation event is generated according to the mouse operation information.

[0132] The mouse operation information may include: at least two mouse operation events, and an operation timestamp of each mouse operation event.

[0133] This step may include the following steps:

[0134] According to the operation timestamp of each mouse operation event in at least two mouse operation events, a target generation order of each mouse operation event and a target time interval of two adjacent mouse operation events are determined; after the standby cache period, each target mouse operation event is generated according to the target generation order of each mouse operation event and the target time interval of two adjacent mouse operation events.

[0135] The specific implementation of the above steps may be: obtaining the time difference between the current time and the operation timestamp corresponding to each mouse operation event; determining the target generation order of at least two mouse operation events according to the time difference; obtaining the target time interval of two adjacent mouse operation events according to the target generation order. After the inactive cache time, determining the first mouse operation event to be generated according to the target generation order; obtaining the target time interval between the first mouse operation event and the second mouse operation event, the second mouse operation event being the mouse operation event after the first mouse operation event in the target generation order; starting the timing after the first mouse operation event is generated, and generating the second mouse operation event when the timing time is greater than or equal to the target time interval.

[0136] The above technical solution can receive the mouse operation information sent by the sender within the standby cache period, so that after the cache period, the target mouse operation events can be generated stably and orderly according to the mouse operation information, eliminating the lag of the mouse operation events, thereby ensuring the smoothness of the shared mouse operation, which is conducive to improving the experience of terminal users.

[0137] Figure 6 is a block diagram of a mouse sharing device according to an exemplary embodiment. Figure 6 The device may include: a communication establishing module 601, a first determining module 602, a second determining module 603, a receiving module 604 and a first generating module 605.

[0138] The communication establishment module 601 is configured to establish a communication connection with the sending end in response to receiving a mouse sharing request instruction sent by the sending end; the first determination module 602 is configured to determine the target communication type of the communication connection; the second determination module 603 is configured to determine the standby cache time length according to the target communication type; the receiving module 604 is configured to receive the mouse operation information sent by the sending end at the transmission rate corresponding to the target communication type within the standby cache time length; the first generation module 605 is configured to generate a target mouse operation event according to the mouse operation information after the standby cache time length.

[0139] Optionally, the first generating module 605 is configured to:

[0140] According to the operation timestamp of each mouse operation event in at least two mouse operation events, a target generation order of each mouse operation event and a target time interval of two adjacent mouse operation events are determined; after the standby cache period, each target mouse operation event is generated according to the target generation order of each mouse operation event and the target time interval of two adjacent mouse operation events.

[0141] Optionally, the first generation module 605 is configured to: obtain the time difference between the current time and the operation timestamp corresponding to each mouse operation event; determine the target generation order of at least two mouse operation events according to the time difference; and obtain the target time interval between two adjacent mouse operation events according to the target generation order.

[0142] Optionally, the first generation module 605 is configured to: determine the first mouse operation event to be generated according to the target generation order after the inactive cache period; obtain the target time interval between the first mouse operation event and the second mouse operation event, the second mouse operation event being the mouse operation event after the first mouse operation event in the target generation order; start timing after the first mouse operation event is generated, and generate a second mouse operation event when the timing duration is greater than or equal to the target time interval.

[0143] Optionally, the second determination module 603 is configured to: obtain preset correspondence data, the preset correspondence data is used to characterize the correspondence between multiple different communication types and multiple preset cache durations; determine the target preset cache duration corresponding to the target communication type from the preset correspondence data; and use the target preset cache duration as the standby cache duration.

[0144] Figure 7 is based on Figure 6 Another mouse sharing device block diagram of the embodiment shown. Figure 7 The device may further include: a second generation module 606, configured to generate a target buffer area according to the target communication type. A cache module 607, configured to cache the mouse operation information in the target buffer area after receiving the mouse operation information sent by the sender at a transmission rate corresponding to the target communication type within the standby cache time.

[0145] The above technical solution can receive the mouse operation information sent by the sender within the standby cache period, so that after the cache period, the target mouse operation events can be generated stably and orderly according to the mouse operation information, eliminating the lag of the mouse operation events, thereby ensuring the smoothness of the shared mouse operation, which is conducive to improving the experience of terminal users.

[0146] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0147] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and when the program instructions are executed by a processor, the present disclosure provides Figures 1 to 5 The steps of the mouse sharing method.

[0148] Figure 8 800 is a block diagram of a device for a mouse sharing method according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0149] Reference Figure 8 , the device 800 may include one or more of the following components: a first processing component 802 , a first memory 804 , a first power supply component 806 , a multimedia component 808 , an audio component 810 , a first input / output interface 812 , a sensor component 814 , and a communication component 816 .

[0150] The first processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The first processing component 802 may include one or more first processors 820 to execute instructions to complete all or part of the steps of the above-mentioned mouse sharing method. In addition, the first processing component 802 may include one or more modules to facilitate the interaction between the first processing component 802 and other components. For example, the first processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the first processing component 802.

[0151] The first memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The first memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0152] The first power supply component 806 provides power to various components of the device 800. The power supply component 806 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0153] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0154] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the first memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0155] The first input / output interface 812 provides an interface between the first processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0156] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0157] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0158] In an exemplary embodiment, the device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned mouse sharing method.

[0159] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a first memory 804 including instructions, and the instructions can be executed by the first processor 820 of the device 800 to complete the above-mentioned mouse sharing method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0160] Fig. 9 900 is a block diagram of a device for a mouse sharing method according to an exemplary embodiment. For example, the device 900 may be provided as a server. Fig. 9 The apparatus 900 includes a second processing component 922, which further includes one or more processors, and a memory resource represented by a second memory 932 for storing instructions, such as an application, that can be executed by the second processing component 922. The application stored in the second memory 932 may include one or more modules, each corresponding to a set of instructions. In addition, the second processing component 922 is configured to execute the instructions to perform the mouse sharing method.

[0161] The device 900 may also include a second power supply component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to a network, and a second input / output interface 958. The device 900 may operate based on an operating system stored in the memory 932, such as Windows Server 2000. TM , Mac OSXTM , Unix TM , Linux TM , FreeBSD TM or similar.

[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A mouse sharing method, characterized in that: The method comprises: In response to receiving a mouse sharing request instruction sent by a sending end, establishing a communication connection with the sending end; determining a target communication type of the communication connection; Determining a standby cache duration according to the target communication type; receiving the mouse operation information sent by the sending end at a transmission rate corresponding to the target communication type within the inactive cache time length; After the inactive buffer time period, a target mouse operation event is generated according to the mouse operation information.

2. The mouse sharing method according to claim 1, characterized in that: The mouse operation information includes: at least two mouse operation events and an operation timestamp of each of the mouse operation events, and generating a target mouse operation event according to the mouse operation information after the inactive cache time period includes: Determine, according to the operation timestamp of each of the at least two mouse operation events, a target generation order of each mouse operation event and a target time interval between two adjacent mouse operation events; After the inactive buffer time period, each target mouse operation event is generated according to the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events.

3. The mouse sharing method according to claim 2, characterized in that: The step of determining the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events according to the operation timestamp of each mouse operation event in the at least two mouse operation events comprises: Obtain the time difference between the current time and the operation timestamp corresponding to each mouse operation event; Determining the target generation order of the at least two mouse operation events according to the time difference; The target time interval between two adjacent mouse operation events is acquired according to the target generation order.

4. The mouse sharing method according to claim 2, characterized in that: After the inactive cache time, generating each target mouse operation event according to the target generation order of each mouse operation event and the target time interval between two adjacent mouse operation events, comprises: After the inactive cache time period, determining the first mouse operation event to be generated according to the target generation order; Acquire the target time interval between the first mouse operation event and a second mouse operation event, where the second mouse operation event is a mouse operation event after the first mouse operation event in the target generation sequence; After the first mouse operation event is generated, timing is started, and when the timing duration is greater than or equal to the target time interval, the second mouse operation event is generated.

5. The mouse sharing method according to claim 1, characterized in that: The step of determining the standby cache duration according to the target communication type includes: Acquire preset correspondence data, where the preset correspondence data is used to characterize the correspondence between a plurality of different communication types and a plurality of preset cache durations; Determining a target preset cache duration corresponding to the target communication type from the preset corresponding relationship data; The target preset cache duration is used as the standby cache duration.

6. The mouse sharing method according to claim 1, characterized in that: Before receiving the mouse operation information sent by the sending end at the transmission rate corresponding to the target communication type within the inactive cache time length, the method further includes: A target buffer area is generated according to the target communication type.

7. The mouse sharing method according to claim 6, characterized in that: The method further comprises: After receiving the mouse operation information sent by the sending end at the transmission rate corresponding to the target communication type within the inactive cache time length, the mouse operation information is cached in the target cache area.

8. A mouse sharing device, characterized in that: include: a communication establishing module, configured to establish a communication connection with the sending end in response to receiving a mouse sharing request instruction sent by the sending end; A first determination module is configured to determine a target communication type of the communication connection; A second determination module is configured to determine a standby cache duration according to the target communication type; A receiving module, configured to receive the mouse operation information sent by the sending end at a transmission rate corresponding to the target communication type within the inactive cache time length; The first generating module is configured to generate a target mouse operation event according to the mouse operation information after the inactive cache time period.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.