CN113901362A - Webpage display method, device, equipment, storage medium and program product - Google Patents

Webpage display method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN113901362A
CN113901362A CN202111413798.9A CN202111413798A CN113901362A CN 113901362 A CN113901362 A CN 113901362A CN 202111413798 A CN202111413798 A CN 202111413798A CN 113901362 A CN113901362 A CN 113901362A
Authority
CN
China
Prior art keywords
url address
webpage
network
webpage element
target url
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111413798.9A
Other languages
Chinese (zh)
Inventor
孙文韬
巫建平
丁汉飞
李骁
鲍家晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qichacha Technology Co ltd
Original Assignee
Qichacha Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qichacha Technology Co ltd filed Critical Qichacha Technology Co ltd
Priority to CN202111413798.9A priority Critical patent/CN113901362A/en
Publication of CN113901362A publication Critical patent/CN113901362A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a webpage display method, a webpage display device, a webpage display equipment, a webpage display storage medium and a webpage display program product. The method comprises the following steps: the network monitoring handle object acquires an encapsulated object submitted by an operating system, wherein the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS (input/output system); the network monitoring handle object acquires a target URL address corresponding to the network request according to the packaging object; the network monitoring handle object inquires a webpage element cache database based on the target URL address, and returns a first webpage element corresponding to the target URL address to an initiating object of a network request when the first webpage element is inquired, so that the initiating object can display a webpage based on the first webpage element. By adopting the method, the webpage display efficiency can be improved.

Description

Webpage display method, device, equipment, storage medium and program product
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a program product for displaying a web page.
Background
With the rapid development of internet technology, application software for users to use various functions in the operating system of a mobile device has become a conventional operation, and during the use of the application software, related content is often requested through a network and is displayed on a webpage. The IOS operating system is an operating system in a common mobile device today, but the IOS operating system cannot realize web page display when the network is disconnected, thereby affecting the efficiency of web page display. Therefore, the problem of realizing webpage display under the condition of network outage of the IOS is in urgent need of solving.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a web page display method, apparatus, device, readable storage medium and program product capable of improving web page display efficiency.
In a first aspect, the present application provides a method for displaying a webpage. The method comprises the following steps:
the network monitoring handle object acquires an encapsulated object submitted by an operating system, wherein the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS (input/output system); the network monitoring handle object acquires a target URL address corresponding to the network request according to the packaging object; the network monitoring handle object inquires a webpage element cache database based on the target URL address, and returns a first webpage element corresponding to the target URL address to an initiating object of a network request when the first webpage element is inquired, so that the initiating object can display a webpage based on the first webpage element.
In one embodiment, the acquiring, by the network monitoring handle object according to the encapsulated object, the target URL address corresponding to the network request includes: the network monitoring handle object acquires an original URL address corresponding to the network request according to the packaging object; the network monitor handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field comprises at least one of an encryption field and a time stamp field.
In one embodiment, the method further comprises: when the first webpage element corresponding to the target URL address is not inquired, the network monitoring handle object initiates a network request to a server based on the original URL address, and when the server returns a second webpage element, the second webpage element and the target URL address are correspondingly stored in the webpage element cache database.
In one embodiment, storing the second web page element in the web page element cache database in correspondence with the target URL address includes: acquiring a domain name corresponding to the initiated network request; determining a storage path based on the domain name, and creating a storage node in the webpage element cache database based on the storage path; and correspondingly storing the second webpage element and the target URL address in the storage node.
In one embodiment, the web page element cache database is a linked list, and the method further includes: and deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
In one embodiment, before the network monitor handler object obtains the encapsulation object submitted by the operating system, the method further comprises: the network monitor handle object is registered when the browser object is created.
In one embodiment, the network monitor handle object comprises a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
In a second aspect, the application further provides a webpage display device. The device includes:
the first acquisition module is used for acquiring an encapsulated object submitted by an operating system by a network monitoring handle object, wherein the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS (input/output system); the second acquisition module is used for acquiring a target URL address corresponding to the network request by the network monitoring handle object according to the packaging object; and the query module is used for querying the webpage element cache database by the network monitoring handle object based on the target URL address, and returning the first webpage element to the initiating object of the network request when the first webpage element corresponding to the target URL address is queried so that the initiating object can display a webpage based on the first webpage element.
In one embodiment, the second obtaining module is specifically configured to: the network monitoring handle object acquires an original URL address corresponding to the network request according to the packaging object; the network monitor handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field comprises at least one of an encryption field and a time stamp field.
In one embodiment, the apparatus further comprises:
and the storage module is used for initiating a network request to a server based on the original URL address by the network monitoring handle object when the first webpage element corresponding to the target URL address is not inquired, and correspondingly storing the second webpage element and the target URL address in the webpage element cache database when the server returns the second webpage element.
In one embodiment, the storage module is specifically configured to: acquiring a domain name corresponding to the initiated network request; determining a storage path based on the domain name, and creating a storage node in the webpage element cache database based on the storage path; and correspondingly storing the second webpage element and the target URL address in the storage node.
In one embodiment, the web page element cache database is a linked list, and the apparatus further includes:
and the deleting module is used for deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
In one embodiment, before the network monitor handler object obtains the encapsulation object submitted by the operating system, the apparatus further comprises:
and the creating module is used for registering the network monitoring handle object when the browser object is created.
In one embodiment, the network monitor handle object comprises a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
In a third aspect, the present application further provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method according to any one of the first aspect when executing the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the first aspects described above.
In a fifth aspect, the present application also provides a computer program product comprising a computer program that, when executed by a processor, performs the steps of the method of any of the first aspects described above.
According to the webpage display method, the webpage display device, the computer equipment, the storage medium and the program product, the packaging object of the network request submitted by the IOS is obtained through the network monitoring handle object, the target URL address corresponding to the network request is obtained according to the packaging object, so that the webpage element cache database can be inquired according to the target URL address, and when the first webpage element corresponding to the target URL address is inquired, the first webpage element is returned to the initiating object of the network request, so that the initiating object can display the webpage based on the first webpage element; therefore, the webpage can be displayed when the IOS system is disconnected by directly acquiring the first webpage element from the webpage element cache database under the condition that the first webpage element cannot be acquired from the server when the network is disconnected, and the webpage display efficiency is greatly improved.
Drawings
FIG. 1 is a flowchart illustrating a web page display method according to an embodiment;
FIG. 2 is a flow diagram illustrating a process for obtaining a URL address in one embodiment;
FIG. 3 is a schematic flow chart illustrating storing a second web page element in one embodiment;
FIG. 4 is a schematic diagram illustrating an embodiment of a process for retrieving web page elements;
FIG. 5 is a block diagram showing the structure of a web page display apparatus according to an embodiment;
FIG. 6 is a block diagram showing a second exemplary embodiment of a web page display apparatus;
FIG. 7 is a block diagram showing a third exemplary embodiment of a web page display apparatus;
FIG. 8 is a block diagram of a fourth apparatus for displaying webpages in one embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
With the rapid development of internet technology, application software for users to use various functions in the operating system of a mobile device has become a conventional operation, and during the use of the application software, related content is often requested through a network and is displayed on a webpage. The IOS operating system is an operating system in a common mobile device today, but the IOS operating system cannot realize web page display when the network is disconnected, thereby affecting the efficiency of web page display. Therefore, the problem of realizing webpage display under the condition of network outage of the IOS is in urgent need of solving.
In an embodiment, as shown in fig. 1, a web page presentation method is provided, and this embodiment is illustrated by applying the method to a terminal, it is to be understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step 101, a network monitor handle object obtains an encapsulated object submitted by an operating system, where the encapsulated object includes a network request intercepted and encapsulated by the operating system, and the operating system is an IOS operating system.
When a user clicks a webpage link in application software to browse related webpage elements, a network request for acquiring the webpage elements needs to be sent to a server of the application software, and the related webpage elements are displayed according to the response of the application software to the network request, wherein the webpage elements comprise an HTML (Hypertext Mark-up Language) file, a CSS (parsing Style documents) file, JAVAScript and the like; in the IOS operating system, under the condition of network disconnection, the system intercepts the network request and encapsulates the network request into a network request object, namely an encapsulated object; the network monitoring handle object pre-established in the application software realizes the WKURLSchemehandler protocol of the IOS system; after a network request corresponding to the web page link is initiated, the network monitor handle object may obtain the encapsulation object, thereby further obtaining the network request.
And 102, the network monitoring handle object acquires a target URL address corresponding to the network request according to the packaging object.
After the network monitoring handle object acquires the encapsulated object submitted by the operating system, the network request can be acquired according to the encapsulated object because the encapsulated object is formed by intercepting and encapsulating the network request by the system; the network request specifically includes a URL (Uniform Resource Locator) address of a web link of a web element to be acquired, that is, a target URL address; after the network monitor handle object obtains the encapsulation object submitted by the operating system, because the network monitor handle object realizes the WKURLSchemehandler protocol of the IOS system, the encapsulation object can be obtained through the protocol, and the target URL address can be further obtained.
Step 103, the network monitoring handle object queries a webpage element cache database based on the target URL address, and returns the first webpage element to the initiating object of the network request when the first webpage element corresponding to the target URL address is queried, so that the initiating object can display a webpage based on the first webpage element.
The mobile device is provided with a webpage element cache database, wherein the webpage element cache database comprises webpage elements corresponding to webpage links clicked by a user in the application software, the webpage elements are obtained from a server through corresponding network requests, and URL addresses and the webpage elements in the network requests corresponding to the webpage links are correspondingly stored in the webpage element cache database. After the network monitoring handle object acquires a target URL address of a webpage link of a webpage element to be acquired, inquiring a webpage element cache database based on the target URL address so as to inquire the webpage element corresponding to the target URL address, wherein the webpage element is a first webpage element; and returning the first webpage element to an initiating object of the network request, namely sending the first webpage element to a webpage link corresponding to the network request so that the initiating object can display a webpage based on the first webpage element.
In the webpage display method, a packaged object of a network request submitted by an IOS (input/output system) is obtained through a network monitoring handle object, and a target URL (uniform resource locator) address corresponding to the network request is obtained according to the packaged object, so that a webpage element cache database can be inquired according to the target URL address, and when a first webpage element corresponding to the target URL address is inquired, the first webpage element is returned to an initiating object of the network request, so that the initiating object can display a webpage based on the first webpage element; therefore, the webpage can be displayed when the IOS system is disconnected by directly acquiring the first webpage element from the webpage element cache database under the condition that the first webpage element cannot be acquired from the server when the network is disconnected, and the first webpage element does not need to be acquired from the server, so that the webpage display efficiency is greatly improved.
In one embodiment, before the network monitor handler object obtains the encapsulation object submitted by the operating system, the method further comprises: the network monitor handle object is registered when the browser object is created.
The network monitor handle object comprises a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
In application software, a page which is loaded after each webpage link is clicked and used for displaying a webpage element is a browser object, and the webpage element acquired according to a network request is displayed in the browser object; the network monitor handle object is registered in the application software when the browser object is created. Further, the network monitor handle object comprises a network session control object and a network request cache object; the network session control object is specifically used for acquiring an encapsulated object which is submitted by an operating system and encapsulated according to a network request, and describing various attributes of the network request, such as a hyperlink address and the like; and the web session control object is further specifically configured to obtain a target URL address based on the encapsulation object, so that the first web page element can be further obtained according to the target URL address. The network monitoring handle object also comprises a network request cache object, wherein the network request cache object is specifically used for managing data in the webpage element cache database based on the target URL address, namely, each URL address and each webpage element acquired from a server according to the URL address are stored in the webpage element cache database, and under the condition of network disconnection, the corresponding first webpage element is searched from the webpage element cache database based on the target URL address acquired by the network session control object, so that the network session control object returns the first webpage element to the initiating object of the network request, and the initiating object displays a webpage based on the first webpage element.
The target URL address can be obtained by establishing the network monitoring handle object, so that the first webpage element corresponding to the target URL address can be directly obtained from the webpage element cache database, the time for the network request initiating object to obtain the first webpage element is shortened, and the webpage display efficiency is improved.
In an embodiment, as shown in fig. 2, which illustrates a flowchart of obtaining a URL address provided in an embodiment of the present application, where the network monitor handle object obtains a target URL address corresponding to a network request according to the encapsulated object, including:
step 201, the network monitoring handle object obtains the original URL address corresponding to the network request according to the encapsulated object.
Step 202, the network monitor handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field includes at least one of an encryption field and a timestamp field.
The network monitoring handle object acquires an encapsulated object submitted by an operating system, and the URL address acquired from the encapsulated object is an original URL address; the original URL address also comprises fields such as encryption and time stamps, wherein the fields such as the encryption and the time stamps are target fields, and corresponding webpage elements are acquired from a webpage element cache database by taking the URL address as an index, so that the fields such as the encryption and the time stamps in the original URL address are standardized and converted into a standard format; for example, for the same web page link, network requests are all initiated at different times, the URL addresses of the web page link in the network requests corresponding to the different times are the same, but fields such as encryption, timestamp and the like are different, but because the URL addresses are used as indexes to query corresponding web page elements, the existence of the fields such as encryption, timestamp and the like can affect the speed, accuracy and the like of the query of the web page elements, and the fields such as encryption, timestamp and the like are all converted into a 00000000 format, so that the effect of the fields on the query of the web page elements is eliminated. Therefore, the network monitoring handle object standardizes the target field in the original URL address to obtain the target URL address, and further queries the required webpage elements in the webpage element cache database according to the target URL address.
By converting the target field in the original URL address into a standard format, the influence of fields except the URL address on the elements of the query webpage is eliminated, and the query accuracy and speed are further improved; and when the target URL address and the corresponding webpage element are stored in the webpage element cache database, the memory occupation ratio can be reduced.
In one embodiment, the method further comprises: when the first webpage element corresponding to the target URL address is not inquired, the network monitoring handle object initiates a network request to a server based on the original URL address, and when the server returns a second webpage element, the second webpage element and the target URL address are correspondingly stored in the webpage element cache database.
After the network monitoring handle object acquires the target URL address, inquiring a required first webpage element in a network element cache database according to the target URL address, wherein the corresponding webpage element needs to be acquired from the server when the first webpage element corresponding to the target URL address is not inquired in the network element cache database because each webpage element is acquired from the server and stored in the network element cache database, so that the network monitoring handle object initiates a network request to the server based on the original URL address and returns the corresponding webpage element to the server according to the response of the server, and the webpage element returned by the server and not inquired in the network element cache database is a second webpage element; further, the second webpage element and the target URL address after the standardization processing are correspondingly stored in the webpage element cache database, and the second webpage element is returned to an initiating object of a network request, so that the initiating object can display a webpage based on the second webpage element; when the target URL address is obtained again next time by the network monitoring handle object, the second webpage element can be directly obtained by inquiring the webpage element cache database according to the target URL address, and compared with the method of directly obtaining the second webpage element from the server, the method reduces obtaining time, improves obtaining efficiency and enables webpage display to be carried out as soon as possible.
In an embodiment, as shown in fig. 3, which illustrates a schematic flowchart of storing a second webpage element provided in an embodiment of the present application, storing the second webpage element in the webpage element cache database in correspondence with a target URL address includes:
step 301, a domain name corresponding to the initiated network request is obtained.
When the server returns the web page elements and stores the web page elements in the web page element cache database, in order to conveniently store the URL addresses and the corresponding web page elements correspondingly, the domain name corresponding to the initiated network request needs to be acquired from the target URL address.
Step 302, determining a storage path based on the domain name, and creating a storage node in the web page element cache database based on the storage path.
Step 303, storing the second webpage element and the target URL address in the storage node in a corresponding manner.
The webpage element cache database is used for storing webpage elements, wherein all the webpage elements are classified according to domain names; after the domain name of the network request corresponding to the target URL address is obtained, a storage path of the second webpage element in the mobile device is determined based on the domain name, and a storage node is further created in the webpage element cache database based on the storage path, so that the second webpage element and the target URL address can be correspondingly stored in the storage node.
In one embodiment, the method further comprises: and deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
The webpage element cache database is a linked list, the URL addresses and the webpage elements are stored in the linked list according to the storage time, and after the corresponding webpage elements are read from the linked list according to a certain URL address to be displayed on a webpage, the URL addresses and the corresponding webpage elements are updated to be in a newly stored state in the linked list to form a group of newly stored data; the length of the linked list is limited, when the data stored in the linked list exceeds the length of the linked list, the data exceeding the length of the linked list is deleted from the webpage element cache database, wherein according to the rule that the linked list stores the data, the data exceeding the length of the linked list is the data which is stored initially and is not read recently, the reading frequency of the data exceeding the length of the linked list is lower than that of the data not exceeding the length of the linked list, therefore, the data exceeding the length of the linked list is deleted, namely the data exceeding the length of the linked list is deleted from the webpage element cache database, and the condition that data redundantly occupy a memory is avoided.
In an embodiment, as shown in fig. 4, a schematic flowchart illustrating a process for obtaining a web page element provided in an embodiment of the present application is shown, where the process includes:
in step 401, the network monitor handle object obtains the package object submitted by the operating system.
Before the network monitoring handle object acquires the packaging object submitted by the operating system, registering the network monitoring handle object when the browser object is established; the network monitoring handle object comprises a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring an encapsulated object submitted by an operating system and acquiring a target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing data in the webpage element cache database based on the target URL address.
Step 402, the network monitoring handle object obtains the original URL address corresponding to the network request according to the packaging object.
Step 403, standardizing the target field in the original URL address to obtain the target URL address.
Wherein the target field comprises at least one of an encryption field and a timestamp field; aiming at the same webpage link, network requests are initiated at different moments, URL addresses of the webpage link in the network requests corresponding to the different moments are the same, but fields such as encryption, time stamps and the like are different, but because the URL addresses are used as indexes to query corresponding webpage elements, the speed, accuracy and the like of webpage element query can be influenced by the fields such as the encryption, the time stamps and the like, the fields such as the encryption, the time stamps and the like are converted into 0000 formats, and therefore the influence of the fields on the webpage element query is eliminated. Therefore, the network monitoring handle object standardizes the target field in the original URL address to obtain the target URL address, and further queries the required webpage elements in the webpage element cache database according to the target URL address.
In step 404, the network monitoring handle object queries a webpage element cache database based on the target URL address to obtain a first webpage element corresponding to the target URL address.
In the webpage element cache database, the network monitoring handle object corresponding to each webpage link queries the webpage element cache database based on the target URL address, and the URL address and the webpage element in the first webpage element network request corresponding to the target URL address are obtained and stored correspondingly. After the network monitoring handle object acquires a target URL address of a webpage link of a webpage element to be acquired, inquiring a webpage element cache database based on the target URL address so as to inquire the webpage element corresponding to the target URL address, wherein the webpage element is a first webpage element; and returning the first webpage element to an initiating object of the network request, namely sending the first webpage element to a webpage link corresponding to the network request so that the initiating object can display a webpage based on the first webpage element.
Step 405, returning the first web page element to the initiating object of the network request, so that the initiating object displays the web page based on the first web page element.
In step 406, when the first web page element corresponding to the target URL address is not queried, the network monitoring handle object initiates a network request to the server based on the original URL address to obtain a second web page element returned by the server.
Step 407, the second webpage element and the target URL address are stored in the webpage element cache database in a corresponding manner, and the second webpage element is returned to the initiation object of the network request.
The web page elements returned by the server and not queried in the network element cache database are second web page elements; further, the second webpage element and the target URL address after the standardization processing are correspondingly stored in the webpage element cache database, and the second webpage element is returned to an initiating object of a network request, so that the initiating object can display a webpage based on the second webpage element.
The web page element cache database is a linked list, a storage path of a second web page element is determined according to a domain name corresponding to the initiated network request, and a storage node is created in the web page element cache database based on the storage path so as to store the second web page element; and deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a webpage display device for realizing the webpage display method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so the specific limitations in one or more embodiments of the web page display device provided below can be referred to the limitations on the web page display method in the above, and details are not described herein again.
In one embodiment, as shown in fig. 5, there is provided a web page presentation apparatus including: a first obtaining module 501, a second obtaining module 502 and a query module 503, wherein:
a first obtaining module 501, configured to obtain, by a network monitor handle object, an encapsulated object submitted by an operating system, where the encapsulated object includes a network request intercepted and encapsulated by the operating system, and the operating system is an IOS operating system.
A second obtaining module 502, configured to obtain, by the network monitor handle object, a target URL address corresponding to the network request according to the encapsulated object.
The query module 503 is configured to query, by the network monitor handle object, a webpage element cache database based on the target URL address, and when a first webpage element corresponding to the target URL address is queried, return the first webpage element to an initiating object of a network request, so that the initiating object displays a webpage based on the first webpage element.
In an embodiment, the second obtaining module 502 is specifically configured to: the network monitoring handle object acquires an original URL address corresponding to the network request according to the packaging object; the network monitor handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field comprises at least one of an encryption field and a time stamp field.
In an embodiment, as shown in fig. 6, which illustrates a block diagram of a second web page presentation apparatus provided in an embodiment of the present application, the web page presentation apparatus 600 further includes:
the storage module 504 is configured to, when a first web page element corresponding to the target URL address is not queried, initiate a network request to a server based on the original URL address by the network monitor handle object, and when a second web page element is returned by the server, store the second web page element and the target URL address in the web page element cache database in a corresponding manner.
In one embodiment, the storage module 504 is specifically configured to: acquiring a domain name corresponding to the initiated network request; determining a storage path based on the domain name, and creating a storage node in the webpage element cache database based on the storage path; and correspondingly storing the second webpage element and the target URL address in the storage node.
In an embodiment, as shown in fig. 7, which illustrates a block diagram of a third web page presentation apparatus provided in the embodiment of the present application, the web page presentation apparatus 700 further includes:
and the deleting module 505 is configured to delete the data exceeding the length of the linked list from the web page element cache database according to the sequence of the storage time and the reading time.
In an embodiment, as shown in fig. 8, which illustrates a block diagram of a fourth web page presentation apparatus provided in the embodiment of the present application, the web page presentation apparatus 800 further includes:
a creation module 506 for registering the web monitor handle object when creating the browser object.
In one embodiment, the network monitor handle object includes a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
The modules in the web page presentation apparatus may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a web page presentation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
the network monitoring handle object acquires an encapsulated object submitted by an operating system, wherein the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS (input/output system); the network monitoring handle object acquires a target URL address corresponding to the network request according to the packaging object; the network monitoring handle object inquires a webpage element cache database based on the target URL address, and returns a first webpage element corresponding to the target URL address to an initiating object of a network request when the first webpage element is inquired, so that the initiating object can display a webpage based on the first webpage element.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
registering the network monitor handle object when creating a browser object; the network monitor handle object comprises a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the network monitoring handle object acquires an original URL address corresponding to the network request according to the packaging object; the network monitor handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field comprises at least one of an encryption field and a time stamp field.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the first webpage element corresponding to the target URL address is not inquired, the network monitoring handle object initiates a network request to a server based on the original URL address, and when the server returns a second webpage element, the second webpage element and the target URL address are correspondingly stored in the webpage element cache database.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring a domain name corresponding to the initiated network request; determining a storage path based on the domain name, and creating a storage node in the webpage element cache database based on the storage path; and correspondingly storing the second webpage element and the target URL address in the storage node.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
the network monitoring handle object acquires an encapsulated object submitted by an operating system, wherein the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS (input/output system); the network monitoring handle object acquires a target URL address corresponding to the network request according to the packaging object; the network monitoring handle object inquires a webpage element cache database based on the target URL address, and returns a first webpage element corresponding to the target URL address to an initiating object of a network request when the first webpage element is inquired, so that the initiating object can display a webpage based on the first webpage element.
In one embodiment, the computer program when executed by the processor further performs the steps of:
registering the network monitor handle object when creating a browser object; the network monitor handle object comprises a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the network monitoring handle object acquires an original URL address corresponding to the network request according to the packaging object; the network monitor handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field comprises at least one of an encryption field and a time stamp field.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the first webpage element corresponding to the target URL address is not inquired, the network monitoring handle object initiates a network request to a server based on the original URL address, and when the server returns a second webpage element, the second webpage element and the target URL address are correspondingly stored in the webpage element cache database.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a domain name corresponding to the initiated network request; determining a storage path based on the domain name, and creating a storage node in the webpage element cache database based on the storage path; and correspondingly storing the second webpage element and the target URL address in the storage node.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
the network monitoring handle object acquires an encapsulated object submitted by an operating system, wherein the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS (input/output system); the network monitoring handle object acquires a target URL address corresponding to the network request according to the packaging object; the network monitoring handle object inquires a webpage element cache database based on the target URL address, and returns a first webpage element corresponding to the target URL address to an initiating object of a network request when the first webpage element is inquired, so that the initiating object can display a webpage based on the first webpage element.
In one embodiment, the computer program when executed by the processor further performs the steps of:
registering the network monitor handle object when creating a browser object; the network monitor handle object comprises a network session control object and a network request cache object; the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object; the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the network monitoring handle object acquires an original URL address corresponding to the network request according to the packaging object; the network monitor handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field comprises at least one of an encryption field and a time stamp field.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the first webpage element corresponding to the target URL address is not inquired, the network monitoring handle object initiates a network request to a server based on the original URL address, and when the server returns a second webpage element, the second webpage element and the target URL address are correspondingly stored in the webpage element cache database.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a domain name corresponding to the initiated network request; determining a storage path based on the domain name, and creating a storage node in the webpage element cache database based on the storage path; and correspondingly storing the second webpage element and the target URL address in the storage node.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (11)

1. A webpage display method is characterized by comprising the following steps:
a network monitoring handle object acquires an encapsulated object submitted by an operating system, wherein the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS (input/output system);
the network monitoring handle object acquires a target URL address corresponding to the network request according to the packaging object;
and the network monitoring handle object inquires a webpage element cache database based on the target URL address, and returns a first webpage element corresponding to the target URL address to an initiating object of a network request when the first webpage element is inquired, so that the initiating object can display a webpage based on the first webpage element.
2. The method of claim 1, wherein the obtaining, by the network monitor handle object, the target URL address corresponding to the network request according to the encapsulated object comprises:
the network monitoring handle object acquires an original URL address corresponding to a network request according to the packaging object;
and the network monitoring handle object standardizes a target field in the original URL address to obtain the target URL address, wherein the target field comprises at least one of an encryption field and a time stamp field.
3. The method of claim 2, further comprising:
and when the first webpage element corresponding to the target URL address is not inquired, the network monitoring handle object initiates a network request to a server based on the original URL address, and when the server returns a second webpage element, the second webpage element and the target URL address are correspondingly stored in the webpage element cache database.
4. The method of claim 3, wherein storing the second webpage element in the webpage element cache database in correspondence with the target URL address comprises:
acquiring a domain name corresponding to the initiated network request;
determining a storage path based on the domain name, and creating a storage node in the webpage element cache database based on the storage path;
and correspondingly storing the second webpage element and the target URL address in the storage node.
5. The method of claim 1, wherein the web page element cache database is a linked list, the method further comprising:
and deleting the data exceeding the length of the linked list from the webpage element cache database according to the sequence of the storage time and the reading time.
6. The method of claim 1, wherein prior to the network supervisor object obtaining an encapsulated object submitted by an operating system, the method further comprises:
the network monitor handle object is registered when the browser object is created.
7. The method of any of claims 1 to 6, wherein the network monitor handle object comprises a network session control object and a network request cache object;
the network session control object is used for realizing the functions of acquiring the encapsulated object submitted by an operating system and acquiring the target URL address based on the encapsulated object;
the network request cache object is used for realizing the function of managing the data in the webpage element cache database based on the target URL address.
8. A web page presentation apparatus, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an encapsulated object submitted by an operating system by a network monitoring handle object, the encapsulated object comprises a network request intercepted and encapsulated by the operating system, and the operating system is an IOS operating system;
the second acquisition module is used for acquiring a target URL address corresponding to the network request by the network monitoring handle object according to the packaging object;
and the query module is used for querying a webpage element cache database by the network monitoring handle object based on the target URL address, and returning a first webpage element to an initiating object of a network request when the first webpage element corresponding to the target URL address is queried so that the initiating object can display a webpage based on the first webpage element.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 7 when executed by a processor.
CN202111413798.9A 2021-11-25 2021-11-25 Webpage display method, device, equipment, storage medium and program product Pending CN113901362A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111413798.9A CN113901362A (en) 2021-11-25 2021-11-25 Webpage display method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111413798.9A CN113901362A (en) 2021-11-25 2021-11-25 Webpage display method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN113901362A true CN113901362A (en) 2022-01-07

Family

ID=79195314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111413798.9A Pending CN113901362A (en) 2021-11-25 2021-11-25 Webpage display method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN113901362A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579839A (en) * 2022-03-17 2022-06-03 杭州云深科技有限公司 Data processing system based on webpage
CN114760282A (en) * 2022-04-29 2022-07-15 深圳依时货拉拉科技有限公司 Network request method, device, equipment and storage medium based on IOS system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579839A (en) * 2022-03-17 2022-06-03 杭州云深科技有限公司 Data processing system based on webpage
CN114579839B (en) * 2022-03-17 2024-05-03 杭州云深科技有限公司 Data processing system based on webpage
CN114760282A (en) * 2022-04-29 2022-07-15 深圳依时货拉拉科技有限公司 Network request method, device, equipment and storage medium based on IOS system

Similar Documents

Publication Publication Date Title
CA2841815C (en) Method for associating third party content with online document signing
CN108717435B (en) Webpage loading method, information processing method, computer equipment and storage medium
CN113901362A (en) Webpage display method, device, equipment, storage medium and program product
CN106528657A (en) Control method and device for browser skipping to application program
CN111310427A (en) Service data configuration processing method and device, computer equipment and storage medium
WO2020088104A1 (en) Method and apparatus for performing block chain record-keeping on webpage by means of file acquisition
CN107688568A (en) Acquisition method and device based on web page access behavior record
US11775518B2 (en) Asynchronous predictive caching of content listed in search results
US20070288591A1 (en) Method, system, and program product for caching application data in a browser cache
CN114611481A (en) Template configuration method and device, computer equipment and storage medium
CN114218156A (en) Data export method, data export device, computer equipment and storage medium
JP6779307B2 (en) Method and device for page display
CN104657359A (en) Webpage content and style recording method by using website
CN113886174A (en) Monitoring information display and processing method and device, computer equipment and storage medium
CN103347069A (en) Method and device for realizing network access
CN111314478B (en) File transmission method and device and computer equipment
CN107704464A (en) Parse the method and device in the path of static resource
CN107103001B (en) Method, device and system for acquiring target front-end resource file based on browser
CN111882149B (en) Budget declaration system
CN113626741A (en) Method and equipment for loading webpage of mobile client
CN110505258B (en) Webpage loading and responding method and device, computer equipment and storage medium
CN108399223B (en) Data acquisition method and device and electronic equipment
CN112887376B (en) feed stream de-duplication method, device, system, computer equipment and storage medium
CN114297157B (en) File processing method, device, equipment and medium
CN110162412B (en) Method and device for performing data operation on client

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination