CN102480463A - Network interaction method and network interaction system - Google Patents

Network interaction method and network interaction system Download PDF

Info

Publication number
CN102480463A
CN102480463A CN2010105560567A CN201010556056A CN102480463A CN 102480463 A CN102480463 A CN 102480463A CN 2010105560567 A CN2010105560567 A CN 2010105560567A CN 201010556056 A CN201010556056 A CN 201010556056A CN 102480463 A CN102480463 A CN 102480463A
Authority
CN
China
Prior art keywords
packet
request
data
command
response
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.)
Granted
Application number
CN2010105560567A
Other languages
Chinese (zh)
Other versions
CN102480463B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201010556056.7A priority Critical patent/CN102480463B/en
Publication of CN102480463A publication Critical patent/CN102480463A/en
Application granted granted Critical
Publication of CN102480463B publication Critical patent/CN102480463B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

A network interaction method includes the steps: creating a request packet by padding employed protocols, a plurality of function commands and data corresponding to the function commands into the same and transmitting the request packet, and then analyzing and responding the request packet. A network interaction system and the network interaction method have the advantages that the number of packets and flow in a network is effectively decreased, and the network scalability is effectively improved due to the fact that the request packet is created by padding the function commands and the data corresponding to the function commands into the same, and the function commands and the data thereof are combined into one packet to be transmitted.

Description

The network interaction method and system
[technical field]
The present invention relates to the network communications technology, particularly relate to a kind of network interaction method and system.
[background technology]
In traditional network interaction process, the packet of network interaction all only comprises a command function and realizes the data of this command function each time, and a plurality of requests of user must realize through a plurality of data inclusions in the network interaction repeatedly.For example, in the reciprocal process of network, produced logging request and file download request simultaneously, produced log-in request packet and download request packet this moment respectively, transmits successively.
Yet; In network interaction process repeatedly, usually include identical header data between the data inclusion, the attributes such as procotol that adopted in the packet are identical; Therefore cause central certain a part of re-transmitted of network institute data packets for transmission, greatly wasted Internet resources.
[summary of the invention]
Based on this, be necessary to provide a kind of network interaction method that reduces the network packet amount.
In addition, also be necessary to provide a kind of network interaction system that reduces the network packet amount.
A kind of network interaction method comprises the steps: to create request data package, the agreement that adopts, a plurality of command function is reached with the corresponding data of said a plurality of command functions be filled in described request packet and transmission; Resolve and response described request packet.
Preferably; Said establishment request data package; The step that is filled in the described request packet with the agreement that adopts, a plurality of command function and with the corresponding data of said a plurality of command functions is specifically: the establishment request data package is provided with packet header and is stored in the request data package according to the agreement that is adopted and a plurality of command function; According to a plurality of command functions in the said packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one; Send the described request packet.
Preferably; Create request data package; Packet header is set and the process that is stored in the request data package is according to the agreement that is adopted and a plurality of command function: obtain a plurality of command functions, and systematic function command header respectively, be protocol-identifier with the protocol translation that adopts; Said protocol-identifier becomes packet header with a plurality of command function capitiforms; And be stored in the request data package, last according to a plurality of command functions in the said packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one.
Preferably, the step of said parsing and response described request packet specifically: read the packet header in the request data package, and according to said packet header read functions protocol entity; Create response data packet, packet header is set and is stored in said response data packet according to agreement that is adopted and described request packet; Become a plurality of functional protocol bodies to deposit response data packet in the data encapsulation corresponding, and send with the packet header of response data packet.
Preferably, said command function obtain be with the Preset Time be interval acquiring or obtain in real time, said command function head has write down Data Identification, data type and the data length in the functional protocol body.
A kind of network interaction system comprises at least: request server, be used to create request data package, and be filled in the also transmission of described request packet with the agreement that adopts, a plurality of command function and with the corresponding data of said a plurality of command functions; Response server is used for resolving and response described request packet.
Preferably, the described request server comprises: module is created in request, is used to create request data package, packet header is set and is stored in the request data package according to the agreement that is adopted and a plurality of command function; The request package module is used for a plurality of command functions according to said packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one; Send request module, be used to send the described request packet.
Preferably; Said establishment module is obtained a plurality of command functions, and difference systematic function command header, is protocol-identifier with the protocol translation that adopts; Said protocol-identifier becomes packet header with a plurality of command function capitiforms; And be stored in the request data package, last according to a plurality of command functions in the said packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one.
Preferably, said response server comprises: parsing module, and the packet header that is used for reading request data package, and according to said packet header read functions protocol entity; The response creation module is used to create response data packet, packet header is set and is stored in the said response data packet according to a plurality of command functions in agreement that is adopted and the described request packet; The response package module becomes a plurality of functional protocol bodies to deposit response data packet in the data encapsulation corresponding with the packet header of response data packet; The response sending module sends said response data packet.
Preferably, said establishment module obtain a plurality of command functions be with the Preset Time be interval acquiring or obtain in real time, said command function head has write down Data Identification, data type and the data length in the functional protocol body.
Above-mentioned network interaction system and method; Create the request data package that a plurality of command functions and the data corresponding with this command function are filled; And a plurality of command functions and data thereof are merged into a request data package send; Reduce data packet number and the flow in the network effectively, improved the scalability of network effectively.
[description of drawings]
Fig. 1 is the flow chart of network interaction method among the present invention;
Fig. 2 is the flow chart of network interaction method among the embodiment;
Fig. 3 is the sketch map of request data package among the embodiment;
Fig. 4 is the sketch map of functional protocol head among the embodiment;
Fig. 5 is the flow chart of network interaction system among the present invention;
Fig. 6 is the flow chart of network interaction system among the embodiment.
[embodiment]
Fig. 1 shows the method flow of network interaction among the embodiment, comprises the steps:
In step S10, create request data package, the agreement that adopts, a plurality of command function and the data corresponding with command function are filled in request data package and transmission.In the present embodiment, the data that are filled in the request data package are used to accomplish this command function.A plurality of command functions and data corresponding shared network agreement in request data package with it, so the packet header of request data package only need be provided with a protocol-identifier.
In step S20, resolve and the response request packet.In the present embodiment, resolve the request data package that receives, and respond according to command function in this request data package and data.According to request data package; Also the form that adopts a plurality of command functions and data sharing one protocol-identifier thereof in the response data packet that this request data package is responded; Particularly; Because this request data package has write down agreement, a plurality of command function reaches and the corresponding data of command function, then response data packet is identical with this request data package, has also write down agreement, a plurality of command function and and the corresponding data of a plurality of command functions.
Fig. 2 shows the method flow of network interaction among the embodiment, comprises the steps:
In step S101, create request data package, packet header is set and is stored in the request data package according to the agreement that is adopted and a plurality of command function.In the present embodiment,, will be arranged in the packet header of request data package with the corresponding protocol-identifier of this agreement according to the agreement that is adopted in the current network.Command function write down request data package the task of will accomplish; And the data of controlling inclusion in this request data package are accomplished this task; According to command function systematic function command header; Make protocol-identifier become the packet header of request data package with the command function capitiform, for example, this preset task can be request of landing and file download request etc.Wherein, Step S101 specifically comprises: obtain a plurality of command functions, and difference systematic function command header, be protocol-identifier with the protocol translation that adopts; Protocol-identifier becomes packet header with a plurality of command function capitiforms; And be stored in the request data package, last according to a plurality of command functions in the packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one.For example, command function can be that the logging request of an immediate communication tool, the download request of video data etc. need be carried out the order of network interaction.Protocol-identifier is corresponding with agreement, and what protocol-identifier had write down that command function head entrained in the request data package and functional protocol body use is any agreement.Command function to obtain with the Preset Time be interval acquiring or obtain in real time.For example, be at interval with the Preset Time, according to all functions order that gets access to, the systematic function command header, in addition, and for strengthening real-time, also can be in real time with all functions order systematic function command header that gets access to simultaneously.Through each command function head all can know request data package the preset task that will accomplish.
In step S102,, the data of correspondence are deposited in the functional protocol body of request data package according to said command function.In the present embodiment,, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one according to the command function in the packet header.Accomplish the inclusion that the pairing data of each command function have constituted request data package, these data form the functional protocol body in the inclusion, to be stored in the request data package.At this moment; In request data package, each functional protocol body has the command function head corresponding with it, and is many to a functional protocol body and a command function shared protocol-identifier; Thereby reduced data packet number and the flow in the network effectively, greatly optimized the mutual of network.As shown in Figure 3, this request data package has comprised protocol header, a plurality of command function head and a plurality of functional protocol body, and wherein arbitrary functional protocol body all has the command function head corresponding with it, and this functional protocol body is used for accomplishing command function corresponding with it.As shown in Figure 4; The sign (sMsgID) of functional protocol body, the type (sMsgType) of functional protocol body and the data length (sMsglen) in the functional protocol body have been write down in the command function head (TMsgHead); Particularly; According to institute's content recorded in the command function head, be highly susceptible to when the analysis request packet according to the Context resolution functional protocol body in the command function head.
In step S103, send request data package.In the present embodiment, the request data package that encapsulation is finished sends, thereby makes that the data in the network interaction process are that the unit transmits with the bag, guarantees the integrality of data effectively.
In step S104, read the packet header in the request data package, and according to packet header read functions protocol entity.In the present embodiment; Receive the request data package of being sent; And resolve packet header of this request data package; Obtain being stored in protocol-identifier and a plurality of command function head in the packet header, and according to the data in each command function read functions protocol entity, to accomplish the task that this request data package sets.
In step S105, create response data packet, packet header is set and is stored in response data packet according to agreement that is adopted and request data package.In the present embodiment,, create response data packet and come response request according to request data package.This response data packet middle wrapping head, form are identical with the form of request data package middle wrapping head.
In step S106, become a plurality of functional protocol bodies to deposit response data packet in the data encapsulation corresponding, and send with the packet header of response data packet.In the present embodiment, the inclusion in the response data packet is identical with the form of inclusion in the request data package.
Fig. 5 shows network interaction of the present invention system, and this system comprises request server, response server, wherein:
Request server 10 is used to create request data package, and the agreement that adopts, a plurality of command function and the data corresponding with command function are filled in request data package and transmission.In the present embodiment, 10 data that are filled in the request data package of request server are used to accomplish this command function.A plurality of command functions and data corresponding with it are shared agreement in the request data package that this request server is created in request data package, so the packet header of request data package only need be provided with a protocol-identifier.
Response server 20 is used for resolving and the response request packet.In the present embodiment, response server 20 is resolved the request data package that receives, and responds according to command function in this request data package and data.Response server 20 is according to request data package, also is the form that adopts a plurality of command functions and data sharing one protocol-identifier thereof in the response data packet that this request data package is responded.
Fig. 6 shows the detailed module of the network interaction system among the embodiment, and among this embodiment, request server 10 comprises request establishment module 101, request package module 102, sends request module 103, wherein:
Module 101 is created in request, is used to create request data package, packet header is set and is stored in the request data package according to the agreement that is adopted and a plurality of command function.In the present embodiment, request is created module 101 according to the agreement that is adopted in the current network, will be arranged in the packet header of request data package with the corresponding protocol-identifier of this agreement.Request is created module 101 and is obtained a plurality of command functions; And difference systematic function command header; With the protocol translation that adopts is protocol-identifier, and protocol-identifier becomes packet header with a plurality of command function capitiforms, and is stored in the request data package; According to said command function, the data of correspondence are deposited in the functional protocol body of request data package.Obtaining of command function is at interval or real-time with the Preset Time.
Request package module 102 is used for a plurality of command functions according to packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one.In the present embodiment, request package module 102 will be accomplished the inclusion that the pairing data of each command function constitute request data package, thereby form the functional protocol body in the inclusion.Deposit in the functional protocol body of packet at request package module 102, each functional protocol body all can find the command function head corresponding with it in request data package, thereby many to a functional protocol body and a command function shared protocol-identifier.
Send request module 103, be used to send request data package.In the present embodiment, send request module 103 request data package that encapsulation finishes is sent.
Response server 20 comprises parsing module 201, response creation module 202, response package module 203 and response sending module 204, wherein:
Parsing module 201, the packet header that is used for reading request data package, and according to packet header read functions protocol entity.In the present embodiment; Parsing module 201 receives the request data package that request server 10 is sent; And resolve packet header of this request data package, obtain being stored in protocol-identifier and a plurality of command function head in the packet header, and according to the data in each command function read functions protocol entity.
Response creation module 202 is used to create response data packet, packet header is set and is stored in response data packet according to agreement that is adopted and request data package.In the present embodiment, response creation module 202 is created response data packet and is come response request according to request data package.This response data packet middle wrapping head, form are identical with the form of request data package middle wrapping head.
Response package module 203 is used for becoming a plurality of functional protocol bodies to deposit response data packet in the data encapsulation corresponding with the packet header of response data packet.In the present embodiment, response is after package module 203 deposits the functional protocol body in response data packet, and the form of the inclusion in the inclusion in this response data packet and the request data package is identical.
Response sending module 204 is used to send response data packet.
Above-mentioned network interaction system and method can be applied to mobile phone, computer or other portable terminal; Owing in the process of network interaction, send and reduced the bag amount in the network through a plurality of command functions and data thereof being merged into a request data package; Send the energy that data consumed thereby reduced mobile phone, computer or other portable terminal effectively, saved electric energy.
Above-mentioned network interaction system and method; Create the request data package that a plurality of command functions and the data corresponding with this command function are filled; And a plurality of command functions and data thereof are merged into a request data package send; Reduce data packet number and the flow in the network effectively, improved the scalability of network effectively.
The above embodiment has only expressed several kinds of execution modes of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art under the prerequisite that does not break away from the present invention's design, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with accompanying claims.

Claims (10)

1. a network interaction method comprises the steps:
Create request data package, the agreement that adopts, a plurality of command function are reached with the corresponding data of said a plurality of command functions be filled in described request packet and transmission;
Resolve and response described request packet.
2. network interaction method according to claim 1 is characterized in that, said establishment request data package, the step that is filled in the described request packet with the agreement that adopts, a plurality of command function and with the corresponding data of said a plurality of command functions specifically:
Create request data package, packet header is set and is stored in the request data package according to the agreement that is adopted and a plurality of command function;
According to said command function, the data of correspondence are deposited in the functional protocol body of request data package;
Send the described request packet.
3. network interaction method according to claim 2; It is characterized in that, create request data package, packet header is set and the process that is stored in the request data package is according to the agreement that is adopted and a plurality of command function: obtain a plurality of command functions; And difference systematic function command header; With the protocol translation that adopts is protocol-identifier, and said protocol-identifier becomes packet header with a plurality of command function capitiforms, and is stored in the request data package; Last according to a plurality of command functions in the said packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one.
4. network interaction method according to claim 2 is characterized in that, the step of said parsing and response described request packet specifically:
Read the packet header in the request data package, and according to said packet header read functions protocol entity;
Create response data packet, packet header is set and is stored in said response data packet according to agreement that is adopted and described request packet;
Become a plurality of functional protocol bodies to deposit response data packet in the data encapsulation corresponding, and send with the packet header of response data packet.
5. network interaction method according to claim 3; It is characterized in that; Said command function obtain be with the Preset Time be interval acquiring or obtain in real time, said command function head has write down Data Identification, data type and the data length in the functional protocol body.
6. a network interaction system is characterized in that, comprises at least:
Request server is used to create request data package, the agreement that adopts, a plurality of command function is reached with the corresponding data of said a plurality of command functions be filled in described request packet and transmission;
Response server is used for resolving and response described request packet.
7. network interaction according to claim 6 system is characterized in that the described request server comprises:
Module is created in request, is used to create request data package, packet header is set and is stored in the request data package according to the agreement that is adopted and a plurality of command function;
The request package module is used for a plurality of command functions according to said packet header, will accomplish the functional protocol body that the pairing data of each command function deposit request data package in one by one;
Send request module, be used to send the described request packet.
8. network interaction according to claim 7 system is characterized in that, described request is created module and obtained a plurality of command functions; And difference systematic function command header; With the protocol translation that adopts is protocol-identifier, and said protocol-identifier becomes packet header with a plurality of command function capitiforms, and is stored in the request data package; According to said command function, the data of correspondence are deposited in the functional protocol body of request data package.
9. network interaction according to claim 7 system is characterized in that said response server comprises:
Parsing module, the packet header that is used for reading request data package, and according to said packet header read functions protocol entity;
The response creation module is used to create response data packet, packet header is set and is stored in the said response data packet according to a plurality of command functions in agreement that is adopted and the described request packet;
The response package module becomes a plurality of functional protocol bodies to deposit response data packet in the data encapsulation corresponding with the packet header of response data packet;
The response sending module sends said response data packet.
10. network interaction according to claim 8 system; It is characterized in that; Said establishment module obtain a plurality of command functions be with the Preset Time be interval acquiring or obtain in real time, said command function head has write down Data Identification, data type and the data length in the functional protocol body.
CN201010556056.7A 2010-11-23 2010-11-23 Network interaction method and network interaction system Active CN102480463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010556056.7A CN102480463B (en) 2010-11-23 2010-11-23 Network interaction method and network interaction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010556056.7A CN102480463B (en) 2010-11-23 2010-11-23 Network interaction method and network interaction system

Publications (2)

Publication Number Publication Date
CN102480463A true CN102480463A (en) 2012-05-30
CN102480463B CN102480463B (en) 2014-12-31

Family

ID=46092945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010556056.7A Active CN102480463B (en) 2010-11-23 2010-11-23 Network interaction method and network interaction system

Country Status (1)

Country Link
CN (1) CN102480463B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104144212A (en) * 2014-07-16 2014-11-12 福建星网锐捷网络有限公司 Virtual desktop image transmission method, device and system
CN106878114A (en) * 2015-12-11 2017-06-20 北京数码视讯科技股份有限公司 A kind of method of data transfer, server and terminal
CN109842646A (en) * 2017-11-27 2019-06-04 北京京东尚科信息技术有限公司 The treating method and apparatus of network request

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1685689A (en) * 2002-09-30 2005-10-19 松下电器产业株式会社 Apparatuses, method and computer software products for controlling a home terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1685689A (en) * 2002-09-30 2005-10-19 松下电器产业株式会社 Apparatuses, method and computer software products for controlling a home terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ALEXANDROS ELEFTHERIADIS,CARSTEN HERPEL, GANESH RAJAN: "Text for ISO/IEC FCD 14496-1 systems", 《INTERNATIONAL ORGANISATION FOR STANDARDISATION ORGANISATION INTRNATIONALE DE NORMALISATION ISO/IEC JTC1/SC29/WG11》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104144212A (en) * 2014-07-16 2014-11-12 福建星网锐捷网络有限公司 Virtual desktop image transmission method, device and system
CN104144212B (en) * 2014-07-16 2017-12-26 福建星网锐捷网络有限公司 A kind of virtual desktop image transfer method, apparatus and system
CN106878114A (en) * 2015-12-11 2017-06-20 北京数码视讯科技股份有限公司 A kind of method of data transfer, server and terminal
CN109842646A (en) * 2017-11-27 2019-06-04 北京京东尚科信息技术有限公司 The treating method and apparatus of network request

Also Published As

Publication number Publication date
CN102480463B (en) 2014-12-31

Similar Documents

Publication Publication Date Title
CN101141420B (en) Method and system for performing data communication between private network and public network
CN101262478A (en) Method and device for penetrating NAT
CN103096435B (en) Connect keeping method, device and mobile terminal
US10194180B2 (en) Systems and methods for transmitting video data over a network
CN102811335B (en) Set up the method, apparatus and system of video session
WO2018165113A1 (en) Dynamic header compression for constrained networks
CN101304436A (en) Load balancing method, system and equipment for implementing application layer conversation persistency
CN110113359A (en) A kind of platform of internet of things protocol fitting method
CN109327493A (en) A kind of remote medical monitoring system based on cloud and monitoring method
CN116405461A (en) Data processing method, network element equipment and readable storage medium
WO2011106984A1 (en) Method for transmitting data in parallel by mobile terminal and mobile terminal thereof
CN101986648A (en) Negotiation method, device and network device of TCP option
CN103125141A (en) Aggregation of mobile broadband network interfaces
EP3041279A1 (en) Terminal and wireless networking method
CN102378177A (en) Method and system for combining Internet of things capability with terminal
CN106453683A (en) Method for centralized access management of cameras
Krawiec et al. DASCo: dynamic adaptive streaming over CoAP
CN104821909A (en) Peer-to-peer data transmission method and system
CN105873011B (en) The transmission of group service data, control method, device and equipment
CN105491169A (en) Data proxy method and system
CN104993979A (en) Network connection monitoring method, terminal equipment and communication system
JP2002518885A5 (en)
CN103327129B (en) For the domain name analytic method of more WAN mouthfuls of gateway devices
CN113518134A (en) Method and device for accessing main router through domain name under MESH networking
CN102821325B (en) Information interaction system and method based on community wireless nodes

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