摘 要
随着社会、科技、经济的不断发展,远程控制技术的应用范围极其广泛,并且应用领域也在不断拓展。本文在详细研究和分析了网络通信等关键技术的基础上,以Windows XP操作系统为开发平台,在MyEclipse环境下用JAVA语言开发C/S远程控制系统。
根据远程控制系统的功能需求,利用Java语言中的Socket与ServerSocket等封装类,从TCP/IP协议着手,提出一个C/S结构模式的远程屏幕控制系统方案。此方案里指出控制协议的理论基础与结构分析,着重从屏幕图像、鼠标操作与键盘操作三种类型进行对客户端与服务端的交互与通信,并以此方案为基础,成功编码与论证,使得客户端和服务端能彼此识别,而能密切地配合彼此工作。
关键词:远程控制; C/S结构模式; TCP/IP协议; 套接字
ABSTRACT
With the social, scientific, technological, economic development, remote control technology is extremely scope of application, and applications are also constantly expanding. In this paper, a detailed study and analysis of the communications network on the basis of key technologies to the Windows XP operating system for the development platform to MyEclipse environment JAVA language developed by C / S remote control.
According to the remote control system''s function demand, uses seals class and so on Java language Socket and ServerSocket, begins from the TCP/IP Protocol, to propose a Client/Server Structure Pattern long-distance screen control system plan. In this plan pointed out that the controlling agreement the rationale and the structure analysis, emphatically from the screen image, the mouse action and the keyboard operate three types to carry on to control the end with to control the end alternately with the unification, and take this plan as the foundation, the success codes and proves, causes the control end and is controlled the end to be able each other recognition, but can coordinate each other work closely.
Key words:Remote Control; Client/Server Structure Pattern; TCP/IP Protocol; Socket
目 录
摘 要 I
ABSTRACT II
1. 绪论 1
1.1 C/S远程控制的研究现状及发展前景 1
1.2课题研究的目的和意义 1
1.3 课题研究的主要内容 1
1.4 开发环境和测试环境 2
1.5 组织结构 2
2. 主要技术支持 3
2.1 Socket 3
2.2 C/S结构特点及发展 4
2.3 TCP/IP体系结构 4
2.4 多线程 6
2.5 远程控制的基本原理 7
3. C/S模式远程控制系统的设计 8
3.1 系统设计目的和需求分析 8
3.2 系统设计思想 8
3.2.1 TCP面向连接 8
3.2.2 客户-服务器模式 8
3.3 远程控制系统的实现流程 9
3.4 体系结构设计 10
3.4.1 服务端 11
3.4.2 客户端 13
4. C/S模式远程控制系统的设计实现 15
4.1 远程控制的类的设计 15
4.2 网络通信的实现 16
4.3 屏幕图象远程复制控制的实现 18
4.4 鼠标键盘控制的实现 19
4.5 DOS命令执行的实现 22
4.6 文件上传下载的实现 24
4.7 系统开机自动加载服务端程序的实现 28
5. 总结 30
5.1 系统总体评价 30
5.2 系统性能的总结 30
5.3 系统性能的理论补充 30
5.3.1 系统的安全性 30
5.3.2 检索的快速性 31
致 谢 32
参考文献 33
1. 绪论
1.1 C/S远程控制的研究现状及发展前景
目前的远程桌面控制软件比较多,如RemotelyAnywhere,PeerYou,VCN等,有些具有跨平台功能、消息传递也有一定的高效性, 具有一定的可学习性。其在家庭办公、远程技术支持,远程教学,企业内部管理等方面应用相当越来越广泛,具有一定的市场效益。在远程控制系统网络化,集成化的趋势下,C/S模式远程控制充分利用现有的网络资源,使用廉价的PC机作为控制设备,通过面向对象的、模块化的设计,以较低的成本,达到较高的使用性、可靠性和可扩展性,实现一个局域网内的C/S远程控制系统。
在技术发展飞快的现在,远程控制,无论是在工业领域、家庭办公、远程教学、还是在企业内部管理中都会发挥很重要的作用,所以决定通过一定的理论与实践知识来学习此类知识,并尝试使用Java编程语言来实现具有此类远程桌面控制软件功能,以达到解决远程控制方面问题的要求。
1.2课题研究的目的和意义
通过学习远程控制的理论知识,可更好更深地了解TCP/IP协议的底层运作,网络通信等知识,通过对远程控制的代码编写,可以加强对Java语言的编程能力与对语言的调度能力。如果对本方案进入更细致的修改与提炼,可以以某种远程控制产品的形式投入市场,产生经济效益。
1.3 课题研究的主要内容
远程控制是一个具有重要的研究价值的课题,在工业,家庭办公、企业管理等各方面都有着广泛需求,随着网络技术的进一步反战,网络速度越来越快,家庭办公、远程技术支持,远程教学和培训都将成为主流趋势。这些都为远程控制管理软件提供了一个广阔的天地。
本文利用网络通信技术实现了一个基于C/S的远程监控管理系统,程序的开发采用面向对象的开发技术,利用JAVA在Windows XP平台上开发,远程监控部分采用基于客户机/服务器的模式开发,网络通信部分采用面向连接的传输控制协议(Transmission Control Protocol,TCP),利用套接字网络通信技术开发。
论文主要进行了以下工作:
(1) C/S模式实现远程控制系统的研究
5.3 系统性能的理论补充
5.3.1 系统的安全性
远程控制系统很大程度上要考虑其安全性,为使远程被控主机的安全性能得到强有力的保障,可引进了安全策略与密码验证机制。安全性校验模块是从系统安全性方面考虑的,其目的是让客户端和服务器端建立可信联接,客户端要想完全控制服务器端的计算机,必须先通过服务器的验证取得服务器的信任。这样就可以避免一些不怀好意的人通过客户端来窃取服务器端计算机中有用的资料。本系统由于时间仓促和个人的技术知识有限,未能加入这些安全性策略。具体步骤可这样:由客户端向服务端发出共享控制请求,如果网络运转正常,服务端收到共享控制请求以后会给出一个响应信号,要求对客户端的合法身份进行验证,此时,客户端必须向服务端提供远程控制所需的合法用户账号及密码,如果服务端验证密码及账号无误,则客户端可以开始操纵服务端进行远程控制,否则,服务端拒绝客户端的控制请求。
5.3.2 检索的快速性
因系统在使用过程中是面对用户的,所以如果程序执行后,客户端可自动在网络上查询,找到网络上正在运行的服务器端,列出可被控制的计算机清单,以便更为面对对象而方便地进行远程控制就更好了。而这种功能的实现也不难,不过本人在测试过程中曾加过根据端口来搜索可用的服务端,因使用的穷举遍历方法实现,导致程序运行速度提不上去,所以去掉了,但有许多远程控制软件都能较快地动作此模块,因涉及这方面的知识有限和资料的不足,导致此模块最终放弃,希望有这方向经验的朋友可以多多指教。
Abstract
As society, technology, continuous economic development, remote control technology, extremely wide range of applications, and applications are expanding. In this paper, a detailed study and analysis of key technologies such as network communications based on the Windows XP operating system with development platform, in the MyEclipse environment, using JAVA language development C / S remote control system.
According to the remote control system functional requirements, using Java language packages such as Socket and ServerSocket classes, from the TCP / IP protocol set to propose a C / S structure model of the Remote Screen Control System. Control protocol for this program argued that the theoretical foundation and structural analysis, with emphasis from the screen images, mouse and keyboard are three types of client and server interaction and communication, and thereby as a basis, the successful encoding and argumentation, enabling client and server can identify each other, but able to work closely with each other.
Keywords: remote control; C / S structure model; TCP / IP protocol; Sockets
ABSTRACT
With the social, scientific, technological, economic development, remote control technology is extremely scope of application, and applications are also constantly expanding. In this paper, a detailed study and analysis of the communications network on the basis of key technologies to the Windows XP operating system for the development platform to MyEclipse environment JAVA language developed by C / S remote control.
According to the remote control system''s function demand, uses seals class and so on Java language Socket and ServerSocket, begins from the TCP / IP Protocol, to propose a Client / Server Structure Pattern long-distance screen control system plan. In this plan pointed out that the controlling agreement the rationale and the structure analysis, emphatically from the screen image, the mouse action and the keyboard operate three types to carry on to control the end with to control the end alternately with the unification, and take this plan as the foundation , the success codes and proves, causes the control end and is controlled the end to be able each other recognition, but can coordinate each other work closely.
Key words: Remote Control; Client / Server Structure Pattern; TCP / IP Protocol; Socket
Directory
Summary I
ABSTRACT II
1. Introduction 1
1.1 C / S Remote Control of the status quo and prospects of a
1.2 The purpose of the research and significance of a
1.3 The main content of a research project
1.4 development environment and test environment 2
1.5 Organization 2
2. The main technical support 3
2.1 Socket 3
2.2 C / S structure characteristics and development of four
2.3 TCP / IP architecture, 4
More than 2.4 thread 6
2.5 The basic principle of remote control 7
3. C / S mode Remote Control System 8
3.1 The system design objectives and requirements analysis 8
3.2 System Design Idea 8
3.2.1 TCP Connection-oriented 8
3.2.2 Client - server model 8
3.3 Remote Control System for Process 9
3.4 Architecture Design 10
3.4.1 server-side 11
3.4.2 Client 13
4. C / S mode Remote Control System Design and Implementation 15
4.1 The design of remote control''s class 15
4.2 Realization of Network Communication 16
4.3-screen images to achieve control of the remote copy 18
4.4 mouse and keyboard control to achieve 19
4.5 DOS command execution to achieve 22
4.6 Realization of uploading and downloading files 24
4.7 system boot automatically loads the server-side program to achieve 28
5. Summary 30
5.1 The overall assessment of the system 30
5.2 System Performance Summary 30
5.3 The theory of system performance to add 30
5.3.1 System Security 30
5.3.2 Fast search of 31
Thanks 32
References 33
1. Introduction
1.1 C / S Remote Control of the status quo and development prospects
The current remote desktop control software are more like RemotelyAnywhere, PeerYou, VCN, and some cross-platform functionality, messaging also has a certain efficiency, be able to learn a certain sex. Their home office, remote technical support, distance learning, enterprise management, the application of relatively more and more widely, with a certain degree of market efficiency. On the remote control system network, the trend of integration, C / S mode remote control full use of existing network resources, using low-cost PC, as a control device, through the object-oriented, modular design in order to lower costs, achieve high availability, reliability and scalability to achieve a LAN C / S remote control system.
The present rapid development in technology, remote control, both in the industrial area, home office, remote teaching, or in the internal management of enterprises in the city to play a very important role, it was decided by a certain theoretical and practical knowledge to learn such knowledge, and try to use the Java programming language to implement such a remote desktop control software with the capabilities to achieve settlement of a remote control aspects of the requirements.
1.2 The purpose and significance of the research
Remote control by learning the theory of knowledge, can be better and deeper understanding of TCP / IP protocol underlying the operation of network communication of such knowledge, through the remote control coding can enhance the ability of the Java programming language and the scheduling of language ability. If the program changes into the more detailed and refined, can be in the form of some kind of remote control products to market, resulting in economic benefits.
1.3 The main content of the research
Remote control is an important subject of research value, in the industrial, home office, business management and so on all have wide-ranging needs, with the further anti-war network technology, network speed faster and faster, home office, remote technical support , distance learning and training will become the mainstream trend. These are for remote control and management software provides a vast world.
In this paper, network communications technology which is based on C / S remote monitoring and management system, the program has been developed using object-oriented development techniques, the use of JAVA in the Windows XP platform development, remote monitoring and control part is based on client / server model of development , network communication part of the connection-oriented Transmission Control Protocol (Transmission Control Protocol, TCP), the use of socket network communication technology development.
Paper mainly for the following work:
(1) C / S mode for Remote Control System
5.3 Theory of complement system performance
5.3.1 System Security
Remote control system to a large extent have to consider their safety, for the safety performance of the remote host to be charged with a strong protection security policy could be introduced and password authentication mechanism. Security check module is the security considerations from the system, and its aim is to build client and server-side trusted connection, the client want to take complete control of server-side computer, you must first get through the server''s authentication server''s trust. This can be avoided by some people with malicious intent to steal the server-side client computer useful information. This system due to time constraints and personal technical knowledge is limited, unable to join the security policy. Concrete steps to this: from the client to the server to issue a request to share control, if the network is running normally, the server received a request to share control of the future will give a response signal, requires the client to verify the legal status, this time, the client are required to provide remote control of server required for the legitimate user account and password, if the server to verify your password and account number is correct, then the client can begin to manipulate the server-side remote control, otherwise the server rejected the client''s control over the request.
5.3.2 the rapid retrieval
A result of the system during use in the face of the user, so if the program execution, the client can automatically query the network to find a server that is running on the network side, listing can be controlled by a computer list for more face objects and easy to carry out remote control of all the better. The realization of this function is not difficult, but I am in the testing process had increased its ports to search for available according to the service side, the use of the exhaustive traversal method of implementation, not to mention cause a program to speed up, so removed, and but there are many remote control software can quickly move this module, which involve limited knowledge in this area and the lack of information, resulting in this module finally given up hope to have the experience of a friend in this direction could be the exhibitions.