CN106649395B - Webpage updating method and device - Google Patents

Webpage updating method and device Download PDF

Info

Publication number
CN106649395B
CN106649395B CN201510738131.4A CN201510738131A CN106649395B CN 106649395 B CN106649395 B CN 106649395B CN 201510738131 A CN201510738131 A CN 201510738131A CN 106649395 B CN106649395 B CN 106649395B
Authority
CN
China
Prior art keywords
static resource
page
updated
published
acquiring
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
CN201510738131.4A
Other languages
Chinese (zh)
Other versions
CN106649395A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510738131.4A priority Critical patent/CN106649395B/en
Publication of CN106649395A publication Critical patent/CN106649395A/en
Application granted granted Critical
Publication of CN106649395B publication Critical patent/CN106649395B/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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The invention relates to a webpage updating method, which comprises the following steps: acquiring and publishing static resources to be published, wherein the static resources to be published comprise static resources to be updated; acquiring a file name and a corresponding information abstract of a static resource to be updated; renaming the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated; and inserting the new name of the static resource to be updated into the page code of the page to be issued, and issuing the page to be issued into which the new name is inserted. By adopting the method, the problem that the page and the static resource are not matched when the updating of the page and the static resource are not synchronous can be avoided, so that the error rate of the page can be reduced. In addition, a webpage updating device is also provided.

Description

Webpage updating method and device
Technical Field
The invention relates to the technical field of internet, in particular to a webpage updating method and device.
Background
With the development of internet technology, various Web (Web) applications, such as forums, microblogs, virtual spaces, etc., are emerging. The Web application usually has frequent iterative updates, and when the Web application needs to be updated, static resources and pages in the Web application can be updated. If the static resource is updated first and then the page is updated, for the user who accesses the page once, the browser caches the static resource before updating, so that the page cannot be loaded to the updated static resource when the page is accessed again in the updating process. However, for a user who accesses the page for the first time, a situation that the page before updating is loaded to the updated static resource may occur, thereby causing a page fault. If the static resource is updated after the page is updated, it may happen that the updated page is loaded to the static resource before the update, and a page fault may also be caused. Because it cannot be guaranteed that the page and the static resource are completely and simultaneously issued, it may happen that the page update and the static resource update are not synchronized, so that the page and the static resource are not matched, and a page fault occurs, as shown in fig. 1.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for updating a web page, which can avoid the problem that a page and a static resource are not matched when the page and the static resource are not updated synchronously, thereby reducing the page error rate.
A method of web page update, the method comprising:
acquiring and publishing static resources to be published, wherein the static resources to be published comprise static resources to be updated;
acquiring a file name and a corresponding information abstract of a static resource to be updated;
renaming the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated;
and inserting the new name of the static resource to be updated into the page code of the page to be issued, and issuing the page to be issued into which the new name is inserted.
An apparatus for updating a web page, the apparatus comprising:
the static resource issuing module is used for acquiring and issuing the static resource to be issued, wherein the static resource to be issued comprises the static resource to be updated;
the information abstract acquisition module is used for acquiring the file name of the static resource to be updated and the corresponding information abstract;
the renaming module is used for renaming the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated;
and the page publishing module is used for inserting the new name of the static resource to be updated into the page code of the page to be published and publishing the page to be published after the new name is inserted.
A method of web page update, the method comprising:
acquiring a page access request sent by a terminal;
judging whether the page publishing is finished or not, if so, acquiring a published page, acquiring a published static resource according to the published page, and returning the published page and the published static resource to the terminal;
and inserting the new name of the static resource after the release into the page code of the page after the release.
An apparatus for updating a web page, the apparatus comprising:
the second judgment module is used for acquiring a page access request sent by the terminal and judging whether page publishing is finished;
the second returning module is used for acquiring the published page if the page publishing is finished, acquiring the published static resource according to the published page, and returning the published page and the published static resource to the terminal;
and inserting the new name of the static resource after the release into the page code of the page after the release.
According to the webpage updating method and device, after the static resource to be published is published, the new name of the static resource to be updated is inserted into the page code of the page to be published, so that the deployment path of the static resource to be updated can be accurately obtained in the page to be published by using the mapping relation between the file name of the static resource to be updated and the information abstract. Therefore, the static resource to be updated is loaded into the page to be issued, and the problem that the page and the static resource are not matched when the page update and the static resource update are asynchronous is effectively solved.
Drawings
FIG. 1 is a diagram illustrating a page fault displayed in a browser in one embodiment;
FIG. 2 is a diagram of an application environment of the method for updating a web page in one embodiment;
FIG. 3 is a block diagram that illustrates a server that supports web page updates, according to one embodiment;
FIG. 4 is a flow diagram of a method for updating a web page in one embodiment;
FIG. 5 is a flowchart of a web page update method in another embodiment;
FIG. 6 is a diagram illustrating a display of a pre-update page in a browser, under an embodiment;
FIG. 7 is a diagram illustrating displaying an updated page in a browser, under an embodiment;
FIG. 8 is a diagram illustrating an exemplary embodiment of a web page update apparatus;
FIG. 9 is a schematic diagram of another embodiment of a web page update apparatus;
FIG. 10 is a block diagram illustrating an exemplary message digest acquisition module;
FIG. 11 is a schematic diagram illustrating an exemplary embodiment of a web page update apparatus;
fig. 12 is a schematic structural diagram of a web page updating apparatus in another embodiment.
Detailed Description
The webpage updating method provided by the embodiment of the invention can be applied to the application environment shown in FIG. 2. Referring to fig. 2, a user interacts with a server 204 through a network using a terminal 202. The terminal 202 includes a desktop computer, a notebook computer, a tablet computer, a smart phone, and the like, which can run a browser. A user may send an HTTP (HyperText Transfer Protocol) request to the server 204 through the browser to request access to a Web application such as a virtual space or forum. When the server 204 needs to update the Web application, the static resources and pages in the new version of the Web application can be released. Before publishing, the server 204 obtains all static resources to be published (the static resources to be published include non-updated static resources and static resources to be updated), calculates information summaries corresponding to all the static resources to be published, and establishes a mapping relationship between file names of the static resources to be published and the information summaries.
When publishing, the server 204 may publish the static resource to be published first. Secondly, the server 204 renames the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract, so as to obtain a new name of the static resource to be updated. The server 204 inserts the new name of the static resource to be updated into the page code of the page to be published, and publishes the page to be published after the new name is inserted. The problem that the page and the static resource are not matched when the updating of the page and the static resource is not synchronous is effectively avoided, and therefore the error rate of the page can be reduced.
In one embodiment, as shown in FIG. 3, a server supporting web page updates is provided. The server comprises a processor, a storage medium, a memory and a network interface which are connected through a system bus. The storage medium of the server stores an operating system, a database and a webpage updating device, and the webpage updating device is used for realizing a webpage updating method suitable for the server. The processor of the server is used for providing calculation and control capacity and supporting the operation of the whole server. The memory of the server provides an environment for the operation of the web page updating device in the storage medium. The network interface of the server is used for communicating with an external terminal through network connection, for example, receiving an HTTP request sent by a browser, and returning an updated static resource and an updated page to the browser. The server may be implemented as a stand-alone server or as a cluster server.
In an embodiment, as shown in fig. 4, a method for updating a web page is provided, which is described by taking an example that the method is applied to a server, and specifically includes:
step 402, obtaining and issuing the static resource to be issued, wherein the static resource to be issued comprises the static resource to be updated.
Static resources refer to CSS (Cascading Style Sheets, a computer language) files, Javascript (an interpreted scripting language) files, and files such as pictures and videos required by CSS files referenced in a page. The pages include HTML (HyperText Markup Language) pages, Web pages, and NET (a computer Language) pages, etc., wherein the HTML pages may be HTML5(HTML fifth edition) pages. The static resources to be issued comprise the static resources which are not updated and the static resources to be updated. An un-updated static resource refers to a static resource that does not need to be updated. The static resource to be updated refers to the static resource needing to be updated. When a website or Web application is updated, a new version of static resources and pages needs to be released. The new version of the static resource is the static resource to be released, and the new version of the page is the page to be released. The static resources and the pages may be deployed in the same server or in different servers. The server may be an independent server or a cluster server.
The server can issue the static resource to be issued and the page to be issued respectively. The server can issue the static resource to be issued first and then issue the page to be issued. When issuing, the server may first obtain all static resources to be issued, where the static resources to be issued include non-updated static resources and static resources to be updated, and issue the static resources to be issued. The publishing mode can adopt a non-overlay publishing mode. The published static resource may also be referred to as an updated static resource.
After the static resource to be published is published and before the page to be published is published, a user may send a page access request to a server through a browser installed in a terminal. For a user who has accessed the page once, because the browser caches the static resource before updating, the server can only return the page before updating according to the page access request, the browser analyzes the page before updating, and renders the page before updating by using the cached static resource before updating and the page before updating. For a user who accesses the page for the first time, the server returns the page before updating and the static resource before updating to the browser according to the page access request, and the browser analyzes the page before updating and the static resource before updating and renders the page before updating. Because the static resource before updating is referenced in the page before updating, the page before updating can still be normally displayed in the browser of the user.
Step 404, obtaining the file name of the static resource to be updated and the corresponding information abstract.
Before publishing, the server may obtain the file name of the static resource to be published in advance, calculate the information abstract corresponding to the static resource to be published, and establish a mapping relationship between the file name of the static resource to be published and the corresponding information abstract.
After the static resource to be published is published, the server publishes the page to be published. In order to reduce the operation burden of the server and effectively save the flow, when the page to be published is published, the static resource which is not updated can continuously maintain the reference in the page to be published, and only the static resource to be updated is updated and referred in the page to be published.
And 406, renaming the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated.
Because the file name of the static resource to be updated and the corresponding information abstract have a mapping relation, the server can rename the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated.
And step 408, inserting the new name of the static resource to be updated into the page code of the page to be issued, and issuing the page to be issued after the new name is inserted.
The server refers to the renamed static resource to be updated in the page to be published through the reference function, and inserts the new name of the static resource to be updated into the page code of the page to be published, so that the deployment path of the static resource to be updated can be accurately obtained in the page to be published by utilizing the mapping relation between the file name of the static resource to be updated and the information abstract. Therefore, the static resource to be updated is loaded into the page to be issued, and the problem that the page and the static resource are not matched when the page update and the static resource update are asynchronous is effectively solved.
The published page may also be referred to as an updated page. The updated static resources can be loaded in the updated page. The publishing mode can adopt a non-overlay publishing mode, so that on one hand, the problem that the page and the static resource are not matched when the page and the static resource are not updated synchronously can be effectively avoided, and on the other hand, if the updated static resource and/or the updated page breaks down in the operation process, the page can be conveniently and timely rolled back.
If an overlay publishing mode is adopted, namely, the reference of the static resource before updating is deleted in the to-be-published page and the to-be-updated static resource is directly referenced, a user may visit the page when the to-be-published page is not published, and the updated static resource is loaded on the page before updating, so that the page is not matched with the static resource, and the page display error is caused. The static resource to be issued and the page to be issued are issued respectively, and a non-coverage issuing mode is adopted, so that the problem that the page is not matched with the static resource in the situation can be effectively solved.
In the embodiment, after the static resource to be published is published, the new name of the static resource to be updated is inserted into the page code of the page to be published, so that the deployment path of the static resource to be updated can be accurately obtained in the page to be published by using the mapping relation between the file name of the static resource to be updated and the information abstract. Therefore, the static resource to be updated is loaded into the page to be issued, and the problem that the page and the static resource are not matched when the page update and the static resource update are asynchronous is effectively solved.
Further, the method for updating a web page provided in this embodiment is compared with a conventional method for updating a web page by modifying a query string for a static resource. Although the query character string is modified for the static resource, the problem that the page and the static resource are not matched when the page update and the static resource update are asynchronous can be avoided. However, after the query string is added to the static resource, the browser requests to download the static file to which the query string is added, even if the static resource is not modified. If the query character string is only modified for the static resource to be updated, the browser only requests to download the latest modified static resource, and the server still needs to calculate the deployment path of each static resource file to be updated according to the query character string, so that the calculation is complex, and more traffic is consumed when the calculation is performed in the updating process.
In this embodiment, since the information digest corresponding to the static resource to be published is pre-calculated before the static resource to be published is published, when the page to be published is published, only the new name of the static resource to be updated needs to be inserted into the page code. Therefore, the operation burden of the server can be effectively reduced in the updating process, and the flow consumption can be effectively reduced.
In one embodiment, before the step of obtaining and publishing the static resource to be published, the method further includes: acquiring a file name of a static resource to be issued; calculating an information abstract corresponding to the static resource to be issued; and establishing a mapping relation between the file name of the static resource to be issued and the information abstract.
In this embodiment, the server obtains the file name of the static resource to be published, that is, obtains all the non-updated static resources and the file name of the static resource to be updated. The server calculates the information abstract corresponding to the static resource to be issued, namely, calculates all the non-updated static resources and the information abstract corresponding to the static resource to be updated.
Specifically, an information abstract algorithm is adopted to calculate all the non-updated static resources and the information abstract corresponding to the static resources to be updated. The Message Digest Algorithm includes MD5(Message Digest Algorithm MD5, fifth version of Message Digest Algorithm), SHA1(Secure Hash Algorithm), and the like. The server establishes a mapping relation between the file name of the static resource to be issued and the corresponding information abstract.
Further, the server may record the file name of the to-be-published static resource having the mapping relationship and the corresponding information digest. For example, the server records the file name of the static resource to be published with the mapping relationship and the corresponding information summary in the mapping file. The server can extract the file name of the static resource to be updated and the corresponding information abstract from the file name and the information abstract of the static resource to be published.
In one embodiment, the renaming the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated includes: and after splicing the file name of the static resource to be updated, the corresponding information abstract and the preset character or the preset character string, generating a new name of the static resource to be updated. The preset characters include connectors, underlines, and the like, and the preset character string may include a plurality of preset characters. The file name may or may not include an extension. And if the file name does not comprise the extension name, splicing the file name of the static resource to be updated, the corresponding information abstract, the preset character or the preset character string and the extension name to generate a new name of the static resource to be updated.
The file name is described as an example in which the extension is not included. For example, the static resource to be updated is aaa.css, the file name aaa thereof, the corresponding message digest is xxxx, the extension name is css, the preset character is _ (underlined), the file name, the message digest, the preset character and the extension name are spliced to obtain aaa _ xxxx.css, and aaa _ xxxx.css is used as a new name of the resource to be updated.
In one embodiment, the step of obtaining the file name and the corresponding information summary of the static resource to be updated includes: comparing the information abstract corresponding to the static resource to be issued with the information abstract corresponding to the static resource before updating; and extracting the static resource with the information abstract in the static resource to be released and the information abstract corresponding to the static resource before updating being inconsistent as the static resource to be updated, and acquiring the file name of the extracted static resource to be updated and the corresponding information abstract.
In this embodiment, the static resource may have multiple versions. The static resource before updating is the last version of the static resource after updating, and the static resource after updating is the next version of the static resource before updating. The static resource comprises a plurality of static resource files. Static resource files may use the same file name in multiple versions. And the server acquires all the static resources to be issued, calculates all the static resources to be issued and respectively acquires the information abstract corresponding to each static resource file to be issued. And acquiring the information abstract corresponding to each static resource file in the static resources before updating. The information abstract corresponding to the static resource to be published and the information abstract corresponding to the static resource before updating can be respectively compared according to the file name of the static resource, namely, the information abstract corresponding to each static resource file to be published and the information abstract corresponding to the static resource file before updating are compared.
Because the information abstracts and the static resources are in one-to-one correspondence, if the two information abstracts corresponding to the file names of the same static resource are completely consistent in comparison, the static resource is not modified and does not need to be updated, and the static resource corresponding to the information abstracts consistent in comparison is determined as the static resource which is not updated. And if the inconsistent information digests exist, the static resources are modified and need to be updated, and the static resources corresponding to the inconsistent information digests are determined as the static resources to be updated. And extracting the static resource to be updated from the static resource to be issued, and acquiring the file name of the static resource to be updated and the corresponding information abstract.
In one embodiment, the static resource to be updated is extracted from the static resource to be published before the static resource is published. The method specifically comprises the following steps: acquiring a file name of a static resource to be issued; calculating an information abstract corresponding to the static resource to be issued; establishing a mapping relation between the file name and the information abstract of the static resource to be issued; comparing the information abstract corresponding to the static resource to be issued with the information abstract corresponding to the static resource before updating; and extracting the static resource with the information abstract corresponding to the static resource to be released and the information abstract corresponding to the static resource before updating as the static resource to be updated.
Further, after the static resource to be updated is extracted, the static resource to be published and the page to be published can be published respectively by using the webpage updating method provided in the above embodiment.
In this embodiment, the information abstract corresponding to the static resource to be published and the static resource to be updated extracted from the static resource to be published are obtained before the static resource to be published, so that the traffic consumption can be further reduced.
In one embodiment, the static resource to be updated is extracted from the static resource to be published, which may be performed after the static resource is published. The method specifically comprises the following steps: acquiring a file name of a static resource to be issued; calculating an information abstract corresponding to the static resource to be issued; establishing a mapping relation between the file name and the information abstract of the static resource to be issued; acquiring and publishing static resources to be published, wherein the static resources to be published comprise static resources to be updated; comparing the information abstract corresponding to the static resource to be issued with the information abstract corresponding to the static resource before updating; and extracting the static resource with the information abstract corresponding to the static resource to be released and the information abstract corresponding to the static resource before updating as the static resource to be updated.
Further, after the static resource to be updated is extracted, the webpage to be published may be published by using the webpage updating method provided in the above embodiment.
In one embodiment, the method further comprises: acquiring a page access request sent by a terminal; judging whether the page publishing is finished or not, if so, acquiring the published page, acquiring the published static resource according to the published page, and returning the published page and the published static resource to the terminal; otherwise, acquiring the page before issuing, acquiring the static resource before issuing according to the page before issuing, and returning the page before issuing and the static resource before issuing to the terminal.
In this embodiment, the terminal sends a page access request to the server through the browser. For example, the terminal sends an HTTP request to the server through the browser, requesting access to the page. And if the server completes the issue of the page after receiving the page access request, returning the issued page and the issued static resource to the terminal according to the page access request. And the terminal analyzes the updated page and the updated static resource through the browser and renders the updated page.
If the server receives the page access request, the server only completes the issue of the static resource and does not complete the issue of the page, and for the terminal accessing the page for the first time, the server returns the page before the issue and the static resource before the issue to the terminal according to the page access request. And the terminal analyzes the page before updating and the static resource before updating through the browser and renders the page before updating.
For the terminal which has accessed the page once, the server can return the page before being issued to the terminal according to the page access request because the static resource before being issued is cached in the browser. And the terminal analyzes the page before updating through the browser and renders the page before updating by using the cached static resource before updating and the page before updating. Therefore, the problem that the updating of the page and the static resource is not synchronous can be avoided, and the error rate of the page can be reduced.
In one embodiment, as shown in fig. 5, there is provided a web page updating method, including:
step 502, acquiring a page access request sent by a terminal.
Step 504, judging whether the page release is finished; if yes, go to step 506, otherwise, go to step 508, return to the page before issuing and static resource before issuing according to the page access request.
Step 506, acquiring the published page, acquiring the published static resource according to the published page, and returning the published page and the published static resource to the terminal; and inserting a new name of the static resource after the release into the page code of the page after the release.
In this embodiment, the terminal sends a page access request to the server through the browser. For example, the terminal sends an HTTP request to the server through the browser, requesting access to the page. In one embodiment, if the page publishing is not completed, the page before publishing is acquired, the static resource before publishing is acquired according to the page before publishing, and the page before publishing and the static resource before publishing are returned to the terminal. If the server receives the page access request, the server only completes the issue of the static resource and does not complete the issue of the page, and for the terminal accessing the page for the first time, the server returns the page before the issue and the static resource before the issue to the terminal according to the page access request. And the terminal analyzes the page before updating and the static resource before updating through the browser and renders the page before updating. As shown in fig. 6, the pre-update page presented in the browser is a post posted by the user in a forum.
And if the server completes the issue of the page after receiving the page access request, returning the issued page and the issued static resource to the terminal according to the page access request. And inserting a new name of the static resource after the release into the page code of the page after the release. The new naming can be obtained by splicing when the page to be issued is issued, or can be obtained by splicing before the static resource to be issued is issued. Specifically, the file name and the corresponding information abstract of the static resource to be updated are obtained; and after splicing the file name of the static resource to be updated, the corresponding information abstract and the preset character or character string, generating a new name of the static resource to be updated. And the terminal analyzes the updated page and the updated static resource through the browser and renders the updated page. As shown in fig. 7, an updated page is presented in the browser, wherein in addition to the posts posted by the user, a hot leader board and a two-dimensional code are added to the updated page.
In one embodiment, the method further comprises: rolling back the updated static resource to the static resource before updating; rolling back the updated page to the page before updating; the pre-update static resource is referenced in the pre-update page.
In this embodiment, after the release is completed, if the static resource after the release and/or the page after the release have a failure in operation, the rollback needs to be performed in time. For example, a website or Web application is rolled back from an updated version to a pre-updated version. In the rollback, a file recording the static resources having the mapping relationship and the corresponding information digests may be used, and for example, the rollback may be performed using the mapping file. Due to the adoption of the non-overlay type publishing mode, the updated static resources can be rolled back to the static resources before updating, and the updated page can be rolled back to the page before updating. The method provided in the above embodiment may be adopted, and the static resource before updating is referred to in the page before updating according to the mapping file before updating. Therefore, the updated static resources and the updated pages can be conveniently and timely rolled back.
In one embodiment, as shown in fig. 8, there is provided a web page updating apparatus including: a static resource publishing module 802, an information summary obtaining module 804, a renaming module 806, and a page publishing module 808, wherein:
the static resource publishing module 802 is configured to obtain and publish a static resource to be published, where the static resource to be published includes a static resource to be updated.
An information abstract obtaining module 804, configured to obtain a file name of the static resource to be updated and a corresponding information abstract.
And a renaming module 806, configured to rename the static resource to be updated according to the file name of the static resource to be updated and the corresponding information summary, to obtain a new name of the static resource to be updated.
The page publishing module 808 is configured to insert the new name of the static resource to be updated into the page code of the page to be published, and publish the page to be published after the new name is inserted.
In one embodiment, as shown in fig. 9, the apparatus further comprises: an obtaining module 810, a calculating module 812, and a mapping module 814, wherein:
the obtaining module 810 is configured to obtain a file name of the static resource to be published.
And a calculating module 812, configured to calculate an information summary corresponding to the static resource to be published.
The mapping module 814 is configured to establish a mapping relationship between the file name of the static resource to be published and the information abstract.
In an embodiment, the renaming module 806 is configured to concatenate the filename of the static resource to be updated, the corresponding information summary, and the preset character or the preset character string, and then generate a new name of the static resource to be updated.
In one embodiment, as shown in fig. 10, the information summary obtaining module 804 includes: an alignment unit 804a and an extraction unit 804b, wherein:
a comparing unit 804a, configured to compare the information summary corresponding to the to-be-released static resource with the information summary corresponding to the static resource before updating;
the extracting unit 804b extracts the static resource, in which the corresponding information digest in the static resource to be released is inconsistent with the information digest corresponding to the static resource before updating, as the static resource to be updated, and obtains the file name of the extracted static resource to be updated and the corresponding information digest.
In one embodiment, as shown in fig. 11, the apparatus further comprises: a first determination module 816 and a first return module 818, wherein:
the first determining module 816 is configured to obtain a page access request sent by the terminal, and determine whether page publishing is completed.
A first returning module 818, configured to obtain the published page if the page publishing is completed, obtain the published static resource according to the published page, and return the published page and the published static resource to the terminal.
The first returning module 818 is further configured to, if the page publishing is not completed, obtain the page before publishing, obtain the static resource before publishing according to the page before publishing, and return the page before publishing and the static resource before publishing to the terminal.
In one embodiment, as shown in fig. 12, there is provided a web page updating apparatus including: a second decision module 1202 and a second return module 1204, wherein:
the second determining module 1202 is configured to obtain a page access request sent by the terminal, and determine whether page publishing is completed.
A second returning module 1204, configured to obtain the published page if the page publishing is completed, obtain the published static resource according to the published page, and return the published page and the published static resource to the terminal. And inserting a new name of the static resource after the release into the page code of the page after the release.
In an embodiment, the second returning module 1204 is further configured to, if the page publishing is not completed, obtain a page before publishing, obtain the static resource before publishing according to the page before publishing, and return the page before publishing and the static resource before publishing to the terminal.
It will be understood by those skilled in the art that all or part of the processes in the methods of the embodiments described above may be implemented by hardware related to instructions of a computer program, which may be stored in a computer readable storage medium, for example, in the storage medium of a computer system, and executed by at least one processor in the computer system, so as to implement the processes of the embodiments including the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A method of web page update, the method comprising:
acquiring and publishing static resources to be published, wherein the static resources to be published comprise static resources to be updated;
acquiring a file name of a static resource to be updated and a corresponding information abstract as well as a mapping relation between the file name and the information abstract;
renaming the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated;
and acquiring a deployment path of the resource to be updated based on the mapping relation, inserting the new name of the static resource to be updated into a page code of the page to be issued according to the deployment path, and issuing the page to be issued after the new name is inserted.
2. The method according to claim 1, wherein before the step of obtaining and publishing the static resource to be published, the method further comprises:
acquiring a file name of a static resource to be issued;
calculating an information abstract corresponding to the static resource to be issued;
and establishing a mapping relation between the file name of the static resource to be issued and the information abstract.
3. The method according to claim 2, wherein the step of obtaining the file name and the corresponding information summary of the static resource to be updated comprises:
comparing the information abstract corresponding to the static resource to be issued with the information abstract corresponding to the static resource before updating;
and extracting the static resource with the information abstract in the static resource to be released and the information abstract corresponding to the static resource before updating being inconsistent as the static resource to be updated, and acquiring the file name of the extracted static resource to be updated and the corresponding information abstract.
4. The method according to claim 1, wherein the renaming the static resource to be updated according to the filename and the corresponding information summary of the static resource to be updated to obtain a new name of the static resource to be updated comprises:
and after splicing the file name of the static resource to be updated, the corresponding information abstract and a preset character or a preset character string, generating a new name of the static resource to be updated.
5. The method of claim 1, further comprising:
acquiring a page access request sent by a terminal;
judging whether the page publishing is finished or not, if so, acquiring a published page, acquiring a published static resource according to the published page, and returning the published page and the published static resource to the terminal;
otherwise, acquiring a page before issuing, acquiring a static resource before issuing according to the page before issuing, and returning the page before issuing and the static resource before issuing to the terminal.
6. A method of web page update, the method comprising:
acquiring a page access request sent by a terminal;
judging whether the page publishing is finished or not, if so, acquiring a published page, acquiring a published static resource according to the published page, and returning the published page and the published static resource to the terminal;
the new name of the static resource after the release is inserted into the page code of the page after the release according to a deployment path, the deployment path is obtained based on the mapping relation between the file name of the static resource to be updated and the corresponding information abstract, and the new name is obtained by renaming the static resource to be updated according to the file name and the corresponding information abstract.
7. The method of claim 6, further comprising: if the page publishing is not finished, acquiring a page before publishing, acquiring a static resource before publishing according to the page before publishing, and returning the page before publishing and the static resource before publishing to the terminal.
8. An apparatus for updating a web page, the apparatus comprising:
the static resource issuing module is used for acquiring and issuing the static resource to be issued, wherein the static resource to be issued comprises the static resource to be updated;
the information abstract acquiring module is used for acquiring a file name of the static resource to be updated, a corresponding information abstract and a mapping relation between the file name and the information abstract;
the renaming module is used for renaming the static resource to be updated according to the file name of the static resource to be updated and the corresponding information abstract to obtain a new name of the static resource to be updated;
and the page publishing module is used for obtaining the deployment path of the resource to be updated based on the mapping relation, inserting the new name of the static resource to be updated into the page code of the page to be published according to the deployment path, and publishing the page to be published after the new name is inserted.
9. The apparatus of claim 8, further comprising:
the acquisition module is used for acquiring the file name of the static resource to be issued;
the calculation module is used for calculating the information abstract corresponding to the static resource to be issued;
and the mapping module is used for establishing a mapping relation between the file name of the static resource to be issued and the information abstract.
10. The apparatus of claim 9, wherein the information summary obtaining module comprises:
the comparison unit is used for comparing the information abstract corresponding to the static resource to be issued with the information abstract corresponding to the static resource before updating;
and the extracting unit is used for extracting the static resource with the corresponding information abstract in the static resource to be issued and the information abstract corresponding to the static resource before updating, as the static resource to be updated, and acquiring the file name of the extracted static resource to be updated and the corresponding information abstract.
11. The apparatus according to claim 8, wherein the renaming module is configured to generate a new name of the static resource to be updated after splicing the filename of the static resource to be updated, the corresponding information summary, and a preset character or a preset character string.
12. The apparatus of claim 8, further comprising:
the first judgment module is used for acquiring a page access request sent by a terminal and judging whether page publishing is finished or not;
the first returning module is used for acquiring a published page if the page publishing is finished, acquiring a published static resource according to the published page, and returning the published page and the published static resource to the terminal;
the first returning module is further configured to, if the page publishing is not completed yet, acquire a page before publishing, acquire the static resource before publishing according to the page before publishing, and return the page before publishing and the static resource before publishing to the terminal.
13. An apparatus for updating a web page, the apparatus comprising:
the second judgment module is used for acquiring a page access request sent by the terminal and judging whether page publishing is finished;
the second returning module is used for acquiring the published page if the page publishing is finished, acquiring the published static resource according to the published page, and returning the published page and the published static resource to the terminal;
the new name of the static resource after the release is inserted into the page code of the page after the release according to a deployment path, the deployment path is obtained based on the mapping relation between the file name of the static resource to be updated and the corresponding information abstract, and the new name is obtained by renaming the static resource to be updated according to the file name and the corresponding information abstract.
14. The apparatus of claim 13, wherein the second returning module is further configured to, if the page publishing is not completed, obtain a page before publishing, obtain a static resource before publishing according to the page before publishing, and return the page before publishing and the static resource before publishing to the terminal.
15. A server comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any of claims 1 to 5 when executing the computer program.
16. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201510738131.4A 2015-11-03 2015-11-03 Webpage updating method and device Active CN106649395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510738131.4A CN106649395B (en) 2015-11-03 2015-11-03 Webpage updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510738131.4A CN106649395B (en) 2015-11-03 2015-11-03 Webpage updating method and device

Publications (2)

Publication Number Publication Date
CN106649395A CN106649395A (en) 2017-05-10
CN106649395B true CN106649395B (en) 2021-05-25

Family

ID=58810509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510738131.4A Active CN106649395B (en) 2015-11-03 2015-11-03 Webpage updating method and device

Country Status (1)

Country Link
CN (1) CN106649395B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107370791A (en) * 2017-06-23 2017-11-21 微梦创科网络科技(中国)有限公司 The method and system of filename in automatic synchronization renewal content distributing network
CN107273139A (en) * 2017-07-05 2017-10-20 努比亚技术有限公司 A kind of method for updating system, equipment and computer-readable recording medium
CN107357890B (en) * 2017-07-12 2023-03-24 腾讯科技(深圳)有限公司 Webpage file processing method, device and system and storage equipment
CN107645422A (en) * 2017-11-17 2018-01-30 武汉楚鼎信息技术有限公司 A kind of website static resource update method and system and device
CN107992557A (en) * 2017-11-28 2018-05-04 平安养老保险股份有限公司 Static resource update method, device, storage medium and computer equipment
CN110727889A (en) * 2018-06-28 2020-01-24 北京京东尚科信息技术有限公司 Static webpage resource loading method, device, medium and electronic equipment
CN110058873B (en) * 2019-03-12 2021-09-17 天津五八到家科技有限公司 Application page updating method, device, equipment and storage medium
CN110059276A (en) * 2019-03-12 2019-07-26 天津五八到家科技有限公司 Method for updating pages, device, equipment and storage medium
CN110929194B (en) * 2019-11-21 2023-04-07 山东鲁软数字科技有限公司 Abstract algorithm-based static resource file cache control method and system
CN112783539A (en) * 2020-04-20 2021-05-11 招商证券股份有限公司 Application updating method, system, terminal device and storage medium
CN112883254A (en) * 2021-03-23 2021-06-01 浙江网商银行股份有限公司 Resource processing system, resource processing method and device
CN113703807B (en) * 2021-08-26 2023-12-15 上海德拓信息技术股份有限公司 Method and system for real-time detection and update of static resource version

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2365372A1 (en) * 2001-12-18 2003-06-18 Ibm Canada Limited-Ibm Canada Limitee Method and apparatus for editing a production data store by shadowing content
US20070198630A1 (en) * 2006-01-06 2007-08-23 Lee Jacobson Delivery of archived content to authorized users
CN101277472B (en) * 2007-03-30 2011-08-10 华为技术有限公司 Method, equipment and system of synchronization of blog contents
CN101626371B (en) * 2008-07-07 2014-04-30 华为技术有限公司 Method and device for processing permit
CN102045372A (en) * 2009-10-20 2011-05-04 上海及第熊软件科技有限公司 Website content publication method and system for realizing remote staticizing
CN101697168B (en) * 2009-10-22 2011-10-19 中国科学技术大学 Method and system for dynamically managing metadata of distributed file system
CN102207945B (en) * 2010-05-11 2013-10-23 天津海量信息技术有限公司 Knowledge network-based text indexing system and method
CN101980204B (en) * 2010-11-04 2013-07-10 上海银杏界信息科技有限公司 Static webpage automatic updating method
CN102801711B (en) * 2012-07-10 2015-03-25 中国科学技术大学 Autonomous controllable website safety defensive system based on hardware processing board
CN103310160B (en) * 2013-06-20 2016-08-10 北京神州绿盟信息安全科技股份有限公司 A kind of method, system and device preventing webpage to be tampered
CN104899228A (en) * 2014-03-07 2015-09-09 中国移动通信集团河北有限公司 Method and device for publishing webpage resources
CN104021349B (en) * 2014-04-03 2017-07-14 福建伊时代信息科技股份有限公司 Network evidence security method and secure device in advance
CN104092726A (en) * 2014-06-09 2014-10-08 乐视网信息技术(北京)股份有限公司 Automatic replacing method and apparatus of same-name file
CN104978194B (en) * 2015-06-25 2018-06-05 北京京东尚科信息技术有限公司 A kind of webpage front-end development approach and device

Also Published As

Publication number Publication date
CN106649395A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN106649395B (en) Webpage updating method and device
US9064029B2 (en) Dynamically identifying and evaluating component hierarchy for rendering content components on a webpage
EP3491544B1 (en) Web page display systems and methods
US8225192B2 (en) Extensible cache-safe links to files in a web page
US20180041590A1 (en) Website access method, apparatus, and website system
CN106933614B (en) Single-page application upgrading method and device
WO2017124962A1 (en) Method, apparatus, and system for hot-deploying application
WO2015161658A1 (en) Webpage resource loading method and device
US20120084346A1 (en) Page Loading Optimization Using Page-Maintained Cache
CN105989098B (en) Icon package generation method and server, and icon processing method and system
US20160006829A1 (en) Data management system and data management method
CN107992557A (en) Static resource update method, device, storage medium and computer equipment
US9892100B2 (en) Verifying content of resources in markup language documents
CA2902200C (en) Caching pagelets of structured documents
TWI539302B (en) Late resource localization binding for web services
CN103078945A (en) Method and system for processing browser crash data
CN110737853B (en) Multi-platform display static page data synchronization method and B2B system
CN100511239C (en) Method, system and device for accessing network resource
CN108920203A (en) A kind of page loading method and equipment
US10198449B2 (en) Creating unique content item identifiers
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN107688650B (en) Web page generation method and device
US9229611B2 (en) Automatic management of client data consistency
CN111767495A (en) Method and system for synthesizing webpage
US10417296B1 (en) Intelligent bookmarking with URL modification

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