WO2018133772A1 - 网页资源的获取方法和装置、存储介质、电子装置 - Google Patents
网页资源的获取方法和装置、存储介质、电子装置 Download PDFInfo
- Publication number
- WO2018133772A1 WO2018133772A1 PCT/CN2018/072827 CN2018072827W WO2018133772A1 WO 2018133772 A1 WO2018133772 A1 WO 2018133772A1 CN 2018072827 W CN2018072827 W CN 2018072827W WO 2018133772 A1 WO2018133772 A1 WO 2018133772A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- address
- resource
- client
- server
- character information
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/972—Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
Definitions
- the present invention relates to the field of the Internet, and in particular to a method and device for acquiring web resources, a storage medium, and an electronic device.
- the World Wide Web (English World Wide Web) scene has become the core scene used by Internet users, but compared with Native, the biggest criticism of the Web is performance.
- the loading speed is the core indicator of the Web experience, and the resource loading has become loaded.
- the most important constraint of speed, mobile network upgrade from 2g to 3g, then upgrade to 4g and wireless fidelity wifi (English name is WIreless Fidelity), is to solve the problem of network delay and bandwidth impact data loading, but the domestic network environment Complex and uneven quality, that is, using 4g and wifi networks, browser resources load slower, is still a key factor limiting browser speed.
- the embodiment of the invention provides a method and a device for acquiring a webpage resource, a storage medium and an electronic device, so as to at least solve the technical problem that the browser loads the resource slowly in the related art.
- a method for obtaining a webpage resource includes: when the first address of the webpage to be accessed is obtained by the client, loading the webpage to be accessed in the client according to the first address a resource; before the loading of the first resource in the client, acquiring a pre-recorded second address associated with the first address, and establishing a first connection between the client and the first server, where the second address is used Pointing to the first server, the first server is configured to provide a second resource in the webpage to which the pre-recorded first resource is linked; after the loading of the first resource in the client, receiving the obtaining instruction in the client; acquiring the instruction When the second address is carried, the second resource is obtained from the first server through the first connection.
- a device for acquiring a webpage resource comprising: a loading unit, configured to: when the first address of the webpage to be accessed is obtained in the client, according to the first address in the client Loading the first resource of the to-be-visited webpage; the first acquiring unit is configured to obtain a pre-recorded second address associated with the first address, and establish a client and the first a first connection of a server, wherein the second address is used to point to the first server, the first server is configured to provide a second resource in the webpage to which the pre-recorded first resource is linked; and the receiving unit is configured to be in the client After the loading of the first resource is completed, the obtaining instruction is received in the client; and the second obtaining unit is configured to obtain the second resource from the first server by using the first connection if the obtaining instruction carries the second address.
- the first resource of the webpage to be accessed is loaded in the client according to the first address, and in the process of acquiring and loading the first resource, Establishing a pre-connection between the client and the first server.
- the second resource may be directly obtained from the first server, instead of performing DNS resolution and establishing a connection in the process of acquiring the second resource. The step, thereby shortening the loading time of the second resource, can solve the technical problem that the browser loads the resource slowly in the related art, thereby achieving the technical effect of improving the resource loading speed.
- FIG. 1 is a schematic diagram of a hardware environment of a method for acquiring a webpage resource according to an embodiment of the present invention
- FIG. 2 is a flowchart of an optional method for acquiring a webpage resource according to an embodiment of the present invention
- FIG. 3 is a flowchart of an optional method for acquiring a webpage resource according to an embodiment of the present invention
- FIG. 4 is a schematic diagram of loading time of a webpage resource in the related art
- FIG. 5 is a schematic diagram of loading time of a webpage resource according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of an optional device for acquiring web resources according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of an optional device for acquiring web resources according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of an optional apparatus for acquiring webpage resources according to an embodiment of the present invention.
- FIG. 9 is a structural block diagram of a terminal according to an embodiment of the present invention.
- Host host name, domain name.
- DNS Parser The Domain Name System DNS (English Name Domain System) resolver resolves the mapping between domain names and IP addresses through a domain name server.
- TCP Connection Transmission Control Protocol TCP (English full name Transmission Control Protocol) connection handshake.
- HTTP Request Sends a hypertext transfer protocol HTTP (English full name HyperText Transfer Protocol) request.
- Server Response The response of the server to the HTTP request.
- Native App development is the traditional App development model (native App development model), the development for IOS, Android and other mobile operating systems to use different languages and frameworks for development, this model is usually by "cloud server data
- the +App application client is composed of two parts. All UI elements, data content and logical framework of the App application are installed on the mobile terminal.
- Web App development is a framework-based App development model (HTML5App framework development model), which has the advantage of cross-platform, which is usually composed of "HTML5 cloud website + App application client".
- the App application client only needs to install the framework part of the application, and the application data is to go to the cloud to present data to the mobile phone user each time the app is opened.
- WeX5 is a component framework that follows the Apache open source protocol, is completely open source and free, includes hundreds of component frameworks, and all open visualizations. Developers can customize components, integrate third-party components, and adopt MVC (English name is Model View Controller, which is Model Model, View View, controller Controller abbreviation) design pattern, data and view separation, page description and code logic separation, support browser debugging, real machine debugging, native debugging, and other debugging modes, developers can master each One line of code.
- MVC International name is Model View Controller, which is Model Model, View View, controller Controller abbreviation
- a method embodiment of a method for acquiring a webpage resource is provided.
- the method for acquiring the webpage resource may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in FIG. 1.
- the server 102 is connected to the terminal 104 through a network.
- the network includes but is not limited to a wide area network, a metropolitan area network, or a local area network.
- the terminal 104 is not limited to a PC, a mobile phone, a tablet, or the like.
- the method for acquiring the webpage resource in the embodiment of the present invention may be executed by the server 102, may be executed by the terminal 104, or may be jointly executed by the server 102 and the terminal 104.
- the method for obtaining the webpage resource by the terminal 104 in the embodiment of the present invention may also be performed by a client installed thereon.
- FIG. 2 is a flowchart of an optional method for acquiring a webpage resource according to an embodiment of the present invention. As shown in FIG. 2, the method may include the following steps:
- Step S202 When the first address of the webpage to be accessed is obtained by the client, the first resource of the webpage to be accessed is loaded in the client according to the first address;
- Step S204 before the loading of the first resource in the client, acquiring a pre-recorded second address associated with the first address, and establishing a first connection between the client and the first server, where the second address is used for Pointing to the first server, the first server is configured to provide a second resource in the webpage to which the pre-recorded first resource is linked;
- Step S206 after completing loading the first resource in the client, receiving an acquisition instruction in the client;
- Step S208 If the acquisition instruction carries the second address, obtain the second resource from the first server by using the first connection.
- the first resource of the web page to be accessed is loaded in the client according to the first address, and the first resource is acquired and loaded in the process of acquiring and loading the first resource.
- the second resource may be directly obtained from the first server, instead of performing DNS resolution and establishing a connection in the process of acquiring the second resource. The steps of the second resource shortening the loading time of the second resource can solve the technical problem that the browser loads the resource slowly in the related art, thereby achieving the technical effect of improving the resource loading speed.
- the above client may be a client on a smart device such as a mobile device or a PC, and the client is used to provide webpage viewing for the user.
- the first address is used to indicate the address information of the web page to be accessed, and may be the URL of the web page to be accessed (the full name of the Uniform Resource Location in English), the IP address, and the like.
- the above resources are resources that can be viewed in the client, such as text, pictures, multimedia, and the like.
- the first resource refers to the main resource of a certain webpage in the client
- the second resource refers to the resource referenced by the first resource in the webpage, such as a resource in the subpage of the webpage, that is, a sub-resource.
- the client can be a web browser on the terminal, such as a browser on a mobile phone.
- the second address is the address of the first server, and the first server is a type of server that is associated with the first address in advance.
- the second address may be a URL, an IP address, or the like of the first server.
- the first connection mentioned above refers to a TCP connection established between the terminal where the client is located and the server.
- the obtaining instruction refers to an instruction for triggering the second resource to be acquired from the first server, and the instruction may be generated by the terminal, or may be generated by clicking the webpage when the user wants to view a certain sub-webpage.
- DNS Parser In the process of loading the main resource by the browser, DNS Parser, TCP Connection, HTTP Request, and Server Response are required to complete the loading of the main resource in the browser. After the parsing, the sub-resources to be loaded are extracted and then loaded. The sub-resources also need to go through several stages: DNS Parser, TCP Connection, HTTP Request, and Server Response.
- the process of loading the main resource and the sub-resource is serial, that is, It is said that the browser knows the sub-resources that need to be loaded after parsing the main resource, and can further load the sub-resources, and provides the address that the sub-resources need to be connected by analyzing the main resources, thereby completing the loading of the main resources and the sub-resources.
- the TCP connection of the sub-resource is completed in advance, and the pre-connection (ie, the preloader mechanism) is implemented, and the DNS Parser and the TCP Connection are prepared in advance before the sub-resource is parsed. It will significantly reduce the network round-trip delay before sending data requests and improve resource loading speed.
- step S202 when the first address of the webpage to be accessed is obtained by the client, the first resource of the webpage to be accessed is loaded in the client according to the first address. That is, when the client receives the request for accessing the webpage, the first resource of the webpage to be accessed is loaded in the client according to the first address of the webpage to be accessed.
- loading the first resource of the to-be-visited webpage in the client according to the first address includes: performing DNS resolution on the first address, obtaining an IP address of the second server, and establishing the client and the first by using the parsed IP address. a third connection between the second server pointed by the address; obtaining, by the third server, the first resource loaded to the client from the second server, mainly comprising: the client sending the HTTP request to the second server by using the third connection, receiving the first The HTTP response packet sent by the second server in response to the HTTP request, and then the transmission of the first resource.
- Step S202 mainly includes but is not limited to the following scenarios:
- the user enters the first address of the web page to be accessed in the address bar of the client, and after the user determines the first address (eg, the user clicks the enter button), the client obtains the first address from the address bar, and then according to the first address. Loading the first resource in the client;
- the client When jumping to the webpage to be accessed, the client obtains the first address of the webpage to be accessed, and then loads the first resource in the client according to the first address, and the jump may be one from the client.
- the web page jumps to the web page to be accessed, and can also jump from another client to the web page to be accessed.
- the data table may be pre-made, and the relationship between the server and the URL address information is saved in the data table.
- the characteristics of a large number of websites are analyzed.
- the address URLs of similar information pages have the same prefix, and the Host server connected to the same page in the history record is used to predict the next connected Host server, and the main resource is loaded.
- the gap is pre-connected to the child resource of the Host server.
- acquiring the pre-recorded second address that is associated with the first address includes: acquiring target character information in the first address, where the target character information includes characters in the first address that meet the preset condition. And determining at least one second address associated with the target character information in the first address in the pre-recorded data table, wherein the data table stores an association relationship between the character information and the second address.
- the obtaining the target character information in the first address includes: deleting the character information associated with the preset character in the first address, and obtaining the target character information, where the preset condition is used to indicate that the target character information is not included Set the character associated with the character.
- the fixed part ie, the target character information
- the parameter ie, the character associated with the preset character
- the main resource URL ie, the first address
- the fixed part is used from the data table. Find the Host server that has collected the sub-resources of this type of page before. If yes, initiate a pre-connection to the Host server of the collected sub-resources. When the sub-resources are loaded, the connection to the same Host server is automatically multiplexed. In order to achieve the purpose of acceleration.
- the server that provides the service is relatively fixed, and the type of information provided by the server is relatively fixed, even if the specific information is updated or changed.
- the corresponding server can still provide updated or changed information (same type of information as before the update). Therefore, when opening the above multiple web pages or the same type of webpage, the connection with the corresponding server is established in advance, which can be lowered. The delay of resource loading, thereby achieving the purpose of improving resource loading efficiency.
- step S206 after the first resource is loaded in the client, the acquisition instruction is received in the client.
- the client may actively trigger the acquisition instruction to complete the pre-loading of the second resource, so as to directly display the user when the user needs to view the resource, thereby improving the user experience;
- the user triggers the acquisition command, that is, when the user needs to view the second resource, the second resource is acquired and loaded to the client for the user to view. Since the DNS resolution and the TCP connection are not required, the loading speed is improved and the user experience is improved.
- the second resource is acquired from the first server by using the first connection.
- the client does not need to perform DNS resolution and establish a TCP connection in the process of acquiring the second resource, but directly acquires the second resource (that is, the TCP connection) established in the process of acquiring the first resource, mainly including the client.
- the terminal sends an HTTP request to the first server by using the first connection, receives an HTTP response data packet sent by the first server in response to the HTTP request, and then performs transmission of the second resource.
- the data table may be updated by: when the obtaining instruction carries the third address (the third address is different from the second address), establishing the client and the The second connection of the server pointed to by the third address, and the resource is obtained from the server pointed to by the third address through the second connection.
- the sub-resource is obtained from the server according to the original mode, and the acquisition process mainly includes DNS Parser, TCP Connection, and HTTP Request. , Server Response several stages.
- the server is also a server for storing the second resource, in order to improve the response speed of the client to load the webpage next time, when the acquisition instruction carries the third address, the target character information in the first address is recorded and the third The association of addresses. In this way, when the web page of the web address with the target character information is next logged in, the pre-connection with the server pointed to by the third address can be established, and the resource is accelerated by the pre-connection.
- the host server that updates and collects the sub-resource corresponding to the main resource is used, and the fixed part of the webpage is used as the key key, and the host server corresponding to the sub-resource exists as the associated information value.
- the cache file (that is, the data table) can be pre-connected when the same page is opened next time, thereby improving the efficiency of the webpage response.
- Step S302 After the loading main resource request is issued, the main resource is loaded according to the main resource URL.
- step S304 in the process of loading the main resource, the fixed part except the parameter in the main resource URL is extracted, and the sub-resource Host of the type page is collected before the fixed part is searched, and if any, the collected sub-resource is initiated. Pre-connection of the resource Host.
- step S306 after the main resource is loaded, the server where each sub-resource is located is obtained through URL resolution.
- Step S308 If the Host corresponding to the sub-resource is not connected, the Host connection is established according to the related technology. If the Host corresponding to the sub-resource is connected, the same Host connection is automatically multiplexed when the sub-resource is loaded.
- Step S310 Update the sub-resource Host, update and collect the sub-resource Host corresponding to the main resource, and use the fixed part as the key, and the sub-resource corresponding to the Host as the value in the cache file, so that the next time the similar page is opened, the pre-connection can be performed.
- each sub-resource is rendered on the screen and displayed on the browser.
- Steps S308 and S310 are mainly described below in conjunction with specific scenarios.
- the date character is determined.
- other characters are truncated from the back as a fixed part.
- the time cost of normal resource loading is shown in Figure 4.
- the network transmission time cost includes the time consumed by DNS Lookup (DNS domain name resolution), TCP Connection (TCP connection), HTTP Request and Response (HTTP request and response), and the server corresponds to
- the rendering time of the terminal includes the time taken by the Server Response (the server responds and returns the resource) and the Client-Side Re ndering (the rendering of the client to display the resource).
- the time cost is shown in Figure 5, the network transmission time cost is greatly reduced.
- the URLs of the same information pages have the same prefix, and the Host is connected to the same type in the history record to predict the next connection Host, and the sub-resources are pre-connected by using the loading main resource gap.
- Host can speed up resource loading, improve page opening speed, and improve user experience.
- the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
- the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
- the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
- FIG. 6 is a schematic diagram of an apparatus for acquiring a webpage resource according to an embodiment of the present invention. As shown in FIG. 6, the apparatus may include: a loading unit 62, a first obtaining unit 64, a receiving unit 66, and a second acquiring. Unit 68.
- the loading unit 62 is configured to: when the first address of the webpage to be accessed is obtained in the client, load the first resource of the webpage to be accessed in the client according to the first address;
- the first obtaining unit 64 is configured to acquire a pre-recorded second address associated with the first address before the loading of the first resource in the client, and establish a first connection between the client and the first server, where The second address is used to point to the first server, and the first server is configured to provide the second resource in the webpage to which the pre-recorded first resource is linked;
- the receiving unit 66 is configured to receive an acquisition instruction in the client after completing loading the first resource in the client;
- the second obtaining unit 68 is configured to acquire the second resource from the first server by using the first connection if the obtaining instruction carries the second address.
- the loading unit 62 in this embodiment may be used to perform step S202 in the embodiment of the present application.
- the first obtaining unit 64 in the embodiment may be used to perform step S204 in the embodiment of the present application.
- the receiving unit 66 in the embodiment may be used to perform step S206 in the embodiment of the present application.
- the second obtaining unit 68 in this embodiment may be used to perform step S208 in the embodiment of the present application.
- the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware.
- the first resource of the webpage to be accessed is loaded in the client according to the first address, and the client is created in the process of acquiring and loading the first resource.
- the pre-connection with the first server when receiving the acquisition instruction in the client, the second resource can be directly obtained from the first server, without performing the steps of performing DNS resolution and establishing a connection in the process of acquiring the second resource, thereby The loading time of the second resource is shortened, and the technical problem that the browser loads the resource at a slow speed in the related art can be solved, thereby achieving the technical effect of improving the resource loading speed.
- the above client may be a client on a smart device such as a mobile device or a PC, and the client is used to provide webpage viewing for the user.
- the first address is used to indicate the address information of the web page to be accessed, and may be a URL, an IP address, or the like of the web page to be accessed.
- the above resources are resources that can be viewed in the client, such as text, pictures, multimedia, and the like.
- the first resource refers to the main resource of a certain webpage in the client
- the second resource refers to the resource referenced by the first resource in the webpage, such as a resource in the subpage of the webpage, that is, a sub-resource.
- the client can be a web browser on the terminal, such as a browser on a mobile phone.
- the second address is the address of the first server, and the first server is a type of server that is associated with the first address in advance.
- the second address may be a URL, an IP address, or the like of the first server.
- the first connection mentioned above refers to a TCP connection established between the terminal where the client is located and the server.
- the obtaining instruction refers to an instruction for triggering the second resource to be acquired from the first server, and the instruction may be generated by the terminal, or may be generated by clicking the webpage when the user wants to view a certain sub-webpage.
- DNS Parser In the process of loading the main resource by the browser, DNS Parser, TCP Connection, HTTP Request, and Server Response are required to complete the loading of the main resource in the browser. After the parsing, the sub-resources to be loaded are extracted and then loaded. The sub-resources also need to go through several stages: DNS Parser, TCP Connection, HTTP Request, and Server Response.
- the process of loading the main resource and the sub-resource is serial, that is, It is said that the browser knows the sub-resources that need to be loaded after parsing the main resource, and can further load the sub-resources, and provides the address that the sub-resources need to be connected by analyzing the main resources, thereby completing the loading of the main resources and the sub-resources.
- the TCP connection of the sub-resource is completed in advance, and the pre-connection (ie, the preloader mechanism) is implemented, and the DNS Parser and the TCP Connection are prepared in advance before the sub-resource is parsed. It will significantly reduce the network round-trip delay before sending data requests and improve resource loading speed.
- the receiving unit may trigger the obtaining instruction after the first resource is loaded in the client, and then complete the pair.
- the second resource is preloaded so as to be directly displayed when the user needs to view the resource, thereby improving the user experience; or the user triggers the acquisition instruction, that is, when the user needs to view the second resource, the second resource is acquired and loaded.
- the client it is convenient for users to watch. As there is no need for DNS resolution and TCP connection, it will increase the loading speed and improve the user experience.
- the loading unit 62 includes: an establishing module, configured to establish a third connection of the client with the second server pointed by the first address; and a second obtaining module configured to obtain from the second server by using the third connection The first resource loaded to the client.
- the functions performed by the loading unit mainly include but are not limited to the following scenarios:
- the user enters the first address of the web page to be accessed in the address bar of the client, and after the user determines the first address (eg, the user clicks the enter button), the client obtains the first address from the address bar, and then according to the first address. Loading the first resource in the client;
- the client When jumping to the webpage to be accessed, the client obtains the first address of the webpage to be accessed, and then loads the first resource in the client according to the first address, and the jump may be one from the client.
- the web page jumps to the web page to be accessed, and can also jump from another client to the web page to be accessed.
- the data table may be pre-made, and the relationship between the server and the URL address information is saved in the data table.
- the characteristics of a large number of websites are analyzed.
- the address URLs of similar information pages have the same prefix, and the Host server connected to the same page in the history record is used to predict the next connected Host server, and the main resource is loaded.
- the gap is pre-connected to the child resource of the Host server.
- the first obtaining unit 64 includes: a first obtaining module 642, configured to acquire target character information in the first address, where the target character information includes a preset condition that satisfies a preset condition Character information; determining module 644, configured to determine at least one second address in the pre-recorded data table associated with the target character information in the first address, wherein the data table holds between the character information and the second address Relationship.
- the first acquiring module is further configured to delete the character information associated with the preset character in the first address to obtain the target character information, wherein the preset condition is used to indicate that the target character information does not include the character associated with the preset character.
- the fixed part ie, the target character information
- the parameter ie, the character associated with the preset character
- the main resource URL ie, the first address
- the fixed part is used from the data table. Find the Host server that has collected the sub-resources of this type of page before. If yes, initiate a pre-connection to the Host server of the collected sub-resources. When the sub-resources are loaded, the connection to the same Host server is automatically multiplexed. In order to achieve the purpose of acceleration.
- the server for providing the service is relatively fixed, and even if the specific information is updated or changed, the corresponding server can provide the update or The changed information, therefore, when the plurality of web pages or the same type of webpages are opened, the connection with the corresponding server is established in advance, which can reduce the delay of resource loading, thereby achieving the purpose of improving resource loading efficiency.
- the apparatus of the present application further includes: a third obtaining unit 82, configured to establish a client after the obtaining instruction carries the third address after receiving the obtaining instruction in the client And the second connection of the server pointed to by the third address, and the resource pointed to by the third address from the server pointed to by the third address, wherein the third address is different from the second address.
- a third obtaining unit 82 configured to establish a client after the obtaining instruction carries the third address after receiving the obtaining instruction in the client And the second connection of the server pointed to by the third address, and the resource pointed to by the third address from the server pointed to by the third address, wherein the third address is different from the second address.
- the foregoing third obtaining unit includes: a recording module, configured to record an association relationship between the target character information in the first address and the third address if the obtaining instruction carries the third address.
- the sub-resource is obtained from the server according to the original mode, and the acquisition process mainly includes DNS Parser, TCP Connection, and HTTP Request. , Server Response several stages.
- the server is also a server for storing the second resource, in order to improve the response speed of the client to load the webpage next time, when the acquisition instruction carries the third address, the target character information in the first address is recorded and the third The association of addresses. In this way, when the web page of the web address with the target character information is next logged in, the pre-connection with the server pointed to by the third address can be established, and the resource is accelerated by the pre-connection.
- the host server that updates and collects the sub-resource corresponding to the main resource is used, and the fixed part of the webpage is used as the key key, and the host server corresponding to the sub-resource exists as the associated information value.
- the cache file (that is, the data table) can be pre-connected when the same page is opened next time, thereby improving the efficiency of the webpage response.
- the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware, where the hardware environment includes a network environment.
- a server or a terminal for implementing the foregoing method for acquiring a webpage resource is further provided.
- FIG. 9 is a structural block diagram of a terminal (ie, an electronic device) according to an embodiment of the present invention.
- the terminal may include: one or more (only one is shown in FIG. 9) processor 901, and a memory. 903.
- a computer program is stored in the memory, and the processor 901 is configured to run a computer program to execute the method for acquiring the webpage resource of the present application.
- the memory 903 can be used to store a computer program and a module, such as a method for acquiring a webpage resource in the embodiment of the present invention, and a program instruction/module corresponding to the device.
- the processor 901 is configured to run a software program stored in the memory 903 and The module, thereby performing various functional applications and data processing, that is, implementing the above-mentioned method for acquiring web resources.
- Memory 903 can include high speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
- memory 903 can further include memory remotely located relative to processor 901, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
- the terminal may further include a transmission device 905, and an input/output device 907, wherein the transmission device 905 is configured to receive or transmit data via a network, and may also be used between the processor and the memory. data transmission.
- the transmission device 905 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network.
- the transmission device 905 is a Radio Frequency (RF) module for communicating with the Internet wirelessly.
- NIC Network Interface Controller
- RF Radio Frequency
- the memory 903 is arranged to store a computer program.
- the processor 901 may be configured to run a computer program stored in the memory 903 to perform the following steps: when acquiring the first address of the web page to be accessed in the client, loading the webpage to be accessed in the client according to the first address a resource; before the loading of the first resource in the client, acquiring a pre-recorded second address associated with the first address, and establishing a first connection between the client and the first server, where the second address is used Pointing to the first server, the first server is configured to provide a second resource in the webpage to which the pre-recorded first resource is linked; after the loading of the first resource in the client, receiving the obtaining instruction in the client; acquiring the instruction When the second address is carried, the second resource is obtained from the first server through the first connection.
- the processor 901 is further configured to: obtain target character information in the first address, where the target character information includes character information that satisfies a preset condition in the first address; and determine the first address in the pre-recorded data table At least one second address associated with the target character information in the data table, wherein the data table stores an association relationship between the character information and the second address.
- the first resource of the web page to be accessed is loaded in the client according to the first address, and the first resource is acquired and loaded.
- the pre-connection of the client to the first server when receiving the acquisition instruction in the client, the second resource can be directly obtained from the first server, without performing the steps of performing DNS resolution and establishing a connection in the process of acquiring the second resource. Therefore, the loading time of the second resource is shortened, and the technical problem that the browser loads the resource at a slow speed in the related art can be solved, thereby achieving the technical effect of improving the resource loading speed.
- the structure shown in FIG. 9 is only illustrative, and the terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (MID). Terminal equipment such as PAD.
- FIG. 9 does not limit the structure of the above electronic device.
- the terminal may also include more or fewer components (such as a network interface, display device, etc.) than shown in FIG. 9, or have a different configuration than that shown in FIG.
- a storage medium is also provided.
- a computer program is stored in the storage medium, and the computer program may be configured to execute a method for acquiring a webpage resource at runtime.
- the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
- the storage medium is arranged to store program code for performing the following steps:
- the storage medium is further arranged to store program code for performing the following steps:
- S21 Obtain target character information in the first address, where the target character information includes character information that meets a preset condition in the first address;
- S22 Determine at least one second address associated with the target character information in the first address in the pre-recorded data table, wherein the data table stores an association relationship between the character information and the second address.
- the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
- ROM Read-Only Memory
- RAM Random Access Memory
- a mobile hard disk e.g., a hard disk
- magnetic memory e.g., a hard disk
- the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
- the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
- a number of instructions are included to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the disclosed client may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种网页资源的获取方法和装置、存储介质、电子装置。其中,该方法包括:在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源;在客户端中完成加载第一资源之前,获取预先记录的与第一地址具有关联关系的第二地址,并建立客户端与第一服务器的第一连接,其中,第二地址用于指向第一服务器,第一服务器用于提供预先记录的第一资源所链接到的网页中的第二资源;在客户端中完成加载第一资源之后,在客户端中接收获取指令;在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。本发明解决了相关技术中浏览器加载资源的速度较慢的技术问题。
Description
本申请要求于提交中国专利局,申请号为2017100541256、发明名称“网页资源的获取方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及互联网领域,具体而言,涉及一种网页资源的获取方法和装置、存储介质、电子装置。
万维网Web(英文全称为World Wide Web)场景已经成为互联网用户使用的核心场景,但是与Native相比,Web被人最大的诟病是性能,加载速度是Web体验的核心指标,而资源加载已经成为加载速度最重要的制约因素,移动网络从2g升级到3g,再升级到4g和无线保真wifi(英文全称为WIreless Fidelity),就是为了解决网络延时和带宽影响数据加载的问题,然而国内网络环境复杂且质量参差不齐,即使用4g和wifi网络,浏览器资源加载速度较慢,依然是制约浏览器速度的关键因素。
针对相关技术中浏览器加载资源的速度较慢的问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例提供了一种网页资源的获取方法和装置、存储介质、电子装置,以至少解决相关技术中浏览器加载资源的速度较慢的技术问题。
根据本发明实施例的一个方面,提供了一种网页资源的获取方法,包括:在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源;在客户端中完成加载第一资源之前,获取 预先记录的与第一地址具有关联关系的第二地址,并建立客户端与第一服务器的第一连接,其中,第二地址用于指向第一服务器,第一服务器用于提供预先记录的第一资源所链接到的网页中的第二资源;在客户端中完成加载第一资源之后,在客户端中接收获取指令;在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。
根据本发明实施例的另一方面,还提供了一种网页资源的获取装置,包括:加载单元,用于在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源;第一获取单元,用于在客户端中完成加载第一资源之前,获取预先记录的与第一地址具有关联关系的第二地址,并建立客户端与第一服务器的第一连接,其中,第二地址用于指向第一服务器,第一服务器用于提供预先记录的第一资源所链接到的网页中的第二资源;接收单元,用于在客户端中完成加载第一资源之后,在客户端中接收获取指令;第二获取单元,用于在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。
在本发明实施例中,在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源,在获取并加载第一资源的过程中,建立客户端与第一服务器的预连接,在客户端中接收到获取指令时,可直接从第一服务器中获取第二资源,而不用在获取第二资源的过程中执行DNS解析和建立连接等步骤,从而缩短了第二资源的加载时间,可以解决相关技术中浏览器加载资源的速度较慢的技术问题,进而达到提高资源加载速度的技术效果。
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的网页资源的获取方法的硬件环境的示意图;
图2是根据本发明实施例的一种可选的网页资源的获取方法的流程图;
图3是根据本发明实施例的一种可选的网页资源的获取方法的流程图;
图4是相关技术中的网页资源的加载时间的示意图;
图5是根据本发明实施例的网页资源的加载时间的示意图;
图6是根据本发明实施例的一种可选的网页资源的获取装置的示意图;
图7是根据本发明实施例的一种可选的网页资源的获取装置的示意图;
图8是根据本发明实施例的一种可选的网页资源的获取装置的示意图;以及
图9是根据本发明实施例的一种终端的结构框图。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
首先,在对本发明实施例进行描述的过程中出现的部分名词或者术语 适用于如下解释:
Host:主机名,域名。
DNS Parser:即域名***DNS(英文全称为Domain Name System)解析器,通过域名服务器解析域名到IP地址之间的映射。
TCP Connection:传输控制协议TCP(英文全称为Transmission Control Protocol)连接握手。
HTTP Request:发送超文本传输协议HTTP(英文全称为HyperText Transfer Protocol)请求。
Server Response:服务器针对HTTP请求的响应。
Native App开发,Native App开发即传统App开发模式(原生App开发模式),该开发针对IOS、Android等不同的手机操作***要采用不同的语言和框架进行开发,该模式通常是由“云服务器数据+App应用客户端”两部份构成,App应用所有的UI元素、数据内容、逻辑框架均安装在手机终端上。
Web App开发:Web App开发即是一种框架型App开发模式(HTML5App框架开发模式),该开发具有跨平台的优势,该模式通常由“HTML5云网站+App应用客户端”两部份构成,App应用客户端只需安装应用的框架部份,而应用的数据则是每次打开App的时候,去云端取数据呈现给手机用户。
WeX5:是遵循Apache开源协议、完全开源免费、包括上百个组件框架、全部开放的可视化的组件框架,开发者可自定义组件,集成第三方组件,采用MVC(英文全称为Model View Controller,是模型Model、视图View、控制器Controller的缩写)设计模式,数据和视图分离,页面描述和代码逻辑分离,支持浏览器调试、真机调试、原生调试,等多种调试模式,开发者可掌握每一行代码。
根据本发明实施例的一个方面,提供了一种网页资源的获取方法的方法实施例。
可选地,在本实施例中,上述网页资源的获取方法可以应用于如图1所示的由服务器102和终端104所构成的硬件环境中。如图1所示,服务器102通过网络与终端104进行连接,上述网络包括但不限于:广域网、城域网或局域网,终端104并不限定于PC、手机、平板电脑等。本发明实施例的网页资源的获取方法可以由服务器102来执行,也可以由终端104来执行,还可以是由服务器102和终端104共同执行。其中,终端104执行本发明实施例的网页资源的获取方法也可以是由安装在其上的客户端来执行。
图2是根据本发明实施例的一种可选的网页资源的获取方法的流程图,如图2所示,该方法可以包括以下步骤:
步骤S202,在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源;
步骤S204,在客户端中完成加载第一资源之前,获取预先记录的与第一地址具有关联关系的第二地址,并建立客户端与第一服务器的第一连接,其中,第二地址用于指向第一服务器,第一服务器用于提供预先记录的第一资源所链接到的网页中的第二资源;
步骤S206,在客户端中完成加载第一资源之后,在客户端中接收获取指令;
步骤S208,在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。
通过上述步骤S202至步骤S208,在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源,在获取并加载第一资源的过程中,建立客户端与第一服务器的预连接,在客户端中接收到获取指令时,可直接从第一服务器中获取第二资源,而不用在获 取第二资源的过程中执行DNS解析和建立连接等步骤,从而缩短了第二资源的加载时间,可以解决相关技术中浏览器加载资源的速度较慢的技术问题,进而达到提高资源加载速度的技术效果。
上述的客户端可以为移动设备或者PC机等智能设备上的客户端,该客户端用于为用户提供网页资源观看。
上述的第一地址为用于指示待访问网页的地址信息,可以为待访问网页的URL(英文全称为Uniform Resource Location,即统一资源定位符)、IP地址等。
上述的资源为可以在客户端中观看的资源,如文字、图片、多媒体等资源。第一资源是指客户端中某个网页的主资源,第二资源是指被该网页中的第一资源所引用的资源,如该网页的子网页中的资源,也即子资源。客户端可以为终端上的网页浏览器,如手机上的浏览器等。
上述的第二地址为第一服务器所在的地址,第一服务器为预先与第一地址建立有关联关系的一类服务器,第二地址具体可以为第一服务器的URL、IP地址等。
上述的第一连接指客户端所在的终端与服务器之间建立的TCP连接。
上述的获取指令是指触发从第一服务器中获取第二资源的指令,该指令可以是终端生成的,也可以是用户想看某个子网页时点击网页生成的。
在浏览器加载主资源的过程中,需要经过DNS Parser(DNS解析)、TCP Connection(TCP连接)、HTTP Request(HTTP请求)、Server Response(服务器响应)几个阶段,在浏览器加载主资源完成后,经过解析提取需要加载的子资源,然后进行加载,加载子资源也需要经过DNS Parser、TCP Connection、HTTP Request、Server Response几个阶段,加载主资源和子资源的过程是串行的,也就是说浏览器在对主资源解析后才知道需要加载的子资源,才能进一步对子资源进行加载,通过对主资源的分析提供子资源需要连接的地址,进而完成主资源和子资源的加载。
而在本申请的技术方案中,在执行加载主资源的过程中,预先完成子资源的TCP Connection,实现预连接(即preloader机制),在解析出子资源前提前做好DNS Parser和TCP Connection就会明显减少发送数据请求前的网络往返延时,提升资源加载速度。下面结合图2详述本申请的实施例。
在步骤S202提供的技术方案中,在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源。即在客户端接收到对待访问网页请求时,根据待访问网页的第一地址在客户端中加载待访问网页的第一资源。
可选地,根据第一地址在客户端中加载待访问网页的第一资源包括:通过对第一地址进行DNS解析,获取第二服务器的IP地址,利用解析得到的IP地址建立客户端与第一地址所指向的第二服务器之间的第三连接;通过第三连接从第二服务器获取加载至客户端的第一资源,主要包括客户端利用第三连接向第二服务器发送HTTP请求,接收第二服务器响应该HTTP请求而发送的HTTP响应数据包,然后进行第一资源的传输。
步骤S202主要包括但不局限于以下几种场景:
(1)用户在客户端的地址栏中输入待访问网页的第一地址,在用户确定第一地址(如用户点击回车按键)之后,客户端从地址栏获取第一地址,进而根据第一地址在客户端中加载第一资源;
(2)用户在客户端的导航页、历史记录、收藏夹等中点击待访问网页时,客户端获取待访问网页的第一地址,进而根据第一地址在客户端中加载第一资源;
(3)当跳转至待访问网页时,该客户端获取待访问网页的第一地址,进而根据第一地址在客户端中加载第一资源,上述跳转可以是从本客户端中的一个网页跳转至待访问网页,也可以从另一客户端跳转至待访问网页。
可选地,在执行本申请的方法之前,可以预先制作好数据表,在数据 表中保存好服务器与URL地址信息之间的关联关系。在本申请中,分析了大量网站的特点,从同类资讯页面的地址URL有相同的前缀出发,通过收集历史记录中同类页面连接的Host服务器来预测下一次连接的Host服务器,并利用加载主资源的间隙预连接子资源的Host服务器。
在步骤S204提供的技术方案中,获取预先记录的与第一地址具有关联关系的第二地址包括:获取第一地址中的目标字符信息,目标字符信息包括第一地址中满足预设条件的字符信息;确定预先记录的数据表中与第一地址中的目标字符信息关联的至少一个第二地址,数据表中保存有字符信息和第二地址之间的关联关系。
可选地,获取第一地址中的目标字符信息包括:删除第一地址中与预设字符关联的字符信息,得到目标字符信息,其中,预设条件用于指示目标字符信息中不包括与预设字符关联的字符。
在加载主资源请求发出后,提取主资源URL(即第一地址)中的除参数(即与预设字符关联的字符)外的固定部分(即目标字符信息),通过固定部分从数据表中查找之前是否收集过此类型页面的子资源的Host服务器,如有则发起对所收集到的子资源的Host服务器的预连接,在加载子资源时会自动复用连接相同的Host服务器的连接,进而达到加速的目的。
对于属于同一网站的多个网页,由于所提供的信息类型相对固定,故而为其提供服务的服务器也相对固定,服务器提供的信息的类型相对固定,即使在具体的信息发生更新或者变化的情况下,对应的服务器依然可以提供更新或者变化后的信息(与更新前的信息类型相同),因此,在打开上述的多个网页或者同一类型的网页时,预先建立与对应的服务器的连接,可以降低资源加载的延迟,进而达到提高资源加载效率的目的。
需要说明的是,由于相同类型的网站之间往往会载用相同或类似的信息,而这些信息往往来源相同或者相似,对于属于不同网站的相同类型的网站,可以建立这些网站的网页的固定部分(即目标字符信息)之间的映 射关系,也即这些网站的网页的固定部分与相同的一类服务器(或者服务器的第二地址)相关联,在检测到该类型的任一网页的子资源的HOST服务器发生变化时,将其更新至上述的一类服务器中,实现对关联关系的更新。
在步骤S206提供的技术方案中,在客户端中完成加载第一资源之后,在客户端中接收获取指令。
在客户端中加载第一资源之后,可以是客户端主动触发获取指令,进而完成对第二资源的预先加载,以便于在用户需要查看该资源时直接展示,进而改善用户的体验;也可以是用户触发获取指令,即用户需要查看第二资源时,再获取第二资源,并加载至客户端,便于用户观看,由于无需进行DNS解析和TCP连接,也会提高加载速度,改善用户体验。
在步骤S208提供的技术方案中,在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。客户端无需在获取第二资源的过程中进行DNS解析和建立TCP连接,而是直接利用获取第一资源的过程中建立的第一连接(即TCP连接)进行第二资源的获取,主要包括客户端利用第一连接向第一服务器发送HTTP请求,接收第一服务器响应该HTTP请求而发送的HTTP响应数据包,然后进行第二资源的传输。
可选地,在客户端中接收到获取指令之后,可通过如下方式对数据表进行更新:在获取指令携带有第三地址(第三地址不同于第二地址)的情况下,建立客户端与第三地址所指向的服务器的第二连接,并通过第二连接从第三地址所指向的服务器中获取资源。
也即在上述的服务器不是预先保存好的与目标字符信息存在关联关系的第一服务器的情况下,按照原先的模式从该服务器获取子资源,获取的过程主要包括DNS Parser、TCP Connection、HTTP Request、Server Response几个阶段。
由于该服务器也是用于存储第二资源的服务器,为了提高客户端在下 一次载入网页的响应速度,在获取指令携带有第三地址的情况下,记录第一地址中的目标字符信息与第三地址的关联关系。这样在下一次登录具有目标字符信息的网址的网页时,就可以建立与第三地址所指向的服务器之间的预连接,通过该预连接来实现资源加速。
在上述实施例中,在客户端响应当前的网页请求时,更新并收集主资源对应的子资源的Host服务器,以网页的固定部分作为关键字key,子资源对应的Host服务器作为关联信息value存在缓存文件(即数据表)中,以便下次打开同类页面时可以预连接,进而提高网页响应的效率。
下面结合图3至图5详述本申请的实施例。
步骤S302,在加载主资源请求发出后,根据主资源URL对主资源进行加载。
步骤S304,在加载主资源的过程中,提取主资源URL中的除参数外的固定部分,通过固定部分查找之前是否收集过此类型页面的子资源Host,如有则发起对所收集到的子资源Host的预连接。
步骤S306,在主资源加载完成之后,通过网址解析,获取各个子资源所在的服务器。
步骤S308,如果子资源对应的Host没有被连接,则按照相关技术建立Host连接,如果子资源对应的Host已连接,在加载子资源时会自动复用连接相同Host连接。
步骤S310,更新子资源Host,更新并收集主资源对应的子资源Host,以固定部分作为key,子资源对应Host作为value存在缓存文件中,以便下次打开同类页面时可以预连接。
步骤S312,对各个子资源进行渲染上屏,在浏览器上进行展示。
下面结合具体的场景对步骤S308和步骤S310进行着重说明。
在用户第一次打开URL链接“
http://info.3g.qq.com/g/s?aid=wechat_ss
&id=wechat_20161018030429&pos=sy01_wechat&icfa=home_touch&f_pid=
135&iarea=244”时,WeX5(一种浏览器内核)会收集这个URL的前缀“http://info.3g.qq.com/g/s?aid=wechat_ss&id=wechat”加载的子资源包括了哪些Host。
下次打开URL链接“
http://info.3g.qq.com/g/s?aid=wechat_ss&id=wech
at_20161018028167&pos=sy01_wechat&icfa=home_touch&f_pid=135&iarea
=244”时,WeX5判断到该链接的前缀“http://info.3g.qq.com/g/s?aid=wechat_ss&id=wechat”已经收集了,加载主资源的同时就发起收集到的子资源Host预连接,并记录这次加载子资源的Host的过程中的新的Host,并根据收集到的数据更新数据表中的关联关系,以确保下次再发起预连接时的准确性。
需要说明的是,关于上述固定部分的确定,可判断URL中的“日期”、“数字”、“id=”、“?”、“=”等字符(即预设字符),判断到日期字符时从前部截断,其它字符则从后面截断作为固定部分。
正常资源加载的时间成本如图4所示,网络传输时间成本包括DNS Lookup(DNS域名解析)、TCP Connection(TCP连接)、HTTP Request and Response(HTTP请求和响应)所消耗的时间,服务器相应于终端的渲染时间包括Server Response(服务器响应并返回资源)、Client-Side Re ndering(客户端为了展示资源进行的渲染)所消耗的时间,相对正常的资源加载,复用预连接的资源加载,节省了DNS Lookup和TCP Connectio n握手过程,时间成本如图5所示,网络传输时间成本被大大降低。
在本申请的技术方案中,通过分析大量网站特点,从同类资讯页面URL有相同前缀出发,通过收集历史记录中同类页面连接Host来预测下一次的连接Host,利用加载主资源间隙预连接子资源Host,可以加快资源加载速度,提升页面打开速度,提高了用户体验。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受 所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
根据本发明实施例的另一个方面,还提供了一种用于实施上述网页资源的获取方法的网页资源的获取装置。图6是根据本发明实施例的一种可选的网页资源的获取装置的示意图,如图6所示,该装置可以包括:加载单元62、第一获取单元64、接收单元66以及第二获取单元68。
加载单元62,被设置为在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源;
第一获取单元64,被设置为在客户端中完成加载第一资源之前,获取预先记录的与第一地址具有关联关系的第二地址,并建立客户端与第一服务器的第一连接,其中,第二地址用于指向第一服务器,第一服务器用于提供预先记录的第一资源所链接到的网页中的第二资源;
接收单元66,被设置为在客户端中完成加载第一资源之后,在客户端中接收获取指令;
第二获取单元68,被设置为在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。
需要说明的是,该实施例中的加载单元62可以用于执行本申请实施例中的步骤S202,该实施例中的第一获取单元64可以用于执行本申请实施例中的步骤S204,该实施例中的接收单元66可以用于执行本申请实施例中的步骤S206,该实施例中的第二获取单元68可以用于执行本申请实施例中的步骤S208。
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。
通过上述模块,在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源,在获取并加载第一资源的过程中,建立客户端与第一服务器的预连接,在客户端中接收到获取指令时,可直接从第一服务器中获取第二资源,而不用在获取第二资源的过程中执行DNS解析和建立连接等步骤,从而缩短了第二资源的加载时间,可以解决相关技术中浏览器加载资源的速度较慢的技术问题,进而达到提高资源加载速度的技术效果。
上述的客户端可以为移动设备或者PC机等智能设备上的客户端,该客户端用于为用户提供网页资源观看。
上述的第一地址为用于指示待访问网页的地址信息,可以为待访问网页的URL、IP地址等。
上述的资源为可以在客户端中观看的资源,如文字、图片、多媒体等资源。第一资源是指客户端中某个网页的主资源,第二资源是指被该网页中的第一资源所引用的资源,如该网页的子网页中的资源,也即子资源。客户端可以为终端上的网页浏览器,如手机上的浏览器等。
上述的第二地址为第一服务器所在的地址,第一服务器为预先与第一地址建立有关联关系的一类服务器,第二地址具体可以为第一服务器的 URL、IP地址等。
上述的第一连接指客户端所在的终端与服务器之间建立的TCP连接。
上述的获取指令是指触发从第一服务器中获取第二资源的指令,该指令可以是终端生成的,也可以是用户想看某个子网页时点击网页生成的。
在浏览器加载主资源的过程中,需要经过DNS Parser(DNS解析)、TCP Connection(TCP连接)、HTTP Request(HTTP请求)、Server Response(服务器响应)几个阶段,在浏览器加载主资源完成后,经过解析提取需要加载的子资源,然后进行加载,加载子资源也需要经过DNS Parser、TCP Connection、HTTP Request、Server Response几个阶段,加载主资源和子资源的过程是串行的,也就是说浏览器在对主资源解析后才知道需要加载的子资源,才能进一步对子资源进行加载,通过对主资源的分析提供子资源需要连接的地址,进而完成主资源和子资源的加载。
而在本申请的技术方案中,在执行加载主资源的过程中,预先完成子资源的TCP Connection,实现预连接(即preloader机制),在解析出子资源前提前做好DNS Parser和TCP Connection就会明显减少发送数据请求前的网络往返延时,提升资源加载速度。
可选地,接收单元在客户端中完成加载第一资源之后,在客户端中接收获取指令时,可以是在客户端中加载第一资源之后,可以是客户端主动触发获取指令,进而完成对第二资源的预先加载,以便于在用户需要查看该资源时直接展示,进而改善用户的体验;也可以是用户触发获取指令,即用户需要查看第二资源时,再获取第二资源,并加载至客户端,便于用户观看,由于无需进行DNS解析和TCP连接,也会提高加载速度,改善用户体验。
可选地,加载单元62包括:建立模块,被设置为建立客户端与第一地址所指向的第二服务器的第三连接;第二获取模块,被设置为通过第三连接从第二服务器获取加载至客户端的第一资源。
加载单元所执行的功能主要包括但不局限于以下几种场景:
(1)用户在客户端的地址栏中输入待访问网页的第一地址,在用户确定第一地址(如用户点击回车按键)之后,客户端从地址栏获取第一地址,进而根据第一地址在客户端中加载第一资源;
(2)用户在客户端的导航页、历史记录、收藏夹等中点击待访问网页时,客户端获取待访问网页的第一地址,进而根据第一地址在客户端中加载第一资源;
(3)当跳转至待访问网页时,该客户端获取待访问网页的第一地址,进而根据第一地址在客户端中加载第一资源,上述跳转可以是从本客户端中的一个网页跳转至待访问网页,也可以从另一客户端跳转至待访问网页。
可选地,在执行本申请的方法之前,可以预先制作好数据表,在数据表中保存好服务器与URL地址信息之间的关联关系。在本申请中,分析了大量网站的特点,从同类资讯页面的地址URL有相同的前缀出发,通过收集历史记录中同类页面连接的Host服务器来预测下一次连接的Host服务器,并利用加载主资源的间隙预连接子资源的Host服务器。
可选地,如图7所示,第一获取单元64包括:第一获取模块642,被设置为获取第一地址中的目标字符信息,其中,目标字符信息包括第一地址中满足预设条件的字符信息;确定模块644,被设置为确定预先记录的数据表中与第一地址中的目标字符信息关联的至少一个第二地址,其中,数据表中保存有字符信息和第二地址之间的关联关系。
上述第一获取模块还被设置为删除第一地址中与预设字符关联的字符信息,得到目标字符信息,其中,预设条件用于指示目标字符信息中不包括与预设字符关联的字符。
在加载主资源请求发出后,提取主资源URL(即第一地址)中的除参数(即与预设字符关联的字符)外的固定部分(即目标字符信息),通过固定部分从数据表中查找之前是否收集过此类型页面的子资源的Host服 务器,如有则发起对所收集到的子资源的Host服务器的预连接,在加载子资源时会自动复用连接相同的Host服务器的连接,进而达到加速的目的。
对于属于同一网站的多个网页,由于所提供的信息类型相对固定,故而为其提供服务的服务器也相对固定,即使在具体的信息发生更新或者变化的情况下,对应的服务器依然可以提供更新或者变化后的信息,因此,在打开上述的多个网页或者同一类型的网页时,预先建立与对应的服务器的连接,可以降低资源加载的延迟,进而达到提高资源加载效率的目的。
需要说明的是,由于相同类型的网站之间往往会载用相同或类似的信息,而这些信息往往来源相同或者相似,对于属于不同网站的相同类型的网站,可以建立这些网站的网页的固定部分(即目标字符信息)之间的映射关系,也即这些网站的网页的固定部分与相同的一类服务器(或者服务器的第二地址)相关联,在检测到该类型的任一网页的子资源的HOST服务器发生变化时,将其更新至上述的一类服务器中,实现对关联关系的更新。
可选地,如图8所示,本申请的装置还包括:第三获取单元82,被设置为在客户端中接收到获取指令之后,在获取指令携带有第三地址的情况下,建立客户端与第三地址所指向的服务器的第二连接,并通过第二连接从第三地址所指向的服务器中获取资源,其中,第三地址不同于第二地址。
上述的第三获取单元包括:记录模块,被设置为在获取指令携带有第三地址的情况下,记录第一地址中的目标字符信息与第三地址的关联关系。
也即在上述的服务器不是预先保存好的与目标字符信息存在关联关系的第一服务器的情况下,按照原先的模式从该服务器获取子资源,获取的过程主要包括DNS Parser、TCP Connection、HTTP Request、Server Response几个阶段。
由于该服务器也是用于存储第二资源的服务器,为了提高客户端在下 一次载入网页的响应速度,在获取指令携带有第三地址的情况下,记录第一地址中的目标字符信息与第三地址的关联关系。这样在下一次登录具有目标字符信息的网址的网页时,就可以建立与第三地址所指向的服务器之间的预连接,通过该预连接来实现资源加速。
在上述实施例中,在客户端响应当前的网页请求时,更新并收集主资源对应的子资源的Host服务器,以网页的固定部分作为关键字key,子资源对应的Host服务器作为关联信息value存在缓存文件(即数据表)中,以便下次打开同类页面时可以预连接,进而提高网页响应的效率。
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现,其中,硬件环境包括网络环境。
根据本发明实施例,还提供了一种用于实施上述网页资源的获取方法的服务器或终端。
图9是根据本发明实施例的一种终端(即电子装置)的结构框图,如图9所示,该终端可以包括:一个或多个(图9中仅示出一个)处理器901、存储器903,存储器中存储有计算机程序,处理器901被设置为运行计算机程序,以执行本申请的网页资源的获取方法。
其中,存储器903可用于存储计算机程序以及模块,如本发明实施例中的网页资源的获取方法和装置对应的程序指令/模块,处理器901被设置为通过运行存储在存储器903内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的网页资源的获取方法。存储器903可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器903可进一步包括相对于处理器901远程设置的存储器,这些远程存储器可以 通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
可选地,如图9所示,该终端还可以包括传输装置905、输入输出设备907,其中,传输装置905用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置905包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置905为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
其中,可选地,存储器903被设置为存储计算机程序。
处理器901可以被设置为运行存储器903存储的计算机程序,以执行下述步骤:在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源;在客户端中完成加载第一资源之前,获取预先记录的与第一地址具有关联关系的第二地址,并建立客户端与第一服务器的第一连接,其中,第二地址用于指向第一服务器,第一服务器用于提供预先记录的第一资源所链接到的网页中的第二资源;在客户端中完成加载第一资源之后,在客户端中接收获取指令;在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。
处理器901还用于执行下述步骤:获取第一地址中的目标字符信息,其中,目标字符信息包括第一地址中满足预设条件的字符信息;确定预先记录的数据表中与第一地址中的目标字符信息关联的至少一个第二地址,其中,数据表中保存有字符信息和第二地址之间的关联关系。
采用本发明实施例,在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源,在获取并加载第一资源的过程中,建立客户端与第一服务器的预连接,在客户端中接收到获取指令时,可直接从第一服务器中获取第二资源,而不用在获取第二资源的 过程中执行DNS解析和建立连接等步骤,从而缩短了第二资源的加载时间,可以解决相关技术中浏览器加载资源的速度较慢的技术问题,进而达到提高资源加载速度的技术效果。
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
本领域普通技术人员可以理解,图9所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图9其并不对上述电子装置的结构造成限定。例如,终端还可包括比图9中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图9所示不同的配置。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
根据本发明的实施例的又一个方面,还提供了一种存储介质。可选地,在本实施例中,上述存储介质中存储有计算机程序,该计算机程序可以被设置为运行时执行网页资源的获取方法。
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:
S11,在客户端中获取到待访问网页的第一地址时,根据第一地址在客户端中加载待访问网页的第一资源;
S12,在客户端中完成加载第一资源之前,获取预先记录的与第一地址具有关联关系的第二地址,并建立客户端与第一服务器的第一连接,其中,第二地址用于指向第一服务器,第一服务器用于提供预先记录的第一资源所链接到的网页中的第二资源;
S13,在客户端中完成加载第一资源之后,在客户端中接收获取指令;
S14,在获取指令携带有第二地址的情况下,通过第一连接从第一服务器中获取第二资源。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:
S21,获取第一地址中的目标字符信息,其中,目标字符信息包括第一地址中满足预设条件的字符信息;
S22,确定预先记录的数据表中与第一地址中的目标字符信息关联的至少一个第二地址,其中,数据表中保存有字符信息和第二地址之间的关联关系。
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算 机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
Claims (14)
- 一种网页资源的获取方法,包括:在客户端中获取到待访问网页的第一地址时,根据所述第一地址在所述客户端中加载所述待访问网页的第一资源;在所述客户端中完成加载所述第一资源之前,获取预先记录的与所述第一地址具有关联关系的第二地址,并建立所述客户端与第一服务器的第一连接,其中,所述第二地址用于指向所述第一服务器,所述第一服务器用于提供预先记录的所述第一资源所链接到的网页中的第二资源;在所述客户端中完成加载所述第一资源之后,在所述客户端中接收获取指令;在所述获取指令携带有所述第二地址的情况下,通过所述第一连接从所述第一服务器中获取所述第二资源。
- 根据权利要求1所述的方法,其中,获取预先记录的与所述第一地址具有关联关系的第二地址包括:获取所述第一地址中的目标字符信息,其中,所述目标字符信息包括所述第一地址中满足预设条件的字符信息;确定预先记录的数据表中与所述第一地址中的目标字符信息关联的至少一个所述第二地址,其中,所述数据表中保存有字符信息和所述第二地址之间的关联关系。
- 根据权利要求2所述的方法,其中,获取所述第一地址中的目标字符信息包括:删除所述第一地址中与预设字符关联的字符信息,得到所述目标字符信息,其中,所述预设条件用于指示所述目标字符信息中不包括与所述预设字符关联的字符。
- 根据权利要求1至3中任意一项所述的方法,其中,在所述客户端中 接收到所述获取指令之后,所述方法还包括:在所述获取指令携带有第三地址的情况下,建立所述客户端与所述第三地址所指向的服务器的第二连接,并通过所述第二连接从所述第三地址所指向的服务器中获取资源,其中,所述第三地址不同于所述第二地址。
- 根据权利要求4所述的方法,其中,在所述获取指令携带有第三地址的情况下,所述方法还包括:记录所述第一地址中的目标字符信息与所述第三地址的关联关系。
- 根据权利要求1所述的方法,其中,根据所述第一地址在所述客户端中加载所述待访问网页的第一资源包括:建立所述客户端与所述第一地址所指向的第二服务器的第三连接;通过所述第三连接从所述第二服务器获取加载至所述客户端的所述第一资源。
- 一种网页资源的获取装置,包括:加载单元,被设置为在客户端中获取到待访问网页的第一地址时,根据所述第一地址在所述客户端中加载所述待访问网页的第一资源;第一获取单元,被设置为在所述客户端中完成加载所述第一资源之前,获取预先记录的与所述第一地址具有关联关系的第二地址,并建立所述客户端与第一服务器的第一连接,其中,所述第二地址用于指向所述第一服务器,所述第一服务器用于提供预先记录的所述第一资源所链接到的网页中的第二资源;接收单元,被设置为在所述客户端中完成加载所述第一资源之后,在所述客户端中接收获取指令;第二获取单元,被设置为在所述获取指令携带有所述第二地址的情况下,通过所述第一连接从所述第一服务器中获取所述第二资源。
- 根据权利要求7所述的装置,其中,所述第一获取单元包括:第一获取模块,被设置为获取所述第一地址中的目标字符信息,其中,所述目标字符信息包括所述第一地址中满足预设条件的字符信息;确定模块,被设置为确定预先记录的数据表中与所述第一地址中的目标字符信息关联的至少一个所述第二地址,其中,所述数据表中保存有字符信息和所述第二地址之间的关联关系。
- 根据权利要求8所述的装置,其中,所述第一获取模块还被设置为删除所述第一地址中与预设字符关联的字符信息,得到所述目标字符信息,其中,所述预设条件用于指示所述目标字符信息中不包括与所述预设字符关联的字符。
- 根据权利要求7至9中任意一项所述的装置,其中,所述装置还包括:第三获取单元,被设置为在所述客户端中接收到所述获取指令之后,在所述获取指令携带有第三地址的情况下,建立所述客户端与所述第三地址所指向的服务器的第二连接,并通过所述第二连接从所述第三地址所指向的服务器中获取资源,其中,所述第三地址不同于所述第二地址。
- 根据权利要求10所述的装置,其中,所述第三获取单元包括:记录模块,被设置为在所述获取指令携带有第三地址的情况下,记录所述第一地址中的目标字符信息与所述第三地址的关联关系。
- 根据权利要求7所述的装置,其中,所述加载单元包括:建立模块,被设置为建立所述客户端与所述第一地址所指向的第二服务器的第三连接;第二获取模块,被设置为通过所述第三连接从所述第二服务器获取加载至所述客户端的所述第一资源。
- 一种存储介质,其中,所述存储介质中存储有计算机程序,所述计算 机程序被设置为运行时执行权利要求1至6中任意一项所述的方法。
- 一种电子装置,包括存储器和处理器,其中,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序,以执行权利要求1至6中任意一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710054125.6 | 2017-01-22 | ||
CN201710054125.6A CN108345606A (zh) | 2017-01-22 | 2017-01-22 | 网页资源的获取方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018133772A1 true WO2018133772A1 (zh) | 2018-07-26 |
Family
ID=62907744
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/072827 WO2018133772A1 (zh) | 2017-01-22 | 2018-01-16 | 网页资源的获取方法和装置、存储介质、电子装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108345606A (zh) |
WO (1) | WO2018133772A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112287261A (zh) * | 2020-10-28 | 2021-01-29 | 维沃移动通信有限公司 | 资源加载方法和电子设备 |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110609714A (zh) * | 2019-07-31 | 2019-12-24 | 百度在线网络技术(北京)有限公司 | 一种数据预取方法、装置、设备及存储介质 |
CN110865810A (zh) * | 2019-11-14 | 2020-03-06 | 北京无限光场科技有限公司 | 资源复用的方法、装置、电子设备及计算机可读存储介质 |
CN111506837B (zh) * | 2020-03-09 | 2023-07-25 | 百度在线网络技术(北京)有限公司 | 搜索方法、装置、电子设备及可读存储介质 |
CN112016014B (zh) * | 2020-08-18 | 2023-12-26 | 北京达佳互联信息技术有限公司 | 网页显示、网页资源生成方法、装置、电子设备及介质 |
CN114780266B (zh) * | 2022-06-20 | 2022-09-27 | 统信软件技术有限公司 | 一种资源访问方法、***及计算设备 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103678324A (zh) * | 2012-09-03 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | 一种用于打开网页的方法、装置和设备 |
CN103729440A (zh) * | 2013-12-30 | 2014-04-16 | 优视科技有限公司 | 一种访问网站的方法及装置 |
CN105338013A (zh) * | 2014-06-26 | 2016-02-17 | 优视科技有限公司 | 一种网络加载方法及装置 |
-
2017
- 2017-01-22 CN CN201710054125.6A patent/CN108345606A/zh active Pending
-
2018
- 2018-01-16 WO PCT/CN2018/072827 patent/WO2018133772A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103678324A (zh) * | 2012-09-03 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | 一种用于打开网页的方法、装置和设备 |
CN103729440A (zh) * | 2013-12-30 | 2014-04-16 | 优视科技有限公司 | 一种访问网站的方法及装置 |
CN105338013A (zh) * | 2014-06-26 | 2016-02-17 | 优视科技有限公司 | 一种网络加载方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112287261A (zh) * | 2020-10-28 | 2021-01-29 | 维沃移动通信有限公司 | 资源加载方法和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN108345606A (zh) | 2018-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018133772A1 (zh) | 网页资源的获取方法和装置、存储介质、电子装置 | |
US10412176B2 (en) | Website access method, apparatus, and website system | |
US9253284B2 (en) | Historical browsing session management | |
CN105095280A (zh) | 一种浏览器缓存方法和装置 | |
US9582600B1 (en) | Cloud browser DOM-based client | |
EP2775407B1 (en) | Method and system for performing local invocation with webpage | |
US20130080577A1 (en) | Historical browsing session management | |
US20130080576A1 (en) | Historical browsing session management | |
EP2761506B1 (en) | Historical browsing session management | |
CN106331149A (zh) | 一种针对客户端环境的网页代码自适应方法 | |
CN104978358B (zh) | 桌面展示网页片段的方法及截取网页片段至桌面展示*** | |
US9749202B1 (en) | Remote session preview management | |
US9740791B1 (en) | Browser as a service | |
CN103246699A (zh) | 一种基于浏览器的数据访问控制方法和装置 | |
CN113590974B (zh) | 推荐页面配置方法、装置、电子设备和计算机可读介质 | |
CN104317570B (zh) | 动态解析Web应用的装置和方法 | |
CN103458065A (zh) | 一种HTML5标准下基于Webkit内核的视频地址提取方法 | |
US20150113093A1 (en) | Application-aware browser | |
CN110674435A (zh) | 页面访问方法、服务器、终端、电子设备及可读存储介质 | |
US11115462B2 (en) | Distributed system | |
US10095791B2 (en) | Information search method and apparatus | |
CN114915565A (zh) | 网络调试的方法和*** | |
US20140237133A1 (en) | Page download control method, system and program for ie core browser | |
TW201320657A (zh) | 用於個人無線網路裝置之資料命令 | |
CN107704491B (zh) | 消息处理方法和装置 |
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: 18741747 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18741747 Country of ref document: EP Kind code of ref document: A1 |