CN110456932B - Mouse switching method and device - Google Patents

Mouse switching method and device Download PDF

Info

Publication number
CN110456932B
CN110456932B CN201910730379.4A CN201910730379A CN110456932B CN 110456932 B CN110456932 B CN 110456932B CN 201910730379 A CN201910730379 A CN 201910730379A CN 110456932 B CN110456932 B CN 110456932B
Authority
CN
China
Prior art keywords
display box
mouse
target display
switching
larger
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910730379.4A
Other languages
Chinese (zh)
Other versions
CN110456932A (en
Inventor
李光辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Anchenxin Information Technology Co ltd
Original Assignee
Vtron Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vtron Group Co Ltd filed Critical Vtron Group Co Ltd
Priority to CN201910730379.4A priority Critical patent/CN110456932B/en
Publication of CN110456932A publication Critical patent/CN110456932A/en
Application granted granted Critical
Publication of CN110456932B publication Critical patent/CN110456932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03543Mice or pucks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry

Abstract

The invention provides a mouse switching method and a device, which are used for acquiring coordinates of a mouse in a current display box in real time, determining relative coordinates of the mouse when the mouse moves in the current display box each time, judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than a critical value are larger than a threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value are larger than the threshold value or not, obtaining a judgment result, switching the mouse from the current display box to a target display box on the basis of the judgment result, wherein the target display box corresponds to a controlled PC (personal computer) of a left side screen, a right side screen, a lower side screen or an upper side screen, determining mouse information of the mouse in the target display box, sending the mouse information to a collector corresponding to the target display box, and enabling the collector to send the mouse information to the controlled PC. The switching control can be carried out on a plurality of display boxes through one set of mouse without installing software on the controlled PC, so that a user is not limited to controlling one display box and obtains more information by controlling the plurality of display boxes.

Description

Mouse switching method and device
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a mouse switching method and device.
Background
With the progress of science and technology, in the technical field of computer science and technology, the degree of informatization is higher and higher, and the requirement of people for controlling a single computer cannot be met by using one computer alone, so that a plurality of controlled computers need to be controlled simultaneously. Therefore, a set of KVM (Keyboard Video Mouse) devices is required, and corresponding software is installed on the controlled computer, and when a computer is to be controlled, the software enables the Mouse to control the computer according to the transmitted absolute coordinates.
Although a plurality of computers can be individually controlled by a set of KVM (Keyboard, Video Mouse) equipment, a control switching method is required because corresponding software needs to be installed on a controlled computer, and a plurality of computers can be controlled without installing software on the controlled computer.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for switching a mouse, which are used to realize switching control of multiple computers without installing software on a controlled computer and using a set of mouse. The technical scheme is as follows:
the invention provides a mouse switching method which is suitable for a switching system, wherein the switching system comprises display boxes, collectors and an exchanger, each display box is correspondingly connected with one collector, and the method comprises the following steps:
acquiring the coordinates of the mouse in the current display box in real time;
determining a relative coordinate of the mouse when the mouse moves in the current display box each time, wherein the relative coordinate is a difference value between a previous coordinate and a current coordinate of the mouse;
judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value are larger than a threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value are larger than the threshold value or not, and obtaining a judgment result;
switching the mouse from the current display box to a target display box based on a judgment result, wherein the target display box corresponds to a controlled PC of a left screen, a right screen, a lower screen or an upper screen;
determining the mouse information of the mouse in the target display box, and sending the mouse information to a collector corresponding to the target display box, so that the collector sends the mouse information to a controlled PC, wherein the mouse information at least comprises the ID value of the target display box and the current coordinate of the mouse in the target display box.
Preferably, if yes, switching the coordinates of the mouse from the current display box to the target display box based on the determination result, including:
if the judgment result is that the times that the abscissa in the relative coordinates is larger than the critical value are larger than the threshold value, switching the mouse from the current display box to a target display box of a controlled PC corresponding to a right screen;
if the judgment result is that the times that the abscissa in the relative coordinates is smaller than the negative number of the critical value is larger than the threshold value, switching the mouse from the current display box to a target display box of a controlled PC corresponding to the left screen;
if the judgment result is that the times that the ordinate in the relative coordinate is larger than the critical value are larger than the threshold value, switching the mouse from the current display box to a target display box of a controlled PC corresponding to a lower side screen;
and if the judgment result is that the times that the vertical coordinate in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value, switching the mouse from the current display box to a target display box of the controlled PC corresponding to the upper side screen.
Preferably, the method further comprises:
and if the judgment result shows that the abscissa in the relative coordinate is smaller than the critical value at least once, or the abscissa in the relative coordinate is larger than the negative number of the critical value at least once, or the ordinate in the relative coordinate is smaller than the critical value at least once, or the ordinate in the relative coordinate is larger than the negative number of the critical value at least once, controlling the mouse not to switch the display box.
Preferably, the determining the mouse information of the mouse in the target display box and sending the mouse information to the collector corresponding to the target display box, so that the collector sends the mouse information to the controlled PC includes:
determining the mouse information of the mouse in the target display box, and sending the mouse information to a collector corresponding to the target display box;
judging whether the ID value of the target display box in the mouse information is matched with the ID value of the collector or not;
and if so, the collector sends the mouse information to a controlled PC.
Preferably, the method further comprises: and the switching system enables the target display box to interact with the collector through the switch.
The invention also provides a mouse switching device, which is suitable for a switching system, wherein the switching system comprises display boxes, collectors and an exchanger, each display box is correspondingly connected with one collector, and the device comprises:
the acquisition module is used for acquiring the coordinates of the mouse in the current display box in real time;
the determining module is used for determining a relative coordinate of the mouse when the mouse moves in the current display box each time, wherein the relative coordinate is a difference value between a previous coordinate and a current coordinate of the mouse;
the judging module is used for judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value are larger than a threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value are larger than the threshold value or not, and obtaining a judging result;
the switching module is used for switching the mouse from the current display box to a target display box based on a judgment result, and the target display box corresponds to a controlled PC of a left screen, a right screen, a lower screen or an upper screen;
and the sending module is used for determining the mouse information in the target display box and sending the mouse information to the collector corresponding to the target display box, so that the collector sends the mouse information to the controlled PC.
Preferably, the switching module includes:
the first switching unit is used for switching the mouse from the current display box to a target display box of a controlled PC corresponding to a right screen if the judgment result shows that the times that the abscissa in the relative coordinate is larger than the critical value is larger than the threshold value;
the second switching unit is used for switching the mouse from the current display box to a target display box of a controlled PC corresponding to the left screen if the judgment result shows that the times that the abscissa in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value;
the third switching unit is used for switching the mouse from the current display box to a target display box of a controlled PC corresponding to a lower side screen if the judgment result shows that the times that the ordinate in the relative coordinate is larger than the critical value is larger than the threshold value;
and the fourth switching unit is used for switching the mouse from the current display box to a target display box of the controlled PC corresponding to the upper side screen if the judgment result shows that the times that the ordinate in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value.
Preferably, the switching module further includes:
and the control unit is used for controlling the mouse not to switch the display box if the judgment result shows that the abscissa in the relative coordinate is smaller than the critical value at least once, or the abscissa in the relative coordinate is larger than the negative number of the critical value at least once, or the ordinate in the relative coordinate is smaller than the critical value at least once, or the ordinate in the relative coordinate is larger than the negative number of the critical value at least once.
Preferably, the switching module further includes:
and the control unit is used for controlling the mouse not to switch the display box if the judgment result shows that the abscissa in the relative coordinate is smaller than the critical value at least once, or the abscissa in the relative coordinate is larger than the negative number of the critical value at least once, or the ordinate in the relative coordinate is smaller than the critical value at least once, or the ordinate in the relative coordinate is larger than the negative number of the critical value at least once.
Preferably, the apparatus further comprises: and the interaction module is used for enabling the target display box to interact with the collector through the switch by the switching system.
Compared with the prior art, the technical scheme provided by the invention has the following advantages:
the method comprises the steps of acquiring coordinates of a mouse in a current display box in real time, determining relative coordinates of the mouse when the mouse moves in the current display box each time, judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than a threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the threshold value or not is larger than the threshold value or not, obtaining a judgment result, switching the mouse from the current display box to a target display box on the basis of the judgment result, wherein the target display box corresponds to a controlled PC (personal computer) of a left side screen, a right side screen, a lower side screen or an upper side screen, determining mouse information of the mouse in the target display box, sending the mouse information to a collector corresponding to the target display box, and enabling the collector to send the mouse information to the controlled PC. The switching control can be carried out on a plurality of display boxes through one set of mouse without installing software on the controlled PC, so that a user is not limited to controlling one display box and obtains more information by controlling the plurality of display boxes.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a handover system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a mouse switching method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating switching a mouse from a current display box to a target display box based on a determination result according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a process of controlling a mouse not to switch display boxes according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for sending mouse information to a controlled PC by a collector according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a mouse switching device according to an embodiment of the present invention.
Detailed Description
The invention provides a mouse switching method and a mouse switching device, which can realize that the switching control can be carried out on a plurality of display boxes through one set of mouse without installing software on a controlled computer, so that a user is not limited to controlling one display box and obtains more information by controlling a plurality of display boxes.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The invention belongs to the protection scope based on the embodiment of the invention.
The invention aims to realize free switching of a display box through a set of Mouse without installing software on a controlled computer based on a set of KVM (Keyboard Video Mouse, display and Mouse) equipment. Fig. 1 is a schematic structural diagram of a handover system according to an embodiment of the present invention.
The switching system includes: a collector with id 1, a collector with id 2, a collector with id 3, a display box with id 4, a display box with id 5, a display box with id 6, a display screen 1, a display screen 2, a display screen 3, a controlled PC1(Personal Computer or Personal Computer), and a controlled PC 2.
The display screen 1 and the display screen 2 correspond to the controlled computer PC1, and the display screen 3 corresponds to the controlled computer PC 2.
In fig. 1, a display box with id 4 corresponds to a collector with id 1, a display box with id 5 corresponds to a collector with id 2, and a display box with id 6 corresponds to a collector with id 3. The collector with id 1 and the collector with id 2 correspond to the controlled PC1, and the collector with id 3 corresponds to the controlled PC 2.
The mouse information of the mouse in the display box is determined, and the mouse information is sent to the collector corresponding to the display box through the switch, so that the collector sends the mouse information to the controlled PC, and the controlled PC is controlled.
Based on the switching system disclosed by the embodiment of the invention, the switching control can be carried out on a plurality of display boxes without installing software on a controlled PC through a set of mouse, so that a user is not limited to controlling one display box and obtains more information by controlling a plurality of display boxes.
In combination with the switching system disclosed in the above embodiment of the present invention, as shown in fig. 2, there is provided a flowchart of a mouse switching method according to an embodiment of the present invention, where the method includes the following steps:
and S201, acquiring the coordinates of the mouse in the current display box in real time.
In the process of executing S201, the coordinates of the mouse in the current display box are first obtained in real time, that is, the coordinates of the mouse in the current display box are located at a position in the current display box, and for the position, the coordinates need to be obtained in real time.
For example: in the current display box, the coordinates of the mouse position are (2,3), and the coordinates (2,3) are the coordinates of the mouse in the current display, which need to be acquired in real time.
It should be noted that, the mouse has a coordinate system corresponding to the current display box in the current display box, and as long as the mouse is in the display box, the coordinates of the mouse in the current display box can always be obtained.
S202, determining the relative coordinates of the mouse when the mouse moves in the current display box each time.
In step S202, the relative coordinate is a difference between a previous coordinate and a current coordinate of the mouse. In the process of executing S202, when the mouse moves each time, it is necessary to determine the relative coordinates of the mouse in the current display box, that is, how many times the mouse moves, and the obtained number of relative coordinates corresponds to the number of times the mouse moves.
Here, taking the mouse moving twice in the current display box as an example, for example: the mouse moves for the first time to obtain a first relative coordinate corresponding to the mouse, and the mouse moves for the second time to obtain a second relative coordinate corresponding to the mouse.
Specifically, the relative coordinates of the mouse when moving in the current display box each time are determined as follows: the method comprises the steps of obtaining the coordinate of a mouse in a current display box in real time, namely the previous coordinate of the mouse, obtaining the coordinate of the mouse in the current display box again when the mouse moves in the current display box, namely the current coordinate, and then subtracting the previous coordinate from the current coordinate to obtain the relative coordinate.
For example: in the current display box, the coordinates of the mouse are (2,3), the coordinates of the mouse when the current display box moves are (3,5), the coordinates (2,3) are subtracted from the coordinates (3,5) when the current display box moves, and the obtained coordinates (1,2) are relative coordinates.
It should be noted that the abscissa in the obtained relative coordinate is the abscissa in the current coordinate minus the abscissa in the previous coordinate, and the ordinate in the obtained relative coordinate is the ordinate in the current coordinate minus the ordinate in the previous coordinate.
S203, judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value are larger than a threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value are larger than the threshold value or not, and obtaining a judgment result.
In step S203, it is determined whether the number of times that the abscissa and the ordinate in the relative coordinate are greater than the threshold is greater than the threshold, the abscissa and the ordinate in the relative coordinate are respectively compared with the threshold, the number of times that the abscissa and the ordinate in the relative coordinate are respectively greater than the threshold is recorded, and then it is determined whether the number of times that the abscissa and the ordinate in the relative coordinate are respectively greater than the threshold is greater than the threshold.
Similarly, whether the times that the abscissa and the ordinate in the relative coordinate are smaller than the negative of the critical value are larger than the threshold is judged, namely, the abscissa and the ordinate in the relative coordinate are respectively compared with the inverse of the critical value, the times that the abscissa and the ordinate in the relative coordinate are respectively larger than the inverse of the critical value are recorded, and then whether the times that the abscissa and the ordinate in the relative coordinate are respectively larger than the negative of the critical value are larger than the threshold is judged.
In the process of S203, each time the relative coordinate of the mouse is determined, it is required to determine whether the abscissa and the ordinate of the relative coordinate are greater than the threshold, or whether the abscissa of the relative coordinate is less than the negative of the threshold, and then determine whether the determined number of times that the abscissa of all the relative coordinates is greater than the threshold, or the number of times that the abscissa of all the determined relative coordinates is less than the negative of the threshold is greater than the threshold.
It should be noted that the threshold and the threshold may be set according to actual conditions, and are not described here.
And S204, switching the mouse from the current display box to the target display box based on the judgment result.
In the process of S204, if the number of times that the abscissa and the ordinate of the relative coordinate are greater than the threshold value or the number of times that the abscissa and the ordinate of the relative coordinate are less than the negative of the threshold value is greater than the threshold value, the mouse is switched from the current display box to the target display box based on the relative coordinate. The current display box is the display screen where the mouse is located, the target display box is the other display screen, namely, if the number of times that the horizontal and vertical coordinates of the relative coordinate is larger than the critical value is larger than the threshold value, or the number of times that the horizontal and vertical coordinates of the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value, the mouse is switched to the other display screen from the current display screen.
It should be noted that, specifically, how to switch from the current display box to another display box includes: the number of the current display box is 1, the numbers of the other two display boxes are respectively 2 and 3, and whether the mouse is switched from the display box with the number of 1 to the display box with the number of 2 or the display box with the number of 3 can be set according to actual conditions.
S205, determining the mouse information of the mouse in the target display box, and sending the mouse information to the collector corresponding to the target display box, so that the collector sends the mouse information to the controlled PC.
In step S205, the mouse information at least includes the ID value of the target display box and the current coordinates of the mouse in the target display box. Note that each display box is provided with an ID value, and the ID value of each display box is different. In the process of executing S205, the mouse information of the mouse in the target display box is determined, and the mouse information is sent to the collector corresponding to the target display box, and the mouse information is sent to the controlled computer through the collector.
It should be noted that each collector has an ID value, and each display box is correspondingly connected to a collector, that is, each display box has a collector corresponding to it.
Based on the mouse switching method disclosed by the embodiment of the invention, the relative coordinate of the mouse when the current display box moves each time is determined, whether the mouse is switched from the current display box to the target display box is judged based on the relative coordinate, if the mouse is switched from the current display box to the target display box, the mouse information of the mouse in the target display box is determined, the mouse information is sent to the collector corresponding to the target display box, and the collector sends the mouse information to the controlled PC. The switching control can be carried out on a plurality of display boxes through one set of mouse without installing software on the controlled PC, so that a user is not limited to controlling one display box and obtains more information by controlling the plurality of display boxes.
Based on the above specific implementation process of switching the mouse from the current display box to the target display box based on the determination result in the embodiment of the present invention as shown in fig. 2, the implementation process mainly includes:
s301, judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than the threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the threshold value or not, if so, executing S302, if the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the threshold value or not, executing S303, if the times that the vertical and vertical coordinates in the relative coordinates are larger than the negative number of the threshold value or not, executing S304, and if the times that the vertical and vertical coordinates in the relative coordinates are smaller than the negative number of the threshold value or not, executing S305.
And S302, switching the mouse from the current display box to a target display box of the controlled PC corresponding to the right screen.
In the process of executing S302, if the number of times that the abscissa in the determined relative coordinates is greater than the critical value is greater than the threshold, the mouse is switched from the current display box to the target display box to the right.
For example: and if the times that the abscissa in the determined relative coordinates is larger than the critical value P are larger than the threshold value n, the mouse is switched from the current display box to the display box closest to the current display box to the right. Namely, the mouse slides right quickly at the current display box and meets the conditions: and if the times that the abscissa in the determined relative coordinates is larger than the critical value P are larger than the threshold value n, switching the mouse to the right display box of the current display box for control.
It should be noted that, the switching includes, but is not limited to, switching the mouse from the current display box to the display box closest to the current display box to the right, or directly switching to the display box next to the current display box by skipping the closest display box, and specifically, how to switch may be set according to the actual situation.
For example: the current display box is numbered 1, the display box nearest to the right is numbered 2, the display box nearest to the right is numbered 3, the display box numbered 1 can be switched to the display box numbered 2, the display box numbered 2 can also be skipped, and the display box numbered 3 is directly switched to.
And S303, switching the mouse from the current display box to a target display box of the controlled PC corresponding to the left screen.
In the process of S303, if the number of times that the abscissa in the relative coordinates is less than the negative of the critical value is greater than the threshold, the mouse is switched from the current display box to the target display box to the left.
For example: and if the times that the abscissa in the determined relative coordinates is less than the negative P of the critical value are more than the threshold value n, the mouse is switched to the left from the current display box to the display box closest to the current display box. Namely, the mouse slides to the left quickly at the current display box and meets the conditions: and if the times that the abscissa in the determined relative coordinates is less than the negative P of the critical value is more than the threshold value n, switching the mouse to the left display box of the current display box for control.
And S304, switching the mouse from the current display box to the target display box of the controlled PC corresponding to the lower side screen.
In the process of S304, if the number of times that the ordinate in the determined relative coordinate is greater than the critical value is greater than the threshold value, the mouse is switched from the current display box to the target display box.
For example: and if the times that the ordinate in the determined relative coordinate is larger than the critical value P are larger than the threshold value n, the mouse is switched from the current display box to the display box nearest to the current display box. Namely, the mouse slides down quickly at the current display box and meets the conditions: and if the number of times that the vertical coordinate in the determined relative coordinate is larger than the critical value P is larger than the threshold value n, switching the mouse to the lower display box of the current display box for control.
S305, switching the mouse from the current display box to the target display box of the controlled PC corresponding to the upper side screen.
In the process of executing S305, if the number of times that the ordinate in the relative coordinates is less than the negative of the critical value is greater than the threshold, the mouse is switched from the current display box to the target display box.
For example: and if the number of times that the ordinate in the determined relative coordinate is less than the negative number-P of the critical value is greater than the threshold value n, the mouse is switched from the current display box to the display box nearest to the current display box. Namely, the mouse slides up quickly on the current display box and meets the conditions: and if the number of times that the vertical coordinate in the determined relative coordinate is less than the inverse number-P of the critical value is greater than the threshold value n, switching the mouse to the upper display box of the current display box for control.
According to the mouse switching method disclosed by the embodiment of the invention, if the number of times that the horizontal and vertical coordinates in the relative coordinates are greater than the critical value is greater than the threshold value or the number of times that the relative coordinates are less than the negative number of the critical value is greater than the threshold value, the mouse can be switched to the target display box from the current display box to different directions, so that the flexibility of switching the mouse to different directions between the display boxes is realized.
As shown in fig. 4, a schematic flow chart for controlling the mouse not to switch the display box mainly includes:
s401, judging whether the times that the relative coordinate is larger than the critical value is larger than a threshold value or whether the times that the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value. If the abscissa in the determined relative coordinate is less than the threshold value at least once, performing S402, if the abscissa in the relative coordinate is greater than the negative number of the threshold value at least once, performing S402, if the ordinate in the determined relative coordinate is less than the threshold value at least once, performing S402, and if the ordinate in the relative coordinate is greater than the negative number of the threshold value at least once, performing S402.
And S402, controlling the mouse not to switch the display box.
According to the mouse switching method disclosed by the embodiment of the invention, if the number of times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value is larger than the threshold value or the number of times that the relative coordinates are smaller than the negative number of the critical value is larger than the threshold value, the mouse is controlled not to switch the display box, and the mouse is prevented from switching the target display box by mistake.
Based on the mouse switching method disclosed in fig. 2 in the embodiment of the present invention, S205 shown in fig. 2 is a specific implementation process of determining mouse information of a mouse in a target display box, and sending the mouse information to a collector corresponding to the target display box, so that the collector sends the mouse information to a controlled PC, as shown in fig. 5, and mainly includes:
s501, determining the mouse information of the mouse in the target display box, and sending the mouse information to a collector corresponding to the target display box.
In the process of executing S501, the mouse information of the mouse in the target display box is determined, and the mouse information is sent to the collector corresponding to the target display box.
And S502, judging whether the ID value of the target display box in the mouse information is matched with the ID value of the collector.
In the process of executing S502, it is determined whether the ID value of the target display box in the mouse information matches the ID value of the collector.
And S503, if so, enabling the collector to send the mouse information to the controlled PC.
In the process of executing S503, if the ID value of the target display box in the mouse information successfully matches the ID value of the collector, the collector is caused to transmit the mouse information to the controlled PC.
According to the mouse switching method disclosed by the embodiment of the invention, the mouse information obtained by the controlled PC can enable a user to know which target display box the mouse is switched to.
Based on the mouse switching method disclosed by the embodiment of the invention, the mouse switching method further comprises the following steps:
and the switching system enables the target display box to interact with the collector through the switch.
According to the mouse switching method disclosed by the embodiment of the invention, the target display box can interact with the collector through the switch, and the mouse information is sent to the collector corresponding to the target display box through the switch, so that the mouse information obtained by the controlled PC is guaranteed.
Based on the mouse switching method disclosed in the embodiment of the present invention, the embodiment of the present invention correspondingly discloses a mouse switching device, which has a structure shown in fig. 6 and mainly includes: the device comprises an acquisition module 60, a determination module 61, a judgment module 62, a switching module 63 and a sending module 64.
And the obtaining module 60 is used for obtaining the coordinates of the mouse in the current display box in real time.
And the determining module 61 is configured to determine a relative coordinate of the mouse when the mouse moves in the current display box each time, where the relative coordinate is a difference between a previous coordinate and a current coordinate of the mouse.
The judging module 62 is configured to judge whether the number of times that the horizontal and vertical coordinates in the relative coordinate is greater than the threshold is greater than a threshold, or whether the number of times that the horizontal and vertical coordinates in the relative coordinate is less than the negative of the threshold is greater than the threshold, so as to obtain a judgment result.
And the switching module 63 is used for switching the mouse from the current display box to the target display box based on the judgment result.
And the sending module 64 is used for determining the mouse information of the mouse in the target display box and sending the mouse information to the collector corresponding to the target display box, so that the collector sends the mouse information to the controlled PC.
Based on the mouse switching device disclosed by the embodiment of the invention, the relative coordinate of the mouse when the current display box moves each time is determined, whether the mouse is switched from the current display box to the target display box is judged based on the relative coordinate, if the mouse is switched from the current display box to the target display box, the mouse information of the mouse in the target display box is determined, and the mouse information is sent to the collector corresponding to the target display box, so that the collector sends the mouse information to the controlled computer. The switching control can be carried out on a plurality of display boxes through one set of mouse without installing software on the controlled PC, so that a user is not limited to controlling one display box and obtains more information by controlling the plurality of display boxes.
An optional structure of the switching module 63 in the embodiment of the apparatus of the present invention is: the switching module 63 includes a first switching unit, a second switching unit, a third switching unit, and a fourth switching unit.
And the first switching unit is used for switching the mouse from the current display box to a target display box of the controlled PC corresponding to the right screen if the judgment result shows that the times that the abscissa in the relative coordinate is greater than the critical value is greater than the threshold value.
And the second switching unit is used for switching the mouse from the current display box to a target display box of the controlled PC corresponding to the left screen if the judgment result shows that the times that the abscissa in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value.
And the third switching unit is used for switching the mouse from the current display box to a target display box of the controlled PC corresponding to the lower screen if the judgment result shows that the times that the ordinate in the relative coordinate is greater than the critical value is greater than the threshold value.
And the fourth switching unit is used for switching the mouse from the current display box to a target display box of the controlled PC corresponding to the upper side screen if the judgment result shows that the times that the vertical coordinate in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value.
According to the mouse switching device disclosed by the embodiment of the invention, if the number of times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value is larger than the threshold value or the number of times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value is larger than the threshold value, the mouse can be switched to the target display box from the current display box in different directions, so that the flexibility of switching the mouse between the display box and the target display box in different directions is realized.
Another optional structure of the switching module 63 in the embodiment of the apparatus of the present invention is: the switching module 63 comprises a control unit.
And the control unit is used for controlling the mouse not to switch the display box if the judgment result shows that the abscissa in the relative coordinate is smaller than the critical value at least once, or the abscissa in the relative coordinate is larger than the negative number of the critical value at least once, or the ordinate in the relative coordinate is smaller than the critical value at least once, or the ordinate in the relative coordinate is larger than the negative number of the critical value at least once.
According to the mouse switching device disclosed by the embodiment of the invention, if the number of times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value is larger than the threshold value or the number of times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value is larger than the threshold value, the mouse is controlled not to switch the target display box, and the mouse is prevented from switching the display box by mistake.
An optional structure of the sending module 64 in the embodiment of the apparatus of the present invention is: the transmission module 64 includes a first transmission unit, a judgment unit, and a second transmission unit.
And the first sending unit is used for determining the mouse information of the mouse in the target display box and sending the mouse information to the collector corresponding to the target display box.
And the judging unit is used for judging whether the ID value of the target display box in the mouse information is matched with the ID value of the collector.
And the second sending unit is used for enabling the collector to send the mouse information to the controlled PC if the mouse information is positive.
According to the mouse switching device disclosed by the embodiment of the invention, the user can know which display box the mouse is switched to by the mouse information obtained by the controlled computer.
Based on the mouse switching device disclosed by the embodiment of the device, the mouse switching device further comprises: and an interaction module.
And the interaction module is used for enabling the switching system to enable the target display box to interact with the collector through the switch.
According to the mouse switching device disclosed by the embodiment of the invention, the target display box can interact with the collector through the switch, and the mouse information is sent to the collector corresponding to the target display box through the switch, so that the mouse information obtained by the controlled PC is guaranteed.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A mouse switching method is characterized by being applicable to a switching system, wherein the switching system comprises display boxes, collectors and an exchanger, each display box is correspondingly connected with one collector, and the method comprises the following steps:
acquiring the coordinates of the mouse in the current display box in real time;
determining a relative coordinate of the mouse when the mouse moves in the current display box each time, wherein the relative coordinate is a difference value between a previous coordinate and a current coordinate of the mouse;
judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value are larger than a threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value are larger than the threshold value or not, and obtaining a judgment result;
switching the mouse from the current display box to a target display box based on a judgment result, wherein the target display box corresponds to a controlled PC (personal computer) of a left side screen, a right side screen, a lower side screen or an upper side screen, the target display box is an Nth display box closest to the current display box, and N is an integer greater than or equal to 1;
determining mouse information of the mouse in the target display box, sending the mouse information to a collector corresponding to the target display box, and enabling the collector to send the mouse information to a controlled PC, wherein the mouse information at least comprises an ID value of the target display box and a current coordinate of the mouse in the target display box, each display box is correspondingly connected with one collector, and each collector has an ID value.
2. The method of claim 1, wherein switching the coordinates of the mouse from the current display box to the target display box based on the determination comprises:
if the judgment result is that the times that the abscissa in the relative coordinates is larger than the critical value are larger than the threshold value, switching the mouse from the current display box to a target display box of a controlled PC corresponding to a right screen;
if the judgment result is that the times that the abscissa in the relative coordinates is smaller than the negative number of the critical value is larger than the threshold value, switching the mouse from the current display box to a target display box of a controlled PC corresponding to the left screen;
if the judgment result is that the times that the ordinate in the relative coordinate is larger than the critical value are larger than the threshold value, switching the mouse from the current display box to a target display box of a controlled PC corresponding to a lower side screen;
and if the judgment result is that the times that the vertical coordinate in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value, switching the mouse from the current display box to a target display box of the controlled PC corresponding to the upper side screen.
3. The method of claim 2, further comprising:
and if the judgment result shows that the abscissa in the relative coordinate is smaller than the critical value at least once, or the abscissa in the relative coordinate is larger than the negative number of the critical value at least once, or the ordinate in the relative coordinate is smaller than the critical value at least once, or the ordinate in the relative coordinate is larger than the negative number of the critical value at least once, controlling the mouse not to switch the display box.
4. The method of claim 1, wherein the determining the mouse information of the mouse in the target display box and sending the mouse information to a collector corresponding to the target display box to enable the collector to send the mouse information to a controlled PC comprises:
determining the mouse information of the mouse in the target display box, and sending the mouse information to a collector corresponding to the target display box;
judging whether the ID value of the target display box in the mouse information is matched with the ID value of the collector or not;
and if so, the collector sends the mouse information to a controlled PC.
5. The method of claim 1, further comprising:
and the switching system enables the target display box to interact with the collector through the switch.
6. The utility model provides a mouse auto-change over device which characterized in that is applicable to switched systems, switched systems includes and shows box, collector and switch, each show that the box corresponds a collector of connection, the device includes:
the acquisition module is used for acquiring the coordinates of the mouse in the current display box in real time;
the determining module is used for determining a relative coordinate of the mouse when the mouse moves in the current display box each time, wherein the relative coordinate is a difference value between a previous coordinate and a current coordinate of the mouse;
the judging module is used for judging whether the times that the horizontal and vertical coordinates in the relative coordinates are larger than the critical value are larger than a threshold value or not, or whether the times that the horizontal and vertical coordinates in the relative coordinates are smaller than the negative number of the critical value are larger than the threshold value or not, and obtaining a judging result;
the switching module is used for switching the mouse from the current display box to a target display box based on a judgment result, wherein the target display box corresponds to a controlled PC (personal computer) of a left side screen, a right side screen, a lower side screen or an upper side screen, the target display box is the Nth display box closest to the current display box, and N is an integer greater than or equal to 1;
and the sending module is used for determining the mouse information in the target display box and sending the mouse information to the collector corresponding to the target display box, so that the collector sends the mouse information to the controlled PC, each display box is correspondingly connected with one collector, and each collector has an ID value.
7. The apparatus of claim 6, wherein the switching module comprises:
the first switching unit is used for switching the mouse from the current display box to a target display box of a controlled PC corresponding to a right screen if the judgment result shows that the times that the abscissa in the relative coordinate is larger than the critical value is larger than the threshold value;
the second switching unit is used for switching the mouse from the current display box to a target display box of a controlled PC corresponding to the left screen if the judgment result shows that the times that the abscissa in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value;
the third switching unit is used for switching the mouse from the current display box to a target display box of a controlled PC corresponding to a lower side screen if the judgment result shows that the times that the ordinate in the relative coordinate is larger than the critical value is larger than the threshold value;
and the fourth switching unit is used for switching the mouse from the current display box to a target display box of the controlled PC corresponding to the upper side screen if the judgment result shows that the times that the ordinate in the relative coordinate is smaller than the negative number of the critical value is larger than the threshold value.
8. The apparatus of claim 7, wherein the switching module further comprises:
and the control unit is used for controlling the mouse not to switch the display box if the judgment result shows that the abscissa in the relative coordinate is smaller than the critical value at least once, or the abscissa in the relative coordinate is larger than the negative number of the critical value at least once, or the ordinate in the relative coordinate is smaller than the critical value at least once, or the ordinate in the relative coordinate is larger than the negative number of the critical value at least once.
9. The apparatus of claim 6, wherein the sending module comprises:
the first sending unit is used for determining the mouse information of the mouse in the target display box and sending the mouse information to the collector corresponding to the target display box;
the judging unit is used for judging whether the ID value of the target display box in the mouse information is matched with the ID value of the collector or not;
and the second sending unit is used for enabling the collector to send the mouse information to the controlled PC if the mouse information is received.
10. The apparatus of claim 6, further comprising:
and the interaction module is used for enabling the target display box to interact with the collector through the switch by the switching system.
CN201910730379.4A 2019-08-08 2019-08-08 Mouse switching method and device Active CN110456932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910730379.4A CN110456932B (en) 2019-08-08 2019-08-08 Mouse switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910730379.4A CN110456932B (en) 2019-08-08 2019-08-08 Mouse switching method and device

Publications (2)

Publication Number Publication Date
CN110456932A CN110456932A (en) 2019-11-15
CN110456932B true CN110456932B (en) 2021-08-06

Family

ID=68485448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910730379.4A Active CN110456932B (en) 2019-08-08 2019-08-08 Mouse switching method and device

Country Status (1)

Country Link
CN (1) CN110456932B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320296A (en) * 2007-06-05 2008-12-10 宏正自动科技股份有限公司 Kvm switch for switching among computers by employing mouse movement signal and method thereof
CN103576884A (en) * 2012-08-01 2014-02-12 光宝电子(广州)有限公司 Input device capable of controlling multiple computers and method of input device for controlling computers
CN104615282A (en) * 2015-01-23 2015-05-13 广州视睿电子科技有限公司 Mouse motion control method and system suitable for switching of multiple screens
CN109753261A (en) * 2018-12-30 2019-05-14 中孚信息股份有限公司 A kind of method and system, KVM switching host based on mouse
CN110007772A (en) * 2017-12-29 2019-07-12 宏正自动科技股份有限公司 Resource sharing device and its control method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100083122A1 (en) * 2008-10-01 2010-04-01 International Business Machines Corporation Systems, methods and computer products for controlling multiple machines using a seamless user-interface to a multi-display
CN102004609A (en) * 2010-11-26 2011-04-06 王琦凡 Mouse and method for controlling window switching by using same
CN104090672A (en) * 2013-09-25 2014-10-08 苏州天趣信息科技有限公司 Switching type mouse device and control method thereof
CN104572512A (en) * 2014-12-31 2015-04-29 深圳雷柏科技股份有限公司 Method and system for realizing multi-clicking functions of X-mouse button control
CN104598055B (en) * 2015-02-09 2017-12-26 联想(北京)有限公司 A kind of condition processing method, radio mouse and more equipment wireless control systems
CN108255378B (en) * 2018-02-09 2020-05-26 维沃移动通信有限公司 Display control method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320296A (en) * 2007-06-05 2008-12-10 宏正自动科技股份有限公司 Kvm switch for switching among computers by employing mouse movement signal and method thereof
CN103576884A (en) * 2012-08-01 2014-02-12 光宝电子(广州)有限公司 Input device capable of controlling multiple computers and method of input device for controlling computers
CN104615282A (en) * 2015-01-23 2015-05-13 广州视睿电子科技有限公司 Mouse motion control method and system suitable for switching of multiple screens
CN110007772A (en) * 2017-12-29 2019-07-12 宏正自动科技股份有限公司 Resource sharing device and its control method
CN109753261A (en) * 2018-12-30 2019-05-14 中孚信息股份有限公司 A kind of method and system, KVM switching host based on mouse

Also Published As

Publication number Publication date
CN110456932A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN105371850B (en) A kind of route navigation method and mobile terminal
CN108833223B (en) Household appliance control method, household appliance control device, remote controller, terminal, server and medium
CN105630452A (en) Screen transmission method and electronic devices
US9582094B2 (en) Information processing device, display device with touch panel, information processing method, and program
JP2005179026A (en) Equipment management system
CN103701908A (en) Method, device and system for remote interaction
CN111414057A (en) Fan rotating speed control method and system, electronic equipment and storage medium
CN109002269A (en) Method, client and the system of a kind of singly-bound mouse control multiple terminals
CN105809947A (en) Key information processing method and system
CN103458308B (en) A kind of method and device of input content
CN105236219A (en) Method and device for setting ID of elevator hall-call board floors
CN110456932B (en) Mouse switching method and device
CN105100850A (en) Intelligent terminal touch screen remote control method and device
CN108245889A (en) Free-viewing angle is towards switching method and device, storage medium, electronic equipment
CN104866194B (en) Image searching method and device
CN101923410B (en) Electronic equipment and touch positioning control method thereof
CN105511787B (en) Input method, electronic equipment and input system
CN110515507B (en) Icon display method and terminal
CN105635641A (en) Monitoring device and monitoring method
JP5907163B2 (en) Data relevance level determination device, data relevance level determination method, and program
CN104914985A (en) Gesture control method and system and video flowing processing device
CN113590012B (en) Quick elevator calling method, device, computer equipment and storage medium
CN104571583A (en) Method and device for switching KVM (Keyboard Video Mouse)
CN103986953A (en) Cursor moving method and device based on remote controller
CN103677242A (en) Method for determining feedback modes and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240319

Address after: Room 05, 27th Floor, Building 1, Guannan Fuxing Pharmaceutical Park, No. 58 Guanggu Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province, 430000 (Wuhan Area of Free Trade Zone)

Patentee after: Wuhan Anchenxin Information Technology Co.,Ltd.

Country or region after: Zhong Guo

Address before: 233 Kezhu Road, Guangzhou hi tech Industrial Development Zone, Guangdong 510670

Patentee before: VTRON GROUP Co.,Ltd.

Country or region before: Zhong Guo

TR01 Transfer of patent right