Page loading method and device, electronic equipment and storage medium
By storing page rendering resources in a local repository, pages can be loaded directly from the local machine, solving the problems of loading delays and bandwidth consumption caused by network dependencies, and improving page loading efficiency and user experience.
Patent Information
- Application Number
- CN202511496824.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, web page loading relies on network connections, which leads to page loading delays and reduced response speeds, and frequent network requests consume a lot of bandwidth.
The page rendering resources are pre-stored in the local resource library. When an access request is received, the network transmission is intercepted, and the page is directly read from the local resource library and rendered.
Loading pages using local resources avoids slow loading caused by network latency and instability, improves page loading efficiency, and reduces bandwidth consumption and pressure on the origin server.
Smart Images

Figure CN121502107A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of Internet, and particularly relates to a page loading method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the rapid development of mobile Internet and Internet of Things technology, the fast response of web information and resource management become more and more important.
[0003] In the related art, when a user wants to access a certain web page through a terminal, the terminal sends an access request to a source server corresponding to the web page, the source server finds and returns corresponding page rendering resources according to the URL (Uniform Resource Locator) in the request, and the terminal performs page rendering and display after receiving the page rendering resources. This method relies on network connection, and the page rendering resources need to be loaded online. Network fluctuations may cause page loading delay and response speed decline, and frequent network requests also occupy a lot of bandwidth. SUMMARY
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a page loading method, device, electronic equipment and storage medium.
[0005] In a first aspect, the present disclosure provides a page loading method, comprising: In response to an access request for a target domain name, if the target domain name is a preset domain name, intercepting the routing transmission of the access request to a source server corresponding to the target domain name; storing page rendering resources corresponding to the preset domain name in a local resource library as target resources related to the target domain name; rendering using the target resources to obtain a target page; displaying the target page.
[0006] In a second aspect, the present disclosure also provides a page loading device, comprising: An intercepting module, configured to, in response to an access request for a target domain name, if the target domain name is a preset domain name, intercept the routing transmission of the access request to a source server corresponding to the target domain name; A determining module, configured to store page rendering resources corresponding to the preset domain name in a local resource library as target resources related to the target domain name; A rendering module, configured to render using the target resources to obtain a target page; A display module, configured to display the target page.
[0007] In a third aspect, the present disclosure also provides an electronic device, which comprises: one or more processors; a storage device configured to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the page loading method as described above.
[0008] In a fourth aspect, the present disclosure also provides a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the page loading method as described above.
[0009] Compared with the prior art, the technical solutions provided by the embodiments of the present disclosure have the following advantages: The technical solutions provided by the embodiments of the present disclosure have the following advantages: The technical solutions provided by the embodiments of the present disclosure have the following advantages:
[0010] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0012] Figure 1 A flowchart of a page loading method provided by an embodiment of the present disclosure; Figure 2A structural block diagram of a page loading device provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. Detailed Implementation
[0013] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0014] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0015] To facilitate understanding, the core idea of the technical solution in this application will be explained as follows: Resources used for rendering the page (i.e., page rendering resources, such as HTML files, database data, etc.) are pre-stored in a local resource library. When a page needs to be loaded, the page rendering resources corresponding to the page stored in the local resource library are directly read and the page rendering resources are used for page rendering, instead of obtaining the page rendering resources for page rendering from the source server corresponding to the webpage to be accessed over the network.
[0016] Figure 1 This is a flowchart of a page loading method provided in an embodiment of the present disclosure. This embodiment can be applied to the case of page loading in a client. The method can be executed by a page loading device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, including but not limited to smartphones, PDAs, tablets, wearable devices with displays, desktops, laptops, all-in-ones, smart home devices, etc.
[0017] like Figure 1 As shown, the method may specifically include: S110. In response to an access request to the target domain name, if the target domain name is a preset domain name, intercept the routing transmission of the access request to the source server corresponding to the target domain name.
[0018] The target domain name can be, for example, the domain name that the user currently wants to access. In some scenarios, the target domain name can be the domain name that the user manually enters in the application; in other scenarios, the target domain name can be the domain name corresponding to a specific domain name access request that is automatically triggered by the application after detecting a specific operation. For example, the initial domain name loaded by default when the application starts, or the domain name associated with a function button, link, or menu item when the user clicks a function button, link, or menu item.
[0019] The preset domain name can be, for example, a pre-specified domain name, and the page rendering resources corresponding to the preset domain name are stored in a local resource library. "Local" can be, for example, the terminal executing the technical solution provided in this application, or other devices located on the same local area network as the terminal executing the technical solution provided in this application. The local resource library can be, for example, a database used to store the page rendering resources corresponding to the preset domain name, located within the executing entity executing the technical solution provided in this application, or located on other devices located on the same local area network as the executing entity executing the technical solution provided in this application.
[0020] In practical use, you can set the first-level page and / or second-level page as the default domain name.
[0021] A primary page is, for example, the first page displayed after opening the application, showcasing the application's core functional modules or main content categories. A secondary page is, for example, a page accessed from a primary page's functional module or category, primarily used to display detailed content or subcategories within a specific functional module.
[0022] For example, in an application used to play videos, the homepage is the first-level page. This first-level page includes tabs such as Popular, TV Series, Movies, Anime, and Variety Shows, as well as a search bar. Clicking a tab on the first-level page, such as Movies, will take you to a second-level page. The second-level page is used to display more detailed content categories, video lists, or specific video information under a specific video category or functional module (such as Movies).
[0023] In some scenarios, there can be one or more preset domain names. If there are multiple preset domain names, "the target domain name is a preset domain name" means that the target domain name is any one of the multiple preset domain names.
[0024] The essence of "intercepting the routing of the access request to the origin server corresponding to the target domain name" is to prevent the access request from being sent to the origin server corresponding to the target domain name.
[0025] S120. Use the page rendering resources stored in the local resource library that correspond to the preset domain name as the target resources related to the target domain name.
[0026] Target resources related to the target domain can be, for example, page rendering resources corresponding to the target domain, used to render the webpage corresponding to the target domain.
[0027] There are multiple ways to implement this step, and this application does not limit them. For example, the implementation method of this step may include: determining the storage path of the page rendering resource corresponding to the preset domain name in the local resource library based on the Uniform Resource Locator in the access request; obtaining the page rendering resource corresponding to the preset domain name based on the storage path; and using the page rendering resource corresponding to the preset domain name as the target resource related to the target domain name.
[0028] Alternatively, after identifying the target resource, file I / O interfaces (such as the fopen and fread functions) can be used for file access.
[0029] S130. Render the target resource to obtain the target page.
[0030] S140. Display the target page.
[0031] The technical solution provided in this application sets up a response to access requests to a target domain. If the target domain is a preset domain, the access request is intercepted and routed to the origin server corresponding to the target domain. Page rendering resources corresponding to the preset domain, stored in a local resource library, are used as target resources related to the target domain. The target resources are then used for rendering to obtain the target page, which is then displayed. Essentially, the resources used for page rendering are pre-stored in a local resource library. When a page needs to be loaded, the target resources corresponding to that page are directly read from the local resource library, and page rendering is completed based on these target resources. This is different from relying on the network to obtain target resources from the origin server corresponding to the target webpage after receiving an access request to the target domain. Because this method completes page loading through local resources without relying on a network connection, it effectively avoids problems such as slow page loading and untimely response caused by network latency or instability, thus significantly improving page loading efficiency and user experience. Furthermore, since resources do not need to be loaded via the network, this solution can also effectively reduce bandwidth consumption and lower the access pressure on the origin server.
[0032] It should also be noted that in the above technical solution, since the target resources related to the target domain can already be directly obtained from the local resource library and used for page rendering, requesting the same resources from the origin server corresponding to the target domain is an unnecessary operation. This operation not only increases network transmission overhead but also increases the load on the origin server. Therefore, if the target domain is a preset domain, the routing transmission of access requests to the origin server corresponding to the target domain is blocked.
[0033] Based on the above technical solution, optionally, before S120, the method further includes: resolving the target domain name to a local IP address based on the domain name mapping file stored locally, so as to trigger an access link to search for the target resource in the local resource library.
[0034] Domain name mapping files can be, for example, local hosts files or files stored in a local DNS resolver that record the mapping relationship between domain names and IP addresses.
[0035] It is important to emphasize that in some scenarios, the step of "resolving the target domain name to a local IP address based on the domain name mapping file stored locally" is completed locally, rather than on a DNS server. This can significantly reduce the network dependence on loading the target domain name.
[0036] "Triggering an access link to search for the target resource in the local repository" could, for example, trigger the local device to undertake the service of providing the target resource related to the target domain name. In other words, setting up a domain name mapping file stored locally to resolve the target domain name to a local IP address aims to ensure that the local device undertakes the service of providing the target resource related to the target domain name.
[0037] Furthermore, before setting S110, the method may also include: editing a domain name mapping file to establish a mapping relationship between a preset domain name and a local IP address. The purpose of this setting is to ensure that when the target domain name is a preset domain name, the target domain name can be resolved to a local IP address.
[0038] In practical applications, as the content on the source server is continuously updated, the page resources stored therein may change. To ensure that the page rendering resources stored in the local resource library are consistent with those on the source server, and to avoid lag due to the local resource library not being updated for a long time, the method may optionally further include, based on the above technical solution: sending a resource update request for the preset domain name to a first source server associated with the preset domain name; obtaining a resource update data packet from the first source server; and updating the page rendering resources corresponding to the preset domain name stored in the local resource library based on the resource update data packet.
[0039] Resource update data packets, for example, could be data packets used to update page rendering resources stored in a local repository.
[0040] In some scenarios, resource update data packets can be complete data packets or incremental update data packets.
[0041] "A resource update data package is a complete data package." For example, a resource update data package could include the complete content used to render a webpage corresponding to a preset domain name, and the rendering of the webpage corresponding to the target domain name can be completed based solely on the resource update data. That is, its resource update data package may include parts that are the same as the page rendering resources stored in the local resource library, as well as parts that are different from the page resources stored in the local resource library.
[0042] For example, suppose the page rendering resource corresponding to the preset domain name stored in the local resource library is the first resource; the page rendering resource corresponding to the preset domain name stored in the first source server is the second resource; the version of the second resource is higher than the version of the first resource. The terminal sends a resource update request for the preset domain name to the first source server associated with the preset domain name; the server sends the second resource as a resource update data packet to the terminal; the terminal updates the first resource stored in the local resource library based on the resource update data packet. In this scenario, the terminal updating the first resource stored in the local resource library based on the resource update data packet may include: the terminal storing the second resource and deleting the first resource.
[0043] "A resource update data package is an incremental update data package." For example, a resource update data package might include a portion of the content used to render the webpage corresponding to the target domain. Rendering the webpage corresponding to the preset domain cannot be completed based solely on the resource update data. The resource update data package does not include the parts identical to the page rendering resources stored in the local resource library, but it does include the parts that differ from those stored in the local resource library. Combining the resource update data package with the page rendering resources stored in the local resource library constitutes the complete content used to render the webpage corresponding to the preset domain.
[0044] For example, the page rendering resource corresponding to the preset domain name stored in the local resource library is the first resource; the page rendering resource corresponding to the preset domain name stored in the first source server is the second resource; the resource update request includes version information of the first resource; the first source server is used to determine the resource update data packet based on the version information of the first resource; the resource update data packet is the incremental update data packet required from the first resource to the second resource; based on the resource update data packet, updating the page rendering resource corresponding to the preset domain name stored in the local resource library includes: combining the first resource stored in the local resource library with the incremental update data packet to obtain the updated page rendering resource corresponding to the preset domain name.
[0045] If the resource update data packet is an incremental update data packet, it means that the size of the resource update data is small. When transmitting the resource update data packet in the network, the amount of data that needs to be transmitted is small, and the bandwidth consumption is low.
[0046] Through the above update mechanism, the terminal can obtain the latest resources from the source server in a timely manner and update the old version resources in the local resource library, thereby effectively reducing the lag of local resources and improving the accuracy and real-time performance of local resources.
[0047] Furthermore, there are various opportunities to "send a resource update request for the preset domain name to the first source server associated with the preset domain name," and this application does not limit this. For example, at preset time intervals, a resource update request for the preset domain name is periodically sent to the first source server associated with the preset domain name; and / or, if there are no valid page rendering resources associated with the preset domain name in the local machine, a resource update request for the preset domain name is sent to the first source server associated with the preset domain name.
[0048] The essence of "periodically sending resource update requests for a preset domain name to the first source server associated with the preset domain name at preset time intervals" is that the terminal spontaneously and periodically updates the target resources stored in the local resource library to minimize the possibility of inconsistency between the page rendering resources stored locally and the page rendering resources stored on the server.
[0049] In some scenarios, "not including page rendering resources related to the preset domain name that are in a valid state locally" includes various situations, and this application does not limit these. For example, "not including page rendering resources related to the preset domain name that are in a valid state locally" includes at least one of the following situations: Situation 1: The local resource library does not store page rendering resources related to the preset domain name; Situation 2: Although the local resource library stores page rendering resources related to the preset domain name, the page rendering resources stored in the local resource library are in a corrupted state and cannot be rendered; Situation 3: Although the local resource library stores page rendering resources related to the preset domain name, and the page rendering resources are in an undamaged state, because the time interval between the last update time of the page rendering resources and the current time is long, exceeding the unset validity period, it is determined that the page rendering resources stored in the local resource library are inconsistent with the page rendering resources stored on the server.
[0050] Based on the above technical solution, optionally, if the target domain name is not a preset domain name, the access request will be sent to the source server associated with the target domain name.
[0051] In practical applications, not all domain names are suitable for the technical solutions provided in this application. For example, web pages that rely on user input to determine the displayed content (such as search engine pages that return results based on search terms) have highly personalized and real-time requirements, and are not suitable for the technical solutions provided in this application. To ensure that such pages can still load and be displayed normally, the system is configured to send access requests to the origin server associated with the target domain if the target domain is not a preset domain, so as to obtain the necessary resources through the origin server, thereby ensuring the integrity and real-time nature of the page content.
[0052] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0053] Figure 2 This is a schematic diagram of a page loading device according to an embodiment of this disclosure. The page loading device provided in this embodiment can be configured in a client or in a server. See also Figure 2 The page loading device specifically includes: The interception module 210 is used to respond to an access request to a target domain name, and if the target domain name is a preset domain name, to intercept the routing transmission of the access request to the source server corresponding to the target domain name; The determination module 220 is used to use the page rendering resources stored in the local resource library corresponding to the preset domain name as the target resources related to the target domain name; Rendering module 230 is used to render the target resource to obtain the target page; Display module 240 is used to display the target page.
[0054] Further, module 220 is defined as being used for: Based on the Uniform Resource Locator in the access request, determine the storage path of the page rendering resource corresponding to the preset domain name in the local resource library; Based on the storage path, the page rendering resources corresponding to the preset domain name are obtained; The page rendering resources corresponding to the preset domain name are used as target resources related to the target domain name.
[0055] Furthermore, the device also includes a parsing module for: Before using the page rendering resources corresponding to the preset domain name stored in the local resource library as the target resources related to the target domain name, the target domain name is resolved to a local IP address based on the domain name mapping file stored locally, so as to trigger the access link to find the target resource in the local resource library.
[0056] Furthermore, the device also includes an editing module for: In response to an access request to a target domain name, if the target domain name is a preset domain name, before intercepting the routing transmission of the access request to the source server, the domain name mapping file is edited so that the preset domain name has a mapping relationship with the local IP address.
[0057] Furthermore, the device also includes an update module for: Send a resource update request for the preset domain name to the first source server associated with the preset domain name; Obtain resource update data packets from the first source server; Based on the resource update data package, the page rendering resources corresponding to the preset domain name stored in the local resource library are updated.
[0058] Further, the page rendering resources corresponding to the preset domain name stored in the local resource library are the first resources; the page rendering resources corresponding to the preset domain name stored in the first source server are the second resources; the resource update request includes version information of the first resource; the first source server is used to determine the resource update data packet based on the version information of the first resource; the resource update data packet is the incremental update data packet required from the first resource to the second resource; Furthermore, the device also includes an update module for: The first resource stored in the local resource library is combined with the incremental update data package to obtain the updated page rendering resource corresponding to the preset domain name.
[0059] Furthermore, update the module for: At preset time intervals, periodically send resource update requests for the preset domain name to a first source server associated with the preset domain name; and / or, If there are no valid page rendering resources related to the preset domain name in the local storage, a resource update request for the preset domain name is sent to the first source server associated with the preset domain name.
[0060] Furthermore, the device also includes a transmitting module for: If the target domain name is not the preset domain name, the access request will be sent to the source server associated with the target domain name.
[0061] The page loading apparatus provided in this disclosure embodiment can execute the steps performed by the client in the page loading method provided in this disclosure method embodiment, and has the execution steps and beneficial effects, which will not be described in detail here.
[0062] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 3 The diagram illustrates a structural schematic suitable for implementing the electronic device 1000 in the embodiments of this disclosure. The electronic device 1000 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0063] like Figure 3 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003 to implement the page loading method as described in the embodiments of this disclosure. The RAM 1003 also stores various programs and information required for the operation of the electronic device 1000. The processing device 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0064] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to exchange information with other devices wirelessly or via wired communication. Although Figure 3 An electronic device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0065] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the page loading method as described above. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.
[0066] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include information signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated information signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0067] In some implementations, clients and servers may communicate using any known or future network protocol, such as HTTP (Hypertext Transfer Protocol), and may interconnect with any form or medium of digital information communication (e.g., communication networks). Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any known or future networks.
[0068] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0069] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: In response to an access request to a target domain name, if the target domain name is a preset domain name, the routing transmission of the access request to the source server corresponding to the target domain name is intercepted; Use the page rendering resources corresponding to the preset domain name stored in the local resource library as the target resources related to the target domain name; The target resource is used for rendering to obtain the target page; Display the target page.
[0070] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0071] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0072] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0073] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0074] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0075] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0076] According to one or more embodiments of this disclosure, this disclosure provides an electronic device, including: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement any of the page loading methods provided in this disclosure.
[0077] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements a page loading method as described in any of the present disclosure.
[0078] This disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the page loading method described above.
[0079] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0080] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A page loading method, characterized in that, include: In response to an access request to a target domain name, if the target domain name is a preset domain name, the routing transmission of the access request to the source server corresponding to the target domain name is intercepted; The page rendering resources corresponding to the preset domain name stored in the local resource library are used as the target resources related to the target domain name; The target resource is used for rendering to obtain the target page; Display the target page.
2. The method according to claim 1, characterized in that, The step of using the page rendering resources stored in the local resource library corresponding to the preset domain name as the target resources related to the target domain name includes: Based on the Uniform Resource Locator in the access request, determine the storage path of the page rendering resource corresponding to the preset domain name in the local resource library; Based on the storage path, the page rendering resources corresponding to the preset domain name are obtained; The page rendering resources corresponding to the preset domain name are used as target resources related to the target domain name.
3. The method according to claim 1, characterized in that, Before using the page rendering resources stored in the local resource library corresponding to the preset domain name as the target resources related to the target domain name, the method further includes: Based on the domain name mapping file stored locally, the target domain name is resolved to a local IP address to trigger an access link to search for the target resource in the local resource library.
4. The method according to claim 3, characterized in that, In response to an access request to a target domain name, if the target domain name is a preset domain name, before intercepting the routing transmission of the access request to the source server, the method further includes: Edit the domain name mapping file to establish a mapping relationship between the preset domain name and the local IP address.
5. The method according to claim 1, characterized in that, The method further includes: Send a resource update request for the preset domain name to the first source server associated with the preset domain name; Obtain resource update data packets from the first source server; Based on the resource update data package, the page rendering resources corresponding to the preset domain name stored in the local resource library are updated.
6. The method according to claim 5, characterized in that, The page rendering resources corresponding to the preset domain name stored in the local resource library are the first resources; the page rendering resources corresponding to the preset domain name stored in the first source server are the second resources; the resource update request includes version information of the first resource; the first source server is used to determine the resource update data packet based on the version information of the first resource; the resource update data packet is the incremental update data packet required from the first resource to the second resource; The step of updating the page rendering resources corresponding to the preset domain name stored in the local resource library based on the resource update data package includes: The first resource stored in the local resource library is combined with the incremental update data package to obtain the updated page rendering resource corresponding to the preset domain name.
7. The method according to claim 5, characterized in that, Sending a resource update request for the preset domain name to the first source server associated with the preset domain name includes: At preset time intervals, periodically send resource update requests for the preset domain name to a first source server associated with the preset domain name; and / or, If there are no valid page rendering resources related to the preset domain name in the local storage, a resource update request for the preset domain name is sent to the first source server associated with the preset domain name.
8. The method according to claim 1, characterized in that, Also includes: If the target domain name is not the preset domain name, the access request will be sent to the source server associated with the target domain name.
9. A page loading device, characterized in that, include: The interception module is used to respond to access requests to a target domain name. If the target domain name is a preset domain name, it intercepts the routing transmission of the access request to the source server corresponding to the target domain name. The determination module is used to identify the page rendering resources stored in the local resource library that correspond to the preset domain name as the target resources related to the target domain name; The rendering module is used to render the target resource to obtain the target page; The display module is used to display the target page.
10. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-8.