[go: up one dir, main page]

CN111783005B - Method, device and system for displaying web page, computer system and medium - Google Patents

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

Info

Publication number
CN111783005B
CN111783005B CN202010654358.1A CN202010654358A CN111783005B CN 111783005 B CN111783005 B CN 111783005B CN 202010654358 A CN202010654358 A CN 202010654358A CN 111783005 B CN111783005 B CN 111783005B
Authority
CN
China
Prior art keywords
static resource
target
characteristic value
list
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.)
Active
Application number
CN202010654358.1A
Other languages
Chinese (zh)
Other versions
CN111783005A (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

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

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 present disclosure provides a method of displaying a web page, comprising: responding to a request message sent by a terminal for acquiring a target static resource, and generating a reference directory of the target static resource; determining whether a static resource list comprises a reference catalog of a target static resource or not, wherein the static resource list comprises the reference catalogs 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 obtains the target static resource according to the response message to display the webpage. The present disclosure also provides an apparatus and system for displaying web pages, a computer system, and a readable storage medium.

Description

Method, device and system for displaying web page, computer system and medium
Technical Field
The present disclosure relates to the field of computer technology, and more particularly, to a method, apparatus, and system for displaying web pages, 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 very infrequently. 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 realizing the conception of the present disclosure, after the inventor discovers that the static resource of the server is updated, the client cannot acquire the static resource quickly, so that the coexistence of new and old static resource files is caused, page and function reporting errors are caused, and the use and experience of the user are affected.
Disclosure of Invention
In view of this, the present disclosure provides a method, apparatus and system for displaying web pages, 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 sent by a terminal for acquiring a target static resource, and generating a reference catalog of the target static resource; determining whether a static resource list comprises a reference catalog of the target static resource or not, wherein the static resource list comprises a plurality of reference catalogs and characteristic values of the static resources; generating a response message according to the reference directory of the target static resource and the characteristic value of the target static resource in the static resource list under the condition that the reference directory of the target static resource is included in the static resource list; and sending the response message to the terminal so that the terminal obtains the target static resource according to the response message to display a webpage.
According to an embodiment of the present disclosure, the method further comprises: and adding the reference catalog of the target static resource to the static resource list under the condition that the reference catalog of the target static resource is not included in the static resource list.
According to an embodiment of the present disclosure, the method further comprises: calculating the characteristic value of each static resource in the static resource list according to a preset time interval; comparing whether the currently calculated characteristic value of the static resource is the same as the characteristic value of the static resource in the static resource list or not according to each static resource; and updating the characteristic value of the static resource in the static resource list to the characteristic value of the static resource calculated currently under the condition that the characteristic value of the static resource calculated currently is different from the characteristic value of the static resource in the static resource list.
According to an embodiment of the present disclosure, calculating the feature value of each of the static resources 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 a reference catalog 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 static resource corresponding to the request message stored locally; and under the condition that the characteristic value of the target static resource in the response message is different from the characteristic value of the static resource corresponding to the request message stored locally, 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 sent by the terminal for acquiring the target static resource and generating a reference catalog of the target static resource; the first determining module is used for determining whether the static resource list comprises a reference catalog of the target static resource or not, wherein the static resource list comprises a plurality of reference catalogs and characteristic values of the static resources; the second generation module is used for 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 under the condition that the reference catalog of the target static resource is included in the static resource list; and the first sending module is used for sending the response message to the terminal so that the terminal can acquire 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; the receiving module is used for receiving a response message sent by the server in response to the request message, wherein the response message comprises a reference catalog and a characteristic value of the target static resource; the second determining module is used for determining whether the characteristic value of the target static resource in the response message is the same as the characteristic value of the static resource corresponding to the request message stored locally; 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 under the condition that the characteristic value of the target static resource in the response message is different from the characteristic value of the locally stored static resource corresponding to the request message, so as to display a webpage.
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 for: generating a reference directory of the target static resource in response to the request message; determining whether a static resource list comprises a reference catalog of the target static resource or not, wherein the static resource list comprises a plurality of reference catalogs and characteristic values of the static resources; generating a response message according to the reference directory of the target static resource and the characteristic value of the target static resource in the static resource list under the condition that the reference directory of the target static resource is included in the static resource list; and sending the response message to the terminal so that the terminal obtains 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 catalog 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 static resource corresponding to the request message stored locally; and under the condition that the characteristic value of the target static resource in the response message is different from the characteristic value of the static resource corresponding to the request message stored locally, 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 that, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions which when executed are for implementing a method as described above.
Another aspect of the present disclosure provides a computer system comprising: one or more processors; and a storage means for storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the methods as described above.
According to the embodiment of the disclosure, a request message sent by a terminal for acquiring a target static resource is adopted, a reference catalog of the target static resource is generated, whether the reference catalog of the target static resource is included in a static resource list or not is determined, the static resource list includes a plurality of reference catalogs and characteristic values of the static resource, and the reference catalog and the characteristic values of the target static resource are sent to the terminal as response messages under the condition that the reference catalog 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 messages. The method and the device have the advantages that the characteristic value of the static resource is added when the reference catalog is returned to the terminal, so that the terminal can determine whether the static resource is updated according to the characteristic value of the static resource, and the terminal can acquire the latest static resource, and therefore the technical problem that in the related technology, the client cannot quickly determine whether the static resource of the server is updated, and the new and old static resource files of the client coexist, so that page and function errors are caused is at least partially solved, and the technical effect of improving user experience is further achieved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates an exemplary system architecture to which the methods and apparatuses of 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 in accordance with an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of updating a static resource list in accordance with an embodiment of the present disclosure;
FIG. 4 schematically illustrates an exemplary system architecture to which a method and apparatus for displaying web pages of another embodiment of the present disclosure may be applied;
FIG. 5 schematically illustrates a flow chart 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 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 illustrates 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 only exemplary 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 present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to 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/or 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 should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having 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 formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with 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 conception of the present disclosure, different cache periods can be set according to possible update periods of the static resource file, so that a user can obtain the static resource from the server only once in an effective cache period, subsequent access can be obtained from a local cache, and the application to the server is not required again, thereby reducing the network bandwidth pressure of the server. However, after the static resource of the server is updated, the client can only wait for the file failure or manual cleaning in the current caching period, acquire the updated file in the new caching period, and the coexistence of the new file and the old file often brings about various page and function errors during the period, thereby influencing the use and experience of the user.
In the process of implementing the disclosed concept, an identification mark can be added behind the static resource file, namely: and version numbers (such as original reference address/home/index. Html, updated to be/home/index. Html = 1.0) are added at all places where static resources are referenced, and after the server version or the resources are updated, the user can quickly learn by only modifying the identification flag values. However, this solution requires modification of all places where 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. Responding to a request message sent by a terminal for acquiring a target static resource, and generating a reference catalog of the target static resource; determining whether a static resource list comprises a reference catalog of a target static resource or not, wherein the static resource list comprises the reference catalogs 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 obtains 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 methods and apparatus of 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 embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a 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. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
A user may interact with server 105 via network 104 using terminal 101, terminal 102, terminal 103, to receive or send messages, etc. Various communication client applications may be installed on terminals 101, 102, 103, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, and/or social platform software, to name a few.
Terminals 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the terminals 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, 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 illustrates a flowchart of a method of displaying a web page according to an embodiment of the present disclosure.
The method illustrated in fig. 2 may be generally performed by the server 105 in accordance with embodiments of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, a reference directory of the target static resource is generated in response to a request message for acquiring the target static resource sent by the terminal.
According to the embodiment of the disclosure, when a user accesses a web page on the terminal 101, the terminal 102 or the terminal 103, a request for acquiring web page resources is sent to a server. The requested web page resources include dynamic resources such as business data acquired from a server on the server 105 side, and static resources such as pictures, icons, HTML (Hyper Text Markup Language ), JS (JavaScript), CSS (Cascading Style Sheets, cascading style sheet) scripts, etc. 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, for example, a/home/index.
In operation S202, it is determined whether a reference directory of the target static resource is included in the static resource list, wherein the static resource list includes reference directories and feature values of a plurality of static resources.
According to the embodiment of the disclosure, a static resource list is set at the server 105, where the list includes a plurality of reference directories of static resources requested by the user 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 also be utilized 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 is determined, and whether the user requests the static resource can be determined. If the user requested the static resource, the static resource is stored locally at terminal 101, terminal 102, or terminal 103.
In operation S203, in case it is determined that the reference directory of the target static resource is included in the static resource list, a response message is generated according to the reference directory of the target static resource and the characteristic value of the target static resource in the static resource list.
According to an embodiment of the present 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, specifically, the feature value may be added to the back of the reference directory, for example, the original reference directory/home/index. Html may be updated to be/home/index. Html? Md5=69 ef798a. The reference list of static resources is then returned to terminal 101, terminal 102 or terminal 103 together with the characteristic value as a response message.
According to the embodiment of the disclosure, compared with a mode of adding version numbers 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 to the system and reduce the complexity of application programs.
In operation S204, the response message is sent to the terminal, so that the terminal obtains the target static resource according to the response message, so as to display the web page.
According to the embodiment of the present disclosure, after receiving the response message returned by the server 105, the terminal 101, the terminal 102 or the terminal 103 parses out the characteristic value of the static resource, and then compares with the locally stored characteristic value of the static resource to determine whether the characteristic value is consistent. In the case that the comparison results are consistent, it may be determined that the static resources locally stored by the terminal 101, the terminal 102, or the terminal 103 are consistent with the static resources in the server 105, and the local static resources may be directly acquired without going to the server 105, so as to generate a web page. In the case that the comparison result is inconsistent, it may be determined that the static resources locally stored by the terminal 101, the terminal 102, or the terminal 103 are inconsistent with the static resources in the server 105, and it is required that the terminal 101, the terminal 102, or the terminal 103 acquire the latest static resources from the server 105 according to the reference directory of the static resources.
According to the embodiment of the disclosure, a reference directory of a target static resource is generated in response to a request message sent by a terminal to acquire the target static resource, and whether the reference directory of the target static resource is included in a static resource list or not is determined, wherein the static resource list comprises a plurality of reference directories and characteristic values of the static resource, and under the condition that the reference directory of the target static resource is included in the static resource list, the terminal is determined whether the static resource is updated or not according to the characteristic values of the static resource, so that the terminal acquires the latest static resource.
According to the embodiment of the disclosure, when the reference catalog is returned to the terminal, the characteristic value of the static resource is added, so that the terminal can acquire whether the static resource is updated according to the characteristic value of the static resource, the terminal can acquire the latest static resource, the problems of page function error reporting and the like caused by coexistence of new and old static resources are avoided, and the user experience is improved.
According to an embodiment of the present disclosure, in a case where it is determined that the reference directory of the target static resource is not included in the static resource list, the reference directory of the target static resource is added to the static resource list.
According to an embodiment of the present disclosure, if the reference directory of the target static resource is not in the static resource list, it is indicated that the user has not requested the static resource. The reference directory 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 catalogue and the characteristic 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 cleared according to actual requirements.
Fig. 3 schematically illustrates a flow chart of a method of updating a static resource list according to an embodiment of the 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 at a preset time interval.
According to an embodiment of the present disclosure, the server 105 may set a periodic probing task, where the probing task may include a plurality of probing threads, and the plurality of probing threads may calculate, in parallel, a feature value of each static resource in the resource list, and periodically calculate a feature value of each static resource to determine a feature value of the latest 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, 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 for each static resource. If the comparison results are the same, it is indicated that the static resource is not updated.
In operation S303, in the case where it is determined that the characteristic value of the currently calculated static resource is not identical to the characteristic value of the static resource in the static resource list, the characteristic value of the static resource in the static resource list is updated to the characteristic 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 characteristic value recorded in the static resource list is updated to the latest characteristic value of the static resource.
The above operations S201 to S204 and operations S301 to S303 may be generally performed by the server 105, or may be performed by a device located intermediate between a terminal and a server, for example, may be performed by a proxy server 402 as shown in fig. 4, according to an embodiment of the present disclosure.
FIG. 4 schematically illustrates an exemplary system architecture to which a method and apparatus for displaying web pages of 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. Wherein 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 the page information requested by the terminal 401, and may include, for example, a reference directory of static resources in the page, and the like.
According to the disclosed embodiment, the proxy server 402 itself stores a static resource list, which records the reference directory of static resources requested by the user and the feature values of the static resources updated periodically. The proxy server 402, after receiving the response message returned by the application server 403, may parse out the reference directory of the static resource. Then, whether the reference directory of the parsed static resource is recorded or not is searched in the static resource list, if so, the characteristic value of the static resource in the static resource list is added into the reference directory, and then the reference directory is returned to the terminal 401.
According to the embodiment of the present disclosure, the terminal 401 receives the feature value of the static resource returned by the proxy server 402, and 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 under the consistent condition, can directly use the locally stored static resource to display the web page. 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 disclosure, the proxy server 402 may set a periodic probing task, where the probing task may include a plurality of probing threads, and the plurality of probing threads may obtain corresponding static resources in the application server 403 according to the static resource list when executing, 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 they are inconsistent, replace the feature values recorded in the static resource list with the latest calculated feature values. The feature value in the static resource list can be ensured to correspond to the latest static resource. After one detection period is over, the acquired static resources can be discarded to reduce the occupied space.
According to the embodiment of the disclosure, by setting the application server 403 between the terminal 401 and the application server 403, the application server 403 calculates the feature value of the static resource, sets the resource probing task, maintains the static resource list, and instead of adding the feature value of the static resource in the reference directory returned to the terminal 401 by the application server 403, so that the terminal knows whether the static resource is updated according to the feature value. Under the condition that the terminal and the server are transparent, the client cache of static resources is realized, the network bandwidth pressure of the server is reduced, and the effect that the client can acquire in a short time after the server resource is updated is also realized.
Fig. 5 schematically illustrates a flowchart 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 to acquire a target static resource is transmitted to a server.
According to the embodiment of the present disclosure, when a user accesses a web page 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 a web page resource to a server.
In operation S502, a response message sent by the receiving server in response to the request message, wherein the response message includes a reference directory and a characteristic value of the target static resource.
According to embodiments of the present disclosure, a response message sent by the server 105 may include a reference directory and a feature value for the static resource. The characteristic value of the static resource may be, for example, an MD5 value, and may be uniquely identified. The characteristic value of the static resource can also be the last modified time of the static resource, and the latest update time of the static resource can be characterized.
In operation S503, it is determined whether the characteristic value of the target static resource in the response message and the characteristic value of the locally stored static resource corresponding to the request message are identical.
According to the embodiment of the present disclosure, the terminal 101, the terminal 102 or the terminal 103 may acquire the local target static resource, and then compare the characteristic value of the local target static resource with the characteristic value added in the response message to see whether the characteristic value and the characteristic value are the same.
In operation S504, in case that it is determined that the characteristic value of the target static resource in the response message is not identical to the characteristic value of the locally stored static resource corresponding to the request message, the target static resource is acquired 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 results are consistent, it may be determined that the locally stored static resources of the terminal 101, the terminal 102 or the terminal 103 are consistent with the static resources in the server 105, and the local static resources may be directly acquired without going to the server 105, so as to generate a web page. In the case that the comparison result is inconsistent, it may be determined that the static resources locally stored by the terminal 101, the terminal 102, or the terminal 103 are inconsistent with the static resources in the server 105, and the terminal 101, the terminal 102, or the terminal 103 is required to acquire the latest static resources from the server 105 according to the reference directory.
Referring to the exemplary system architecture shown in fig. 1, a terminal 101 may be used to send a request message to a server to acquire 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 static resource list comprises a reference catalog of a target static resource or not, wherein the static resource list comprises the reference catalogs 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 obtains the target static resource according to the response message.
The terminal 101 may also be configured to receive a response message sent by the server, where the response message includes a reference directory and a 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 different from the characteristic value of the 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 the webpage.
Fig. 6 schematically illustrates 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 generation module 601, a first determination module 602, a second generation module 603, and a first transmission module 604.
The first generating module 601 is configured to generate a reference directory of the target static resource in response to a request message sent by the terminal to acquire the target static resource.
A first determining module 602 is configured to determine whether a reference directory of the target static resource is included in the 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 generate, in a case where it is determined that the static resource list includes the reference directory of the target static resource, 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.
And 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, so as to display the webpage.
According to an embodiment of the present disclosure, the apparatus 600 for displaying a web page further includes a first update module.
And the first updating module is used for adding the reference catalog of the target static resource to the static resource list under the condition that the reference catalog of the target static resource is not included in the static resource list.
According to an 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 characteristic value of the currently calculated static resource is the same as the characteristic value of the static resource in the static resource list or not according to 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 static resource calculated at present under the condition that the characteristic value of the static resource calculated at present is different from the characteristic value of the static resource in the static resource list.
According to the embodiment of the disclosure, the computing module is used for computing the information abstract of each static resource in the static resource list.
Fig. 7 schematically illustrates 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 transmitting module 701, a receiving module 702, a second determining module 703, and an acquiring 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 a reference directory and a 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
and the obtaining module 704 is configured to obtain, when it is determined that the characteristic value of the target static resource in the response message is different from the characteristic value of the locally stored static resource corresponding to the request message, 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 some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple 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-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the first generating module 601, the first determining module 602, the second generating module 603, and the first transmitting module 604 may be combined in one module/unit/sub-unit, or any of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the first generation module 601, the first determination module 602, the second generation module 603, and the first transmission module 604 may be implemented at least in part as hardware circuitry, 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 hardware or firmware in any other reasonable way of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the first generation module 601, the first determination module 602, the second generation module 603 and the first transmission module 604 may be at least partially implemented as computer program modules, which when executed, may perform the respective functions.
It should be noted that, in the embodiment of the present disclosure, the device portion for displaying a web page corresponds to the method portion for displaying a web page in the embodiment of the present disclosure, and the description of the device portion for displaying a web page specifically refers to the method portion for displaying a web page, which is not described herein again.
Fig. 8 schematically illustrates a block diagram of a computer system suitable for implementing the above-described methods, according to an embodiment of the present disclosure. The computer system illustrated in fig. 8 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present 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 an associated chipset and/or special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 801 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 803, various programs and data required 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 flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or the RAM 803. Note that the program may be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the system 800 may further include an input/output (I/O) interface 805, the input/output (I/O) interface 805 also being connected to the bus 804. 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, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or 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. The drive 810 is also connected to the I/O interface 805 as needed. 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 needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. 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 comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments 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: portable computer diskette, hard disk, random Access Memory (RAM), read-only memory (R0M), erasable programmable read-only memory (EPROM or flash memory), portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing. In the context of this 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, the computer-readable storage medium may include ROM 802 and/or RAM 803 and/or one or more memories other than ROM 802 and RAM 803 described above.
The flowcharts 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 the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are 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 above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (6)

1. A method of displaying a web page, comprising:
responding to a request message sent by a terminal for acquiring a target static resource, and generating a reference catalog of the target static resource;
determining whether a static resource list comprises a reference catalog of the target static resource or not, wherein the static resource list comprises a plurality of reference catalogs and characteristic values of the static resources;
generating a response message according to the reference directory of the target static resource and the characteristic value of the target static resource in the static resource list under the condition that the reference directory of the target static resource is included in the static resource list; and
The response message is sent to the terminal, so that the terminal obtains the target static resource according to the response message to display a webpage;
adding the reference directory of the target static resource to the static resource list under the condition that the reference directory of the target static resource is not included in the static resource list;
wherein, the characteristic value of the target static resource is MD5 value and/or last modified time of the target static resource;
the method further comprises the steps of: 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 in question,
comparing whether the currently calculated characteristic value of the static resource is the same as the characteristic value of the static resource in the static resource list; and
and under the condition that the characteristic value of the static resource which is calculated currently is different from the characteristic value of the static resource in the static resource list, updating the characteristic value of the static resource in the static resource list into the characteristic value of the static resource which is calculated currently.
2. The method of claim 1, wherein calculating a characteristic 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.
3. An apparatus for displaying a web page, comprising:
the first generation module is used for responding to a request message sent by the terminal for acquiring the target static resource and generating a reference catalog of the target static resource;
the first determining module is used for determining whether the static resource list comprises a reference catalog of the target static resource or not, wherein the static resource list comprises a plurality of reference catalogs and characteristic values of the static resources;
the second generation module is used for 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 under the condition that the reference catalog of the target static resource is included in the static resource list; and
the first sending module is used for sending the response message to the terminal so that the terminal can acquire the target static resource according to the response message to display a webpage;
a first updating module, configured to add, in a case where it is determined that the reference directory of the target static resource is not included in the static resource list, the reference directory of the target static resource to the static resource list;
Wherein, the characteristic value of the target static resource is MD5 value and/or last modified time of the target static resource;
the apparatus further comprises:
the computing module is used for computing the characteristic value of each static resource in the static resource list according to a preset time interval;
the comparison module is used for comparing whether the currently calculated characteristic value of the static resource is the same as the characteristic value of the static resource in the static resource list or not according to each static resource;
and the second updating module is used for updating the characteristic value of the static resource in the static resource list to the characteristic value of the static resource which is currently calculated under the condition that the characteristic value of the static resource which is currently calculated is different from the characteristic value of the static resource in the static resource list.
4. A system for displaying web pages, comprising:
the terminal is used for sending a request message for acquiring the target static resource to the server;
a server for:
generating a reference directory of the target static resource in response to the request message;
determining whether a static resource list comprises a reference catalog of the target static resource or not, wherein the static resource list comprises a plurality of reference catalogs and characteristic values of the static resources;
Generating a response message according to the reference directory of the target static resource and the characteristic value of the target static resource in the static resource list under the condition that the reference directory of the target static resource is included in the static resource list; and
the response message is sent to the terminal, so that the terminal obtains the target static resource according to the response message;
adding the reference directory of the target static resource to the static resource list under the condition that the reference directory of the target static resource is not included in the static resource list;
wherein, the characteristic value of the target static resource is MD5 value and/or last modified time of the target static resource;
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 in question,
comparing whether the currently calculated characteristic value of the static resource is the same as the characteristic value of the static resource in the static resource list; and
under the condition that the characteristic value of the static resource which is calculated currently is different from the characteristic value of the static resource in the static resource list, updating the characteristic value of the static resource in the static resource list into the characteristic value of the static resource which is calculated currently;
The terminal is further configured to:
receiving a response message sent by the server, wherein the response message comprises a reference catalog 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 static resource corresponding to the request message stored locally; and
and under the condition that the characteristic value of the target static resource in the response message is different from the characteristic value of the static resource corresponding to the request message stored locally, 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.
5. 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 of claims 1-2.
6. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to implement the method of any of claims 1 to 2.
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 CN111783005A (en) 2020-10-16
CN111783005B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487339B (en) * 2020-12-11 2023-05-26 杭州安恒信息技术股份有限公司 Response method, device, equipment and storage medium for Web page request
CN113392349B (en) * 2021-06-11 2025-03-18 北京沃东天骏信息技术有限公司 A page loading method, device, equipment and computer-readable storage medium
CN113326456B (en) * 2021-07-08 2022-01-21 北京达佳互联信息技术有限公司 Webpage resource acquisition method, device, equipment, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111783005A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
US11563674B2 (en) Content based routing method and apparatus
CN109683998A (en) Internationalize implementation method, device and system
CN111783005B (en) Method, device and system for displaying web page, computer system and medium
CN111475180A (en) Method and system for updating client cache
CN110457632B (en) Webpage loading processing method and device
CN108256014B (en) Page display method and device
CN111913738A (en) Access request processing method, device, computing equipment and medium
CN113452733A (en) File downloading method and device
CN112269959A (en) Control method, apparatus, readable medium and electronic device for displaying content
US11477158B2 (en) Method and apparatus for advertisement anti-blocking
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN111953718B (en) Page debugging method and device
US10931771B2 (en) Method and apparatus for pushing information
US9998559B2 (en) Preemptive caching of data
CN113781137B (en) Channel information display method, display device, computer system and storage medium
US11601460B1 (en) Clustering domains for vulnerability scanning
CN110851194B (en) Method and device for acquiring code for realizing new interface
CN111338928A (en) Chrome-based browser testing method and device
US11323537B1 (en) Generating early hints informational responses at an intermediary server
CN113449215B (en) Picture loading method and device
CN113746661B (en) A business processing method and device
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN112688982B (en) User request processing method and device
CN109981806B (en) Domain name processing and registering method and system, and computer system
CN113051090A (en) Interface processing method and device, interface calling method and device, system and 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