CN106850572B - Target resource access method and device - Google Patents

Target resource access method and device Download PDF

Info

Publication number
CN106850572B
CN106850572B CN201611253258.8A CN201611253258A CN106850572B CN 106850572 B CN106850572 B CN 106850572B CN 201611253258 A CN201611253258 A CN 201611253258A CN 106850572 B CN106850572 B CN 106850572B
Authority
CN
China
Prior art keywords
client
request
target resource
keyword
preset
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.)
Expired - Fee Related
Application number
CN201611253258.8A
Other languages
Chinese (zh)
Other versions
CN106850572A (en
Inventor
郭文强
梁龙虎
林祖伟
邓建伟
胡天力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201611253258.8A priority Critical patent/CN106850572B/en
Publication of CN106850572A publication Critical patent/CN106850572A/en
Application granted granted Critical
Publication of CN106850572B publication Critical patent/CN106850572B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The invention discloses a method and a device for accessing target resources. The target resource access method comprises the following steps: in a content distribution network, a dynamic identification system receives a first request forwarded by a node server, wherein the first request carries a first keyword used by a client for accessing a resource through a first preset page; the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword; and the dynamic identification system sends a second request carrying a second keyword to the source station server, wherein the source station server is used for responding to the second request and sending the target resource to the client according to the second keyword, and the client is used for preloading the target resource. By the method and the device, the effect of improving the access speed of the target resource is achieved.

Description

Target resource access method and device
Technical Field
The invention relates to the field of internet, in particular to a method and a device for accessing target resources.
Background
Currently, most websites provide the function of a search engine, and the access to target resources can be realized through the search engine. The search engine is a system for collecting information from the internet by using a specific computer program according to a certain policy and organizing and processing the collected information. After organizing and processing the information, the search engine provides retrieval service for the user and displays the relevant information retrieved by the user to a system used by the user, so that the user can conveniently and quickly locate the interested resources, and the target resources can be located by searching keywords. In addition, in the website of e-commerce and online ticket booking type, the query of resources by using a search engine is a core module of a service.
When accessing the target resource, when a user inputs a keyword in an input box, the script embedded in the page sends a request to the source station according to the keyword input by the user, so that the aim of prefetching the resource is fulfilled. However, due to the limitation of the front-end script, the pre-fetched keywords cannot be checked and corrected, for example, when the user wants to input the keyword "apple", but actually inputs the keyword "flat fruit", the pre-fetched resources are obtained through the actually input "flat fruit", and have a certain gap from the keyword "apple". For another example, the user wants to input the keyword "refrigerator", but actually inputs the keyword "bingxiang", and the prefetched resource is obtained through the actually input "bingxiang", so that the prefetched resource and the resource to which the user needs to respond have a certain difference, the accelerating effect on the dynamic page is not obvious, and the access speed to the target resource is low.
On the other hand, the existing dynamic access request has certain problems, for example, if the time for the source station database to respond to the request is long or the network condition is poor, the corresponding resource loading time is easily long, the access speed to the target resource is low, the normal operation of the website service is affected, the website income is reduced, and the user experience is reduced.
Aiming at the problem of low access speed to target resources in the prior art, no effective solution is provided at present.
Disclosure of Invention
The invention mainly aims to provide a method and a device for accessing a target resource, which are used for at least solving the problem of low access speed of the target resource in the prior art.
To achieve the above object, according to one aspect of the present invention, there is provided an access method of a target resource. The target resource access method comprises the following steps: in a content distribution network, a dynamic identification system receives a first request forwarded by a node server, wherein the first request carries a first keyword used by a client for searching resources through a first preset page; the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword; and the dynamic identification system sends a second request carrying a second keyword to the source station server, wherein the source station server is used for responding to the second request and sending the target resource to the client according to the second keyword, and the client is used for preloading the target resource.
Further, the first request is generated through a preset script added by a first preset page, and before the dynamic identification system receives the first request sent by the node server, the method further includes: the dynamic identification system receives a third request which is sent by the client and carries a second preset page, wherein the second preset page is a page which is used for searching target resources and is not added with a preset script by the client; the dynamic identification system responds to the third request and judges whether the second preset page meets the preset rule or not; if the dynamic identification system judges that the second preset page accords with the preset rule, the preset script is added to the second preset page to obtain a first preset page; the dynamic identification system sends a first preset page to the client through the node server.
Further, before the dynamic identification system adds the preset script to the second preset page to obtain the first preset page, the method further includes: the dynamic identification system receives a page chain which is sent by a source station server and accords with a preset rule, wherein the page chain comprises a first preset page; and dynamically identifying a system memory page chain to a preset memory position.
Further, the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword, and the method comprises the following steps: and the dynamic identification system responds to the first request and processes the first keyword according to the keyword popularity and/or the fuzzy search rule to obtain a second keyword.
Further, after the dynamic identification system sends a second request carrying a second keyword to the source station server, the method further includes: and the dynamic identification system forwards the source station server response second request to the client and obtains the target resource according to the second keyword.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a method for searching a target resource. The target resource access method comprises the following steps: in a content distribution network, a client is used for acquiring a first keyword for searching resources through a first preset page; the client is used for sending a first request carrying a first keyword to the dynamic identification system through the node server; the client receives a target resource sent by the source station server through responding to a second request and according to a second keyword, wherein the second request carries the second keyword obtained by responding to the first request through the dynamic identification system and processing the first keyword according to a preset rule; and the client pre-loads the target resource.
Further, the first request is generated through a preset script added to the first preset page, and before the client is used for sending the first request carrying the first keyword to the dynamic identification system through the node server, the method further includes: the client sends a third request carrying a second preset page to the dynamic identification system, wherein the second preset page is a page which is used for searching the target resource and is not added with the preset script; and the client receives a first preset page which is sent by the dynamic identification system and obtained by responding to the third request and adding a preset script to the second preset page under the condition that the second preset page accords with a preset rule.
Further, the sending, by the client, the first request carrying the first keyword to the dynamic identification system through the node server includes: the client is used for monitoring the key words through a preset script; under the condition that the client monitors the first keyword, the client generates a first request according to the first keyword; the client is used for sending a first request to the dynamic identification system through the node server.
Further, the target resource is a target resource in a response page obtained by the source station server responding to the second request, and the client pre-loading the target resource includes: the client is used for acquiring a response page through a preset script; the client analyzes the response page to obtain a uniform resource locator of the target resource; the client judges whether a uniform resource locator is cached or not; and if the client judges that the uniform resource locator of the target resource is cached, the client preloads the target resource.
Further, after the client determines whether the uniform resource locator of the target resource is cached, the method further includes: if the client judges that the uniform resource locator is not cached, a fourth request is sent to the node server according to the uniform resource locator, wherein the fourth request is used for requesting the node server to acquire the target resource; the client receives the fourth request responded by the node server, and sends the target resource under the condition that the target resource is cached in the node server; or under the condition that the node server responds to the fourth request and the node server does not cache the target resource, the client receives the target resource sent by the node server through the source station server responding to the fifth request, wherein the fifth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource.
Further, the client receives the fourth request from the node server, and sends the target resource when the node server caches the target resource, where the target resource includes: and under the condition that the node server responds to the fourth request, and the node server caches the target resource and the target resource is expired, the client receives the target resource sent by the node server through the source station server in response to the sixth request, wherein the sixth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a target resource searching apparatus. The target resource searching device comprises: the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for enabling a dynamic identification system to receive a first request forwarded by a node server in a content distribution network, and the first request carries a first keyword used by a client for searching resources through a first preset page; the processing unit is used for enabling the dynamic identification system to respond to the first request and processing the first keyword according to a preset rule to obtain a second keyword; and the sending unit is used for enabling the dynamic identification system to send a second request carrying a second keyword to the source station server, wherein the source station server is used for responding to the second request and sending the target resource to the client according to the second keyword, and the client is used for preloading the target resource.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a target resource searching apparatus. The target resource searching device comprises: the system comprises an acquisition unit, a search unit and a search unit, wherein the acquisition unit is used for enabling a client to be used for acquiring a first keyword for searching resources through a first preset page in a content distribution network; the client is used for sending a first request carrying a first keyword to the dynamic identification system through the node server; the receiving unit is used for receiving a second request which is forwarded by the source station server and is responded to, and obtaining target resources according to a second keyword, wherein the second request carries the second keyword which is obtained by responding to the first request by the dynamic identification system and processing the first keyword according to a preset rule; and the client side preloads the target resource.
According to the invention, in a content distribution network, a dynamic identification system receives a first request forwarded by a node server, wherein the first request carries a first keyword used by a client for searching resources through a first preset page; the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword; the dynamic identification system sends a second request carrying a second keyword to the source station server, wherein the source station server is used for responding to the second request and sending a target resource to the client according to the second keyword, the client is used for preloading the target resource, and the dynamic identification system receives the first request forwarded by the node server, responds to the first request, processes the first keyword according to a preset rule to obtain the second keyword, sends the second keyword back to the source station server, and returns the target resource to be preloaded by the source station server, so that the problem that the difference between the pre-fetched resource and the resource required by a user is large due to the fact that the keyword is not processed is solved, the problem of low access speed of the target resource is solved, and the effect of improving the access speed of the target resource is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow diagram of a method for accessing a target resource according to an embodiment of the invention;
FIG. 2 is a flow diagram of another method for accessing a target resource according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a target resource access system according to an embodiment of the invention;
FIG. 4 is a flow diagram of another method for accessing a target resource in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of a process of a dynamic access recognition system according to an embodiment of the invention;
FIG. 6 is a flow diagram of another method for accessing a target resource in accordance with an embodiment of the present invention;
FIG. 7 is a flow diagram of an apparatus for accessing a target resource according to an embodiment of the present invention; and
fig. 8 is a flowchart of another apparatus for accessing a target resource according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application 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 should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. 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.
The embodiment of the invention provides a method for accessing a target resource on one side of a dynamic identification system.
Fig. 1 is a flowchart of a method for accessing a target resource according to an embodiment of the present invention. As shown in fig. 1, the access method of the target resource includes the following steps:
step S102, in the content distribution network, the dynamic identification system receives the first request forwarded by the node server.
In the technical solution provided in step S102 of the present invention, in a content distribution network, a dynamic identification system receives a first request forwarded by a node server, where the first request carries a first keyword used by a client to search for a resource through a first preset page.
A Content Distribution Network (CDN) is a layer of intelligent virtual Network on the internet basis formed by placing node servers throughout the Network. The CDN system can redirect the user request to the service node closest to the user in real time according to the network flow, the connection of each node, the load condition, the distance to the user, the response time and other comprehensive information, thereby quickly transmitting the website resources from the source station to the client, enabling the user to obtain the required content nearby and improving the access speed of the target resources. The content distribution network divides website content into static content and dynamic content through dynamic and static automatic separation. The static content can be the content displayed by pictures and the like, cannot be changed according to the difference of the permission, the type and the situation of a viewer, and cannot be changed within a long period of time. Dynamic content is the opposite of static content. Therefore, static content can be directly responded by the edge server in a distributed cache manner, and for dynamic content, a user needs to request corresponding resources from the source station through the CDN network and perform preloading.
A Dynamic Identification System (DIS) is a Dynamic access Identification System based on a content delivery network, and is deployed on a source-returning parent node of a CDN network to accelerate access to a target resource. The dynamic identification system receives a first request sent by a client forwarded by a node server, and the first request can be received through a system interface, wherein the node server can be a CDN network edge node, the first request carries a first keyword, the first keyword is used for the client to search resources through a first preset page, for example, a user inputs the first keyword in an input box through the client, a preset script embedded in a website page can generate a first request carrying the first keyword aiming at the first keyword, the first request is sent to the node server, and the dynamic identification system receives the first request forwarded by the node server. Optionally, the dynamic identification system receives a plurality of first requests forwarded by a plurality of node servers.
The first keyword is a pre-fetched keyword, that is, the first keyword is an original keyword actually displayed on the client, and may not be a keyword that the user really wants to input, for example, when the user wants to input the keyword "apple", but actually inputs the first keyword "flat fruit", and for example, the user wants to input the keyword "refrigerator", but actually inputs the first keyword "bingxiang".
And step S104, the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword.
In the technical solution provided in step S104 of the present invention, the dynamic identification system responds to the first request, and processes the first keyword according to a preset rule to obtain the second keyword.
After the dynamic identification system receives the first request forwarded by the node server, the dynamic identification system responds to the first request, processes the first keyword according to a preset rule, and can process the first keyword through a preset system in the dynamic identification system, so that the first keyword is verified and corrected. For example, the hotword matching system performs hotword matching on a first keyword according to a hotword matching rule, and the fuzzy matching system performs module matching on the first keyword according to a fuzzy matching rule, so that the first keyword is processed into a second keyword capable of searching a target resource, wherein the second keyword is a keyword which a user actually wants to input in order to obtain the target resource, and the target resource comprises a picture resource. For example, a dynamic identification system receives a first request carrying a first keyword "flat fruit" forwarded by a node server, the dynamic identification system responds to the first request and processes the first keyword "flat fruit" according to a preset rule to obtain a second keyword "apple", and the second keyword "apple" is a keyword actually desired to be input by a user through a client; for another example, the dynamic identification system receives a first request carrying a first keyword "bingxiang" forwarded by the node server, the dynamic identification system responds to the first request, and processes the first keyword "bingxiang" according to a preset rule to obtain a second keyword "refrigerator", which is a keyword actually desired to be input by the user through the client, so that the dynamic identification system checks and corrects the pre-fetched keyword, and the first keyword is prevented from being directly sent to the source station server to access the resource with the gap from the target resource.
And step S106, the dynamic identification system sends a second request carrying a second keyword to the source station server.
In the technical solution provided in step S106 of the present invention, the dynamic identification system sends a second request carrying a second keyword to the source station server, where the source station server is configured to respond to the second request and send the target resource to the client according to the second keyword, and the client is configured to preload the target resource.
And after the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword, the dynamic identification system generates a second request according to the second keyword and sends the second request to the source station server. And after receiving the second request, the source station server responds to the second request, and acquires a target resource according to a second keyword carried by the second request, wherein the target resource can be a dynamic page, that is, a response page obtained by responding to the second request by the source station server sends the target resource to the client, and the client preloads the target resource after receiving the target resource.
Optionally, the dynamic identification system receives the target resource sent by the source station, forwards the target resource to the client, and the client preloads the target resource after receiving the target resource, so as to improve the access speed of the target resource.
After receiving a search request for a target resource, a client can directly obtain the target resource from an edge node or a local node of the CDN, so that the loading time of the resource to be accessed by a user is shortened, the efficiency of target resource access is improved, and the user experience is further improved.
In the embodiment, a dynamic identification system receives a first request forwarded by a node server in a content distribution network, wherein the first request carries a first keyword used by a client for searching resources through a first preset page; the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword; the dynamic identification system sends a second request carrying a second keyword to the source station server, wherein the source station server is used for responding to the second request and sending a target resource to the client according to the second keyword, the client is used for preloading the target resource, and the dynamic identification system receives the first request forwarded by the node server, responds to the first request, processes the first keyword according to a preset rule to obtain the second keyword, sends the second keyword back to the source station server, and returns the target resource to be preloaded by the source station server, so that the problem that the difference between the pre-fetched resource and the resource required by a user is large due to the fact that the keyword is not processed is solved, the problem of low access speed of the target resource is solved, and the effect of improving the access speed of the target resource is achieved.
As an optional implementation manner, the first request is generated by a preset script added to a first preset page, and before the dynamic identification system receives the first request sent by the node server, the dynamic identification system receives a third request which is sent by the client and carries a second preset page, where the second preset page is a page which is used by the client for searching for a target resource and to which the preset script is not added; the dynamic identification system responds to the third request and judges whether the second preset page meets the preset rule or not; if the dynamic identification system judges that the second preset page accords with the preset rule, the preset script is added to the second preset page to obtain a first preset page; the dynamic identification system sends a first preset page to the client through the node server.
Optionally, the preset script can also analyze the resources embedded in the page, for example, the image resources embedded in the page are analyzed to obtain a Uniform Resource locator (Uniform Resource L oscillator, abbreviated as UR L) of the image resources, wherein the first preset page can be a website page, the preset script can be a javascript script (JS script), before the dynamic identification system receives the first request sent by the node server, the dynamic identification system receives a third request carrying a second preset page sent by the client, the third request is a page request initiated by the client, the second preset page is a page request used by the client for searching a target Resource and not added with the preset script, the HTM L page responded by the source station server can be determined through a domain name accessed by the client, the dynamic identification system responds to the third request, judges whether the second preset page script conforms to the preset page script used for searching the target Resource and does not add the preset page script to the preset source server, and judges whether the second page meets the preset event and the preset page, if the preset page is not met with the preset event, the preset page is obtained by the dynamic identification system, and the second page is obtained by adding the preset event to the preset page to the preset source server, and the preset page.
As an optional implementation manner, before the dynamic identification system adds the preset script to the second preset page to obtain the first preset page, the dynamic identification system receives a page chain which is sent by the source station server and meets the preset rule, wherein the page chain comprises the first preset page; and dynamically identifying a system memory page chain to a preset memory position.
Before the dynamic identification system adds the preset script to the second preset page to obtain the first preset page, establishing an adding rule for the page needing to be added with the preset script. And the dynamic identification system receives a page chain which is sent by the source station server and needs to be added with a preset script, wherein the page chain comprises the second preset page and is a page with a searching function. After the dynamic identification system receives the page chain, the page chain is stored to a preset storage position, for example, the page chain is stored to a system database as an adding rule of a page needing to be added with a preset script, so that the rule of adding the preset script to the page is established, the preset script is added to a second preset page, and the purpose of monitoring and capturing the event of the first keyword according to the preset script is achieved.
As an optional implementation manner, the dynamic recognition system responds to the first request, and processes the first keyword according to a preset rule to obtain the second keyword, including: and the dynamic identification system responds to the first request and processes the first keyword according to the keyword popularity and/or the fuzzy search rule to obtain a second keyword.
The first keyword carried by the first request may not be a keyword which is used for searching the target resource and is input by the user, and the dynamic identification system processes the first keyword according to a preset rule after receiving the first request forwarded by the node server to obtain a second keyword so as to verify and correct the first keyword. The preset rules comprise keyword popularity rules and fuzzy search rules. The keyword popularity rule can be a rule for processing the first keyword according to the number of times the keyword is searched, and the fuzzy search is a rule for automatically performing fuzzy search according to synonyms of the first keyword so as to obtain more search results. The dynamic identification system responds to the first request, processes the first keyword according to the keyword popularity and/or the fuzzy search rule to obtain the second keyword, so that the purpose that the dynamic identification system responds to the first request, processes the first keyword according to the preset rule to obtain the second keyword is achieved, the purpose of checking and correcting the first keyword is achieved, the situation that the difference between the pre-fetched resource and the resource required by the user is large is avoided, and the access efficiency of the target resource is improved.
As an optional implementation manner, after the dynamic identification system sends the second request carrying the second keyword to the source station server, the dynamic identification system forwards the source station server to the client to respond to the second request, and obtains the target resource according to the second keyword.
After the dynamic identification system sends a second request carrying a second keyword to the source station server, the source station server responds to the second request and sends the target resource to the dynamic identification system according to the second keyword, the dynamic identification system sends the target resource to the client, and the client preloads the target resource, so that the access speed of the target resource is increased.
The node server searches whether a target resource is cached after receiving the resource request, if the target resource is cached, the target resource is directly sent to the client, if the target resource is not cached or the cached target resource is overdue, the target resource is requested from the source station server, the source station server responds to the request to send the target resource to the client, and after the client acquires the target resource, the target resource is cached locally to wait for the next access to the target resource, so that the access speed of the target resource is improved.
Optionally, after the user clicks the search button through the client, the browser initiates a dynamic request to the source station server through the CDN network to obtain a response page generated by the source station server, and the browser parses the response page and loads the target resource, and if the target resource is already stored locally, the target resource is directly loaded, so that the access speed to the target resource is increased; otherwise, the resources are requested and loaded through the CDN network until the page rendering is finished, so that the access efficiency of the target resources is improved.
The embodiment of the invention also provides an access method of the target resource from the client side.
FIG. 2 is a flow chart of another method for accessing a target resource according to an embodiment of the invention. As shown in fig. 2, the access method of the target resource includes the following steps:
step S202, in the content distribution network, the client is used for obtaining a first keyword for searching resources through a first preset page.
In the technical solution provided by step S202 of the present invention, in the content distribution network, the client is configured to obtain a first keyword for searching for a resource through a first preset page.
The CDN system can redirect the user's request to the service node closest to the user in real time according to the network flow and the comprehensive information such as the connection of each node, the load condition, the distance to the user, the response time and the like, thereby quickly transmitting the website resources from a source station to a client, enabling the user to obtain the required content nearby and improving the access speed to the target resources. The content distribution network divides website content into static content and dynamic content through dynamic and static automatic separation. The static content can be directly responded by the edge server in a distributed cache mode, and for the dynamic content, a user needs to request corresponding resources from the source station through a CDN (content delivery network) and perform preloading.
The client is used for acquiring a first keyword for searching resources through a first preset page, for example, a user inputs the first keyword in an input box through the client, a preset script embedded in a website page generates a first request carrying the first keyword aiming at the first keyword, and the first request is sent to the node server. The client may be a browser.
The first keyword is a pre-fetched keyword, that is, the first keyword is an original keyword actually displayed on the client, and may not be a keyword that the user really wants to input, for example, when the user wants to input the keyword "apple", but actually inputs the first keyword "flat fruit", and for example, the user wants to input the keyword "refrigerator", but actually inputs the first keyword "bingxiang".
Step S204, the client is used for sending a first request carrying a first keyword to the dynamic identification system through the node server.
In the technical solution provided in step S204 of the present invention, the client is configured to send a first request carrying a first keyword to the dynamic identification system through the node server.
The dynamic access identification system is based on a content delivery network, is deployed on a source returning father node of the CDN, and is used for accelerating the access of target resources. After the client is used for acquiring a first keyword for searching resources through a first preset page, the client generates a first request according to the first keyword and sends the first request to a dynamic identification system through a node server, and the dynamic identification system can receive the first keyword through a system interface. Alternatively, the node server may be a CDN network edge node.
The dynamic identification system responds to the first request, processes the first keyword according to a preset rule, and can process the first keyword through a preset system in the dynamic identification system, so that the first keyword is verified and corrected. For example, the hotword matching system performs hotword matching on a first keyword according to a hotword matching rule, and the fuzzy matching system performs module matching on the first keyword according to a fuzzy matching rule, so that the first keyword is processed into a second keyword capable of searching a target resource, and the second keyword is a keyword which a user actually wants to input in order to obtain the target resource, so that the pre-fetched keyword is verified and corrected by the dynamic identification system, and the condition that the first keyword is directly sent to the source station server to access a resource with a gap with the target resource is avoided.
And step S206, the client receives the target resource sent by the source station server according to the second keyword by responding to the second request.
In the technical solution provided in step S206 of the present invention, the client receives the target resource sent by the source station server by responding to the second request and according to the second keyword, where the second request carries the second keyword obtained by the dynamic identification system by responding to the first request and processing the first keyword according to the preset rule.
After the client is used for sending a first request carrying a first keyword to the dynamic identification system through the node server, the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword, and then the dynamic identification system generates a second request according to the second keyword and sends the second request to the source station server. After receiving the second request, the source station server responds to the second request, and obtains a target resource according to a second keyword carried in the second request, where the target resource may be a dynamic page, that is, a response page obtained by the source station server responding to the second request, and the client receives the target resource sent by the source station server according to the second keyword by responding to the second request.
Step S208, the client pre-loads the target resource.
In the technical solution provided by step S208 of the present invention, the client pre-loads the target resource.
And after the client receives the target resource sent by the source station server by responding to the second request and according to the second keyword, the client pre-loads the target resource. The client receives the search operation submitted by the user, and can acquire the target resource from the edge node or the local of the CDN, so that the loading time of the target resource required by the user is shortened, the access speed of the target resource is increased, and the user experience is finally improved.
In the embodiment, in a content distribution network, a client is used for acquiring a first keyword for accessing resources through a first preset page; the client is used for sending a first request carrying a first keyword to the dynamic identification system through the node server; the client receives a target resource sent by the source station server through responding to a second request and according to a second keyword, wherein the second request carries the second keyword obtained by responding to the first request through the dynamic identification system and processing the first keyword according to a preset rule; the client pre-loads the target resource, the dynamic identification system receives the first request forwarded by the node server, responds to the first request, processes the first keyword according to a preset rule to obtain a second keyword, sends the second keyword back to the source station server, and the source station server returns the target resource for pre-loading, so that the problem that the difference between the pre-fetched resource and the resource required by the user is large due to the fact that the keyword is not processed is solved, the problem of low access speed of the target resource is solved, and the effect of improving the access speed of the target resource is achieved.
As an optional implementation manner, the first request is generated by a preset script added by a first preset page, and before the client is used for sending the first request carrying the first keyword to the dynamic identification system through the node server, the client sends a third request carrying a second preset page to the dynamic identification system, wherein the second preset page is a page which is used for searching the target resource and is not added with the preset script by the client; and the client receives a first preset page which is sent by the dynamic identification system and obtained by responding to the third request and adding a preset script to the second preset page under the condition that the second preset page accords with a preset rule.
The method comprises the steps of acquiring a first preset page script, acquiring a second preset page script, acquiring a third request carrying a second preset page, wherein the first preset page script can be a website page, and the preset script can be a JS script, sending a third request carrying the second preset page to a dynamic identification system by a client before the client is used for sending the first request carrying the first keyword to the dynamic identification system through a node server, the third request is a page request initiated by the client, the second preset page is a page which is used for searching a target resource and is not added with the preset script by the client, for example, an HTM L page responded by a source station server can be determined through a domain name accessed by the client, responding to the third request, judging whether the second preset page script accords with a preset rule or not, and acquiring a rule that the second preset page script is required to be added with the preset script and does not accord with the preset script and the effective time of the dynamic identification system, and acquiring a preset page script when the second preset page script accords with the preset page script, and the first preset page script does not accord with the preset page script, and the preset page script is not acquired by the first preset page.
As an optional implementation manner, the sending, by the client, the first request carrying the first keyword to the dynamic recognition system through the node server includes: the client is used for monitoring the key words through a preset script; under the condition that the client monitors the first keyword, the client generates a first request according to the first keyword; the client is used for sending a first request to the dynamic identification system through the node server.
And monitoring the keywords input by the user by embedding a preset script in a first preset page of the client. The client is used for monitoring the keywords through a preset script, and under the condition that the client monitors the first keywords, the client generates a first request according to the first keywords, wherein the first request carries the first keywords. The client is used for sending the first request to the dynamic identification system through the node server.
As an optional implementation manner, the target resource is a target resource in a response page obtained by the source station server in response to the second request, and the preloading of the target resource by the client includes: the client is used for acquiring a response page through a preset script; the client analyzes the response page to obtain a uniform resource locator of the target resource; the client judges whether a uniform resource locator is cached or not; and if the client judges that the uniform resource locator of the target resource is cached, the client preloads the target resource.
The source station server is used for obtaining a response page which can be an HTM L page, the client is used for obtaining the response page through a preset script and analyzing the response page to obtain a UR L address of the target resource, for example, analyzing the picture resource to obtain a UR L address of the picture resource, and the target resource corresponding to the uniform resource locator is preloaded under the condition that the client judges that the uniform resource locator of the target resource is cached, so that the access speed of the target resource is improved.
As an optional implementation manner, after the client determines whether the uniform resource locator of the target resource is cached, if the client determines that the uniform resource locator is not cached, the client sends a fourth request to the node server according to the uniform resource locator, where the fourth request is used for requesting the node server to acquire the target resource; the client receives the fourth request responded by the node server, and sends the target resource under the condition that the target resource is cached in the node server; or under the condition that the node server responds to the fourth request and the node server does not cache the target resource, the client receives the target resource sent by the node server through the source station server responding to the fifth request, wherein the fifth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource.
And under the condition that the client does not cache the uniform resource locator of the target resource, the client generates a fourth request according to the uniform resource locator, and requests the node server to acquire the target resource through the fourth request. And after the node server receives the fourth request, the node server responds to the fourth request, if the node server caches the target resource, the client receives the target resource sent by the node server in response to the fourth request, and the client caches the acquired resource locally.
Optionally, the node server responds to the fourth request, if the node server does not cache the target resource, the node server requests the source station to acquire the target resource, the fifth request may be sent to the source station server through the node server, the source station responds to the fifth request, acquires the target resource and sends the target resource to the client, and the client is configured to receive the target resource through the node server and preload the target resource after receiving the target resource, so that the speed of accessing the target resource is increased.
As an optional implementation manner, the receiving, by the client, the fourth request by the node server, and the target resource sent in the case that the node server caches the target resource includes: and under the condition that the node server responds to the fourth request, and the node server caches the target resource and the target resource is expired, the client receives the target resource sent by the node server through the source station server in response to the sixth request, wherein the sixth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource.
The node server responds to the fourth request, if the server caches the target resource, but the target resource is expired and is an invalid resource, the node server sends a sixth request to the source station server to request the source station server to acquire the target resource, the source station server sends the target resource according to the sixth request, and the client is used for receiving the target resource through the source station server, preloading the target resource and caching the requested resource locally.
Optionally, after the user inputs a keyword through the client and clicks the search button, the client initiates a dynamic request to the source station server through the CDN network, and obtains a response page generated by the source station server in response to the dynamic request. The client analyzes the response page and loads the target resource, and if the target resource is cached locally, the target resource is directly loaded; otherwise, the target resource is continuously requested and loaded through the CDN network until the page rendering is finished, so that the efficiency of accessing the page is improved.
The technical solution of the present invention will be described below with reference to preferred embodiments.
The embodiment of the invention is a network architecture based on a content distribution network, aims to solve the problem that the waiting time for loading resources is long when a user searches through keywords, and improves the user experience and indirectly improves the website income by reducing the loading time for the user to wait for pages. The embodiment of the invention mainly improves the existing CDN dynamic acceleration network from the following two aspects:
the JS script is embedded in the website page to realize event monitoring and capturing of the keywords input by the user in the browser.
And constructing a dynamic identification system in the CDN, wherein the dynamic identification system is based on a content delivery network, the dynamic identification system can process the keywords captured by the script according to a certain processing rule, the processed keywords are sent to a source station server, the source station server sends target resources according to the processed keywords, and the client receives the target resources and preloads the target resources. The system can intelligently analyze target resources in a user page through the script, for example, elements such as static pictures and the like are analyzed, the target resources are pre-fetched before the user accesses the page, and the loading time of the user accessing a website is shortened through the pre-loading of the client to the target resources.
FIG. 3 is a schematic diagram of a target resource access system according to an embodiment of the invention. As shown in fig. 3, the target resource access system includes: the system comprises a source station server, a dynamic identification system, a node server and a client.
After the JS script is added to the page, when a client accesses the webpage, event monitoring and capturing of key words input by a user in a browser are realized through the JS script embedded in the page.
The dynamic identification system is deployed on a source returning father node of the CDN, can receive a request of a CDN edge node, and returns a source request to a source station server to obtain a target resource. After receiving a request sent by a CDN network edge node, the dynamic identification system processes a keyword carried by the request sent by the CDN network edge node according to a keyword popularity rule and/or a fuzzy search rule, and sends the request carrying the processed keyword to a source station server.
The client receives the target resource returned by the source station server, and the client may include a plurality of clients, such as client a and client B. The client preloads the target resource. After a user submits a search request through a client, a target resource can be directly obtained from an edge node or the local of the CDN, optionally, the target resource is a picture resource, so that the loading time required for accessing the target resource is shortened, the efficiency of request response is improved, and the user experience is finally improved.
FIG. 4 is a flow diagram of another method for accessing a target resource in accordance with an embodiment of the present invention. As shown in fig. 4, the access method of the target resource includes the following steps:
in step S401, the client receives a keyword.
The user initiates a page request through the client, the dynamic identification system embeds the JS script into an HTM L page responded by the source station and then issues the JS script to the edge node server, and the edge node server sends the HTM L page embedded with the JS script to the client.
And step S402, the client is used for monitoring the keyword through the JS script and sending a request carrying the keyword to the dynamic identification system.
After the client receives the HTM L page embedded with the JS script, the JS script monitors the input box in real time, when the user inputs the keyword through the input box, the JS script captures the content of the keyword input by the user, and a request carrying the keyword is sent to the dynamic identification system through an edge node server of the CDN.
Step S403, the dynamic identification system processes the keywords carried by the request and sends the processed keywords to the source station server, and the source station server sends the response page to the client according to the processed keywords.
The dynamic identification system receives keywords forwarded by the edge node server, re-generates source return keywords through real-time heat matching and fuzzy matching rules, sends a request carrying the source return keywords to the source station server, the source station server receives the request carrying the source return keywords and sends a response page to the client, and the source station server can send the response page through the dynamic identification system.
Step S404, the client is used to parse UR L of the resource in the response page through the script.
After receiving the response page, the client may parse the UR L of the resource in the response page through the script, and may parse the UR L of the corresponding picture resource in the HTM L page.
In step S405, the client receives an instruction for searching for a keyword.
After the client receives the keyword, a search instruction for searching the keyword is received through the input box.
Step S406, the client performs a dynamic request, and sends a source return request to the source station server through the CDN network.
And the client side carries out dynamic request according to the search instruction and sends a source return request to the source station server through the CDN.
Step S407, the source station server generates a response page according to the back-to-source request, and sends the response page to the client through the CDN network.
In step S408, the client parses the UR L of the response page.
In step S409, the client determines whether or not to cache UR L.
After step S404 and step S408, the client determines whether to cache UR L, if the client determines that UR L is cached, step S412 is performed, and if the client determines that UR L is not cached, step S410 is performed.
Step S410, the client sends a request for obtaining the target resource to the CDN network node server.
And if the client does not have the UR L cache, sending a request for obtaining the target resource to an edge node server of the CDN network.
Step S411, the network node server directly responds to the resource or requests the target resource back according to the caching condition of the target resource.
The network node server searches whether the target resource is cached in the network node server. If the node server caches the target resource, the target resource is directly sent to the client; and if the network node server does not cache the target resource, sending a request for acquiring the target resource to the source station server, and responding to the request by the source station server to send the target resource to the client.
Step S412, the client loads the target resource.
The client analyzes, loads and renders the received target resource, so that the access speed of the target resource is improved.
As for the above-mentioned steps S405 to S408, which are processes of dynamic response after the client receives the keyword, steps S402 to S404 are processes of static response after the client receives the keyword. Steps S405 to S408 may be performed after steps S402 to S404.
FIG. 5 is a diagram illustrating a process of a dynamic access recognition system according to an embodiment of the present invention. As shown in fig. 5, the dynamic identification system is deployed on a source return father node of the CDN network, has an independent database, and can perform logical judgment and operation by a page for a request of an edge node server and a response of a source station server. And the source station server sends the page chain to which the JS script needs to be added to the dynamic identification system as a pre-stored addition rule. When a JS script is added to a page of a client through a system interface of a dynamic identification system, the client is used for capturing a keyword through the JS script and forwarding the keyword to the system interface of the dynamic identification system through an edge node of a CDN network, the dynamic identification system processes the keyword, the keyword can be processed according to a hot word matching rule according to a hot word matching system, the keyword can be processed according to a fuzzy matching rule through the fuzzy matching system to obtain the processed keyword, a request carrying the processed keyword is sent to a source station, the source station responds to the request carrying the processed keyword, and a response page is sent to the client.
FIG. 6 is a flow chart of another method for accessing a target resource according to an embodiment of the invention. As shown in fig. 6, the access method of the target resource includes the following steps:
in step S601, the client acquires the page W to which the script is added.
When a user A accesses a page W with a search frame in a domain name X, a dynamic identification system adds a script into the page W and sends the page W with the script added to the user according to rules negotiated with a source station (the source station gives a series of page chains with a search function, and the dynamic identification system stores the rules into a system database of the dynamic identification system), and when the dynamic identification system finds that the page W accords with the addition rules, the client receives the page W with the script added.
In step S602, the client receives a first keyword input by the user through the input box.
The user a may input a first keyword "flat fruit" in the search box, the client receives the first keyword "flat fruit", the first keyword "flat fruit" is not a keyword that the user a wants to input, and the resource loaded by the first keyword "flat fruit" is not a target resource that the user really wants to obtain.
Step S603, capturing the first keyword by the script of the page of the client and sending the first keyword to the dynamic identification system.
Capturing a first keyword by a script of a page of a client, when capturing the first keyword 'pingguo' input by a user, sending a request carrying the first keyword 'pingguo' to an edge node of the CDN, identifying the request carrying the first keyword 'pingguo' as a pre-query request by the edge node of the CDN, and sending the request to a dynamic identification system
Step S604, the dynamic identification system processes the keyword to obtain a second keyword.
The dynamic identification system processes the keywords in the received request, and the keywords can be processed by a hot word matching system and a fuzzy matching system to obtain a second keyword, for example, the first keyword "flat fruit" is corrected to be the second keyword "apple", the second keyword "apple" is the keyword that the user wants to input, and the target resource that the user really wants to obtain is loaded through the second keyword "apple".
Step S605, the dynamic identification system sends the second keyword to the source station server.
After the dynamic identification system processes the keywords to obtain second keywords, the dynamic identification system sends the second keywords to the source station server, and the dynamic identification system can send a dynamic request carrying the second keywords "apple" to the source station server.
Step S606, the source station server sends the page Y to the client according to the second keyword.
And the source station server receives the dynamic request, generates a dynamic page Y according to the second keyword, and sends the page Y to the dynamic identification system.
In step S607, the client is configured to perform resource pre-fetching on UR L of page Y through the script.
After the source station server sends the page Y to the client according to the second keyword, the client is configured to perform resource pre-fetching on the UR L of the page Y through the script, for example, the JS script analyzes the intra-page embedded picture resource to obtain the UR L address of the picture resource.
In step S608, the client receives a search instruction for the user to search for the first keyword through the search button.
After the client receives the first keyword input by the user through the input box. The client receives a search instruction of a user for searching the first keyword through a search button.
Step S609, the client acquires the page Z sent by the source station server according to the search instruction.
After the user a clicks the search button, the client initiates a dynamic request to the source station server through the CDN network according to the search instruction, and obtains a page Z generated by the source station in response to the dynamic request.
In step S610, the client determines whether the target resource is cached locally.
After step S607 and step SS609, the client determines whether the target resource in page Y or page Z is already cached locally. If the target resource is cached locally, step S611 is performed, and if the target resource is not cached locally, step S611 is performed. If the target resource is not cached locally, the client is configured to initiate a resource request through an edge node of the CDN network, so as to request the node server to obtain the target resource, and if the node server is cached in the target resource, perform step S611. Or under the condition that the node server does not cache the target resource, or under the condition that the node server caches the target resource but the target resource is expired, the node server requests the source station to acquire the target resource, the source station server sends the target resource to the client, and the client caches the requested target resource locally.
Step S611, the client loads and renders the target resource.
And under the condition that the client receives the target resource, the client loads and renders the target resource. Otherwise, the client is used for requesting and loading the target resource through the CDN network until the page rendering is finished, so that the access speed of the target resource is increased.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the invention also provides a schematic diagram of the target resource access device. It should be noted that the access device of the target resource of this embodiment may be used to execute the access method of the target resource shown in fig. 1.
Fig. 7 is a flowchart of an access device of a target resource according to an embodiment of the present invention. As shown in fig. 7, the access device of the target resource may include: a receiving unit 10, a processing unit 20 and a transmitting unit 30.
The receiving unit 10 is configured to, in a content distribution network, enable a dynamic identification system to receive a first request forwarded by a node server, where the first request carries a first keyword used by a client to access a resource through a first preset page.
The processing unit 20 is configured to enable the dynamic identification system to respond to the first request, and process the first keyword according to a preset rule to obtain a second keyword.
And a sending unit 30, configured to enable the dynamic identification system to send a second request carrying a second keyword to the source station server, where the source station server is configured to respond to the second request and send the target resource to the client according to the second keyword, and the client is configured to preload the target resource.
Optionally, the first request is generated through a preset script added by a first preset page, and the apparatus for accessing a target resource further includes: the device comprises a first sending unit, a judging unit, an adding unit and a second sending unit. The first sending unit is used for enabling the dynamic identification system to receive a third request which is sent by a client and carries a second preset page before the dynamic identification system receives the first request sent by the node server, wherein the second preset page is a page which is used by the client for accessing a target resource and is not added with a preset script; the judging unit is used for enabling the dynamic identification system to respond to the third request and judging whether the second preset page meets the preset rule or not; the adding unit is used for adding the preset script to the second preset page to obtain a first preset page if the dynamic identification system judges that the second preset page accords with the preset rule; and the second sending unit is used for enabling the dynamic identification system to send the first preset page to the client through the node server.
Optionally, the apparatus for accessing a target resource further includes: a first receiving unit and a storage unit. The first receiving unit is used for enabling the dynamic identification system to receive a page chain which is sent by a source station server and accords with a preset rule before the dynamic identification system adds a preset script to a second preset page to obtain a first preset page, wherein the page chain comprises the first preset page; and the storage unit is used for enabling the dynamic identification system to store the page chain to a preset storage position.
Optionally, the processing unit 20 is configured to enable the dynamic recognition system to respond to the first request, and process the first keyword according to the keyword popularity and/or the fuzzy access rule to obtain the second keyword.
Optionally, the apparatus for accessing a target resource further includes: and the forwarding unit is used for enabling the dynamic identification system to forward the source station server to the client to respond to the second request after the dynamic identification system sends the second request carrying the second keyword to the source station server, and obtaining the target resource according to the second keyword.
In the embodiment, a receiving unit 10 enables a dynamic identification system to receive a first request forwarded by a node server in a content distribution network, wherein the first request carries a first keyword used by a client to access a resource through a first preset page, the processing unit 20 enables the dynamic identification system to respond to the first request and process the first keyword according to a preset rule to obtain a second keyword, the sending unit 30 enables the dynamic identification system to send a second request carrying the second keyword to a source station server, wherein the source station server is used for responding to the second request and sending a target resource to the client according to the second keyword, the client is used for preloading the target resource, and since the dynamic identification system receives the first request forwarded by the node server, responds to the first request and processes the first keyword according to the preset rule, the second keyword is obtained and sent back to the source station server, and the source station server returns the target resource for preloading, so that the problem that the difference between the pre-fetched resource and the resource required by the user is large due to the fact that the keyword is not processed is avoided, the problem that the access speed of the target resource is low is solved, and the effect of improving the access speed of the target resource is achieved.
The embodiment of the invention also provides a schematic diagram of the target resource access device. It should be noted that the access device of the target resource of this embodiment may be used to execute the access method of the target resource shown in fig. 2.
Fig. 8 is a flowchart of another apparatus for accessing a target resource according to an embodiment of the present invention. As shown in fig. 8, the access device for the target resource includes: an acquisition unit 40, a sending unit 50, a receiving unit 60 and a preloading unit 70.
An obtaining unit 40, configured to enable the client to obtain, in the content distribution network, a first keyword for accessing the resource through a first preset page.
And the sending unit 50 is used for sending a first request carrying the first keyword to the dynamic identification system by the client through the node server.
And the receiving unit 60 is configured to receive the target resource sent by the source station server by responding to a second request and according to a second keyword, where the second request carries the second keyword obtained by the dynamic identification system by responding to the first request and processing the first keyword according to a preset rule.
And the preloading unit 70 is used for preloading the target resource by the client.
Optionally, the first request is generated through a preset script added by a first preset page, and the apparatus for accessing a target resource further includes: a first transmitting unit and a first receiving unit. The first sending unit is used for enabling the client to send a third request carrying a second preset page to the dynamic identification system before the client is used for sending the first request carrying the first keyword to the dynamic identification system through the node server, wherein the second preset page is a page which is used for accessing the target resource and is not added with the preset script. And the client receives a first preset page which is sent by the dynamic identification system and obtained by responding to the third request and adding a preset script to the second preset page under the condition that the second preset page accords with a preset rule.
Optionally, the sending unit 50 includes a listening module, a generating module and a first sending module. The monitoring module client is used for monitoring a first keyword through a preset script; the generating module is used for enabling the client to generate a first request according to the first keyword after the client monitors the first keyword; and the client is used for sending a first request to the dynamic identification system through the node server.
Optionally, the target resource is a target resource in a response page obtained by the source station server in response to the second request, and the preloading unit 70 includes: the device comprises an acquisition module, an analysis module, a judgment module and a preloading module. The acquisition module client is used for acquiring a response page through a preset script; the analysis module client analyzes the response page to obtain a uniform resource locator of the target resource; the judging module client judges whether a uniform resource locator is cached or not; and when the client of the preloading module judges that the uniform resource locator of the target resource is cached, the client preloads the target resource.
Optionally, the apparatus for accessing a target resource further includes: the second sending unit is used for sending a fourth request to the node server according to the uniform resource locator if the client judges that the uniform resource locator of the target resource is not cached after the client judges that the uniform resource locator of the target resource is cached or not, wherein the fourth request is used for requesting the node server to acquire the target resource; the client receives the fourth request responded by the node server, and the target resource is sent under the condition that the target resource is cached in the node server; or under the condition that the node server responds to the fourth request and the node server does not cache the target resource, the client receives a fifth request responded by the source station server and the target resource sent by the node server, wherein the fifth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource; the preloading unit 70 client preloads the target resource.
The second receiving unit includes: and under the condition that the node server responds to the fourth request, and the node server caches the target resource and the target resource is expired, the client receives the target resource sent by the node server through the source station server in response to the sixth request, wherein the sixth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource.
In the embodiment, the obtaining unit 40 enables the client to obtain a first keyword for accessing the resource through a first preset page in the content distribution network, the sending unit 50 enables the client to send a first request carrying the first keyword to the dynamic identification system through the node server, the receiving unit 60 enables the client to receive a target resource sent by the source station server through responding to a second request and sending the target resource according to the second keyword, wherein the second request carries the second keyword obtained by the dynamic identification system through responding to the first request and processing the first keyword according to a preset rule, the preloading unit 70 enables the client to preload the target resource, and the dynamic identification system receives the first request forwarded by the node server, responds to the first request and processes the first keyword according to the preset rule to obtain the second keyword, and the resource is sent back to the source station server, and the target resource is returned by the source station server for preloading, so that the problem that the difference between the pre-fetched resource and the resource required by the user is larger because no keyword is processed is avoided, the problem of low access speed of the target resource is solved, and the effect of improving the access speed of the target resource is further achieved.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method for accessing a target resource, comprising:
in a content distribution network, a dynamic identification system receives a first request forwarded by a node server, wherein the first request carries a first keyword used by a client for accessing a resource through a first preset page;
the dynamic identification system responds to the first request and processes the first keyword according to a preset rule to obtain a second keyword; the preset rules comprise keyword popularity rules and fuzzy search rules;
the dynamic identification system sends a second request carrying the second keyword to a source station server, wherein the source station server is used for responding to the second request and sending the target resource to the client according to the second keyword, and the client is used for preloading the target resource; the target resource is embedded in a response page, the client analyzes the response page to obtain an address of a uniform resource locator of the target resource, and the target resource corresponding to the uniform resource locator is preloaded when the client judges that the uniform resource locator of the target resource is cached;
the first request is generated through a preset script added to the first preset page, and before the dynamic identification system receives the first request sent by the node server, the method further includes:
the dynamic identification system receives a third request which is sent by the client and carries a second preset page, wherein the second preset page is a page which is used by the client for accessing the target resource and is not added with the preset script;
the dynamic identification system responds to the third request and judges whether the second preset page meets a preset rule or not;
if the dynamic identification system judges that the second preset page accords with the preset rule, the preset script is added to the second preset page to obtain the first preset page;
and the dynamic identification system sends the first preset page to the client through the node server.
2. The method of claim 1, wherein before the dynamic recognition system adds the preset script to the second preset page to obtain the first preset page, the method further comprises:
the dynamic identification system receives a page chain which is sent by the source station server and accords with the preset rule, wherein the page chain comprises the first preset page;
and the dynamic identification system stores the page chain to a preset storage position.
3. The method of claim 1, wherein the step of the dynamic recognition system responding to the first request and processing the first keyword according to the preset rule to obtain the second keyword comprises: and the dynamic identification system responds to the first request and processes the first keyword according to the keyword popularity and/or the fuzzy access rule to obtain the second keyword.
4. The method of claim 1, wherein after the dynamic recognition system sends a second request carrying the second keyword to a source server, the method further comprises: and the dynamic identification system forwards the source station server to the client to respond to the second request, and obtains the target resource according to the second keyword.
5. A method for accessing a target resource, comprising:
in a content distribution network, a client is used for acquiring a first keyword for accessing resources through a first preset page;
the client is used for sending a first request carrying the first keyword to a dynamic identification system through a node server;
the client receives a target resource sent by a source station server by responding to a second request and according to a second keyword, wherein the second request carries the second keyword obtained by the dynamic identification system by responding to the first request and processing the first keyword according to a preset rule; the preset rules comprise keyword popularity rules and fuzzy search rules;
the client pre-loads the target resource; the target resource is embedded in a response page, the client analyzes the response page to obtain an address of a uniform resource locator of the target resource, and the target resource corresponding to the uniform resource locator is preloaded when the client judges that the uniform resource locator of the target resource is cached;
the first request is generated through a preset script added to the first preset page, and before the client is used for sending the first request carrying the first keyword to the dynamic identification system through the node server, the method further includes:
the client sends a third request carrying a second preset page to the dynamic identification system, wherein the second preset page is a page which is used for accessing the target resource and is not added with the preset script by the client;
and the client receives the third request sent by the dynamic identification system through response, and adds the preset script to the second preset page to obtain the first preset page under the condition that the second preset page accords with a preset rule.
6. The method of claim 5, wherein the client being configured to send the first request carrying the first keyword to the dynamic recognition system via the node server comprises:
the client is used for monitoring key words through the preset script;
under the condition that the client monitors the first keyword, the client generates the first request according to the first keyword;
the client is used for sending the first request to the dynamic identification system through the node server.
7. The method of claim 5, wherein the target resource is a target resource in a response page obtained by the source station server in response to the second request, and wherein the preloading of the target resource by the client comprises:
the client is used for acquiring the response page through the preset script;
the client analyzes the response page to obtain a uniform resource locator of the target resource;
the client judges whether the uniform resource locator is cached or not;
and if the client judges that the uniform resource locator of the target resource is cached, the client preloads the target resource.
8. The method of claim 7, wherein after the client determines whether the uniform resource locator of the target resource is cached, the method further comprises:
if the client judges that the uniform resource locator is not cached, a fourth request is sent to the node server according to the uniform resource locator, wherein the fourth request is used for requesting the node server to acquire the target resource;
the client receives the fourth request responded by the node server, and sends the target resource under the condition that the target resource is cached in the node server; or
And under the condition that the node server responds to the fourth request and the node server does not cache the target resource, the client receives a fifth request responded by the source station server and the target resource sent by the node server, wherein the fifth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource.
9. The method of claim 8, wherein the client receiving the target resource sent by the node server in response to the fourth request and in the case that the node server caches the target resource comprises:
and when the node server responds to the fourth request and the node server caches the target resource and the target resource is expired, the client receives a sixth request responded by the source station server and the target resource sent by the node server, wherein the sixth request is sent to the source station server by the node server and is used for requesting the source station server to acquire the target resource.
10. An apparatus for accessing a target resource, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for enabling a dynamic identification system to receive a first request forwarded by a node server in a content distribution network, and the first request carries a first keyword used by a client for accessing resources through a first preset page;
the processing unit is used for enabling the dynamic identification system to respond to the first request and processing the first keyword according to a preset rule to obtain a second keyword; the preset rules comprise keyword popularity rules and fuzzy search rules;
a sending unit, configured to enable the dynamic identification system to send a second request carrying the second keyword to a source station server, where the source station server is configured to respond to the second request and send the target resource to the client according to the second keyword, and the client is configured to preload the target resource; the target resource is embedded in a response page, the client analyzes the response page to obtain an address of a uniform resource locator of the target resource, and the target resource corresponding to the uniform resource locator is preloaded when the client judges that the uniform resource locator of the target resource is cached;
the first request is generated through a preset script added by a first preset page, and the device for accessing the target resource further comprises: the dynamic identification system comprises a first sending unit, a judging unit, an adding unit and a second sending unit, wherein the first sending unit is used for enabling the dynamic identification system to receive a third request which is sent by a client and carries a second preset page before the dynamic identification system receives a first request sent by a node server, and the second preset page is a page which is used for accessing a target resource by the client and is not added with a preset script; the judging unit is used for enabling the dynamic identification system to respond to the third request and judging whether the second preset page meets the preset rule or not; the adding unit is used for adding the preset script to the second preset page to obtain a first preset page if the dynamic identification system judges that the second preset page accords with the preset rule; and the second sending unit is used for enabling the dynamic identification system to send the first preset page to the client through the node server.
11. An apparatus for accessing a target resource, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for enabling a client to acquire a first keyword for accessing resources through a first preset page in a content distribution network;
a sending unit, configured to enable the client to send a first request carrying the first keyword to a dynamic identification system through a node server;
a receiving unit, configured to enable the client to receive a target resource sent by a source station server according to a second keyword by responding to a second request, where the second request carries the second keyword obtained by the dynamic identification system by responding to the first request and processing the first keyword according to a preset rule; the preset rules comprise keyword popularity rules and fuzzy search rules;
a preloading unit, configured to enable the client to preload the target resource; the target resource is embedded in a response page, the client analyzes the response page to obtain an address of a uniform resource locator of the target resource, and the target resource corresponding to the uniform resource locator is preloaded when the client judges that the uniform resource locator of the target resource is cached;
the first request is generated through a preset script added by a first preset page, and the device for accessing the target resource further comprises: the dynamic identification system comprises a first sending unit, a judging unit, an adding unit and a second sending unit, wherein the first sending unit is used for enabling the dynamic identification system to receive a third request which is sent by a client and carries a second preset page before the dynamic identification system receives a first request sent by a node server, and the second preset page is a page which is used for accessing a target resource by the client and is not added with a preset script; the judging unit is used for enabling the dynamic identification system to respond to the third request and judging whether the second preset page meets the preset rule or not; the adding unit is used for adding the preset script to the second preset page to obtain a first preset page if the dynamic identification system judges that the second preset page accords with the preset rule; and the second sending unit is used for enabling the dynamic identification system to send the first preset page to the client through the node server.
CN201611253258.8A 2016-12-29 2016-12-29 Target resource access method and device Expired - Fee Related CN106850572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611253258.8A CN106850572B (en) 2016-12-29 2016-12-29 Target resource access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611253258.8A CN106850572B (en) 2016-12-29 2016-12-29 Target resource access method and device

Publications (2)

Publication Number Publication Date
CN106850572A CN106850572A (en) 2017-06-13
CN106850572B true CN106850572B (en) 2020-07-21

Family

ID=59113839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611253258.8A Expired - Fee Related CN106850572B (en) 2016-12-29 2016-12-29 Target resource access method and device

Country Status (1)

Country Link
CN (1) CN106850572B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667916B (en) * 2018-04-24 2021-08-13 百度在线网络技术(北京)有限公司 Data access method and system for Web application
CN111182330B (en) * 2019-08-15 2021-11-09 腾讯科技(深圳)有限公司 Video playing method and device
CN112104571B (en) * 2020-09-14 2023-05-12 武汉悦学帮网络技术有限公司 Service distribution method, device, computer equipment and computer storage medium
CN114640717A (en) * 2020-12-16 2022-06-17 北京金山云网络技术有限公司 CDN dynamic acceleration method and device and CDN edge node
CN114629919A (en) * 2022-03-31 2022-06-14 北京百度网讯科技有限公司 Resource acquisition method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102211A (en) * 2007-07-09 2008-01-09 中兴通讯股份有限公司 A method for sharing the document in data conference and its system
CN103297472A (en) * 2012-03-01 2013-09-11 上海盛霄云计算技术有限公司 Redirection method and content distribution node applied to content distribution network
CN103425687A (en) * 2012-05-21 2013-12-04 阿里巴巴集团控股有限公司 Retrieval method and system based on queries

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154231B (en) * 2007-07-09 2011-06-29 孟智平 Method and system for applying web page semantics
CN102546774A (en) * 2011-12-27 2012-07-04 厦门市美亚柏科信息股份有限公司 CDN (content distribution network) routing method for secondary redirection and system
CN103927329B (en) * 2014-03-19 2017-03-29 北京奇虎科技有限公司 A kind of instant search method and system
CN104268157A (en) * 2014-09-03 2015-01-07 乐视网信息技术(北京)股份有限公司 Device and method for error correction in data search

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102211A (en) * 2007-07-09 2008-01-09 中兴通讯股份有限公司 A method for sharing the document in data conference and its system
CN103297472A (en) * 2012-03-01 2013-09-11 上海盛霄云计算技术有限公司 Redirection method and content distribution node applied to content distribution network
CN103425687A (en) * 2012-05-21 2013-12-04 阿里巴巴集团控股有限公司 Retrieval method and system based on queries

Also Published As

Publication number Publication date
CN106850572A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN106850572B (en) Target resource access method and device
US10839038B2 (en) Generating configuration information for obtaining web resources
US20220030085A1 (en) Method, client, server, and system for sharing content
US8862777B2 (en) Systems, apparatus, and methods for mobile device detection
US9344513B2 (en) In-server redirection of HTTP requests
US8762490B1 (en) Content-facilitated speculative preparation and rendering
CN105930528B (en) Webpage caching method and server
EP2985705A2 (en) Webpage access method and apparatus, and router
US9094478B2 (en) Prereading method and system for web browser
US20150363369A1 (en) Method and Apparatus of Processing Nested Fragment Caching of a Web Page
US20120054166A1 (en) System for displaying search engine results with images
US20080201332A1 (en) System and method for preloading content on the basis of user context
WO2020199751A1 (en) Method and apparatus for loading page picture, and electronic device
US20130191360A1 (en) System and method for improving access to search results
WO2015043428A1 (en) Method, system, browser and proxy server for loading webpage
EP3565292B1 (en) Method and device for searching for cache update
US20120166526A1 (en) Request forwarding and result aggregating systems, methods and computer readable media
US11070608B2 (en) Expedited sub-resource loading
US7949724B1 (en) Determining attention data using DNS information
CN111259283B (en) Page resource preloading processing method and device, and electronic and storage equipment
CN110929129B (en) Information detection method, equipment and machine-readable storage medium
CN1960371A (en) Method and system for accessing file of Wcb application program
KR102214990B1 (en) System for providing bookmark management and information searching service and method for providing bookmark management and information searching service using it
US20140089468A1 (en) Request-agnostic caching for a data resource collection
CN106777055B (en) Method and device for realizing website interfacing rendering

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200721

CF01 Termination of patent right due to non-payment of annual fee