CN105915639B - Page access method and device - Google Patents
Page access method and device Download PDFInfo
- Publication number
- CN105915639B CN105915639B CN201610399281.1A CN201610399281A CN105915639B CN 105915639 B CN105915639 B CN 105915639B CN 201610399281 A CN201610399281 A CN 201610399281A CN 105915639 B CN105915639 B CN 105915639B
- Authority
- CN
- China
- Prior art keywords
- page
- accessed
- terminal
- resource
- server
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a page access method and device. Wherein, the method comprises the following steps: acquiring a page access request which is sent by a client running on a terminal and used for accessing a page to be accessed; judging whether page request information of a page to be accessed carried in a page access request meets a preset condition or not; and when the condition that the preset condition is met is judged, sending a response message to the terminal, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire the page resource in the page to be accessed. The invention solves the technical problem of poor real-time performance of page access control caused by adopting a black and white list to access the page.
Description
Technical Field
The invention relates to the field of computers, in particular to a page access method and device.
Background
Currently, a terminal generally implements acquisition control of page resources in a page through a black and white list at a domain name level. Namely, whether a direct page server acquires page resources in a page or a proxy server connects to a page server to acquire the page resources is determined through a pre-configured black and white list. If the direct connection page server has a faster access speed, the security problems of webpage hijacking, JS injection, information leakage, phishing websites and the like exist; if all access is performed through the proxy server, although access security can be guaranteed, high bandwidth cost is brought, and meanwhile, for video resources, the problem of slow resource downloading caused by IP cross-operator acquisition exists.
That is, at present, since the black-and-white list is a pre-configured fixed list, when the access is performed by using the above black-and-white list, real-time control of page access cannot be realized.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a page access method and a page access device, which at least solve the technical problem of poor real-time performance of page access control caused by adopting a black and white list to access a page.
According to an aspect of an embodiment of the present invention, there is provided a page access method, including: a client running on a terminal sends a page access request for accessing a page to be accessed to a proxy server; the proxy server judges whether the page request information of the page to be accessed carried in the page access request meets a preset condition, and when the preset condition is judged to be met, the proxy server sends a response message to the terminal, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire page resources in the page to be accessed; the terminal directly accesses the page server of the page to be accessed to obtain the page resource in the page to be accessed; and the page server pushes the page resource to the client running on the terminal.
According to another aspect of the embodiments of the present invention, there is also provided a page access method, including: acquiring a page access request which is sent by a client running on a terminal and used for accessing a page to be accessed; judging whether the page request information of the page to be accessed carried in the page access request meets a preset condition or not; and when the preset condition is judged to be met, sending a response message to the terminal, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire the page resource in the page to be accessed.
According to another aspect of the embodiments of the present invention, there is also provided a page access method, including: sending a page access request for accessing a page to be accessed to a proxy server; receiving a response message sent by the proxy server, wherein the response message carries indication information for indicating a page server directly accessing the page to be accessed to acquire page resources in the page to be accessed; and directly accessing the page server of the page to be accessed to obtain the page resources in the page to be accessed.
According to another aspect of the embodiments of the present invention, there is also provided a page access apparatus, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a page access request which is sent by a client running on a terminal and is used for accessing a page to be accessed; a determining unit, configured to determine whether page request information of the page to be accessed, which is carried in the page access request, meets a preset condition; and a sending unit, configured to send a response message to the terminal when it is determined that the preset condition is met, where the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to obtain the page resource in the page to be accessed.
According to another aspect of the embodiments of the present invention, there is also provided a page access apparatus, including: the system comprises a sending unit, a receiving unit and a processing unit, wherein the sending unit is used for sending a page access request for accessing a page to be accessed to a proxy server; a receiving unit, configured to receive a response message sent by the proxy server, where the response message carries indication information used for indicating that a page server directly accessing the page to be accessed obtains a page resource in the page to be accessed; and the access unit is used for directly accessing the page server of the page to be accessed to obtain the page resources in the page to be accessed.
In the embodiment of the invention, the proxy server receives a page access request sent by a client running on the terminal, judges whether page request information of a page to be accessed carried in the page access request meets a preset condition, and sends a response message carrying indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire page resources in the page to be accessed when the page request information meets the preset condition. So that the terminal can directly access the page server to obtain part or all of the page resources in the page without continuing to access the page server through the proxy server to obtain the page resources. Therefore, under the condition that the terminal is ensured to safely access the page, the flow of the proxy server and the utilization rate of the CPU are reduced, and the speed of accessing the page and acquiring page resources is improved. And further solves the technical problem of poor real-time performance of page access control caused by adopting a black and white list to access the page.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative page access method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative page access method according to an embodiment of the invention;
FIG. 3 is a flow diagram of an alternative page access method according to an embodiment of the invention;
FIG. 4 is a diagram illustrating an effect of an alternative page access method according to an embodiment of the present invention;
FIG. 5 is a flow diagram of yet another alternative page access method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an alternative proxy server according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an alternative page access terminal according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an alternative page access device according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an alternative page access apparatus according to an embodiment of the present invention; and
FIG. 10 is a flowchart of yet another alternative page access method according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In an embodiment of the present invention, an embodiment of the above-mentioned page access method is provided. As an alternative embodiment, the page access method may be applied, but is not limited to, in the application environment as shown in FIG. 1. A client running on a terminal 102 sends a page access request to a proxy server 106 through a network 104, the proxy server 106 determines whether page request information of a page to be accessed carried in the page access request meets a preset condition, when the preset condition is determined to be met, the proxy server 106 sends a response message to the terminal 102, and the terminal 102 acquires indication information of page resources in the page to be accessed according to a page server 108 which is carried in the response message and used for indicating that the page to be accessed is directly accessed.
The page access is carried out in the above manner, and whether the preset condition is met or not is judged in real time by the proxy server according to the page request information of the page to be accessed carried in the obtained page access request, so that when the preset condition is met, the obtaining manner of the page resource in the page to be accessed is adjusted in real time, namely, the corresponding page resource is obtained by the directly-connected page server, and the effects of saving the flow of the proxy server and improving the access speed and the page resource downloading speed on the premise of safely accessing the page are achieved.
Optionally, in this embodiment, the terminal may include, but is not limited to, at least one of the following: mobile phones, tablet computers, notebook computers, desktop PCs and other terminals for accessing pages. Optionally, in this embodiment, the network may include, but is not limited to, at least one of the following: wide area networks, metropolitan area networks, and local area networks. The above is only an example, and the present embodiment is not limited to this.
According to an embodiment of the present invention, there is provided a page access method, as shown in fig. 2, the method includes:
s202, a client running on a terminal 202 sends a page access request for accessing a page to be accessed to a proxy server 204;
s204, the proxy server 204 judges whether the page request information of the page to be accessed carried in the page access request meets a preset condition;
s206, when judging that the preset condition is met, the proxy server 204 sends a response message to the terminal 202, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire the page resource in the page to be accessed;
s208, the terminal 202 directly accesses the page server of the page to be accessed to obtain the page resource in the page to be accessed;
s210, the page server 206 pushes the page resource to the client running on the terminal.
Optionally, in this embodiment, the page access method may be but is not limited to be applied to an interaction process between different clients for accessing a page running on a terminal and a proxy server and a page server, where the clients may include but are not limited to: a browser client, an application client, etc. The proxy server may be, but not limited to, used for crawling, security checking, and the like of a page to be accessed. The page server may be, but is not limited to, for storing page resources in the page to be accessed. The above is only an embodiment, and this is not limited in this embodiment.
That is to say, the proxy server obtains the page request information carried by the page access request sent by the client running on the terminal, judges whether the page request information meets the preset condition in real time, and accordingly realizes real-time control over page resources obtained by page access, so that the problem of poor page access real-time performance caused by the fact that the page access mode can only be controlled through a pre-configured list in the prior art is solved, and the effect of improving real-time control over page access is achieved. In addition, the proxy server obtains the corresponding page resources by directly connecting the indication terminal with the page server, and the effects of saving the flow of the proxy server and improving the access speed and the page resource downloading speed on the premise of safely accessing the page are achieved. Further, in this embodiment, the classification processing of the page resources is also implemented by respectively determining the page resources requested in the page request information, so that the control of page access is implemented in terms of the precision of the page resources.
In the embodiment of the present invention, the above page method may be applied to, but is not limited to, a proxy server, as shown in fig. 3, where the steps executed at the proxy server are as follows:
s302, acquiring a page access request which is sent by a client running on a terminal and used for accessing a page to be accessed;
s304, judging whether the page request information of the page to be accessed carried in the page access request meets a preset condition or not;
and S306, when the condition that the preset condition is met is judged, sending a response message to the terminal, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire the page resource in the page to be accessed.
Optionally, in this embodiment, the proxy server determines, by receiving a page access request sent from a client running on the terminal, whether page request information of a page to be accessed, which is carried in the page access request, meets a preset condition, and sends, to the terminal, a response message for instructing the terminal to directly access the page server of the page to be accessed to obtain page resources in the page to be accessed when it is determined that the preset condition is met. So that the terminal can directly access the page server to obtain part or all of the page resources in the page without continuing to access the page server through the proxy server to obtain the page resources. Therefore, under the condition that the terminal is ensured to safely access the page, the flow of the proxy server and the utilization rate of the CPU are reduced, and the speed of accessing the page and acquiring page resources is improved.
It should be noted that, in this embodiment, when it is determined that the preset condition is not met, the proxy server also sends a response message to the terminal, where the response message carries indication information for indicating that the terminal continues to access the page server of the page to be accessed through the proxy server to obtain the page resource in the page to be accessed. In addition, in this embodiment, in the process that the proxy server determines whether the preset condition is met, the page to be accessed may be, but is not limited to, obtained from a page server of the page to be accessed, that is, page content independent of page resources in the page to be accessed, where the page resources may include, but are not limited to, at least one of the following: picture resource, character resource, cascading style sheet resource and JS resource.
For example, as shown in fig. 4, a graph of the effect of the detected traffic change of the proxy server is shown, wherein the first line (located above) in the graph represents the traffic that has passed through the proxy server in the previous cycle, and the second line (located below) in the graph represents the traffic that has passed through the proxy server in the current cycle, the traffic of the proxy server is significantly reduced.
Optionally, in this embodiment, the determining whether the page request information of the page to be accessed, which is carried in the page access request, meets the preset condition includes: judging whether the page to be accessed meets a first preset sub-condition or not according to the page request information, wherein the first preset sub-condition comprises that the page to be accessed is a credible page; and when the page to be accessed meets the first preset sub-condition, judging whether the page to be accessed meets the second preset sub-condition according to the page request information.
It should be noted that, in this embodiment, the proxy server determines, by using the first preset sub-condition, whether the page to be accessed is safe, and when the page to be accessed is a trusted page (may also be referred to as a secure page), determines, by using the proxy server, whether the page to be accessed meets the second preset sub-condition. Therefore, after the proxy server determines that the page access is performed through the direct connection page server, all the pages indicated in the response message sent to the terminal are safe trusted pages, and the security of the terminal access is ensured.
Optionally, in this embodiment, the page request information for determining whether the second preset sub-condition is satisfied may include, but is not limited to, at least one of the following: the resource type of the page resource, the network type of the network to which the terminal is currently connected, the location of the area where the terminal is located, and the network service identifier of the terminal.
Optionally, in order to ensure accurate and rapid acquisition of page resources, problems such as reduction in access efficiency caused by repeated access due to direct connection failure in a complex network environment are avoided. In this embodiment, the proxy server may store, but is not limited to store, a predetermined list, where the predetermined list is used to store the page identifier that cannot implement direct connection. For example, the complex network environment may include, but is not limited to, at least one of: unified login, IP validation, CMWAP gateway, cross-operator, etc. That is to say, before determining whether the preset condition is met, the proxy server may, but is not limited to, determine whether the page to be accessed belongs to a predetermined list, so that when the page to be accessed belongs to the predetermined list, the page resource is directly obtained through the proxy server; and when the page to be accessed does not belong to the preset list, continuing to execute the judgment step related to the preset condition. The access efficiency of accessing the page to be accessed is further improved.
Optionally, in this embodiment, the proxy server may, but is not limited to, implement accurate indication of the page access manner of the terminal by configuring HTTP header information in the response message. For example, configuring a predetermined identification bit in HTTP header information, where the predetermined identification bit is used to indicate that a resource type of a page resource in the page to be accessed is obtained by a page server directly accessing the page to be accessed. The number of bits of the predetermined identification bit may be set to different values according to different scenarios, but is not limited thereto. For example, when the predetermined identification bit is one bit, 1 (or 0) may be used to indicate that all page resources are acquired by the page server directly accessing the page to be accessed, and 0 (or 1) may be used to indicate that all page resources are acquired by the page server accessing the page to be accessed through the proxy server. For another example, when the predetermined identification bits are two bits, 10 may be used to indicate that the picture resource in the page directly accesses the page server of the page to be accessed for obtaining. The above is only an example, and this is not limited in this embodiment.
According to the embodiment provided by the application, the proxy server receives the page access request sent by the client running on the terminal, judges whether the page request information of the page to be accessed carried in the page access request meets the preset condition, and sends the response message for indicating the terminal to directly access the page server of the page to be accessed to acquire the page resource in the page to be accessed to the terminal when the preset condition is judged to be met. So that the terminal can directly access the page server to obtain part or all of the page resources in the page without continuing to access the page server through the proxy server to obtain the page resources. Therefore, under the condition that the terminal is ensured to safely access the page, the flow of the proxy server and the utilization rate of the CPU are reduced, and the speed of accessing the page and acquiring page resources is improved.
As an optional scheme, the determining whether the page request information of the page to be accessed carried in the page access request meets a preset condition includes:
s1, judging whether the page to be accessed meets a first preset sub-condition according to the page request information, wherein the first preset sub-condition comprises that the page to be accessed is a credible page;
and S2, when the page to be accessed meets the first preset sub-condition, judging whether the page to be accessed meets the second preset sub-condition according to the page request information.
Optionally, in this embodiment, it may be, but is not limited to, determine whether the page to be accessed meets the first preset sub-condition by monitoring a hijacking condition of the page, that is, determine that the page to be accessed is a trusted page. The hijacking refers to replacing page resources in a page to be accessed with page resources in a target page by modifying a domain name or comprehensively copying, wherein the page resources in the page to be accessed are different from the page resources in the target page. The way of hijacking the page not only makes the terminal unable to obtain the really needed page resources, but also affects the security of the terminal directly accessing the page server, for example, causing problems of information leakage and the like. Therefore, in this embodiment, after the trusted page is obtained by screening through the first preset sub-condition, whether the terminal is instructed to directly connect to the page server to obtain the page resource is determined through the second preset sub-condition.
Optionally, in this embodiment, the determining, according to the page request information, whether the page to be accessed meets the first preset sub-condition includes:
s11, judging whether the page to be accessed is replaced by a target page, wherein the page resources in the page to be accessed are different from the page resources in the target page;
and S12, when the page to be accessed is not replaced by the target page, judging that the page to be accessed meets the first preset sub-condition.
According to the embodiment provided by the application, whether the page to be accessed is the credible page or not is judged through the first preset sub-condition in the preset condition, so that the safe credible pages are all indicated by the proxy server in the response message sent to the terminal, the safety problems such as information leakage are avoided, and the purpose of ensuring the safety of terminal access is achieved.
As an optional scheme, the determining, according to the page request information, whether the page to be accessed meets the second preset sub-condition includes at least one of:
1) judging whether a page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the resource type of the page resources in the page to be accessed in the page request information;
2) judging whether a page server directly accessing the page to be accessed obtains page resources in the page to be accessed according to the network type of the network currently connected with the terminal in the page request information;
3) judging whether a page server directly accessing the page to be accessed obtains page resources in the page to be accessed according to the area position of the terminal in the page request information;
4) and judging whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the network service identifier of the terminal in the page request information.
According to the embodiment provided by the application, different parameter information in the page request information is respectively judged to determine whether the terminal is indicated to acquire the corresponding page resource in a manner of directly connecting the page resource to the page server, so that the effects of saving the flow of the proxy server and improving the access speed and the page resource downloading speed are achieved. Furthermore, the page resources requested in the page request information are processed in a grading way, so that the control of page access on the precision of the page resources is realized, in addition, different acquisition modes are executed on different page resources according to the parameter information, and the flexibility of acquiring the page resources in the page is also improved.
As an optional scheme, judging whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the resource type of the page resource in the page to be accessed in the page request information includes:
1) when the resource type of the page resource is a first resource type, judging that a page server directly accessing the page to be accessed obtains the page resource in the page to be accessed, wherein the first resource type indicates that the occupied bandwidth when transmitting the page resource in the page to be accessed is greater than a first preset threshold value; or
2) And when the resource type of the page resource is a second resource type, judging that the page resource in the page to be accessed is obtained by the page server accessing the page to be accessed through the proxy server, wherein the second resource type indicates that the occupied bandwidth when the page resource in the page to be accessed is transmitted is less than or equal to a first preset threshold value.
Optionally, in this embodiment, the first resource type may be, but is not limited to, a resource type that occupies a larger bandwidth during transmission, such as a picture resource or a video resource. That is to say, under the condition that it is ensured that the page to be accessed is a trusted page, the proxy server can obtain the image resource or video resource occupying a larger bandwidth in the trusted page by indicating the terminal to directly connect with the page server, so as to save the flow of the proxy server. In addition, the problem of slow resource downloading caused by acquiring page resources across operators in the access process can be solved.
Optionally, in this embodiment, the second resource type may be, but is not limited to, a resource type that occupies a smaller bandwidth during transmission, such as a text resource. That is to say, under the condition that it is ensured that the page to be accessed is a trusted page, the corresponding text resource can be continuously acquired from the page server through the proxy server.
According to the embodiment provided by the application, the page resources are processed in a grading mode according to the resource types of the page resources, different modes are executed aiming at different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, judging whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the network type of the network to which the terminal is currently connected in the page request information includes:
1) when the network type of a network connected with the terminal is a WIFI network, judging that a page server directly accessing a page to be accessed obtains page resources in the page to be accessed; or
2) And when the network type of the network connected with the terminal is the mobile network, judging that the page server accessing the page to be accessed through the proxy server acquires the page resource in the page to be accessed.
Optionally, when the network type of the network to which the terminal is currently connected is a WIFI network, the terminal accesses the network without considering traffic, and pays more attention to the quality of the page resource. Taking a picture as an example, the terminal pays more attention to the definition of the picture resource, so that the proxy server can generate corresponding response information and instruct the terminal to acquire the corresponding picture resource through directly connecting the page server, thereby ensuring the definition of the acquired picture resource.
Optionally, when the network type of the network to which the terminal is currently connected is a mobile network, for example, a 3G or 4G network, and the terminal will pay more attention to the traffic usage when accessing, taking a picture as an example, the proxy server may generate a corresponding response message to instruct the proxy server to continue to obtain the picture for the terminal, so as to achieve the purpose of saving transmission traffic for the terminal.
According to the embodiment provided by the application, the page resources are processed in a grading mode according to the network type of the network to which the terminal is connected at present, different modes are executed aiming at different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, the step of judging whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the location of the area where the terminal is located in the page request information includes:
1) when the area position where the terminal is located belongs to a preset area, judging that a page server accessing the page to be accessed through the proxy server obtains page resources in the page to be accessed; or
2) And when the area position where the terminal is located does not belong to the preset area, judging that the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed.
Optionally, in this embodiment, the predetermined area may be, but not limited to, a specific area in which the direct connection page server cannot be implemented, for example, an area with weak signal coverage, an area with a higher security level requirement, and the like, which are accessible after the terminal acquires access authorization. That is, when the terminal is located in the predetermined area, the page access may be realized only by the proxy server (which has obtained the access authorization of the area); and when the terminal is not located in the predetermined area, the page server directly accessing the page to be accessed under the indication of the response message of the proxy server can acquire the page resource in the page to be accessed.
According to the embodiment provided by the application, the page resources are processed in a grading mode according to the area position of the terminal, different modes are executed according to different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, the step of judging whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the network service identifier of the terminal in the page request information includes at least one of the following steps:
1) when the network service identifier of the terminal is a preset identifier, judging that a page server accessing the page to be accessed through the proxy server acquires page resources in the page to be accessed; or
2) And when the network service identifier of the terminal is not the preset identifier, judging that the page resource in the page to be accessed is obtained by directly accessing the page server of the page to be accessed.
Optionally, in this embodiment, the network service identifier of the terminal may be, but is not limited to, a network service identifier that is configured in advance and cannot be connected to the page server directly. That is, when the network service identifier of the terminal is the preset identifier, the page access can be realized only through the proxy server; and when the network service identifier of the terminal is not the preset identifier, the page server which directly accesses the page to be accessed under the indication of the response message of the proxy server can acquire the page resource in the page to be accessed.
According to the embodiment provided by the application, the page resources are processed in a grading way according to the network service identification of the terminal, different modes are executed aiming at different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, before sending the response message to the terminal, the method further includes:
s1, configuring HTTP header information in the response message, wherein the predetermined identification bit in the HTTP header information is used for indicating that the resource type of the page resource in the page to be accessed is obtained by the page server directly accessing the page to be accessed.
Optionally, in this embodiment, but not limited to, indicating the resource type of the page resource that can be acquired by the direct page server to the terminal may be implemented by configuring Q-Proxy-Resp: ds ═ value in the HTTP response header information.
The specific process can be as follows: a kernel in a client (such as a browser client) running on a terminal initiates a page access to a proxy server, and the proxy server can request at least one of the following information in page request information carried in a page access request: the method comprises the steps of configuring HTTP response header information Q-Proxy-Resp: ds (value) in a response message according to information such as the resource type of page resources, the network type of a network to which a terminal is currently connected, the location of an area where the terminal is located, the network service identification of the terminal, and an Access Point Name (APN) of the terminal to generate a corresponding response message, and sending the configured response message to the terminal to realize direct connection or Proxy Access control of a page to be accessed, which is requested to be accessed by the terminal.
Optionally, in this embodiment, the HTTP header information is mainly used to carry a direct connection command and other commands to the kernel, and the kernel obtains various response messages through the HTTP header information. Where ds value may be defined as follows:
assuming that the value of ds is expressed in bits, from right to left are:
bit0, indicating that all the sub-resources are directly connected, such as Q-Proxy-Resp: ds ═ 1; indicating that all the sub-resources are directly connected;
bit1, which represents the picture resource direct connection, such as Q-Proxy-Resp: ds ═ 2, (10), which represents the current page picture resource direct connection;
bit2, which represents Cascading Style Sheets (CSS) direct connection, such as Q-Proxy-Resp: ds ═ 6, (110), which represents picture resources, and CSS direct connection;
bit3 denotes js direct connection.
According to the embodiment provided by the application, the preset identification bits are configured through HTTP header information in the response message, the resource type of the corresponding page resource is obtained through the direct connection page server according to the indication of the preset identification bits, and therefore direct connection or proxy access control of the page to be accessed requested to be accessed by the terminal is achieved.
As an optional solution, the HTTP header information in the configuration response message includes:
1) configuring an identifier on a preset identifier position as a first identifier, wherein the first identifier is used for indicating that all page resources in a page to be accessed are acquired by directly accessing a page server of the page to be accessed; or
2) Configuring an identifier on a preset identifier position as a second identifier, wherein the second identifier is used for indicating that picture page resources in a page to be accessed are acquired by directly accessing a page server of the page to be accessed; or
3) Configuring an identifier on a preset identifier position as a third identifier, wherein the third identifier is used for indicating that the page resources of the cascading style sheet in the page to be accessed are acquired by directly accessing a page server of the page to be accessed; or
4) And configuring an identifier on the preset identifier position as a fourth identifier, wherein the fourth identifier is used for indicating that js code page resources in the page to be accessed are acquired by directly accessing a page server of the page to be accessed.
Optionally, in this embodiment, the number of bits of the predetermined identification bit may be, but is not limited to, one or more bits, which is not limited in this embodiment.
For example, the HTTP response header information Q-Proxy-Resp in the configuration response message is a value of ds in value. For example, when the predetermined identification bit is four bits, 0001 may represent that all page resources are obtained by directly accessing the page server of the page to be accessed; 0000 can be used for representing that all page resources are obtained by a page server accessing the page to be accessed through a proxy server; 0010 can be used to indicate that the picture resource in the page is obtained by accessing the page server of the page to be accessed through the proxy server; 0100 can be used for indicating that the picture resource and the CSS resource in the page are both obtained by accessing the page server of the page to be accessed through the proxy server; 0110 can be used to indicate that the CSS resource in the page is obtained by the page server accessing the page to be accessed through the proxy server. The above is only an example, and this is not limited in this embodiment.
According to the embodiment provided by the application, the resource type of the corresponding page resource is obtained through the direct connection page server through the preset identification bit indication through difference, so that direct connection or proxy access control on the page to be accessed requested to be accessed by the terminal is achieved.
In the embodiment of the present invention, the above page method may be applied to, but is not limited to, a client running on a terminal, and as shown in fig. 5, the steps executed at the client are as follows:
s502, sending a page access request for accessing a page to be accessed to a proxy server;
s504, receiving a response message sent by the proxy server, wherein the response message carries indication information for indicating that the page server directly accessing the page to be accessed obtains page resources in the page to be accessed;
s506, directly accessing the page server of the page to be accessed to obtain the page resource in the page to be accessed.
Optionally, in this embodiment, the client running on the terminal sends the page access request to the proxy server, and receives a response message sent by the proxy server in response to the page access request and used for instructing the terminal to directly access the page server of the page to be accessed to obtain the page resources in the page to be accessed, so that the terminal can directly access the page server to obtain part or all of the page resources in the page without continuing to access the page server through the proxy server to obtain the page resources. Therefore, under the condition that the terminal is ensured to safely access the page, the flow of the proxy server and the utilization rate of the CPU are reduced, and the speed of accessing the page and acquiring page resources is improved.
Optionally, in this embodiment, before sending, to the proxy server, a page access request for accessing a page to be accessed, the method further includes: and judging whether the page to be accessed belongs to a preset list, wherein the preset list is used for indicating a page server accessing the page to be accessed through a proxy server to acquire page resources of the page to be accessed.
That is to say, the terminal may obtain a preset list configured in advance, where the preset list is used to instruct the page server accessing the page to be accessed through the proxy server to obtain the page resource of the page to be accessed. In this embodiment, when the page to be accessed by the terminal belongs to the preset list, the page access request is sent to the proxy server, and further judgment is performed to realize real-time control of the page resources in the page to be accessed, and the page resources in the page are subjected to hierarchical processing to improve the control accuracy.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is also provided a page access system for implementing the page access method, including:
1) the terminal is set to send a page access request for accessing the page to be accessed to the proxy server; after receiving the response message sent by the proxy server, directly accessing the page server of the page to be accessed to obtain the page resource in the page to be accessed;
2) the proxy server is configured to judge whether page request information of a page to be accessed, which is carried in the page access request, meets a preset condition; the method comprises the steps that when the condition that the preset condition is met is judged, a response message is sent to the terminal, wherein the response message carries indication information used for indicating the terminal to directly access a page server of the page to be accessed to obtain page resources in the page to be accessed;
3) and the page server is configured to push page resources to the client running on the terminal.
Optionally, in this embodiment, the page access system may be, but is not limited to, as shown in fig. 1, and the step of executing the page access process may be, but is not limited to, as shown in fig. 2, which is not described herein again in this embodiment.
In an embodiment of the present invention, there is further provided a proxy server for implementing the above-mentioned page access method, as shown in fig. 6, the proxy server includes:
1) a communication interface 602 configured to receive a page access request for accessing a page to be accessed;
2) the processor 604 is connected with the communication interface 602 and is configured to determine whether page request information of a page to be accessed, which is carried in the page access request, meets a preset condition;
the communication interface 602 is further configured to send a response message to the terminal when it is determined that the preset condition is met, where the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to obtain the page resource in the page to be accessed;
3) the memory 606, connected to the communication interface 602 and the processor 604, is configured to store page request information and preset conditions of a page to be accessed.
According to an embodiment of the present invention, there is also provided a page access terminal for implementing the page access method, as shown in fig. 7, the terminal includes:
1) a communication interface 702 configured to send a page access request for accessing a page to be accessed; the method comprises the steps that a response message sent by a proxy server is received, wherein the response message carries indication information used for indicating a page server directly accessing a page to be accessed to acquire page resources in the page to be accessed;
2) the processor 704 is connected with the communication interface 702 and is configured to directly access the page server of the page to be accessed to obtain page resources in the page to be accessed;
3) the memory 706, coupled to the communication interface 702 and the processor 704, is configured to store page request information for a page to be accessed.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
It should be noted that, in this embodiment, the proxy server obtains page request information carried by a page access request sent by a client running on the terminal, and determines in real time whether the page request information meets a preset condition, so as to implement real-time control on page resources obtained by page access, so as to overcome the problem that in the prior art, the page access real-time performance is poor due to a mode that the page access can only be controlled through a preconfigured list, and further achieve an effect of improving real-time page access control. In addition, the proxy server acquires the corresponding page resource by indicating the terminal to be directly connected with the page server, so that the terminal can directly access the page server to acquire the corresponding page resource, and the effects of saving the flow of the proxy server and improving the access speed and the page resource downloading speed on the premise of safely accessing the page can be achieved. Further, in this embodiment, the classification processing of the page resources is also implemented by respectively determining the page resources requested in the page request information, so that the control of page access is implemented in terms of the precision of the page resources.
In the embodiment of the present invention, the above page access apparatus may be applied to, but is not limited to, a proxy server, and as shown in fig. 8, the apparatus includes:
1) an obtaining unit 802, configured to obtain a page access request sent by a client running on a terminal and used for accessing a page to be accessed;
2) a determining unit 804, configured to determine whether page request information of a page to be accessed, which is carried in a page access request, meets a preset condition;
3) a sending unit 806, configured to send a response message to the terminal when it is determined that the preset condition is met, where the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to obtain the page resource in the page to be accessed.
Optionally, in this embodiment, the page access apparatus is applied to a proxy server, where the proxy server determines, by receiving a page access request sent from a client running on a terminal, whether page request information of a page to be accessed, which is carried in the page access request, meets a preset condition, and sends, to the terminal, a response message for instructing the terminal to directly access a page server of the page to be accessed to obtain a page resource in the page to be accessed when it is determined that the preset condition is met. So that the terminal can directly access the page server to obtain part or all of the page resources in the page without continuing to access the page server through the proxy server to obtain the page resources. Therefore, under the condition that the terminal is ensured to safely access the page, the flow of the proxy server and the utilization rate of the CPU are reduced, and the speed of accessing the page and acquiring page resources is improved.
It should be noted that, in this embodiment, when it is determined that the preset condition is not met, the proxy server also sends a response message to the terminal, where the response message carries indication information for indicating that the terminal continues to access the page server of the page to be accessed through the proxy server to obtain the page resource in the page to be accessed. In addition, in this embodiment, in the process that the proxy server determines whether the preset condition is met, the page to be accessed may be, but is not limited to, obtained from a page server of the page to be accessed, that is, page content independent of page resources in the page to be accessed, where the page resources may include, but are not limited to, at least one of the following: picture resource, character resource, cascading style sheet resource and JS resource. The page resource is only an example, and this is not limited in this embodiment. The page resource is only an example, and this is not limited in this embodiment.
For example, as shown in fig. 4, a graph of the effect of the detected traffic change of the proxy server is shown, wherein the first line (located above) in the graph represents the traffic that has passed through the proxy server in the previous cycle, and the second line (located below) in the graph represents the traffic that has passed through the proxy server in the current cycle, the traffic of the proxy server is significantly reduced.
Optionally, in this embodiment, the determining whether the page request information of the page to be accessed, which is carried in the page access request, meets the preset condition includes: judging whether the page to be accessed meets a first preset sub-condition or not according to the page request information, wherein the first preset sub-condition comprises that the page to be accessed is a credible page; and when the page to be accessed meets the first preset sub-condition, judging whether the page to be accessed meets the second preset sub-condition according to the page request information.
It should be noted that, in this embodiment, the proxy server determines, by using the first preset sub-condition, whether the page to be accessed is safe, and when the page to be accessed is a trusted page (may also be referred to as a secure page), determines, by using the proxy server, whether the page to be accessed meets the second preset sub-condition. Therefore, after the proxy server determines that the page access is performed through the direct connection page server, all the pages indicated in the response message sent to the terminal are safe trusted pages, and the security of the terminal access is ensured.
Optionally, in this embodiment, the page request information for determining whether the second preset sub-condition is satisfied may include, but is not limited to, at least one of the following: the resource type of the page resource, the network type of the network to which the terminal is currently connected, the location of the area where the terminal is located, and the network service identifier of the terminal.
Optionally, in order to ensure accurate and rapid acquisition of page resources, problems such as reduction in access efficiency caused by repeated access due to direct connection failure in a complex network environment are avoided. In this embodiment, the proxy server may store, but is not limited to store, a predetermined list, where the predetermined list is used to store the page identifier that cannot implement direct connection. For example, the complex network environment may include, but is not limited to, at least one of: unified login, IP validation, CMWAP gateway, cross-operator, etc. That is to say, before determining whether the preset condition is met, the proxy server may, but is not limited to, determine whether the page to be accessed belongs to a predetermined list, so that when the page to be accessed belongs to the predetermined list, the page resource is directly obtained through the proxy server; and when the page to be accessed does not belong to the preset list, continuing to execute the judgment step related to the preset condition. The access efficiency of accessing the page to be accessed is further improved.
Optionally, in this embodiment, the proxy server may, but is not limited to, implement accurate indication of the page access manner of the terminal by configuring HTTP header information in the response message. For example, configuring a predetermined identification bit in HTTP header information, where the predetermined identification bit is used to indicate that a resource type of a page resource in the page to be accessed is obtained by a page server directly accessing the page to be accessed. The number of bits of the predetermined identification bit may be set to different values according to different scenarios, but is not limited thereto. For example, when the predetermined identification bit is one bit, 1 (or 0) may be used to indicate that all page resources are acquired by the page server directly accessing the page to be accessed, and 0 (or 1) may be used to indicate that all page resources are acquired by the page server accessing the page to be accessed through the proxy server. For another example, when the predetermined identification bits are two bits, 10 may be used to indicate that the picture resource in the page directly accesses the page server of the page to be accessed for obtaining. The above is only an example, and this is not limited in this embodiment.
According to the embodiment provided by the application, the proxy server receives the page access request sent by the client running on the terminal, judges whether the page request information of the page to be accessed carried in the page access request meets the preset condition, and sends the response message for indicating the terminal to directly access the page server of the page to be accessed to acquire the page resource in the page to be accessed to the terminal when the preset condition is judged to be met. So that the terminal can directly access the page server to obtain part or all of the page resources in the page without continuing to access the page server through the proxy server to obtain the page resources. Therefore, under the condition that the terminal is ensured to safely access the page, the flow of the proxy server and the utilization rate of the CPU are reduced, and the speed of accessing the page and acquiring page resources is improved.
As an optional scheme, the determining unit 804 includes:
1) the first judging module is used for judging whether the page to be accessed meets a first preset sub-condition according to the page request information, wherein the first preset sub-condition comprises that the page to be accessed is a credible page;
2) and the second judging module is used for judging whether the page to be accessed meets the second preset sub-condition or not according to the page request information when the page to be accessed meets the first preset sub-condition.
Optionally, in this embodiment, it may be, but is not limited to, determine whether the page to be accessed meets the first preset sub-condition by monitoring a hijacking condition of the page, that is, determine that the page to be accessed is a trusted page. The hijacking refers to replacing page resources in a page to be accessed with page resources in a target page by modifying a domain name or comprehensively copying, wherein the page resources in the page to be accessed are different from the page resources in the target page. The way of hijacking the page not only makes the terminal unable to obtain the really needed page resources, but also affects the security of the terminal directly accessing the page server, for example, causing problems of information leakage and the like. Therefore, in this embodiment, after the trusted page is obtained by screening through the first preset sub-condition, whether the terminal is instructed to directly connect to the page server to obtain the page resource is determined through the second preset sub-condition.
Optionally, in this embodiment, the first determining module includes:
(1) the first judgment submodule is used for judging whether the page to be accessed is replaced by a target page or not, wherein page resources in the page to be accessed are different from page resources in the target page; and when the page to be accessed is not replaced by the target page, judging that the page to be accessed meets a first preset sub-condition.
According to the embodiment provided by the application, whether the page to be accessed is the credible page or not is judged through the first preset sub-condition in the preset condition, so that the safe credible pages are all indicated by the proxy server in the response message sent to the terminal, the safety problems such as information leakage are avoided, and the purpose of ensuring the safety of terminal access is achieved.
As an alternative, the second determination module includes at least one of:
1) the second judgment submodule is used for judging whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the resource type of the page resource in the page to be accessed in the page request information;
2) the third judgment submodule is used for judging whether the page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the network type of the network which is currently connected with the terminal in the page request information;
3) the fourth judgment submodule is used for judging whether the page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the area position of the terminal in the page request information;
4) and the fifth judgment submodule is used for judging whether the page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the network service identifier of the terminal in the page request information.
According to the embodiment provided by the application, different parameter information in the page request information is respectively judged to determine whether the terminal is indicated to acquire the corresponding page resource in a manner of directly connecting the page resource to the page server, so that the effects of saving the flow of the proxy server and improving the access speed and the page resource downloading speed are achieved. Furthermore, the page resources requested in the page request information are processed in a grading way, so that the control of page access on the precision of the page resources is realized, in addition, different acquisition modes are executed on different page resources according to the parameter information, and the flexibility of acquiring the page resources in the page is also improved.
As an optional scheme, the second judging sub-module judges whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the resource type of the page resource in the page to be accessed in the page request information by the following method:
1) when the resource type of the page resource is a first resource type, judging that a page server directly accessing the page to be accessed obtains the page resource in the page to be accessed, wherein the first resource type indicates that the occupied bandwidth when transmitting the page resource in the page to be accessed is greater than a first preset threshold value; or
2) And when the resource type of the page resource is a second resource type, judging that the page resource in the page to be accessed is obtained by the page server accessing the page to be accessed through the proxy server, wherein the second resource type indicates that the occupied bandwidth when the page resource in the page to be accessed is transmitted is less than or equal to a first preset threshold value.
Optionally, in this embodiment, the first resource type may be, but is not limited to, a resource type that occupies a larger bandwidth during transmission, such as a picture resource or a video resource. That is to say, under the condition that it is ensured that the page to be accessed is a trusted page, the proxy server can obtain the image resource or video resource occupying a larger bandwidth in the trusted page by indicating the terminal to directly connect with the page server, so as to save the flow of the proxy server. In addition, the problem of slow resource downloading caused by acquiring page resources across operators in the access process can be solved.
Optionally, in this embodiment, the second resource type may be, but is not limited to, a resource type that occupies a smaller bandwidth during transmission, such as a text resource. That is to say, under the condition that it is ensured that the page to be accessed is a trusted page, the corresponding text resource can be continuously acquired from the page server through the proxy server.
According to the embodiment provided by the application, the page resources are processed in a grading mode according to the resource types of the page resources, different modes are executed aiming at different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, the third determining sub-module determines, according to the network type of the network to which the terminal is currently connected in the page request information, whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed by the following method:
1) when the network type of a network connected with the terminal is a WIFI network, judging that a page server directly accessing a page to be accessed obtains page resources in the page to be accessed; or
2) And when the network type of the network connected with the terminal is the mobile network, judging that the page server accessing the page to be accessed through the proxy server acquires the page resource in the page to be accessed.
Optionally, when the network type of the network to which the terminal is currently connected is a WIFI network, the terminal accesses the network without considering traffic, and pays more attention to the quality of the page resource. Taking a picture as an example, the terminal pays more attention to the definition of the picture resource, so that the proxy server can generate a corresponding response message to instruct the terminal to acquire the corresponding picture resource through directly connecting the page server, thereby ensuring the definition of the acquired picture resource.
Optionally, when the network type of the network to which the terminal is currently connected is a mobile network, for example, a 3G or 4G network, and the terminal will pay more attention to the traffic usage when accessing, taking a picture as an example, the proxy server may generate a corresponding response message to instruct the proxy server to continue to obtain the picture for the terminal, so as to achieve the purpose of saving transmission traffic for the terminal.
According to the embodiment provided by the application, the page resources are processed in a grading mode according to the network type of the network to which the terminal is connected at present, different modes are executed aiming at different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, the fourth determining sub-module determines, according to the area position where the terminal is located in the page request information, whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed by the following method:
1) when the area position where the terminal is located belongs to a preset area, judging that a page server accessing the page to be accessed through the proxy server obtains page resources in the page to be accessed; or
2) And when the area position where the terminal is located does not belong to the preset area, judging that the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed.
Optionally, in this embodiment, the predetermined area may be, but not limited to, a specific area in which the direct connection page server cannot be implemented, for example, an area with weak signal coverage, an area with a higher security level requirement, and the like, which are accessible after the terminal acquires access authorization. That is, when the terminal is located in the predetermined area, the page access may be realized only by the proxy server (which has obtained the access authorization of the area); and when the terminal is not located in the predetermined area, the page server directly accessing the page to be accessed under the indication of the response message of the proxy server can acquire the page resource in the page to be accessed.
According to the embodiment provided by the application, the page resources are processed in a grading mode according to the area position of the terminal, different modes are executed according to different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, the fifth determining sub-module determines, according to the network service identifier of the terminal in the page request information, whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed, by using at least one of the following methods:
1) when the network service identifier of the terminal is a preset identifier, judging that a page server accessing the page to be accessed through the proxy server acquires page resources in the page to be accessed; or
2) And when the network service identifier of the terminal is not the preset identifier, judging that the page resource in the page to be accessed is obtained by directly accessing the page server of the page to be accessed.
Optionally, in this embodiment, the network service identifier of the terminal may be, but is not limited to, a network service identifier that is configured in advance and cannot be connected to the page server directly. That is, when the network service identifier of the terminal is the preset identifier, the page access can be realized only through the proxy server; and when the network service identifier of the terminal is not the preset identifier, the page server which directly accesses the page to be accessed under the indication of the response message of the proxy server can acquire the page resource in the page to be accessed.
According to the embodiment provided by the application, the page resources are processed in a grading way according to the network service identification of the terminal, different modes are executed aiming at different page resources, and page access on the precision of the page resources is realized.
As an optional scheme, the method further comprises the following steps:
1) and the configuration unit is used for configuring HTTP header information in the response message before sending the response message to the terminal, wherein the preset identification bit in the HTTP header information is used for indicating that the resource type of the page resource in the page to be accessed is acquired by a page server directly accessing the page to be accessed.
Optionally, in this embodiment, but not limited to, indicating the resource type of the page resource that can be acquired by the direct page server to the terminal may be implemented by configuring Q-Proxy-Resp: ds ═ value in the HTTP response header information.
The specific process can be as follows: a kernel in a client (such as a browser client) running on a terminal initiates a page access to a proxy server, and the proxy server can request at least one of the following information in page request information carried in a page access request: the method comprises the steps of configuring HTTP response header information Q-Proxy-Resp: ds (value) in a response message according to information such as the resource type of page resources, the network type of a network to which a terminal is currently connected, the location of an area where the terminal is located, the network service identification of the terminal, and an Access Point Name (APN) of the terminal to generate a corresponding response message, and sending the configured response message to the terminal to realize direct connection or Proxy Access control of a page to be accessed, which is requested to be accessed by the terminal.
Optionally, in this embodiment, the HTTP header information is mainly used to carry a direct connection command and other commands to the kernel, and the kernel obtains various response messages through the HTTP header information. Where ds value may be defined as follows:
assuming that the value of ds is expressed in bits, from right to left are:
bit0, indicating that all the sub-resources are directly connected, such as Q-Proxy-Resp: ds ═ 1; indicating that all the sub-resources are directly connected;
bit1, which represents the picture resource direct connection, such as Q-Proxy-Resp: ds ═ 2, (10), which represents the current page picture resource direct connection;
bit2, which represents Cascading Style Sheets (CSS) direct connection, such as Q-Proxy-Resp: ds ═ 6, (110), which represents picture resources, and CSS direct connection;
bit3 denotes js direct connection.
According to the embodiment provided by the application, the preset identification bits are configured through HTTP header information in the response message, the resource type of the corresponding page resource is obtained through the direct connection page server according to the indication of the preset identification bits, and therefore direct connection or proxy access control of the page to be accessed requested to be accessed by the terminal is achieved.
As an alternative, the configuration unit includes:
1) the first configuration module is used for configuring an identifier on a preset identifier position as a first identifier, wherein the first identifier is used for indicating that all page resources in the page to be accessed are acquired by directly accessing a page server of the page to be accessed; or
2) The second configuration module is used for configuring the identifier on the preset identifier position as a second identifier, wherein the second identifier is used for indicating that the picture page resource in the page to be accessed is obtained by directly accessing the page server of the page to be accessed; or
3) The third configuration module is used for configuring the identifier on the preset identifier position as a third identifier, wherein the third identifier is used for indicating that the page resources of the cascading style sheet in the page to be accessed are acquired by directly accessing the page server of the page to be accessed; or
4) And the fourth configuration module is used for configuring the identifier on the preset identifier position as a fourth identifier, wherein the fourth identifier is used for indicating that js code page resources in the page to be accessed are acquired by directly accessing the page server of the page to be accessed.
Optionally, in this embodiment, the number of bits of the predetermined identification bit may be, but is not limited to, one or more bits, which is not limited in this embodiment.
For example, the HTTP response header information Q-Proxy-Resp in the configuration response message is a value of ds in value. For example, when the predetermined identification bit is four bits, 0001 may represent that all page resources are obtained by directly accessing the page server of the page to be accessed; 0000 can be used for representing that all page resources are obtained by a page server accessing the page to be accessed through a proxy server; 0010 can be used to indicate that the picture resource in the page is obtained by accessing the page server of the page to be accessed through the proxy server; 0100 can be used for indicating that the picture resource and the CSS resource in the page are both obtained by accessing the page server of the page to be accessed through the proxy server; 0110 can be used to indicate that the CSS resource in the page is obtained by the page server accessing the page to be accessed through the proxy server. The above is only an example, and this is not limited in this embodiment.
According to the embodiment provided by the application, the resource type of the corresponding page resource is obtained through the direct connection page server through the preset identification bit indication through difference, so that direct connection or proxy access control on the page to be accessed requested to be accessed by the terminal is achieved.
In the embodiment of the present invention, the above page access apparatus may be applied to, but is not limited to, a terminal, and as shown in fig. 9, the apparatus includes:
1) a sending unit 902, configured to send a page access request for accessing a page to be accessed to a proxy server;
2) a receiving unit 904, configured to receive a response message sent by the proxy server, where the response message carries indication information for indicating that a page server directly accessing a page to be accessed obtains page resources in the page to be accessed;
3) the accessing unit 906 is configured to directly access the page server of the page to be accessed to obtain the page resource in the page to be accessed.
Optionally, in this embodiment, the above page access apparatus is applied to a terminal, and a client running on the terminal sends a page access request to a proxy server, and receives a response message sent by the proxy server in response to the page access request and used for instructing the terminal to directly access a page server of a page to be accessed to obtain a page resource in the page to be accessed, so that the terminal can directly access the page server to obtain a part or all of the page resource in the page without continuing to access the page server through the proxy server to obtain the page resource. Therefore, under the condition that the terminal is ensured to safely access the page, the flow of the proxy server and the utilization rate of the CPU are reduced, and the speed of accessing the page and acquiring page resources is improved.
Optionally, in this embodiment, the method further includes:
(1) the device comprises a judging unit and a proxy server, wherein the judging unit is used for judging whether a page to be accessed belongs to a preset list before sending a page access request for accessing the page to be accessed to the proxy server, and the preset list is used for indicating a page server accessing the page to be accessed through the proxy server to acquire page resources of the page to be accessed.
That is to say, the terminal may obtain a preset list configured in advance, where the preset list is used to instruct the page server accessing the page to be accessed through the proxy server to obtain the page resource of the page to be accessed. In this embodiment, when the page to be accessed by the terminal belongs to the preset list, the page access request is sent to the proxy server, and further judgment is performed to realize real-time control of the page resources in the page to be accessed, and the page resources in the page are subjected to hierarchical processing to improve the control accuracy.
Example 3
The application environment of the embodiment of the present invention may refer to the application environment in embodiment 1, but is not described herein again. The embodiment of the invention provides an optional specific application example for implementing the page access method.
As an optional embodiment, it is assumed that a page a to be accessed requested by a terminal page access request is a trusted page, the second preset sub-condition is, for example, a network type of a network to which the terminal is connected and a resource type of a page resource, and the client running on the terminal is, for example, a browser client. The following is specifically described in conjunction with steps S1002 to S1014 shown in fig. 10:
the terminal 1002 sends a page access request to the proxy server 1004, the proxy server 1004 determines whether page request information carried in the page access request satisfies a preset condition, and if the page request information includes a network type B (e.g., a WIFI network) of a network to which the terminal is connected and a resource type C (e.g., a picture resource) of a page resource, the proxy server 1004 determines that the terminal 1002 can directly connect with the page server to obtain the picture resource in the WIFI network, that is, determines that the preset condition is satisfied. The proxy server may generate a corresponding response message, where the HTTP header information in the response message is configured with a predetermined identification bit for indicating that the resource type of the page resource in the page to be accessed is obtained by directly accessing the page server of the page to be accessed, that is, the resource type C (that is, the picture resource) of the page resource in the page to be accessed is obtained by the directly connected page server. The proxy server 1004 sends the response message to the terminal 1002, and the terminal 1002 may obtain a manner of obtaining the page resource by analyzing the response message, in this example, the terminal 1002 may directly access the page server 1006 to obtain the picture resource in the page a to be accessed. The page server 1006 may push the corresponding picture resource to the terminal 1002.
For another example, still taking the above scenario as an example, assuming that the page request information includes a network type D (e.g. mobile 3G network) of a network to which the terminal is connected and a resource type C (e.g. picture resource) of the page resource, the proxy server 1004 determines that the proxy server does not satisfy the preset condition if the terminal 1002 directly connects to the page server to obtain the picture resource and has a large influence on the terminal traffic after determining that the picture resource is in the mobile 3G network. The proxy server 1004 may generate a corresponding response message, in which indication information for instructing the terminal to continue to acquire the page resource through the proxy server is carried. The proxy server 1004 sends the response message to the terminal 1002, and the terminal 1002 may obtain the manner of obtaining the page resource by analyzing the response message, in this example, if the terminal 1002 is analyzed to continue proxy obtaining by the proxy server 1004, then the picture resource is obtained from the page server 1006 through the proxy server 1004 (as shown by the dotted line between the proxy server 1004 and the page server 1006 in fig. 10).
The execution sequence of step S1012-1 and step S1012-2 is not limited by the sequence number, and is different operations executed under different conditions, which is not limited in this example.
In this example, the proxy server determines, for different parameter information in the page request information carried by the page access request, whether the page to be accessed meets a preset condition, so as to implement real-time refined control on different page resources in different pages to be accessed, so as to overcome a problem of poor page access real-time performance caused by a mode that the page access can only be controlled through a preconfigured list in the prior art, and further achieve an effect of improving real-time control of page access. The classification processing of the page resources is realized by respectively judging the page resources requested in the page request information, so that the control of page access is realized on the precision of the page resources.
Example 4
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be located in at least one of a plurality of network devices in a network.
Optionally, in this embodiment, the storage medium is configured to store program codes for performing the following steps:
s1, acquiring a page access request for accessing a page to be accessed, which is sent by a client running on the terminal;
s2, judging whether the page request information of the page to be accessed carried in the page access request meets the preset condition;
and S3, when the preset condition is judged to be met, sending a response message to the terminal, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire the page resource in the page to be accessed.
Optionally, in this embodiment, the storage medium is further configured to store program codes for performing the following steps:
s1, judging whether the page to be accessed meets a first preset sub-condition according to the page request information, wherein the first preset sub-condition comprises that the page to be accessed is a credible page;
and S2, when the page to be accessed meets the first preset sub-condition, judging whether the page to be accessed meets the second preset sub-condition according to the page request information.
Optionally, in this embodiment, the storage medium is further configured to store program codes for executing: judging whether a page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the resource type of the page resources in the page to be accessed in the page request information; or, judging whether a page server directly accessing the page to be accessed obtains page resources in the page to be accessed according to the network type of the network currently connected with the terminal in the page request information; or, judging whether a page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the area position of the terminal in the page request information; or, judging whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the network service identifier of the terminal in the page request information.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (19)
1. A method for page access, comprising:
a client running on a terminal sends a page access request for accessing a page to be accessed to a proxy server;
the terminal directly acquires page resources in the page to be accessed from the proxy server under the condition that the proxy server judges that the page to be accessed belongs to the page to be accessed in a preset list;
the proxy server configures a preset identification bit in HTTP header information, wherein the preset identification bit is used for indicating that a resource type of a page resource in the page to be accessed is obtained by a page server directly accessing the page to be accessed;
under the condition that the proxy server judges that the page to be accessed does not belong to the page to be accessed in the preset list, the proxy server judges whether page request information of the page to be accessed, which is carried in the page access request, meets a preset condition, and when the preset condition is judged to be met, the proxy server sends a response message to the terminal, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire page resources in the page to be accessed;
the terminal directly accesses the page server of the page to be accessed to obtain the page resource in the page to be accessed;
the page server pushes the page resource to the client running on the terminal;
the step of judging whether the page request information of the page to be accessed carried in the page access request meets a preset condition by the proxy server comprises the following steps: judging whether the page to be accessed meets a first preset sub-condition or not through monitoring hijacking of the page, wherein the first preset sub-condition comprises that the page to be accessed is a credible page; when the page to be accessed is judged to meet the first preset sub-condition, judging whether the page to be accessed meets a second preset sub-condition according to the page request information, wherein the page request information for judging whether the page to be accessed meets the second preset sub-condition may include at least one of the following: the resource type of the page resource, the network type of the network to which the terminal is currently connected, the location of the area where the terminal is located, and the network service identifier of the terminal.
2. A method for page access, comprising:
acquiring a page access request which is sent by a client running on a terminal and used for accessing a page to be accessed;
under the condition that the page to be accessed belongs to the page to be accessed in the preset list, sending a response message for directly acquiring page resources in the page to be accessed from a proxy server to the terminal;
under the condition that the page to be accessed does not belong to the page to be accessed in the preset list, judging whether page request information of the page to be accessed carried in the page access request meets a preset condition or not;
configuring HTTP header information in the response message, wherein a predetermined identification bit in the HTTP header information is used for indicating that a resource type of a page resource in the page to be accessed is acquired by a page server directly accessing the page to be accessed;
when the preset condition is judged to be met, sending a response message to the terminal, wherein the response message carries indication information for indicating the terminal to directly access the page server of the page to be accessed to acquire page resources in the page to be accessed;
wherein the determining whether the page request information of the page to be accessed carried in the page access request meets a preset condition includes: judging whether the page to be accessed meets a first preset sub-condition or not through monitoring hijacking of the page, wherein the first preset sub-condition comprises that the page to be accessed is a credible page; when the page to be accessed is judged to meet the first preset sub-condition, judging whether the page to be accessed meets a second preset sub-condition according to the page request information, wherein the page request information for judging whether the page to be accessed meets the second preset sub-condition may include at least one of the following: the resource type of the page resource, the network type of the network to which the terminal is currently connected, the location of the area where the terminal is located, and the network service identifier of the terminal.
3. The method according to claim 2, wherein the determining whether the page to be accessed meets a first preset sub-condition according to the page request information comprises:
judging whether the page to be accessed is replaced by a target page or not, wherein page resources in the page to be accessed are different from page resources in the target page;
and when the page to be accessed is not replaced by the target page, judging that the page to be accessed meets the first preset sub-condition.
4. The method according to claim 2, wherein the determining whether the page to be accessed meets the second preset sub-condition according to the page request information includes at least one of:
judging whether a page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the resource type of the page resources in the page to be accessed in the page request information;
judging whether a page server directly accessing the page to be accessed obtains page resources in the page to be accessed according to the network type of the network currently connected with the terminal in the page request information;
judging whether a page server directly accessing the page to be accessed obtains page resources in the page to be accessed according to the area position of the terminal in the page request information;
and judging whether a page server directly accessing the page to be accessed obtains page resources in the page to be accessed according to the network service identifier of the terminal in the page request information.
5. The method according to claim 4, wherein the determining whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the resource type of the page resource in the page to be accessed in the page request information includes:
when the resource type of the page resource is a first resource type, judging that a page server directly accessing the page to be accessed obtains the page resource in the page to be accessed, wherein the first resource type indicates that the occupied bandwidth when transmitting the page resource in the page to be accessed is greater than a first preset threshold value; or
And when the resource type of the page resource is a second resource type, judging that the page resource in the page to be accessed is obtained by a page server accessing the page to be accessed through a proxy server, wherein the second resource type indicates that the occupied bandwidth when the page resource in the page to be accessed is transmitted is less than or equal to the first preset threshold value.
6. The method according to claim 4, wherein the determining whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the network type of the network to which the terminal is currently connected in the page request information includes:
when the network type of the current network connected with the terminal is a WIFI network, judging that a page server directly accessing the page to be accessed obtains page resources in the page to be accessed; or
And when the network type of the network connected with the terminal is a mobile network, judging that a page server accessing the page to be accessed through a proxy server acquires page resources in the page to be accessed.
7. The method according to claim 4, wherein the determining whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the location of the area where the terminal is located in the page request information includes:
when the area position where the terminal is located belongs to a preset area, judging that a page server accessing the page to be accessed through a proxy server obtains page resources in the page to be accessed; or
And when the area position where the terminal is located does not belong to the preset area, judging that the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed.
8. The method according to claim 4, wherein the determining whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the network service identifier of the terminal in the page request information includes at least one of:
when the network service identifier of the terminal is a preset identifier, judging that a page server accessing the page to be accessed through a proxy server acquires page resources in the page to be accessed; or
And when the network service identifier of the terminal is not the preset identifier, judging that the page resources in the page to be accessed are obtained through a page server directly accessing the page to be accessed.
9. The method of claim 2, wherein the configuring of the HTTP header information in the response message comprises:
configuring an identifier on the preset identifier position as a first identifier, wherein the first identifier is used for indicating that all page resources in the page to be accessed are acquired by directly accessing a page server of the page to be accessed; or
Configuring an identifier on the preset identifier position as a second identifier, wherein the second identifier is used for indicating that the picture page resource in the page to be accessed is obtained by directly accessing a page server of the page to be accessed; or
Configuring an identifier on the preset identifier position as a third identifier, wherein the third identifier is used for indicating that the page resources of the cascading style sheet in the page to be accessed are obtained by directly accessing the page server of the page to be accessed; or
And configuring an identifier on the preset identifier position as a fourth identifier, wherein the fourth identifier is used for indicating that js code page resources in the page to be accessed are acquired by directly accessing a page server of the page to be accessed.
10. A method for page access, comprising:
sending a page access request for accessing a page to be accessed to a proxy server;
receiving a response message sent by the proxy server, wherein the response message carries indication information for indicating a page server directly accessing the page to be accessed to acquire page resources in the page to be accessed;
before receiving a response message sent by the proxy server, configuring HTTP header information in the response message by the proxy server, wherein a predetermined identification bit in the HTTP header information is used for indicating that a page server directly accessing the page to be accessed obtains a resource type of a page resource in the page to be accessed;
a page server directly accessing the page to be accessed acquires page resources in the page to be accessed;
before sending a page access request for accessing a page to be accessed to a proxy server, the method further includes: judging whether the page to be accessed belongs to a preset list or not, wherein the preset list is used for indicating a page server accessing the page to be accessed through the proxy server to acquire page resources of the page to be accessed;
the step of judging whether the page request information of the page to be accessed carried in the page access request meets preset conditions by the proxy server comprises the following steps: judging whether the page to be accessed meets a first preset sub-condition or not through monitoring hijacking of the page, wherein the first preset sub-condition comprises that the page to be accessed is a credible page; when the page to be accessed is judged to meet the first preset sub-condition, judging whether the page to be accessed meets a second preset sub-condition according to the page request information, wherein the page request information for judging whether the page to be accessed meets the second preset sub-condition may include at least one of the following: the resource type of the page resource, the network type of the network to which the terminal is currently connected, the location of the area where the terminal is located, and the network service identifier of the terminal.
11. A page access apparatus, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a page access request which is sent by a client running on a terminal and is used for accessing a page to be accessed;
the judging unit is used for judging whether the page request information of the page to be accessed carried in the page access request meets a preset condition or not;
the configuration unit is used for configuring HTTP header information in the response message before sending the response message to the terminal, wherein a preset identification bit in the HTTP header information is used for indicating that a page server directly accessing the page to be accessed obtains the resource type of the page resource in the page to be accessed;
a sending unit, configured to send a response message to the terminal when it is determined that the page to be accessed does not belong to a page to be accessed in a predetermined list and when it is determined that the preset condition is met, where the response message carries indication information for indicating that a page server of the terminal directly accesses the page to be accessed obtains page resources in the page to be accessed;
the judging unit includes: the first judging module is used for judging whether the page to be accessed meets a first preset sub-condition or not through monitoring hijacking of the page, wherein the first preset sub-condition comprises that the page to be accessed is a credible page; a second determining module, configured to determine, when it is determined that the page to be accessed satisfies the first preset sub-condition, whether the page to be accessed satisfies a second preset sub-condition according to the page request information, where the page request information for determining whether the page to be accessed satisfies the second preset sub-condition may include at least one of the following: the method comprises the following steps of (1) the resource type of page resources, the network type of a network to which a terminal is currently connected, the position of an area where the terminal is located and the network service identification of the terminal;
the apparatus is further configured to perform: and under the condition that the page to be accessed belongs to the page to be accessed in the preset list, the terminal directly acquires the page resource in the page to be accessed from the proxy server.
12. The apparatus of claim 11, wherein the first determining module comprises:
the first judgment submodule is used for judging whether the page to be accessed is replaced by a target page or not, wherein page resources in the page to be accessed are different from page resources in the target page; and when the page to be accessed is not replaced by the target page, judging that the page to be accessed meets the first preset sub-condition.
13. The apparatus of claim 11, wherein the second determining module comprises at least one of:
the second judgment submodule is used for judging whether a page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the resource type of the page resources in the page to be accessed in the page request information;
a third judging submodule, configured to judge whether to directly access the page server of the page to be accessed to obtain a page resource in the page to be accessed according to the network type of the network to which the terminal is currently connected in the page request information;
a fourth judging submodule, configured to judge whether a page server directly accessing the page to be accessed obtains a page resource in the page to be accessed according to the location of the area where the terminal is located in the page request information;
and the fifth judging submodule is used for judging whether the page server directly accessing the page to be accessed obtains the page resources in the page to be accessed according to the network service identifier of the terminal in the page request information.
14. The apparatus according to claim 13, wherein the second determining sub-module determines, according to the resource type of the page resource in the page to be accessed in the page request information, whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed by:
when the resource type of the page resource is a first resource type, judging that a page server directly accessing the page to be accessed obtains the page resource in the page to be accessed, wherein the first resource type indicates that the occupied bandwidth when transmitting the page resource in the page to be accessed is greater than a first preset threshold value; or
And when the resource type of the page resource is a second resource type, judging that the page resource in the page to be accessed is obtained by a page server accessing the page to be accessed through a proxy server, wherein the second resource type indicates that the occupied bandwidth when the page resource in the page to be accessed is transmitted is less than or equal to the first preset threshold value.
15. The apparatus according to claim 13, wherein the third determining sub-module determines, according to the network type of the network to which the terminal is currently connected in the page request information, whether to directly access the page server of the page to be accessed to obtain the page resource in the page to be accessed by:
when the network type of the current network connected with the terminal is a WIFI network, judging that a page server directly accessing the page to be accessed obtains page resources in the page to be accessed; or
And when the network type of the network connected with the terminal is a mobile network, judging that a page server accessing the page to be accessed through a proxy server acquires page resources in the page to be accessed.
16. The apparatus according to claim 13, wherein the fourth determining sub-module determines whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed according to the location of the area where the terminal is located in the page request information by:
when the area position where the terminal is located belongs to a preset area, judging that a page server accessing the page to be accessed through a proxy server obtains page resources in the page to be accessed; or
And when the area position where the terminal is located does not belong to the preset area, judging that the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed.
17. The apparatus according to claim 13, wherein the fifth determining sub-module determines, according to the network service identifier of the terminal in the page request information, whether the page server directly accessing the page to be accessed obtains the page resource in the page to be accessed by at least one of:
when the network service identifier of the terminal is a preset identifier, judging that a page server accessing the page to be accessed through a proxy server acquires page resources in the page to be accessed; or
And when the network service identifier of the terminal is not the preset identifier, judging that the page resources in the page to be accessed are obtained through a page server directly accessing the page to be accessed.
18. The apparatus of claim 11, wherein the configuration unit comprises:
a first configuration module, configured to configure an identifier on the predetermined identifier bit as a first identifier, where the first identifier is used to indicate that all page resources in the page to be accessed are obtained by directly accessing the page server of the page to be accessed; or
The second configuration module is used for configuring an identifier on the preset identifier position as a second identifier, wherein the second identifier is used for indicating that the picture page resource in the page to be accessed is obtained by directly accessing the page server of the page to be accessed; or
A third configuration module, configured to configure an identifier on the predetermined identifier bit as a third identifier, where the third identifier is used to indicate that a page resource of a cascading style sheet in the page to be accessed is obtained by directly accessing a page server of the page to be accessed; or
And the fourth configuration module is used for configuring the identifier on the preset identifier position as a fourth identifier, wherein the fourth identifier is used for indicating that js code page resources in the page to be accessed are acquired by directly accessing the page server of the page to be accessed.
19. A page access apparatus, comprising:
the system comprises a sending unit, a receiving unit and a processing unit, wherein the sending unit is used for sending a page access request for accessing a page to be accessed to a proxy server;
the configuration unit is used for configuring HTTP header information in the response message by the proxy server before receiving the response message sent by the proxy server, wherein a preset identification bit in the HTTP header information is used for indicating that a page server directly accessing the page to be accessed obtains the resource type of the page resource in the page to be accessed;
a receiving unit, configured to receive a response message sent by the proxy server, where the response message carries indication information used for indicating a page server directly accessing the page to be accessed to obtain a page resource in the page to be accessed;
the access unit is used for directly accessing the page server of the page to be accessed to obtain page resources in the page to be accessed;
the system comprises a judging unit and a processing unit, wherein the judging unit is used for judging whether a page to be accessed belongs to a preset list before sending a page access request for accessing the page to be accessed to a proxy server, and the preset list is used for indicating a page server accessing the page to be accessed through the proxy server to acquire page resources of the page to be accessed;
the judging unit is further configured to execute monitoring for hijacking a page to judge whether the page to be accessed meets a first preset sub-condition, where the first preset sub-condition includes that the page to be accessed is a trusted page; and when the page to be accessed meets the first preset sub-condition, judging whether the page to be accessed meets a second preset sub-condition according to the page request information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610399281.1A CN105915639B (en) | 2016-06-06 | 2016-06-06 | Page access method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610399281.1A CN105915639B (en) | 2016-06-06 | 2016-06-06 | Page access method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105915639A CN105915639A (en) | 2016-08-31 |
CN105915639B true CN105915639B (en) | 2020-08-04 |
Family
ID=56750493
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610399281.1A Active CN105915639B (en) | 2016-06-06 | 2016-06-06 | Page access method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105915639B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107528900B (en) * | 2017-08-24 | 2020-07-07 | 维沃移动通信有限公司 | Multimedia file processing method, related equipment and system |
CN107832329B (en) * | 2017-09-26 | 2020-11-13 | 中国平安人寿保险股份有限公司 | Page resource obtaining method and terminal equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102665187A (en) * | 2012-02-29 | 2012-09-12 | 华中科技大学 | Intelligent pipeline control method based on intelligent terminal |
CN102694772A (en) * | 2011-03-23 | 2012-09-26 | 腾讯科技(深圳)有限公司 | Apparatus, system and method for accessing internet web pages |
CN104901943A (en) * | 2012-03-31 | 2015-09-09 | 北京奇虎科技有限公司 | Method and system for accessing website |
CN105550596A (en) * | 2015-12-23 | 2016-05-04 | 北京奇虎科技有限公司 | Access processing method and apparatus |
-
2016
- 2016-06-06 CN CN201610399281.1A patent/CN105915639B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102694772A (en) * | 2011-03-23 | 2012-09-26 | 腾讯科技(深圳)有限公司 | Apparatus, system and method for accessing internet web pages |
CN102665187A (en) * | 2012-02-29 | 2012-09-12 | 华中科技大学 | Intelligent pipeline control method based on intelligent terminal |
CN104901943A (en) * | 2012-03-31 | 2015-09-09 | 北京奇虎科技有限公司 | Method and system for accessing website |
CN105550596A (en) * | 2015-12-23 | 2016-05-04 | 北京奇虎科技有限公司 | Access processing method and apparatus |
Non-Patent Citations (1)
Title |
---|
古权,胡家宝."自适应代理防火墙的分析和研究".《现代计算机(专业版) 》.2001, * |
Also Published As
Publication number | Publication date |
---|---|
CN105915639A (en) | 2016-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107566786B (en) | Method and device for acquiring monitoring video and terminal equipment | |
US11671402B2 (en) | Service resource scheduling method and apparatus | |
CN103384275B (en) | Cross-terminal downloading method, system cloud server and terminal | |
CN110248364B (en) | IOT equipment network distribution method, device, equipment and medium | |
US9413560B2 (en) | Differentiated quality of service using security as a service | |
US9231915B2 (en) | Method and apparatus for optimizing hypertext transfer protocol (HTTP) uniform resource locator (URL) filtering | |
EP3590061B1 (en) | Managing data encrypting application | |
CN104219230B (en) | Identify method and the device of malicious websites | |
CN104123380B (en) | web access method and device | |
WO2014135045A1 (en) | Method and system for implementing transparent agent of ios system | |
US9942267B1 (en) | Endpoint segregation to prevent scripting attacks | |
CN102754488B (en) | The control method of user's access, Apparatus and system | |
CN105915639B (en) | Page access method and device | |
CN109890027B (en) | Method and apparatus for determining security risk information of target wireless access point | |
CN109194706B (en) | Network resource dial testing method and terminal | |
CN108512889B (en) | Application response pushing method based on HTTP and proxy server | |
CN105491406A (en) | Video sharing device, method, system and portable device | |
CN103729440A (en) | Method and device for having access to website | |
CN111786932B (en) | Account login method and device, electronic equipment and computer storage medium | |
CN104182331A (en) | Browser performance test method, browser performance test system and terminal | |
CN114285668B (en) | Gate testing method and device, storage medium and electronic equipment | |
CN108282783B (en) | Public wifi authentication method, device, user terminal and storage medium | |
CN108737350B (en) | Information processing method and client | |
Sengupta et al. | Web Privacy By Design: Evaluating Cross-layer Interactions of QUIC, DNS and H/3 | |
CN114915565A (en) | Method and system for debugging network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20221128 Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518100 Patentee after: Shenzhen Yayue Technology Co.,Ltd. Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |
|
TR01 | Transfer of patent right |