Method, device, apparatus and computer-readable medium for rendering pages

By merging the resource package files, updating the resource packages in the container, and rendering the page based on the latest or last html file, the page rendering error problem caused by the container not including the latest version of the index.html file is solved, and the success rate of page rendering is improved.

CN119760259APending Publication Date: 2025-04-04JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311265410.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

When the container publishes the index.html file, if the container does not include the latest version of the index.html file, it will cause page rendering errors and reduce the success rate of page rendering.

Method used

By combining all files in the last published resource package and files in the non-html file in the resource package to be released this time, we obtain the historical resource package, and use the files in the non-html file in the last published resource package and all files in the resource package to be released this time as the current resource package. Then, the last published resource package in the container is updated with the historical resource package to render the page according to the html file in the last published resource package. In response to the instruction to publish the resource package to be published this time, at least one historical resource package in the container is replaced according to the current resource package, and the page is rendered based on the html file in the released resource package or the html file in the last published resource package.

Benefits of technology

Through this method, the success rate of page rendering can be improved, ensuring that no matter whether the html file requested by the user is from the last published resource package or the current published resource package, the corresponding js and css files can be found in the container, thereby avoiding the page rendering failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760259A_ABST
    Figure CN119760259A_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and computer-readable medium for rendering a page, and relates to the field of computer technology. A specific implementation of the method includes: merging all files in the last published resource package and files other than HTML files in the resource package to be published this time to obtain a historical resource package; using the files other than HTML files in the last published resource package and all files in the resource package to be published this time as the current resource package; using the historical resource package to update the last published resource package in the container to render the page according to the HTML files in the last published resource package; in response to an instruction to publish the resource package to be published this time, replacing at least one of the historical resource packages in the container according to the current resource package, and rendering the page based on the HTML files in the resource package published this time or the HTML files in the last published resource package. This implementation can improve the success rate of page rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and computer-readable medium for rendering a page. Background Art

[0002] Front-end application releases are mostly packaged using webpack, which generates the index.html file and its referenced js and css files, and finally publishes the packaged files to the static resource server. webpack is a front-end packaging and compilation tool.

[0003] The user requests the index.html file according to the URL, parses the js file address and css file address referenced in the file, requests these files separately, and finally completes the page rendering.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: when a container is used to publish the index.html file, if the container does not include the latest version of the index.html file, page rendering errors will occur. Summary of the invention

[0005] In view of this, embodiments of the present invention provide a method, apparatus, device and computer-readable medium for rendering a page, which can improve the success rate of page rendering.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for rendering a page is provided, comprising:

[0007] Merge all files in the last published resource package and the non-html files in the resource package to be published this time to get the historical resource package;

[0008] Take the non-html files in the previously published resource package and all the files in the resource package to be published this time as the current resource package;

[0009] The historical resource package is used to update the last published resource package in the container, so as to render the page according to the HTML file in the last published resource package;

[0010] In response to an instruction to publish the resource bundle to be published this time, at least one of the historical resource bundles in the container is replaced according to the current resource bundle, and a page is rendered based on an HTML file in the currently published resource bundle or an HTML file in the last published resource bundle.

[0011] The merging of all files in the last published resource package and the non-html files in the resource package to be published this time to obtain a historical resource package includes:

[0012] Filtering the resource package that was previously published and the resource package to be published this time according to the timestamp in the resource package and the release identifier of the resource package;

[0013] Merge all files in the last published resource package and the non-html files in the resource package to be published this time to get the historical resource package.

[0014] The method of using the historical resource bundle to update the last published resource bundle in the container to render a page according to the HTML file in the last published resource bundle includes:

[0015] Add the non-html files in the resource package to be published this time to the previously published resource package in the container;

[0016] According to the HTML files in the last published resource bundle, non-HTML files in the last published resource bundle are loaded in the container to render the page.

[0017] After responding to the instruction to publish the resource package to be published this time,

[0018] The method further comprises:

[0019] Based on the HTML files in the resource package that has been published this time, non-HTML files in the resource package to be published in the container are loaded to render the page.

[0020] The page rendering based on the HTML file in the currently released resource package or the HTML file in the previously released resource package includes:

[0021] Based on the HTML files in the resource package that has been published, non-HTML files in the resource package to be published in the container are loaded to render the page;

[0022] or,

[0023] Based on the HTML file in the last published resource bundle, the non-HTML file in the last published resource bundle in the container is loaded to render the page.

[0024] The resource bundle is pre-stored in a database or a file system and is identified by an incoming timestamp.

[0025] The method further comprises:

[0026] In response to the instruction to publish the resource package to be published this time, a published mark is added to the resource package that has been published this time.

[0027] According to a second aspect of an embodiment of the present invention, there is provided an apparatus for rendering a page, comprising:

[0028] The historical resource package generation module is used to merge all the files in the last published resource package and the non-html files in the resource package to be published this time to obtain the historical resource package;

[0029] A current resource package generation module, used to use the non-html files in the previously published resource package and all the files in the resource package to be published this time as the current resource package;

[0030] A first updating module, configured to use the historical resource package to update the last published resource package in the container, so as to render a page according to the HTML file in the last published resource package;

[0031] The second module is used to respond to the instruction to publish the resource package to be published this time, replace at least one of the historical resource packages in the container according to the current resource package, and render a page based on the HTML file in the resource package published this time or the HTML file in the resource package published last time.

[0032] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for rendering a page, including:

[0033] one or more processors;

[0034] a storage device for storing one or more programs,

[0035] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

[0036] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method as described above is implemented.

[0037] One embodiment of the above invention has the following advantages or beneficial effects: all files in the last published resource package and files other than HTML files in the resource package to be published this time are merged to obtain a historical resource package; the files other than HTML files in the last published resource package and all files in the resource package to be published this time are used as the current resource package; the last published resource package in the container is updated with the historical resource package to render the page according to the HTML files in the last published resource package; in response to the instruction to publish the resource package to be published this time, at least one of the historical resource packages in the container is replaced according to the current resource package, and the page is rendered based on the HTML files in the resource package to be published this time or the HTML files in the resource package to be published last time. The HTML files in the resource package to be published this time and the HTML files in the resource package to be published last time can both be used to render the page, thereby improving the success rate of page rendering.

[0038] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0040] Figure 1 is a schematic diagram of the main flow of a method for rendering a page according to an embodiment of the present invention;

[0041] Figure 2 is a schematic diagram of a process of merging files in a resource package to obtain a historical resource package according to an embodiment of the present invention;

[0042] Figure 3 is a schematic diagram of a resource package in a resource directory pool according to an embodiment of the present invention;

[0043] Figure 4 is a schematic diagram of a process of updating a resource bundle in a container with a historical resource bundle to render a page according to an embodiment of the present invention;

[0044] Figure 5 is a schematic diagram of a resource package in a container according to an embodiment of the present invention;

[0045] Figure 6 is a schematic diagram of replacing a resource package in a container with a current resource package according to an embodiment of the present invention;

[0046] Figure 7 is a schematic diagram of the main structure of a device for rendering a page according to an embodiment of the present invention;

[0047] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0048] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0050] With the development of containerization technology, static resource servers are generally virtual containers such as containers (docker). The front-end resources are built into images and published to the container. Each container has only one version of static resource files. Static resource files include index.html files, js files, and css files.

[0051] When multiple containers are updated one by one, there will be differences in resource versions between containers. During the update period, if a user requests a new index.html file, the js file address in it is parsed, and when it is returned to the source through the content delivery network (CDN), it may hit a container that has not been updated. At this time, the container does not have the js file required by the new index.html file, so a page error will occur. The larger the number of users, the more obvious this phenomenon is.

[0052] In order to solve the technical problem of low page rendering success rate, the following technical solution in the embodiment of the present invention can be adopted.

[0053] See also Figure 1 , Figure 1 This is a schematic diagram of the main process of the method for rendering a page according to an embodiment of the present invention. The historical resource package and the current resource package are constructed based on the published resource package and the resource package to be published. Since the historical resource package and the current resource package both include js files and css files corresponding to different html files, they are suitable for rendering pages with different html files. Figure 1 As shown, the specific steps include:

[0054] S101. Merge all files in the last published resource package and non-html files in the resource package to be published this time to obtain a historical resource package.

[0055] Hypertext markup language (HTML), JavaScript (JS) scripting language and cascading style sheets (CSS) are all separate languages. HTML is responsible for the structure of the web page; JS is responsible for the behavior of the web page; CSS is responsible for the style and beautification of the web page.

[0056] In the process of rendering a page, the user requests the index.html file according to the URL, parses the js file address and css file address referenced in the file, requests these files respectively, and finally completes the page rendering. It can be understood that page rendering is achieved through the index.html file, js file and css file. For convenience, the index.html file is identified as an html file in the following text.

[0057] In the embodiment of the present invention, the resource package includes an html file, a js file and a css file.

[0058] See also Figure 2 , Figure 2 This is a flow chart of merging files in a resource package to obtain a historical resource package according to an embodiment of the present invention. Specifically, the following steps are included:

[0059] S201: Filter out the resource packages that were released last time and the resource packages to be released this time according to the timestamp in the resource packages and the release identifiers of the resource packages.

[0060] In one embodiment of the present invention, the resource package is pre-stored in a database or a file system and is identified by an incoming timestamp. It is understandable that the corresponding resource package can be screened out based on the incoming timestamp identification. In addition, a release identification can also be set, and the release identification can be used to know whether the resource package has been released. As an example, the release identification includes the suffix s of the resource package name. If the resource package name includes the suffix s, the resource package has been released; if the resource package name does not include the suffix s, the resource package is not currently released.

[0061] The following is an exemplary description of storing resource packages in a preset folder.

[0062] When saving a resource package for the first time, you need to place the last published resource package in the preset folder.

[0063] As an example, the preset folder includes a resource pool directory. Then, the directory is named 0-s, where 0 represents the sequence number and is always the first; -s is used as an identifier to indicate that the package is a published resource package.

[0064] As an example, if the directory is named in the format of date-time, the directories will be sorted in numerical order according to the character rules. Setting the resource package to 0-s can ensure that it is ranked first, which meets the meaning of first packaging and actual search needs. When building a resource package, you can search for the nearest directory with -s in reverse order according to the directory ranking. If it is used for the first time, the 0-s directory will be found.

[0065] Specifically, the packaging command is executed, and the incoming timestamp is used as the directory name of the packaging output. The packaging itself uses webpack packaging, and outputs a resource bundle with the incoming timestamp as the directory name. The resource bundle can be tested and released, and if the test fails, it can be packaged again.

[0066] See also Figure 3 , Figure 3 Schematic diagram of resource packages in a resource directory pool according to an embodiment of the present invention. The resource pool directory pool contains a series of package directories arranged in chronological order. Among them, the resource packages with the suffix s are published resource packages.

[0067] S202: Merge all files in the last published resource package and non-html files in the resource package to be published this time to obtain a historical resource package.

[0068] In order to construct a historical resource package, all files in the last published resource package and non-html files in the resource package to be published can be merged to obtain a historical resource package.

[0069] As an example, the resource packages in the preset folder are arranged in chronological order. The last resource package is the last package generated, that is, the resource package to be released this time. In the preset folder, the last resource package with -s is the last published resource package.

[0070] After filtering out the resources to be released this time and the resource package that was released last time, merge all the files in the resource package that was released last time and the non-html files in the resource package to be released this time to obtain the historical resource package.

[0071] As an example, the last published resource package includes index.html, a1.js, b1.js, and c1.css. The non-html files of the resource package to be published this time include: a2.js, b2.js, and c2.css. The historical resource package obtained after merging includes: index.html, a1.js, b1.js, c1.css, a2.js, b2.js, and c2.css. Among them, the index.html in the last published resource package is different from the index.html in the resource package to be published this time. All versions of html files are always named index.html. It should be noted that the html file in the historical resource package is the index.html in the last published resource package. The index.html in the last published resource package only loads a1.js, b1.js, and c1.css, and a2.js, b2.js, and c2.css are just stored as resource folders.

[0072] exist Figure 2 In the embodiment, based on the last released resource package and the resource package to be released this time, a historical resource package is constructed to render a page according to the HTML file in the last released resource package.

[0073] S102: Use the non-html files in the last published resource package and all the files in the resource package to be published this time as the current resource package.

[0074] After filtering out the resources to be released this time including the resource package that was released last time, merge the non-html files in the resource package that was released last time with all the files in the resource package to be released this time to obtain the current resource package.

[0075] As an example, the non-html files in the last released resource package include a1.js, b1.js, and c1.css. The resource package to be released this time includes: index.html, a2.js, b2.js, and c2.css. The current resource package obtained after merging includes: index.html, a1.js, b1.js, c1.css, a2.js, b2.js, and c2.css. It should be noted that the html file in the current resource package is index.html in the resource package to be released this time. The index.html in the resource package to be released this time will only load a2.js, b2.js, and c2.css, and a1.js, b1.js, and c1.css are just stored as resource folders.

[0076] S103: Use the historical resource package to update the last published resource package in the container, so as to render the page according to the HTML file in the last published resource package.

[0077] In the embodiment of the present invention, in order to improve the success rate of rendering a page, the resource package in the container is updated with the historical resource package. Specifically, the last published resource package in the container is updated with the historical resource package, so that the page can be rendered according to the HTML file in the last published resource package.

[0078] See also Figure 4 , Figure 4 This is a schematic diagram of a process of updating a resource package in a container with a historical resource package to render a page according to an embodiment of the present invention. Specifically, the following steps are included:

[0079] S401: Add non-html files in the resource package to be published this time to the previously published resource package in the container.

[0080] The historical resource package includes all files in the last published resource package and the non-html files in the resource package to be published. By updating the last published resource package in the container with the historical resource package, the non-html files in the resource package to be published can be added to the last published resource package in the container.

[0081] Specifically, during the release of the historical resource package, the html files, js files, and css files in each container are replaced by the html files, js files, and css files in the last released resource package, as well as the js files and css files in the resource package to be released this time. It should be noted that the html files in the container are not updated. That is, the html files in the container are the html files in the last released resource package.

[0082] S402: According to the HTML files in the resource package published last time, non-HTML files in the resource package published last time are loaded in the container to render the page.

[0083] Compared with the last published resource package in the container, the HTML file of the historical resource package has not changed. When the user accesses the HTML file in the last published resource package, parses the HTML file, and requests the corresponding JS file and CSS file in the container. Since the JS file and CSS file in the last published resource package are stored in the container, the corresponding JS file and CSS file can be found no matter which container is requested.

[0084] exist Figure 4 In the embodiment, the non-html files of the resources to be released this time are released to the container in advance by updating the last released resource package in the container with the historical resource package.

[0085] See also Figure 5 , Figure 5is a schematic diagram of a resource package in a container according to an embodiment of the present invention. Figure 5 On the left side are the files included in the container before the update. Figure 5 On the right are the files included after the container is updated.

[0086] Figure 5 The medium container is marked with a box. Figure 5 On the left, the container includes a1.html, b1.js, and c1.css from the last published asset bundle before being updated. Figure 5 On the right, after being updated, the container includes a1.html, b1.js, and c1.css in the last published resource package, as well as b2.js and c2.css in the resource package to be published this time.

[0087] In one embodiment of the present invention, in response to the instruction to publish the resource bundle to be published, even if the container cannot be updated with the current resource bundle, the file can be loaded to render the page.

[0088] Specifically, in response to the instruction to publish the resource package to be published, that is, the resource package to be published becomes the published resource package, and based on the HTML file in the resource package sent this time, the non-HTML file in the resource package to be sent in the container is loaded to render the page.

[0089] The container updated with the historical resource package includes not only all the files in the last published resource package, but also the non-html files in the resource package to be published this time. Therefore, based on the html files in the published resource package this time, the non-html files in the resource package to be sent in the container can be loaded to achieve page rendering.

[0090] S104: In response to the instruction to publish the resource package to be published, replace at least one historical resource package in the container according to the current resource package, and render a page based on the HTML file in the currently published resource package or the HTML file in the last published resource package.

[0091] In response to the instruction to release the resource package to be released, it can be known that the resource package to be released is released, that is, the resource package to be released becomes the released resource package. At least one historical resource package in the container is replaced according to the current resource package. During the online process of the resource package to be released, the html file in the last released resource package is updated to the html file in the currently released resource package in the container. The container includes the js file and css file of the last released resource package, as well as the js file and css file of the currently released resource package.

[0092] In one embodiment of the present invention, based on the HTML file in the resource bundle in the currently released resource bundle, the non-HTML file in the resource bundle in the currently released resource bundle in the container is loaded to render the page;

[0093] or,

[0094] Based on the HTML file in the last published resource bundle, load the non-HTML file in the last published resource bundle in the container to render the page.

[0095] Specifically, regardless of whether the container has been successfully replaced by the current resource package, since the container includes the js files and css files of the last published resource package and the js files and css files of the currently published resource package, regardless of whether the user requests an html file in the last published resource package or an html file in the currently published resource package, the corresponding js files and css files can be requested in the container.

[0096] In one embodiment of the present invention, in response to the instruction to publish the resource package to be published, a published mark is added to the resource package that has been published. In this way, when the resource package is published next time, the resource package that has been published can be used as the last published resource package, thereby re-building the historical resource package and the current resource package.

[0097] See also Figure 6 , Figure 6 It is a schematic diagram of replacing a resource package in a container with a current resource package according to an embodiment of the present invention.

[0098] Figure 6 The medium container is marked with a box. Figure 6 On the left, the container before replacement includes a1.html, b1.js, and c1.css in the last published resource bundle, as well as b2.js and c2.css in the current published resource bundle.

[0099] Figure 6 In the upper right corner, after the container is replaced with the current resource bundle, it includes b1.js and c1.css in the last published resource bundle, as well as a2.html, b2.js, and c2.css in the currently published resource bundle.

[0100] Figure 6 At the bottom right, the container is not replaced in time with the current resource package. The container includes a1.html, b1.js, and c1.css in the last published resource package, as well as b2.js and c2.css in the currently published resource package.

[0101] There are countless edge nodes in CDN, and the cache time of HTML files configured in CDN is relatively short. Therefore, at any moment, the HTML file cache of some CDN nodes expires, and then needs to be retrieved from the container.

[0102] During container update, there is a time difference in the rolling update of multiple containers. Some users request CDM when the HTML cache expires and need to go back to the source. When going back to the source, they may hit the updated container, and then obtain the HTML file in the currently released resource package, or they may hit the HTML file in the last released resource package.

[0103] When the HTML file in the released resource package is obtained, the code is parsed and the JS file and CSS file in the released resource package are loaded. CDN will further search back to the source, and each request may hit any of the multiple containers. If the container is not updated, a loading error will occur.

[0104] Similarly, if you request an HTML file in the last published resource bundle, you will request to load the JS and CSS files in the last published resource bundle. Therefore, two versions of JS and CSS files exist in the container at the same time, which can avoid page rendering failures during updates.

[0105] By adopting the technical solution in the embodiment of the present invention, the final technical effect achieved is: no matter whether the html file held by the user is in the resource package released last time or in the resource package released this time, the corresponding js file and css file can be found in the container.

[0106] In the above-mentioned embodiment of the present invention, all files in the last published resource package and files other than HTML files in the resource package to be published are merged to obtain a historical resource package; files other than HTML files in the last published resource package and all files in the resource package to be published are used as the current resource package; the last published resource package in the container is updated with the historical resource package to render the page according to the HTML files in the last published resource package; in response to an instruction to publish the resource package to be published, at least one of the historical resource packages in the container is replaced according to the current resource package, and the page is rendered based on the HTML files in the resource package to be published or the HTML files in the last published resource package. Using both the HTML files in the resource package to be published and the HTML files in the last published resource package can realize page rendering, thereby improving the success rate of page rendering.

[0107] See also Figure 7 , Figure 7is a schematic diagram of the main structure of a device for rendering a page according to an embodiment of the present invention. The device for rendering a page can implement a method for rendering a page, such as Figure 7 As shown, the device for rendering a page specifically includes:

[0108] The historical resource package generation module 701 is used to merge all files in the last published resource package and the non-html files in the resource package to be published this time to obtain a historical resource package;

[0109] The current resource package generation module 702 is used to use the non-html files in the previously published resource package and all the files in the resource package to be published this time as the current resource package;

[0110] A first updating module 703 is used to update the last published resource package in the container with the historical resource package, so as to render a page according to the HTML file in the last published resource package;

[0111] The second updating module 704 is used to respond to the instruction to publish the resource package to be published this time, replace at least one of the historical resource packages in the container according to the current resource package, and render the page based on the HTML file in the resource package published this time or the HTML file in the resource package published last time.

[0112] In one embodiment of the present invention, the historical resource package generation module 701 is specifically used to filter out the resource package that has been published last time and the resource package to be published this time according to the timestamp in the resource package and the release identifier of the resource package;

[0113] Merge all files in the last published resource package and the non-html files in the resource package to be published this time to get the historical resource package.

[0114] In one embodiment of the present invention, the first updating module 703 is specifically configured to add a file other than the HTML file in the resource package to be published this time to the resource package published last time in the container;

[0115] According to the HTML files in the last published resource bundle, non-HTML files in the last published resource bundle are loaded in the container to render the page.

[0116] In one embodiment of the present invention, the first updating module 703 is further configured to load non-html files in the to-be-published resource package in the container based on the html files in the currently-published resource package, so as to render the page.

[0117] In one embodiment of the present invention, the second updating module 704 is specifically configured to load the non-html files in the resource package to be published in the container based on the html files in the resource package published this time, so as to render the page;

[0118] and / or,

[0119] Based on the HTML file in the last published resource bundle, the non-HTML file in the last published resource bundle in the container is loaded to render the page.

[0120] In one embodiment of the present invention, the resource bundle is pre-stored in a database or a file system and is identified by an incoming timestamp.

[0121] In one embodiment of the present invention, the second updating module 704 is further configured to add a published flag to the currently published resource package in response to an instruction to publish the currently to-be-published resource package.

[0122] Figure 8 An exemplary system architecture 800 is shown to which the method for rendering a page or the apparatus for rendering a page according to the embodiments of the present invention can be applied.

[0123] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0124] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0125] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0126] The server 805 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0127] It should be noted that the method for rendering a page provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the device for rendering a page is generally disposed in the server 805 .

[0128] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0129] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0130] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0131] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0132] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0133] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0134] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0135] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be arranged in a processor, for example, may be described as: a processor including a historical resource package generation module, a current resource package generation module, a first update module, and a second update module. The names of these modules do not constitute limitations on the modules themselves in certain circumstances, for example, the historical resource package generation module may also be described as "used to merge all files in the last published resource package and non-html files in the resource package to be published this time, to obtain a historical resource package".

[0136] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0137] Merge all files in the last published resource package and the non-html files in the resource package to be published this time to get the historical resource package;

[0138] Take the non-html files in the previously published resource package and all the files in the resource package to be published this time as the current resource package;

[0139] The historical resource package is used to update the last published resource package in the container, so as to render the page according to the HTML file in the last published resource package;

[0140] In response to an instruction to publish the resource bundle to be published this time, at least one of the historical resource bundles in the container is replaced according to the current resource bundle, and a page is rendered based on an HTML file in the currently published resource bundle or an HTML file in the last published resource bundle.

[0141] According to the technical solution of the embodiment of the present invention, all files in the last published resource package and files other than HTML files in the resource package to be published this time are merged to obtain a historical resource package; files other than HTML files in the last published resource package and all files in the resource package to be published this time are used as the current resource package; the last published resource package in the container is updated with the historical resource package to render the page according to the HTML files in the last published resource package; in response to the instruction to publish the resource package to be published this time, at least one of the historical resource packages in the container is replaced according to the current resource package, and the page is rendered based on the HTML files in the resource package to be published this time or the HTML files in the resource package to be published last time. Using the HTML files in the resource package to be published this time and the HTML files in the resource package to be published last time can realize page rendering, so the success rate of page rendering can be improved.

[0142] The above specific implementation methods do not constitute limitations on the scope of protection of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention. It should be noted that in the technical solution disclosed in this disclosure, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

Claims

1. A method for rendering a page, characterized in that: include: Merge all files in the last published resource package and the non-html files in the resource package to be published this time to get the historical resource package; Take the non-html files in the previously published resource package and all the files in the resource package to be published this time as the current resource package; The historical resource package is used to update the last published resource package in the container, so as to render the page according to the HTML file in the last published resource package; In response to an instruction to publish the resource bundle to be published this time, at least one of the historical resource bundles in the container is replaced according to the current resource bundle, and a page is rendered based on an HTML file in the currently published resource bundle or an HTML file in the last published resource bundle.

2. The method for rendering a page according to claim 1, characterized in that: The merging of all files in the last published resource package and the non-html files in the resource package to be published this time to obtain a historical resource package includes: Filtering the resource package that was previously published and the resource package to be published this time according to the timestamp in the resource package and the release identifier of the resource package; Merge all files in the last published resource package and the non-html files in the resource package to be published this time to get the historical resource package.

3. The method for rendering a page according to claim 1, characterized in that: The method of using the historical resource bundle to update the last published resource bundle in the container to render a page according to the HTML file in the last published resource bundle includes: Add the non-html files in the resource package to be published this time to the previously published resource package in the container; According to the HTML files in the last published resource bundle, non-HTML files in the last published resource bundle are loaded in the container to render the page.

4. The method for rendering a page according to claim 1, characterized in that: After responding to the instruction to publish the resource package to be published this time, The method further comprises: Based on the HTML files in the resource package that has been published this time, non-HTML files in the resource package to be published in the container are loaded to render the page.

5. The method for rendering a page according to claim 1, characterized in that: The page rendering based on the HTML file in the currently released resource package or the HTML file in the previously released resource package includes: Based on the HTML files in the resource package that has been published, non-HTML files in the resource package to be published in the container are loaded to render the page; or, Based on the HTML file in the last published resource bundle, the non-HTML file in the last published resource bundle in the container is loaded to render the page.

6. The method for rendering a page according to claim 1, characterized in that: The resource bundle is pre-stored in a database or a file system and is identified by an incoming timestamp.

7. The method for rendering a page according to claim 1, characterized in that: The method further comprises: In response to the instruction to publish the resource package to be published this time, a published mark is added to the resource package that has been published this time.

8. A device for rendering a page, characterized in that: include: The historical resource package generation module is used to merge all the files in the last published resource package and the non-html files in the resource package to be published this time to obtain the historical resource package; A current resource package generation module, used to use the non-html files in the previously released resource package and all the files in the resource package to be released this time as the current resource package; A first updating module, configured to use the historical resource package to update the last published resource package in the container, so as to render a page according to the HTML file in the last published resource package; The second updating module is used to respond to the instruction of publishing the resource package to be published this time, replace at least one of the historical resource packages in the container according to the current resource package, and render the page based on the HTML file in the resource package published this time or the HTML file in the resource package published last time.

9. An electronic device for rendering a page, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.