CN103944992B - Method for accelerating HTTP on IOS - Google Patents

Method for accelerating HTTP on IOS Download PDF

Info

Publication number
CN103944992B
CN103944992B CN201410168924.2A CN201410168924A CN103944992B CN 103944992 B CN103944992 B CN 103944992B CN 201410168924 A CN201410168924 A CN 201410168924A CN 103944992 B CN103944992 B CN 103944992B
Authority
CN
China
Prior art keywords
http
data
utp
spdy
app
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410168924.2A
Other languages
Chinese (zh)
Other versions
CN103944992A (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.)
Chengdu Chaoyoumao Technology Co ltd
Original Assignee
XIAMEN XIANGYOU NETWORK TECHNOLOGY 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 XIAMEN XIANGYOU NETWORK TECHNOLOGY Co Ltd filed Critical XIAMEN XIANGYOU NETWORK TECHNOLOGY Co Ltd
Priority to CN201410168924.2A priority Critical patent/CN103944992B/en
Publication of CN103944992A publication Critical patent/CN103944992A/en
Application granted granted Critical
Publication of CN103944992B publication Critical patent/CN103944992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for accelerating the HTTP on the IOS. The method includes the first step of setting up a local agent server, the second step of forwarding an HTTP request to the local agent server when the HTTP_APP issues the HTTP request, the third step of converting data of the HTTP request into the spdy protocol format or the utp protocol format through the local agent server and then sending the converted data to a far-end agent server, the fourth step of analyzing the received data through the far-end agent server, reverting the data into the original HTTP data and sending the original HTTP data to a target address, the fifth step of analyzing the received original HTTP data through the target address, outputting HTTP result data, converting the HTTP result data into the spdy protocol format or the utp protocol format through the far-end agent server, converting the HTTP protocol into an spdy protocol or a utp protocol, and sending the spdy protocol or the utp protocol to the local agent server, and the sixth step of analyzing the data received by the local agent server, reverting the data into the original HTTP result data and sending the original HTTP result data to a user side.

Description

A kind of method for accelerating HTTP on IOS
Technical field
The present invention relates to HTTP accelerates, especially on IOS, the side of HTTP is accelerated by flow guiding and protocol conversion Method.
Background technology
The method of current acceleration HTTP, usually carries out the HTTP Proxy of standard using APN, and content is compressed To reach the effect of acceleration, such as flow at full speed.The defect of this speed technology has:1. it is only in generation by the content of request It is compressed in reason service, can so causes picture category resource to obscure;2. agent skill group as, can only be arranged in client Act on behalf of and processing data bag of having no way, the agent skill group of standard can not be optimized.
Such as patent of invention of Application No. 201310362191.1, discloses a kind of HTTP and uploads accelerated method, right In the HTTP upload requests for meeting certain condition, it is possible to reduce the response time, response speed is improved, while can also mitigate The pressure of CDN service node.Its technical scheme is:Source station carries out upload configuration;User uploads static data by upload configuration; Content delivery network node receives request;Content delivery network node judges whether the request for receiving is suitable for upload and accelerates work( Energy;If inapplicable upload of request accelerates function, source station is uploaded data to, receive the response that source station returns, and sent the response to User;If request is suitable for upload accelerates function, send to user after the completion of user data upload and respond, and data are preserved In local cache, and any time behind by the data syn-chronization in local cache to source station.The patent of invention needs Secondary development is carried out on software, it realizes complicated.
Again such as patent of invention of Application No. 200910127106.7, discloses a kind of dialogue-based cache HTTP accelerates, and its method includes:Receive the first HTTP (HTTP) packet;First is created based on HTTP packets Session;And for the first conversation establishing session cache entry;Receive the 2nd HTTP packets;Perform session cache to look into Look for recognizing matching for the 2nd HTTP packets and session cache entries;And it is high based on the 2nd HTTP packets and session The matching of fast cache entries is creating the second http session.The patent of invention needs the support of hardware, and cannot be straight by software Connect realization.
The content of the invention
Therefore, for above-mentioned problem, the present invention proposes a kind of method for accelerating HTTP on IOS, solves this on IOS Only agency service end and the agent skill group without client causes that content compression distortion and standard agency agreement efficiency are too poor to ask Topic, need not carry out secondary development, it is not required that the support of hardware to software in addition, only be capable of achieving to accelerate by agency HTTP。
In order to solve above-mentioned technical problem, thinking of the present invention is first, to set up local agent service, and is drawn HTTP flows are led to local agent service;Local agent service is processed content, and the http protocol of standard is converted into The higher agreement of performance(Such as spdy, utp).When app starts, the function of sdk is called, at this time lookup process address, The address of this function is found, then replacement function address, you can the function for allowing app to call oneself to realize.Flow there is provided combining Amount guiding and the method for protocol conversion, on the one hand can get packet and process is optimized to content prevents distortion, separately On the one hand raising efficiency can be optimized to standard agreement.
Specifically, a kind of method for accelerating HTTP on IOS of the invention, discloses and combine on IOS flow guiding and assist Method of the view conversion to accelerate HTTP, the method includes:
Step 1:Set up local agent service;
Step 2:The application software for producing HTTP flows is designated as into HTTP_APP, when the HTTP_APP initiates HTTP request, First HTTP request is forwarded to into local agent service;
Step 3:The data of HTTP request are converted to spdy protocol formats or utp agreement lattice by local agent service first The data of the higher protocol format of the performances such as formula, then by the proxy server of the data is activation after conversion to distal end;
Step 4:The proxy server of distal end is parsed to the data for receiving, if spdy protocol formats are then to it Parsed according to spdy agreements, and be reduced into former HTTP data;If utp protocol formats then enter to it according to utp agreements Row parsing, and it is reduced into former HTTP data;Then by reduction after former HTTP data is activations to destination address;
Step 5:Destination address is parsed to the former HTTP data for receiving, and exports HTTP result datas, by distal end The HTTP result datas are converted into the higher protocol format of the performance such as spdy protocol formats or utp protocol formats by proxy server Data, http protocol is converted to into spdy agreements or utp agreements;To be changed by spdy agreements or utp agreements afterwards Result data afterwards is sent to local agent service;
Step 6:The data that local agent service is received are parsed, if spdy protocol formats are then to its basis Spdy agreements are parsed, and are reduced into former HTTP result datas;If utp protocol formats then enter to it according to utp agreements Row parsing, and it is reduced into former HTTP result datas;Then by reduction after former HTTP result datas send to user side.
Further, local agent service is set up including herein below:Construction proxy function, the proxy function is realized primary HTTP API obtain the function of the global agency of system(Function SCDynamicStoreCopyProxies)Functional, the generation After reason function is set up, by primary HTTP API Calls, agency is realized;The proxy function returns the structure comprising proxy information, should Proxy information at least includes proxy, proxy port;The process address of HTTP_APP is obtained, and searches HTTP_APP in internal memory Central mirror image head, finds the function of the proxy information for obtaining current network(Function name is SCDynamicStoreCopyProxies), by the function address in the address replacing structure proxy function of the function;Then create Build local agent service thread.
Further, HTTP_APP initiates HTTP request, and HTTP request is pre-processed first, then retransmits out Go, if the pretreatment includes process:The HTTP request detects first the HTTP request domain name to be accessed and HTTP_APP's Whether domain name is identical, if both differ, the domain name that HTTP request to be accessed is changed to into the domain name of HTTP_APP;Then examine Survey authorized agency's row of HTTP request(Stem<headers>A line afterwards)Whether it is empty, if being not sky, is changed to Blank line, then again sends the HTTP request.By above-mentioned setting, the validity of HTTP request can be tieed up Shield, it is to avoid occur agency's error when follow-up authorized agency, and cause the method to use, so cause HTTP_APP cannot Use.
The present invention is changed the data that HTTP_APP is transmitted by above-mentioned steps, the foundation serviced by local agent For the data of the higher protocol format of the performance such as spdy protocol formats or utp protocol formats, so as to greatly accelerate connecing for HTTP Receive and send, solve this only agency service end IOS on and the agent skill group without client cause content compression distortion with The too poor problem of standard agency agreement efficiency;In addition, the present invention is also arranged to the situation of authorized agency's error, subtract significantly Few HTTP_APP cannot use because of local agent service error the occurrence of;Meanwhile, present invention only requires setting up one Local agent service and authorized agency, it is not necessary to extra exploitation is carried out to software, the burden of developer is significantly reduced, and The support of hardware is not needed, is only capable of achieving to accelerate HTTP by agency, with good practicality.
Specific embodiment
In conjunction with specific embodiment, the present invention is further described.
As a specific example, the invention provides the SDK based on ios platform is for the generation HTTP flows of IOS Application software HTTP_APP is called, and it is related to client and service end.In content compression and protocol optimization, need to accomplish visitor Family end and service end coordinate.Wherein, the SDK possesses following two big functions:(1)Guiding HTTP flows are to local agent.(2)Will mark Accurate http protocol is converted into the higher agreement of performance, while processing content.
Wherein, guide HTTP flows to local agent, initially set up local agent service, comprise the steps of:
Step 1:A local agent thread is created first, and returns to IP address and the port of local agent (127.0.0.1:port), in being stored in memory variable;
Step 2:The imageheader mirror image heads of APP are searched, finding name is “SCDynamicStoreCopyProxies”(Function:The agency for returning current network is arranged)Function address, this address is replaced It is changed to SQL my_SCDynamicStoreCopyProxies(The function returns the IP address of local agent, its realization SCDynamicStoreCopyProxies function identical functions, and be only that its agent address is different)Address;
Step 3:When APP calls my_SCDynamicStoreCopyProxies functions, the function first calls primary SCDynamicStoreCopyProxies functions, obtain current network agency arrange, then with step 1 get it is local Agent IP address and port(127.0.0.1:port)The IP during current network agency is arranged and port are replaced, and will be reached after replacement Arrange to local agent and return to the function that upper strata is called, reached with this and replace the purpose that current network agency is arranged.
The http protocol of standard is converted into into the higher agreement of performance and content is processed and accelerate HTTP's to play Purpose, comprises the steps of:
Step 1:The application software for producing HTTP flows is designated as into HTTP_APP, when the HTTP_APP initiates HTTP request, First HTTP request is forwarded to into local agent service;
Step 2:The HTTP request for receiving is changed into corresponding protocol format by local agent service first(The higher association of performance View form), and it is forwarded to the proxy server of distal end.General, can be optimized using two kinds of agreements once:(1)Spdy is assisted View, local agent establishes spdysession with remote agent, HTTP request is changed into into spdy agreements and is sent to distal end generation Reason.This agreement can reduce tcp establishment of connections, improve the number of concurrent of request.(2)Utp agreements, using udp agreements, in application layer Realize Retransmission timeout to reach the effect of tcp agreements.The tcp agreement establishment of connection times can be reduced and the effect of Retransmission timeout is improved Rate;
Step 3:The proxy server of distal end is parsed to the data for receiving, if spdy protocol formats are then to it Parsed according to spdy agreements, and be reduced into former HTTP data;If utp protocol formats then enter to it according to utp agreements Row parsing, and it is reduced into former HTTP data;Then by reduction after former HTTP data is activations to destination address;Meanwhile, distal end Proxy server can also be optimized to former HTTP data, such as, for picture format transformation, unpressed content is pressed Contracting.And then carry out contrary operation in client(Decompression), so as to come to reach for HTTP_APP be transparent;Then will Proxy server of the data is activation after process to distal end;
Step 4:Destination address is parsed to the former HTTP data for receiving, and exports HTTP result datas, by distal end The HTTP result datas are converted into the higher protocol format of the performance such as spdy protocol formats or utp protocol formats by proxy server Data, http protocol is converted to into spdy agreements or utp agreements;To be changed by spdy agreements or utp agreements afterwards Result data afterwards is sent to local agent service;
Step 5:The data that local agent service is received are parsed, if spdy protocol formats are then to its basis Spdy agreements are parsed, and are reduced into former HTTP result datas;If utp protocol formats then enter to it according to utp agreements Row parsing, and it is reduced into former HTTP result datas;Then by reduction after former HTTP result datas send to user side.
In addition, when HTTP_APP initiates HTTP request, pre-processing to HTTP request first, then retransmit away, If the pretreatment includes process:The HTTP request detects first the domain name of the HTTP request domain name to be accessed and HTTP_APP It is whether identical, if both differ, the domain name that HTTP request to be accessed is changed to into the domain name of HTTP_APP;Then detect Authorized agency's row of HTTP request(Stem<headers>A line afterwards)Whether it is empty, if being not sky, is changed to sky Bai Hang, then again sends the HTTP request.By above-mentioned setting, the validity of HTTP request can be safeguarded, Avoid occurring agency's error when follow-up authorized agency, and cause the method to use, and then cause cannot making for HTTP_APP With.
Although specifically showing and describing the present invention with reference to preferred embodiment, those skilled in the art should be bright In vain, in the spirit and scope of the present invention limited without departing from appended claims, in the form and details can be right The present invention makes a variety of changes, and is protection scope of the present invention.

Claims (3)

1. a kind of method for accelerating HTTP on IOS, the method includes:
Step 1:Set up local agent service;
Step 2:The application software for producing HTTP flows is designated as into HTTP_APP, when the HTTP_APP initiates HTTP request, first HTTP request is forwarded to into local agent service;
Step 3:The data of HTTP request are converted to spdy protocol formats or utp protocol formats by local agent service first Data, then by the proxy server of the data is activation after conversion to distal end;
Step 4:The proxy server of distal end is parsed to the data for receiving, if spdy protocol formats are then to its basis Spdy agreements are parsed, and are reduced into former HTTP data;If utp protocol formats are then solved to it according to utp agreements Analysis, and it is reduced into former HTTP data;Then by reduction after former HTTP data is activations to destination address;
Step 5:Destination address is parsed to the former HTTP data for receiving, and exports HTTP result datas, by remote agent The HTTP result datas are converted into server the data of spdy protocol formats or utp protocol formats, and http protocol is changed For spdy agreements or utp agreements;Afterwards the result data after conversion is sent to locally by spdy agreements or utp agreements Agency service;
Step 6:Local agent service is parsed to the data for receiving, if spdy protocol formats are then to it according to spdy Agreement is parsed, and is reduced into former HTTP result datas;If utp protocol formats are then solved to it according to utp agreements Analysis, and it is reduced into former HTTP result datas;Then by reduction after former HTTP result datas send to user side.
2. it is according to claim 1 it is a kind of on IOS accelerate HTTP method, it is characterised in that:Set up local agent clothes Business includes herein below:Construction proxy function, the proxy function realizes that primary HTTP API obtain the function of the global agency of system Institute it is functional, after the proxy function is set up, by primary HTTP API Calls, realize agency;The proxy function is returned and includes generation The structure of reason information, the proxy information at least includes proxy, proxy port;The process address of HTTP_APP is obtained, and is looked into Mirror image heads of the HTTP_APP in the middle of internal memory is looked for, the function of the proxy information for obtaining current network is found, by the ground of the function Function address in the replacing structure proxy function of location;Then local agent service thread is created.
3. it is according to claim 2 it is a kind of on IOS accelerate HTTP method, it is characterised in that:HTTP_APP is initiated HTTP request, pre-processes first to HTTP request, then retransmits away, if the pretreatment includes process:The HTTP Request detects first whether the HTTP request domain name to be accessed is identical with the domain name of HTTP_APP, if both differ, The domain name that HTTP request to be accessed is changed to into the domain name of HTTP_APP;Whether the authorized agency's row for then detecting HTTP request be Sky, if being not sky, is changed to blank line, then again sends the HTTP request;By above-mentioned setting, can be right The validity of HTTP request is safeguarded, it is to avoid is occurred agency's error when follow-up authorized agency, and is caused the method to use, And then cause cannot using for HTTP_APP.
CN201410168924.2A 2014-04-25 2014-04-25 Method for accelerating HTTP on IOS Active CN103944992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410168924.2A CN103944992B (en) 2014-04-25 2014-04-25 Method for accelerating HTTP on IOS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410168924.2A CN103944992B (en) 2014-04-25 2014-04-25 Method for accelerating HTTP on IOS

Publications (2)

Publication Number Publication Date
CN103944992A CN103944992A (en) 2014-07-23
CN103944992B true CN103944992B (en) 2017-04-26

Family

ID=51192473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410168924.2A Active CN103944992B (en) 2014-04-25 2014-04-25 Method for accelerating HTTP on IOS

Country Status (1)

Country Link
CN (1) CN103944992B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580192B (en) * 2014-12-31 2018-09-07 网宿科技股份有限公司 The treating method and apparatus of the network access request of application program
CN106789220A (en) * 2016-12-13 2017-05-31 北京珠穆朗玛移动通信有限公司 The method and mobile terminal of configuration data
CN109756501B (en) * 2019-01-02 2020-05-22 中国科学院信息工程研究所 High-privacy network proxy method and system based on HTTP (hyper text transport protocol)
CN111953666A (en) * 2020-07-27 2020-11-17 厦门安胜网络科技有限公司 Data transmitting and receiving method and device and data transmitting and receiving system
CN112653732A (en) * 2020-12-07 2021-04-13 西安四叶草信息技术有限公司 Method, device, equipment and storage medium for realizing HTTP proxy
CN113852666B (en) * 2021-08-25 2024-03-12 天翼数字生活科技有限公司 Method for acquiring HTTP (hyper text transport protocol) resources in real time through FTP (File transfer protocol)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009080742A1 (en) * 2007-12-20 2009-07-02 Alcatel Lucent Devices and method for invocation of a sequence of web services by means of a single request based message
CN101834777A (en) * 2009-03-11 2010-09-15 丛林网络公司 HTTP acceleration based on session cache
CN103401946A (en) * 2013-08-19 2013-11-20 网宿科技股份有限公司 HTTP (hyper text transfer protocol) uploading acceleration method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009080742A1 (en) * 2007-12-20 2009-07-02 Alcatel Lucent Devices and method for invocation of a sequence of web services by means of a single request based message
CN101834777A (en) * 2009-03-11 2010-09-15 丛林网络公司 HTTP acceleration based on session cache
CN103401946A (en) * 2013-08-19 2013-11-20 网宿科技股份有限公司 HTTP (hyper text transfer protocol) uploading acceleration method and system

Also Published As

Publication number Publication date
CN103944992A (en) 2014-07-23

Similar Documents

Publication Publication Date Title
CN103944992B (en) Method for accelerating HTTP on IOS
US10785680B2 (en) Methods and apparatus for optimizing tunneled traffic
US8902754B2 (en) Session-aware GTPv2 load balancing
CN103916405B (en) Method for guiding flow of TCP/UDP of App on IOS
US20150382240A1 (en) Methods and apparatus for optimizing tunneled traffic
US20130272136A1 (en) Session-Aware GTPv1 Load Balancing
US8650312B2 (en) Connection establishing management methods for use in a network system and network systems using the same
CN106330715A (en) Message processing method and device
US20090161680A1 (en) Gateway apparatus, packet forwarding method, and program
CN1848778A (en) Method of monitoring progress of a signalling message and network monitoring apparatus
US9609035B2 (en) Compressed headers for encapsulated real-time communications
WO2019170114A1 (en) Method for sending packet, network device, and computer-readable storage medium
US20170078430A1 (en) System and method for interworking between ndn and cdn
CN101123582B (en) A communication method between private network terminals
CN102882865A (en) Method for realizing multimedia agency service control on basis of socks5 agency agreement
US8442061B2 (en) Gateway apparatus, information communication method, information communication program, and information communication system
CN101047548A (en) Communication in multiple NAT private network
WO2017114378A1 (en) Forwarding of ip data packet
CN105430320A (en) Audio and video media data transmission method based on UDP (User Datagram Protocol) and TCP (Transmission Control Protocol)
CN101883156B (en) Method for traversing NAT (Network Address Translation) equipment
CN105376338B (en) Interpretation method and device between a kind of IPv4 and IPv6
US20160380901A1 (en) Methods and apparatus for preventing head of line blocking for rtp over tcp
CN107864161A (en) A kind of data transmission method and device
CN103873600B (en) A kind of network address conversion penetrating method and apparatus
US20100208734A1 (en) Communications relay device, program and method, and network system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: LAN Jin

Inventor before: Lin Chuiza

Inventor before: Lan Jin

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230526

Address after: No. 2201, 22nd Floor, Building 6, No. 300 Tianfu Fourth Street, Chengdu High tech Zone, China (Sichuan) Pilot Free Trade Zone, Chengdu City, Sichuan Province, 610000

Patentee after: Chengdu Chaoyoumao Technology Co.,Ltd.

Address before: Room M17, 2nd Floor, No. 22 Dongpu Road, Siming District, Xiamen City, Fujian Province, 361000

Patentee before: XIAMEN XIANGYOU NETWORK TECHNOLOGY Co.,Ltd.