WO2020124724A1 - 资源描述文件的处理、页面资源的获取方法及设备 - Google Patents

资源描述文件的处理、页面资源的获取方法及设备 Download PDF

Info

Publication number
WO2020124724A1
WO2020124724A1 PCT/CN2019/072179 CN2019072179W WO2020124724A1 WO 2020124724 A1 WO2020124724 A1 WO 2020124724A1 CN 2019072179 W CN2019072179 W CN 2019072179W WO 2020124724 A1 WO2020124724 A1 WO 2020124724A1
Authority
WO
WIPO (PCT)
Prior art keywords
link
resource
client
description file
page
Prior art date
Application number
PCT/CN2019/072179
Other languages
English (en)
French (fr)
Inventor
陈龙
Original Assignee
网宿科技股份有限公司
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 网宿科技股份有限公司 filed Critical 网宿科技股份有限公司
Priority to EP19900799.8A priority Critical patent/EP3896940A4/en
Priority to US17/289,393 priority patent/US20210397671A1/en
Publication of WO2020124724A1 publication Critical patent/WO2020124724A1/zh

Links

Images

Classifications

    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • 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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3495Performance evaluation by tracing or monitoring for systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • the invention relates to the technical field of the Internet, in particular to a method and device for processing resource description files and acquiring page resources.
  • the website pages usually contain various resources, which may include documents, scripts, page styles, and pictures, for example.
  • the client can usually send a page access request to the server, and then the server can feed back a resource description file to the client for the page access request, and the resource description file can include links to resources on the page. .
  • the client can obtain the corresponding resource according to each link in the resource description file.
  • CDN Content Delivery Network
  • CDNs can be used to accelerate the client's page access request.
  • CDNs usually provide accelerated services for clients by modifying the DNS pointer of the domain name. Specifically, the CDN changes the DNS of the page to the edge node of the CDN, so that the client can access the corresponding resources nearby.
  • the CDN cannot modify the DNS direction of the external links, resulting in the external links cannot be accelerated by the CDN.
  • the client is likely to introduce new resource links, and this part of the resource links may contain external links. Because external links cannot be accelerated by CDN, the overall page load speed will be slower.
  • the purpose of this application is to provide a method and device for processing resource description files and acquiring page resources, which can increase the page loading speed.
  • the present application provides a method for processing a resource description file.
  • the method is applied to a client.
  • the method includes: sending an access request to a node server to a target page, and receiving the node server A resource description file of the target page fed back, the resource description file includes a monitoring script inserted by the node server; when the monitoring script is executed in the client, the client is monitored to analyze the client Resource links generated in the process of resource description files, and determine whether the resource links contain external links; if so, rewrite the external links as internal links, and replace the resource links with the rewritten internal links Corresponding to the external link in; writing the rewritten resource link into the resource description file, and obtaining the page resource of the target page according to the resource description file.
  • another aspect of the present application also provides a client, the client includes: a resource description file acquisition unit, used to send an access request to the node server to the target page, and receive feedback from the node server
  • a resource description file of the target page the resource description file includes a monitoring script inserted by the node server
  • a link rewriting unit is used to monitor the client when the monitoring script is executed in the client
  • the resource link generated during the process of parsing the resource description file, and determine whether the resource link contains an external link; if so, rewrite the external link as an internal link, and use the rewritten internal link Replacing the corresponding external link in the resource link
  • a writing unit configured to write the rewritten resource link in the resource description file, and obtain the page resource of the target page according to the resource description file.
  • another aspect of the present application also provides a client, the client includes a memory and a processor, the memory is used to store a computer program, and the computer program is executed by the processor to achieve the above The processing method of the resource description file.
  • another aspect of the present application also provides a method for acquiring page resources.
  • the method includes: receiving a resource acquisition request from a target page sent by a client; and determining whether the resource acquisition request includes a link rewrite The target link of the rule; if included, extract the page address information from the target link and parse the page address information into the corresponding external link; obtain the page resources corresponding to the external link obtained by the analysis The page resource is fed back to the client.
  • the node server includes: a resource acquisition request receiving unit for receiving a resource acquisition request from a client pointing to a target page; a link judgment unit for To determine whether the resource acquisition request contains a target link that conforms to the link rewriting rules; a page address information parsing unit, if included, extracts page address information from the target link and parses the page address information into Corresponding external link; a resource feedback unit, used to obtain the page resource corresponding to the parsed external link, and feed back the page resource to the client.
  • another aspect of the present application also provides a node server, the node server includes a memory and a processor, the memory is used to store a computer program, and the computer program is executed by the processor to achieve the above How to obtain page resources.
  • the client can receive the resource description file of the target page fed back by the node server after sending the access request directed to the target page to the node server.
  • the node server can insert a monitoring script in the feedback resource description file.
  • the client parses the resource description file, it can execute the monitoring script.
  • the monitoring script When the monitoring script is executed, it can monitor resource links generated by the client during the process of parsing the resource description file, and determine whether the resource links include external links. If an external link is included, the monitoring script may rewrite the external link as an internal link, and replace the corresponding external link in the resource link with the rewritten internal link. In this way, if the client generates external links during the process of parsing the resource description file, these external links can be rewritten as internal links. These rewritten internal links can be written into the resource description file together with the actual internal links.
  • the client may initiate a resource acquisition request for each link in the resource description file one by one. Since the links in the rewritten resource description file are all in the form of internal links, these resource acquisition requests can be received by the node server.
  • the node server may identify the link contained in the received resource acquisition request, thereby determining the target link carrying the specified resource path, which may indicate that the target link is not originally an internal link, but is rewritten through an external link owned. In this way, for the target link, the node server can parse out the actual external link, and then obtain the corresponding resource according to the parsed external link, and feed the resource back to the client.
  • the technical solution provided by this application can ensure that in the subsequent resource acquisition request received by the node server, the links are all in the form of internal links by rewriting the external links, thereby ensuring that the node server can Are accelerated. Then, the node server can identify the specified resource path, so that the rewritten internal link can be restored to an external link, and the resource corresponding to the external link can be obtained. In this way, both internal links and external links can be accelerated by the CDN node server, which can improve the overall page loading speed.
  • FIG. 1 is a step diagram of a method for processing a resource description file in an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for processing resource description files in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a functional module of a client in an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a client in an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of steps of a method for acquiring page resources in an embodiment of the present invention.
  • FIG. 6 is an interactive schematic diagram of a method for acquiring page resources in an embodiment of the present invention.
  • the present application provides a method for processing resource description files, which can be applied to the current CDN architecture.
  • the client and the source server can be connected through the CDN network.
  • the client may be a terminal device used by a user, or may be software running in the terminal device.
  • the client may be a browser in the terminal device.
  • the source station server may be a business server that stores various resources in a website page.
  • Each node server may be included in the CDN network, and the node server may receive the page access request from the client and process the page access request.
  • the execution subject of the processing method of the resource description file may be the client described above, and the processing method of the resource description file may include the following multiple steps.
  • S11 Send an access request pointing to a target page to a node server, and receive a resource description file of the target page fed back by the node server, where the resource description file includes a monitoring script inserted by the node server.
  • the client may initiate an access request directed to the target page.
  • the access request may include the domain name of the target page.
  • the access request may be received by the nearest node server, and then, the node server may forward the access request to the source server corresponding to the domain name according to the domain name carried in the access request.
  • the origin server after receiving the access request, can identify the domain name contained therein, and can query the resource description file corresponding to the domain name.
  • the resource description file may be an HTML document, and the HTML document may include resource links of various resources in the target page.
  • the node server may insert a pre-resource in the resource description file in order to determine whether the client introduces a new resource link in the process of parsing the resource description file.
  • Edited monitoring script may be inserted into a head tag of the resource description file, and may be located before the first sub-element of the head tag. In this way, when the client starts to parse the resource description file, the monitoring script can be preferentially parsed to ensure that the monitoring script can be executed at the first time.
  • the node server after inserting the monitoring script into the resource description file, the node server can feed back the resource description file carrying the monitoring script to the client.
  • the monitoring script when the client parses the resource description file, since the monitoring script is located before the first sub-element of the header file, the monitoring script can be executed preferentially. After the monitoring script is executed, it can monitor resource links generated by the client during the process of parsing the resource description file.
  • the client can have multiple ways to introduce new resource links. For example, new resource links can be introduced through the native data writing functions document.write and document.writeln in the browser.
  • a new tag can also be created through the native tag creation function document.createElement in the browser, and a new resource link can be introduced by creating a link under the new tag.
  • the monitoring script can use corresponding monitoring strategies to monitor.
  • the client may call the above-mentioned native data writing function, and the data writing function will be Can carry new resource links.
  • the monitoring script can predefine the parameter interception function docwrite and create a new data buffer. Then, in the process of parsing the resource description file by the client, if the client can call the above-mentioned native data writing function, it means that it is very likely that new data will be introduced through the parameters of the data writing function at this time. Resource link. Therefore, the monitoring script may obtain the parameters written in the data writing function through the parameter interception function, and write the acquired parameters into the data buffer.
  • the monitoring script can identify the parameters in the data buffer to obtain the resource link contained therein.
  • the monitoring script may identify a link attribute identifier in the parameter in the data buffer, and the link attribute identifier may be, for example, src or href.
  • the monitoring script may use the link characterized by the link attribute identifier as a resource link generated by the client during the process of parsing the resource description file. For example, the monitoring script recognizes the src attribute identifier in the data buffer, and then the link of the src attribute identifier characterization is as follows:
  • the monitoring script may further determine whether there is an external link in the resource link.
  • the monitoring script can rewrite the external link into the form of internal link after identifying the external link.
  • the rewritten internal domain name also needs to include the domain name of the target page.
  • a designated resource path needs to be set in the rewritten internal links. The role of the designated resource path is to characterize that the current internal links are actually rewritten from external links. of. In actual applications, the designated resource path may be pre-configured by the node server in the monitoring script.
  • the external link can be rewritten into the form of internal link through the designated resource path.
  • the internal link after rewriting needs to include the domain name of the target page, the specified resource path, and the external link.
  • the specified resource path may be expressed as /modify.
  • the external link may be written in a less standardized form, it is likely that the external link will carry spaces or special characters, and the string data passed to the node server is usually not allowed to carry spaces and special characters . So when rewriting external links, you need to convert the external links into corresponding string data according to the preset codec rules, thereby eliminating spaces and special characters in the external links, so that the converted string data meets the URL (Uniform Resource Locator).
  • the preset codec rule may have multiple implementation forms, for example, the preset codec rule may be a urlencode codec rule or a base64 codec rule, which is not done in this application limited.
  • the domain name of the target page and the Integrate the string data and use the result of the integration as a rewritten internal link.
  • the domain name of the target page, the specified resource path, and the character string data may be sorted according to preset rules. For example, the three parts of information can be arranged in order from front to back, thereby forming an internal link after rewriting.
  • the rewritten internal link may further include a locator identifier, where the locator identifier may be located after the specified resource path , And the assignment value identified by the locator is the character string data.
  • external links such as https://www.123.com/1.js can be rewritten as internal links in the above manner:
  • https://www.abc.com is the domain name of the target page, and /modify is the specified resource path.
  • url is the identifier of the locator
  • https%3A%2F%2Fwww.123.com%2F1.js is the string data obtained by urlencode encoding.
  • the recognized external links may be rewritten in sequence, so that each external link newly introduced by the client is expressed in the form of an internal link.
  • the above rewriting process may not be performed.
  • the corresponding external link in the parameter can be replaced with the rewritten internal link in the data buffer to obtain a data buffer
  • the rewritten parameters within In this way, it can be ensured that the manifested form of the resource link in the rewritten parameter is the form of internal link.
  • the native document.createElement function of the browser can create a new element (tag), and a new resource link can be introduced through the instruction of element.src.
  • tags may introduce different resource links.
  • the script tag HTMLScriptElement it may introduce a script link; for the image tag HTMLImageElement, it may introduce an image link; for the style tag HTMLLinkElement, it may introduce a style link. Therefore, in this embodiment, it is necessary to monitor different types of tags to determine whether these different types of tags introduce new resource links in the future.
  • the monitoring script may determine the specified type tag to be monitored and the attribute identifier to be monitored under the specified type tag.
  • the designated type label may be each of the above-exemplified labels. Of course, in actual applications, fewer or more types of labels may be included, which is not limited in this application.
  • the monitoring script does not need to monitor each attribute identifier, but only needs to monitor the attribute identifiers that may introduce resource links. Therefore, the above attribute identifier to be monitored may be an src attribute and/or a href attribute, and the client may introduce a new resource link through element.src or element.href.
  • the monitoring script can also define a data acquisition method setter, which can intercept the attribute value of the attribute identifier to be monitored, so that the monitoring script can identify whether there is an external link in the intercepted attribute value.
  • the client parses the resource description file
  • the monitoring script listens to the attribute identification setting event under the specified type tag, it indicates that the client will introduce a new Resource link.
  • the attribute value in the event set this time can be obtained through the data acquisition method setter, then the link characterized by the attribute value can be used as the resource generated by the client in the process of parsing the resource description file link.
  • the external link can be rewritten into the form of internal link in the manner described above.
  • the above rewriting process can be omitted.
  • the monitoring script can replace the corresponding external link with the rewritten internal link in the attribute value acquired by the data acquisition method, thereby obtaining the rewritten The attribute value.
  • the rewritten attribute value can be returned to the event set this time through the data acquisition method, so that new resource links introduced through element.src or element.href are all in the form of internal links .
  • the rewritten resource link after rewriting the external link to an internal link and replacing the corresponding external link with the rewritten internal link, the rewritten resource link can be obtained.
  • each link is in the form of an internal link.
  • the rewritten resource link can be written into the resource description file, and subsequent clients can construct a resource acquisition request for the link in the resource description file, so as to obtain the corresponding page resource.
  • the monitoring script may call the native data writing function, and through the native data writing function, the The rewritten parameters in the data buffer are written into the resource description file.
  • the event set this time can be used to The rewritten attribute value is written into the resource description file.
  • the rewritten attribute value may be written into the resource description file through the appendChild method.
  • the above-mentioned functions for identifying and rewriting external links can be set in the node server by configuring function switches to enable or disable them.
  • the monitoring script can be inserted instead of directly providing the resource description file to the client .
  • the monitoring script can only be inserted in the resource description file if the node server has enabled the identification and rewriting of external links.
  • this application also provides a client, the client includes:
  • the resource description file obtaining unit is used to send an access request pointing to a target page to a node server, and receive a resource description file of the target page fed back by the node server, the resource description file includes the one inserted by the node server Monitoring script;
  • the link rewriting unit is used to monitor the resource link generated by the client during the process of parsing the resource description file when the monitoring script is executed in the client, and determine whether the resource link contains an external link Link; if included, rewrite the external link as an internal link, and replace the corresponding external link in the resource link with the rewritten internal link;
  • the writing unit is configured to write the rewritten resource link into the resource description file, and obtain the page resource of the target page according to the resource description file.
  • the link rewriting unit includes:
  • the initialization module is used to define the parameter interception function and create a new data buffer
  • the parameter interception module is used to obtain the parameters in the data writing function through the parameter interception function if the client calls the native data writing function during the process of parsing the resource description file by the client And write the acquired parameters into the data buffer;
  • An identification recognition module used to identify a link attribute identifier in the parameter in the data buffer, and use the link characterized by the link attribute identifier as generated by the client during the process of parsing the resource description file Resource link.
  • the link rewriting unit includes:
  • the monitoring information setting module is used to determine the specified type label to be monitored and the attribute identifier to be monitored under the specified type label, and define the data acquisition method;
  • the event monitoring module is used to obtain the set value of the current setting through the data acquisition method when the client detects the setting event of the attribute identifier under the specified type tag during the process of parsing the resource description file by the client The attribute value in the event;
  • the link determination module is configured to use the acquired link characterized by the attribute value as a resource link generated by the client during the process of parsing the resource description file.
  • the link rewriting unit further includes:
  • the attribute value return module is used to replace the corresponding external link with the rewritten internal link in the attribute value obtained by the data obtaining method to obtain the rewritten attribute value and obtain through the data Return the rewritten attribute value to the event set this time;
  • the writing unit is also used to write the rewritten attribute value into the resource description file through the event set this time.
  • the present application also provides a client.
  • the client may include a memory and a processor.
  • the memory is used to store a computer program.
  • the client may include a processor, an internal bus, and a memory.
  • the memory may include memory and non-volatile memory.
  • the processor reads the corresponding computer program from the non-volatile memory into the memory and runs it.
  • FIG. 4 is merely an illustration, which does not limit the structure of the identification device.
  • the client may also include more or fewer components than those shown in FIG.
  • the processor may include a central processing unit (CPU) or a graphics processor (GPU), of course, it may also include other single-chip computers, logic gate circuits, integrated circuits, etc. with logic processing capabilities, or Appropriate combination.
  • the memory described in this embodiment may be a memory device for storing information.
  • the device that can save binary data can be a memory; in an integrated circuit, a circuit that does not have a physical form with a storage function can also be a memory, such as RAM, FIFO, etc.; in the system, has a physical form of storage
  • the device can also be called a memory, etc.
  • the storage can also be implemented in the form of cloud storage. The specific implementation is well limited in this specification.
  • the present application also provides a method for acquiring page resources.
  • the method may be applied to the above-mentioned node server.
  • the method may include the following steps.
  • S21 Receive the resource acquisition request of the target page sent by the client.
  • the client can identify each resource link contained in the resource description file, and then initiate a resource acquisition request for each resource link one by one.
  • a resource acquisition request for each resource link one by one.
  • multiple resource links may be carried in the same resource acquisition request, which is not limited in this application.
  • the resource link in the resource description file may include a real internal link, or may include an internal link rewritten in the manner described in steps S11 to S15.
  • the resource acquisition request initiated by the client may carry real internal links or internal links rewritten from external links.
  • Different types of links need to be handled in different ways. Specifically, for a real internal link, the node server may directly obtain the page resource corresponding to the real internal link, and feed back the obtained page resource to the client. For internal links rewritten from external links, you need to extract the actual external links and obtain the resources corresponding to the external links.
  • the resource acquisition request it is first necessary to determine what type of internal link is included in the resource acquisition request sent by the client. Specifically, it may be determined whether the resource acquisition request includes a target link that conforms to the link rewriting rule, and the link rewriting rule may be represented by the above-mentioned designated resource path. Specifically, it can be determined whether the resource acquisition request includes a link carrying a specified resource path, and if it is included, the link carrying the specified resource path can be used as the target link that conforms to the link rewriting rules; if it does not, then It can be determined that the resource acquisition request does not include a target link that conforms to the link rewriting rules.
  • the obtained internal link will contain the specified resource path, then if the node server recognizes the specified resource path from the resource acquisition request, it indicates that the The link of the specified resource path is an internal link rewritten by an external link, and if the specified resource path does not exist in the resource acquisition request, it indicates that the link included in the resource acquisition request is a real internal link.
  • the target link needs to be restored to an external link.
  • a locator identifier can be identified in the target link, and character string data characterized by the locator identifier can be identified, so that the character string data can be extracted as the page address included in the target link information.
  • the target link carrying the specified resource path is:
  • the locator identifier “?url” in the target link is recognized, so that the value https%3A%2F%2Fwww.123.com%2F1.js after the “?url” can be used as the extracted page address information.
  • the page address information is obtained by the external link encoding through a preset codec rule. Then, after extracting the page address information, the page address information may still be decoded into the corresponding external link according to the preset codec rule. For example, the above page address information can be decoded into an external link https://www.123.com/1.js by urlencode.
  • the page resource corresponding to the parsed external link can be obtained, and the page resource is fed back to the client.
  • the resource acquisition request does not contain a target link that conforms to the link rewriting rules, it means that the resource acquisition request contains all real internal links. At this time, the corresponding link contained in the resource acquisition request can be directly obtained. Page resources, and feed back the acquired page resources to the client.
  • the node server may have a resource buffering function. After acquiring each page resource, these page resources can be associated with their respective resource links for storage, and at the same time, each page resource in the target page can be associated with the domain name of the target page.
  • a client subsequently sends an access request that points to the target page, you can first check whether there is corresponding cached data in the cache. If it exists, you can directly feed back the cached data to the client.
  • the node server includes:
  • the resource acquisition request receiving unit is used to receive a resource acquisition request from the client that points to the target page;
  • a link judging unit used to judge whether the resource acquisition request contains a target link that meets the link rewriting rules
  • a page address information parsing unit if included, extracting page address information from the target link, and parsing the page address information into a corresponding external link;
  • the resource feedback unit is used to obtain the page resources corresponding to the external links obtained by the analysis, and feed back the page resources to the client.
  • the link judgment unit includes:
  • the designated resource path judgment module is used to judge whether the resource acquisition request includes a link carrying the designated resource path, and if so, the link carrying the designated resource path is regarded as the target link that complies with the link rewriting rule; if not , Determine that the resource acquisition request does not contain a target link that conforms to the link rewriting rules.
  • the page address information is encoded by the external link through a preset codec rule; accordingly, the page address information parsing unit is further configured to convert the page according to the preset codec rule The address information is decoded into the corresponding external link.
  • the present application also provides a node server.
  • the node server includes a memory and a processor.
  • the memory is used to store a computer program.
  • the computer program is executed by the processor, the above-mentioned method for acquiring page resources may be implemented.
  • the client can receive the resource description file of the target page fed back by the node server after sending the access request directed to the target page to the node server.
  • the node server can insert a monitoring script in the feedback resource description file.
  • the client parses the resource description file, it can execute the monitoring script.
  • the monitoring script When the monitoring script is executed, it can monitor resource links generated by the client during the process of parsing the resource description file, and determine whether the resource links include external links. If an external link is included, the monitoring script may rewrite the external link as an internal link, and replace the corresponding external link in the resource link with the rewritten internal link. In this way, if the client generates external links during the process of parsing the resource description file, these external links can be rewritten as internal links. These rewritten internal links can be written into the resource description file together with the actual internal links.
  • the client may initiate a resource acquisition request for each link in the resource description file one by one. Since the links in the rewritten resource description file are all in the form of internal links, these resource acquisition requests can be received by the node server.
  • the node server may identify the link contained in the received resource acquisition request, thereby determining the target link carrying the specified resource path, which may indicate that the target link is not originally an internal link, but is rewritten through an external link owned. In this way, for the target link, the node server can parse out the actual external link, and then obtain the corresponding resource according to the parsed external link, and feed the resource back to the client.
  • the technical solution provided by this application can ensure that in the subsequent resource acquisition request received by the node server, the links are all in the form of internal links by rewriting the external links, thereby ensuring that the node server can Are accelerated. Then, the node server can identify the specified resource path, so that the rewritten internal link can be restored to an external link, and the resource corresponding to the external link can be obtained. In this way, both internal links and external links can be accelerated by the CDN node server, which can improve the overall page loading speed.
  • each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware.
  • the above technical solution can be embodied in the form of a software product in essence or part of the contribution to the existing technology, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic Discs, optical discs, etc., include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in the various embodiments or some parts of the embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种资源描述文件的处理、页面资源的获取方法及设备,其中,所述资源描述文件的处理方法包括:接收节点服务器反馈的插入监测脚本的资源描述文件;所述监测脚本在所述客户端中执行时,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接;若包含,将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接;将改写后的资源链接写入所述资源描述文件中,并根据所述资源描述文件获取所述目标页面的页面资源。本申请提供的技术方案,能够提高页面的加载速度。

Description

资源描述文件的处理、页面资源的获取方法及设备 技术领域
本发明涉及互联网技术领域,特别涉及一种资源描述文件的处理、页面资源的获取方法及设备。
背景技术
在网站页面中,通常会包含各种资源,这些资源例如可以包括文档、脚本、页面样式和图片等。客户端在请求加载某个页面时,通常可以向服务器发送页面访问请求,然后服务器可以针对该页面访问请求,给客户端反馈一个资源描述文件,该资源描述文件中可以包括页面中各个资源的链接。这样,客户端根据该资源描述文件中的各个链接,可以获取到对应的资源。
为了提高页面的加载速度,可以利用CDN(Content Delivery Network,内容分发网络)对客户端的页面访问请求进行加速。然而现有的加速模式存在一个问题:只能针对页面的内部链接进行加速,无法针对外部链接进行加速。原因在于,CDN通常是通过修改域名的DNS指向来为客户端提供加速服务。具体地,CDN通过将页面的DNS指向修改到CDN的边缘节点,从而可以让客户端就近访问对应的资源。然而对于外部链接而言,CDN无法修改外部链接的DNS指向,从而导致外部链接无法通过CDN进行加速。而客户端在解析资源描述文件的过程中,很可能会引入新的资源链接,而这部分资源链接中可能包含外部链接。由于外部链接无法通过CDN加速,会导致整体的页面加载速度较慢。
发明内容
本申请的目的在于提供一种资源描述文件的处理、页面资源的获取方法及设备,能够提高页面的加载速度。
为实现上述目的,本申请一方面提供一种资源描述文件的处理方法,所述方法应用于客户端中,所述方法包括:向节点服务器发送指向目标页面的访问请求,并接收所述节点服务器反馈的所述目标页面的资源描述文件,所述资源 描述文件中包括由所述节点服务器插入的监测脚本;所述监测脚本在所述客户端中执行时,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接;若包含,将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接;将改写后的资源链接写入所述资源描述文件中,并根据所述资源描述文件获取所述目标页面的页面资源。
为实现上述目的,本申请另一方面还提供一种客户端,所述客户端包括:资源描述文件获取单元,用于向节点服务器发送指向目标页面的访问请求,并接收所述节点服务器反馈的所述目标页面的资源描述文件,所述资源描述文件中包括由所述节点服务器插入的监测脚本;链接改写单元,用于在所述监测脚本在所述客户端中执行时,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接;若包含,将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接;写入单元,用于将改写后的资源链接写入所述资源描述文件中,并根据所述资源描述文件获取所述目标页面的页面资源。
为实现上述目的,本申请另一方面还提供一种客户端,所述客户端包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的资源描述文件的处理方法。
为实现上述目的,本申请另一方面还提供一种页面资源的获取方法,所述方法包括:接收客户端发来的目标页面的资源获取请求;判断所述资源获取请求中是否包含符合链接改写规则的目标链接;若包含,从所述目标链接中提取出页面地址信息,并将所述页面地址信息解析为对应的外部链接;获取解析得到的所述外部链接对应的页面资源,并将所述页面资源反馈给所述客户端。
为实现上述目的,本申请另一方面还提供一种节点服务器,所述节点服务器包括:资源获取请求接收单元,用于接收客户端发来的指向目标页面的资源获取请求;链接判断单元,用于判断所述资源获取请求中是否包含符合链接改写规则的目标链接;页面地址信息解析单元,用于若包含,从所述目标链接中提取出页面地址信息,并将所述页面地址信息解析为对应的外部链接;资源反馈单元,用于获取解析得到的所述外部链接对应的页面资源,并将所述页面资源反馈给所述客户端。
为实现上述目的,本申请另一方面还提供一种节点服务器,所述节点服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的页面资源的获取方法。
由上可见,本申请提供的技术方案,客户端在向节点服务器发送指向目标页面的访问请求后,可以接收节点服务器反馈的所述目标页面的资源描述文件。为了判断客户端在解析该资源描述文件的过程中是否引入了外部链接,节点服务器可以在反馈的资源描述文件中插入监测脚本。客户端在解析该资源描述文件时,可以执行该监测脚本。该监测脚本执行时,可以监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接。若包含外部链接,该监测脚本可以将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接。这样,如果客户端在解析资源描述文件的过程中产生外部链接,这些外部链接均可以被改写为内部链接。这些改写后的内部链接可以连同实际的内部链接一同被写入资源描述文件中。
后续,客户端可以逐一针对资源描述文件中的各条链接,发起资源获取请求。由于改写后的资源描述文件中的链接均是内部链接的形式,因此这些资源获取请求均可以被节点服务器接收。节点服务器可以对接收到的资源获取请求中包含的链接进行识别,从而确定出携带指定资源路径的目标链接,该指定资源路径可以表示所述目标链接原本并非是内部链接,而是通过外部链接改写得到的。这样,针对所述目标链接,节点服务器可以解析出实际的外部链接,然后根据解析出的外部链接获取对应的资源,并将资源反馈给客户端。由此可见,本申请提供的技术方案,通过对外部链接进行改写的方式,能够保证节点服务器后续接收到的资源获取请求中,链接都是内部链接的形式,从而能够保证节点服务器可以对各个链接都进行加速。然后,节点服务器可以通过识别指定资源路径,从而可以将改写得到的内部链接还原为外部链接,并获取外部链接对应的资源。这样,无论是内部链接还是外部链接,均可以由CDN的节点服务器进行加速,从而能够提高页面的整体加载速度。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施方式中资源描述文件的处理方法的步骤图;
图2是本发明实施方式中资源描述文件的处理方法的流程图;
图3是本发明实施方式中的客户端的功能模块示意图;
图4是本发明实施方式中的客户端的结构示意图;
图5是本发明实施方式中页面资源的获取方法的步骤示意图;
图6是本发明实施方式中页面资源的获取方法的交互示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
本申请提供一种资源描述文件的处理方法,所述方法可以应用于当前的CDN架构中。在所述CDN架构中,客户端与源站服务器之间可以通过CDN网络进行连接。其中,所述客户端可以是用户使用的终端设备,也可以是终端设备中运行的软件。例如,所述客户端可以是终端设备中的浏览器。所述源站服务器可以是存储网站页面中各项资源的业务服务器。所述CDN网络中可以包括各个节点服务器,该节点服务器可以接收到客户端发来的页面访问请求,并对页面访问请求进行处理。
具体地,请参阅图1和图2,所述资源描述文件的处理方法的执行主体可以是上述的客户端中,所述资源描述文件的处理方法可以包括以下多个步骤。
S11:向节点服务器发送指向目标页面的访问请求,并接收所述节点服务器反馈的所述目标页面的资源描述文件,所述资源描述文件中包括由所述节点服务器插入的监测脚本。
在本实施方式中,当用户想要通过客户端访问目标页面时,客户端可以发起指向所述目标页面的访问请求。其中,所述访问请求中可以包含所述目标页面的域名。该访问请求可以被就近的节点服务器接收,然后,节点服务器可以根据该访问请求中携带的域名,将所述访问请求转发至该域名对应的源站服务器处。
在本实施方式中,源站服务器接收到所述访问请求后,可以识别其中包含的域名,并可以查询到该域名对应的资源描述文件。该资源描述文件可以是HTML文档,在该HTML文档中,可以包含目标页面中各项资源的资源链接。
在本实施方式中,节点服务器在接收到源站服务器反馈的资源描述文件之后,为了判断客户端在解析该资源描述文件的过程中是否引入新的资源链接,可以在该资源描述文件中插入预先编辑的监测脚本。具体地,所述监测脚本可以插入所述资源描述文件的头部(head)标签中,并且可以位于该头部标签的第一个子元素之前。这样,当客户端开始解析所述资源描述文件时,可以优先解析该监测脚本,从而保证监测脚本能够第一时间被执行。
在本实施方式中,在向资源描述文件中插入所述监测脚本后,节点服务器便可以将携带所述监测脚本的资源描述文件反馈给客户端。
S13:所述监测脚本在所述客户端中执行时,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接;若包含,将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接。
在本实施方式中,客户端在解析所述资源描述文件时,由于监测脚本位于头部文件的第一个子元素之前,因此可以优先执行该监测脚本。当该监测脚本被执行后,可以监听所述客户端在解析所述资源描述文件的过程中产生的资源链接。在实际应用中,客户端可以具备多种方式来引入新的资源链接。例如,可以通过浏览器中原生的数据写入函数document.write以及document.writeln来引入新的资源链接。又例如,在另一个应用示例中,还可以通过浏览器中原生的标签创建函数document.createElement来创建新的标签,并通过在新的标签下创建链接的形式来引入新的资源链接。针对不同的资源链接的引入方式,监测脚本可以采用对应的监听策略进行监听。
具体地,针对数据写入函数的应用示例,在所述客户端解析所述资源描述文件的过程中,所述客户端可以调用上述原生的数据写入函数,该数据写入函数的参数中便可以携带新的资源链接。在这种情况下,监测脚本可以预先定义参数拦截函数docwrite,并新建数据缓冲区。然后,在所述客户端解析所述资源描述文件的过程中,若所述客户端可以调用上述原生的数据写入函数,则表示此时很有可能会通过数据写入函数的参数来引入新的资源链接。因此,监测 脚本可以通过所述参数拦截函数获取所述数据写入函数中的参数,并将获取的所述参数写入所述数据缓冲区中。然后,监测脚本可以针对数据缓冲区内的参数进行识别,从而得到其中包含的资源链接。具体地,监测脚本可以在所述数据缓冲区内的所述参数中识别链接属性标识,所述链接属性标识例如可以是src或者href。在识别出参数中包含的链接属性标识后,监测脚本可以将所述链接属性标识表征的链接作为所述客户端在解析所述资源描述文件的过程中产生的资源链接。例如,监测脚本在数据缓冲区中识别出src属性标识,然后该src属性标识表征的链接如下所示:
<script src="https://www.123.com/1.js"></script>
那么,可以将https://www.123.com/1.js作为新引入的资源链接。
在该应用示例中,在从数据缓冲区的参数中识别出新引入的资源链接后,监测脚本可以进一步判断所述资源链接中是否存在外部链接。具体地,内部链接和外部链接可以通过域名进行区分。若当前的资源链接内未包含域名,那么表示该链接为缺省域名的链接,这种链接通常都是内部链接。例如,script src=“/js/jquery.js”这样的链接必然是内部链接。若当前的资源链接内包含域名,可以进一步判断所述资源链接中的域名是否与所述目标页面的域名一致。若一致,则可以判定所述资源链接为内部链接,若不一致,则可以判定所述资源链接为外部链接。
举例来说,假设目标页面的域名为www.abc.com,而识别出的资源链接为https://www.123.com/1.js和https://www.abc.com/1.js。这样,通过上述域名的判断方法,可以确定,https://www.123.com/1.js为外部链接,而https://www.abc.com/1.js为内部链接。
在本实施方式中,考虑到节点服务器后续无法直接对外部链接进行加速,因此监测脚本在识别出外部链接后,可以将该外部链接改写为内部链接的形式。具体地,由于内部链接中包含的域名需要与目标页面的域名保持一致,因此改写后的内部域名中也需要包含目标页面的域名。此外,为了后续区分真实的内部链接和改写的内部链接,需要在改写的内部链接中设置一个指定资源路径,该指定资源路径的作用便是表征当前的内部链接实际上是由外部链接改写而来的。在实际应用中,该指定资源路径可以是节点服务器在监测脚本中预先配置的,这样,当监测脚本识别出外部链接后,可以通过该指定资源路径将外部链 接改写为内部链接的形式。由上可见,在改写后的内部链接中,需要包含目标页面的域名、所述指定资源路径以及所述外部链接。
在实际应用中,所述指定资源路径可以表示为/modify。此外,考虑到外部链接可能是以不太规范的形式编写的,在外部链接中很可能会携带空格或者特殊字符,而传递给节点服务器的字符串数据中,通常是不允许携带空格和特殊字符的,因此在改写外部链接时,需要按照预设编解码规则将所述外部链接转换为对应的字符串数据,从而消除外部链接中的空格和特殊字符,以使得转换后的字符串数据满足URL(Uniform Resource Locator,统一资源定位符)的规范要求。在实际应用中,所述预设编解码规则可以有多种实现形式,例如,所述预设编解码规则可以是urlencode编解码规则,也可以是base64编解码规则,本申请对此并不做限定。
这样,在获取所述目标页面的域名,并按照预设编解码规则将所述外部链接转换为字符串数据后,可以通过预设的所述指定资源路径对所述目标页面的域名和所述字符串数据进行整合,并将整合得到的结果作为改写后的内部链接。在实际应用中,在所述内部链接中,所述目标页面的域名、所述指定资源路径以及所述字符串数据可以按照预设规则进行排序。例如,这三部分的信息可以从前到后依次排列,从而构成改写后的内部链接。
在本实施方式中,为了将上述的字符串数据与其他部分的数据进行区分,在改写后的内部链接中还可以包括定位符标识,其中,所述定位符标识可以位于所述指定资源路径之后,并且所述定位符标识的赋值为所述字符串数据。举例来说,所述定位符标识可以是“?url”,在对“?url”进行赋值时,可以通过“?url=XXXX”的形式,其中XXXX便可以是赋值给“?url”的字符串数据。这样,在一个应用实例中,针对https://www.123.com/1.js这样的外部链接,通过上述的方式,可以改写为内部链接:
https://www.abc.com/modify?url=https%3A%2F%2Fwww.123.com%2F1.js
上述的内部链接中,https://www.abc.com为目标页面的域名,/modify为指定资源路径,?url为定位符标识,https%3A%2F%2Fwww.123.com%2F1.js为通过urlencode方式编码得到的字符串数据。
在本实施方式中,按照上述的方式,可以针对识别出的外部链接依次进行改写,从而将客户端新引入的各个外部链接都通过内部链接的形式进行表示。 而针对客户端新引入的内部链接,则可以不进行上述的改写处理。
在本实施方式中,在将外部链接改写为内部链接后,可以在所述数据缓冲区内,利用改写后的所述内部链接替换所述参数中对应的所述外部链接,从而得到数据缓冲区内的改写后的参数。这样可以保证改写后的参数中,资源链接的表现形式都是内部链接的形式。
针对标签创建函数的应用示例,浏览器原生的document.createElement函数可以创建一个新的element(标签),并可以通过element.src的指令引入新的资源链接。在这种情况下,不同的标签可能会引入不同的资源链接。例如,对于脚本标签HTMLScriptElement而言,其可能会引入脚本链接;对于图片标签HTMLImageElement而言,其可能会引入图片链接;对于样式标签HTMLLinkElement而言,其可能会引入样式链接。因此,在本实施方式中,需要对不同类型的标签进行监听,从而判断这些不同类型的标签是否在后续引入了新的资源链接。鉴于此,监测脚本可以确定待监听的指定类型标签和所述指定类型标签下待监听的属性标识。其中,所述指定类型标签可以是以上例举的各个标签,当然,在实际应用中可以包含更少或者更多类型的标签,本申请对此并不做限定。此外,这些指定类型标签下的属性标识较多,监测脚本无需对每个属性标识都进行监听,而是只需要监听可能会引入资源链接的属性标识。因此,上述的待监听的属性标识便可以是src属性和/或href属性,客户端可以通过element.src或者element.href来引入新的资源链接。在本本实施方式中,监测脚本还可以定义数据获取方式setter,该数据获取方式可以拦截上述待监听的属性标识的属性值,从而使得监测脚本能够识别拦截得到的属性值中是否存在外部链接。
在本实施方式中,在所述客户端解析所述资源描述文件的过程中,若监测脚本监听到所述指定类型标签下的所述属性标识设置事件时,则表明客户端当前会引入新的资源链接。此时,可以通过所述数据获取方式setter获取本次设置的事件中的属性值,那么所述属性值表征的链接便可以作为所述客户端在解析所述资源描述文件的过程中产生的资源链接。
同样地,在获取到客户端引入的资源链接后,可以按照上述的方式判断该资源链接中是否存在外部链接,并可以按照上述的方式将外部链接改写为内部链接的形式。对于内部链接而言,则可以不进行上述的改写过程。在将外部链 接改写为内部链接的形式后,监测脚本可以在所述数据获取方式获取的所述属性值中,利用改写后的所述内部链接替换对应的所述外部链接,从而得到改写后的属性值。然后可以通过所述数据获取方式将所述改写后的属性值返回给所述本次设置的事件,从而使得通过element.src或者element.href的方式引入的新的资源链接都是内部链接的形式。
S15:将改写后的资源链接写入所述资源描述文件中,并根据所述资源描述文件获取所述目标页面的页面资源。
在本实施方式中,在将外部链接改写为内部链接,并利用改写后的内部链接替换对应的外部链接后,可以得到改写后的资源链接。所述改写后的资源链接中,各个链接都是内部链接的形式。这样,可以将改写后的资源链接写入所述资源描述文件中,后续客户端可以针对资源描述文件中的链接构建资源获取请求,从而获取对应的页面资源。
在实际应用中,针对上述数据写入函数的应用示例而言,在得到改写后的参数后,监测脚本可以调用所述原生的数据写入函数,并通过所述原生的数据写入函数,将所述数据缓冲区内所述改写后的参数写入所述资源描述文件中。而针对上述标签创建函数的应用示例而言,在通过所述数据获取方式将所述改写后的属性值返回给所述本次设置的事件后,可以通过所述本次设置的事件将所述改写后的属性值写入所述资源描述文件中。具体地,可以通过appendChild的方法将改写后的属性值写入所述资源描述文件中。
当然,在实际应用中,上述关于外部链接的识别和改写的功能,可以在节点服务器中通过配置功能开关来设定是否开启。如图2所示,若节点服务器没有开启外部链接的识别和改写功能,那么在接收到源站服务器反馈的资源描述文件后,可以不插入监测脚本,而是直接将资源描述文件提供给客户端。若节点服务器开启了外部链接的识别和改写功能,才可以在资源描述文件中插入监测脚本。
请参阅图3,本申请还提供一种客户端,所述客户端包括:
资源描述文件获取单元,用于向节点服务器发送指向目标页面的访问请求,并接收所述节点服务器反馈的所述目标页面的资源描述文件,所述资源描述文件中包括由所述节点服务器插入的监测脚本;
链接改写单元,用于在所述监测脚本在所述客户端中执行时,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接;若包含,将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接;
写入单元,用于将改写后的资源链接写入所述资源描述文件中,并根据所述资源描述文件获取所述目标页面的页面资源。
在一个实施方式中,所述链接改写单元包括:
初始化模块,用于定义参数拦截函数,并新建数据缓冲区;
参数拦截模块,用于在所述客户端解析所述资源描述文件的过程中,若所述客户端调用原生的数据写入函数,通过所述参数拦截函数获取所述数据写入函数中的参数,并将获取的所述参数写入所述数据缓冲区中;
标识识别模块,用于在所述数据缓冲区内的所述参数中识别链接属性标识,并将所述链接属性标识表征的链接作为所述客户端在解析所述资源描述文件的过程中产生的资源链接。
在一个实施方式中,所述链接改写单元包括:
监听信息设置模块,用于确定待监听的指定类型标签和所述指定类型标签下待监听的属性标识,并定义数据获取方式;
事件监听模块,用于在所述客户端解析所述资源描述文件的过程中,若监听到所述指定类型标签下的所述属性标识设置事件时,通过所述数据获取方式获取本次设置的事件中的属性值;
链接确定模块,用于将获取的所述属性值表征的链接作为所述客户端在解析所述资源描述文件的过程中产生的资源链接。
在一个实施方式中,所述链接改写单元还包括:
属性值返回模块,用于在所述数据获取方式获取的所述属性值中,利用改写后的所述内部链接替换对应的所述外部链接,得到改写后的属性值,并通过所述数据获取方式将所述改写后的属性值返回给所述本次设置的事件;
相应地,所述写入单元还用于通过所述本次设置的事件将所述改写后的属性值写入所述资源描述文件中。
请参阅图4,本申请还提供一种客户端,所述客户端可以包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行 时,可以实现上述的资源描述文件的处理方法。具体地,如图4所示,在硬件层面,该客户端可以包括处理器、内部总线和存储器。所述存储器可以包括内存以及非易失性存储器。处理器从非易失性存储器中读取对应的计算机程序到内存中然后运行。本领域普通技术人员可以理解,图4所示的结构仅为示意,其并不对上述识别装置的结构造成限定。例如,所述客户端还可包括比图4中所示更多或者更少的组件,例如还可以包括其他的处理硬件,如GPU(Graphics Processing Unit,图像处理器),或者具有与图4所示不同的配置。当然,除了软件实现方式之外,本申请并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等。
在本实施方式中,所述的处理器可以包括中央处理器(CPU)或图形处理器(GPU),当然也可以包括其他的具有逻辑处理能力的单片机、逻辑门电路、集成电路等,或其适当组合。本实施方式所述的存储器可以是用于保存信息的记忆设备。在数字系统中,能保存二进制数据的设备可以是存储器;在集成电路中,一个没有实物形式的具有存储功能的电路也可以为存储器,如RAM、FIFO等;在系统中,具有实物形式的存储设备也可以叫存储器等。实现的时候,该存储器也可以采用云存储器的方式实现,具体实现方式,本说明书不错限定。
需要说明的是,本实施方式中的客户端,具体的实现方式可以参照上述的资源描述文件的处理方法实施方式的描述,在此不作一一赘述。
请参阅图5和图6,本申请还提供一种页面资源的获取方法,所述方法可以应用于上述的节点服务器中,所述方法可以包括以下步骤。
S21:接收客户端发来的目标页面的资源获取请求。
在本实施方式中,客户端可以识别资源描述文件中包含的各个资源链接,然后针对各个资源链接逐一发起资源获取请求。当然,在实际应用中,为了减少请求的发起次数,有时候也可以在同一个资源获取请求中携带多个资源链接,本申请对此并不做限定。
S23:判断所述资源获取请求中是否包含符合链接改写规则的目标链接。
在本实施方式中,所述资源描述文件中的资源链接,可以包含真实的内部链接,也可以包含按照步骤S11至S15中描述的方式进行改写的内部链接。这样,客户端发起的资源获取请求中,可以携带真实的内部链接,也可以携带由 外部链接改写得到的内部链接。针对不同类型的链接,需要按照不同的方式进行处理。具体地,针对真实的内部链接,节点服务器可以直接获取该真实的内部链接对应的页面资源,并将获取的所述页面资源反馈给所述客户端。而针对由外部链接改写得到的内部链接,则需要提取出实际的外部链接,并获取该外部链接对应的资源。
因此,在本实施方式中,首先需要判断客户端发来的资源获取请求中包含的是哪种类型的内部链接。具体地,可以判断所述资源获取请求中是否包含符合链接改写规则的目标链接,所述链接改写规则可以通过上述的指定资源路径来表示。具体地,可以判断所述资源获取请求中是否包含携带指定资源路径的链接,若包含,则可以将所述携带指定资源路径的链接作为所述符合链接改写规则的目标链接;若不包含,则可以判定所述资源获取请求中不包含符合链接改写规则的目标链接。按照步骤13中描述的改写规则,在对外部链接进行改写后,得到的内部链接中会包含所述指定资源路径,那么如果节点服务器从资源获取请求中识别出该指定资源路径,则表示携带该指定资源路径的链接为外部链接改写得到的内部链接,而如果资源获取请求中不存在所述指定资源路径,则表示该资源获取请求中包含的链接为真实的内部链接。
S25:若包含,从所述目标链接中提取出页面地址信息,并将所述页面地址信息解析为对应的外部链接。
在本实施方式中,若资源获取请求中包含携带所述指定资源路径的目标链接,那么需要将该目标链接还原为外部链接。具体地,首先可以在所述目标链接中识别出定位符标识,并识别所述定位符标识表征的字符串数据,从而可以将该字符串数据提取出来,作为所述目标链接中包含的页面地址信息。举例来说,携带所述指定资源路径的目标链接为:
https://www.abc.com/modify?url=https%3A%2F%2Fwww.123.com%2F1.js,
那么识别出该目标链接中的定位符标识“?url”,从而可以将“?url”后面的赋值https%3A%2F%2Fwww.123.com%2F1.js作为提取出的页面地址信息。
在本实施方式中,由于在改写外部链接时,所述页面地址信息是由所述外部链接通过预设编解码规则编码得到的。那么在提取出所述页面地址信息后,可以依然按照所述预设编解码规则将所述页面地址信息解码为对应的所述外部链接。例如,可以通过urlencode的方式,将上述的页面地址信息解码为外部 链接https://www.123.com/1.js。
S27:获取解析得到的所述外部链接对应的页面资源,并将所述页面资源反馈给所述客户端。
在本实施方式中,在解析得到所述外部链接后,便可以获取解析得到的所述外部链接对应的页面资源,并将所述页面资源反馈给所述客户端。
此外,若所述资源获取请求中不包含符合链接改写规则的目标链接,那么表示资源获取请求中包含的都是真实的内部链接,此时可以直接获取所述资源获取请求中包含的链接对应的页面资源,并将获取的所述页面资源反馈给所述客户端。
需要说明的是,所述节点服务器中可以具备资源缓冲功能。在获取到各项页面资源后,可以将这些页面资源与各自的资源链接进行关联存储,同时还可以将目标页面中的各项页面资源与目标页面的域名进行关联存储。这样,当后续还有客户端发来指向所述目标页面的访问请求后,可以首先在缓存中查看是否存在对应的已经缓存的数据。如果存在,可以直接向客户端反馈已经缓存的数据。同理,在接收到客户端发来的资源获取请求后,可以在缓存中查看是否已经存在该资源获取请求对应的已缓存的数据,如果存在,可以直接反馈已经缓存的数据。如果不存在已缓存的数据,则可以按照上述的方式获取对应的页面资源。
本申请还提供一种节点服务器,所述节点服务器包括:
资源获取请求接收单元,用于接收客户端发来的指向目标页面的资源获取请求;
链接判断单元,用于判断所述资源获取请求中是否包含符合链接改写规则的目标链接;
页面地址信息解析单元,用于若包含,从所述目标链接中提取出页面地址信息,并将所述页面地址信息解析为对应的外部链接;
资源反馈单元,用于获取解析得到的所述外部链接对应的页面资源,并将所述页面资源反馈给所述客户端。
在一个实施方式中,所述链接判断单元包括:
指定资源路径判断模块,用于判断所述资源获取请求中是否包含携带指定资源路径的链接,若包含,将所述携带指定资源路径的链接作为所述符合链接 改写规则的目标链接;若不包含,判定所述资源获取请求中不包含符合链接改写规则的目标链接。
在一个实施方式中,所述页面地址信息由所述外部链接通过预设编解码规则编码得到;相应地,所述页面地址信息解析单元还用于按照所述预设编解码规则将所述页面地址信息解码为对应的所述外部链接。
本申请还提供一种节点服务器所述节点服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,可以实现上述的页面资源的获取方法。
由上可见,本申请提供的技术方案,客户端在向节点服务器发送指向目标页面的访问请求后,可以接收节点服务器反馈的所述目标页面的资源描述文件。为了判断客户端在解析该资源描述文件的过程中是否引入了外部链接,节点服务器可以在反馈的资源描述文件中插入监测脚本。客户端在解析该资源描述文件时,可以执行该监测脚本。该监测脚本执行时,可以监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接。若包含外部链接,该监测脚本可以将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接。这样,如果客户端在解析资源描述文件的过程中产生外部链接,这些外部链接均可以被改写为内部链接。这些改写后的内部链接可以连同实际的内部链接一同被写入资源描述文件中。
后续,客户端可以逐一针对资源描述文件中的各条链接,发起资源获取请求。由于改写后的资源描述文件中的链接均是内部链接的形式,因此这些资源获取请求均可以被节点服务器接收。节点服务器可以对接收到的资源获取请求中包含的链接进行识别,从而确定出携带指定资源路径的目标链接,该指定资源路径可以表示所述目标链接原本并非是内部链接,而是通过外部链接改写得到的。这样,针对所述目标链接,节点服务器可以解析出实际的外部链接,然后根据解析出的外部链接获取对应的资源,并将资源反馈给客户端。由此可见,本申请提供的技术方案,通过对外部链接进行改写的方式,能够保证节点服务器后续接收到的资源获取请求中,链接都是内部链接的形式,从而能够保证节点服务器可以对各个链接都进行加速。然后,节点服务器可以通过识别指定资源路径,从而可以将改写得到的内部链接还原为外部链接,并获取外部链接对 应的资源。这样,无论是内部链接还是外部链接,均可以由CDN的节点服务器进行加速,从而能够提高页面的整体加载速度。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (22)

  1. 一种资源描述文件的处理方法,其特征在于,所述方法应用于客户端中,所述方法包括:
    向节点服务器发送指向目标页面的访问请求,并接收所述节点服务器反馈的所述目标页面的资源描述文件,所述资源描述文件中包括由所述节点服务器插入的监测脚本;
    所述监测脚本在所述客户端中执行时,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接;若包含,将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接;
    将改写后的资源链接写入所述资源描述文件中,并根据所述资源描述文件获取所述目标页面的页面资源。
  2. 根据权利要求1所述的方法,其特征在于,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接包括:
    定义参数拦截函数,并新建数据缓冲区;
    在所述客户端解析所述资源描述文件的过程中,若所述客户端调用原生的数据写入函数,通过所述参数拦截函数获取所述数据写入函数中的参数,并将获取的所述参数写入所述数据缓冲区中;
    在所述数据缓冲区内的所述参数中识别链接属性标识,并将所述链接属性标识表征的链接作为所述客户端在解析所述资源描述文件的过程中产生的资源链接。
  3. 根据权利要求2所述的方法,其特征在于,利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接包括:
    在所述数据缓冲区内,利用改写后的所述内部链接替换所述参数中对应的所述外部链接,以得到改写后的参数;
    相应地,将改写后的资源链接写入所述资源描述文件中包括:
    调用所述原生的数据写入函数,并通过所述原生的数据写入函数,将所述 数据缓冲区内所述改写后的参数写入所述资源描述文件中。
  4. 根据权利要求1所述的方法,其特征在于,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接包括:
    确定待监听的指定类型标签和所述指定类型标签下待监听的属性标识,并定义数据获取方式;
    在所述客户端解析所述资源描述文件的过程中,若监听到所述指定类型标签下的所述属性标识设置事件时,通过所述数据获取方式获取本次设置的事件中的属性值;
    将获取的所述属性值表征的链接作为所述客户端在解析所述资源描述文件的过程中产生的资源链接。
  5. 根据权利要求4所述的方法,其特征在于,利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接包括:
    在所述数据获取方式获取的所述属性值中,利用改写后的所述内部链接替换对应的所述外部链接,得到改写后的属性值,并通过所述数据获取方式将所述改写后的属性值返回给所述本次设置的事件;
    相应地,将改写后的资源链接写入所述资源描述文件中包括:
    通过所述本次设置的事件将所述改写后的属性值写入所述资源描述文件中。
  6. 根据权利要求1至5中任一所述的方法,其特征在于,判断所述资源链接中是否包含外部链接包括:
    判断当前的资源链接中是否包含域名,若包含域名,判断所述当前的资源链接中的域名是否与所述目标页面的域名一致;若一致,判定所述当前的资源链接为内部链接,若不一致,判定所述当前的资源链接为外部链接;
    若所述当前的资源链接中不包含域名,判定所述当前的资源链接为内部链接。
  7. 根据权利要求1至5中任一所述的方法,其特征在于,将所述外部链接 改写为内部链接包括:
    获取所述目标页面的域名,并按照预设编解码规则将所述外部链接转换为字符串数据;
    通过所述节点服务器预先设置的指定资源路径对所述目标页面的域名和所述字符串数据进行整合,并将整合得到的结果作为改写后的内部链接;其中,在所述内部链接中,所述目标页面的域名、所述指定资源路径以及所述字符串数据按照预设规则进行排序。
  8. 根据权利要求7所述的方法,其特征在于,在改写后的内部链接中还包括定位符标识,其中,所述定位符标识位于所述指定资源路径之后,并且所述定位符标识的赋值为所述字符串数据。
  9. 一种客户端,其特征在于,所述客户端包括:
    资源描述文件获取单元,用于向节点服务器发送指向目标页面的访问请求,并接收所述节点服务器反馈的所述目标页面的资源描述文件,所述资源描述文件中包括由所述节点服务器插入的监测脚本;
    链接改写单元,用于在所述监测脚本在所述客户端中执行时,监听所述客户端在解析所述资源描述文件的过程中产生的资源链接,并判断所述资源链接中是否包含外部链接;若包含,将所述外部链接改写为内部链接,并利用改写后的所述内部链接替换所述资源链接中对应的所述外部链接;
    写入单元,用于将改写后的资源链接写入所述资源描述文件中,并根据所述资源描述文件获取所述目标页面的页面资源。
  10. 根据权利要求9所述的客户端,其特征在于,所述链接改写单元包括:
    初始化模块,用于定义参数拦截函数,并新建数据缓冲区;
    参数拦截模块,用于在所述客户端解析所述资源描述文件的过程中,若所述客户端调用原生的数据写入函数,通过所述参数拦截函数获取所述数据写入函数中的参数,并将获取的所述参数写入所述数据缓冲区中;
    标识识别模块,用于在所述数据缓冲区内的所述参数中识别链接属性标识,并将所述链接属性标识表征的链接作为所述客户端在解析所述资源描述文件的 过程中产生的资源链接。
  11. 根据权利要求9所述的客户端,其特征在于,所述链接改写单元包括:
    监听信息设置模块,用于确定待监听的指定类型标签和所述指定类型标签下待监听的属性标识,并定义数据获取方式;
    事件监听模块,用于在所述客户端解析所述资源描述文件的过程中,若监听到所述指定类型标签下的所述属性标识设置事件时,通过所述数据获取方式获取本次设置的事件中的属性值;
    链接确定模块,用于将获取的所述属性值表征的链接作为所述客户端在解析所述资源描述文件的过程中产生的资源链接。
  12. 根据权利要求11所述的客户端,其特征在于,所述链接改写单元还包括:
    属性值返回模块,用于在所述数据获取方式获取的所述属性值中,利用改写后的所述内部链接替换对应的所述外部链接,得到改写后的属性值,并通过所述数据获取方式将所述改写后的属性值返回给所述本次设置的事件;
    相应地,所述写入单元还用于通过所述本次设置的事件将所述改写后的属性值写入所述资源描述文件中。
  13. 一种客户端,其特征在于,所述客户端包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至8中任一所述的方法。
  14. 一种页面资源的获取方法,其特征在于,所述方法包括:
    接收客户端发来的目标页面的资源获取请求;
    判断所述资源获取请求中是否包含符合链接改写规则的目标链接;
    若包含,从所述目标链接中提取出页面地址信息,并将所述页面地址信息解析为对应的外部链接;
    获取解析得到的所述外部链接对应的页面资源,并将所述页面资源反馈给所述客户端。
  15. 根据权利要求11所述的方法,其特征在于,判断所述资源获取请求中是否包含符合链接改写规则的目标链接包括:
    判断所述资源获取请求中是否包含携带指定资源路径的链接,若包含,将所述携带指定资源路径的链接作为所述符合链接改写规则的目标链接;若不包含,判定所述资源获取请求中不包含符合链接改写规则的目标链接。
  16. 根据权利要求11所述的方法,其特征在于,从所述目标链接中提取出页面地址信息包括:
    在所述目标链接中识别出定位符标识,并将所述定位符标识表征的字符串数据作为提取出的所述页面地址信息。
  17. 根据权利要求11或13所述的方法,其特征在于,所述页面地址信息由所述外部链接通过预设编解码规则编码得到;相应地,将所述页面地址信息解析为对应的外部链接包括:
    按照所述预设编解码规则将所述页面地址信息解码为对应的所述外部链接。
  18. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    若所述资源获取请求中不包含符合链接改写规则的目标链接,获取所述资源获取请求中包含的链接对应的页面资源,并将获取的所述页面资源反馈给所述客户端。
  19. 一种节点服务器,其特征在于,所述节点服务器包括:
    资源获取请求接收单元,用于接收客户端发来的指向目标页面的资源获取请求;
    链接判断单元,用于判断所述资源获取请求中是否包含符合链接改写规则的目标链接;
    页面地址信息解析单元,用于若包含,从所述目标链接中提取出页面地址信息,并将所述页面地址信息解析为对应的外部链接;
    资源反馈单元,用于获取解析得到的所述外部链接对应的页面资源,并将所述页面资源反馈给所述客户端。
  20. 根据权利要求19所述的节点服务器,其特征在于,所述链接判断单元包括:
    指定资源路径判断模块,用于判断所述资源获取请求中是否包含携带指定资源路径的链接,若包含,将所述携带指定资源路径的链接作为所述符合链接改写规则的目标链接;若不包含,判定所述资源获取请求中不包含符合链接改写规则的目标链接。
  21. 根据权利要求19所述的节点服务器,其特征在于,所述页面地址信息由所述外部链接通过预设编解码规则编码得到;相应地,所述页面地址信息解析单元还用于按照所述预设编解码规则将所述页面地址信息解码为对应的所述外部链接。
  22. 一种节点服务器,其特征在于,所述节点服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求14至18中任一所述的方法。
PCT/CN2019/072179 2018-12-18 2019-01-17 资源描述文件的处理、页面资源的获取方法及设备 WO2020124724A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19900799.8A EP3896940A4 (en) 2018-12-18 2019-01-17 PROCESSING OF RESOURCE DESCRIPTION FILES AND METHOD AND DEVICE FOR OBTAINING SITE RESOURCES
US17/289,393 US20210397671A1 (en) 2018-12-18 2019-01-17 Method and device for processing resource description file and for obtaining page resource

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811550196.6 2018-12-18
CN201811550196.6A CN109714406B (zh) 2018-12-18 2018-12-18 资源描述文件的处理、页面资源的获取方法及设备

Publications (1)

Publication Number Publication Date
WO2020124724A1 true WO2020124724A1 (zh) 2020-06-25

Family

ID=66255894

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/072179 WO2020124724A1 (zh) 2018-12-18 2019-01-17 资源描述文件的处理、页面资源的获取方法及设备

Country Status (4)

Country Link
US (1) US20210397671A1 (zh)
EP (1) EP3896940A4 (zh)
CN (1) CN109714406B (zh)
WO (1) WO2020124724A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334154A (zh) * 2022-10-12 2022-11-11 阿里健康科技(杭州)有限公司 页面访问方法、装置、计算机设备和存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266661B (zh) * 2019-06-04 2021-09-14 东软集团股份有限公司 一种授权方法、装置及设备
CN113204721A (zh) * 2021-05-14 2021-08-03 网宿科技股份有限公司 请求处理方法、节点及存储介质
CN116880901B (zh) * 2023-09-05 2023-11-24 国网思极网安科技(北京)有限公司 应用页面解析方法、装置、电子设备与计算机可读介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138004A1 (en) * 2003-12-17 2005-06-23 Microsoft Corporation Link modification system and method
CN104102697A (zh) * 2014-06-27 2014-10-15 深信服网络科技(深圳)有限公司 管理web应用中外链的方法及装置
CN105072020A (zh) * 2015-08-04 2015-11-18 广州华多网络科技有限公司 即时通信消息处理的方法及系统
US9830307B1 (en) * 2014-12-11 2017-11-28 Amazon Technologies, Inc. Ahead of time compilation of content pages
CN108804514A (zh) * 2018-04-25 2018-11-13 网宿科技股份有限公司 一种网页加载方法、服务器和网页加载系统

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2354993C (en) * 2001-08-10 2010-11-09 Ibm Canada Limited-Ibm Canada Limitee Method of indicating links to external urls
US7890852B2 (en) * 2003-06-26 2011-02-15 International Business Machines Corporation Rich text handling for a web application
US9798524B1 (en) * 2007-12-04 2017-10-24 Axway, Inc. System and method for exposing the dynamic web server-side
US8560598B2 (en) * 2009-12-22 2013-10-15 At&T Intellectual Property I, L.P. Integrated adaptive anycast for content distribution
US20120192063A1 (en) * 2011-01-20 2012-07-26 Koren Ziv On-the-fly transformation of graphical representation of content
US10027527B2 (en) * 2011-02-08 2018-07-17 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for mobility support for caching adaptive HTTP streaming content in cellular networks
CN102801574B (zh) * 2011-05-27 2016-08-31 阿里巴巴集团控股有限公司 一种网页链接的检测方法、装置和系统
US9391832B1 (en) * 2011-12-05 2016-07-12 Menlo Security, Inc. Secure surrogate cloud browsing
US9742858B2 (en) * 2011-12-23 2017-08-22 Akamai Technologies Inc. Assessment of content delivery services using performance measurements from within an end user client application
CN104426925B (zh) * 2013-08-21 2019-11-08 腾讯科技(深圳)有限公司 网页资源获取方法及装置
US9967311B2 (en) * 2014-01-28 2018-05-08 Open Text Sa Ulc System and method for integration of browser based applications in a managed application environment
CN104168337B (zh) * 2014-09-10 2018-03-27 北京浩瀚深度信息技术股份有限公司 一种网络访问的加速方法
CN104392008B (zh) * 2014-12-19 2017-12-05 北京奇虎科技有限公司 网页数据获取方法、浏览器客户端及cdn服务器
CN104468817B (zh) * 2014-12-22 2016-08-24 北京奇虎科技有限公司 通过cdn下载资源的实现方法和装置、服务器、客户端
CN104754073A (zh) * 2015-03-25 2015-07-01 百度在线网络技术(北京)有限公司 一种资源访问方法及装置
US11070608B2 (en) * 2015-06-17 2021-07-20 Fastly, Inc. Expedited sub-resource loading
US10728239B2 (en) * 2015-09-15 2020-07-28 Mimecast Services Ltd. Mediated access to resources
CN107229655B (zh) * 2016-03-25 2021-05-25 北京京东尚科信息技术有限公司 页面静态文件的更新方法、装置及系统
US10635744B2 (en) * 2016-04-21 2020-04-28 Arivis Ag File format agnostic document viewing, link creation and validation in a multi-domain document hierarchy
CN108241689A (zh) * 2016-12-26 2018-07-03 广州市动景计算机科技有限公司 页面资源获取方法、装置和客户端设备
CN107483443B (zh) * 2017-08-22 2020-06-05 北京京东尚科信息技术有限公司 广告信息处理方法、客户端、存储介质和电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138004A1 (en) * 2003-12-17 2005-06-23 Microsoft Corporation Link modification system and method
CN104102697A (zh) * 2014-06-27 2014-10-15 深信服网络科技(深圳)有限公司 管理web应用中外链的方法及装置
US9830307B1 (en) * 2014-12-11 2017-11-28 Amazon Technologies, Inc. Ahead of time compilation of content pages
CN105072020A (zh) * 2015-08-04 2015-11-18 广州华多网络科技有限公司 即时通信消息处理的方法及系统
CN108804514A (zh) * 2018-04-25 2018-11-13 网宿科技股份有限公司 一种网页加载方法、服务器和网页加载系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3896940A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334154A (zh) * 2022-10-12 2022-11-11 阿里健康科技(杭州)有限公司 页面访问方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN109714406A (zh) 2019-05-03
CN109714406B (zh) 2021-04-02
EP3896940A4 (en) 2022-05-18
US20210397671A1 (en) 2021-12-23
EP3896940A1 (en) 2021-10-20

Similar Documents

Publication Publication Date Title
WO2020124724A1 (zh) 资源描述文件的处理、页面资源的获取方法及设备
US11153402B2 (en) Method and apparatus for automatically optimizing the loading of images in a cloud-based proxy service
WO2016173200A1 (zh) 用于检测恶意网址的方法和系统
US10263910B2 (en) Resource calling for hybrid applications
US10430514B2 (en) Method and terminal for extracting webpage content, and non-transitory storage medium
US8660976B2 (en) Web content rewriting, including responses
EP3323053B1 (en) Document capture using client-based delta encoding with server
US12013815B2 (en) Method for processing resource description file, page resource acquisition method, and intermediate server
WO2016101635A1 (zh) 一种同步登录状态的方法、装置、设备和计算机存储介质
US9954880B2 (en) Protection via webpage manipulation
US8799515B1 (en) Rewriting of client-side executed scripts in the operation of an SSL VPN
US20140289612A1 (en) Merging web page style addresses
CN110321504B (zh) 一种页面处理方法及装置
TW201409273A (zh) 網頁訪問請求的響應方法和裝置
CN112637361B (zh) 一种页面代理方法、装置、电子设备及存储介质
CN103036910B (zh) 一种用户Web访问行为控制方法及装置
CN111723314B (zh) 网页展示方法、装置、电子设备及计算机可读存储介质
JP5039946B2 (ja) クライアント装置およびサーバ装置の間の通信を中継する技術
CN110889054A (zh) 一种前后端分离Web系统的在线预览的方法及装置
CN115640316A (zh) 数据查询的分页方法、拦截器、插件及服务器
US10963510B2 (en) Dynamic natural language processing tagging
US10079739B2 (en) Computer-implemented method for handling log file
KR20160132854A (ko) 콘텐츠의 캡처를 통한 자산 수집 서비스 제공 기법
CN110858240A (zh) 一种前端模块加载方法和装置
JP6004400B2 (ja) 広告配信システム及び広告配信方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19900799

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019900799

Country of ref document: EP

Effective date: 20210716