CN102970287A - Processing method of hyper text transport protocol (HTTP) request data - Google Patents

Processing method of hyper text transport protocol (HTTP) request data Download PDF

Info

Publication number
CN102970287A
CN102970287A CN2012104435291A CN201210443529A CN102970287A CN 102970287 A CN102970287 A CN 102970287A CN 2012104435291 A CN2012104435291 A CN 2012104435291A CN 201210443529 A CN201210443529 A CN 201210443529A CN 102970287 A CN102970287 A CN 102970287A
Authority
CN
China
Prior art keywords
request msg
request data
server
data
processing method
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
CN2012104435291A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN2012104435291A priority Critical patent/CN102970287A/en
Publication of CN102970287A publication Critical patent/CN102970287A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a processing method of hyper text transport protocol (HTTP) request data. The processing method includes step: (1) a client side reads received request data before transmitting the request data to a server; (2) whether the capacity of the request data is larger than or equal to or smaller than a preset value N is judged; (3) the request data are compressed and marked if the capacity of the request data is larger than or equal to the preset value N, and the request data are not compressed if the capacity of the request data is smaller than the preset value N; (4) the request data are transmitted to the server through a HTTP communication protocol; (5) the server analyzes the received request data and judges whether the request data have data compression identification; and (6) the request data are subjected to uncompressing if the request data have data compression identification. The processing method effectively saves time of the client side for transmitting the request data to the server and enables data to occupy small bandwidth.

Description

A kind of processing method of HTTP request msg
Technical field
The present invention relates to the communications field, specifically a kind of processing method that relates to the POST request msg of http protocol.
Background technology
Present B/S(Browser/Server) framework is browser/server framework; and C/S(Client/Server) framework is client terminal/server architecture; often can use network communication protocol HTTP(hyper text transport protocol, HTML (Hypertext Markup Language)) receive and send data.Also all adopt the C/S framework such as a lot of application programs in the present mobile phone, and utilize http protocol to carry out data transfer.Main Function is exactly that file to certain Resource Server conducts interviews, and comprises browsing and download operation to specified file on this server etc., that is to say that we can access the resource of the WWW on the Internet by HTTP.Yet client is when sending the Post request msg of http protocol at present, and this request msg is xml, and json data or text class file all are directly to send on the server usually.When request msg attachment content when larger, can take the larger network bandwidth, mobile network especially, limited bandwidth, and rate are more expensive, if request msg has all taken very large bandwidth, are unfavorable for that the user is to the use of network.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of processing method of HTTP request msg, effectively saves the time that user end to server sends request msg, and makes data take bandwidth than low capacity.
In order to solve the problems of the technologies described above, the present invention takes following technical scheme:
A kind of processing method of HTTP request msg may further comprise the steps:
(1) before client terminal sends to server with request msg, reads first the request msg that receives;
(2) judge that the capacity of this request msg is more than or equal to predetermined value N or less than predetermined value N;
(3) if the capacity of request msg more than or equal to predetermined value N, then compresses this request msg, and the request msg of this compression is identified; If the capacity of request msg less than predetermined value N, does not then compress this request msg;
(4) request msg is sent to server by the http communication agreement;
(5) server is analyzed the request msg that receives, and judges whether the data compression sign is arranged in this request msg;
(6) if the data compression sign is arranged, then this request msg is carried out decompression.
Compressed format during described compression request data includes but not limited to Gzip compressed format, RAR compressed format.
Described predetermined value N is the natural number greater than 0.
The present invention compresses this request msg first when server sends the POST request msg by http protocol in client, the capacity of request msg is reduced greatly, reduce the bandwidth that it takies, save the network rate, and effectively reduced the time of user end to server transmission request msg, improved efficient, can be widely used on mobile phone, panel computer and other network terminals.
Description of drawings
Accompanying drawing 1 is workflow schematic diagram of the present invention.
Embodiment
For the ease of those skilled in the art's understanding, the invention will be further described below in conjunction with accompanying drawing.
The present invention has pointed out a kind of processing method of HTTP request msg, and the POST request msg is compressed before user end to server sends, and reduces the capacity of data.These data can be XML data, json data or text class file data etc.
As shown in Figure 1, this processing method may further comprise the steps:
(1) client terminal sends to request msg before the server, reads first the request msg that receives.Request msg analysis is obtained the amount of capacity of this request msg.
(2) judge that the capacity of this request msg is more than or equal to predetermined value N or less than predetermined value N.This predetermined value N can be 7KB, 10KB, and 11KB, perhaps other are greater than 0 value, and more than enumerating not is to be to limit, and can arrange flexibly according to actual conditions
(3) capacity of request msg and predetermined value N are compared after, if the capacity of request msg more than or equal to predetermined value N, then compresses this request msg, and the request msg of this compression is identified, be convenient to identification; If the capacity of request msg less than predetermined value N, does not then compress this request msg.As when N is 10KB, when the capacity of request msg less than 10KB, when being 8KB such as the capacity of request msg, then need not compress this request msg, data are directly sent to server.Greater than N=10KB, compress this request msg this moment, and then the data after will compress send to server when request msg is 20KB, perhaps when request msg be that 10KB equals N=10KB, also this request msg is compressed at this moment.
(4) request msg is sent to server by the http communication agreement.No matter be the request msg of compression, or the data of uncompressed all send to server by client.As when N is 10KB, when the capacity of request msg is less than or equal to 10KB, when being 8KB such as the capacity of request msg, then need not compressing this request msg, but data are directly sent to server.Greater than N=10KB, compress this request msg this moment, and then the data after will compressing send to server when request msg is 20KB.
(5) after server received request msg, central processing unit was analyzed the request msg that receives, and judged whether the data compression sign is arranged in this request msg.
(6) if find to have the data compression sign, i.e. the request msg that explanation receives is then carried out decompression to this request msg through overcompression.Carry out at last subsequent treatment, this subsequent treatment is the same with existing processing mode again, is common practise, no longer carries out detailed giving unnecessary details at this.If find not have the data compression sign, then server directly carries out subsequent treatment.
When request msg is compressed, can select to compress the Gzip compression algorithm, perhaps the RAR compression algorithm can also be the htz compression algorithm, perhaps other compression algorithms, enumerating not is to be exhaustive.In to the data decompression, the corresponding algorithm that uses when needing to select with packed data keeps consistency, and guarantees the smooth of compression and decompression.
In addition, when request msg was larger text data, compression ratio was higher.The transmitting time of Effective Raise data is saved the bandwidth that takies.The present invention optionally compresses data before server sends request msg by http protocol in client, reduces the small data capacity with this, reaches the purpose that reduces the data transmitting time and save bandwidth.

Claims (3)

1. the processing method of a HTTP request msg may further comprise the steps:
(1) before client terminal sends to server with request msg, reads first the request msg that receives;
(2) judge that the capacity of this request msg is more than or equal to predetermined value N or less than predetermined value N;
(3) if the capacity of request msg more than or equal to predetermined value N, then compresses this request msg, and the request msg of this compression is identified; If the capacity of request msg less than predetermined value N, does not then compress this request msg;
(4) request msg is sent to server by the http communication agreement;
(5) server is analyzed the request msg that receives, and judges whether the data compression sign is arranged in this request msg;
(6) if the data compression sign is arranged, then this request msg is carried out decompression.
2. the processing method of HTTP request msg according to claim 1, it is characterized in that: the compressed format during described compression request data includes but not limited to Gzip compressed format and RAR compressed format.
3. the processing method of HTTP request msg according to claim 2 is characterized in that: described predetermined value N is for greater than 0 natural number.
CN2012104435291A 2012-11-08 2012-11-08 Processing method of hyper text transport protocol (HTTP) request data Pending CN102970287A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104435291A CN102970287A (en) 2012-11-08 2012-11-08 Processing method of hyper text transport protocol (HTTP) request data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104435291A CN102970287A (en) 2012-11-08 2012-11-08 Processing method of hyper text transport protocol (HTTP) request data

Publications (1)

Publication Number Publication Date
CN102970287A true CN102970287A (en) 2013-03-13

Family

ID=47800173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104435291A Pending CN102970287A (en) 2012-11-08 2012-11-08 Processing method of hyper text transport protocol (HTTP) request data

Country Status (1)

Country Link
CN (1) CN102970287A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038916A (en) * 2014-06-24 2014-09-10 北京奇虎科技有限公司 Traffic optimization method and system performed on mobile terminal device and client
CN105005477A (en) * 2015-07-23 2015-10-28 柳州龙辉科技有限公司 Sharing method of user-side software
CN105069040A (en) * 2015-07-23 2015-11-18 柳州易旺科技有限公司 Historical webpage data generation method
CN105095437A (en) * 2015-07-23 2015-11-25 柳州易旺科技有限公司 Processing method of temporary web page data
CN105138348A (en) * 2015-07-23 2015-12-09 柳州龙辉科技有限公司 Automatic update method for intelligent terminal software
CN105138449A (en) * 2015-07-23 2015-12-09 柳州永旺科技有限公司 Implementation method for universal software environment
CN105138444A (en) * 2015-07-23 2015-12-09 柳州一合科技有限公司 Multi-user-oriented software release method
CN105159821A (en) * 2015-07-23 2015-12-16 柳州一合科技有限公司 Client software test method
CN105183545A (en) * 2015-07-23 2015-12-23 柳州易旺科技有限公司 Big data information compression method
CN105183448A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Method for generating client software environment
CN105183637A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Cloud computing based software environment testing method
CN105183498A (en) * 2015-07-23 2015-12-23 柳州龙辉科技有限公司 Method for installing client software
CN105183639A (en) * 2015-07-23 2015-12-23 柳州易旺科技有限公司 User webpage data testing method
CN105183634A (en) * 2015-07-23 2015-12-23 柳州一合科技有限公司 Multi-channel synchronization detection method for software
CN105183635A (en) * 2015-07-23 2015-12-23 柳州一合科技有限公司 Security test method for server software
CN105183636A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Detection method for application software environment
CN105183638A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Filtering method for big data software environment
CN106209942A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 A kind of data compression transmission method and system and terminal thereof and server
CN107888570A (en) * 2017-10-26 2018-04-06 广州市雷军游乐设备有限公司 Method, apparatus, storage medium and the system of data interaction based on front and back end separation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175089A (en) * 2007-06-11 2008-05-07 七天酒店(深圳)有限公司 Data transmission method between server and client terminal based on HTTP protocol and .NET structure
CN101908978A (en) * 2010-08-04 2010-12-08 中兴通讯股份有限公司 Method and system for implementing mass data transmission

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175089A (en) * 2007-06-11 2008-05-07 七天酒店(深圳)有限公司 Data transmission method between server and client terminal based on HTTP protocol and .NET structure
CN101908978A (en) * 2010-08-04 2010-12-08 中兴通讯股份有限公司 Method and system for implementing mass data transmission

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038916A (en) * 2014-06-24 2014-09-10 北京奇虎科技有限公司 Traffic optimization method and system performed on mobile terminal device and client
CN104038916B (en) * 2014-06-24 2017-11-10 北京奇虎科技有限公司 Method and system, the client of flow optimization are realized on the mobile terminal device
CN106209942B (en) * 2015-05-07 2020-06-09 阿里巴巴集团控股有限公司 Data compression transmission method and system, terminal and server thereof
CN106209942A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 A kind of data compression transmission method and system and terminal thereof and server
CN105183637A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Cloud computing based software environment testing method
CN105183634A (en) * 2015-07-23 2015-12-23 柳州一合科技有限公司 Multi-channel synchronization detection method for software
CN105138444A (en) * 2015-07-23 2015-12-09 柳州一合科技有限公司 Multi-user-oriented software release method
CN105159821A (en) * 2015-07-23 2015-12-16 柳州一合科技有限公司 Client software test method
CN105183545A (en) * 2015-07-23 2015-12-23 柳州易旺科技有限公司 Big data information compression method
CN105183448A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Method for generating client software environment
CN105138348A (en) * 2015-07-23 2015-12-09 柳州龙辉科技有限公司 Automatic update method for intelligent terminal software
CN105183498A (en) * 2015-07-23 2015-12-23 柳州龙辉科技有限公司 Method for installing client software
CN105183639A (en) * 2015-07-23 2015-12-23 柳州易旺科技有限公司 User webpage data testing method
CN105138449A (en) * 2015-07-23 2015-12-09 柳州永旺科技有限公司 Implementation method for universal software environment
CN105183635A (en) * 2015-07-23 2015-12-23 柳州一合科技有限公司 Security test method for server software
CN105183636A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Detection method for application software environment
CN105183638A (en) * 2015-07-23 2015-12-23 柳州永旺科技有限公司 Filtering method for big data software environment
CN105095437A (en) * 2015-07-23 2015-11-25 柳州易旺科技有限公司 Processing method of temporary web page data
CN105069040A (en) * 2015-07-23 2015-11-18 柳州易旺科技有限公司 Historical webpage data generation method
CN105005477A (en) * 2015-07-23 2015-10-28 柳州龙辉科技有限公司 Sharing method of user-side software
CN107888570A (en) * 2017-10-26 2018-04-06 广州市雷军游乐设备有限公司 Method, apparatus, storage medium and the system of data interaction based on front and back end separation

Similar Documents

Publication Publication Date Title
CN102970287A (en) Processing method of hyper text transport protocol (HTTP) request data
EP3013015B1 (en) Packet compression method and apparatus
CN102325188B (en) Method for realizing webpage browsing on a mobile terminal and system thereof
CN103139609B (en) The method and apparatus that remote application video playback is optimized
CN102184231A (en) Method and device for acquiring page resources
EP2869533B1 (en) Data distribution method and device
CN101794298A (en) Method for realizing page adaptation, page adaptation system and communication system
US20150207904A1 (en) System and method for single kvm client accommodating multiple different video compression technologies
US20100146112A1 (en) Efficient communication techniques
CN102752320B (en) Proxy server active compression method and proxy server
CN103136290A (en) Processing method and processing device of web script file
CN106851733A (en) A kind of adaptive H TTP message compression methods for mobile network's application
CN103873443B (en) Information processing method, local proxy server and network proxy server
WO2022063058A1 (en) Netconf protocol-based transmission method, device and storage medium
US8918516B2 (en) Symbiotic client and server for embedded network system
TWI673983B (en) Data compression transmission method and system, terminal and server thereof
CN101364991A (en) System realizing WAP website fast browsing and method thereof
CN104038307A (en) Data stream transmission system and method
CN110958291A (en) Industrial vehicle data transmission system and method
US20120254728A1 (en) Content acquiring method and client terminal
CN103067523A (en) Method and system of file downloading of mobile terminal
CN112769730B (en) Page compression method, device, client and server
CN211087228U (en) Processing system for displaying large text logs based on web
CN110351105B (en) Sampling configuration method and device
CN114006789A (en) Web information system access method, multi-cloud application gateway, computer device and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130313