CN103944992A - Method for accelerating HTTP on IOS - Google Patents

Method for accelerating HTTP on IOS Download PDF

Info

Publication number
CN103944992A
CN103944992A CN201410168924.2A CN201410168924A CN103944992A CN 103944992 A CN103944992 A CN 103944992A CN 201410168924 A CN201410168924 A CN 201410168924A CN 103944992 A CN103944992 A CN 103944992A
Authority
CN
China
Prior art keywords
http
data
utp
agreement
spdy
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
CN201410168924.2A
Other languages
Chinese (zh)
Other versions
CN103944992B (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 of accelerating HTTP on IOS
Technical field
The present invention relates to HTTP and accelerate, especially, on IOS, by flow, guide with protocol conversion and accelerate the method for HTTP.
Background technology
The method of current acceleration HTTP, is generally to adopt APN to carry out the HTTP Proxy of standard, and content is compressed to reach the effect of acceleration, such as flow at full speed.The defect of this speed technology has: be 1. only that the content of request is compressed in agency service, can cause like this picture category resource fuzzy; 2. such agent skill group, can only arrange agency and the handle packet of having no way can not be optimized the agent skill group of standard in client.
The patent of invention that for example application number is 201310362191.1, disclose a kind of HTTP and uploaded accelerated method, the HTTP upload request for meeting certain condition, can reduce the response time, improve response speed, also can alleviate the pressure of CDN service node simultaneously.Its technical scheme is: upload configuration is carried out in source station; User uploads static data by upload configuration; Content delivery network node receives request; The whether applicable acceleration function of uploading of the request that content delivery network node judgement receives; If ask the inapplicable acceleration function of uploading, upload data to source station, receive the response that source station is returned, and send response to user; If request is applicable, upload acceleration function, after user data upload completes, to user, send response, and save the data in local cache, and in any time thereafter, the data in local cache are synchronized to source station.This patent of invention need to be carried out secondary development on software, and it realizes complicated.
The patent of invention that for example application number is 200910127106.7 again, the HTTP that discloses a kind of dialogue-based high-speed cache accelerates, and its method comprises: receive the first HTML (Hypertext Markup Language) (HTTP) packet; Based on HTTP packet, create the first session; And be the first conversation establishing session cache entry; Receive the 2nd HTTP packet; Carry out session cache searching to identify mating of the 2nd HTTP packet and session cache entries; And mate to create the second http session based on the 2nd HTTP packet and session cache entries.This patent of invention needs the support of hardware, and cannot directly realize by software.
Summary of the invention
Therefore, for above-mentioned problem, the present invention proposes a kind of method of accelerating HTTP on IOS, solve that IOS is upper thisly to be only had agency service end and cause content compression distortion and the too poor problem of standard agency agreement efficiency without the agent skill group of client, do not need in addition software to carry out secondary development, do not need the support of hardware, only by agency, can realize and accelerate HTTP yet.
In order to solve the problems of the technologies described above, thinking of the present invention is first, to set up local agent service, and guide HTTP flow to local agent service; Local agent service is processed content, and the http protocol of standard is converted into the agreement that performance is higher (such as spdy, utp).When app starts, call the function of sdk, lookup process address at this time, finds the address of this function, and then replacement function address, can allow app call the function of own realization.The method of finishing interflow amount guiding and protocol conversion is provided, and one side can get packet and content is optimized to process and prevent from can standard agreement being optimized distortion and being raised the efficiency on the other hand.
Concrete, a kind of method of accelerating HTTP on IOS of the present invention, has disclosed IOS and above in conjunction with flow guiding and protocol conversion, has accelerated the method for HTTP, and the method comprises:
Step 1: set up local agent service;
Step 2: the application software that produces HTTP flow is designated as to HTTP_APP, when this HTTP_APP initiates HTTP request, first HTTP request is forwarded to local agent service;
Step 3: first local agent service is converted to the data of HTTP request the data of the higher protocol formats of performance such as spdy protocol format or utp protocol format, then sends to the data after conversion the proxy server of far-end;
Step 4: the proxy server of far-end is resolved the data that receive, if spdy protocol format resolves according to spdy agreement it, and is reduced into former HTTP data; If utp protocol format resolves according to utp agreement it, and be reduced into former HTTP data; Then the former HTTP data after reduction are sent to destination address;
Step 5: destination address is resolved the former HTTP data of receiving, and export HTTP result data, by remote agent's server, this HTTP result data is converted to the data of the higher protocol formats of performance such as spdy protocol format or utp protocol format, http protocol is converted to spdy agreement or utp agreement; By spdy agreement or utp agreement, the result data after conversion being sent to local agent afterwards serves;
Step 6: local agent service reception to data resolve, if spdy protocol format resolves according to spdy agreement it, and be reduced into former HTTP result data; If utp protocol format resolves according to utp agreement it, and be reduced into former HTTP result data; Then the former HTTP result data after reduction is sent to user side.
Further, set up local agent service and comprise following content: structure proxy function, this proxy function realizes all functions that primary HTTP API obtains system overall situation agency's function (function SCDynamicStoreCopyProxies), after this proxy function is set up, by primary HTTP API Calls, realize agency; This proxy function is returned to the structure that comprises proxy information, and this proxy information at least comprises proxy, proxy port; Obtain the process address of HTTP_APP, and search the mirror image head of HTTP_APP in the middle of internal memory, find the function (function name is SCDynamicStoreCopyProxies) of the proxy information that obtains current network, by the function address in the address replacing structure proxy function of this function; Then create local agent service thread.
Further, HTTP_APP initiates HTTP request, first to HTTP, preliminary treatment is carried out in request, and then send, this preliminary treatment comprises if process: whether first this HTTP request detects the domain name that this HTTP request will access identical with the domain name of HTTP_APP, if both are not identical, the domain name that HTTP request will be accessed changes the domain name of HTTP_APP into; Whether the authorized agency's row (a line after stem <headers>) that then detects HTTP request is empty, if be not empty, is changed into blank line, and then this HTTP request is sent.By above-mentioned setting, can safeguard the validity of HTTP request, when avoiding follow-up authorized agency, occur that agency makes mistakes, and cause the method not use, and then cause cannot using of HTTP_APP.
The present invention passes through above-mentioned steps, the foundation of serving by local agent, the data of HTTP_APP transmission are all converted to the data of the higher protocol formats of performance such as spdy protocol format or utp protocol format, thereby greatly accelerated reception and the transmission of HTTP, solved that IOS is upper thisly to be only had agency service end and cause content compression distortion and the too poor problem of standard agency agreement efficiency without the agent skill group of client; In addition, the situation that the present invention also makes mistakes to authorized agency arranges, and greatly reduces the generation of the situation that HTTP_APP cannot use because local agent service makes mistakes; Meanwhile, the present invention only needs to set up a local agent service authorized agency, does not need software to carry out extra exploitation, greatly alleviated developer's burden, and do not need the support of hardware, only by agency, can realize and accelerate HTTP, there is good practicality.
Embodiment
Now in conjunction with embodiment, the present invention is further described.
As a concrete example, the SDK the invention provides based on ios platform supplies the application software HTTP_APP of the generation HTTP flow of IOS to call, and it relates to client and service end.On content compression and protocol optimization, need to accomplish that client and service end coordinate.Wherein, this SDK possesses following two large functions: (1) guiding HTTP flow is to local agent.(2) http protocol of standard is converted into the agreement that performance is higher, content is processed simultaneously.
Wherein, guiding HTTP flow is to local agent, and the service of model local agent, is comprised of following steps:
Step 1: first create a local agent thread, and return to IP address and the port (127.0.0.1:port) of local agent, be kept in memory variable;
Step 2: the imageheader mirror image head of searching APP, finding name is the function address of " SCDynamicStoreCopyProxies " (function: the agency who returns to current network arranges), this address is replaced with to the IP address that this function of SQL my_SCDynamicStoreCopyProxies(returns to local agent, it realizes the function that SCDynamicStoreCopyProxies function is identical, and is only that its agent address is different) address;
When step 3:APP calls my_SCDynamicStoreCopyProxies function, this function first calls primary SCDynamicStoreCopyProxies function, the agency who obtains current network arranges, then the local agent IP address getting by step 1 and port (127.0.0.1:port) are replaced current network and are acted on behalf of IP and the port in arranging, and return to by reaching local agent setting after replacing the function that call on upper strata, with this, reach and replace the object that current network agency arranges.
The http protocol of standard is converted into the agreement that performance is higher and content is processed to play the object of accelerating HTTP, by following steps, formed:
Step 1: the application software that produces HTTP flow is designated as to HTTP_APP, when this HTTP_APP initiates HTTP request, first HTTP request is forwarded to local agent service;
Step 2: first local agent service changes into corresponding protocol format (the higher protocol format of performance) by the HTTP request of receiving, and is forwarded to the proxy server of far-end.General, can use two kinds of agreements to be optimized: (1) spdy agreement, local agent and remote agent establish spdysession, HTTP request is changed into spdy agreement and send to remote agent.This agreement can reduce tcp establishment of connection, improves the concurrent number of request.(2) utp agreement, is used udp agreement, in application layer, realizes the effect that overtime re-transmission reaches tcp agreement.Can reduce the tcp agreement establishment of connection time and improve the efficiency of overtime re-transmission;
Step 3: the proxy server of far-end is resolved the data that receive, if spdy protocol format resolves according to spdy agreement it, and is reduced into former HTTP data; If utp protocol format resolves according to utp agreement it, and be reduced into former HTTP data; Then the former HTTP data after reduction are sent to destination address; Meanwhile, the proxy server of far-end also can be optimized former HTTP data, such as for picture format transformation, unpressed content is compressed.In client, carrying out contrary operation (decompression), is transparent thereby reach HTTP_APP; Then the data after processing are sent to the proxy server of far-end;
Step 4: destination address is resolved the former HTTP data of receiving, and export HTTP result data, by remote agent's server, this HTTP result data is converted to the data of the higher protocol formats of performance such as spdy protocol format or utp protocol format, http protocol is converted to spdy agreement or utp agreement; By spdy agreement or utp agreement, the result data after conversion being sent to local agent afterwards serves;
Step 5: local agent service reception to data resolve, if spdy protocol format resolves according to spdy agreement it, and be reduced into former HTTP result data; If utp protocol format resolves according to utp agreement it, and be reduced into former HTTP result data; Then the former HTTP result data after reduction is sent to user side.
In addition, when HTTP_APP initiates HTTP request, first to HTTP, preliminary treatment is carried out in request, and then send, this preliminary treatment comprises if process: whether first this HTTP request detects the domain name that this HTTP request will access identical with the domain name of HTTP_APP, if both are not identical, the domain name that HTTP request will be accessed changes the domain name of HTTP_APP into; Whether the authorized agency's row (a line after stem <headers>) that then detects HTTP request is empty, if be not empty, is changed into blank line, and then this HTTP request is sent.By above-mentioned setting, can safeguard the validity of HTTP request, when avoiding follow-up authorized agency, occur that agency makes mistakes, and cause the method not use, and then cause cannot using of HTTP_APP.
Although specifically show and introduced the present invention in conjunction with preferred embodiment; but those skilled in the art should be understood that; within not departing from the spirit and scope of the present invention that appended claims limits; can make a variety of changes the present invention in the form and details, be protection scope of the present invention.

Claims (3)

1. on IOS, accelerate a method of HTTP, the method comprises:
Step 1: set up local agent service;
Step 2: the application software that produces HTTP flow is designated as to HTTP_APP, when this HTTP_APP initiates HTTP request, first HTTP request is forwarded to local agent service;
Step 3: first local agent service is converted to the data of HTTP request the data of spdy protocol format or utp protocol format, then sends to the data after conversion the proxy server of far-end;
Step 4: the proxy server of far-end is resolved the data that receive, if spdy protocol format resolves according to spdy agreement it, and is reduced into former HTTP data; If utp protocol format resolves according to utp agreement it, and be reduced into former HTTP data; Then the former HTTP data after reduction are sent to destination address;
Step 5: destination address is resolved the former HTTP data of receiving, and export HTTP result data, by remote agent's server, this HTTP result data is converted to the data of spdy protocol format or utp protocol format, http protocol is converted to spdy agreement or utp agreement; By spdy agreement or utp agreement, the result data after conversion being sent to local agent afterwards serves;
Step 6: local agent service is resolved the data that receive, if spdy protocol format resolves according to spdy agreement it, and is reduced into former HTTP result data; If utp protocol format resolves according to utp agreement it, and be reduced into former HTTP result data; Then the former HTTP result data after reduction is sent to user side.
2. a kind of method of accelerating HTTP on IOS according to claim 1, it is characterized in that: set up local agent service and comprise following content: structure proxy function, this proxy function realizes all functions that primary HTTP API obtains system overall situation agency's function, after this proxy function is set up, by primary HTTP API Calls, realize agency; This proxy function is returned to the structure that comprises proxy information, and this proxy information at least comprises proxy, proxy port; Obtain the process address of HTTP_APP, and search the mirror image head of HTTP_APP in the middle of internal memory, find the function of the proxy information that obtains current network, by the function address in the address replacing structure proxy function of this function; Then create local agent service thread.
3. a kind of method of accelerating HTTP on IOS according to claim 2, it is characterized in that: HTTP_APP initiates HTTP request, first to HTTP, preliminary treatment is carried out in request, and then send, this preliminary treatment comprises if process: whether first this HTTP request detects the domain name that this HTTP request will access identical with the domain name of HTTP_APP, if both are not identical, the domain name that HTTP request will be accessed changes the domain name of HTTP_APP into; Whether the authorized agency's row that then detects HTTP request is empty, if be not empty, is changed into blank line, and then this HTTP request is sent.By above-mentioned setting, can safeguard the validity of HTTP request, when avoiding follow-up authorized agency, occur that agency makes mistakes, and cause the method not use, and then cause cannot using of 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 true CN103944992A (en) 2014-07-23
CN103944992B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580192A (en) * 2014-12-31 2015-04-29 网宿科技股份有限公司 Processing method and device for network access requests of application program
CN106789220A (en) * 2016-12-13 2017-05-31 北京珠穆朗玛移动通信有限公司 The method and mobile terminal of configuration data
CN109756501A (en) * 2019-01-02 2019-05-14 中国科学院信息工程研究所 A kind of high concealment network agent method and system based on http 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
CN113852666A (en) * 2021-08-25 2021-12-28 天翼数字生活科技有限公司 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

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580192A (en) * 2014-12-31 2015-04-29 网宿科技股份有限公司 Processing method and device for network access requests of application program
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
CN109756501A (en) * 2019-01-02 2019-05-14 中国科学院信息工程研究所 A kind of high concealment network agent method and system based on http 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
CN113852666A (en) * 2021-08-25 2021-12-28 天翼数字生活科技有限公司 Method for acquiring HTTP (hyper text transport protocol) resources in real time through FTP (file transfer protocol)
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)

Also Published As

Publication number Publication date
CN103944992B (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN103944992A (en) Method for accelerating HTTP on IOS
US7523491B2 (en) System, apparatus, and method for accessing mobile servers
CN105282008B (en) Enhance the method and system of media characteristic during real-time Communication for Power Network interactive sessions
CN104348710A (en) Methods and systems for acquiring and correlating web real-time communications (webrtc) interactive flow characteristics
CN111147893B (en) Video self-adaption method, related equipment and storage medium
WO2015124045A1 (en) Channel establishing method and apparatus
CN104518908B (en) For providing the method and system of network management
CN104348878A (en) Method, device and system for remotely controlling mobile terminal as well as mobile terminal
CN102882865B (en) The method of multimedia agency service control is realized based on socks5 agency agreement
CN106817341B (en) A kind of Session Initiation Protocol throttling Transmission system and method towards mobile Internet
CN105656847A (en) SIP (Session Initiation Protocol)/MQTT (Message Queuing Telemetry Transport) protocol conversion gateway system and control method thereof for mobile device
WO2017107795A1 (en) Method and device for accelerating access to website
WO2022002069A1 (en) Method for accessing network, media gateway, electronic device, and storage medium
WO2016177121A1 (en) File transmission method and device, and application server
GB2525088A (en) Split network address translation
CN102710765A (en) Method, device and system for realizing transparent proxy through CDN server
CN104967613A (en) Data transmission system and method under mobile network environments
CN103338213A (en) Method, system and access gateway for intercommunication between local equipment and IMS (IP Multimedia Subsystem) network
CN106998439A (en) A kind of gateway system for merging conventional video conference system with WEBRTC and method
CN104601649A (en) Method and system for providing origin insight for web applications
US9413590B2 (en) Method for management of a secured transfer session through an address translation device, corresponding server and computer program
WO2016090921A1 (en) Session control method and device
CN103023789A (en) Method for accessing private network server in internet
CN102761608B (en) The method of UDP session multiplexing and load balancing equipment
CN103152495B (en) A kind of method of media transfer, Apparatus and 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.