[go: up one dir, main page]

CN101227428B - Application server and remote control method thereof - Google Patents

Application server and remote control method thereof Download PDF

Info

Publication number
CN101227428B
CN101227428B CN2008100047731A CN200810004773A CN101227428B CN 101227428 B CN101227428 B CN 101227428B CN 2008100047731 A CN2008100047731 A CN 2008100047731A CN 200810004773 A CN200810004773 A CN 200810004773A CN 101227428 B CN101227428 B CN 101227428B
Authority
CN
China
Prior art keywords
message
client
application server
message processing
server
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
CN2008100047731A
Other languages
Chinese (zh)
Other versions
CN101227428A (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.)
SICHUAN YUECHENG ENVIRONMENTAL PROTECTION ENERGY SAVING SCIENCE & TECHNOLOGY Co Ltd
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2008100047731A priority Critical patent/CN101227428B/en
Publication of CN101227428A publication Critical patent/CN101227428A/en
Application granted granted Critical
Publication of CN101227428B publication Critical patent/CN101227428B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种Daemon应用服务器及其远程控制方法,属于计算机远程控制领域。本发明公开的Daemon应用服务器,包括依次连接的信息接收模块、信息处理模块以及信息回馈模块,其中,信息接收模块用于并发式接收来自客户端的各种请求消息,按照接收顺序或者优先级顺序将各种请求消息发送到信息处理模块;信息处理模块用于利用系统函数处理机制响应和处理客户端的各种请求消息;信息回馈模块用于将请求消息处理结果返回给客户端。本发明实现了客户端请求与应用服务器操作系统类型无关性,同时本发明所提出的应用服务器具有非常好的可扩展性能、自动升级功能、服务代理机制以及易构造性。

Figure 200810004773

The invention discloses a Daemon application server and a remote control method thereof, belonging to the field of computer remote control. The Daemon application server disclosed by the present invention includes an information receiving module, an information processing module and an information feedback module connected in sequence, wherein the information receiving module is used to concurrently receive various request messages from the client, and send them according to the receiving order or priority order Various request messages are sent to the information processing module; the information processing module is used to use the system function processing mechanism to respond to and process various request messages from the client; the information feedback module is used to return the processing result of the request message to the client. The invention realizes that the client request has nothing to do with the operating system type of the application server, and at the same time, the application server proposed by the invention has very good scalability, automatic upgrade function, service agent mechanism and easy construction.

Figure 200810004773

Description

一种应用服务器及其远程控制方法An application server and its remote control method

技术领域technical field

本发明属于计算机远程控制领域,特别涉及一种应用服务器(Daemon)及其远程控制方法。The invention belongs to the field of computer remote control, in particular to an application server (Daemon) and a remote control method thereof.

背景技术Background technique

计算机网络技术是通信技术与计算机技术相结合的产物。计算机网络是按照网络协议,将地球上分散的、独立的计算机相互连接的集合。计算机网络技术实现了资源共享。人们可以在办公室、家里或其他任何地方,访问查询网上的任何资源,极大地提高了工作效率,促进了办公自动化、工厂自动化、家庭自动化的发展。交互式控制远程计算机系统是计算机网络技术一个重要的和基础的应用。这一应用可以让操作员在本地通过控制远程计算机系统实现在远程计算机上所作的各项操作。Computer network technology is the product of the combination of communication technology and computer technology. A computer network is a collection of interconnected distributed and independent computers on the earth according to network protocols. Computer network technology realizes resource sharing. People can access and query any resources on the Internet in the office, at home or anywhere else, which greatly improves work efficiency and promotes the development of office automation, factory automation, and home automation. Interactive control of remote computer systems is an important and basic application of computer network technology. This application allows the operator to realize various operations on the remote computer locally by controlling the remote computer system.

我们知道通信系统是由信源、信道和信宿三部分组成,在计算机网络中,客户端就作为信源,网络作为信道,服务器端作为信宿组成计算机网络通信系统。目前最流行的计算机网络应用模式有B/S、C/S两种,其中在这两种模式中B和C代表信源客户端,S代表信宿服务器端。一般在点对点的通信情况下,首先由B或C发出请求给S端,S端接收到该请求信息并根据信息的要求进行处理,然后将处理结果或资源返回给客户端。We know that the communication system is composed of three parts: source, channel and sink. In a computer network, the client is the source, the network is the channel, and the server is the sink to form a computer network communication system. At present, the most popular computer network application modes are B/S and C/S. In these two modes, B and C represent the source client, and S represents the sink server. Generally, in the case of point-to-point communication, B or C first sends a request to the S terminal, and the S terminal receives the request information and processes it according to the information requirements, and then returns the processing results or resources to the client.

目前,关于计算机网络应用模式中服务器端(S端)的设计方法不胜枚举。Daemon方式是其中的一种Server实现的方法。Daemon原指在计算机操作系统下一段直接自动连续运行的程序,用于处理计算机系统希望接收到的阶段性的服务需求,并将请求提交给其他合适的程序(或者进程)。例如,网络上页面Daemon应用服务器持续地等待从网络客户端及其用户发送来的请求。At present, there are too many design methods on the server side (S side) in the computer network application mode. The Daemon method is one of the methods implemented by Server. Daemon originally refers to a program that runs automatically and continuously under the computer operating system, and is used to process the periodic service requirements that the computer system hopes to receive, and submit the request to other appropriate programs (or processes). For example, web page daemon application servers are constantly waiting for requests from web clients and their users.

然而现代网络通信多采用并发式的通信方式,这种方式要求信宿服务器可以同时响应和满足多个客户端的请求,这对服务器的性能就提出了更高的要求。不仅如此,对于客户端来说,服务器端应该尽量做到其操作系统类型与客户端请求无关。而现有的计算机网络应用模式多是与计算机操作系统类型绑定的,这样的网络应用模式在实际的应用中具有很大的局限性。例如模式的设计者所设计的服务器只能运行在某一种固定的操作系统上而在其他操作系统上就不能应用,这就造成运营商在操作系统的选择上必须与设备设计者保持一致,从而使得该模式应用的适应性大大降低。However, modern network communication mostly adopts a concurrent communication method, which requires the sink server to respond to and satisfy the requests of multiple clients at the same time, which puts forward higher requirements on the performance of the server. Not only that, but for the client, the server should try to make its operating system type irrelevant to the client's request. However, most of the existing computer network application modes are bound with the types of computer operating systems, and such network application modes have great limitations in practical applications. For example, the server designed by the mode designer can only run on a certain fixed operating system and cannot be applied on other operating systems, which causes the operator to be consistent with the equipment designer in the choice of operating system. As a result, the adaptability of this mode application is greatly reduced.

另外随着业务需求的不断增加,客户端不断提出新的请求,所以为了适应客户端的新变化,相应的S端的可扩展性也是非常重要的。在这方面,目前的设计方法也存在一定缺陷,主要是服务器设计结构不合理造成的,即不能适应客户端新的变化。具体就是,当客户端提出新的需求时,服务器为了适应新需求必须改变以前的设计框架,这就造成资源浪费并且大大降低了开发效率。另外,在实现资源共享方面,提供服务代理机制以扩大服务器的服务功能,也应该是服务器所具有的基本性能。In addition, with the continuous increase of business requirements, the client constantly puts forward new requests, so in order to adapt to the new changes of the client, the scalability of the corresponding S-side is also very important. In this regard, the current design method also has certain defects, mainly due to the unreasonable design structure of the server, that is, it cannot adapt to new changes of the client. Specifically, when the client puts forward new requirements, the server must change the previous design framework in order to adapt to the new requirements, which causes waste of resources and greatly reduces development efficiency. In addition, in realizing resource sharing, providing a service proxy mechanism to expand the service function of the server should also be the basic performance of the server.

发明内容Contents of the invention

本发明所要解决的技术问题是,提供一种驻留Daemon应用服务器及其远程控制方法,从而在计算机远程控制过程中,实现客户端请求与应用服务器操作系统类型无关。The technical problem to be solved by the present invention is to provide a resident Daemon application server and its remote control method, so that in the computer remote control process, the client request is independent of the application server operating system type.

为了解决上述问题,本发明公开了一种驻留Daemon应用服务器,适用于计算机远程控制过程,该服务器包括依次连接的信息接收模块、信息处理模块以及信息回馈模块,其中,In order to solve the above problems, the present invention discloses a resident Daemon application server, which is suitable for computer remote control process. The server includes an information receiving module, an information processing module and an information feedback module connected in sequence, wherein,

所述信息接收模块,用于并发式接收来自客户端的各种请求消息,建立消息队列,按照接收顺序或者优先级顺序将各种请求消息发送到信息处理模块;The information receiving module is used to concurrently receive various request messages from the client, establish a message queue, and send various request messages to the information processing module according to the receiving order or priority order;

所述信息处理模块,用于利用系统函数处理机制响应和处理客户端的各种请求消息;The information processing module is used to use the system function processing mechanism to respond to and process various request messages from the client;

所述信息回馈模块,用于将请求消息处理结果转化并组装为客户端与Daemon应用服务器所约定的内部消息格式返回给客户端。The information feedback module is used to convert and assemble the request message processing result into an internal message format agreed between the client and the Daemon application server and return it to the client.

进一步地,上述服务器中,所述信息处理模块进一步包括消息解析单元及与其相连的若干用于处理不同消息的消息处理单元,其中Further, in the above server, the information processing module further includes a message parsing unit and several message processing units connected to it for processing different messages, wherein

所述消息解析单元,用于解析客户端发送的各种请求消息,并根据解析结果将不同的请求消息发送到相应的消息处理单元;The message parsing unit is configured to parse various request messages sent by the client, and send different request messages to corresponding message processing units according to the parsing results;

所述消息处理单元,采用系统函数处理机制,根据收到的消息内容进行操作,并将消息处理结果发送到信息回馈模块。The message processing unit uses a system function processing mechanism to operate according to the content of the received message, and sends the message processing result to the information feedback module.

上述消息处理单元包括用于实现代理服务的消息处理单元,用于在接收到代理服务请求消息后,建立与远程资源服务器的通信,接收远程资源服务器返回的远程资源,由所述信息回馈模块返回给请求代理服务的客户端。The above message processing unit includes a message processing unit for implementing proxy service, for establishing communication with the remote resource server after receiving the proxy service request message, receiving the remote resource returned by the remote resource server, and returning it by the information feedback module For clients requesting proxy services.

上述消息处理单元包括用于实现升级的消息处理单元,用于在接收到升级请求消息后进行升级或者定时自动启动升级,停止所有由Daemon应用服务器启动的服务进程,安装新版本Daemon应用服务器。The above-mentioned message processing unit includes a message processing unit for implementing an upgrade, which is used for upgrading after receiving the upgrade request message or automatically starting the upgrade regularly, stopping all service processes started by the Daemon application server, and installing a new version of the Daemon application server.

上述升级操作完成后,所述用于实现升级的消息处理单元更新版本配置文件中的版本号并启动端口进行侦听,当客户端轮循的连接Daemon应用服务器,并检测到服务端口被打开时,与所述Daemon应用服务器建立TCP链路,所述信息回馈模块向客户端发送升级成功的消息。After the above-mentioned upgrade operation is completed, the message processing unit for implementing the upgrade updates the version number in the version configuration file and starts the port to listen. When the client connects to the Daemon application server in turn and detects that the service port is opened , establish a TCP link with the Daemon application server, and the information feedback module sends a message that the upgrade is successful to the client.

进一步地,上述服务器中,所述信息回馈模块发送的消息处理结果包括消息编号、结果判断以及结果内容。Further, in the above server, the message processing result sent by the information feedback module includes message number, result judgment and result content.

本发明还公开了一种驻留Daemon应用服务器的远程控制方法,包括以下步骤:The present invention also discloses a remote control method of a resident Daemon application server, comprising the following steps:

A:所述驻留Daemon应用服务器的信息接收模块接收来自客户端的请求消息,建立消息队列,按照接收顺序或者优先级顺序将各种请求消息发送到信息处理模块;A: The information receiving module of the resident Daemon application server receives the request message from the client, establishes a message queue, and sends various request messages to the information processing module according to the order of reception or priority order;

B:所述Daemon应用服务器的信息处理模块收到所述信息接收模块转发的请求消息后,利用系统函数处理机制响应和处理客户端的请求消息;B: After the information processing module of the Daemon application server receives the request message forwarded by the information receiving module, it uses the system function processing mechanism to respond and process the request message of the client;

C:所述Daemon应用服务器的信息回馈模块从信息处理模块收到客户端请求消息处理结果后,将该结果转化并组装为客户端与Daemon应用服务器所约定的内部消息格式发送到客户端。C: After the information feedback module of the Daemon application server receives the message processing result of the client request from the information processing module, it converts and assembles the result into an internal message format agreed between the client and the Daemon application server and sends it to the client.

进一步地,上述方法中,所述步骤B进一步包括以下步骤:Further, in the above method, the step B further includes the following steps:

B1,所述信息处理模块的消息解析单元对收到的所述请求消息进行解析,并根据解析结果将不同的请求消息发送到相应的消息处理单元;B1, the message parsing unit of the information processing module parses the received request message, and sends different request messages to the corresponding message processing unit according to the parsing result;

B2,所述消息处理单元采用系统函数处理机制,根据收到的请求消息的内容对远程计算机系统进行系统操作,并将消息处理结果发送到信息回馈模块。B2, the message processing unit uses a system function processing mechanism to perform system operations on the remote computer system according to the content of the received request message, and sends the message processing result to the information feedback module.

上述步骤B2中,若所述请求消息的内容为请求代理服务,则所述消息处理单元建立与远程资源服务器的通信,接收远程资源服务器返回的远程资源,由所述信息回馈模块返回给请求代理服务的客户端。In the above step B2, if the content of the request message is requesting proxy service, the message processing unit establishes communication with the remote resource server, receives the remote resource returned by the remote resource server, and returns it to the requesting proxy by the information feedback module The client of the service.

上述步骤B2中,若所述请求消息的内容为请求驻留服务器升级时或者所述消息处理单元定时自动启动升级,所述消息处理单元首先停止所有由Daemon应用服务器启动的服务进程,并备份旧版本的驻留服务器,安装新版本Daemon应用服务器。In the above step B2, if the content of the request message is to request the resident server to upgrade or the message processing unit automatically starts the upgrade at regular intervals, the message processing unit first stops all service processes started by the Daemon application server, and backs up the old version of the resident server, install the new version of the Daemon application server.

进一步地,上述方法中,所述信息回馈模块向客户端发送的消息处理结果包括消息编号、结果判断以及结果内容。Further, in the above method, the message processing result sent by the information feedback module to the client includes message number, result judgment and result content.

进一步地,上述方法中,升级操作完成后,所述用于实现升级的消息处理单元更新版本配置文件中的版本号并启动端口进行侦听,当客户端轮循的连接Daemon应用服务器,并检测到服务端口被打开时,与所述Daemon应用服务器建立TCP链路,所述信息回馈模块向客户端发送升级成功的消息。Further, in the above method, after the upgrade operation is completed, the message processing unit for implementing the upgrade updates the version number in the version configuration file and starts the port to listen. When the client connects to the Daemon application server in rounds, and detects When the service port is opened, a TCP link is established with the Daemon application server, and the information feedback module sends a message that the upgrade is successful to the client.

本发明所采用的技术方案在并发式B/S和C/S模式网络通信的基础上,实现了客户端请求与应用服务器操作系统类型无关性,并揭露了移动终端用户与应用服务器的交互过程,同时本发明所提出的应用服务器具有非常好的可扩展性能、自动升级功能、服务代理机制以及易构造性。The technical scheme adopted by the present invention is based on concurrent B/S and C/S mode network communication, realizes the independence of the client request and the operating system type of the application server, and discloses the interaction process between the mobile terminal user and the application server , and the application server proposed by the present invention has very good scalability, automatic upgrade function, service agent mechanism and easy construction.

附图说明Description of drawings

图1为本实施例中Daemon应用服务器的结构示意图;Fig. 1 is the structural representation of Daemon application server in the present embodiment;

图2(a)为本实施例客户端发送一般请求信息时Daemon应用服务器实现远程控制流程图;Fig. 2 (a) realizes the remote control flowchart of Daemon application server when the client sends general request information for the present embodiment;

图2(b)为本实施例客户端发送代理服务请求信息时Daemon应用服务器实现远程控制流程图;Fig. 2 (b) realizes the remote control flowchart of Daemon application server when the client sends proxy service request information for the present embodiment;

图3为本实施例中Daemon应用服务器自动升级流程图。FIG. 3 is a flowchart of the automatic upgrade of the Daemon application server in this embodiment.

具体实施方式Detailed ways

本发明的主要构思是,一种Daemon应用服务器通过驻留的方式提供对客户端的服务,客户端通过传输控制协议(TCP,Transfer Control Protocol)链路与Daemon应用服务器相连接,通过发送请求信息,然后接收到Daemon应用服务器的响应的方式实现通信。The main idea of the present invention is, a kind of Daemon application server provides the service to client by the mode of resident, and client is connected with Daemon application server by Transmission Control Protocol (TCP, Transfer Control Protocol) link, by sending request information, Then the communication is realized by receiving the response from the Daemon application server.

下面结合附图及具体实施方式,对本发明技术方案作进一步的详细描述:Below in conjunction with accompanying drawing and specific embodiment, the technical scheme of the present invention is described in further detail:

图1所示,为Daemon应用服务器的结构,该应用服务器包括:依次相连的信息接收模块(ReceiveData)、信息处理模块(ExeclData)以及信息回馈模块(ReplyData),根据所处理的消息的不同,在信息处理模块中设置多个消息处理单元。As shown in Figure 1, it is the structure of the Daemon application server. The application server includes: an information receiving module (ReceiveData), an information processing module (ExeclData) and an information feedback module (ReplyData) connected in sequence. Multiple message processing units are set in the information processing module.

信息接收模块,用于并发式接收来自客户端的各种请求信息,并采用消息队列的机制对接收到的来自不同客户端的相互独立的请求进行消息排队,产生对应不同客户端的不同消息队列,然后将这些消息队列分别顺序发送到信息处理模块;The information receiving module is used to concurrently receive various request information from the client, and use the message queue mechanism to queue up the received independent requests from different clients to generate different message queues corresponding to different clients, and then send These message queues are sequentially sent to the information processing module;

信息处理模块,用于响应和处理客户端的各种请求;The information processing module is used to respond to and process various requests from clients;

信息处理模块又进一步包括消息解析单元及与其相连的若干消息处理单元,其中:The information processing module further includes a message parsing unit and several message processing units connected to it, wherein:

消息解析单元,用于解析客户端发送的各种请求消息,并根据解析结果将不同的请求消息发送到不同的消息处理单元;A message parsing unit for parsing various request messages sent by the client, and sending different request messages to different message processing units according to the parsing results;

消息处理单元,根据收到的消息内容对远程计算机系统进行系统操作,并将消息处理结果发送到信息回馈模块,例如,请求消息的内容为请求代理服务时,消息处理单元用于建立与远程资源服务器的通信,并将获取的远程资源返回到请求代理服务的客户端;当请求消息的内容为请求Daemon应用服务器升级时,消息处理单元首先停止所有由Daemon应用服务器启动的服务进程,并备份旧版本的Daemon应用服务器,然后启动Daemon应用服务器升级进程。The message processing unit performs system operations on the remote computer system according to the content of the received message, and sends the message processing result to the information feedback module. Communication with the server, and return the obtained remote resources to the client requesting the proxy service; when the content of the request message is to request the upgrade of the Daemon application server, the message processing unit first stops all service processes started by the Daemon application server, and backs up the old version of the Daemon application server, and then start the Daemon application server upgrade process.

上述消息处理单元是相对独立的与消息类型相关的最小处理单位,其按照现有技术采用了一种系统函数处理机制,从而可以根据消息内容进行系统操作以完成远端用户无法实现的服务器端本地操作功能,本实施例中,该消息处理单元采用的系统函数的形式参数是用户在操作系统命令行时所输入的任何系统均能够识别的系统命令,该函数本身与Daemon应用服务器的操作系统无关,即在不同的操作系统下都可以调用该函数,因此可适用于不同的操作系统,比如Windows、Linux系统等。The above-mentioned message processing unit is a relatively independent minimum processing unit related to the message type. It adopts a system function processing mechanism according to the existing technology, so that the system operation can be performed according to the message content to complete the server-side local processing that cannot be realized by the remote user. Operational function, in the present embodiment, the form parameter of the system function that this message processing unit adopts is the system order that any system that user inputs when operating system command line all can recognize, and this function itself has nothing to do with the operating system of Daemon application server , that is, this function can be called under different operating systems, so it is applicable to different operating systems, such as Windows and Linux systems.

信息回馈模块,用于消息缓冲、消息转化、消息反馈等,从而将请求信息处理结果进行消息转化并组装为内部消息格式(客户端与Daemon应用服务器所约定的消息格式),然后通过TCP链路发送给相应的客户端,其中消息处理结果包括消息编号、结果判断以及结果内容等。The information feedback module is used for message buffering, message conversion, message feedback, etc., so that the request information processing results are converted into messages and assembled into an internal message format (the message format agreed between the client and the Daemon application server), and then through the TCP link Send it to the corresponding client, where the message processing result includes message number, result judgment and result content, etc.

上述并发式Daemon应用服务器,适用于用户通过浏览器或其它客户端软件访问远程Daemon应用服务器的过程,根据客户端请求,对远程计算机系统进行系统操作的过程如图2所示。The above-mentioned concurrent Daemon application server is suitable for the process of users accessing the remote Daemon application server through a browser or other client software. According to the request of the client, the process of performing system operations on the remote computer system is shown in FIG. 2 .

其中,客户端向Daemon应用服务器发送一般请求信息的过程如图2(a)所示,首先Daemon应用服务器作为系统的应用服务随系统自动启动,并且驻留在系统中对服务端口进行侦听。客户端为了得到Daemon应用服务器的服务,必须首先通过服务端口与Daemon应用服务器建立TCP链路,由客户端发起链路的建立(步骤201a),Daemon应用服务器检测到连接的客户端后开始建立链路(步骤202a、203a)。本实施例中客户端与应用服务器的连接是一种短连接的方式,即一次完整的通信结束后,此链路将被释放掉,当然,根据不同的需要,此处的TCP连接也可以为长连接,如计费业务的应用中。Among them, the process of the client sending general request information to the Daemon application server is shown in Figure 2(a). First, the Daemon application server is automatically started with the system as the application service of the system, and resides in the system to listen to the service port. In order to obtain the service of the Daemon application server, the client must first establish a TCP link with the Daemon application server through the service port, and the client initiates the establishment of the link (step 201a). After the Daemon application server detects the connected client, it begins to establish the link. way (steps 202a, 203a). In this embodiment, the connection between the client and the application server is a short connection, that is, after a complete communication ends, the link will be released. Of course, according to different needs, the TCP connection here can also be Long connection, such as in the application of billing business.

TCP链路建立之后,客户端就可以通过此链路向Daemon应用服务器发送请求消息(步骤204a),Daemon应用服务器的信息接收模块接收请求消息后,建立消息队列(步骤205a),按序将请求消息发送到信息处理模块(步骤206a),在其他实施例中,信息接收模块也可根据消息的优先级,把优先级较高的请求消息先发送到信息处理模块;Daemon应用服务器通过信息处理模块中消息解析单元对客户端发送的消息进行解析(步骤207a),并将解析结果发送到相应的消息处理单元;消息处理单元按照消息内容对远程客户端进行系统操作,即进行消息处理(步骤208a),并将消息处理结果发送到信息回馈模块(步骤209a),信息回馈模块将处理结果转化、组装为内部消息格式(步骤210a),然后发送给相应的客户端(步骤211a),客户端收到返回结果后,释放TCP链路(步骤212a)。After the TCP link is set up, the client just can send request message (step 204a) to Daemon application server through this link, after the information receiving module of Daemon application server receives request message, builds message queue (step 205a), requests in order The message is sent to the information processing module (step 206a). In other embodiments, the information receiving module can also send the request message with higher priority to the information processing module according to the priority of the message; the Daemon application server passes the information processing module The middle message analysis unit analyzes the message sent by the client (step 207a), and sends the analysis result to the corresponding message processing unit; the message processing unit performs system operations on the remote client according to the content of the message, that is, performs message processing (step 208a ), and send the message processing result to the information feedback module (step 209a), the information feedback module converts and assembles the processing result into an internal message format (step 210a), and then sends it to the corresponding client (step 211a), and the client receives After the result is returned, the TCP link is released (step 212a).

当客户端要求的代理服务Daemon应用服务器不支持时,Daemon应用服务器可以将客户端的请求转发到其他具备相应功能的远程资源服务器,由远程资源服务器进行处理并将结果通过Daemon应用服务器返回给客户端。客户端向Daemon应用服务器发送代理服务请求信息的过程如图2(b)所示,其步骤201b至207b同步骤201a至207a,本实施例中消息解析单元将解析的代理服务请求消息发送到实现代理服务的消息处理单元(步骤208b),实现代理服务的消息处理单元收到该请求消息后,向远程资源服务器发起TCP连接(步骤209b),远程资源服务器与Daemon应用服务器建立TCP链路后(步骤210b),实现代理服务的消息处理单元向远程资源服务器发送代理服务消息(步骤211b),然后远程资源服务器返回该代理服务所涉及的资源到Daemon应用服务器(步骤212b),实现代理服务的消息处理单元将远程资源服务器返回的资源发送到信息回馈模块(步骤213b),信息回馈模块收到处理结果后,将其转化、组装为内部消息格式(步骤214b),发送给相应的客户端(步骤215b),客户端收到返回结果后,释放TCP链路(步骤216b)。When the proxy service required by the client is not supported by the Daemon application server, the Daemon application server can forward the client's request to other remote resource servers with corresponding functions, and the remote resource server will process and return the result to the client through the Daemon application server . The process that the client sends the proxy service request information to the Daemon application server is as shown in Figure 2 (b), and its steps 201b to 207b are the same as steps 201a to 207a. In this embodiment, the message analysis unit sends the parsed proxy service request message to the implementation The message processing unit (step 208b) of proxy service, after the message processing unit that realizes proxy service receives this request message, initiates TCP connection (step 209b) to remote resource server, after remote resource server and Daemon application server establish TCP link ( Step 210b), the message processing unit that realizes proxy service sends proxy service message (step 211b) to remote resource server, then remote resource server returns the resource involved in this proxy service to Daemon application server (step 212b), realizes the message of proxy service The processing unit sends the resource returned by the remote resource server to the information feedback module (step 213b). After the information feedback module receives the processing result, it converts and assembles it into an internal message format (step 214b), and sends it to the corresponding client (step 214b). 215b), the client releases the TCP link after receiving the returned result (step 216b).

随着业务需求的不断增加,客户端的请求消息类型也随之增加,相应的应用服务器也要不断地满足客户端新的请求消息类型,因此应用服务器可扩展性能和自动升级功能是衡量应用服务器性能的重要指标。本实施例中Daemon应用服务器采用一种分层的组织结构模式,消息处理单元的设计方式灵活,既可以从属于Daemon应用服务器核心模块提供对外服务,也可以以动态链接库的方式根据客户端的请求而动态加载,图3所示,即为Daemon应用服务器自动升级过程。With the continuous increase of business requirements, the types of client request messages also increase, and the corresponding application servers must continue to meet the new request message types of clients. important indicators. In this embodiment, the Daemon application server adopts a layered organizational structure mode, and the design mode of the message processing unit is flexible, which can be subordinate to the core module of the Daemon application server to provide external services, or can be based on the request of the client in the form of a dynamic link library. The dynamic loading, as shown in Figure 3, is the automatic upgrade process of the Daemon application server.

客户端发起链路的建立(步骤301),Daemon应用服务器检测到连接的客户端后开始建立链路(步骤302、303)。客户端向Daemon应用服务器发送Daemon应用服务器升级请求消息(步骤304),信息接收模块接收到该消息后,对其进行消息排队,然后将这些消息队列分别顺序发送到信息处理模块(步骤305)。信息处理模块的消息解析单元解析该消息(步骤306),然后将该消息发送到实现升级处理的消息处理单元,该消息处理单元收到该消息后,首先会停止所有由Daemon应用服务器启动的服务进程并备份旧版本的Daemon应用服务器(步骤307),然后启动Daemon应用服务器升级进程(步骤308)。The client initiates the establishment of the link (step 301), and the Daemon application server starts to establish the link after detecting the connected client (steps 302, 303). The client sends a Daemon application server upgrade request message to the Daemon application server (step 304). After receiving the message, the information receiving module performs message queuing, and then sequentially sends these message queues to the information processing module (step 305). The message parsing unit of the information processing module parses the message (step 306), and then the message is sent to the message processing unit realizing upgrade processing. After the message processing unit receives the message, it first stops all services started by the Daemon application server Process and back up the old version of the Daemon application server (step 307), then start the Daemon application server upgrade process (step 308).

当Daemon应用服务器升级进程启动之后,首先会停止Daemon应用服务器进程,此时客户端与Daemon应用服务器之间的TCP连接会被释放掉(步骤309),安装新版本的Daemon应用服务器(步骤310);如果新版本的Daemon应用服务器安装成功,则Daemon应用服务器升级进程将会启动新的Daemon应用服务器以提供对外服务,否则Daemon应用服务器升级进程将还原备份的旧版本Daemon应用服务器并启动之(步骤311)。After the Daemon application server upgrade process starts, at first can stop the Daemon application server process, this moment, the TCP connection between the client and the Daemon application server can be released (step 309), install the Daemon application server (step 310) of new version If the Daemon application server of new version is successfully installed, then the Daemon application server upgrade process will start a new Daemon application server to provide external services, otherwise the Daemon application server upgrade process will restore the old version Daemon application server of backup and start it (step 311).

上述升级操作完成后,Daemon应用服务器会更新版本配置文件中的版本号并启动端口进行侦听,此时客户端会轮循的去连接Daemon应用服务器,直到检测到服务端口被打开时,与Daemon应用服务器建立TCP链路,然后新版本的Daemon应用服务器会向客户端发送升级成功的消息。After the above upgrade operation is completed, the Daemon application server will update the version number in the version configuration file and start the port to listen. At this time, the client will connect to the Daemon application server in turn until it detects that the service port is opened, and communicate with the Daemon application server. The application server establishes a TCP link, and then the Daemon application server of the new version will send a message that the upgrade is successful to the client.

当然也存在Daemon应用服务器升级失败的情况,此时,Daemon应用服务器升级进程会自动恢复原来的Daemon应用服务器版本,即不进行升级,同时提示用户升级失败。Of course, there is also a situation where the Daemon application server upgrade fails. At this time, the Daemon application server upgrade process will automatically restore the original Daemon application server version, that is, the upgrade will not be performed, and the user will be prompted that the upgrade failed.

若多个不同的客户端均请求服务器升级时,收到升级命令的消息处理单元首先通过对比安装服务器中的最新安装版本号以及当前服务器的版本号,若当前服务器版本号为最新安装版本号,则提示用户目前版本是最新的,即无需升级。If multiple different clients request the server to upgrade, the message processing unit that receives the upgrade command first compares the latest installed version number in the installed server with the version number of the current server, if the current server version number is the latest installed version number, It will prompt the user that the current version is the latest, that is, there is no need to upgrade.

在另一实施例中,Daemon应用服务器自身也可以主动发起升级请求,此时,Daemon应用服务器中设置一个定时器,当该定时器设定时间到后,检测是否存在新版本,若是则发送升级提示信息到客户端,由用户选择是否对当前驻Daemon应用服务器进行升级操作。其中,升级操作的过程同上述步骤305至步骤311。In another embodiment, the Daemon application server itself can also actively initiate an upgrade request. At this time, a timer is set in the Daemon application server. When the timer setting time expires, it detects whether there is a new version, and if so, sends an upgrade request. The prompt information is sent to the client, and the user can choose whether to upgrade the application server currently residing in the Daemon. Wherein, the process of the upgrading operation is the same as the above step 305 to step 311.

从上述实施例可以看出,本发明所采用的技术方案不仅可以实现并发式B/S和C/S模式网络通信,而且可以实现客户端请求与应用服务器操作系统类型无关性,同时本发明所提出的应用服务器具有非常好的可扩展性能、自动升级功能以及服务代理机制。As can be seen from the foregoing embodiments, the technical solution adopted in the present invention can not only realize concurrent B/S and C/S mode network communication, but also can realize the independence of the client request from the operating system type of the application server. The proposed application server has very good scalability, automatic upgrade function and service proxy mechanism.

以上所述,仅为本发明较佳的具体实施方案,但本发明的保护范围并不局限与此,任何熟悉本领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化和替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权力要求的保护范围为准。The above is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, any changes and substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention , should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (12)

1. a Daemon application server is applicable to the computer remote control procedure, it is characterized in that, this server comprises information receiving module, message processing module and the information feedback module that connects successively, wherein,
Described information receiving module is used for also hairdo reception and sets up message queue from the various request messages of client, according to reception order or priority orders various request messages is sent to message processing module;
Described message processing module is used to utilize the system function treatment mechanism to respond and handle the various request messages of client, and the Message Processing result is sent to the information feedback module;
Described information feedback module is used for the request message result transformed and be assembled into the inside story form that client and Daemon application server arranged and returns to client.
2. server as claimed in claim 1 is characterized in that, described message processing module further comprises message parse unit and coupled some message processing units that are used to handle different messages, wherein
Described message parse unit is used to resolve the various request messages that client sends, and according to analysis result different request messages is sent to corresponding message processing unit;
Described message processing unit adopts the system function treatment mechanism, operates according to the message content of receiving, and the Message Processing result is sent to the information feedback module.
3. server as claimed in claim 2 is characterized in that,
Described message processing unit comprises the message processing unit that is used to realize agency service, be used for after receiving proxy service request message, foundation is communicated by letter with the remote resource server, the remote resource that the receiving remote Resource Server returns returns to the client that request broker is served by described information feedback module.
4. server as claimed in claim 2 is characterized in that,
Described message processing unit comprises and is used to realize the message processing unit of upgrading, be used for after receiving upgrade request message, upgrading or timing automatic startup upgrading, stop the service processes that all are started by the Daemon application server, redaction Daemon application server is installed.
5. server as claimed in claim 4 is characterized in that,
After updating operation is finished, described version number and its enable port that is used for realizing that the message processing unit of upgrading upgrades edition configuration file intercepted, when the connection Daemon of client repeating query application server, and when detecting serve port and being opened, set up the TCP link with described Daemon application server, described information feedback module sends the successful message of upgrading to client.
6. server as claimed in claim 1 is characterized in that,
The Message Processing result that described information feedback module sends comprises that message numbering, result judge and resultant content.
7. the long-range control method of a Daemon application server is characterized in that, may further comprise the steps:
A: the information receiving module of described Daemon application server receives the request message from client, sets up message queue, according to reception order or priority orders various request messages is sent to message processing module;
B: after the message processing module of described Daemon application server is received the request message of described information receiving module forwarding, utilize the request message of response of system function treatment mechanism and processing client;
C: after the information feedback module of described Daemon application server is received the client request message result from message processing module, this result is transformed and be assembled into the inside story form that client and Daemon application server arranged send to client.
8. method as claimed in claim 7 is characterized in that, described step B further may further comprise the steps:
B1, resolve the described request message of receiving the message parse unit of described message processing module, and according to analysis result different request messages is sent to corresponding message processing unit;
B2, described message processing unit adopts the system function treatment mechanism, according to the content of the request message of receiving remote computer system is carried out system operation, and the Message Processing result is sent to the information feedback module.
9. method as claimed in claim 8 is characterized in that,
Among the described step B2, if the content of described request message is the request broker service, then described message processing unit foundation is communicated by letter with the remote resource server, and the remote resource that the receiving remote Resource Server returns returns to the client that request broker is served by described information feedback module.
10. method as claimed in claim 8 is characterized in that,
Among the described step B2, if the content of described request message is when asking the Daemon server updating or described message processing unit timing automatic starts upgrading, described message processing unit at first stops all service processes that started by the Daemon application server, and the Daemon server of backup legacy version, redaction Daemon application server is installed.
11. method as claimed in claim 7 is characterized in that,
The Message Processing result that described information feedback module sends to client comprises that message numbering, result judge and resultant content.
12. method as claimed in claim 10 is characterized in that,
After updating operation is finished, be used for realizing that version number and its enable port that the message processing unit of upgrading upgrades edition configuration file intercept, when the connection Daemon of client repeating query application server, and when detecting serve port and being opened, set up the TCP link with described Daemon application server, described information feedback module sends the successful message of upgrading to client.
CN2008100047731A 2008-01-30 2008-01-30 Application server and remote control method thereof Active CN101227428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100047731A CN101227428B (en) 2008-01-30 2008-01-30 Application server and remote control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100047731A CN101227428B (en) 2008-01-30 2008-01-30 Application server and remote control method thereof

Publications (2)

Publication Number Publication Date
CN101227428A CN101227428A (en) 2008-07-23
CN101227428B true CN101227428B (en) 2011-12-07

Family

ID=39859188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100047731A Active CN101227428B (en) 2008-01-30 2008-01-30 Application server and remote control method thereof

Country Status (1)

Country Link
CN (1) CN101227428B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833217B (en) * 2011-06-16 2017-09-15 中兴通讯股份有限公司 The processing method and centralized processing system of client/server application
CN102223381A (en) * 2011-07-07 2011-10-19 莫雅静 Message pushing method, server, client terminal and system
CN103971688B (en) * 2013-02-01 2016-05-04 腾讯科技(深圳)有限公司 A kind of data under voice service system and method
CN104468547B (en) * 2014-11-28 2019-03-15 北京奇安信科技有限公司 Method, device and system for establishing long-term connection
CN104683731B (en) * 2015-03-20 2019-02-19 苏州科达科技股份有限公司 A kind of method and system for being communicated between heterogeneous platform
CN106254105A (en) * 2016-07-28 2016-12-21 杭州昆海信息技术有限公司 A kind of assembly update method and device
CN106445593B (en) * 2016-09-22 2020-02-18 广州华多网络科技有限公司 Method and device for gray scale upgrading in distributed system communication
CN106534281B (en) * 2016-10-25 2019-09-24 Oppo广东移动通信有限公司 Data request response method, device and system
CN106598648A (en) * 2016-11-10 2017-04-26 北京三快在线科技有限公司 Control method and device for upgrade of server program
CN107426276A (en) * 2017-04-22 2017-12-01 高新兴科技集团股份有限公司 A kind of Urban Operation center large-size screen monitors control system
CN107945354A (en) * 2017-11-20 2018-04-20 浪潮金融信息技术有限公司 Queuing management method and system, computer-readable storage medium and terminal
CN108665654A (en) * 2018-05-18 2018-10-16 任飞翔 Cash register information synchronization method and cash register system
CN110502266A (en) * 2019-08-26 2019-11-26 中电九天智能科技有限公司 A kind of seamless update method of CIM server cluster
CN111510472A (en) * 2020-03-11 2020-08-07 苏州浪潮智能科技有限公司 A client cluster management method, system, terminal and storage medium
CN111841019A (en) * 2020-06-23 2020-10-30 腾讯科技(成都)有限公司 Game application security verification method, device, equipment and storage medium
CN114115003B (en) * 2021-11-12 2023-08-22 浙江银盾云科技有限公司 Remote start-stop control platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545289A (en) * 2003-11-26 2004-11-10 中兴通讯股份有限公司 Protocol server and method for integrated processing of three protocol short messages
CN1744498A (en) * 2004-08-31 2006-03-08 华为技术有限公司 A network server and data interaction method between the network server and the browser
CN1987779A (en) * 2006-12-28 2007-06-27 上海广电(集团)有限公司中央研究院 Image processing method based on C language micro operation system
CN101106790A (en) * 2007-07-24 2008-01-16 伟朋科技(南京)有限公司 SSC card based embedded micro server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545289A (en) * 2003-11-26 2004-11-10 中兴通讯股份有限公司 Protocol server and method for integrated processing of three protocol short messages
CN1744498A (en) * 2004-08-31 2006-03-08 华为技术有限公司 A network server and data interaction method between the network server and the browser
CN1987779A (en) * 2006-12-28 2007-06-27 上海广电(集团)有限公司中央研究院 Image processing method based on C language micro operation system
CN101106790A (en) * 2007-07-24 2008-01-16 伟朋科技(南京)有限公司 SSC card based embedded micro server

Also Published As

Publication number Publication date
CN101227428A (en) 2008-07-23

Similar Documents

Publication Publication Date Title
CN101227428B (en) Application server and remote control method thereof
US8392531B2 (en) Unified device management method and system
CN100496015C (en) Method for realizing clipboard sharing in multi-node intelligent network application service system
JP4365161B2 (en) Session state sharing method, communication system, and terminal device
CN1167237C (en) differential communication method
CN1260937C (en) Reduced overhead TCP communication system
CN1096646C (en) Time coherent caching system
JP4603737B2 (en) COMMUNICATION DEVICE, NETWORK DEVICE MANAGEMENT METHOD, PROGRAM, AND STORAGE MEDIUM
WO2009062414A1 (en) Integrate client and method of desktop application communicating with net web application
CN106445705A (en) Platform cascading method and system based on Rabbit MQ and Socket.io
US20020102965A1 (en) Wireless information exchange and management system and method
CN114553693B (en) Gateway upgrading method and device
CN101404630B (en) Method and system for implementing internet service access gate
CN101448004A (en) Method, server and system based on instant messaging for releasing user state
US20050152380A1 (en) Apparatus and method for sharing services on a network
CN103297269A (en) Network service deployment and management method and system based on service computing platform
CN102054213A (en) Information integration method, device and system
WO2022121492A1 (en) File transmission method and apparatus, computer device, and storage medium
WO2012055132A1 (en) System and method for disposing service platform
WO2024103943A1 (en) Service processing method and apparatus, storage medium, and device
CN116149883B (en) RPA software rapid embedding method and system for Web system
CN100502301C (en) Node controlling method in network management system
WO2022042545A1 (en) Tsn industrial application server, client, system, service method, and storage medium
CN100391149C (en) Application management subsystem and method in multi-node intelligent network application service system
CN100505735C (en) A session management method in a multi-node intelligent network application service system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20150922

Address after: 610000 No. 192, Xiaojiahe, Chengdu hi tech Development Zone, Sichuan

Patentee after: SICHUAN YUECHENG ENVIRONMENTAL PROTECTION ENERGY SAVING SCIENCE & TECHNOLOGY CO., LTD.

Address before: 518057 Nanshan District high tech Industrial Park, Guangdong, South Road, science and technology, ZTE building, legal department

Patentee before: ZTE Corporation