CN102255895A - Method and system for data communication between client and server - Google Patents
Method and system for data communication between client and server Download PDFInfo
- Publication number
- CN102255895A CN102255895A CN2011101790615A CN201110179061A CN102255895A CN 102255895 A CN102255895 A CN 102255895A CN 2011101790615 A CN2011101790615 A CN 2011101790615A CN 201110179061 A CN201110179061 A CN 201110179061A CN 102255895 A CN102255895 A CN 102255895A
- Authority
- CN
- China
- Prior art keywords
- service end
- client
- request
- proxy server
- communication proxy
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention relates to the technical field of computer communication, in particular to a method and a system for data communication between a client and a server. The method comprises the following steps that: 1, a communication agent server receives a server connection request from a client program; 2, the communication agent server forwards the server connection request to the server, and receives a response from the server; and 3, the communication agent server transmits the response of the server to the client program. In the method and the system, the communication agent server is arranged between the client and the server, so that all the client programs to communicate with the server are only required to be connected with the communication agent server, and operations such as data forwarding, data encryption, data decryption, data queuing and the like are all finished by the communication agent server to reduce the complexity of the programs and improve the maintainability.
Description
Technical field
The present invention relates to the computer communication technology field, data communications method and system between particularly a kind of client and the service end.
Background technology
At present, on a computer (client) different application programs can be installed, each application program all needs by client-side program corresponding with it, could realize with service end between communicate by letter, transfer of data.When if the communication requirement of client-side program is had some change, then need corresponding client-side program is made amendment, but the risk that client-side program is made amendment is very high, makes the also corresponding increase of complexity of client-side program, and reduced the maintainability of client-side program, improved cost.
Summary of the invention
(1) technical problem that will solve
The technical problem to be solved in the present invention is: when the communication requirement that how to be implemented in client-side program is had some change, do not revise the communication requirement that client-side program just can satisfy client-side program.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides the data communications method between a kind of client and the service end, may further comprise the steps:
S1: communication proxy server receives the request of the Connection Service end that client-side program sent;
S2: described communication proxy server is forwarded to service end with the request of described Connection Service end, and receives the response from described service end;
S3: described communication proxy server is sent to described client-side program with the response of described service end.
Preferably, before the step S1, also comprise step:
S0: judge whether client-side program successfully connects described communication proxy server, if then direct execution in step S1 if not, then reconnects every the scheduled time, after successful connection, execution in step S1 again.
Preferably, described communication proxy server sends described request according to pre-setting priority.
Preferably, among the step S2, described communication proxy server sends request by formation to described service end, respectively described request is sent into the tail of the queue of respective queue according to described pre-setting priority, sends request in the corresponding formation from high to low according to described pre-setting priority when sending.
Preferably, the quantity of described formation is identical with the quantity of the type of the pre-setting priority of described request.
Preferably, described pre-setting priority comprises: high, standard and low three types.
Preferably, in step S2, described communication proxy server sends asking to service end of described Connection Service end, also comprises step:
Described communication proxy server judges whether the request of described Connection Service end sends success, if then receive the response from described service end; If not, then the pre-setting priority according to described request judges whether that needs resend the request of described Connection Service end, if described pre-setting priority is high, then the request of described Connection Service end is joined the tail of the queue of transmit queue, resend, if described pre-setting priority is a standard or low, then do not carry out subsequent step.
Preferably, when carrying out data interaction between described communication proxy server and the service end, all the data that receive are decrypted, the data that send are carried out data decryption.
The invention also discloses the data communication system between a kind of client and the service end, comprise communication proxy server, described communication proxy server further comprises:
Receiver module is used to receive the request of the Connection Service end that client-side program sends;
Transmit request module, be used for the request of described Connection Service end is forwarded to service end, and reception is from the response of described service end;
The transmitted response module is used for the response of described service end is sent to described client-side program.
Preferably, this system also comprises:
Judge module is used to judge whether client-side program successfully connects described communication proxy server, and when successfully not connecting, reconnects every the scheduled time, until successful connection.
(3) beneficial effect
The present invention is by being provided with communication proxy server between client and service end, making all only need be connected described communication proxy server with the client-side program that service end communicates gets final product, work such as the encrypting and decrypting of data forwarding, data, queuing and priority are handled by described communication proxy server, reduce the complexity of program, improved maintainability.
Description of drawings
Fig. 1 is according to the client of one embodiment of the present invention and the flow chart of the data communications method between the service end;
Fig. 2 is the structural representation according to communication proxy server in client of one embodiment of the present invention and the data communication system between the service end.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used to illustrate the present invention, but are not used for limiting the scope of the invention.
The present invention is by being provided with communication proxy server between client and service end, making all only need be connected described communication proxy server with the client-side program that service end communicates gets final product, work such as the encrypting and decrypting of data forwarding, data and queuing are handled by described communication proxy server, like this, each client-side program only need be handled the service logic of oneself, and needn't handle the problem of communication aspects, and reduced the complexity of program, improved maintainability.
Fig. 1 is according to the client of one embodiment of the present invention and the flow chart of the data communications method between the service end, may further comprise the steps:
S1: communication proxy server receives the request of the Connection Service end that client-side program sent;
S2: described communication proxy server sends asking to service end of described Connection Service end, and receives the response from described service end;
S3: described communication proxy server is sent to described client-side program with the response of described service end.
Before the step S1, also comprise step:
S0: judge whether client-side program successfully connects described communication proxy server, if then direct execution in step S1 if not, then reconnects every the scheduled time, after successful connection, execution in step S1 again.
For sending request in an orderly manner, preferably, among the step S2, described communication proxy server sends request by formation to described service end, described request is sent into the tail of the queue of respective queue respectively according to described pre-setting priority, send request in the corresponding formation from high to low according to described pre-setting priority when sending, the quantity of described formation is identical with the quantity of the default priority type of described request.Present embodiment is specified pre-setting priority according to the work requirements and the environment of reality, described pre-setting priority is divided into: height, standard and low three types, correspondingly, be provided with three formations in the present embodiment, for ease of distinguishing, be called first formation, second formation and the 3rd formation are successively according to height, standard and low three types of transmission requests are promptly when sending data, the preferential request that sends in first formation, if ask to distribute in first formation, then continue to send the request of second formation, if the request of second formation also distributes, if when sending the request of second formation or the 3rd formation, the first formation new request that arrived then preferentially sends the request in first formation, if when sending the request of the 3rd formation, the second formation new request that arrived then preferentially sends the request of second formation.
In addition, in step S2, described communication proxy server sends asking to service end of described Connection Service end, also comprises step:
Described communication proxy server judges whether the request of described Connection Service end sends success, if then receive the response from described service end; If not, then the pre-setting priority according to described request judges whether that needs resend the request of described Connection Service end, if described pre-setting priority is high, then the request of described Connection Service end is joined the tail of the queue of transmit queue, resend, if described pre-setting priority is a standard or low, then do not carry out subsequent step.
For improving the Information Security of client-side program, preferably, when carrying out data interaction between described communication proxy server and the service end, all the data that receive are decrypted, the data that send are carried out data decryption.
The invention also discloses the data communication system between a kind of client and the service end, this system finishes communication service between the two by communication proxy server is set between client and service end, as shown in Figure 2, this communication proxy server further comprises:
Receiver module is used to receive the request of the Connection Service end that client-side program sends;
Transmit request module, be used for the request of described Connection Service end is forwarded to service end, and reception is from the response of described service end;
The transmitted response module is used for the response of described service end is sent to described client-side program.
System of the present invention also comprises:
Judge module is used to judge whether client-side program successfully connects described communication proxy server, and when successfully not connecting, reconnects every the scheduled time, until successful connection.
Above execution mode only is used to illustrate the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; under the situation that does not break away from the spirit and scope of the present invention; can also make various variations and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (10)
1. the data communications method between client and the service end is characterized in that, may further comprise the steps:
S1: communication proxy server receives the request of the Connection Service end that client-side program sent;
S2: described communication proxy server is forwarded to service end with the request of described Connection Service end, and receives the response from described service end;
S3: described communication proxy server is sent to described client-side program with the response of described service end.
2. the data communications method between client as claimed in claim 1 and the service end is characterized in that, before the step S1, also comprises step:
S0: judge whether client-side program successfully connects described communication proxy server, if then direct execution in step S1 if not, then reconnects every the scheduled time, after successful connection, execution in step S1 again.
3. the data communications method between client as claimed in claim 1 and the service end is characterized in that, described communication proxy server sends described request according to pre-setting priority.
4. the data communications method between client as claimed in claim 3 and the service end, it is characterized in that, among the step S2, described communication proxy server sends request by formation to described service end, respectively described request is sent into the tail of the queue of respective queue according to described pre-setting priority, when sending, sent request in the corresponding formation from high to low according to described pre-setting priority.
5. the data communications method between client as claimed in claim 4 and the service end is characterized in that, the quantity of described formation is identical with the quantity of the type of the pre-setting priority of described request.
6. the data communications method between client as claimed in claim 5 and the service end is characterized in that, described pre-setting priority comprises: high, standard and low three types.
7. as the data communications method between claim 5 or 6 described clients and the service end, it is characterized in that in step S2, described communication proxy server sends asking to service end of described Connection Service end, also comprises step:
Described communication proxy server judges whether the request of described Connection Service end sends success, if then receive the response from described service end; If not, then the pre-setting priority according to described request judges whether that needs resend the request of described Connection Service end, if described pre-setting priority is high, then the request of described Connection Service end is joined the tail of the queue of transmit queue, resend, if described pre-setting priority is a standard or low, then do not carry out subsequent step.
8. the data communications method between client as claimed in claim 1 and the service end, it is characterized in that, when carrying out data interaction between described communication proxy server and the service end, all the data that receive are decrypted, the data that send are carried out data decryption.
9. the data communication system between client and the service end is characterized in that comprise communication proxy server, described communication proxy server further comprises:
Receiver module is used to receive the request of the Connection Service end that client-side program sends;
Transmit request module, be used for the request of described Connection Service end is forwarded to service end, and reception is from the response of described service end;
The transmitted response module is used for the response of described service end is sent to described client-side program.
10. the data communication system between client as claimed in claim 9 and the service end is characterized in that, this system also comprises:
Judge module is used to judge whether client-side program successfully connects described communication proxy server, and when successfully not connecting, reconnects every the scheduled time, until successful connection.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101790615A CN102255895A (en) | 2011-06-29 | 2011-06-29 | Method and system for data communication between client and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101790615A CN102255895A (en) | 2011-06-29 | 2011-06-29 | Method and system for data communication between client and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102255895A true CN102255895A (en) | 2011-11-23 |
Family
ID=44982891
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011101790615A Pending CN102255895A (en) | 2011-06-29 | 2011-06-29 | Method and system for data communication between client and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102255895A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103647802A (en) * | 2013-11-20 | 2014-03-19 | 张若渊 | Mobile network data transmission system and method |
CN103685387A (en) * | 2012-09-12 | 2014-03-26 | 中国移动通信集团公司 | Method for scheduling HTTP (hyper text transport protocol) request and browser device |
CN112365360A (en) * | 2020-10-26 | 2021-02-12 | 红云红河烟草(集团)有限责任公司 | Cigarette production line material consumption statistical calculation method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101335762A (en) * | 2007-06-25 | 2008-12-31 | 株式会社日立制作所 | Method, server, terminal and system reflecting historical using behavior of webpage |
CN101651707A (en) * | 2009-09-22 | 2010-02-17 | 西安交通大学 | Method for automatically acquiring user behavior log of network |
-
2011
- 2011-06-29 CN CN2011101790615A patent/CN102255895A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101335762A (en) * | 2007-06-25 | 2008-12-31 | 株式会社日立制作所 | Method, server, terminal and system reflecting historical using behavior of webpage |
CN101651707A (en) * | 2009-09-22 | 2010-02-17 | 西安交通大学 | Method for automatically acquiring user behavior log of network |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103685387A (en) * | 2012-09-12 | 2014-03-26 | 中国移动通信集团公司 | Method for scheduling HTTP (hyper text transport protocol) request and browser device |
CN103685387B (en) * | 2012-09-12 | 2017-05-03 | 中国移动通信集团公司 | Method for scheduling HTTP (hyper text transport protocol) request and browser device |
CN103647802A (en) * | 2013-11-20 | 2014-03-19 | 张若渊 | Mobile network data transmission system and method |
CN112365360A (en) * | 2020-10-26 | 2021-02-12 | 红云红河烟草(集团)有限责任公司 | Cigarette production line material consumption statistical calculation method |
CN112365360B (en) * | 2020-10-26 | 2023-04-28 | 红云红河烟草(集团)有限责任公司 | Material consumption statistical calculation method for cigarette production line |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105260250B (en) | A kind of dual system communication device of linux system and android system | |
US8069251B2 (en) | System and/or method for client-driven server load distribution | |
CN106790221B (en) | Internet protocol security IPSec protocol encryption method and network equipment | |
CN108063813B (en) | Method and system for parallelizing password service network in cluster environment | |
CN102368725B (en) | Data receiving method of multiple network cards and system thereof | |
CN104580158A (en) | Distributed platform file and content distribution method and distributed platform file and content distribution system | |
CN102739644B (en) | A kind of sending/receiving method of finance data and device | |
CN107592215A (en) | A kind of method for managing message-oriented middleware | |
WO2013178099A1 (en) | System, method, client and service centre for realizing remote desktop | |
CN106464596A (en) | Openflow communication method, system, controller, and service gateway | |
US8650313B2 (en) | Endpoint discriminator in network transport protocol startup packets | |
CN102255895A (en) | Method and system for data communication between client and server | |
JP5961471B2 (en) | Output comparison method in multiple information systems | |
US20130339727A1 (en) | WAN Optimization Without Required User Configuration for WAN Secured VDI Traffic | |
WO2014089968A1 (en) | Virtual machine system data encryption method and device | |
CN106302432A (en) | A kind of communicator based on car networking and control method | |
CN105471718A (en) | Realization method of full duplex message queue | |
CN106130695A (en) | A kind of data transmission method and system | |
KR20120128013A (en) | System and method for providing push service | |
CN103220260A (en) | Method of updating data, server, client-side and system | |
CN109660370A (en) | A kind of equipment communication means of digit broadcasting system | |
CN101651713A (en) | Smart card network data transmitting method and device | |
CN105188087A (en) | Business communication method and system based on short message gateway | |
CN110830366A (en) | Military field message pushing system | |
CN113810397A (en) | Protocol data processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20111123 |