CN110233771B - Method and device for judging network link environment based on spice protocol - Google Patents
Method and device for judging network link environment based on spice protocol Download PDFInfo
- Publication number
- CN110233771B CN110233771B CN201910301448.XA CN201910301448A CN110233771B CN 110233771 B CN110233771 B CN 110233771B CN 201910301448 A CN201910301448 A CN 201910301448A CN 110233771 B CN110233771 B CN 110233771B
- Authority
- CN
- China
- Prior art keywords
- mouse
- abnormal
- information
- judging
- cloud host
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/03—Protocol definition or specification
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Environmental & Geological Engineering (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method and a device for judging a network link environment based on a spice protocol, wherein the method comprises the following steps: 1) the client logs in the cloud host, establishes network connection with the cloud host, establishes a mouse channel for transmitting mouse related data and acquires size information of a cloud host screen; 2) monitoring data of a mouse channel in real time, and acquiring and responding to relevant operations of the mouse; 3) judging whether the mouse information is abnormal or not according to the acquired mouse related data; if the horizontal and vertical coordinates of the mouse are all within the size range of the cloud host screen, recording response parameters, and judging that the mouse information is normal; if the position of the horizontal and vertical coordinates of the mouse is not in the screen range, judging that the mouse information is abnormal; 4) and judging the network link environment according to the abnormal information of the mouse. According to the method, the mouse information is acquired by using the spice protocol mouse channel to judge the link state between the client and the cloud host, the link fault between the client and the cloud host is judged, and the judgment result is accurate and timely.
Description
Technical Field
The invention relates to a computer cloud technology, in particular to a method and a device for judging a network link environment based on a spice protocol.
Background
The Spice protocol architecture supports two mouse modes: a client-side mouse mode and a server-side mouse mode. This mode can be dynamically switched and can be coordinated between the client and the server. When a user clicks a client window, the cloud desktop acquires a mouse focus, the mouse enters a server-side mode, a client system mouse is hidden, the server controls the position of the mouse and displays the mouse, when the client loses the focus or the mouse moves out of the cloud desktop, the mouse is switched to the client mode, and the moving position and the display of the mouse are determined by a system where the client is located.
The client is connected with the cloud desktop through a spice protocol, and the spice protocol does not have a network link environment judgment mechanism, so that the client cannot detect the state of the cloud desktop when the network environment is wrong, the interface of the cloud desktop cannot be updated in time, and a user cannot operate the cloud desktop.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for determining a network link environment based on a spice protocol, aiming at the defects in the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: a judgment method of network link environment based on spice protocol comprises the following steps:
1) the client logs in the cloud host, establishes network connection with the cloud host, establishes a mouse channel for transmitting mouse related data and acquires size information of a cloud host screen; the mouse related data comprises: the moving coordinate value of the mouse and the key value of the mouse button;
2) monitoring data of a mouse channel in real time, and acquiring and responding to relevant operations of the mouse; the working mode of the mouse is divided into a client mode and a server mode, the spice protocol supports dynamic switching of the working mode of the mouse, when the mouse is moved into a window of a cloud host, the mouse mode is switched into the server mode, the mouse is moved out of the cloud host, and the mouse mode is switched into the client mode;
3) judging whether the mouse information is abnormal or not according to the mouse related data acquired in the server mode; if the horizontal and vertical coordinates of the mouse are all within the size range of the cloud host screen, recording response parameters, and judging that the mouse information is normal; if the position of the horizontal and vertical coordinates of the mouse is not in the screen range, judging that the mouse information is abnormal;
4) and judging the network link environment according to the abnormal information of the mouse.
According to the above scheme, in the step 4), the judgment of the network link environment is specifically as follows: judging whether the network is abnormal or not according to whether the mouse information is abnormal or not at every sampling time interval, setting an abnormal time threshold N, setting an initial abnormal time T to be 0, and resetting the T to be 0 when the mouse state information is normal; otherwise, increasing T by 1, and judging that the network link environment is abnormal when the abnormal times T exceeds the threshold value N.
The invention also provides a device for judging the network link environment based on the spice protocol, which comprises:
the channel establishing module is used for logging in a cloud host by a client, establishing network connection with the cloud host, establishing a mouse channel for transmitting mouse related data and acquiring size information of a cloud host screen; the mouse related data comprises: the moving coordinate value of the mouse and the key value of the mouse button;
the channel data monitoring module is used for monitoring data of a mouse channel in real time, and acquiring and responding to related operations of a mouse; the working mode of the mouse is divided into a client mode and a server mode, the spice protocol supports dynamic switching of the working mode of the mouse, when the mouse is moved into a window of a cloud host, the mouse mode is switched into the server mode, the mouse is moved out of the cloud host, and the mouse mode is switched into the client mode;
the mouse information judging module is used for judging whether the mouse information is abnormal or not according to the mouse related data acquired in the server mode; if the positions of the horizontal and vertical coordinates of the mouse are all within the size range of the cloud host screen, recording response parameters, and judging that the mouse information is normal; if the position of the horizontal and vertical coordinates of the mouse is not in the screen range, judging that the mouse information is abnormal;
and the network link environment judgment module is used for judging the network link environment according to the mouse abnormal information.
According to the above scheme, in the network link environment judgment module, the judgment of the network link environment is specifically as follows: judging whether the network is abnormal or not according to whether the mouse information is abnormal or not at every sampling time interval, setting an abnormal time threshold N, setting an initial abnormal time T to be 0, and resetting the T to be 0 when the mouse state information is normal; otherwise, increasing T by 1, and judging that the network link environment is abnormal when the abnormal times T exceeds the threshold value N.
The invention has the following beneficial effects: according to the method, the mouse information is acquired by using the spice protocol mouse channel to judge the link state between the client and the cloud host, the link fault between the client and the cloud host is judged, and the judgment result is accurate and timely.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a method of an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, a method for determining a network link environment based on a spice protocol includes the following steps:
1) the client logs in the cloud host, establishes network connection with the cloud host, establishes a mouse channel for transmitting mouse related data and acquires size information of a cloud host screen; the mouse related data comprises: the moving coordinate value of the mouse and the key value of the mouse button;
the mouse channel is one of a plurality of channels established after the SPICE protocol is successfully connected with the remote host, and the channel value transmits mouse data;
2) monitoring data of a mouse channel in real time, and acquiring and responding to relevant operations of the mouse; the working mode of the mouse is divided into a client mode and a server mode, the spice protocol supports dynamic switching of the working mode of the mouse, when the mouse is moved into a window of a cloud host, the mouse mode is switched into the server mode, the mouse is moved out of the cloud host, and the mouse mode is switched into the client mode;
in the server mode, the operation and information of the mouse are sent to a cloud host (virtual machine) and converted into a coordinate system of a virtual machine system; in the client mode, mouse operation and information are displayed on the client system, and a coordinate system of the client system is used.
3) Judging whether the mouse information is abnormal or not according to the mouse related data acquired in the server mode; if the horizontal and vertical coordinates of the mouse are all within the size range of the cloud host screen, recording response parameters, and judging that the mouse information is normal; if the position of the horizontal and vertical coordinates of the mouse is not in the screen range, judging that the mouse information is abnormal;
4) judging the network link environment according to the abnormal information of the mouse;
judging the network link environment, in order to reduce errors caused by network jitter, judging whether the network is abnormal or not according to abnormal mouse information at intervals of sampling time, setting an abnormal time threshold N (N > -2), setting an initial abnormal time T-0, resetting T to 0 when the mouse state information is normal, otherwise incrementing T by 1, and when the abnormal time T exceeds the threshold N, namely detecting the mouse abnormality for T times continuously, namely considering the network link environment is abnormal.
When the client interacts with the cloud host, the mouse information is always dynamically updated, and the abnormal condition of the mouse is judged, so that the purpose of monitoring the network link environment is achieved.
5) And repeating the steps 2) to 4), and monitoring the network link state of the cloud desktop environment in real time.
In the implementation process of the invention, the spice protocol defines a group of protocol messages to access, control and receive the operation of the client mouse device, replies to send and output, simultaneously defines a mouse network channel, transmits the messages related to the mouse, utilizes the spice protocol mouse channel to acquire the mouse information to judge the link state of the client and the cloud host, and judges the link fault from the client to the cloud host, and the judgment result is accurate and timely.
According to the above method, a judgment device for easily obtaining a corresponding network link environment based on a spice protocol includes:
the channel establishing module is used for logging in a cloud host by a client, establishing network connection with the cloud host, establishing a mouse channel for transmitting mouse related data and acquiring size information of a cloud host screen; the mouse related data comprises: the moving coordinate value of the mouse and the key value of the mouse button;
the channel data monitoring module is used for monitoring data of a mouse channel in real time, and acquiring and responding to related operations of a mouse; the working mode of the mouse is divided into a client mode and a server mode, the spice protocol supports dynamic switching of the working mode of the mouse, when the mouse is moved into a window of a cloud host, the mouse mode is switched into the server mode, the mouse is moved out of the cloud host, and the mouse mode is switched into the client mode;
the mouse information judging module is used for judging whether the mouse information is abnormal or not according to the mouse related data acquired in the server mode; if the horizontal and vertical coordinates of the mouse are all within the size range of the cloud host screen, recording response parameters, and judging that the mouse information is normal; if the position of the horizontal and vertical coordinates of the mouse is not in the screen range, judging that the mouse information is abnormal;
and the network link environment judgment module is used for judging the network link environment according to the mouse abnormal information.
In the network link environment judgment module, the judgment of the network link environment is specifically as follows: judging whether the network is abnormal or not according to whether the mouse information is abnormal or not at every sampling time interval, setting an abnormal time threshold N, setting an initial abnormal time T to be 0, and resetting the T to be 0 when the mouse state information is normal; otherwise, increasing T by 1, and judging that the network link environment is abnormal when the abnormal times T exceeds the threshold value N.
It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.
Claims (4)
1. A method for judging network link environment based on spice protocol is characterized by comprising the following steps:
1) the client logs in the cloud host, establishes network connection with the cloud host, establishes a mouse channel for transmitting mouse related data and acquires size information of a cloud host screen; the mouse related data comprises: the moving coordinate value of the mouse and the key value of the mouse button;
2) monitoring data of a mouse channel in real time, and acquiring and responding to relevant operations of the mouse; the working mode of the mouse is divided into a client mode and a server mode, the spice protocol supports dynamic switching of the working mode of the mouse, when the mouse is moved into a window of the cloud host, the mouse mode is switched into the server mode, the mouse is moved out of the cloud host, and the mouse mode is switched into the client mode;
3) judging whether the mouse information is abnormal or not according to the mouse related data acquired in the server mode; if the horizontal and vertical coordinates of the mouse are all within the size range of the cloud host screen, recording response parameters, and judging that the mouse information is normal; if the position of the horizontal and vertical coordinates of the mouse is not in the screen range, judging that the mouse information is abnormal;
4) and judging the network link environment according to the abnormal information of the mouse.
2. The method for determining a network link environment based on a spice protocol according to claim 1, wherein in the step 4), the determination of the network link environment is specifically as follows: judging whether the network is abnormal or not according to whether the mouse information is abnormal or not at every sampling time interval, setting an abnormal time threshold N, setting an initial abnormal time T to be 0, and resetting the T to be 0 when the mouse state information is normal; otherwise, increasing T by 1, and judging that the network link environment is abnormal when the abnormal times T exceeds the threshold value N.
3. A device for determining a network link environment based on a spice protocol, comprising:
the channel establishing module is used for logging in a cloud host by a client, establishing network connection with the cloud host, establishing a mouse channel for transmitting mouse related data and acquiring size information of a cloud host screen; the mouse related data comprises: the moving coordinate value of the mouse and the key value of the mouse button;
the channel data monitoring module is used for monitoring data of a mouse channel in real time, and acquiring and responding to relevant operations of the mouse; the working mode of the mouse is divided into a client mode and a server mode, the spice protocol supports dynamic switching of the working mode of the mouse, when the mouse is moved into a window of a cloud host, the mouse mode is switched into the server mode, the mouse is moved out of the cloud host, and the mouse mode is switched into the client mode;
the mouse information judging module is used for judging whether the mouse information is abnormal or not according to the mouse related data acquired in the server mode; if the horizontal and vertical coordinates of the mouse are all within the size range of the cloud host screen, recording response parameters, and judging that the mouse information is normal; if the position of the horizontal and vertical coordinates of the mouse is not in the screen range, judging that the mouse information is abnormal;
and the network link environment judgment module is used for judging the network link environment according to the mouse abnormal information.
4. The device for determining a network link environment according to claim 3, wherein the network link environment determining module determines the network link environment as follows: judging whether the network is abnormal or not according to whether the mouse information is abnormal or not at every sampling time interval, setting an abnormal time threshold N, setting an initial abnormal time T to be 0, and resetting the T to be 0 when the mouse state information is normal; otherwise, increasing T by 1, and judging that the network link environment is abnormal when the abnormal times T exceeds the threshold value N.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910301448.XA CN110233771B (en) | 2019-04-15 | 2019-04-15 | Method and device for judging network link environment based on spice protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910301448.XA CN110233771B (en) | 2019-04-15 | 2019-04-15 | Method and device for judging network link environment based on spice protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110233771A CN110233771A (en) | 2019-09-13 |
CN110233771B true CN110233771B (en) | 2022-05-24 |
Family
ID=67860192
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910301448.XA Active CN110233771B (en) | 2019-04-15 | 2019-04-15 | Method and device for judging network link environment based on spice protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110233771B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104808810A (en) * | 2015-05-08 | 2015-07-29 | 三星电子(中国)研发中心 | Method and mobile terminal for performing mouse input |
CN105306303A (en) * | 2015-11-09 | 2016-02-03 | 上海斐讯数据通信技术有限公司 | Fault real-time monitoring system based on terminal network device, and terminal network device |
CN108989845A (en) * | 2018-07-03 | 2018-12-11 | 凯尔博特信息科技(昆山)有限公司 | A kind of video transmission method based on SPICE protocol |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6280435B2 (en) * | 2014-04-28 | 2018-02-14 | 富士通コンポーネント株式会社 | Program, relay device, and information processing device |
-
2019
- 2019-04-15 CN CN201910301448.XA patent/CN110233771B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104808810A (en) * | 2015-05-08 | 2015-07-29 | 三星电子(中国)研发中心 | Method and mobile terminal for performing mouse input |
CN105306303A (en) * | 2015-11-09 | 2016-02-03 | 上海斐讯数据通信技术有限公司 | Fault real-time monitoring system based on terminal network device, and terminal network device |
CN108989845A (en) * | 2018-07-03 | 2018-12-11 | 凯尔博特信息科技(昆山)有限公司 | A kind of video transmission method based on SPICE protocol |
Also Published As
Publication number | Publication date |
---|---|
CN110233771A (en) | 2019-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10409251B2 (en) | Automatic inspection and monitoring method based on time domain slotting control | |
CN108804302B (en) | Remote testing method, system and related equipment | |
US11509505B2 (en) | Method and apparatus for operating smart network interface card | |
CN109714221B (en) | Method, device and system for determining network data packet | |
EP3368997A1 (en) | Network aware distributed business transaction anomaly detection | |
CN103533016A (en) | Broadband network speed measuring and intelligent analyzing system | |
CN110445667B (en) | Link delay detection method, device, storage medium and terminal | |
WO2021129335A1 (en) | Operation monitoring method and apparatus, operation analysis method and apparatus | |
US9935853B2 (en) | Application centric network experience monitoring | |
CN111669447A (en) | Page display method, device, equipment and medium | |
CN113238951A (en) | Software barrier-free automatic test system and test method thereof | |
CN114327201B (en) | Cloud mobile phone control method and device and computer equipment | |
JP2006236046A (en) | Client device, server device and screen display method | |
CN110233771B (en) | Method and device for judging network link environment based on spice protocol | |
CN112838980B (en) | Message processing method, system, device, electronic equipment and storage medium | |
CN101339473A (en) | Mouse synchronization process, system and server | |
CN113747482A (en) | Method, system and terminal equipment for detecting and analyzing service network | |
KR100792241B1 (en) | Recording method and system of remote integrating | |
CN107656816A (en) | Multi-terminal synchronous operation method and device | |
CN102882697A (en) | Message receiving method of multi-client end of network management system based on callback system | |
CN112764998A (en) | Heterogeneous simulation system and real-time monitoring method thereof | |
CN111698333A (en) | Remote control method, server and system | |
CN108170390B (en) | Interaction method and system for switching display by remote control | |
CN109379257A (en) | A kind of network monitoring method and system with time algorithm | |
CN113282186B (en) | Method for self-adapting HID touch screen into keyboard mouse |
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 |