欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > DOC文档下载  

    一种基于TCPIP协议的有效远程控制系统.doc

    • 资源ID:2400559       资源大小:377KB        全文页数:11页
    • 资源格式: DOC        下载积分:8金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要8金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    一种基于TCPIP协议的有效远程控制系统.doc

    2008 International Conference on Advanced Computer Theory and Engineering2008年高级计算机理论与控制工程国际会议An Effective Remote Control System Based On TCP/IP一种基于TCP / IP协议的有效远程控制系统Xueyu GengSchool of Civil Engineering 土木工程学院Qingdao Technological University 青岛理工大学Qingdao, 266033, China 中国青岛 26603gengxy gengxyShunyao Wu, Jinlong Wang, and Peng LiSchool of Computer Engineering 计算机工程学院Qingdao Technological University 青岛理工大学Qingdao, 266033, China 中国青岛 266033wangjinlong wangjinlongWith the network technology development, remote technology is gradually occupying the technology mainstream. It has become more and more popular in the home officeand distance education. The rapid development provides a broad world to the remote control software. Pcanywhere,damewhere, QQ Remote Assistance, and other remote control software have emerged. In remote control, improving efficiency and ensuring accuracy of the transmission are paramount to evaluate the success of a remote control software.This paper has developed a remote control system,and focuses on intercepting the control and the images, and TCP-stick packages. Solving these problems well is useful to improve the efficiency of the system and ease the pressureon network. Finally, through analysis and experiments, methods are proved to be effective.随着网络技术的发展,远程技术逐渐占据了技术的主流。对在家里办公和远程教育的人来说,它已经变得越来越受欢迎。它的快速发展为远程控制软件提供了广阔的天地。PcAnywhere, damewhere, QQ远程协助及其他远程控制软件已经出现,在远程控制领域,提高效率和确保准确的传输对评价一个远程控制软件的成功与否是极为重要的。本文描述了一种远程控制系统,并侧重于拦截控制、图像及TCP粘包。有效的解决这些问题,有利于提高系统的效率和缓解网络的压力。最后,通过分析和试验,方法被证明是有效的。1. Introduction1. 引言The rapid development of network technology, home office and distance education provides a broad world to the remote control software. As early as 1998, IDC expected the remote control software market would be the third fastest growing area in the consumer market which was supported by the software technology 1.随着网络技术的飞速发展,家庭办公和远程教育为远程控制软件提供了广阔的天地。早在1998年,IDC就预测远程控制软件的市场将是第三个由软件技术支持的消费市场里增长最快的领域。Remote control 1, 2, 3, 4 is a technology that administrators connect the target computer through the network by remote dialing or the way that both dial into Internet, then manage and maintain the remote computers by local host 1. The remote control software is based on the Client/Server model oriented towards connection agreement(TCP/IP). It includes a server program installed on the client, and a client program on the host. The general operating principle of remote control is shown in Figure 1.远程控制是一种管理员通过远程拨号上网或双方拨号接入Internet的方式连接目标计算机,然后通过本地主机管理和维护远程计算机的技术。远程控制软件是基于客户机/服务器模式面向连接协议(TCP / IP)。它包括安装在客户端上的服务器程序和在主机上的客户端程序。远程控制的基本工作原理见图1。Figure 1. One-to-one network topology remote control.图1 一对一远程控制网络拓扑图First of all, the client should set two kinds of authorities of passwords, and tell the IP address and password to the host.After building the connection, the host should set the image quality and FPS (frames per second). Then, the client captures the screen, compresses the images and sends the images to the host. After receiving the screen images, the host can watch the screen of the client. Finally, the host can control the client. When the host operates on the graphical interface, the mouse action and the keyboard input should be packaged to the client. The client operates the information,and sends the screen images to the host, and so on.首先,客户应设置两种类型的密码权限,告诉主机IP地址和密码。建立连接后,主机应设置图像质量和FPS(帧每秒),然后,客户端捕获屏幕,压缩图像并将图像传送到主机。收到屏幕图像后,主机可以查看客户端的屏幕。最后,主机可以控制客户端。当主机在图形界面上进行操作,鼠标的操作和键盘的输入被打包到客户端。客户端运行这些信息,并将屏幕图像等发送到主机。According to the basic process of the remote control as shown in Figure 1, the paper developed a remote control software, focused on intercepting the control and the images, and TCP-stick packages. Solving these problems well is useful to improve the efficiency of the system and ease the pressure on network. Finally, with analysis and experiments, methods are proved to be effective.依据如图1所示的远程控制的基本过程,本论文描述了一个远程控制软件,侧重于拦截控制、图像及TCP粘包。有效的解决这些问题,有利于提高系统的效率和缓解网络的压力。最后,通过分析和试验,方法被证明是有效的。The rest of the paper is organized as follows. Section 2 introduces the overview framework of remote control system and the function of each subsystem. The detailedmethod to solve the control interception will be introduced in Section 3, and the method to solve the image capture and the image display is described in Section 4, and the solution of the TCP-stick packages in Section 5. The experimentalanalysis is described in Section 6. The paper is concluded in the last section.本文的其余部分具体如下。第2部分介绍远程控制系统的框架概述和各子系统的功能。第3部分介绍控制拦截的详细的解决方法,第4部分介绍图像采集和图像显示的解决方法,第5部分介绍TCP粘包解决方案,第6部分中介绍实验分析,论文最后部分得出结论。2. Overview Framework2. 框架概述Figure 2. The relations among the six subsystems.图2 六个子系统之间的关系The paper divided remote control system into six subsystems, authority subsystem, communications subsystem,captured images subsystem, images display subsystem, intercepted control subsystem, and simulation control subsystem.Figure 2 is a brief diagram of the relations among the six subsystems.本文将远程控制系统分为六个子系统,权限子系统、通信子系统、捕捉图像子系统、图像显示子系统、截获控制子系统及仿真控制子系统。图2是六个子系统关系的简要图。The functions of the six subsystems are as follows:六个子系统的功能如下:1. Authority subsystem manages the user authority. The client can set two kinds of passwords, one only to watch and the other to control. Two kinds of passwords are stored in the document after encrypted. The host inputs the respective password to get the appropriate authority.1. 权限子系统管理用户的权限。客户端可以设置两种密码权限,一种只浏览,另一种可控制。两种类型的密码都存储在加密后的文件里。主机输入相应的密码以获得相应的权限。2. Communications subsystem is primarily responsible for communications between the host and the client.The subsystem is divided into host and client module. Host module is mainly responsible for transmitting the image information to the client, while client module is mainly responsible for transmitting the mouse action and the keyboard input to the host.2. 通信子系统主要负责主机和客户端的沟通。该子系统分为主机和客户端模块。主机模块主要负责向客户端传输图像信息,而客户端模块主要负责向主机传递鼠标操作和键盘输入命令。3. Intercepted control subsystem intercepts the mouse action and the keyboard of the host, and gives these information to host module of communications subsystemafter packaging them. Then, host module transmit these information to the client.3. 截获控制子系统截取主机的鼠标操作和键盘输入,打包后向通信子系统的主机模块给出了这些信息,然后,主机模块发送这些信息给客户端。4. Simulation control subsystem obtains the mouse action and the keyboard input from client module of communications subsystem.4. 仿真控制子系统获得来自通信子系统客户端模块的鼠标操作和键盘输入。5. Captured images subsystem calls the function to capture screen in the client, and stores the images formatted in BMP in memory, and converts BMP images toJPEG images, in order to facilitate the rapid transmission on the network.5. 捕捉图像子系统在客户端调用函数捕获屏幕,将图像以BMP格式存储在内存中,并且为了便于在网络上迅速传播,将BMP图像转换为JPEG图像。6. Images display subsystem reverts the data received from communications subsystem to JPEG images, and converts them to BMP images, and displays these images on the screen in the host.6. 图像显示子系统将来自通信子系统的数据还原为JPEG格式图像,并将其转换为BMP格式图像,在主机屏幕上显示这些图像。3. Intercepted Control Subsystem3. 截获控制子系统Generally speaking, intercepted control subsystem is mainly responsible for the interception of the mouse action and keyboard input. The intercepted accuracy will directly affect the accuracy of simulation control subsystem. For example, users move the mouse to the location of a folders over the graphical interface, while the coordinates of the mouse is (0,0). Then double click operates it, but coordinatesof the mouse which is got by intercepted control subsystem is (1,0). This may result in errors that the client can not correctly implement, and is unable to open the selectedfolder. In addition, when the subsystem intercepts information, it should be payed a lot attentions on the validity.We can avoid intercepting unnecessary information toimprove the efficiency. When authentication successes and user operate the host, intercepted control subsystem should take different measures by user authority. If the authority is to control, it will intercept the mouse action and keyboard input; if not, it will not. Once intercepted control subsystem intercept the mouse action and keyboard input, the problem of the interception field should be put first. When user operatesthe host, it will never be always intercepted. Some other things may be solved. If intercepted control subsystem do not fix the interception field, some useless information will be intercepted. This will result in some very difficult problems that simulation control subsystem is difficult to design and implement. In addition, it will reduce the efficiency.一般来说,截获控制子系统主要负责鼠标操作和键盘输入的拦截。被拦截的精度将直接影响仿真控制子系统的精度。例如,用户移动鼠标到一个文件夹的图形界面位置,鼠标的坐标是(0,0),然后双击运行它,但截取图像子系统上的鼠标的坐标变为(1,0)。这可能因为错误导致客户端不能正确执行,并且无法打开选定的文件夹。此外,当子系统截取信息时,应当多关注有效性。我们可以避免不必要的信息拦截进而提高效率。当身份验证成功,用户操作主机时,截获控制子系统应当通过用户权限采取不同的措施应对。如果权限是控制,它会拦截鼠标操作和键盘输入,反之,则不会。一旦截获控制子系统拦截鼠标操作和键盘输入,截取领域出现的问题应放在一位。当用户操作主机,它将永远不会被截获。一些其他的事情可能得到解决。如果拦截控制子系统不能控制拦截领域,一些无用的信息将被拦截。这将导致出现一些非常棘手的问题,仿真控制子系统将很难设计和实施。此外,它会降低工作效率。In order to solve the problem about the interception field, the paper tried several measures:为了解决拦截领域出现的问题,本文尝试了几种措施:1. With hook to achieve the interception of mouse actionand keyboard input. The basis for determining the interception field, two points must be met at the same time.1.将鼠标操作和键盘输入挂钩实现拦截。确定拦截领域的基础是,以下两点必须同时满足。 Intercepting only if the system window is active; If the system window is active, the position of the mouse should be in the working area.仅在系统的窗口处于活动状态时拦截如果系统窗口处于活动状态,鼠标的位置应在工作区表1 3种方法的比较复杂性困难性效率方法1困难更难低方法2容易更难低方法3容易-高2. With the functions such as PreTranslateMessag, WindowsProc and so on to intercept. Although implementing these functions is easier than hook, the interceptedinformation is almost all the windows messages. Thus choosing this method should do the same work as the above one.2. 如拦截PreTranslateMessag,WindowsProc的功能等。虽然实施这些功能比挂钩容易,被拦截的几乎所有都是Windows信息。因此,选择此方法应做上述同样的工作之一。3. Overloading the mouse message function of CView class; while the keyboard input is also intercepted by the function PreTranslateMessag. The mouse messagefunctions are the member functions of CView class.Only if the mouse move in the working area, interception is doing. In this way, there is no need to determinewhether the mouse is in the working area. The method saves time and space, and improves efficiency.3.重载CView类的鼠标消息功能,而键盘输入也是由函数PreTranslateMessag截获。鼠标消息函数是CView类的成员函数。只有当鼠标在工作区移动,拦截才是有效的。用这种方法,没有必要再确定鼠标是否在工作区。该方法节省了时间和空间,提高了效率。Table 1 analyzes and compares three methods from the complexity, the difficulty to intercept field and efficiency.As a result, this paper selected the third method. Themethod is easy to implement, does not determine the interception field and has a higher efficiency.表1分析和比较三种方法的复杂性,拦截领域的难易度和效率。因此,本文选择了第三种方法。该方法容易实现,不决定拦截领域,具有更高的效率。4. Capture and Display Images4. 捕捉和显示图像In the development of captured images subsystem and images display subsystem, we should put the use of bandwidth first. As remote control system is mainly used forLAN transmission1. The transmission speed in local area network is usually 10 Mbps to 100Mbps. Therefore, the transmission bandwidth should reach 10Mbps. The clientshould set the image quality and the transmission speed on the basis of network bandwidth. The captured images are stored in BMP format. Each 1024*768 BMP with 24-bit color graphics needs more than 2MB space. Even if the transmission fps is 1 fps, the bandwidth needs reach at least 16 Mbps, far more than 10 Mbps. So the images must be compressed before transmission.随着捕获图像子系统和图像显示子系统的发展,我们应该把它首先应用于宽带。远程控制系统主要用于局域网的传输1。在局域网的传输速度一般为10 Mbps到100Mbps的。因此,要达到10Mbps的传输带宽。客户应在网络宽带的基础上设置图像质量和传输速度。截获的图像存储为BMP格式。每个24彩色的1024*768的BMP图像需要超过2MB的空间。即使是一帧帧传输,需要的带宽至少达到16 Mbps,远远超过10 Mbps。因此,图像必须压缩后传输。After capturing the images, the system will store them in a certain format, such as BMP, JPEG. The two methods are different. Although using BMP is easy, data traffic need a harsh bandwidth, and scalability is not strong. It is not conductive to operate in the future. However, JPEG compression is convenient, with large compression ratio and small distortion. Therefore, the paper made use of CXImage class library to compress JPEG.拍摄的照片后,系统会存储在一个特定格式,如BMP,JPEG格式。这两种格式是不同的。虽然BMP使用容易,但需要一个较大的数据流量的带宽,可扩展性不强。这在未来不利于经营。然而,JPEG压缩方便,拥有大压缩比和失真小的特点。因此,本文使用CxImage类库压缩JPEG图像。After captured images subsystem does the screen-shot, it will pass the image formatted in memory block to the Cx-Image category formatted. CxImage class can immediately convert the memory blocks to JPEG image. With CxImage class, system will do a JPEG compression operation. The process sets the compression quality, from 0 to 100 (the numerical representation for image quality). After compression,communications subsystem will send them to the host.通过截获图像子系统截图后,它会通过在内存块格式化为CxImage的图像类型。CxImage可以立即将内存块转换为JPEG图像。系统用CxImage做一个JPEG压缩操作。该程序压缩质量从0到100(图像质量数值表示)。压缩后,通信子系统将它们发送到主机。Secondly, we should solve how to make users convenient to set image quality, transmission speed and so on. If we compress the images in a fixed proportion following the same pattern, and do not consider the state of users network,it may happen that users whos bandwidth is low feel the screen is not coherent, while users whos bandwidth is high feel image quality is not good. Therefore, in the actualuse process, users should be able to adjust the image compression level according to the current state of the network.其次,我们要解决如何使用户方便地设置图像质量、传输速度等问题。如果我们压缩在一个固定比例的图像千篇一律,不考虑用户的网络状态,有可能发生有些用户带宽感觉画面不连贯,有些用户感觉宽带感觉图像质量不好。因此,在实际使用过程中,用户应该能够根据网络当前状态调整图像的压缩级别。Thirdly, we should consider the transmission number per second. On the basis of different purposes, different realtime levels is need. So, it need users to set the imagefps. When a user requests high realtime level, the image fps should be improved. Then, the change of the image will be faster, and the user needs will be met.第三,我们在不同用途不同实时级别的基础上应该考虑每秒传输次数是很必要的。因此,用户需要设置图像帧。当用户要求高的水平,图像的FPS应该加以改进。这样,图像的变化会更快,用户需求将得到满足。In the middle level compression, a 1024*768 JPEG image whos plans are 32 color need only 80 KB. In the 4/s fps, occupied bandwidth is about 2.5 Mbps. It is good to adapt to the local area network bandwidth requirements, and image quality and fluency can meet users requirements.中间级别压缩的时候,计划是32色彩的1024 * 768的JPEG图像只需要80 KB。4/s帧时,占用带宽大约是2.5 Mbps。这能很好的适应本地区域网络带宽的要求,满足用户图像质量和流畅度的要求。5. The Solution of TCP-stick Packages5.TCP粘包的解决方案Communications subsystem is responsible for communication between the client and the host. Firstly, the subsystem is necessary to ensure the accuracy of the data transmission, avoiding data loss. However, if you use the default TCP protocol, the interception information can not be completely simulat

    注意事项

    本文(一种基于TCPIP协议的有效远程控制系统.doc)为本站会员(laozhun)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开