CN113433860A - Desktop remote control method and system - Google Patents

Desktop remote control method and system Download PDF

Info

Publication number
CN113433860A
CN113433860A CN202110714282.1A CN202110714282A CN113433860A CN 113433860 A CN113433860 A CN 113433860A CN 202110714282 A CN202110714282 A CN 202110714282A CN 113433860 A CN113433860 A CN 113433860A
Authority
CN
China
Prior art keywords
server
client
sends
desktop
control
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.)
Pending
Application number
CN202110714282.1A
Other languages
Chinese (zh)
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.)
Shandong Qilu Shutong Technology Co ltd
Original Assignee
Shandong Qilu Shutong Technology 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 Shandong Qilu Shutong Technology Co ltd filed Critical Shandong Qilu Shutong Technology Co ltd
Priority to CN202110714282.1A priority Critical patent/CN113433860A/en
Publication of CN113433860A publication Critical patent/CN113433860A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23051Remote control, enter program remote, detachable programmer

Abstract

The invention discloses a desktop remote control method and a system, wherein the method comprises the following steps: after the server side determines that the client side is legal by comparing the consistency of the control codes, the server side and the control side establish remote control connection; the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side; the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate; and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side. The invention can provide remote control assistance for users, provides click and typing functions by remotely controlling the user computer, finishes troubleshooting and demonstration scenes and provides convenience for the users.

Description

Desktop remote control method and system
Technical Field
The invention relates to the technical field of remote control, in particular to a desktop remote control method and system.
Background
The software service is a software service mode which integrally packages management software and implementation services and comprises the integration of items for providing mature software products, high-quality implementation training services, enterprise management consultation services, later-stage continuous promotion services and the like.
However, when providing software services, manual communication is required under complex conditions, such as troubleshooting and demonstration functions, but manual communication is very inefficient, and the requirements of users cannot be met.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The invention mainly aims to provide a desktop remote control method and a desktop remote control system, and aims to solve the problems that manual communication is needed under complex conditions, such as troubleshooting and demonstration functions, when software services are provided in the prior art, but the manual communication is very inefficient and cannot meet the requirements of users.
In order to achieve the above object, the present invention provides a desktop remote control method, which comprises the following steps:
after the server side determines that the client side is legal by comparing the consistency of the control codes, the server side and the control side establish remote control connection;
the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side;
the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate;
and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side.
Optionally, the desktop remote control method, wherein after the server determines that the client is a legal identity by comparing consistency of the control codes, the server and the control end establish a remote control connection, specifically including:
the server generates a first control code in advance and stores the first control code;
the client establishes communication connection with the WebSocket service of the server;
the client sends a second control code to the server, and the server compares the second control code with the first control code after receiving the second control code;
and when the second control code is consistent with the first control code, the server side confirms the legal identity of the client side and sends a notice of successful remote control to the client side through WebSocket service.
Optionally, the method for remotely controlling a desktop, wherein the client sends offsetsdp to the server, and the server captures a desktop video stream and sends answerSDP to the client, specifically includes:
the client creates OfferSDP and sends the OfferSDP to the server through WebSocket service;
after receiving OfferSDP, the server generates answerSDP and captures desktop video stream;
and the server side sends answerSDP to the client side through WebSocket service.
Optionally, the method for remotely controlling a desktop, wherein the client sends candidate to the server, and the server establishes a point-to-point connection with the client according to the candidate, specifically includes:
the client creates candidate and sends the candidate to the server through WebSocket service;
and after receiving the candidate, the server adds a connected agent according to the information in the candidate and establishes point-to-point connection with the client.
Optionally, the method for remotely controlling a desktop, wherein the server sends the desktop video stream to the client, and the client plays the desktop video stream and sends a control instruction to the server, specifically including:
the server side sends the desktop video stream to the client side through WebRTC;
the client sets the srcObject of the video tag to point to the desktop video stream sent by the server, and calls a play method to play the desktop video stream;
after the WebRTC connection is established between the client and the server, the client sends a control instruction to the server through the datachannel.
Optionally, in the desktop remote control method, the first control code and the second control code are both 6-bit random numbers.
Optionally, in the method for desktop remote control, the server side captures a desktop video stream through an Electron.
In addition, to achieve the above object, the present invention further provides a desktop remote control system, wherein the desktop remote control system includes: a server and a client;
after the server side determines that the client side is a legal identity by comparing the consistency of the control codes, the server side and the control side establish remote control connection;
the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side;
the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate;
and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side.
In the invention, after the server side determines that the client side is a legal identity by comparing the consistency of the control codes, the server side and the control side establish remote control connection; the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side; the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate; and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side. The invention can provide remote control assistance for users, provides click and typing functions by remotely controlling the user computer, finishes troubleshooting and demonstration scenes and provides convenience for the users.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of a desktop remote control method of the present invention;
FIG. 2 is a schematic diagram of a preferred embodiment of the desktop remote control system of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. 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 and 2, the desktop remote control method according to the preferred embodiment of the present invention includes the following steps:
and step S10, after the server side determines that the client side is a legal identity by comparing the consistency of the control codes, the server side and the control side establish remote control connection.
Specifically, the step S10 includes:
s11, the server generates a first control code in advance and stores the first control code;
s12, the client side establishes communication connection with the WebSocket service of the server side;
s13, the client sends a second control code to the server, and the server compares the second control code with the first control code after receiving the second control code;
and S14, when the second control code is consistent with the first control code, the server side confirms the legal identity of the client side and sends a notice of successful remote control to the client side through WebSocket service.
In fig. 2, the control peer is the client (i.e., master terminal), and the puppet peer is the server (i.e., controlled terminal); the service node (puppet node) generates and stores a first control code in advance, wherein the first control code is a random number with 6 bits, the client (control end) establishes a communication connection with a WebSocket service of the server (puppet end), where the WebSocket is a communication protocol supporting bidirectional data transmission between the server (puppet end) and the client (control end), the client (control end) sends a second control code to the server (puppet end), wherein the second control code is a 6-bit random number, and the service node (puppet node) compares the second control code with the first control code after receiving the second control code, when the second control code matches the first control code, the server (puppet) confirms the legal identity of the client (control peer), and sending a notification of successful remote control to the client (control end) through the WebSocket service.
And step S20, the client sends OfferSDP to the server, and the server captures desktop video stream and sends answerSDP to the client.
Specifically, the step S20 includes:
s21, the client creates OfferSDP and sends the OfferSDP to the server through WebSocket service;
s22, after receiving OfferSDP, the server generates answerSDP and captures desktop video stream;
and S23, the server side sends answerSDP to the client side through WebSocket service.
As shown in fig. 2, the client (control end) calls rtp peerconnection. createoffer () to create offsetsdp, sends the offsetsdp to the service end (puppet end) through a WebSocket service, and after calling setLocalDescription, the client (control end) requests to create candidate, where the candidate includes information about network connection and specifies available methods for direct communication between clients or communication through a server; after the server (puppet end) receives the offer sdp, an answer sdp is created (generated) through rtcpeerconnection.createeanswer (), a desktop video stream is captured through navigator.media.getusermedia (), then setLocalDescription is called to record the answer sdp as a local description, at this time, the server (puppet end) already knows the configuration of both sides of connection, the server (puppet end) sends the answer sdp to the client (control end) through WebSocket service, the client (control end) calls rtcpeerconnection.settemodetction () to record the answer sdp as a remote description, and at this time, the client (control end) also knows the connection configuration of both sides.
Wherein, OfferSDP and answerSDP respectively include the sent media type, format, transmission protocol, IP address and port of the end point and other information needed for describing the media transmission power-off.
Further, the server side (puppet side) captures the desktop video stream through Electron, which is a desktop application that uses JavaScript, HTML, and CSS to build a cross-platform. Js and chrome based, used by Atom editors and many other applications.
And step S30, the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate.
Specifically, the step S30 includes:
s31, the client creates candidate and sends the candidate to the server through WebSocket service;
and S32, after receiving the candidate, the server adds a connection agent according to the information in the candidate and establishes point-to-point connection with the client.
As shown in fig. 2, the client (control peer) creates candidate, and sends candidate to the service peer (puppet peer) through WebSocket service, and after receiving candidate, the service peer (puppet peer) calls an adduceCandidate method to add a connected proxy according to the information in canddidate, and establishes a peer-to-peer connection with the client (control peer).
And step S40, the server sends the desktop video stream to the client, and the client plays the desktop video stream and sends a control instruction to the server.
Specifically, the step S40 includes:
s41, the server side sends the desktop video stream to the client side through WebRTC;
s42, the client sets the srcObject of the video label to point to the desktop video stream sent by the server, and calls a play method to play the desktop video stream;
and S43, after the client side and the server side establish the WebRTC connection, the client side sends a control instruction to the server side through the datachannel.
As shown in fig. 2, the server (puppet side) sends the desktop video stream to the client (control side) by using the addStream method of WebRTC, where WebRTC is a technology supporting voice/video communication and data sharing between browser clients; the client (control end) sets the srcObject of the video label to point to the desktop video stream sent by the server (puppet end), calls a play method to play the desktop video stream, and after the client (control end) and the server (puppet end) establish a WebRTC connection, the client (control end) sends a control instruction to the server (puppet end) through a datachannel.
The dataChannel is a method for the clients to mutually transmit any type of data after establishing the WebRTC connection.
The invention can realize the capture of desktop stream of the user through the Electron, realize the connection and instruction transmission between the picture and the user through WebRTC and WebSocket, and realize the response to the keyboard and mouse events of the user computer through robotjs.
Further, as shown in fig. 2, based on the desktop remote control method, the present invention further provides a desktop remote control system, wherein the desktop remote control system includes: a server and a client.
After the server side determines that the client side is a legal identity by comparing the consistency of the control codes, the server side and the control side establish remote control connection; the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side; the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate; and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side.
Specifically, the server generates a first control code in advance and stores the first control code; the client establishes communication connection with the WebSocket service of the server; the client sends a second control code to the server, and the server compares the second control code with the first control code after receiving the second control code; and when the second control code is consistent with the first control code, the server side confirms the legal identity of the client side and sends a notice of successful remote control to the client side through WebSocket service.
Specifically, the client creates an OfferSDP and sends the OfferSDP to the server through WebSocket service; after receiving OfferSDP, the server generates answerSDP and captures desktop video stream; and the server side sends answerSDP to the client side through WebSocket service.
Specifically, the client creates candidate and sends candidate to the server through WebSocket service; and after receiving the candidate, the server adds a connected agent according to the information in the candidate and establishes point-to-point connection with the client.
Specifically, the server side sends the desktop video stream to the client side through WebRTC; the client sets the srcObject of the video tag to point to the desktop video stream sent by the server, and calls a play method to play the desktop video stream; after the WebRTC connection is established between the client and the server, the client sends a control instruction to the server through the datachannel.
In summary, the present invention provides a desktop remote control method and system, where the method includes: after the server side determines that the client side is legal by comparing the consistency of the control codes, the server side and the control side establish remote control connection; the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side; the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate; and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side. The invention can provide remote control assistance for users, provides click and typing functions by remotely controlling the user computer, finishes troubleshooting and demonstration scenes and provides convenience for the users.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The computer readable storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (8)

1. A desktop remote control method is characterized by comprising the following steps:
after the server side determines that the client side is legal by comparing the consistency of the control codes, the server side and the control side establish remote control connection;
the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side;
the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate;
and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side.
2. The desktop remote control method according to claim 1, wherein after the server determines that the client is a legal identity by comparing consistency of the control codes, the server establishes a remote control connection with the control terminal, and specifically includes:
the server generates a first control code in advance and stores the first control code;
the client establishes communication connection with the WebSocket service of the server;
the client sends a second control code to the server, and the server compares the second control code with the first control code after receiving the second control code;
and when the second control code is consistent with the first control code, the server side confirms the legal identity of the client side and sends a notice of successful remote control to the client side through WebSocket service.
3. The desktop remote control method according to claim 2, wherein the client sends offsetsdp to the server, and the server captures a desktop video stream and sends answerSDP to the client, specifically comprising:
the client creates OfferSDP and sends the OfferSDP to the server through WebSocket service;
after receiving OfferSDP, the server generates answerSDP and captures desktop video stream;
and the server side sends answerSDP to the client side through WebSocket service.
4. The desktop remote control method according to claim 3, wherein the client sends candidate to the server, and the server establishes a point-to-point connection with the client according to candidate, specifically comprising:
the client creates candidate and sends the candidate to the server through WebSocket service;
and after receiving the candidate, the server adds a connected agent according to the information in the candidate and establishes point-to-point connection with the client.
5. The desktop remote control method according to claim 4, wherein the server sends the desktop video stream to the client, and the client plays the desktop video stream and sends a control instruction to the server, specifically including:
the server side sends the desktop video stream to the client side through WebRTC;
the client sets the srcObject of the video tag to point to the desktop video stream sent by the server, and calls a play method to play the desktop video stream;
after the WebRTC connection is established between the client and the server, the client sends a control instruction to the server through the datachannel.
6. A desktop remote control method according to claim 2, wherein the first control code and the second control code are both random numbers of 6 bits.
7. The desktop remote control method of claim 1, wherein the server side captures a desktop video stream through Electron.
8. A desktop remote control system, the desktop remote control system comprising: a server and a client;
after the server side determines that the client side is a legal identity by comparing the consistency of the control codes, the server side and the control side establish remote control connection;
the client side sends OfferSDP to the server side, and the server side captures desktop video streams and sends answerSDP to the client side;
the client sends candidate to the server, and the server establishes point-to-point connection with the client according to the candidate;
and the server side sends the desktop video stream to the client side, and the client side plays the desktop video stream and sends a control instruction to the server side.
CN202110714282.1A 2021-06-25 2021-06-25 Desktop remote control method and system Pending CN113433860A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110714282.1A CN113433860A (en) 2021-06-25 2021-06-25 Desktop remote control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110714282.1A CN113433860A (en) 2021-06-25 2021-06-25 Desktop remote control method and system

Publications (1)

Publication Number Publication Date
CN113433860A true CN113433860A (en) 2021-09-24

Family

ID=77754799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110714282.1A Pending CN113433860A (en) 2021-06-25 2021-06-25 Desktop remote control method and system

Country Status (1)

Country Link
CN (1) CN113433860A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150039760A1 (en) * 2013-07-31 2015-02-05 Avaya Inc. Remotely controlling web real-time communications (webrtc) client functionality via webrtc data channels, and related methods, systems, and computer-readable media
CN104618435A (en) * 2014-12-29 2015-05-13 北京奇虎科技有限公司 Method for achieving remote desktops and remote desktop management system
CN106161571A (en) * 2015-04-27 2016-11-23 Tcl集团股份有限公司 The remote operation method of a kind of sing on web RTC and system
US20180049023A1 (en) * 2016-08-14 2018-02-15 Liveperson, Inc. Systems and methods for real-time remote control of mobile applications
CN111459437A (en) * 2020-04-01 2020-07-28 杭州盈高科技有限公司 Control method, controlled end, control end and system of remote screen
CN112073750A (en) * 2020-09-14 2020-12-11 浙江源创建筑智能科技有限公司 Remote desktop control method and system
CN112134874A (en) * 2020-09-17 2020-12-25 武汉轻工大学 Data transmission method, terminal device, server, system and storage medium
CN112601043A (en) * 2020-12-07 2021-04-02 焦点科技股份有限公司 Method for remote desktop control based on webRTC
CN112738644A (en) * 2021-04-01 2021-04-30 浙江华创视讯科技有限公司 Video stream transmission method and device based on WebRTC

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150039760A1 (en) * 2013-07-31 2015-02-05 Avaya Inc. Remotely controlling web real-time communications (webrtc) client functionality via webrtc data channels, and related methods, systems, and computer-readable media
CN104618435A (en) * 2014-12-29 2015-05-13 北京奇虎科技有限公司 Method for achieving remote desktops and remote desktop management system
CN106161571A (en) * 2015-04-27 2016-11-23 Tcl集团股份有限公司 The remote operation method of a kind of sing on web RTC and system
US20180049023A1 (en) * 2016-08-14 2018-02-15 Liveperson, Inc. Systems and methods for real-time remote control of mobile applications
CN111459437A (en) * 2020-04-01 2020-07-28 杭州盈高科技有限公司 Control method, controlled end, control end and system of remote screen
CN112073750A (en) * 2020-09-14 2020-12-11 浙江源创建筑智能科技有限公司 Remote desktop control method and system
CN112134874A (en) * 2020-09-17 2020-12-25 武汉轻工大学 Data transmission method, terminal device, server, system and storage medium
CN112601043A (en) * 2020-12-07 2021-04-02 焦点科技股份有限公司 Method for remote desktop control based on webRTC
CN112738644A (en) * 2021-04-01 2021-04-30 浙江华创视讯科技有限公司 Video stream transmission method and device based on WebRTC

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘志强: "跨异构终端的WebRTC移动多媒体技术研究", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *

Similar Documents

Publication Publication Date Title
US20240022612A1 (en) Systems and methods for dynamic connection management
CN101960822B (en) SIP-HTTP application correlator
EP2514139B1 (en) System and method of multi-media conferencing between universal plug and play (upnp) enabled telephony devices and wireless area network (wan) devices
US20070133773A1 (en) Composite services delivery
US8301699B1 (en) Dynamically enabling features of an application based on user status
US20200404031A1 (en) System and method for providing a media communication conversation service
US20130282820A1 (en) Method and System for an Optimized Multimedia Communications System
CN111147506A (en) Method, system and storage device for playing streaming media data based on HTML5
US20070136449A1 (en) Update notification for peer views in a composite services delivery environment
US20070133769A1 (en) Voice navigation of a visual view for a session in a composite services enablement environment
US8682969B1 (en) Framed event system and method
US20070133512A1 (en) Composite services enablement of visual navigation into a call center
EP3059945A1 (en) Method and system for video surveillance content adaptation, and central server and device
US8005934B2 (en) Channel presence in a composite services enablement environment
US11687589B2 (en) Auto-populating image metadata
US20070136420A1 (en) Visual channel refresh rate control for composite services delivery
CN105187296A (en) Studio authority acquisition method and system
US20070133508A1 (en) Auto-establishment of a voice channel of access to a session for a composite service from a visual channel of access to the session for the composite service
CN101834730A (en) Multimedia conferencing control method and system
US20070133511A1 (en) Composite services delivery utilizing lightweight messaging
CN110113623B (en) Audio and video slice transmission platform based on SIP protocol
CN101159910B (en) Synchronous present state method and cluster server and terminal for implementing the method
US20040128399A1 (en) Media stream control system and protocol
KR100823269B1 (en) Method and Apparatus for managing a State Information of Remote User Interface
CN113433860A (en) Desktop remote control method and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210924