CN103905387B - The method and apparatus of client and server communication - Google Patents

The method and apparatus of client and server communication Download PDF

Info

Publication number
CN103905387B
CN103905387B CN201210574961.4A CN201210574961A CN103905387B CN 103905387 B CN103905387 B CN 103905387B CN 201210574961 A CN201210574961 A CN 201210574961A CN 103905387 B CN103905387 B CN 103905387B
Authority
CN
China
Prior art keywords
server
client
window
communication
display
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
CN201210574961.4A
Other languages
Chinese (zh)
Other versions
CN103905387A (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.)
ChinaGPS Co Ltd Shenzhen
Original Assignee
ChinaGPS Co Ltd Shenzhen
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 ChinaGPS Co Ltd Shenzhen filed Critical ChinaGPS Co Ltd Shenzhen
Priority to CN201210574961.4A priority Critical patent/CN103905387B/en
Publication of CN103905387A publication Critical patent/CN103905387A/en
Application granted granted Critical
Publication of CN103905387B publication Critical patent/CN103905387B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of client and the method and apparatus of server communication, this method includes:Server is resetted in client, initialization completion message is sent to client using server, and create server window;User end to server sends operational order, and is shown in server window;Client timing when data communication is idle sends detection bag, and whether the communication of detection client and server is interrupted;If the communication disruption of client and server, server re-creates server window, and is synchronized with client.The device includes:Window creating module, window display module, communication check module and communication synchronization module.The present invention can realize that client controls server to complete the display function specified according to functional requirement, and server realizes the establishment, display, hiding or offer window events function of graphical interfaces, improves the operability and operating efficiency of work.

Description

The method and apparatus of client and server communication
Technical field
The present invention relates to the communications field, more particularly to a kind of client and server communication method and use this method The device of client and server communication.
Background technology
Client is called master-slave architecture with server, and abbreviation C/S structures, are a kind of network architectures, it is client (Client)(Typically one program using graphic user interface)Made a distinction with server (Server).Each client The example of end software can send request to a server or apps server.
It is scalable that client is intended to offer one with server(scaleable)Framework, online whereby computer or Person's processing procedure is a client or server.Server software is general, but is not always, to operate in powerful special business On industry computer.On the other hand, client is typically operated on customary personal computer or work station.In general, service end It is characterized in:Passive role(From);Wait the requirement from client;Processing requirement and returned results.The feature of client It is then:The role of active(It is main);Send and require;Wait until receiving response.In actual applications, server is probably stateful Or it is stateless, stateless server will not retain the information between any two request, and stateful server can then be remembered Information between firmly asking.The action scope of these information can be global or some affairs(session)'s.Static HTML Page server is the example of a stateless server, and Apache Tomcat are a stateful servers.
Service end is interacted commonly using sequence diagram description with client, and sequence diagram is a standard in UML.It is another Known network architecture type is Peer to Peer Architecture (peer-to-peer architecture), because each is point or journey The entity of sequence is all the role of client and server, and with the responsibility of equity.Both current frameworks are all made extensively With.
But in the prior art, still lack a kind of client based on graphical services and the method for server communication so that Client can control server to complete the display function specified according to functional requirement, and server end realizes the wound of graphical interfaces Build, show, hide or provide window events.
The content of the invention
It is directed in the prior art, client does not provide graphical services with server, not according to functional requirement control Server completes the defect for the display function specified, and the present invention proposes a kind of client and the method and dress of server communication Put.
The technical scheme that the present invention solves prior art problem use is the side of a kind of client of construction and server communication Method and device, this method include:
A. server is resetted in client, sends initialization completion message to client using server, and create service Device window;
B. user end to server sends operational order, and is shown in server window;
C. client timing when data communication is idle sends detection bag, in the communication whether of detection client and server It is disconnected;
If D. client and the communication disruption of server, server re-creates server window, and enters with client Row is synchronous.
In step A, the display properties of server window is set to hiding.
Step B also includes, and corresponding server window attribute is set into display before the operational order is shown.
In step C, detection includes the checking information between client and server.
Step D also includes, after server window is re-created, and the initialization for sending server to client completes to disappear Breath, and synchronized with client.
A kind of device of client and server communication, including:
Window creating module, for resetting server in client, and is initialized using server to client transmission Completion message, and create server window;
Window display module, for sending operational order in user end to server, and shows in server window;
Communication check module, for the timing transmission detection bag when client is in data communication idle condition, and is detected Whether the communication of client and server is interrupted;
Communication synchronization module, during for communication disruption in client and server, is re-created described on the server Server window, and synchronized with client.
Window creating module includes multiple windows units.
Window display module includes window display unit, window hidden unit, window and destroys unit.
Communication check module includes being used to verify the authentication unit communicated between client and server.
Communication synchronization module include re-create server window heavy losses unit and with client synchronize it is same Walk unit.
Implement a kind of method of client and server communication based on graphical services of the present invention, it is possible to achieve client root Server is controlled to complete the display function specified according to functional requirement, server realizes the establishment of graphical interfaces, display, hiding or carry For window events function, the operability and operating efficiency of work are improved.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is a kind of client behaviour of embodiment of the method for client and server communication based on graphical services of the present invention Make method flow diagram;
Fig. 2 is a kind of server behaviour of embodiment of the method for client and server communication based on graphical services of the present invention Make method flow diagram;
Fig. 3 is a kind of structure square frame of the device embodiment of client and server communication based on graphical services of the present invention Figure.
Embodiment
It should be appreciated that for those of ordinary skills, can according to the above description be improved or converted, And all these modifications and variations should all belong to the protection domain of appended claims of the present invention.
As shown in figure 1, being a kind of embodiment of the method for client and server communication based on graphical services of the present invention The flow chart of client operation method.
In step sl, client sends the operational order of reset to server, and server carries out reset operation, works as completion Reset after operation, server sends the message for initializing and completing to client.Client is main control terminal, and control server is realized Specific display function, server is display terminal, by client control, is responsible for the establishment, display, hiding, pin of graphical interfaces Ruin, and window events are provided.
In step S2, server creates server window, and will own in addition to main interface according to the operational order of client The display properties of server window is set to hiding.
In step S3, client sends operational order according to specific functional requirement to server, and control server is realized Corresponding function, and shown in the server window, server can create multiple server windows, for different work( Energy demand, shows in different server windows, and each server window has the priority of setting, is adapted to each difference The task processing of priority.
In step S4, client, which is in, waits state-event, and when each operational order is sent to server, server is completed After corresponding operational order, client is replied, client redistributes task, and updates wait event, and the step can be synchronous Carry out.
In step s 5, client processing operation command event, according to different functional requirements, the corresponding processing thing of generation Part, is delivered to server completion, while updating processing event, is carried out with step S4 dynamic circulations.
In step s 6, client at one's leisure, regularly to server send detection bag, the detection bag comprising client with The authentication information of server, can first verify that the identity information of client and server, carry out detection client with Whether the communication of server is interrupted.It is working properly if not interrupting, if interrupting, into step S7
In the step s 7, when detecting the communication disruption between client and server, then server re-creates service Device window, while being reconnected with client, and carries out data syn-chronization with client, to recover normal communication.
As shown in Fig. 2 real for the method for above-mentioned a kind of client and server communication based on graphical services of the invention Apply server operation method flow diagram in example.
In step S11, client sends the operational order of reset to server, and server carries out reset operation, works as completion Reset after operation, server sends the message for initializing and completing to client.Client is main control terminal, and control server is realized Specific display function, server is display terminal, by client control, is responsible for the establishment, display, hiding, pin of graphical interfaces Ruin, and window events are provided.
In step S12, server creates server window, all clothes in addition to main interface according to the operational order of client The display properties of business device window is set to hiding.
In step S13, client sends operational order according to functional requirement to server, and control server is realized corresponding Function, and shown in the server window, server can create multiple server windows, be needed for different functions Ask, shown in different server windows, and each server window has the priority of setting, is adapted to each different preferential The task processing of level.
In step S14, server, which is in, waits state-event, and when each operational order is sent to server, server is complete Into after corresponding operational order, client is replied, client redistributes task, and updates wait event, and the step can be same Step is carried out.
In step S15, the operational order event of server process client, according to different functional requirements, generates phase The processing event answered.
In step s 16, client is waited to send detection bag.Client sends to server detect at one's leisure, regularly Bag, authentication information of the detection bag comprising client and server, can first verify that client and the identity of server Whether information, interrupt in the communication for carrying out detection client and server.
Working properly if the communication of client and server is not interrupted in step S17, server is to client Reply testing result;If detecting the communication disruption between client and server, server re-creates server window, Reconnected simultaneously with client, and data syn-chronization is carried out with client, to recover normal communication.
It is a kind of knot of the device embodiment of client and server communication based on graphical services of the present invention as shown in Figure 3 Structure block diagram.Above-mentioned client and the embodiment of the method for server communication can apply to the client and server communication On device.The device of the client and server communication is included with lower module:
Window creating module 100, for resetting server in client, server sends initialization completion to client and disappeared Breath, and create server window(Multiple windows).Client sends the operational order of reset to server, and server is resetted Operation, after completing to reset operation, server sends the message for initializing and completing to client.Client is main control terminal, control Control server realizes specific display function, and server is display terminal, by client control.
Window display module 200, for showing that client is sent according to functional requirement to server in server window Operational order.This 200 includes creating unit of graphical interfaces, display unit, hidden unit, destroys unit and simultaneously window thing Part unit.
Communication check module 300, including for verifying the authentication unit communicated between client and server, in visitor Timing sends detection bag when family end is in data communication idle condition, and whether the communication of detection client and server is interrupted.
Communication synchronization module 400, during for communication disruption in client and server, is then re-created on the server The server window, and synchronized with client.Including re-create the server window heavy losses unit and with The synchronization unit that client is synchronized.
In the present embodiment, above-mentioned window creating module 100 can be corresponding input equipment in computer, complete window Mouth creates function;Window display module 200 can be the display devices such as the display in computer;Communication check module 300 can So that in being network transmission, the device of communication check is carried out based on TCP transmission control protocol;Synchronization module 400 can be computer In the device that synchronizes of utilization NTP network time synchronization agreements.

Claims (10)

1. a kind of method of client and server communication, it is characterised in that including:
A. server is resetted in client, sends initialization completion message to client using server, and create multiple services Device window, is also set to hiding by the display properties of the Servers-all window in addition to main interface;
B. client sends operational order according to specific functional requirement to server, and is shown in the server window, The server window is directed to different functional requirements, presets different priority;
C. client timing when data communication is idle sends detection bag, and whether the communication of detection client and server is interrupted;
If D. client and the communication disruption of server, server re-creates the server window, and enters with client Row is synchronous.
2. the method for client according to claim 1 and server communication, it is characterised in that in step A, the service The display properties of device window is set to hiding.
3. the method for client according to claim 1 and server communication, it is characterised in that step B also includes, aobvious Corresponding server window attribute is set to display before showing the operational order.
4. the method for client according to claim 1 and server communication, it is characterised in that in step C, the detection Include the checking information between client and server.
5. the method for client according to claim 1 and server communication, it is characterised in that step D also includes, in institute State after server window re-creates, the initialization completion message of server is sent to client, and carry out with client same Step.
6. the device of a kind of client and server communication, it is characterised in that including:
Window creating module, for resetting server in client, and is completed using server to client transmission initialization Message, and multiple server windows are created, the display properties of the Servers-all window in addition to main interface is also set to hiding;
Window display module, for sending operational order to server according to specific functional requirement in client, and described Shown in server window, the server window is directed to different functional requirements, preset different priority;
Communication check module, for the timing transmission detection bag when client is in data communication idle condition, and detects client Hold whether the communication with server is interrupted;
Communication synchronization module, during for communication disruption in client and server, re-creates the service on the server Device window, and synchronized with client.
7. the device of client according to claim 6 and server communication, it is characterised in that the window creating module Including multiple windows units.
8. the device of client according to claim 6 and server communication, it is characterised in that the window display module Unit is destroyed including window display unit, window hidden unit, window.
9. the device of client according to claim 6 and server communication, it is characterised in that the communication check module Including for verifying the authentication unit communicated between client and server.
10. the device of client according to claim 6 and server communication, it is characterised in that the communication synchronization mould Block includes the synchronization unit for re-creating the heavy losses unit of the server window and being synchronized with client.
CN201210574961.4A 2012-12-26 2012-12-26 The method and apparatus of client and server communication Active CN103905387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210574961.4A CN103905387B (en) 2012-12-26 2012-12-26 The method and apparatus of client and server communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210574961.4A CN103905387B (en) 2012-12-26 2012-12-26 The method and apparatus of client and server communication

Publications (2)

Publication Number Publication Date
CN103905387A CN103905387A (en) 2014-07-02
CN103905387B true CN103905387B (en) 2017-09-12

Family

ID=50996542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210574961.4A Active CN103905387B (en) 2012-12-26 2012-12-26 The method and apparatus of client and server communication

Country Status (1)

Country Link
CN (1) CN103905387B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101657808A (en) * 2007-03-12 2010-02-24 金琪年 Be used to make the method and the system thereof of multi-divided display contents
CN102223415A (en) * 2011-06-21 2011-10-19 广东威创视讯科技股份有限公司 Window operation synchronization method of distributed processing system and device thereof
CN102571741A (en) * 2010-08-06 2012-07-11 泰勒斯公司 Secured client-server computer system for interactive applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101657808A (en) * 2007-03-12 2010-02-24 金琪年 Be used to make the method and the system thereof of multi-divided display contents
CN102571741A (en) * 2010-08-06 2012-07-11 泰勒斯公司 Secured client-server computer system for interactive applications
CN102223415A (en) * 2011-06-21 2011-10-19 广东威创视讯科技股份有限公司 Window operation synchronization method of distributed processing system and device thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Internet/Intranet的远程虚拟仪器;孙美香 等;《电子学报》;20020930;第30卷(第9期);全文 *

Also Published As

Publication number Publication date
CN103905387A (en) 2014-07-02

Similar Documents

Publication Publication Date Title
CN103902692B (en) Application interface updating method, device and system
KR101408037B1 (en) Virtual Machine Integration Monitoring Apparatus and method for Cloud system
CN102377814B (en) Remote assistance service method aiming at embedded operation system
US8375126B2 (en) Methods, apparatus and techniques for suspending, resuming, and sharing sessions using object serialization
WO2017107732A1 (en) Login status synchronization method and system
US10171294B2 (en) Information processing device and system design support method
CN108430116A (en) Suspension reconnection method, medium, device and computing device
CN104199957A (en) Redis universal agent implementation method
JP2013543617A5 (en)
CN106936633B (en) Application installation package manufacturing method and server
CN102937906A (en) Method and system for updating patch software
CN112925652A (en) Application resource deployment method, device, electronic equipment and medium
CN103501295B (en) A kind of remote access method based on virtual machine (vm) migration and equipment
CN103490945A (en) Method for detecting maximum telnet user quantity
CN106941418B (en) SSL VPN configuration information synchronization method and device
CN1980232A (en) Telnet session maitenance method, telnet proxy and computer network system
CN106878260B (en) Single sign-on realization method and device
CN103905387B (en) The method and apparatus of client and server communication
CN103139276B (en) Web page and the method and system of graphic user interface client two-way communication
JP2016054341A (en) Ne management device, configuration synchronization method, and configuration synchronization system
CN109062599B (en) Management method and device for code update under micro-service architecture
CN106878467A (en) The method and tele-control system of remote control equipment
CN106411570A (en) Method for realizing SCTP (streaming control transmission protocol) protocol hot backup, system and server host
CN105516256A (en) Batch command operation method and device of Linux host
CN107423107B (en) Construction method of mobile distributed data center

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant