CN111783005A - Method, apparatus and system for displaying web page, computer system and medium - Google Patents

Method, apparatus and system for displaying web page, computer system and medium Download PDF

Info

Publication number
CN111783005A
CN111783005A CN202010654358.1A CN202010654358A CN111783005A CN 111783005 A CN111783005 A CN 111783005A CN 202010654358 A CN202010654358 A CN 202010654358A CN 111783005 A CN111783005 A CN 111783005A
Authority
CN
China
Prior art keywords
static resource
target
response message
terminal
target static
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.)
Granted
Application number
CN202010654358.1A
Other languages
Chinese (zh)
Other versions
CN111783005B (en
Inventor
李保昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010654358.1A priority Critical patent/CN111783005B/en
Publication of CN111783005A publication Critical patent/CN111783005A/en
Application granted granted Critical
Publication of CN111783005B publication Critical patent/CN111783005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The present disclosure provides a method of displaying a web page, comprising: responding to a request message for acquiring the target static resource sent by a terminal, and generating a reference directory of the target static resource; determining whether a reference catalogue of a target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogues and characteristic values of a plurality of static resources; under the condition that the static resource list comprises the reference catalog of the target static resource, generating a response message according to the reference catalog of the target static resource and the characteristic value of the target static resource in the static resource list; and sending the response message to the terminal so that the terminal acquires the target static resource according to the response message to display the webpage. The present disclosure also provides an apparatus and system for displaying a web page, a computer system, and a readable storage medium.

Description

Method, apparatus and system for displaying web page, computer system and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for displaying a web page, a computer system, and a readable storage medium.
Background
Static resources in a web page may include, for example, pictures, icons, etc. that are updated less frequently. Generally, a browser cache can be set at a client, static resources acquired from a server are cached, and subsequent accesses are acquired from a local cache.
In the process of implementing the present disclosure, after finding that the static resource of the server is updated, the inventor finds that the client cannot quickly know the update, which causes coexistence of new and old static resource files, brings error report of pages and functions, and affects use and experience of the user.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a method, apparatus, and system for displaying a web page, a computer system, and a readable storage medium.
One aspect of the present disclosure provides a method of displaying a web page, including: responding to a request message for acquiring target static resources sent by a terminal, and generating a reference directory of the target static resources; determining whether a reference catalog of the target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogs and the characteristic values of a plurality of static resources; under the condition that the static resource list comprises the reference catalog of the target static resource, generating a response message according to the reference catalog of the target static resource and the characteristic value of the target static resource in the static resource list; and sending the response message to the terminal so that the terminal acquires the target static resource according to the response message to display a webpage.
According to an embodiment of the disclosure, the method further comprises: adding the reference catalog of the target static resource to the static resource list if it is determined that the reference catalog of the target static resource is not included in the static resource list.
According to an embodiment of the disclosure, the method further comprises: calculating the characteristic value of each static resource in the static resource list according to a preset time interval; for each static resource, comparing whether the feature value of the currently calculated static resource is the same as the feature value of the static resource in the static resource list; and under the condition that the feature value of the static resource calculated currently is determined to be different from the feature value of the static resource in the static resource list, updating the feature value of the static resource in the static resource list into the feature value of the static resource calculated currently.
According to an embodiment of the present disclosure, calculating the feature value of each static resource in the static resource list includes: and calculating the information abstract of each static resource in the static resource list.
Another aspect of the present disclosure provides a method of displaying a web page, including: sending a request message for acquiring the target static resource to a server; receiving a response message sent by the server in response to the request message, wherein the response message comprises the reference directory and the characteristic value of the target static resource; determining whether the characteristic value of the target static resource in the response message is the same as the characteristic value of the locally stored static resource corresponding to the request message; and under the condition that the characteristic value of the target static resource in the response message is determined to be different from the characteristic value of the locally stored static resource corresponding to the request message, acquiring the target static resource from the server according to the reference catalog of the target static resource in the response message so as to display a webpage.
Another aspect of the present disclosure provides an apparatus for displaying a web page, including: the first generation module is used for responding to a request message for acquiring the target static resource sent by a terminal and generating a reference directory of the target static resource; the first determination module is used for determining whether a reference catalogue of the target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogues and the characteristic values of a plurality of static resources; a second generating module, configured to generate a response message according to the reference directory of the target static resource and the feature value of the target static resource in the static resource list, when it is determined that the static resource list includes the reference directory of the target static resource; and the first sending module is used for sending the response message to the terminal so that the terminal acquires the target static resource according to the response message to display a webpage.
Another aspect of the present disclosure provides an apparatus for displaying a web page, including: the second sending module is used for sending a request message for acquiring the target static resource to the server; a receiving module, configured to receive a response message sent by the server in response to the request message, where the response message includes a reference directory and a feature value of the target static resource; a second determining module, configured to determine whether the feature value of the target static resource in the response message is the same as the feature value of the locally stored static resource corresponding to the request message; and the acquisition module is used for acquiring the target static resource from the server according to the reference catalog of the target static resource in the response message to display a webpage under the condition that the characteristic value of the target static resource in the response message is determined to be different from the characteristic value of the locally stored static resource corresponding to the request message.
Another aspect of the present disclosure provides a system for displaying a web page, including: the terminal is used for sending a request message for acquiring the target static resource to the server; a server to: generating a reference catalog of the target static resource in response to the request message; determining whether a reference catalog of the target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogs and the characteristic values of a plurality of static resources; under the condition that the static resource list comprises the reference catalog of the target static resource, generating a response message according to the reference catalog of the target static resource and the characteristic value of the target static resource in the static resource list; and sending the response message to the terminal so that the terminal acquires the target static resource according to the response message. The terminal is further configured to: receiving a response message sent by the server, wherein the response message comprises a reference directory and a characteristic value of the target static resource; determining whether the characteristic value of the target static resource in the response message is the same as the characteristic value of the locally stored static resource corresponding to the request message; and under the condition that the characteristic value of the target static resource in the response message is determined to be different from the characteristic value of the locally stored static resource corresponding to the request message, acquiring the target static resource from the server according to the reference catalog of the target static resource in the response message so as to display a webpage.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
Another aspect of the present disclosure provides a computer system comprising: one or more processors; storage means for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to the embodiment of the disclosure, a technical means is adopted for generating a reference directory of a target static resource in response to a request message for acquiring the target static resource sent by a terminal, determining whether the reference directory of the target static resource is included in a static resource list, wherein the static resource list includes the reference directories and characteristic values of a plurality of static resources, and sending the reference directory and the characteristic values of the target static resource to the terminal as a response message under the condition that the reference directory of the target static resource is determined to be included in the static resource list, so that the terminal acquires the target static resource according to the response message. The characteristic value of the static resource is added when the reference catalog is returned to the terminal, so that the terminal determines whether the static resource is updated according to the characteristic value of the static resource, and the terminal can conveniently acquire the latest static resource, thereby at least partially overcoming the technical problem that the client cannot rapidly determine whether the static resource of the server is updated or not in the related technology, so that new and old static resource files of the client coexist, and page and function error report is caused, and further achieving the technical effect of improving user experience.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which the method and apparatus for displaying web pages of embodiments of the present disclosure may be applied;
FIG. 2 schematically illustrates a flow chart of a method of displaying a web page according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram of a method of updating a static resource list according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates an exemplary system architecture to which the method and apparatus for displaying web pages of another embodiment of the present disclosure may be applied;
FIG. 5 schematically illustrates a flow diagram of a method of displaying a web page according to another embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of an apparatus for displaying a web page according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of an apparatus for displaying a web page according to another embodiment of the present disclosure; and
FIG. 8 schematically shows a block diagram of a computer system according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the process of realizing the concept of the present disclosure, different cache periods can be set according to possible update periods of the static resource file, so that the user can obtain the static resource from the server only once in the effective cache period, the subsequent access can be obtained from the local cache, the application to the server is not needed again, and the network bandwidth pressure of the server is reduced. However, after the static resources of the server are updated, the client can only wait for the file in the current cache period to be invalid or manually cleaned, and the updated file is acquired in the new cache period, during which the coexistence of the new file and the old file often brings about various page and function errors, which affects the use and experience of the user.
In the process of realizing the concept of the present disclosure, an identification mark may be added behind the static resource file, that is: and adding version numbers (such as original reference address/home/index. html, updated to/home/index. html. But this solution requires modifications where all static resources are referenced, is more intrusive to the application, and increases the complexity of the application.
Based on this, embodiments of the present disclosure provide a method of displaying a web page. The method comprises the steps of responding to a request message for acquiring target static resources sent by a terminal, and generating a reference catalog of the target static resources; determining whether a reference catalogue of a target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogues and characteristic values of a plurality of static resources; under the condition that the static resource list comprises the reference catalog of the target static resource, generating a response message according to the reference catalog of the target static resource and the characteristic value of the target static resource in the static resource list; and sending the response message to the terminal so that the terminal acquires the target static resource according to the response message to display the webpage.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the method and apparatus for displaying web pages of embodiments of the present disclosure may be applied. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include a terminal 101, a terminal 102, a terminal 103, a network 104, and a server 105. Network 104 is the medium used to provide communication links between terminals 101, 102, 103, and server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
A user may use terminal 101, terminal 102, terminal 103 to interact with server 105 over network 104 to receive or send messages, etc. Various messaging client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, and/or social platform software, etc. (examples only) may be installed on terminals 101, 102, 103.
The terminals 101, 102, 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for a website browsed by a user using the terminal 101, the terminal 102, and the terminal 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
FIG. 2 schematically shows a flow chart of a method of displaying a web page according to an embodiment of the present disclosure.
The method illustrated in fig. 2 may generally be performed by the server 105 in accordance with an embodiment of the disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, a reference directory of a target static resource is generated in response to a request message for acquiring the target static resource sent by a terminal.
According to the embodiment of the disclosure, when a user accesses a webpage on the terminal 101, the terminal 102 or the terminal 103, a request for acquiring webpage resources is sent to a server. The requested web page resources include dynamic resources and static resources, the dynamic resources may be, for example, service data and the like acquired from a server on the server 105 side, and the static resources may be, for example, pictures, icons, HTML (hypertext Markup Language), js (javascript), CSS (Cascading Style Sheets), scripts and the like in the web page.
After receiving the request message for acquiring the target static resource sent by the terminal 101, the terminal 102, or the terminal 103, the server 105 may generate a reference directory of the target static resource, where the reference directory may be an address path for acquiring the target static resource, and may be html.
In operation S202, it is determined whether a reference directory of a target static resource is included in a static resource list, where the static resource list includes reference directories and feature values of a plurality of static resources.
According to the embodiment of the present disclosure, a static resource list is set at the server 105, and the list includes reference directories of static resources requested by a plurality of users and feature values of the static resources. The characteristic value of the static resource may be, for example, an MD5(Message Digest Algorithm) value of the static resource, and the MD5 value of the static resource may uniquely identify the static resource. The last modification time of the static resource can be used as a characteristic value of the static resource, and the last modification time of the static resource can represent the latest update time of the static resource.
According to the embodiment of the disclosure, whether the reference catalog of the target static resource is in the static resource list can be determined, and whether the user has requested the static resource can be determined. If the user has requested the static resource, the static resource is stored locally at the terminal 101, the terminal 102 or the terminal 103.
In operation S203, in a case that it is determined that the static resource list includes the reference directory of the target static resource, a response message is generated according to the reference directory of the target static resource and the feature value of the target static resource in the static resource list.
According to the embodiment of the disclosure, if the reference directory of the target static resource is in the static resource list, the feature value of the static resource in the static resource list is added to the generated static resource reference directory, and specifically, the feature value may be added to the back of the reference directory, for example, the original reference directory/home/index. MD5 ═ 69ef798 a. The reference list of the static resource is then returned to the terminal 101, the terminal 102, or the terminal 103 together with the feature value as a response message.
According to the embodiment of the disclosure, compared with a mode of increasing the version number at all places where static resources are referenced, only updating the MD5 value of the static resources in the static resource list can reduce the invasiveness of the system and reduce the complexity of an application program.
In operation S204, the response message is sent to the terminal, so that the terminal acquires the target static resource according to the response message to display the web page.
According to the embodiment of the disclosure, after receiving the response message returned by the server 105, the terminal 101, the terminal 102, or the terminal 103 parses the feature value of the static resource, and then compares the feature value with the locally stored feature value of the static resource to determine whether the feature values are consistent. In the case that the comparison result is consistent, it may be determined that the static resource locally stored by the terminal 101, the terminal 102, or the terminal 103 is consistent with the static resource in the server 105, and the local static resource may be directly acquired without going to the server 105 to generate the web page. In the case where the comparison result is inconsistent, it may be determined that the static resource locally stored by the terminal 101, the terminal 102, or the terminal 103 is inconsistent with the static resource in the server 105, and the terminal 101, the terminal 102, or the terminal 103 is required to acquire the latest static resource from the server 105 according to the reference catalog of the static resource.
According to the embodiment of the disclosure, in response to a request message for acquiring a target static resource sent by a terminal, a reference directory of the target static resource is generated, whether the reference directory of the target static resource is included in a static resource list is determined, wherein the static resource list includes the reference directories and feature values of a plurality of static resources, and under the condition that the reference directory of the target static resource is included in the static resource list, the terminal is enabled to determine whether the static resource is updated according to the feature value of the static resource, so that the terminal can acquire the latest static resource.
According to the embodiment of the disclosure, the characteristic value of the static resource is added when the reference directory is returned to the terminal, so that the terminal can know whether the static resource is updated according to the characteristic value of the static resource, the terminal can conveniently acquire the latest static resource, the problems of page function error report and the like caused by the coexistence of the new static resource and the old static resource are avoided, and the user experience is improved.
According to the embodiment of the disclosure, in the case that the reference catalog of the target static resource is determined not to be included in the static resource list, the reference catalog of the target static resource is added to the static resource list.
According to the embodiment of the disclosure, if the reference directory of the target static resource is not in the static resource list, it indicates that the user has not requested the static resource. The reference catalog for the static resource may be added to the static resource list to update the static resource list.
According to the embodiment of the disclosure, the static resources in the static resource list can be updated according to the static resources requested by the user, the reference directory and the feature value of the static resources requested by the user are gradually increased, and the static resources in the static resource list can be reduced or eliminated according to the actual requirements.
FIG. 3 schematically shows a flow diagram of a method of updating a static resource list according to an embodiment of the present disclosure.
As shown in fig. 3, the method includes operations S301 to S303.
In operation S301, a feature value of each static resource in the static resource list is calculated according to a preset time interval.
According to the embodiment of the disclosure, the server 105 may set a periodic probe task, where the probe task may include a plurality of probe threads, the plurality of probe threads may calculate the feature value of each static resource in the resource list in parallel, and periodically calculating the feature value of each static resource may determine the latest feature value of the static resource.
In operation S302, for each static resource, it is compared whether the feature value of the currently calculated static resource is the same as the feature value of the static resource in the static resource list.
According to the embodiment of the disclosure, for each static resource, the calculated characteristic value of the static resource in the latest period is compared with the characteristic value of the static resource recorded in the static resource list. If the comparison result is the same, the static resource is not updated.
In operation S303, in a case that it is determined that the feature value of the currently calculated static resource is not the same as the feature value of the static resource in the static resource list, the feature value of the static resource in the static resource list is updated to the feature value of the currently calculated static resource.
According to the embodiment of the disclosure, if the comparison results are different, the static resource is updated, and the feature value recorded in the static resource list is updated to the latest feature value of the static resource.
According to the embodiment of the present disclosure, the operations S201 to S204 and the operations S301 to S303 may be generally performed by the server 105, or may be performed by a device located between the terminal and the server, for example, by the proxy server 402 as shown in fig. 4.
Fig. 4 schematically illustrates an exemplary system architecture to which a method and apparatus for displaying a web page according to another embodiment of the present disclosure may be applied.
As shown in fig. 4, the exemplary system architecture 400 may include a terminal 401, a proxy server 402, and an application server 403. Among other things, the terminal 401 may send an access request to the proxy server 402. The proxy server 402 receives the access request and then sends the access request to the application server 403, and the application server 403 returns a response message to the proxy server 402 in response to the access request, where the response message includes page information requested by the terminal 401, and may include, for example, a reference directory of static resources in the page.
According to the embodiment of the present disclosure, the proxy server 402 stores a static resource list, which records the reference directory of the static resource requested by the user and the feature value of the periodically updated static resource. After receiving the response message returned by the application server 403, the proxy server 402 may parse the reference directory of the static resource. Then, whether a reference directory of the analyzed static resource is recorded in the static resource list is searched, if so, the characteristic value of the static resource in the static resource list is added to the reference directory, and then the static resource is returned to the terminal 401.
According to the embodiment of the disclosure, the terminal 401 receives the feature value of the static resource returned by the proxy server 402, then obtains the locally stored static resource, determines whether the feature value of the locally stored static resource is consistent with the feature value of the static resource returned by the proxy server 402, and in case of consistency, can directly use the locally stored static resource to display the webpage. If not, the terminal 401 acquires the static resource from the application server 403 according to the reference directory of the static resource returned by the proxy server 402.
According to the embodiment of the present disclosure, the proxy server 402 may set a periodic probe task, where the probe task may include a plurality of probe threads, and when executed, the plurality of probe threads may obtain corresponding static resources in the application server 403 according to the static resource list, then calculate a feature value of each static resource, compare the calculated feature value with feature values already recorded in the static resource list, and if the calculated feature values are not consistent, replace the feature values recorded in the static resource list with the latest calculated feature values. The characteristic values in the static resource list can be ensured to correspond to the latest static resources. After a detection period is finished, the obtained static resources can be discarded, so that the occupied space is reduced.
According to the embodiment of the present disclosure, by setting the application server 403 between the terminal 401 and the application server 403, the application server 403 calculates the characteristic value of the static resource, sets the resource detection task, maintains the static resource list, and replaces adding the characteristic value of the static resource in the reference directory returned by the application server 403 to the terminal 401, so that the terminal knows whether the static resource is updated according to the characteristic value. Under the condition that the terminal and the server are transparent, the client side caching of static resources is realized, the network bandwidth pressure of the server side is reduced, and the effect that the client side can know in a short time after the server side resources are updated is also realized.
FIG. 5 schematically shows a flow chart of a method of displaying a web page according to another embodiment of the present disclosure.
As shown in fig. 5, the method includes operations S501 to S504.
In operation S501, a request message for acquiring a target static resource is transmitted to a server.
According to the embodiment of the disclosure, when a user accesses a webpage on the terminal 101, the terminal 102 or the terminal 103, the terminal 101, the terminal 102 or the terminal 103 may send a request for acquiring webpage resources to a server.
In operation S502, a response message sent by the server in response to the request message is received, wherein the response message includes the reference directory and the feature value of the target static resource.
According to the embodiment of the disclosure, a response message sent by the server 105 is received, and the reference directory and the feature value of the static resource may be included in the response message. The characteristic value of the static resource may be, for example, an MD5 value, and may uniquely identify the static resource. The characteristic value of the static resource may also be the last modification time of the static resource, and may represent the latest update time of the static resource.
In operation S503, it is determined whether the characteristic value of the target static resource in the response message is the same as the locally stored characteristic value of the static resource corresponding to the request message.
According to the embodiment of the present disclosure, the terminal 101, the terminal 102, or the terminal 103 may obtain the local target static resource, and then compare the feature value of the local target static resource with the feature value added in the response message to check whether the two are the same.
In operation S504, when it is determined that the feature value of the target static resource in the response message is not the same as the locally stored feature value of the static resource corresponding to the request message, the target static resource is obtained from the server according to the reference directory of the target static resource in the response message, so as to display the web page.
According to the embodiment of the disclosure, in the case that the comparison result is consistent, it may be determined that the static resource locally stored by the terminal 101, the terminal 102, or the terminal 103 is consistent with the static resource in the server 105, and the local static resource may be directly acquired without going to the server 105 to generate the web page. In the case where the comparison result is inconsistent, it may be determined that the static resource locally stored by the terminal 101, the terminal 102, or the terminal 103 is inconsistent with the static resource in the server 105, and the terminal 101, the terminal 102, or the terminal 103 is required to acquire the latest static resource from the server 105 according to the reference directory.
Referring to the exemplary system architecture shown in fig. 1, the terminal 101 may be configured to send a request message to the server to obtain a target static resource.
The server 105 may be configured to generate a reference directory of the target static resource in response to the request message; determining whether a reference catalogue of a target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogues and characteristic values of a plurality of static resources; under the condition that the static resource list comprises the reference catalog of the target static resource, generating a response message according to the reference catalog of the target static resource and the characteristic value of the target static resource in the static resource list; and sending the response message to the terminal so that the terminal acquires the target static resource according to the response message.
The terminal 101 may be further configured to receive a response message sent by the server, where the response message includes the reference directory and the feature value of the target static resource; determining whether the characteristic value of the target static resource in the response message is the same as the characteristic value of the locally stored static resource corresponding to the request message; and under the condition that the characteristic value of the target static resource in the response message is determined to be different from the characteristic value of the locally stored static resource corresponding to the request message, acquiring the target static resource from the server according to the reference directory of the target static resource in the response message so as to display the webpage.
Fig. 6 schematically shows a block diagram of an apparatus for displaying a web page according to an embodiment of the present disclosure.
As shown in fig. 6, the apparatus 600 for displaying a web page includes a first generating module 601, a first determining module 602, a second generating module 603, and a first transmitting module 604.
The first generating module 601 is configured to generate a reference list of the target static resource in response to a request message for acquiring the target static resource sent by the terminal.
The first determining module 602 is configured to determine whether a reference directory of a target static resource is included in a static resource list, where the static resource list includes reference directories and feature values of a plurality of static resources.
The second generating module 603 is configured to, in a case that it is determined that the static resource list includes the reference directory of the target static resource, generate a response message according to the reference directory of the target static resource and the feature value of the target static resource in the static resource list.
The first sending module 604 is configured to send the response message to the terminal, so that the terminal obtains the target static resource according to the response message to display the web page.
According to the embodiment of the present disclosure, the apparatus 600 for displaying a web page further includes a first updating module.
And the first updating module is used for adding the reference catalogue of the target static resource into the static resource list under the condition that the reference catalogue of the target static resource is determined not to be included in the static resource list.
According to the embodiment of the present disclosure, the apparatus 600 for displaying a web page further includes a calculation module, a comparison module, and a second update module.
And the calculating module is used for calculating the characteristic value of each static resource in the static resource list according to the preset time interval.
And the comparison module is used for comparing whether the feature value of the currently calculated static resource is the same as the feature value of the static resource in the static resource list or not aiming at each static resource.
And the second updating module is used for updating the characteristic value of the static resource in the static resource list into the characteristic value of the currently calculated static resource under the condition that the characteristic value of the currently calculated static resource is determined to be different from the characteristic value of the static resource in the static resource list.
According to the embodiment of the disclosure, the calculation module is used for calculating the information abstract of each static resource in the static resource list.
Fig. 7 schematically shows a block diagram of an apparatus for displaying a web page according to another embodiment of the present disclosure.
As shown in fig. 7, the apparatus 700 for displaying a web page includes a second sending module 701, a receiving module 702, a second determining module 703 and an obtaining module 704.
A second sending module 701, configured to send a request message for obtaining a target static resource to a server;
a receiving module 702, configured to receive a response message sent by the server in response to the request message, where the response message includes the reference directory and the feature value of the target static resource;
a second determining module 703, configured to determine whether the feature value of the target static resource in the response message is the same as the feature value of the locally stored static resource corresponding to the request message; and
an obtaining module 704, configured to, when it is determined that the feature value of the target static resource in the response message is different from the locally stored feature value of the static resource corresponding to the request message, obtain the target static resource from the server according to the reference directory of the target static resource in the response message, so as to display the web page.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the first generating module 601, the first determining module 602, the second generating module 603 and the first sending module 604 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the first generating module 601, the first determining module 602, the second generating module 603, and the first sending module 604 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the first generating module 601, the first determining module 602, the second generating module 603 and the first sending module 604 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
It should be noted that the device part for displaying the web page in the embodiment of the present disclosure corresponds to the method part for displaying the web page in the embodiment of the present disclosure, and the description of the device part for displaying the web page specifically refers to the method part for displaying the web page, and is not described herein again.
FIG. 8 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method, according to an embodiment of the present disclosure. The computer system illustrated in FIG. 8 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 8, a computer system 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 803, various programs and data necessary for the operation of the system 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
System 800 may also include an input/output (I/O) interface 805, also connected to bus 804, according to an embodiment of the disclosure. The system 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (R0M), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 802 and/or RAM 803 described above and/or one or more memories other than the ROM 802 and RAM 803.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method of displaying a web page, comprising:
responding to a request message for acquiring target static resources sent by a terminal, and generating a reference directory of the target static resources;
determining whether a reference catalog of the target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogs and the characteristic values of a plurality of static resources;
under the condition that the static resource list comprises the reference catalog of the target static resource, generating a response message according to the reference catalog of the target static resource and the characteristic value of the target static resource in the static resource list; and
and sending the response message to the terminal so that the terminal acquires the target static resource according to the response message to display a webpage.
2. The method of claim 1, further comprising:
adding the reference catalog of the target static resource to the static resource list if it is determined that the reference catalog of the target static resource is not included in the static resource list.
3. The method of claim 1, further comprising:
calculating the characteristic value of each static resource in the static resource list according to a preset time interval;
for each of the static resources, the static resources are,
comparing whether the feature value of the static resource calculated currently is the same as the feature value of the static resource in the static resource list; and
and under the condition that the feature value of the static resource calculated currently is determined to be different from the feature value of the static resource in the static resource list, updating the feature value of the static resource in the static resource list into the feature value of the static resource calculated currently.
4. The method of claim 3, wherein calculating the feature value for each of the static resources in the list of static resources comprises:
and calculating the information abstract of each static resource in the static resource list.
5. A method of displaying a web page, comprising:
sending a request message for acquiring the target static resource to a server;
receiving a response message sent by the server in response to the request message, wherein the response message comprises the reference directory and the characteristic value of the target static resource;
determining whether the characteristic value of the target static resource in the response message is the same as the characteristic value of the locally stored static resource corresponding to the request message; and
and under the condition that the characteristic value of the target static resource in the response message is determined to be different from the characteristic value of the locally stored static resource corresponding to the request message, acquiring the target static resource from the server according to the reference catalog of the target static resource in the response message so as to display a webpage.
6. An apparatus for displaying a web page, comprising:
the first generation module is used for responding to a request message for acquiring the target static resource sent by a terminal and generating a reference directory of the target static resource;
the first determination module is used for determining whether a reference catalogue of the target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogues and the characteristic values of a plurality of static resources;
a second generating module, configured to generate a response message according to the reference directory of the target static resource and the feature value of the target static resource in the static resource list, when it is determined that the static resource list includes the reference directory of the target static resource; and
and the first sending module is used for sending the response message to the terminal so that the terminal acquires the target static resource according to the response message to display a webpage.
7. An apparatus for displaying a web page, comprising:
the second sending module is used for sending a request message for acquiring the target static resource to the server;
a receiving module, configured to receive a response message sent by the server in response to the request message, where the response message includes a reference directory and a feature value of the target static resource;
a second determining module, configured to determine whether the feature value of the target static resource in the response message is the same as the feature value of the locally stored static resource corresponding to the request message; and
and the obtaining module is used for obtaining the target static resource from the server according to the reference directory of the target static resource in the response message to display the webpage under the condition that the characteristic value of the target static resource in the response message is determined to be different from the characteristic value of the locally stored static resource corresponding to the request message.
8. A system for displaying a web page, comprising:
the terminal is used for sending a request message for acquiring the target static resource to the server;
a server to:
generating a reference catalog of the target static resource in response to the request message;
determining whether a reference catalog of the target static resource is included in a static resource list, wherein the static resource list comprises the reference catalogs and the characteristic values of a plurality of static resources;
under the condition that the static resource list comprises the reference catalog of the target static resource, generating a response message according to the reference catalog of the target static resource and the characteristic value of the target static resource in the static resource list; and
and sending the response message to the terminal so that the terminal acquires the target static resource according to the response message.
The terminal is further configured to:
receiving a response message sent by the server, wherein the response message comprises a reference directory and a characteristic value of the target static resource;
determining whether the characteristic value of the target static resource in the response message is the same as the characteristic value of the locally stored static resource corresponding to the request message; and
and under the condition that the characteristic value of the target static resource in the response message is determined to be different from the characteristic value of the locally stored static resource corresponding to the request message, acquiring the target static resource from the server according to the reference catalog of the target static resource in the response message so as to display a webpage.
9. A computer system, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4 or the method of claim 5.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 4, or carry out the method of claim 5.
CN202010654358.1A 2020-07-08 2020-07-08 Method, device and system for displaying web page, computer system and medium Active CN111783005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010654358.1A CN111783005B (en) 2020-07-08 2020-07-08 Method, device and system for displaying web page, computer system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010654358.1A CN111783005B (en) 2020-07-08 2020-07-08 Method, device and system for displaying web page, computer system and medium

Publications (2)

Publication Number Publication Date
CN111783005A true CN111783005A (en) 2020-10-16
CN111783005B CN111783005B (en) 2024-03-15

Family

ID=72758439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010654358.1A Active CN111783005B (en) 2020-07-08 2020-07-08 Method, device and system for displaying web page, computer system and medium

Country Status (1)

Country Link
CN (1) CN111783005B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487339A (en) * 2020-12-11 2021-03-12 杭州安恒信息技术股份有限公司 Method, device, equipment and storage medium for responding Web page request
CN113326456A (en) * 2021-07-08 2021-08-31 北京达佳互联信息技术有限公司 Webpage resource acquisition method, device, equipment, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170147543A1 (en) * 2015-11-25 2017-05-25 International Business Machines Corporation Enabling legacy web applications for mobile devices
CN107315791A (en) * 2017-06-14 2017-11-03 广州酷狗计算机科技有限公司 Static resource caching method, device and computer-readable recording medium
CN107547629A (en) * 2017-07-20 2018-01-05 北京京东尚科信息技术有限公司 Method, apparatus, electronic equipment and the computer-readable recording medium that client static resource is downloaded
CN110866198A (en) * 2019-09-27 2020-03-06 上海硬通网络科技有限公司 Static resource caching method, system, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170147543A1 (en) * 2015-11-25 2017-05-25 International Business Machines Corporation Enabling legacy web applications for mobile devices
CN107315791A (en) * 2017-06-14 2017-11-03 广州酷狗计算机科技有限公司 Static resource caching method, device and computer-readable recording medium
CN107547629A (en) * 2017-07-20 2018-01-05 北京京东尚科信息技术有限公司 Method, apparatus, electronic equipment and the computer-readable recording medium that client static resource is downloaded
CN110866198A (en) * 2019-09-27 2020-03-06 上海硬通网络科技有限公司 Static resource caching method, system, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487339A (en) * 2020-12-11 2021-03-12 杭州安恒信息技术股份有限公司 Method, device, equipment and storage medium for responding Web page request
CN113326456A (en) * 2021-07-08 2021-08-31 北京达佳互联信息技术有限公司 Webpage resource acquisition method, device, equipment, system and storage medium

Also Published As

Publication number Publication date
CN111783005B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN107622135B (en) Method and apparatus for displaying information
US8799759B2 (en) Pre-rendering web content
CN106911693B (en) Method and device for detecting hijacking of webpage content and terminal equipment
CN111475180A (en) Method and system for updating client cache
CN108256014B (en) Page display method and device
CN111783005B (en) Method, device and system for displaying web page, computer system and medium
US10931771B2 (en) Method and apparatus for pushing information
CN109902726B (en) Resume information processing method and device
US9998559B2 (en) Preemptive caching of data
CN109471713B (en) Method and device for inquiring information
CN107918617B (en) Data query method and device
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN113452733A (en) File downloading method and device
CN112486783A (en) Progress bar display method and device
CN111338928A (en) Chrome-based browser testing method and device
CN110851194A (en) Method and device for acquiring code for realizing new interface
CN115470432A (en) Page rendering method and device, electronic equipment and computer readable medium
CN112688982B (en) User request processing method and device
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN110457632B (en) Webpage loading processing method and device
US11301498B2 (en) Multi-cloud object store access
CN113722193A (en) Method and device for detecting page abnormity
US20200159817A1 (en) Dynamically bundling web page resources
CN111767486A (en) Method, device, electronic equipment and computer readable medium for displaying page
CN110874433A (en) Information processing method and system, computer system and computer readable medium

Legal Events

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