[go: up one dir, main page]

CN106911732A - A kind of website visiting accelerating method and device - Google Patents

A kind of website visiting accelerating method and device Download PDF

Info

Publication number
CN106911732A
CN106911732A CN201510974013.3A CN201510974013A CN106911732A CN 106911732 A CN106911732 A CN 106911732A CN 201510974013 A CN201510974013 A CN 201510974013A CN 106911732 A CN106911732 A CN 106911732A
Authority
CN
China
Prior art keywords
website
proxy server
resource
server
access request
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
CN201510974013.3A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510974013.3A priority Critical patent/CN106911732A/en
Priority to PCT/CN2016/109428 priority patent/WO2017107795A1/en
Publication of CN106911732A publication Critical patent/CN106911732A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种网站访问加速方法及装置。一种网站访问加速方法包括:获得用户设备发出的针对目标网站资源的访问请求;确认所述用户设备与所述代理服务器之间已建立Socket连接;根据所述访问请求,获取所述目标网站资源;利用所述Socket连接,将所获取的目标网站资源反馈至所述用户设备,以响应所述访问请求。本申请提所提供的网站访问加速方案,通过在代理服务器和用户设备之间建立Socket连接的方式,可以实现建立一次连接后多次传输资源,避免每次传输资源都需要建立HTTP连接而导致的连接延迟。

The present application discloses a website access acceleration method and device. A website access acceleration method includes: obtaining an access request for a target website resource sent by a user device; confirming that a Socket connection has been established between the user device and the proxy server; obtaining the target website resource according to the access request ; Utilizing the Socket connection, feeding back the obtained target website resources to the user equipment to respond to the access request. The website access acceleration solution provided in this application can realize the multiple transmission of resources after establishing a connection by establishing a Socket connection between the proxy server and the user device, avoiding the need to establish an HTTP connection for each transmission of resources. Connection delay.

Description

一种网站访问加速方法及装置Method and device for accelerating website access

技术领域technical field

本申请涉及互联网技术领域,尤其涉及一种网站访问加速方法及装置。The present application relates to the field of Internet technologies, in particular to a method and device for accelerating website access.

背景技术Background technique

在互联网时代,如何提升网站访问速率是改进用户上网体验的首要问题。从用户发出访问请求到网站将内容资源返回给用户,这一过程受到多方面因素的影响,其中既包括用户侧和网站侧自身的因素,也包括两侧之间通信环节的因素,针对这些不同方面,也产生了各式各样的网站访问加速技术。In the Internet age, how to improve the website access rate is the primary issue to improve the user's online experience. The process from the user’s access request to the website’s return of content resources to the user is affected by many factors, including both the user’s side and the website’s own factors, as well as factors in the communication link between the two sides. On the one hand, various website access acceleration technologies have also been produced.

不同逻辑网络之间的互连瓶颈,是影响网络连接速率的重要因素,以国内网络环境为例,存在电信、联通、铁通、教育网等多个逻辑网络,受到客观条件的影响,在这些网络内部的通信都很流畅,但一旦涉及到网络之间的互连,就会出现延迟过高、丢包甚至无法连接等各种情况。针对该问题,现有的技术的解决方案是搭建具有多线带宽的代理服务器,参见图1所示,用户设备和网站服务器位于不同的逻辑网络A和B,如果用户直接访问网站,速率会受到A和B网络互连瓶颈的影响。搭建代理服务器后,用户设备与网站服务器之间的交互可以通过代理服务器进行转发,由于代理服务器同时具有网络A和网络B的双线带宽,因此能够对用户访问网站的过程起到加速效果。The interconnection bottleneck between different logical networks is an important factor affecting the network connection rate. Taking the domestic network environment as an example, there are multiple logical networks such as China Telecom, China Unicom, Railcom, and Education Network, which are affected by objective conditions. The internal communication is very smooth, but once it involves the interconnection between networks, there will be various situations such as excessive delay, packet loss or even failure to connect. To solve this problem, the existing technical solution is to build a proxy server with multi-line bandwidth, as shown in Figure 1, the user equipment and the website server are located in different logical networks A and B, if the user directly accesses the website, the rate will be affected The impact of A and B network interconnection bottlenecks. After the proxy server is set up, the interaction between the user device and the website server can be forwarded through the proxy server. Since the proxy server has the dual-line bandwidth of both network A and network B, it can accelerate the process of users accessing the website.

上述方案问题在于通用性较差,仅针对用户设备和网站服务器存在网络互连瓶颈的场景具有加速效果,对于连接瓶颈并不在于网络互连的情况则并不能起到加速作用,甚至可能导致额外的转发延迟,代理服务器的硬件资源也没有得到充分的利用。The problem with the above solution is that it has poor versatility. It only has an acceleration effect for scenarios where there is a network interconnection bottleneck between the user device and the website server. For the case where the connection bottleneck does not lie in the network interconnection, it cannot accelerate the effect, and may even cause additional Forwarding delay, proxy server hardware resources are not fully utilized.

发明内容Contents of the invention

针对上述技术问题,本申请提供一种网站访问加速方法及装置,技术方案如下:In view of the above technical problems, this application provides a website access acceleration method and device, the technical solution is as follows:

根据本申请的第一方面,提供一种网站访问加速方法,应用于代理服务器,所述代理服务器分别与用户设备及网站服务器通信连接,所述方法包括:According to the first aspect of the present application, a website access acceleration method is provided, which is applied to a proxy server, and the proxy server is respectively connected to the user equipment and the website server in communication, and the method includes:

获得用户设备发出的针对目标网站资源的访问请求;Obtain an access request from the user's device for the resource of the target website;

确认所述用户设备与所述代理服务器之间已建立Socket连接;confirming that a Socket connection has been established between the user equipment and the proxy server;

根据所述访问请求,获取所述目标网站资源;Obtaining the target website resource according to the access request;

利用所述Socket连接,将所获取的目标网站资源反馈至所述用户设备,以响应所述访问请求。Using the Socket connection, the obtained target website resources are fed back to the user equipment to respond to the access request.

根据本申请的第二方面,提供一种网站访问加速装置,应用于代理服务器,所述代理服务器分别与用户设备及网站服务器通信连接,所述装置包括:According to the second aspect of the present application, a website access acceleration device is provided, which is applied to a proxy server, and the proxy server is respectively connected to the user equipment and the website server in communication, and the device includes:

访问请求获得模块,用于获得用户设备发出的针对目标网站资源的访问请求;An access request obtaining module, configured to obtain an access request for a target website resource sent by a user device;

连接确认模块,用于确认所述用户设备与所述代理服务器之间已建立Socket连接;A connection confirmation module, configured to confirm that a Socket connection has been established between the user equipment and the proxy server;

资源获取模块,用于根据所述访问请求,获取所述目标网站资源;A resource acquisition module, configured to acquire the target website resource according to the access request;

访问请求响应模块,用于利用所述Socket连接,将所获取的目标网站资源反馈至所述用户设备,以响应所述访问请求。The access request response module is configured to use the Socket connection to feed back the obtained target website resources to the user equipment, so as to respond to the access request.

本申请提所提供的网站访问加速方案,通过在代理服务器和用户设备之间建立Socket连接的方式,可以实现建立一次连接后多次传输资源,避免每次传输资源都需要建立HTTP连接而导致的连接延迟。在上述方案的基础上,本申请还进一步提供在代理服务器中预存网站资源、预存网站域名解析结果、对网站资源进行压缩传输等改进方案以提升加速效果。与现有技术相比,本申请方案能够在更多的应用场景下获得更为明显的加速效果,也使得代理服务器能够被更高效地应用于网站访问加速。The website access acceleration solution provided by this application can realize multiple transmission of resources after establishing a connection by establishing a Socket connection between the proxy server and the user device, avoiding the need to establish an HTTP connection for each transmission of resources. Connection delay. On the basis of the above solutions, this application further provides improved solutions such as pre-storing website resources in the proxy server, pre-storing website domain name analysis results, and compressing and transmitting website resources to improve the acceleration effect. Compared with the prior art, the solution of the present application can obtain more obvious acceleration effects in more application scenarios, and also enables the proxy server to be more efficiently applied to website access acceleration.

应当理解的是,实施本申请方案的任一产品或方法并不一定需要同时具有以上所述的所有优点。以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that any product or method implementing the solutions of the present application does not necessarily need to have all the advantages described above at the same time. The foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments described in this application, and those skilled in the art can also obtain other drawings based on these drawings.

图1是现有技术的网站访问加速原理示意图;FIG. 1 is a schematic diagram of the website access acceleration principle in the prior art;

图2是本申请的网站访问加速的系统架构示意图;Fig. 2 is a schematic diagram of the system architecture of website access acceleration of the present application;

图3是本申请的网站访问加速方法的第一种流程示意图;Fig. 3 is a schematic flow chart of the first method for accelerating website access of the present application;

图4是本申请的网站访问加速方法的第二种流程示意图;Fig. 4 is the second schematic flow chart of the website access acceleration method of the present application;

图5是本申请的网站访问加速方法的第三种流程示意图;Fig. 5 is the third schematic flow chart of the website access acceleration method of the present application;

图6是本申请的网站访问加速装置的第一种结构示意图;FIG. 6 is a first structural schematic diagram of the website access acceleration device of the present application;

图7是本申请的网站访问加速装置的第二种结构示意图。FIG. 7 is a second structural schematic diagram of the website access acceleration device of the present application.

具体实施方式detailed description

为了使本领域技术人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of this application, not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this application shall fall within the protection scope of this application.

现有的代理服务器加速技术,是从改善网络连接带宽或连接质量的角度来实现上网加速效果,如果上网速率瓶颈并不在于网络连接,例如:用户设备和网站服务器位于相同的逻辑网络、或者处于连接比较顺畅的不同逻辑网络、或者用户设备及网站加速器自身接入网络的速率受限,在这些情况下,现有技术均无法有效起到加速效果。The existing proxy server acceleration technology is to achieve the effect of Internet access acceleration from the perspective of improving the network connection bandwidth or connection quality. If the bottleneck of the Internet access rate does not lie in the network connection, for example: the user device and the website server are located on the same logical network, or in the Different logical networks with relatively smooth connections, or the rate at which user equipment and website accelerators can access the network are limited. In these cases, the existing technology cannot effectively achieve the acceleration effect.

针对现有技术存在的问题,本申请从改善通信效率的角度来实现上网加速效果。通过研究发现,从用户发出访问请求到网站将内容资源返回给用户,这一过程的延时开销主要体现在以下几个方面:Aiming at the problems existing in the prior art, the present application realizes the acceleration effect of surfing the Internet from the perspective of improving communication efficiency. Through the research, it is found that the delay overhead of the process from the user sending the access request to the website returning the content resource to the user is mainly reflected in the following aspects:

1)用户设备与网站服务器需要多次建立HTTP连接,以获取不同的HTTP资源;1) The user device and the website server need to establish HTTP connections multiple times to obtain different HTTP resources;

2)用户侧基于域名访问网站时,域名解析所带来的延迟;2) When the user side accesses the website based on the domain name, the delay caused by domain name resolution;

3)网站资源的下行传输;3) Downlink transmission of website resources;

本申请则针对以上几个方面给出相应的上网加速方案,对应的系统架构如图2所示:This application provides corresponding Internet access acceleration solutions for the above aspects, and the corresponding system architecture is shown in Figure 2:

网站服务器30是资源的拥有方;The website server 30 is the owner of the resources;

用户设备10是资源的需求方,利用网站域名向网站服务器30发起资源访问请求;The user device 10 is a resource demander, and uses the website domain name to initiate a resource access request to the website server 30;

代理服务器20在逻辑上位于用户设备10和网站服务器30之间,代理服务器20与用户设备10、代理服务器20与网站服务器30之间可通过各种形式的网络实现通信连接,并且代理服务器20可以分别与多台不同的用户设备及多个不同的网站服务器进行通信。The proxy server 20 is logically located between the user equipment 10 and the website server 30, and the communication connection can be realized through various forms of networks between the proxy server 20 and the user equipment 10, the proxy server 20 and the website server 30, and the proxy server 20 can Communicate with multiple different user devices and multiple different web servers respectively.

根据本申请方案,代理服务器20可以截获任一用户设备10向任一网站服务器30发起的资源访问请求,并基于该请求对后续的访问过程进行加速。According to the solution of the present application, the proxy server 20 can intercept the resource access request initiated by any user device 10 to any website server 30, and accelerate the subsequent access process based on the request.

当网络通信采用TCP协议时,通信双方的连接方式可分为长连接和短连接两种。所谓长连接是指在一个TCP连接上可以连续发送多个数据包,在TCP连接保持期间,如果没有数据包发送,需要双方发检测包以维持此连接。短连接则是指通信双方有数据交互时,就建立一个TCP连接,数据发送完成后,则断开此TCP连接。When the network communication adopts the TCP protocol, the connection modes of the communication parties can be divided into two types: long connection and short connection. The so-called long connection means that multiple data packets can be sent continuously on a TCP connection. During the maintenance period of the TCP connection, if no data packets are sent, both parties need to send detection packets to maintain the connection. A short connection means that when the communication parties have data interaction, a TCP connection is established, and after the data transmission is completed, the TCP connection is disconnected.

HTTP协议是TCP协议的一种典型应用,也是互联网的上应用最为广泛的一种协议,很多网站在向用户提供服务时都使用HTTP连接。HTTP连接属于短连接,用户设备发送的每次请求都需要服务器回送响应,在请求结束后,会主动释放连接。这样做的目的是为了避免大量用户访问网站而导致的大量并发连接,从而降低网站服务器资源消耗。但是从另一个方面看,由于网站页面上各种资源,例如图片、音频、视频等都是以HTTP链接的形式提供,因此用户设备每次请求获取一个资源,就需要与网站服务器建立一次HTTP连接,服务器则需要等到连接建立成功后才能将资源反馈给用户设备,这种频繁建立HTTP连接的方式必然会增加用户设备与网站服务器之间的交互延迟。The HTTP protocol is a typical application of the TCP protocol, and it is also the most widely used protocol on the Internet. Many websites use HTTP connections when providing services to users. The HTTP connection is a short connection. Each request sent by the user device requires the server to send back a response. After the request ends, the connection will be released actively. The purpose of this is to avoid a large number of concurrent connections caused by a large number of users visiting the website, thereby reducing the resource consumption of the website server. But from another perspective, since various resources on the website page, such as pictures, audio, video, etc., are provided in the form of HTTP links, each time the user device requests a resource, it needs to establish an HTTP connection with the website server. , the server needs to wait until the connection is successfully established before it can feed back resources to the user device. This method of frequently establishing HTTP connections will inevitably increase the interaction delay between the user device and the website server.

从第三方加速的角度,无法去改变网站自身的连接策略,但是在代理服务器加速机制下,用户设备实际上是与代理服务器建立连接,并且从代理服务器获取资源,因此可以通过改变用户设备与代理服务器之间的连接方式来降低连接开销。From the perspective of third-party acceleration, it is impossible to change the connection strategy of the website itself, but under the proxy server acceleration mechanism, the user device actually establishes a connection with the proxy server and obtains resources from the proxy server. Connections between servers to reduce connection overhead.

图3所示,为本申请提供的网站访问加速方法的流程图,该方法基于代理服务器,可以包括以下步骤:As shown in Fig. 3, it is a flow chart of the method for accelerating website access provided by the present application. The method is based on a proxy server and may include the following steps:

S101,获得用户设备发出的针对目标网站资源的访问请求;S101, obtaining an access request for a target website resource sent by a user device;

S102,确认所述用户设备与所述代理服务器之间已建立Socket连接;S102. Confirm that a Socket connection has been established between the user equipment and the proxy server;

S103,根据所述访问请求,获取所述目标网站资源;S103. Obtain the target website resource according to the access request;

S104,利用Socket连接,将所获取的目标网站资源反馈至所述用户设备。S104, using the Socket connection to feed back the acquired target website resources to the user equipment.

与现有的代理加速方案相比,本申请将用户设备与代理服务器之间默认的HTTP连接方式替换为Socket连接方式,与HTTP连接相比,Socket连接属于长连接,也就是说,除非双方主动要求,否则在连接建立之后不会自动断开。利用这个特性,代理服务器可以将原本需要使用多次HTTP连接进行传输的内容,通过一次Socket连接完成,从而避免频繁建立HTTP连接而导致的额外时延。Compared with the existing proxy acceleration scheme, this application replaces the default HTTP connection mode between the user equipment and the proxy server with the Socket connection mode. Compared with the HTTP connection, the Socket connection is a long connection, that is, unless both parties actively required, otherwise the connection will not be disconnected automatically after it is established. Using this feature, the proxy server can transfer the content that originally needs to be transmitted through multiple HTTP connections through one Socket connection, thereby avoiding the extra delay caused by frequent establishment of HTTP connections.

本申请方案的应用前提是:代理服务器需要能够截获用户设备向网站服务器发起的资源访问请求,在实际应用层面,很多产品都具备这样的条件,例如浏览器、搜索引擎、网站导航、公众平台、综合业务服务窗等,作为综合性的网络服务提供方,这些应用产品一方面能够为用户提供方便的网站访问入口,另一方面能够为网站带来更多的用户,在此基础上,如果能够进一步提供网站访问加速功能,对于用户和网站双方都具有很大意义。当然,本申请并不需要对应用层面的具体实现方式进行限定。The application premise of this application scheme is that the proxy server needs to be able to intercept the resource access request initiated by the user device to the website server. At the practical application level, many products have such conditions, such as browsers, search engines, website navigation, public platforms, Comprehensive business service window, etc., as a comprehensive network service provider, these application products can provide users with convenient website access portals on the one hand, and on the other hand can bring more users to the website. On this basis, if you can Further providing the website access acceleration function is of great significance to both the user and the website. Of course, the present application does not need to limit the specific implementation manner of the application level.

根据S101,代理服务器可以作为应用的承载设备,直接获得用户设备向网站服务器发起的资源访问请求,也可以获得其他应用服务器转发来的用户访问请求。According to S101, the proxy server can be used as the bearer of the application, and directly obtain the resource access request initiated by the user equipment to the website server, and can also obtain the user access request forwarded by other application servers.

根据S102,代理服务器需要确认用户设备已经与自身建立起了Socket连接,这里可能存在两种情况:According to S102, the proxy server needs to confirm that the user equipment has established a Socket connection with itself, and there may be two situations here:

一种情况是Socket连接当前已经建立完成,例如,当代理服务器本身作为应用承载设备时,即使没有访问网站的需求,也可能为了实现其他功能而预先建立了用户设备与代理服务器之间的Socket连接,这种情况下,可以维持已建立的Socket连接并进一步利用该连接实现后续的网站访问加速功能;One situation is that the Socket connection has already been established. For example, when the proxy server itself is used as the application hosting device, even if there is no need to visit the website, the Socket connection between the user device and the proxy server may be pre-established for other functions. , in this case, the established Socket connection can be maintained and further utilized to achieve subsequent website access acceleration functions;

另一种情况是当前尚未建立用户设备与代理服务器之间的Socket连接,这种情况下,代理服务器下需要执行Socket连接的建立操作。Another situation is that the Socket connection between the user equipment and the proxy server has not yet been established. In this case, the proxy server needs to execute the operation of establishing the Socket connection.

建立Socket连接的具体方式可参见现有技术的说明,在本申请中不再详细介绍。For the specific manner of establishing a Socket connection, reference may be made to the description of the prior art, which will not be described in detail in this application.

根据S103,代理服务器根据用户侧的访问请求,获取相应的目标网站资源;本申请提供两种代理服务器获取目标网站资源的方式:According to S103, the proxy server obtains the corresponding target website resource according to the access request from the user side; this application provides two ways for the proxy server to obtain the target website resource:

1)代理服务器本地获取。1) Obtained locally by the proxy server.

参见图4所示,代理服务器可以预先从其他网站获取资源缓存到本地,并且按照特定的方式进行标识。根据S103a,获得用户侧的资源访问请求后,根据所需访问的内容,从本地的缓存取出相应的资源反馈至用户侧。由于不需要代理服务器实时与网站侧进行交互,这种方式可以显著降低对用户侧的响应时间。As shown in FIG. 4 , the proxy server can obtain resource caches from other websites in advance and store them locally, and identify them in a specific way. According to S103a, after obtaining the resource access request of the user side, according to the content to be accessed, the corresponding resource is fetched from the local cache and fed back to the user side. Since the proxy server is not required to interact with the website side in real time, this method can significantly reduce the response time to the user side.

在实际应用中,对于公众平台、综合业务服务窗等提供网站入口相对固定的产品,可以直接预先对这些固定入口所对应的网站资源进行预存,而对于浏览器等产品,也可以根据用户的自定义配置或者用户的使用习惯等信息选取若干网站并对其资源进行预存。In practical applications, for products that provide relatively fixed website entrances, such as public platforms and comprehensive business service windows, the website resources corresponding to these fixed entrances can be directly pre-stored in advance, and for products such as browsers, users can Define configuration or user habits and other information to select several websites and pre-store their resources.

另外,为了保证代理服务器本地预存资源的时效性,可以按照一定的策略,对存储在代理服务器本地的网站资源进行更新。例如周期性进行更新,或者主动对网站侧进行监测、发现网站资源内容发生变化后进行更新,如果和网站方具有较为密切的合作关系,也可以根据网站侧发送的提醒来进行更新。当然,本申请并不需要对具体的更新机制进行限定。In addition, in order to ensure the timeliness of the locally pre-stored resources of the proxy server, the website resources stored locally on the proxy server may be updated according to a certain strategy. For example, periodically update, or actively monitor the website side and update after discovering changes in the content of website resources. If you have a relatively close cooperative relationship with the website side, you can also update according to the reminder sent by the website side. Of course, the present application does not need to limit the specific update mechanism.

2)实时从网站服务器获取。2) Obtain from the website server in real time.

参见图5的S103b所示,代理服务器在获得用户侧针对目标网站的访问请求后,实时与目标网站服务器建立连接,并从目标网站服务器获取资源;Referring to S103b in FIG. 5 , after obtaining the access request from the user side for the target website, the proxy server establishes a connection with the target website server in real time, and obtains resources from the target website server;

与方式1)相比,这种资源获取方式需要更长的时间来响应用户侧的请求,但是能够更好地保证资源的时效性。而且,对于一些实时交互需求,例如验证、授权等,也必须采用实时获取资源的方式。Compared with method 1), this resource acquisition method takes longer to respond to the request from the user side, but can better ensure the timeliness of resources. Moreover, for some real-time interaction requirements, such as authentication, authorization, etc., it is also necessary to obtain resources in real time.

在本申请所提供的一种具体实施方式中,可以采用在代理服务器预存域名解析结果的方式,以进一步降低代理服务器与网站服务器实时交互所带来的时间开销。In a specific implementation manner provided by the present application, the method of pre-storing the domain name resolution result in the proxy server may be used to further reduce the time overhead caused by the real-time interaction between the proxy server and the website server.

根据一般用户的使用习惯,都是使用网站域名来对网站资源进行访问,即便是第三方应用为用户提供的网站快捷访问入口,其后台所对应的URL也多是基于网站域名所保存的信息。因此,在代理服务器根据用户的请求与目标网站服务器建立连接的过程中,将网站域名解析为IP地址的操作将会占用一定的时间。针对该问题,本申请提供的解决方案是:预先将网站的域名解析结果(即网站IP地址)存储在代理服务器本地,当代理服务器需要与网站服务器建立连接时,直接利用网站的IP地址与网站服务器建立连接,从而避免域名解析所带来的交互时延。According to the usage habits of general users, the website domain name is used to access website resources. Even if the third-party application provides users with quick access to the website, the URL corresponding to the background is mostly based on the information stored in the website domain name. Therefore, when the proxy server establishes a connection with the target website server according to the user's request, the operation of resolving the website domain name into an IP address will take a certain amount of time. Aiming at this problem, the solution provided by this application is: store the domain name resolution result of the website (i.e. the IP address of the website) locally in the proxy server in advance, and when the proxy server needs to establish a connection with the website server, directly use the IP address of the website to communicate with the website The server establishes a connection, thereby avoiding the interaction delay caused by domain name resolution.

实际应用中,代理服务器可以从专用的域名解析服务器中获取网站的域名解析结果,也可以在代理服务器本地实现域名解析操作。在入口应用中,可以直接将为用户提供的网站快捷访问入口所对应的URL保存为IP地址的形式。In practical applications, the proxy server can obtain the domain name resolution result of the website from a dedicated domain name resolution server, and can also implement the domain name resolution operation locally on the proxy server. In the portal application, the URL corresponding to the website quick access portal provided for the user may be directly saved as an IP address.

与预存网站资源类似的是,代理服务器可以根据实际应用需求选择性地保存一些网站URL对应的IP地址。同时为了保证域名解析结果的正确,也可以按照一定的策略,对存储在代理服务器本地的域名解析结果进行更新。Similar to the pre-stored website resources, the proxy server can selectively save the IP addresses corresponding to some website URLs according to actual application requirements. At the same time, in order to ensure the correctness of the domain name resolution result, the domain name resolution result stored locally in the proxy server can also be updated according to a certain strategy.

以上提供了两种代理服务器获取目标网站资源的方式,其中方式1)更适合于例如图片、音视频文件等相对静态资源的获取,方式2)则更适合例如验证、授权等需要动态交互的场景。在实际应用中,两种方式往往可以结合使用,即:针对一次用户的访问请求,可以按照实际需求,对一部分资源采用代理服务器本地获取的方式、对另一部分资源采用实时从网站服务器获取的方式。事实上,在数据传输过程中,图片、音视频文件等资源需要占用大部分的传输带宽,因此,这种相结合的资源获取方式,尽管无法完全避免代理服务器与网站服务器交互所带来的延时,仍然可以有效降低代理服务器与网站服务器之间的传输数据量,从而提高代理服务器对用户侧的响应速率。The above provides two methods for the proxy server to obtain the resources of the target website, among which method 1) is more suitable for the acquisition of relatively static resources such as pictures, audio and video files, and method 2) is more suitable for scenarios that require dynamic interaction such as verification and authorization. . In practical applications, the two methods can often be used in combination, that is, for a user's access request, according to actual needs, some resources can be obtained locally from the proxy server, and other resources can be obtained from the website server in real time. . In fact, in the process of data transmission, resources such as pictures, audio and video files need to occupy most of the transmission bandwidth. Therefore, this combined resource acquisition method cannot completely avoid the delay caused by the interaction between the proxy server and the website server. When , it can still effectively reduce the amount of transmitted data between the proxy server and the website server, thereby improving the response rate of the proxy server to the user side.

在S104,代理服务器利用已建立的Socket连接,将所获取的目标网站资源反馈至用户设备,以响应用户侧的访问请求。In S104, the proxy server uses the established Socket connection to feed back the obtained target website resources to the user equipment, so as to respond to the access request from the user side.

在本申请的一种优选实施方式中,对于从网站服务器获取到的资源,代理服务器可以对其进行压缩处理后再提供给用户侧。实际应用中,对于很多网站所提供的资源,可以在不影响用户实际使用的前提下做压缩处理以降低代理服务器与用户设备之间的数据传输量,从而进一步降低传输时延。这种方式对于接入带宽受限的用户设备(例如利用无线移动方式上网的手机)具有较大意义,而且还可以降低用户设备的数据流量。压缩处理操作可以针对代理服务器本地预存的资源预先完成,如果压缩处理操作所带来的收益大于所消耗的时间,也可以在向用户设备反馈之前完成。本申请对具体的压缩对象、压缩算法并不需要进行限定,本领域技术人员可以根据实际需求灵活选取。In a preferred implementation manner of the present application, the proxy server may compress the resources obtained from the website server before providing them to the user side. In practical applications, the resources provided by many websites can be compressed without affecting the actual use of users to reduce the amount of data transmission between the proxy server and the user's device, thereby further reducing the transmission delay. This method is of great significance for user equipment with limited access bandwidth (such as mobile phones using wireless mobile access to the Internet), and can also reduce the data traffic of the user equipment. The compression processing operation can be completed in advance with respect to the locally pre-stored resources of the proxy server. If the benefit brought by the compression processing operation is greater than the time consumed, it can also be completed before feeding back to the user equipment. The present application does not need to limit the specific compression objects and compression algorithms, and those skilled in the art can flexibly select them according to actual needs.

可见,本申请提所提供的网站访问加速方案,通过建立Socket连接、在代理服务器中预存网站资源、预存网站域名解析结果、对网站资源进行压缩传输等多个环节来提升用户访问网站的速度。与现有的加速方案相比,本申请中的代理服务器并不只是简单起到资源转发和网络互连的作用,因此能够在更多的应用场景下获得更为明显的加速效果。当然,本申请的加速方案与现有的加速方案本身也并不存在冲突,本领域技术人员可以根据实际需求将本申请方案与现有技术方案进行结合。It can be seen that the website access acceleration solution provided by this application improves the speed of user access to the website through multiple links such as establishing a Socket connection, pre-storing website resources in the proxy server, pre-storing website domain name analysis results, and compressing and transmitting website resources. Compared with existing acceleration solutions, the proxy server in this application does not simply play the role of resource forwarding and network interconnection, so it can obtain more obvious acceleration effects in more application scenarios. Of course, there is no conflict between the acceleration scheme of the present application and the existing acceleration scheme itself, and those skilled in the art can combine the scheme of the present application with the existing technical scheme according to actual needs.

相应于上述方法实施例,本申请还提供一种网站访问加速装置,参见图6所示,该装置可以包括:Corresponding to the above method embodiment, the present application also provides a website access acceleration device, as shown in Figure 6, the device may include:

访问请求获得模块110,用于获得用户设备发出的针对目标网站资源的访问请求;An access request obtaining module 110, configured to obtain an access request for a target website resource issued by a user device;

连接确认模块120,用于确认用户设备与代理服务器之间已建立Socket连接;A connection confirming module 120, configured to confirm that a Socket connection has been established between the user equipment and the proxy server;

资源获取模块130,用于根据访问请求,获取目标网站资源;A resource acquisition module 130, configured to acquire target website resources according to the access request;

访问请求响应模块140,用于利用所述Socket连接,将所获取的目标网站资源反馈至用户设备,以响应访问请求。The access request responding module 140 is configured to use the Socket connection to feed back the obtained target website resources to the user equipment, so as to respond to the access request.

参见图7所示,在本申请的一种具体实施方式中,上述网站访问加速装置还可以包括资源管理模块150,用于预先从网站服务器获取网站资源并存储在代理服务器本地;相应地,资源获取模块130具体用于根据访问请求,获取预先存储在代理服务器本地的目标网站资源。As shown in FIG. 7, in a specific implementation manner of the present application, the above-mentioned website access acceleration device may also include a resource management module 150, which is used to obtain website resources from the website server in advance and store them locally in the proxy server; correspondingly, the resources The obtaining module 130 is specifically configured to obtain target website resources pre-stored locally in the proxy server according to the access request.

此外,资源管理模块150还可以用于对存储在代理服务器本地的网站资源进行更新。In addition, the resource management module 150 can also be used to update the website resources stored locally on the proxy server.

在本申请的一种具体实施方式中,资源获取模块130可以具体用于根据访问请求,与目标网站的服务器建立连接,从目标网站的服务器获取目标网站资源。In a specific implementation manner of the present application, the resource obtaining module 130 may be specifically configured to establish a connection with a server of the target website according to the access request, and obtain resources of the target website from the server of the target website.

参见图7所示,上述网站访问加速装置还可以进一步包括域名解析管理模块160,用于预先获得网站的域名解析结果并存储在代理服务器本地;相应地资源获取模块130具体用于根据预先存储在代理服务器本地的域名解析结果,与目标网站的服务器建立连接。Referring to Fig. 7, the above-mentioned website access acceleration device may further include a domain name resolution management module 160, which is used to obtain the domain name resolution result of the website in advance and store it locally in the proxy server; correspondingly, the resource acquisition module 130 is specifically used to The local domain name resolution result of the proxy server establishes a connection with the server of the target website.

此外,域名解析管理模块,还可以用于对存储在代理服务器本地的域名解析结果进行更新。In addition, the domain name resolution management module can also be used to update the domain name resolution results stored locally in the proxy server.

在本申请的一种具体实施方式中,访问请求响应模块140可以具体用于将经过压缩处理的目标网站资源反馈至用户设备。In a specific implementation manner of the present application, the access request response module 140 may be specifically configured to feed back the compressed target website resource to the user device.

可以理解的是,资源管理模块150与域名解析管理模块160作为两种功能独立的模块,既可以如图7所示同时配置在装置中,也可以分别单独配置在装置中,因此图7所示的结构不应理解为对本申请方案的限定。It can be understood that the resource management module 150 and the domain name resolution management module 160, as two modules with independent functions, can be configured in the device at the same time as shown in FIG. The structure should not be understood as a limitation to the scheme of this application.

上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and effects of each module in the above-mentioned device, please refer to the implementation process of the corresponding steps in the above-mentioned method for details, and details will not be repeated here.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。It can be known from the above description of the implementation manners that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the present application.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,在实施本申请方案时可以把各模块的功能在同一个或多个软件和/或硬件中实现。也可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiment. The device embodiments described above are only illustrative, and the modules described as separate components may or may not be physically separated, and the functions of each module may be integrated in the same or multiple implemented in software and/or hardware. Part or all of the modules can also be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.

以上所述仅是本申请的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only the specific implementation of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, some improvements and modifications can also be made. It should be regarded as the protection scope of this application.

Claims (14)

1. a kind of website visiting accelerated method, is applied to proxy server, the proxy server respectively with Family equipment and Website server are communicated to connect, it is characterised in that methods described includes:
Obtain the access request for targeted website resource that user equipment sends;
Confirm to have set up Socket connections between the user equipment and the proxy server;
According to the access request, the targeted website resource is obtained;
Connected using the Socket, acquired targeted website resource is fed back into the user equipment, with Respond the access request.
2. method according to claim 1, it is characterised in that methods described also includes:In advance from net Site server obtains site resource and stores local in proxy server;
It is described that the targeted website resource is obtained according to the access request, including:Please according to the access Ask, acquisition is stored in advance in the local targeted website resource of proxy server.
3. method according to claim 2, it is characterised in that methods described also includes:To storing The local site resource of proxy server is updated.
4. method according to claim 1, it is characterised in that described according to the access request, obtains The targeted website resource is taken, including:
According to the access request, set up with the server of targeted website and be connected, from the server of targeted website Obtain targeted website resource.
5. method according to claim 4, it is characterised in that methods described also includes:It is obtained ahead of time The domain name mapping result of website is simultaneously stored local in proxy server;
Described foundation with the server of targeted website is connected, including:According to being stored in advance in proxy server sheet The domain name mapping result on ground, sets up with the server of targeted website and is connected.
6. method according to claim 5, it is characterised in that methods described also includes:To storing The local domain name mapping result of proxy server is updated.
7. method according to claim 1, it is characterised in that described to provide acquired targeted website Source feeds back to the user equipment, including:
The targeted website resource that will be processed through overcompression feeds back to the user equipment.
8. a kind of website visiting accelerator, is applied to proxy server, the proxy server respectively with Family equipment and Website server are communicated to connect, it is characterised in that described device includes:
Access request obtains module, please for obtaining the access for targeted website resource that user equipment sends Ask;
Connection confirms module, for confirming to have set up Socket between the user equipment and the proxy server Connection;
Source obtaining module, for according to the access request, obtaining the targeted website resource;
Access request respond module, for using Socket connections, by acquired targeted website resource The user equipment is fed back to, to respond the access request.
9. device according to claim 8, it is characterised in that described device also includes resource management mould Block, for obtaining site resource from Website server in advance and storing local in proxy server;
The source obtaining module, specifically for according to the access request, acquisition is stored in advance in agency's clothes The local targeted website resource of business device.
10. device according to claim 9, it is characterised in that the resource management module, also uses In:
It is updated in the local site resource of proxy server to storing.
11. devices according to claim 8, it is characterised in that the source obtaining module, specifically For according to the access request, being set up with the server of targeted website and being connected, from the server of targeted website Obtain targeted website resource.
12. devices according to claim 11, it is characterised in that described device also includes domain name mapping Management module, for the domain name mapping result of website being obtained ahead of time and storing local in proxy server;
The source obtaining module, the local domain name mapping of proxy server is stored in advance in specifically for basis As a result, set up with the server of targeted website and be connected.
13. devices according to claim 12, it is characterised in that domain name parses management module, It is additionally operable to:
It is updated in the local domain name mapping result of proxy server to storing.
14. devices according to claim 8, it is characterised in that the access request respond module, Specifically for:
The targeted website resource that will be processed through overcompression feeds back to the user equipment.
CN201510974013.3A 2015-12-22 2015-12-22 A kind of website visiting accelerating method and device Pending CN106911732A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510974013.3A CN106911732A (en) 2015-12-22 2015-12-22 A kind of website visiting accelerating method and device
PCT/CN2016/109428 WO2017107795A1 (en) 2015-12-22 2016-12-12 Method and device for accelerating access to website

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510974013.3A CN106911732A (en) 2015-12-22 2015-12-22 A kind of website visiting accelerating method and device

Publications (1)

Publication Number Publication Date
CN106911732A true CN106911732A (en) 2017-06-30

Family

ID=59089061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510974013.3A Pending CN106911732A (en) 2015-12-22 2015-12-22 A kind of website visiting accelerating method and device

Country Status (2)

Country Link
CN (1) CN106911732A (en)
WO (1) WO2017107795A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109286684A (en) * 2018-11-21 2019-01-29 广州市百果园信息技术有限公司 A kind of processing method of communication connection, device, proxy server and storage medium
CN110413676A (en) * 2019-07-25 2019-11-05 中国工商银行股份有限公司 The access method and its device of database, electronic equipment and medium
CN111786809A (en) * 2020-05-11 2020-10-16 北京奇艺世纪科技有限公司 Client software network optimization method, system, device and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311835A (en) * 2019-08-02 2021-02-02 杭州海康威视数字技术股份有限公司 Security inspection analysis data transmission method, system, security inspection analyzer and client device
CN113079220B (en) * 2021-04-15 2022-07-15 深圳市万为物联科技有限公司 Method for remotely controlling control machine in power exchange cabinet

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917490A (en) * 2010-09-16 2010-12-15 北京开心人信息技术有限公司 Method and system for reading cache data
CN101924771A (en) * 2010-08-26 2010-12-22 北京天融信科技有限公司 Core-level TCP adhering junction method for accelerating application proxy
CN104717249A (en) * 2013-12-12 2015-06-17 北京神州泰岳软件股份有限公司 Method for issuing remote operation application, proxy server and system
CN105100174A (en) * 2014-05-22 2015-11-25 中国移动通信集团公司 Method, device and system for scheduling Internet resource

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102271123A (en) * 2010-06-01 2011-12-07 阿里巴巴集团控股有限公司 Communication method, system and equipment
CN102420805B (en) * 2010-09-27 2014-07-23 阿里巴巴集团控股有限公司 Method, system and device for communication by virtue of socket connection
CN104580097A (en) * 2013-10-22 2015-04-29 腾讯科技(深圳)有限公司 Data processing method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924771A (en) * 2010-08-26 2010-12-22 北京天融信科技有限公司 Core-level TCP adhering junction method for accelerating application proxy
CN101917490A (en) * 2010-09-16 2010-12-15 北京开心人信息技术有限公司 Method and system for reading cache data
CN104717249A (en) * 2013-12-12 2015-06-17 北京神州泰岳软件股份有限公司 Method for issuing remote operation application, proxy server and system
CN105100174A (en) * 2014-05-22 2015-11-25 中国移动通信集团公司 Method, device and system for scheduling Internet resource

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109286684A (en) * 2018-11-21 2019-01-29 广州市百果园信息技术有限公司 A kind of processing method of communication connection, device, proxy server and storage medium
CN109286684B (en) * 2018-11-21 2021-06-15 广州市百果园信息技术有限公司 Communication connection processing method and device, proxy server and storage medium
CN110413676A (en) * 2019-07-25 2019-11-05 中国工商银行股份有限公司 The access method and its device of database, electronic equipment and medium
CN111786809A (en) * 2020-05-11 2020-10-16 北京奇艺世纪科技有限公司 Client software network optimization method, system, device and storage medium

Also Published As

Publication number Publication date
WO2017107795A1 (en) 2017-06-29

Similar Documents

Publication Publication Date Title
CN102546794B (en) Method for directly communicating browser client with back-end server as well as gateway and communication system
CN102710748B (en) Data capture method, system and equipment
CN105100294B (en) Obtain method, system, the webserver, browser and the GSLB of webpage
US9253065B2 (en) Latency measurement in resource requests
US9407681B1 (en) Latency measurement in resource requests
CN104580192B (en) The treating method and apparatus of the network access request of application program
CN103124263B (en) A kind of advertisement push system and advertisement pushing equipment, Advertisement Server
CN104994079B (en) The treating method and apparatus of access request accelerates server
CN102629938B (en) Method for carrying out video acceleration on network video loading and system thereof
CN102739717B (en) Method for down loading, download agent server and network system
CN101127782A (en) A Realization Method of Captive Portal Service
CN102970384B (en) Proxy server and communication system
CN103201989A (en) Method, apparatus and system for controlling data transmission
CN106911732A (en) A kind of website visiting accelerating method and device
CN105338072A (en) HTTP (hyper text transport protocol) redirecting method and routing equipment
CN102932473B (en) The method of cross operator access to netwoks Web content
CN104320405B (en) A kind of upper optimization method suitable for star-like satellite network
CN102158518B (en) Data transmission method in content distribution network (CDN), network node and system
CN102907071B (en) Data transmission method, mobile terminal, proxy server
CN101039309A (en) Link sharing service apparatus and communication method thereof
CN106856456B (en) Processing method and system for cache cluster service
CN102594886A (en) Method and device for direct communication between browsers, and communication system
EP3079328B1 (en) Media resource sharing method, shared server and shared system
CN103686852B (en) A kind of method, equipment and Wireless acceleration system that interaction data is processed
WO2017020597A1 (en) Resource cache method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1238436

Country of ref document: HK

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170630

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1238436

Country of ref document: HK