CN110417824A - A method of realizing network service - Google Patents

A method of realizing network service Download PDF

Info

Publication number
CN110417824A
CN110417824A CN201810363734.4A CN201810363734A CN110417824A CN 110417824 A CN110417824 A CN 110417824A CN 201810363734 A CN201810363734 A CN 201810363734A CN 110417824 A CN110417824 A CN 110417824A
Authority
CN
China
Prior art keywords
service
server
client
proxy server
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
Application number
CN201810363734.4A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201810363734.4A priority Critical patent/CN110417824A/en
Publication of CN110417824A publication Critical patent/CN110417824A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a kind of method for realizing network service, applied to include service server, proxy server, client network service system in, after client initiates network service request to service server, the service request is forwarded to service server by proxy server, service server directly replys service response message to client, which is handled without service server.By using the technical solution, it is possible to reduce the bandwidth occupancy of proxy server message amount to be treated and proxy server.

Description

A method of realizing network service
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of method for realizing network service.
Background technique
Current smart home is increasingly developed, and there are equipment (such as intelligent cameras of service server function in home network Head), it also there is the demand by Internet network access home business server (hereinafter service server).
Due to the address public network IP v4 scarcity, operator may use NAT(Network Address Translation, net Network address conversion) technology solves the problems, such as public network address scarcity, what operator distributed to home network at this time is the address private network IPv4, Cause browser that can not directly access service server by public network.Existing way is to pass through TCP(Transmission Control Protocol transmission control protocol) connection adhesion mode realize.In logic networking as shown in Figure 1, business service Device is first and proxy server establishes TCP connection, and the process of subsequent browser access service server is as follows:
1, browser and proxy server establish TCP connection;
2, browser sends HTTP service request to proxy server;
3, the TCP connection forwarding HTTP service request that proxy server is established to corresponding service server;
4, service server replys http response message to proxy server;
5, proxy server forwards http response message to corresponding browser.
The prior art has the drawback that
Browser issues HTTP service request and the http response message of service server and must all be carried out by proxy server Forwarding, the bandwidth requirement of proxy server is very high, is difficult large scale deployment.
Summary of the invention
The present invention provides a kind of method for realizing network service, it is possible to reduce proxy server message amount to be treated With the bandwidth occupancy of proxy server.
In view of this, the embodiment of the present invention provides:
A method of realize network service, applied to include service server, proxy server, client network service system In system, wherein client and proxy server foundation have TCP connection C1, and service server and proxy server foundation have logic logical Road P2, the service request information of client are sent initially to proxy server, and proxy server forwards the request message and C1 to mark Will information is to service server, and service server uses C1 flag information packing service response message, therefore the service response disappears Breath needs not move through proxy server forwarding.
The present invention also provides another improved method, the service request information of client is sent initially to proxy server, Proxy server direct answer service response message includes IP address/port numbers of P2 in message;Client is using the IP Location/port numbers are directly and service server carries out network service interaction, and this method can equally guarantee the service of service server Response message needs not move through proxy server forwarding.
The present invention also provides another improved methods, increase a relay services between service server and client Device, this method, which can be used for client, to be established in the scene of communication connection with service server.The service request of client disappears Breath is forwarded to service server processing by Relay Server, conversely, the service response message of service server is by Relay Server It is forwarded to client.
Because the service response message that service server is replied is handled without proxy server, method provided by the invention The bandwidth occupancy of proxy server message amount to be treated and proxy server can be reduced.
Detailed description of the invention
Fig. 1 is the logic networking diagram that Relay Server is not present in the present invention.
Fig. 2 is the logic networking diagram in the present invention there are Relay Server.
Fig. 3 is the message interaction process figure of Fig. 1 group the first embodiment off the net.
Fig. 4 is the message interaction process figure of Fig. 1 group second of embodiment off the net.
Fig. 5 is the message interaction process figure of Fig. 2 group the first embodiment off the net.
Fig. 6 is the message interaction process figure of Fig. 2 group second of embodiment off the net.
Fig. 7 is the message interaction process figure of Fig. 2 group the third embodiment off the net.
Specific embodiment
The present invention does not have technological improvement to client;Without illustrate when, client, that is, general browser program, as ie, Firefox etc..
Present invention is mainly applied to logic networking shown in Fig. 2, service server/Relay Server is connect by NAT device Enter the scene of Internet network;The characteristics of due to NAT technology itself, with the presence or absence of NAT device to the technology of the present invention in network Scheme does not influence, and for more prominent technical solution, does not embody NAT device in the embodiment of the present invention.
Fig. 3 describes Fig. 1 group the first embodiment of the invention off the net;It is described in detail as follows:
301, service server S1 establishes logic according to preparatory disclosed proxy server logical access address and proxy server Channel P2;Logical access address can be IP address/port numbers of proxy server or proxy server domain name, P2 and can be TCP/UDP etc..
302, S1 identifies (the corresponding user's account of such as service server to proxy advertisement service server by P2 Number);Proxy server is identified according to service server determines that service server corresponds to domain name D1 and establishes the mapping pass of D1 and S1 System.
303, customer end B 1 and proxy server establish TCP connection C1, and C1 is serviced for providing HTTP or HTTPS, if Proxy server provides HTTPS service, and C1 can further negotiate SSL/TLS key information.After connection negotiation, B1 is sent Http protocol request message comprising D1.
304, after proxy server receives HTTP request message, the server for handling the request is determined according to D1, in this example For S1.Then request message and packaging information are forwarded to S1, wherein packaging information is the corresponding head the IP/TCP header of C1 connection (HTTP service) or IP head/TCP header/key information (HTTPS service).
305, S1 constructs correct response message, is encrypted and sent after being encapsulated final response message;Final sound Answering destination address/port numbers in message is the corresponding IP address/port numbers of C1 client-side, and source IP address/port numbers are C1 generations Manage IP address/port numbers of server side, it is also necessary to the sequence number etc. in correct encapsulation TCP header.
Fig. 4 describes Fig. 1 group second of embodiment of the invention off the net;It is described in detail as follows:
301, service server S1 establishes logic according to preparatory disclosed proxy server logical access address and proxy server Channel P2;Logical access address can be the IP address/port numbers or proxy server domain name of proxy server, and P2 is that TCP connects It connects.
302, S1 identifies (the corresponding user's account of such as service server to proxy advertisement service server by P2 Number);Proxy server is identified according to service server determines that service server corresponds to domain name D1 and establishes the mapping pass of D1 and S1 System.
303, customer end B 1 sends the http protocol request message comprising D1 to proxy server.
304, after proxy server receives HTTP request message, the server for handling the request is determined according to D1, in this example For S1.And http response message is replied to B1, it include IP address/port numbers of P2 service server side in message;If S1 is uncommon Prestige uses other IP address/ports to provide HTTP service to client as network address, can take in 302 steps to agency Business device notices IP address/port, and proxy server then carries out http response with the IP address of S1 notice/port.
305, B1 initiates HTTP request to S1 using IP address/port numbers in http response message.
306, S1 replys correct http response message.
Fig. 5 describes Fig. 2 group the first embodiment of the invention off the net;It is described in detail as follows:
301, service server S1 establishes logic according to preparatory disclosed proxy server logical access address and proxy server Channel P2;Logical access address can be IP address/port numbers of proxy server or proxy server domain name, P2 and can be TCP/UDP connection etc..
302, Relay Server S2 is established according to preparatory disclosed proxy server logical access address and proxy server Logical channel P3;Logical access address can be the IP address/port numbers or proxy server domain name of proxy server, and P3 can be with It is TCP/UDP connection etc..After Path Setup, S2 notices service-oriented server to service server by P3 and establishes logical channel Address A2;A2 can be multiplexed the corresponding address P3, be also possible to other available address of Relay Server offer, usually IP The format of address/port number.
303, S1 identifies (the corresponding user's account of such as service server to proxy advertisement service server by P2 Number);Proxy server is identified according to service server determines that service server corresponds to domain name D1;A relaying is selected simultaneously for S1 It is S2 in server this example, establishes the mapping relations of D1 and S2.
304, proxy server notices Relay Server logical access address A2 to service server by P3.
305, S1 establishes logical channel P4 using A2 and S2;P4 can be TCP/UDP connection etc..
306, S1 notices the corresponding domain name D1 of S1 to S2;S2 establishes the mapping relations of D1 and S1 accordingly.
307, customer end B 1 and proxy server establish TCP connection C1, and C1 is serviced for providing HTTP or HTTPS, if Proxy server provides HTTPS service, and C1 can further negotiate SSL/TLS key information.After connection negotiation, B1 is sent Http protocol request message comprising D1.
308, after proxy server receives HTTP request message, the server for handling the request is determined according to D1, in this example For S2.Then request message and packaging information are forwarded to S2, wherein packaging information is the corresponding head the IP/TCP header of C1 connection (HTTP service) or IP head/TCP header/key information (HTTPS service).
309, S2 parses request message and packaging information from the message of proxy server, and request message is numbered It determines that service server is S1 according to D1 afterwards, then forwards request message from P4, take message numbering in the request message of forwarding; The message numbering and packaging information corresponding relationship are recorded simultaneously.
310, after S1 receives service request information, according to request construction service response message and the message numbering received is taken S2 is sent to by P4.
311, after S2 receives service response message, packaging information is obtained according to message numbering, service response message is carried out Final response message is sent after encryption and encapsulation;Destination address/port numbers are C1 client-sides pair in final response message IP address/the port numbers answered, source IP address/port numbers are IP address/port numbers of C1 proxy server side, it is also necessary to correct envelope Fill the sequence number etc. in TCP header.
Fig. 6 describes Fig. 2 group second of embodiment of the invention off the net;It is described in detail as follows:
301, service server S1 establishes logic according to preparatory disclosed proxy server logical access address and proxy server Channel P2;Logical access address can be IP address/port numbers of proxy server or proxy server domain name, P2 and can be TCP/UDP connection etc..
302, Relay Server S2 is established according to preparatory disclosed proxy server logical access address and proxy server Logical channel P3;Logical access address can be the IP address/port numbers or proxy server domain name of proxy server, and P3 can be with It is TCP/UDP connection etc..After Path Setup, S2 notices curstomer-oriented end to service server by P3 and provides the ground of network service Location A1 and service-oriented server establish the address A2 of logical channel;A1/A2 can be multiplexed the corresponding address P3, be also possible to After other available address that server provides, usually IP address/port numbers format.
303, S1 identifies (the corresponding user's account of such as service server to proxy advertisement service server by P2 Number);Proxy server is identified according to service server determines that service server corresponds to domain name D1;A relaying is selected simultaneously for S1 It is S2 in server this example, establishes the mapping relations of D1 and S2.
304, proxy server notices Relay Server logical access address A2 to service server by P3.
305, S1 establishes logical channel P4 using A2 and S2;P4 can be TCP/UDP connection etc..
306, S1 notices the corresponding domain name D1 of S1 to S2;S2 establishes the mapping relations of D1 and S1 accordingly.
307, customer end B 1 sends the http protocol request message comprising D1 to proxy server.
308, after proxy server receives HTTP request message, the server for handling the request is determined according to D1, in this example For S2;Http response message is replied to client, includes A2 and D1 in message;If A2 energy unique identification service server S1, It can only include A2 information.
309, B1 initiates HTTP request to S2 according to http response message.
310, the service server for handling the request, this example are determined after HTTP request message is numbered in S2 according to message In be S1, forward request message from P4, take message numbering in the request message of forwarding;The message numbering and client are recorded simultaneously Hold corresponding relationship.
311, after S1 receives service request information, according to request construction service response message and the message numbering received is taken S1 is sent to by P4.
312, after S2 receives service response message, correct http response message is replied to B1 according to message numbering.
Fig. 7 describes Fig. 2 group the third embodiment of the invention off the net;It is described in detail as follows:
301, service server S1 establishes logic according to preparatory disclosed proxy server logical access address and proxy server Channel P2;Logical access address can be IP address/port numbers of proxy server or proxy server domain name, P2 and can be TCP/UDP connection etc..
302, Relay Server S2 is established according to preparatory disclosed proxy server logical access address and proxy server Logical channel P3;Logical access address can be the IP address/port numbers or proxy server domain name of proxy server, and P3 can be with It is TCP/UDP connection etc..After Path Setup, S2 notices curstomer-oriented end to service server by P3 and provides the ground of network service Location A1 and service-oriented server establish the address A2 of logical channel;A1 is the public network address of Relay Server S2, and A2 can be answered With the corresponding address P3, it is also possible to other available address of Relay Server offer, usually IP address/port numbers lattice Formula.
303, S1 identifies (the corresponding user's account of such as service server to proxy advertisement service server by P2 Number);Proxy server is identified according to service server determines that service server corresponds to domain name D1;A relaying is selected simultaneously for S1 It is S2 in server this example, establishes the mapping relations of D1 and S2.
304, proxy server notices Relay Server logical access address A2 to service server by P3.
305, S1 establishes logical channel P4 using A2 and S2;P4 can be TCP/UDP connection etc..
306, S1 notices the corresponding domain name D1 of S1 to S2;S2 establishes the mapping relations of D1 and S1 accordingly.
307, customer end B 1 accesses D1 and does the DNS resource record that available proxy server provides when DNS query (Resource Records), thus to obtain TCP connection public network address is established, this example is the public network address A1 of S2.B1 and S2 are built After vertical TCP connection, the http protocol request message comprising D1 is sent.
308, the business service for handling the request is determined after HTTP request message is numbered in S2 according to the D1 in message Device is S1 in this example, forwards request message from P4, takes message numbering in the request message of forwarding;Message volume is recorded simultaneously Number and client corresponding relationship.
309, after S1 receives service request information, according to request construction service response message and the message numbering received is taken S1 is sent to by P4.
310, after S2 receives service response message, correct http response message is replied to B1 according to message numbering.
The above description of the embodiment is only used to help understand the method for the present invention and its core ideas, for the general of this field Technical staff has change according to the thought of the present invention in specific embodiments and applications;In conclusion this Description should not be construed as limiting the invention.

Claims (12)

1. a kind of method for realizing network service, applied to the network service including service server, proxy server, client In system, wherein the client and proxy server foundation have TCP connection C1, the service server and proxy server are built It is vertical to have logical channel P2, which is characterized in that the service server replys the service response message of the client without institute State proxy server processing.
2. the method according to claim 1, wherein the client is general browser.
3. the method according to claim 1, wherein having NAT between the service server and proxy server Equipment.
4. the method according to claim 1, wherein including:
After the proxy server receives the client-side service request message from the C1, taken by the P2 to the business The device transmission service request information of being engaged in and the C1 identification information, the C1 identification information include the head IP of the C1, TCP The head IP, TCP header and the key information of head or the C1;
The service server uses the C1 identification information encapsulated message when replying the service response message of the client.
5. the method according to claim 1, wherein including:
The service server provides the network address of network service to the proxy advertisement;
After the proxy server receives the client-side service request message from the C1, service response is replied to client and is disappeared Breath, the service response message include the network address.
6. according to the method described in claim 5, it is characterized in that, the P2 is to initiate to establish by the service server TCP connection, the network address are the IP address and port numbers at P2 service server end.
7. the method according to claim 1, wherein including:
There is Relay Server in network, the Relay Server and proxy server foundation have logical channel P3, the middle following the service Business device is used to establish the network address A2 of logical channel with service server by the P3 to the proxy advertisement;
The service server has logical channel P4, the business service according to the network address A2 and Relay Server foundation The service response message that device is replied is sent to the Relay Server by the P4, and the Relay Server is to the client Forward service response message.
8. the method according to the description of claim 7 is characterized in that including:
The client sends service request information to the proxy server by the C1;
The Relay Server uses the C1 identification information encapsulated message, institute when forwarding service response message to the client State the head IP, TCP header and the key information on the head IP, TCP header or the C1 that C1 identification information includes the C1.
9. the method according to the description of claim 7 is characterized in that including:
The Relay Server provides the network address A1 of network service to the proxy advertisement;
After the proxy server receives the client-side service request message from the C1, service response is replied to client and is disappeared Breath, the service response message include the network address A1.
10. a kind of method for realizing network service takes applied to the network including service server, proxy server, client In business system, wherein the service server and proxy server foundation have logical channel P2 characterized by comprising
There is Relay Server in network, the Relay Server and proxy server foundation have logical channel P3, the middle following the service Business device is used to establish the network address A2 of logical channel with service server by the P3 to the proxy advertisement;
The service server has logical channel P4, the business service according to the network address A2 and Relay Server foundation The service response message that device is replied is sent to the Relay Server by the P4, and the Relay Server is to the client Forward service response message.
11. according to the method described in claim 10, it is characterized in that, the proxy server provides the service server Resource record (Resource Records), wherein network address is the public network address of the Relay Server.
12. according to the method described in claim 10, it is characterized in that, having between the service server and proxy server NAT device.
CN201810363734.4A 2018-04-26 2018-04-26 A method of realizing network service Pending CN110417824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810363734.4A CN110417824A (en) 2018-04-26 2018-04-26 A method of realizing network service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810363734.4A CN110417824A (en) 2018-04-26 2018-04-26 A method of realizing network service

Publications (1)

Publication Number Publication Date
CN110417824A true CN110417824A (en) 2019-11-05

Family

ID=68345616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810363734.4A Pending CN110417824A (en) 2018-04-26 2018-04-26 A method of realizing network service

Country Status (1)

Country Link
CN (1) CN110417824A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099306A (en) * 2021-03-23 2021-07-09 北京达佳互联信息技术有限公司 Method, apparatus, device, server, medium and product for message transmission

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411220A (en) * 2001-10-04 2003-04-16 华为技术有限公司 Method and system of realizing IP speech service of private network
CN101227418A (en) * 2007-01-19 2008-07-23 华为技术有限公司 System, apparatus and method for implementing amalgamation IP message
CN101404674A (en) * 2008-11-17 2009-04-08 杭州华三通信技术有限公司 Call routing method, proxy server and relay device
US20090097458A1 (en) * 2004-11-26 2009-04-16 China Mobile Communications Corporation Method and System for Agent Redirecting the Terminal Request
CN101677329A (en) * 2008-09-18 2010-03-24 中兴通讯股份有限公司 Comprehensive voice resource platform proxy server and its data processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411220A (en) * 2001-10-04 2003-04-16 华为技术有限公司 Method and system of realizing IP speech service of private network
US20090097458A1 (en) * 2004-11-26 2009-04-16 China Mobile Communications Corporation Method and System for Agent Redirecting the Terminal Request
CN101227418A (en) * 2007-01-19 2008-07-23 华为技术有限公司 System, apparatus and method for implementing amalgamation IP message
CN101677329A (en) * 2008-09-18 2010-03-24 中兴通讯股份有限公司 Comprehensive voice resource platform proxy server and its data processing method
CN101404674A (en) * 2008-11-17 2009-04-08 杭州华三通信技术有限公司 Call routing method, proxy server and relay device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099306A (en) * 2021-03-23 2021-07-09 北京达佳互联信息技术有限公司 Method, apparatus, device, server, medium and product for message transmission
CN113099306B (en) * 2021-03-23 2022-11-22 北京达佳互联信息技术有限公司 Message processing method, device, equipment, server, medium and product

Similar Documents

Publication Publication Date Title
US7173928B2 (en) System and method for establishing channels for a real time streaming media communication system
US20210250329A1 (en) Telecommunication system and method for traversing an application layer gateway firewall during the establishment of an rtc communication connection between an rtc client and an rtc server
US7694127B2 (en) Communication systems for traversing firewalls and network address translation (NAT) installations
US7492764B2 (en) System for management of equipment deployed behind firewalls
US8489751B2 (en) Middlebox control
CN100401714C (en) Method for the automatic configuration of a communications device
US8611354B2 (en) Method and apparatus for relaying packets
US8429279B2 (en) Method and device for connecting packet-oriented communication terminals
CN104869065A (en) Method and device for processing data message
US8724630B2 (en) Method and system for implementing network intercommunication
JP4705167B2 (en) Method and system for translating network address translation or firewall equipment
CN101938392A (en) Method of controlling an entity of a remote network from a local network
CN110417824A (en) A method of realizing network service
WO2016119464A1 (en) Method and corresponding gateway for implementing tcp transmission in satellite network environment
CN104168302B (en) Equipment manipulation implementation method, system and proxy gateway
JP5151197B2 (en) COMMUNICATION SYSTEM, PACKET TRANSFER PROCESSING DEVICE, AND COMMUNICATION SESSION CONTROL METHOD USED FOR THEM
CN101834805A (en) Method for implementing traversing of stream control transmission protocol message to network address translation equipment
JP3980562B2 (en) SIP communication control device
JP2005204216A (en) Call-associated resource management method for sip-alg corresponding to multiple nat/fw devices connection, and the sip-alg
CN104518937B (en) The method and device of the more communication between devices of virtual LAN VLAN
JP4060764B2 (en) Communication device
CN106534153B (en) Bridge connection private line establishment system based on Internet
CN117480855A (en) Improved use of IP networks for routing cellular data packets
CN117461297A (en) Use of an IP network for routing cellular data packets
KR20090072610A (en) Communication method between urc server and client located in heterogeneous network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191105

WD01 Invention patent application deemed withdrawn after publication