Website upgrade methods and related equipment

CN122569968APending Publication Date: 2026-08-14BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-27
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]但是,上述方案在网页升级过程中,上一版本资源包不存在,新版本资源包未存储完成,从而用户无法访问网页,导致服务中断时长较大

Benefits of technology

[0011]本发明实施例提供的网页升级方法及相关设备,先将网页的新版本资源包中的静态资源数据,存储到新版本资源包的资源属性信息在对象存储服务端中对应的运行目录中,实现静态资源升级。再将新版本资源包中的网页资源数据替换掉当前访问目录中的网页资源数据,实现网页资源数据升级。在静态资源升级过程中,上一版本静态资源数据仍然存在于上一版本资源包的资源属性信息在对象存储服务端中对应的运行目录中,并不需要删除。因此,在静态资源升级过程中,用户客户端可以访问当前访问目录中的网页资源数据,此时,当前访问目录中的网页资源数据是上一版本网页资源数据,以通过该上一版本网页资源数据中的版本信息加载并未删除的上一版本静态资源数据,实现上一版本网页访问。在网页资源升级之后,当前访问目录中的网页资源数据是新版本网页资源数据,用户客户端可以通过该新版本网页资源数据中的版本信息加载新版本静态资源数据,以实现新版本网页访问。可以看出,本发明实施例在静态资源升级过程中用户客户端仍然可以访问上一版本网页,仅在网页资源升级过程中,由于新版本网页资源数据和上一版本网页资源数据均不存在,用户客户端暂时无法访问网页。因此,相较于将上一版本资源包直接替换为新版本资源包导致整个升级过程中均无法访问网页,本发明实施例可以有效减小服务中断时长,实现平滑升级,甚至用户无感知。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569968A_ABST
    Figure CN122569968A_ABST
Patent Text Reader

Abstract

This invention provides a webpage upgrade method and related equipment. The method includes: receiving a resource publishing request, including a new version resource package and resource attribute information. The new version resource package includes static resource data and webpage resource data, and the resource attribute information includes version information and a webpage identifier; storing the static resource data in the running directory corresponding to the resource attribute information; if the static resource data storage is successful, replacing the webpage resource data in the currently accessed directory corresponding to the webpage identifier with the webpage resource data in the new version resource package. When the webpage identifier in the webpage access request matches the webpage identifier corresponding to the currently accessed directory, the content delivery network server returns the webpage resource data in the currently accessed directory to the user client, so that the user client can load the static resource data that matches the version information in the webpage resource data. This invention can effectively reduce service interruption time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of web page development technology, and in particular to web page upgrade methods and related equipment. Background Technology

[0002] Web pages are pages that provide online services on the internet. Web pages need to be constantly iterated and upgraded to provide new versions. As web pages are iterated and upgraded, multiple versions of web pages are generated.

[0003] In existing technologies, the webpage upgrade process includes: deleting the previous version resource package from the storage service provider and storing the new version resource package on the storage service provider. The webpage upgrade is complete when the new version resource package is successfully stored on the storage service provider, and users can access the webpage through their client applications.

[0004] However, during the webpage upgrade process, the previous version resource package is missing and the new version resource package has not been fully stored, resulting in users being unable to access the webpage and causing a long service interruption. Summary of the Invention

[0005] The purpose of this invention is to provide a webpage upgrade method and related equipment to reduce service interruption time during webpage upgrades. The specific technical solution is as follows: In a first aspect of this invention, a webpage upgrade method is provided, applied to an upgrade management platform. The upgrade management platform is communicatively connected to an object storage service, and the object storage service is also communicatively connected to a content delivery network service. The method includes: The system receives a resource publishing request, which includes a new version resource package and its resource attribute information. The new version resource package includes static resource data and web page resource data. The resource attribute information includes version information and a web page identifier. The system stores the static resource data in the running directory corresponding to the resource attribute information on the object storage service. Upon receiving a storage result message from the object storage service indicating successful storage, the system determines the current access directory corresponding to the web page identifier on the object storage service and replaces the web page resource data in the current access directory with the web page resource data from the new version resource package. The content delivery network (CDN) server returns the web page resource data from the current access directory to the user client when the web page identifier in the web page access request sent by the user client matches the web page identifier corresponding to the current access directory. This allows the user client to load the static resource data that matches the version information in the web page resource data.

[0006] In a second aspect of the invention, a webpage upgrade device is also provided, applied to an upgrade management platform. The upgrade management platform is communicatively connected to an object storage service (Object Storage Service) client, and the Object Storage Service client is also communicatively connected to a content delivery network (CDN) server. The webpage upgrade device includes: The request receiving module is used to receive resource publishing requests. The resource publishing request includes a new version resource package and resource attribute information. The new version resource package includes static resource data and web page resource data. The resource attribute information includes version information and web page identifier.

[0007] The first storage module is used to store static resource data in the running directory corresponding to the resource attribute information on the object storage service client.

[0008] The second storage module is used to determine the current access directory corresponding to the webpage identifier in the object storage service when it receives a storage result information indicating successful storage from the object storage service. It then replaces the webpage resource data in the current access directory with the webpage resource data. The content delivery network server is used to return the webpage resource data in the current access directory to the user client when the webpage identifier in the webpage access request sent by the user client matches the webpage identifier corresponding to the current access directory. This allows the user client to load static resource data that matches the version information in the webpage resource data.

[0009] In another aspect of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the above-described webpage upgrade methods.

[0010] In another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the above-described webpage upgrade methods.

[0011] The webpage upgrade method and related equipment provided in this invention first store the static resource data from the new version resource package of the webpage in the corresponding running directory of the resource attribute information of the new version resource package in the object storage service client, thus realizing static resource upgrade. Then, the webpage resource data in the currently accessed directory is replaced with the webpage resource data from the new version resource package, thus realizing webpage resource data upgrade. During the static resource upgrade process, the previous version static resource data still exists in the running directory corresponding to the resource attribute information of the previous version resource package in the object storage service client and does not need to be deleted. Therefore, during the static resource upgrade process, the user client can access the webpage resource data in the currently accessed directory. At this time, the webpage resource data in the currently accessed directory is the previous version webpage resource data, and the previous version static resource data that has not been deleted can be loaded through the version information in the previous version webpage resource data to realize access to the previous version webpage. After the webpage resource upgrade, the webpage resource data in the currently accessed directory is the new version webpage resource data, and the user client can load the new version static resource data through the version information in the new version webpage resource data to realize access to the new version webpage. As can be seen, in this embodiment of the invention, the user client can still access the previous version of the webpage during the static resource upgrade process. Only during the webpage resource upgrade process, since neither the new version nor the previous version of the webpage resource data exists, the user client is temporarily unable to access the webpage. Therefore, compared to directly replacing the previous version resource package with the new version resource package, which results in the inability to access the webpage throughout the entire upgrade process, this embodiment of the invention can effectively reduce service interruption time, achieve a smooth upgrade, and even be imperceptible to the user. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0013] Figure 1 This is a schematic diagram of the structure of a webpage upgrade system provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the steps of an embodiment of a webpage upgrade method provided by this invention. Figure 3 This is a schematic diagram of webpage management provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the process of accessing a webpage and upgrading a webpage system according to an embodiment of the present invention; Figure 5 This is a schematic diagram of a webpage upgrade process provided by an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a webpage upgrade device provided in an embodiment of the present invention; Figure 7This is a schematic diagram of another webpage upgrade device provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0014] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0015] This invention is applicable to webpage upgrade scenarios, where webpages are characterized by high content update frequency, resulting in frequent upgrades. A conventional webpage upgrade solution replaces the previous version's resource package with a new version. Specifically, the previous version's resource package is first deleted from the storage service provider, and then the new version's resource package is stored there. After storing the new version's resource package, the user client can access it. However, this solution causes the user client to be unable to access the webpage during the entire storage process of the new version's resource package, leading to a prolonged service interruption. For example, a blank page or an incomplete webpage may appear for an extended period.

[0016] To address the aforementioned technical problems, this embodiment of the invention divides the new version resource package into static resource data and webpage resource data. First, the static resource data from the new version resource package is stored in the corresponding runtime directory of the new version resource package's resource attribute information in the object storage service, thus achieving static resource upgrade. Then, the webpage resource data in the currently accessed directory is replaced by the webpage resource data from the new version resource package, achieving webpage resource data upgrade. During the static resource upgrade process, the previous version's static resource data still exists in the runtime directory corresponding to the previous version resource package's resource attribute information in the object storage service and does not need to be deleted. Therefore, during the static resource upgrade process, the user client can access the webpage resource data in the currently accessed directory. At this time, the webpage resource data in the currently accessed directory is the previous version's webpage resource data, allowing the loading of the previous version's static resource data (which has not been deleted) through the version information in this previous version's webpage resource data, thus enabling access to the previous version of the webpage. After the webpage resource upgrade, the webpage resource data in the currently accessed directory is the new version's webpage resource data. The user client can load the new version's static resource data through the version information in this new version's webpage resource data, thus enabling access to the new version of the webpage. As can be seen, in this embodiment of the invention, the user client can still access the previous version of the webpage during the static resource upgrade process. Only during the webpage resource upgrade process, since neither the new version nor the previous version of the webpage resource data exists, the user client is temporarily unable to access the webpage. Therefore, compared to directly replacing the previous version resource package with the new version resource package, which results in the inability to access the webpage throughout the entire upgrade process, this embodiment of the invention can effectively reduce service interruption time, achieve a smooth upgrade, and ensure that the user is unaware of the interruption.

[0017] The aforementioned static resource data may include, but is not limited to: JS (JAVAScript) data, CSS (Cascading Style Sheets) data, and media data.

[0018] The aforementioned webpage resource data includes HTML (HyperText Markup Language) data.

[0019] Figure 1 This is a schematic diagram of the structure of a webpage upgrade system provided in an embodiment of the present invention. (Refer to...) Figure 1 As shown, the webpage upgrade system of this invention involves an upgrade management platform, an OSS (Object Storage Service) terminal, a CDN (Content Delivery Network) server terminal, and a user client.

[0020] The upgrade management platform communicates with the OSS (Service OSS) to manage the webpage upgrade process. Specifically, during the webpage upgrade process, the upgrade management platform receives the new version resource package, verifies and functionally tests the new version resource package, and then stores the new version resource package on the OSS.

[0021] The OSS terminal is used to store one or more version resource packages.

[0022] The CDN server communicates with the user client and the OSS (Object Storage Service) endpoint, controlling the user client's access to the OSS. When a user client needs to access the OSS, the CDN server retrieves the webpage from the OSS based on the webpage access request initiated by the user client. The CDN server also supports caching strategies to cache webpage data locally, making it convenient to directly return the webpage to the user client when accessing the webpage again later.

[0023] Users can pre-configure the CDN server domain name on the upgrade management platform to point to the OSS server, so that the CDN server can access the OSS server through that domain name.

[0024] Reference Figure 2 The diagram illustrates a flowchart of an embodiment of a webpage upgrade method according to the present invention. Figure 1 Follow these steps on the upgrade management platform. Refer to... Figure 2 As shown, the above-mentioned webpage upgrade method may specifically include the following steps: S101. Receive a resource publishing request. The resource publishing request includes a new version resource package and the resource attribute information of the new version resource package. The new version resource package includes static resource data and web page resource data. The resource attribute information includes version information and web page identifier.

[0025] S102. Store static resource data in the runtime directory corresponding to the resource attribute information on the object storage service client.

[0026] S103. Upon receiving storage result information indicating successful storage from the object storage service provider, determine the current access directory corresponding to the webpage identifier in the object storage service provider, and replace the webpage resource data in the current access directory with the webpage resource data in the new version resource package. The content delivery network service provider returns the webpage resource data in the current access directory to the user client when the webpage identifier in the webpage access request sent by the user client matches the webpage identifier corresponding to the current access directory, so that the user client can load static resource data that matches the version information in the webpage resource data.

[0027] The resource publishing request in S101 above is triggered after the developer logs into the upgrade management platform. This request is used to request the new version resource package to be published to the OSS (Object Storage Service), i.e., stored on the OSS. Specifically, the developer can upload the packaged new version resource package to the upgrade management platform and click the publish control to trigger the resource publishing request.

[0028] When the upgrade management platform receives a resource release request for a new version resource package, it can directly store the new version resource package on the OSS server. However, this approach may result in release failures or website access failures. To ensure a high success rate for both releases and website access, the upgrade management platform also needs to verify the new version resource package to determine its correctness. If the new version resource package is correct, it is stored on the OSS server. If the new version resource package is incorrect, an error message is displayed so that the developers can re-upload it.

[0029] Specifically, prior to S102, it also includes: S104. Extract verification information from the new version resource package. The verification information includes at least one of the following: a list of file names in the new version resource package and the hash code of the new version resource package.

[0030] S105. Verify the new version resource package using verification information.

[0031] S106. If the verification is successful, proceed to S102.

[0032] It is understandable that the verification information of the new version resource package is generated by the developers when compressing and generating the new version resource package. The new version resource package can be generated by a compilation tool, which can also generate a list of file names in the new version resource package and the hash code mentioned above. The hash code is calculated by a preset hash algorithm.

[0033] The upgrade management platform can verify the new version resource package based on the aforementioned list of file names and / or hash codes. This allows it to determine whether any files are missing from the new version resource package based on the file name list, and / or whether the new version resource package has been modified based on the hash codes. Different new version resource packages will correspond to different hash codes.

[0034] In one embodiment of the present invention, S105 includes: S1051. Match the file names in the file name list with the file names in the new version resource package, and perform a hash operation on the new version resource package to obtain the hash code to be verified.

[0035] S1052. If the file names in the new version resource package include all file names in the file name list, and / or the hash code to be verified is consistent with the hash code in the new version resource package, then the verification of the new version resource package is successful.

[0036] S1053. Otherwise, the verification of the new version resource package has failed.

[0037] At least one filename in the filename list is matched against the filenames of all files in the new version resource package to determine if all filenames in the filename list exist in the new version resource package. If all filenames in the filename list exist in the new version resource package, the verification of the new version resource package based on the filename list is successful; if at least one filename in the filename list does not exist in the new version resource package, the verification of the new version resource package based on the filename list fails.

[0038] The new version resource package is hashed using the aforementioned preset hash algorithm to obtain a hash code to be verified. The hash code carried in the new version resource package is used as a reference hash code and compared with the hash code to be verified. If they match, the verification of the new version resource package based on the hash code is successful; otherwise, the verification fails.

[0039] It should be noted that when the verification information includes a list of file names, the upgrade management platform only verifies the new version resource package based on the list of file names. If the verification of the new version resource package based on the list of file names is successful, the new version resource package is determined to be verified successfully. If the verification of the new version resource package based on the list of file names fails, the new version resource package is determined to be verified unsuccessfully.

[0040] When the verification information includes a hash code, the upgrade management platform verifies the new version resource package only based on the hash code. If the verification of the new version resource package based on the hash code is successful, the new version resource package is determined to be verified successfully. If the verification of the new version resource package based on the hash code fails, the new version resource package is determined to be verified unsuccessfully.

[0041] When the verification information includes both a list of file names and a hash code, the upgrade management platform verifies the new version resource package based on both the file name list and the hash code. If the verification of the new version resource package based on both the file name list and the hash code is successful, the new version resource package is determined to have been successfully verified. If the verification of the new version resource package based on the file name list and / or the hash code fails, the new version resource package is determined to have failed.

[0042] As can be seen, the embodiments of the present invention can ensure the correctness of the new version resource package through the above verification process, which can avoid uploading erroneous resource packages to the OSS terminal, thereby avoiding abnormal or failed webpage display due to missing files during access, and improving the success rate and completeness of webpage display.

[0043] In some possible implementations, when the verification of a new version resource package fails, the upgrade management platform can also display the reason for the failure, including but not limited to: hash verification failure, file name list verification failure, and missing file information. Missing file information may include missing file paths, missing file names, etc. This allows developers to quickly correct errors in the new version resource package and re-store it on the OSS, improving the efficiency of web page upgrades.

[0044] After a user corrects errors in the new version resource package, it can be re-stored to the upgrade management platform. The upgrade management platform needs to verify the new version resource package again before storing it on the OSS server. Users can correct errors in the new version resource package multiple times until the upgrade management platform successfully verifies it.

[0045] When the upgrade management platform receives a new version resource package for the Nth time (N is an integer greater than or equal to 2), it can obtain the reasons for the N-1 verification failures of that new version resource package and verify the new version resource package based on those reasons to determine if the N-1 verification failure reasons still exist. This minimizes the verification workload and improves verification efficiency. Of course, to ensure verification accuracy as much as possible, it can also verify the new version resource package based on the verification information received for the Nth time, storing it on the OSS server upon successful verification.

[0046] In this embodiment of the invention, the new version resource package is divided into static resource data and web page resource data to achieve a two-layer upgrade of the new version resource package: static resource upgrade and web page resource upgrade. The static resource upgrade is performed first and then the web page resource upgrade is performed.

[0047] The upgrade process for static resources involves storing the static resource data on the OSS (Object Storage Service). The operating directory of the static resource data on the OSS is related to the resource attribute information of the new version resource package. Therefore, the old version resource package and the new version resource package correspond to different operating directories, allowing the new version static resource data to be stored without deleting the old version static resource data. The old version static resource data refers to the static resource data within the old version resource package, and the new version static resource data refers to the static resource data within the new version resource package. The upgrade process for web page resources involves storing the web page resource data on the OSS. The web page resource data is located in the currently accessed directory on the OSS, and the web page resource data in the currently accessed directory is the web page resource data currently accessed by the user client. Therefore, the web page resource upgrade process involves replacing the web page resource data in the currently accessed directory with the web page resource data in the new version resource package.

[0048] Understandably, the upgrade process for old and new resource packs is the same.

[0049] Based on the above two-layer upgrade process, during the static resource upgrade, the previous version's static resource data still exists in the corresponding runtime directory. The webpage resource data in the currently accessed directory is the old version's webpage resource data. User clients can access the previous version's webpage resource data to load the previous version's static resource data, thus enabling access to the previous version of the webpage. After the static resource upgrade is successful, the webpage resource data in the currently accessed directory becomes the new version's webpage resource data. User clients access the new version's webpage resource data to load the new version's static resource data, thus enabling access to the new version of the webpage. This embodiment of the invention only prevents users from accessing webpages during the webpage resource upgrade process, effectively reducing service interruption time and achieving a smooth upgrade.

[0050] As seen from the aforementioned two-layer upgrade process, different versions of resource packages correspond to different running directories in the OSS (Object Storage Service). Unlike regular directories, the running directories store data required for running web pages, such as static resource data. For example, the running directory for the new version of the resource package is M1, and the running directory for the previous version is M2. The static resource data for the new version can be stored in running directory M1, while the static resource data for the previous version is located in running directory M2. This ensures that multiple versions of static resource data exist simultaneously but can be distinguished, preventing the new version from overwriting the previous version. Furthermore, the version information in the web page resource data of the currently accessed directory can be used to determine the loaded static resource data, ensuring normal web page access even when multiple versions of static resource data exist.

[0051] The aforementioned runtime directories can be randomly determined, as long as different versions of resource packages correspond to different runtime directories. To ensure unified management of different versions of webpage resource packages, the aforementioned runtime directories can be associated with the resource package version and webpage identifier.

[0052] Specifically, S102 includes: determining the running directory of the new version resource package on the OSS based on the resource attribute information of the new version resource package, so as to store the static resource data in the new version resource package in the running directory, with different resource attribute information corresponding to different running directories.

[0053] The above storage process includes: determining the running directory based on the resource attribute information of the new version resource package, and then storing the new version resource package in that running directory.

[0054] When resource attribute information only includes version information, the upgrade management platform only supports storing resource packages of different versions. In this case, the running directory is determined solely by the version information, with different version information corresponding to different running directories. The simplest implementation is to add the version information to the name of the running directory. The version information indicates the version to which the resource package belongs and can include a version identifier, version development time, and version feature description. For example, a running directory named "Version Information" can be set in the root directory of the OSS platform.

[0055] When resource attribute information only includes a webpage identifier, the upgrade management platform can support the storage of resource packages containing multiple webpages. In this case, the running directory is determined solely by the webpage identifier, with different webpage identifiers corresponding to different running directories. The simplest implementation is to add the webpage identifier to the name of the running directory. The webpage identifier is used to uniquely indicate the webpage to which the resource package belongs. For example, a running directory named after the webpage identifier can be set in the root directory of the OSS platform.

[0056] When resource attribute information includes both webpage identifier and version information, the upgrade management platform can support storing resource packages for multiple versions of multiple webpages. In this case, the running directory is determined based on the webpage identifier and version information. Different webpage identifiers and / or different version information correspond to different running directories. The simplest implementation is to add both the webpage identifier and version information to the name of the running directory. For example, a running directory named after the concatenation of version information and webpage identifier can be set in the root directory of the OSS platform, or a parent directory named after the webpage identifier can be set in the root directory of the OSS platform, and a subdirectory named after the webpage identifier (version information) can be set under the parent directory as the running directory.

[0057] This invention allows for the determination of the operating directory based on webpage identifiers and / or version information, enabling unified upgrade management of multiple webpages and / or multiple versions of resource packages. Multiple webpages may have different operating directories, but they reuse the upgrade management platform. Compared to manual upgrades or maintaining separate upgrade scripts or tools for each webpage, this invention allows each webpage to be stored simply by connecting to the upgrade management platform, reducing webpage upgrade costs, achieving a unified upgrade process for multiple webpages, and demonstrating good reusability.

[0058] In some possible implementations, embodiments of the present invention can also perform webpage upgrades in conjunction with the operating environment. Specifically, for an operating environment, the webpage upgrade method further includes: S107, determining the current operating environment.

[0059] Correspondingly, before S102, it also includes: S108. Determine the running directory based on resource attribute information and the current running environment.

[0060] Accordingly, determining the current access directory corresponding to the webpage identifier in the object storage service in S103 includes: determining the current access directory based on the webpage identifier and the current operating environment.

[0061] The current operating environment refers to the operating environment for which the current webpage upgrade is being performed. Different operating environments correspond to different user volumes. The current operating environment can be any of the configured operating environments or the default operating environment. For example, the operating environment can be a test environment, a gray-scale operating environment, and a full-scale operating environment. The test environment corresponds to internal testers and has the fewest users. The gray-scale operating environment has more users than the test environment, and the full-scale operating environment has more users than the gray-scale operating environment.

[0062] In one possible implementation, multiple runtime environments can be selected as the current runtime environment in a specified order to upgrade the webpage for each runtime environment sequentially. For example, the test environment can be selected as the current runtime environment to upgrade the webpage for the test environment; then the gray-scale runtime environment can be selected as the current runtime environment to upgrade the webpage for the gray-scale runtime environment; and finally, the full runtime environment can be selected as the current runtime environment to upgrade the webpage for the full runtime environment.

[0063] Different current runtime environments can correspond to different runtime directories. Similar to the resource attribute information mentioned above, the current runtime environment can also be added to the name of the runtime directory. For example, the name of the runtime directory can be composed of the webpage identifier, the current runtime environment, and the version information. Another example is setting the first-level directory corresponding to the webpage identifier, then setting the second-level directory corresponding to the current runtime environment within the first-level directory, and finally setting the third-level directory corresponding to the version information within the second-level directory as the runtime directory.

[0064] The current operating environment is combined with the aforementioned webpage identifier to determine the current access directory. Different webpage identifiers and / or different current operating environments correspond to different current access directories. The current operating environment and webpage identifier can be added to the name of the current access directory. For example, the name of the current access directory can be formed by concatenating the webpage identifier and the current operating environment. Another example is setting a first-level directory corresponding to the webpage identifier, and then setting a second-level directory corresponding to the current operating environment within that first-level directory as the current access directory.

[0065] As can be seen, the embodiments of the present invention combine the current operating environment to determine the operating directory and the current access directory, thereby upgrading the webpage in the current operating environment and filtering the users accessing the webpage. The users accessing the webpage can be flexibly adjusted according to the current operating environment.

[0066] In some possible implementations, S107 includes: S1071. Obtain the specified order for the running environment, and take the first running environment indicated by the specified order as the current running environment. Different running environments correspond to different user numbers. The running environments in the specified order are arranged in ascending order of user number.

[0067] Correspondingly, after replacing the webpage resource data in the currently accessed directory with the webpage resource data in the new version resource package in S103, it also includes: S109. Obtain the webpage running status from the OSS based on resource attribute information and the current running environment.

[0068] S110. If the webpage running status indicates that the static resource data has been successfully loaded, update the current running environment to the next running environment indicated by the specified order, and execute S108. The CDN server is also used to determine the access running environment from at least one running environment according to the preset distribution information, and obtain the webpage resource data from the object storage service based on the access running environment and the webpage identifier in the webpage access request.

[0069] The directory of the webpage's running status in the OSS is related to the resource attribute information and the current running environment. For example, the name of the directory of the webpage's running status can be the concatenation of the resource attribute information and the current running environment.

[0070] The webpage running status is used to indicate whether the user client has successfully loaded static resource data after the webpage upgrade. If the loading is successful, it means that the upgraded webpage is running normally; if the loading fails, it means that the upgraded webpage is running abnormally.

[0071] The above S109 includes: determining the state storage directory based on resource attribute information and the current operating environment; and obtaining the webpage running status from the state storage directory on the object storage service client.

[0072] The state storage directory stores the running status of a webpage. Different resource attribute information and / or the current running environment correspond to different state storage directories. The name of the state storage directory can be obtained by concatenating the resource attribute information and the current running environment, and the running status of the webpage can be retrieved based on the name of the state storage directory. This embodiment of the invention distinguishes between resource attribute information and the current running environment when storing the running status of a webpage, which can facilitate and accurately find the running status of the webpage.

[0073] The specified order is a preset order by the upgrade management platform. Each version resource package must be stored and verified in this order until the last runtime environment passes verification. The specified order indicates at least one runtime environment, with different runtime environments corresponding to different numbers of users. For example, the specified order may include a test environment, a gray-scale runtime environment, and a full runtime environment. The test environment provides services to testers to test webpage functionality, the gray-scale runtime environment provides services to a small number of users, and the full runtime environment provides services to a large number of users. Thus, by first storing the package in the runtime directory corresponding to the runtime environment with a small number of users, and then storing it in the runtime environment with a large number of users once the webpage is running normally there, compared to directly storing it in the runtime environment with a large number of users, the impact of webpage malfunctions can be effectively reduced, avoiding webpage malfunctions for all users.

[0074] It's understandable that the number of runtime environments in the specified order is not limited to two; more can be set. For example, you can set up a test environment, a runtime environment with 30% of users, a runtime environment with 50% of users, a runtime environment with 80% of users, and a runtime environment with 100% of users. In this way, the new version of the resource package can be rolled out gradually, minimizing the impact of any anomalies.

[0075] It can be seen that for different versions of the new version resource package corresponding to the same webpage identifier, the number of times static resource data is stored is the same as the number of runtime environments in the specified order. For example, when the runtime environment includes a test environment, a gray-scale runtime environment, and a full runtime environment, it needs to be stored three times, and the runtime directories corresponding to the three times are different. The upgrade process of the current runtime environment implements this: after storing static resource data in a runtime directory each time, the corresponding webpage resource data needs to be stored in the currently accessed directory in the OSS terminal as the webpage resource data currently provided by the webpage, so that user clients can access the webpage. The process of user clients accessing the webpage is the functional testing process of the webpage to determine whether the webpage is running normally. When the webpage is running normally, the static resource data is stored in the next runtime environment; when the webpage is running abnormally, the static resource data is not stored in the next runtime environment.

[0076] In some possible implementations, a user can enter the URL of a webpage to trigger a webpage access request. The webpage access request is distributed to the OSS (Object Storage Service) via a CDN (Content Delivery Network) server, where the OSS server responds. The CDN server can determine the access runtime environment from one or more runtime environments according to preset distribution information. Based on the access runtime environment and the webpage identifier in the webpage access request, the CDN server determines the current access directory and retrieves the webpage resource data from that current access directory on the OSS server, returning it to the user client. The user client can then determine the runtime directory based on the version information in the received webpage resource data, the aforementioned access runtime environment, and the aforementioned webpage identifier, to load static resource data from the runtime directory on the OSS server.

[0077] The aforementioned preset distribution information is used to indicate the user volume of each operating environment, which can determine the access operating environment. For example, the CDN server can distribute 30% of web page access requests to the gray-scale operating environment and 70% of web page access requests to the full operating environment. In this way, 30% of the traffic is used for gray-scale testing. When the gray-scale test web page runs normally, the static resource data of the new version resource package is stored in the corresponding operating directory of the full operating environment.

[0078] In some possible implementations, it also includes: If the webpage running status indicates that static resource data loading has failed, retrieve the pre-backed historical version of the webpage resource data from the object storage service. The historical version of the webpage resource data is backed up in the running directory corresponding to the historical version. The running directory corresponding to the historical version has the same webpage identifier and the same running environment as the webpage resource data in the currently accessed directory. Replace the webpage resource data in the currently accessed directory with the historical version of the webpage resource data.

[0079] The aforementioned historical version can be the previous version of the webpage resource data in the currently accessed directory, or any historical version. The webpage resource data version can be understood as the current version of the webpage, determined by the version information in the webpage resource data of the currently accessed directory.

[0080] As can be seen, in this embodiment of the invention, if any current version malfunctions, it can switch to a historical version. Of course, after switching to a historical version, it can continue to switch to another historical version, and so on, until one of the versions runs normally.

[0081] It should be noted that, in this embodiment of the invention, when switching to a historical version, the switching is ensured to occur within the same webpage and the same operating environment through the webpage identifier and the operating environment, thus avoiding switching errors. For example, if version V1 of operating environment R1 and webpage identifier H1 malfunctions, it will revert to the historical version V0 of operating environment R1 and webpage identifier H1, rather than reverting to version V0 of operating environment R2 and webpage identifier H2.

[0082] In one approach, S103, replacing the webpage resource data in the currently accessed directory with the webpage resource data in the new version resource package, includes: obtaining a list of registered webpages, which is dynamically updated based on webpage registration requests; and replacing the webpage resource data in the currently accessed directory with the webpage resource data in the new version resource package if the webpage identifier is in the list of registered webpages.

[0083] The registered webpage list includes one or more registered webpage identifiers. Specifically, when the upgrade management platform receives a webpage registration request, it extracts the identifier of the webpage to be registered from the request. After successful registration, this identifier is recorded as a registered webpage identifier in the registered webpage list.

[0084] The embodiments of the present invention can realize web page management based on registration, thus ensuring the security of the upgrade management platform.

[0085] In some possible implementations, the upgrade management platform may also record webpage upgrade information, which includes, but is not limited to: resource attribute information, current operating environment, storage time of static resource data, storage time of webpage resource data, storage result information of static resource data, storage result information of webpage resource data, and webpage operating status.

[0086] Among them, the storage time of static resource data refers to the time it takes to store the static resource data in the new version resource package in the runtime directory on the OSS client.

[0087] The storage time of web page resource data refers to the time it takes for the web page resource data in the new version of the resource package to replace the web page resource data in the currently accessed directory.

[0088] The storage result information for static resource data includes a storage result flag and the reason for storage failure. The storage result flag indicates whether the static resource data was successfully stored in the directory running on the OSS platform, including storage failure or storage success.

[0089] Similarly, the storage result information for web page resource data includes a storage result flag and a storage failure reason. The storage result flag indicates whether the web page resource data was successfully stored in the current running directory on the OSS server, including storage failure or storage success.

[0090] The upgrade information on the above webpage can facilitate the review and viewing of the upgrade process later.

[0091] In some possible implementations, after storing static resource data in the running directory, the running directory is cached in the CDN server so that the CDN server can return the static resource data in the locally stored running directory to the user client if the running directory is stored locally. After replacing the web page resource data in the currently accessed directory with the web page resource data in the new version resource package, the currently accessed directory is cached in the CDN server so that the CDN server can return the web page resource data in the currently accessed directory stored this time to the user client if the currently accessed directory is stored this time.

[0092] It should be noted that if the aforementioned running directory does not exist in the CDN server, static resource data is retrieved from the running directory on the OSS server and returned to the user client; if the aforementioned currently accessed directory does not exist in the CDN server, web page resource data is retrieved from the currently accessed directory on the OSS server and returned to the user client.

[0093] As can be seen, the above caching process is a real-time caching process for the new version of the resource package, in order to ensure that as many web page access requests as possible directly obtain static resource data and web page resource data from the CDN server, which helps to improve access efficiency.

[0094] In some possible implementations, caching can also be performed based on the cache status in the CDN server when a webpage access request is received. Specifically, caching based on the cache status in the CDN server includes: if the aforementioned running directory does not exist in the CDN server, the CDN server not only needs to retrieve the static resource data from the running directory on the OSS server and return it to the user client, but also needs to cache the running directory on the OSS server locally; if the aforementioned currently accessed directory does not exist in the CDN server, the CDN server not only needs to retrieve the webpage resource data from the currently accessed directory on the OSS server and return it to the user client, but also needs to cache the currently accessed directory on the OSS server locally. Specifically, caching is performed based on the cache status in the CDN server when any user accesses the webpage for the first time or the Nth time (N is an integer greater than or equal to 2). Compared to performing the above caching when accessing the webpage for the Nth time, performing the above caching when accessing the current service webpage for the first time can improve access efficiency.

[0095] In addition, users can pre-configure caching information on the upgrade management platform to indicate whether to cache to the CDN server. If the caching information indicates to cache to the CDN server, then the above caching can be performed; if the caching information indicates not to cache to the CDN server, then the above caching will not be performed.

[0096] Following the aforementioned caching process, the CDN server can also delete running directories with a cache duration greater than or equal to a preset threshold, as well as currently accessed directories with a cache duration greater than or equal to the preset threshold. This prevents long-unused web page resources and static resource data from occupying CDN server storage space.

[0097] The cache duration refers to the duration that a data item exists on the CDN server, including the duration that web page resource data and static resource data have existed on the CDN server.

[0098] Figure 3 This is a schematic diagram of webpage management provided in an embodiment of the present invention. (Refer to...) Figure 3 As shown, the above web page management involves: upgrade management platform, OSS terminal, user client and CDN server.

[0099] The upgrade management platform is used to manage the upgrade process and can connect to any webpage, for example... Figure 3 Three web pages, P1, P2, and P3, are provided as an example. Upgrading these three web pages can be achieved through an upgrade management platform. The upgrade management platform includes two functions: core management and data management. The core management function further includes: package management, version management, environment management, and upgrade management.

[0100] The package management function is used to manage new version resource packages, including upgrade triggering and querying. Upgrade triggering refers to storing the web resource data and static resource data in the new version resource package on the OSS server. Querying refers to retrieving web upgrade information from the database of the upgrade management platform.

[0101] The version management function is used to verify the new version resource package through hash verification and index verification after the package management function triggers an upgrade. Hash verification refers to verifying the new version resource package based on its hash code. Index verification refers to verifying the new version resource package based on its filename list.

[0102] The environment management function is used to manage the runtime environment, including creating a new runtime environment, deleting a runtime environment, and defining the current runtime environment. Runtime environments include test environments, gray-scale runtime environments, and full runtime environments.

[0103] After the environment management function determines the current operating environment, the upgrade management function performs a layered upgrade for the current operating environment. The layered upgrade includes: first upgrading static resources and then upgrading web resources.

[0104] The database stores upgrade management information, including web-based upgrade information sent by the upgrade management function, as well as: new version resource package information sent by the package management function, verification information sent by the version management function, and runtime environment information sent by the environment management function. New version resource package information may include, but is not limited to: resource attribute information, size, and name of the new version resource package. Verification information includes, but is not limited to: verification time, verification result, hash code, and file list names. Runtime environment information includes, but is not limited to: runtime environment creation time and creation result.

[0105] The OSS (Object Storage Service) is used to store web page resource data and static resource data. The OSS can receive static resource data specific to the current operating environment from the upgrade management function and store it in the corresponding running directory for that environment. It can also receive web page resource data specific to the current operating environment from the upgrade management function and store it in the corresponding currently accessed directory for that environment. Therefore, the OSS may contain multiple running directories and corresponding currently accessed directories for different operating environments. Static resource data is stored in the running directories, and web page resource data is stored in the currently accessed directories. Figure 3 The example provided only shows the webpage resource data and static resource data corresponding to the test environment.

[0106] A user client is a client application used by users to access web pages. It can be a browser or a web (World Wide Web) application. The user client can send web page access requests to the CDN server to obtain web page resource data and static resource data.

[0107] CDN servers include two functions: access control and caching.

[0108] The access control function is used to retrieve web resource data from the currently accessed directory of one of the runtime environments on the OSS and return it to the user client, based on the received web access request, and to retrieve static resource data from the runtime directory of one of the runtime environments on the OSS and return it to the user client.

[0109] The caching function is used for cache management, including caching data and deleting cached data. Cache data includes the cache's operating directory and the currently accessed webpage. Caching can be performed after tiered upgrades (using upgrade management) or after access control (using access control). Tiered upgrade caching includes caching webpage resource data after upgrading it, and caching static resource data after upgrading it. Access control caching includes caching webpage resource data after access, and caching static resource data after access.

[0110] Figure 4 This is a schematic diagram illustrating the process of accessing and upgrading a webpage through a webpage system according to an embodiment of the present invention. (Refer to...) Figure 4 As shown, the process of accessing the webpage upgrade system includes: configuring the webpage identifier and operating environment, applying for OSS resources, and configuring CDN link redirection information.

[0111] Configuring a webpage identifier refers to the user configuring a webpage identifier on the upgrade management platform. When the upgrade management platform receives a resource publishing request, it can determine whether to respond to the request, i.e., whether to execute steps S102 to S103, based on the webpage identifier in the request. If the webpage identifier in the resource publishing request is a configured webpage identifier, then the resource publishing request is responded to; otherwise, no response is given. The webpage identifier determines the running directory and the currently accessed directory. For example, the webpage identifier can be nft, tao, or newproject, etc. The webpage identifier is related to the specific webpage that needs to be connected to the upgrade management platform. The configured webpage identifier can be stored in [location missing]. Figure 3 The database shown.

[0112] Configuring the runtime environment involves users configuring at least one runtime environment corresponding to a webpage identifier on the upgrade management platform and setting the specified order of the runtime environments.

[0113] Applying for OSS resources on the upgrade management platform refers to applying for storage resources on OSS for a webpage identifier. These storage resources are used to store the runtime directories and currently accessed directories of various runtime environments corresponding to the webpage identifier for each version.

[0114] Configuring CDN link redirection information is used to configure the link between the CDN server and the OSS server, including: CDN domain name configuration, cache configuration, and digital certificate configuration. Specifically, CDN domain name configuration sets the CDN domain name to the OSS server's address, enabling the CDN server to access the OSS server. Cache configuration is used to configure the CDN's strategy for managing cached data, including two types: caching policy and deletion policy. Digital certificate configuration is used to configure the digital certificate used by the CDN; the digital certificate ensures the security of data interaction between the user client and the OSS server.

[0115] After performing the above process of accessing the webpage and upgrading the webpage system, the webpage can be upgraded through the webpage upgrade system.

[0116] Figure 5 This is a schematic diagram of a webpage upgrade process provided in an embodiment of the present invention. (Refer to...) Figure 5 As shown, an example of the upgrade process for a grayscale operating environment is given.

[0117] The upgrade process of the grayscale operation environment includes three processes: static resource upgrade, web page resource upgrade, and grayscale operation environment verification.

[0118] Static resource upgrades include: First, the static resource data with the webpage identifier P1 and version information V2.0.0 is stored in the running directory P1_V2.0.0_GRAY of the grayscale operation environment GRAY on the OSS side.

[0119] Then, the running directory P1_V2.0.0_GRAY is cached in the CDN server.

[0120] Website resource upgrades include: First, the HTML resource data of the webpage identified as P1 and with version information V2.0.0 is stored in the current access directory P1_GRAY and the running directory P1_V2.0.0_GRAY of the grayscale operation environment GRAY on the OSS side.

[0121] Then, the currently accessed directory P1_GRAY is cached in the CDN server.

[0122] Verification of the grayscale operating environment includes: First, the user client accesses the web resource data in the current access directory P1_GRAY through the CDN server. The current access directory P1_GRAY can be located on the OSS or the CDN server.

[0123] Then, some user clients load static resource data from the runtime directory P1_V2.0.0_GRAY through web page resource data.

[0124] Finally, if the static resource data is successfully processed in the webpage running status indicator in the state storage directory P1_V2.0.0_GRAY_STA on the OSS, the upgrade process of the grayscale operating environment is confirmed to be successful. If the static resource data fails, the HTML webpage resource data in the running directory P1_V1.0.0_GRAY will replace the HTML webpage resource data in the currently accessed directory P1_GRAY, so as to revert the webpage corresponding to the webpage identifier P1 in the grayscale operating environment from version information V2.0.0 to the historical version V1.0.0.

[0125] The HTML data of web page resources in the running directory P1_V1.0.0_GRAY was stored when the version information V1.0.0 was upgraded.

[0126] After the grayscale runtime environment upgrade is successful, the full runtime environment upgrade process is executed. The full runtime environment upgrade process is similar to the grayscale runtime environment upgrade process described above, including: The upgrade process for the full runtime environment includes three steps: static resource upgrade, web page resource upgrade, and full runtime environment verification.

[0127] Static resource upgrades include: First, the static resource data with the webpage identifier P1 and version information V2.0.0 is stored in the P1_V2.0.0_PROD directory of the full runtime environment PROD on the OSS.

[0128] Then, the running directory P1_V2.0.0_PROD is cached in the CDN server.

[0129] Website resource upgrades include: First, the HTML resource data of the webpage identified as P1 and with version information V2.0.0 is stored in the current access directory P1_PROD and the running directory P1_V2.0.0_PROD of the full runtime environment PROD on the OSS.

[0130] Then, the currently accessed directory P1_PROD is cached in the CDN server.

[0131] Full runtime environment verification includes: First, all user clients access web resource data in the current access directory P1_PROD through the CDN server. The current access directory P1_PROD can be located on the OSS or the CDN server.

[0132] Then, the user client loads the static resource data in the runtime directory P1_V2.0.0_PROD through the web page resource data.

[0133] Finally, if the static resource data in the state storage directory P1_V2.0.0_PROD_STA on the OSS terminal indicates successful completion, the upgrade process of the full runtime environment is confirmed to be successful. If the static resource data fails, the HTML webpage resource data in the runtime directory P1_V1.0.0_PROD replaces the HTML webpage resource data in the currently accessed directory P1_PROD, thus reverting the webpage corresponding to webpage identifier P1 in the full runtime environment from version V2.0.0 to the historical version V1.0.0. The HTML webpage resource data in the runtime directory P1_V1.0.0_PROD was stored when upgrading to version V1.0.0.

[0134] After the upgrade process in the full operating environment is successful, the upgrade process for the webpage identifier P1 and version information V2.0.0 is complete.

[0135] In summary, during the static resource upgrade process of this invention, the previous version of static resource data still exists in the resource attribute information of the previous version of the web page resource package in the corresponding running directory on the OSS side, and the previous version of web page resource data still exists in the current running directory on the OSS side. The user client can access the previous version of web page resource data in the current running directory and load the previous version of static resource data through the version information in the previous version of web page resource data to achieve web page access. After the web page resource upgrade is successful, the web page resource data in the currently accessed directory is the new version of web page resource data. The user client can access the new version of web page resource data in the current running directory and load the new version of static resource data through the version information in the new version of web page resource data to achieve web page access. During the web page resource upgrade process, the previous version of web page resource data does not exist in the currently accessed directory, and the new version of web page resource data is not successfully stored, so the user cannot access the web page resource data, and therefore cannot achieve web page access. Compared with conventional web page upgrades, it can effectively reduce service interruption time, and even be imperceptible to the user. In addition, it can also support a unified upgrade process for multiple web pages and upgrade each environment in a specified order, minimizing the impact of upgrade anomalies. Furthermore, embodiments of the present invention distinguish different web pages by web page identifiers, thereby distinguishing the running directories and currently accessed directories of different web pages and different operating environments on the OSS, which can support the web page upgrade process of different web pages and different operating environments.

[0136] Figure 6 This is a schematic diagram of the structure of a webpage upgrade device provided in an embodiment of the present invention, with reference to... Figure 6 As shown, the webpage upgrade device 300 includes: The request receiving module 301 is used to receive resource publishing requests. The resource publishing request includes a new version resource package and resource attribute information of the new version resource package. The new version resource package includes static resource data and web page resource data. The resource attribute information includes version information and web page identifier.

[0137] The first storage module 302 is used to store static resource data in the running directory corresponding to the resource attribute information on the object storage service client.

[0138] The second storage module 303 is used to determine the current access directory corresponding to the webpage identifier in the object storage service when it receives a storage result information indicating successful storage from the object storage service. It then replaces the webpage resource data in the current access directory with the webpage resource data in the new version resource package. The content delivery network server is used to return the webpage resource data in the current access directory to the user client when the webpage identifier in the webpage access request sent by the user client matches the webpage identifier corresponding to the current access directory. This allows the user client to load static resource data that matches the version information in the webpage resource data.

[0139] Optionally, refer to Figure 7 As shown, the device 300 also includes: The environment determination module 304 is used to determine the current operating environment.

[0140] The first storage module 302 is also used to: determine the running directory based on the resource attribute information and the current running environment before storing static resource data in the running directory corresponding to the resource attribute information on the object storage service terminal.

[0141] The second storage module 303 is also used to: determine the currently accessed directory based on the webpage identifier and the current operating environment.

[0142] Optionally, the environment determination module 304 is also used for: Retrieves the specified order for the runtime environments and takes the first runtime environment indicated by the specified order as the current runtime environment. Different runtime environments correspond to different numbers of users, and the runtime environments in the specified order are arranged in ascending order of number of users.

[0143] Reference Figure 7 As shown, the above-mentioned device 300 further includes: The status acquisition module 305 is used to obtain the web page running status from the object storage service based on the resource attribute information and the current running environment after replacing the web page resource data in the currently accessed directory with the web page resource data in the new version resource package.

[0144] The environment update module 306 is used to update the current running environment to the next running environment indicated by the specified order when the webpage running status indicates that the static resource data has been successfully loaded, and then enter the first storage module 302. The content delivery network server is also used to determine the access running environment from at least one running environment according to preset distribution information, and to obtain webpage resource data from the object storage service based on the access running environment and the webpage identifier in the webpage access request.

[0145] Optionally, the status acquisition module 305 is also used for: The state storage directory is determined based on resource attribute information and the current operating environment; the webpage running status is obtained from the state storage directory on the object storage service client.

[0146] Optionally, refer to Figure 7 As shown, the device 300 also includes a rollback module 307, used for: If the webpage running status indicates that static resource data loading has failed, retrieve the pre-backed historical version of the webpage resource data from the object storage service. The historical version of the webpage resource data is backed up in the running directory corresponding to the historical version. The running directory corresponding to the historical version has the same webpage identifier and the same running environment as the webpage resource data in the currently accessed directory. Replace the webpage resource data in the currently accessed directory with the historical version of the webpage resource data.

[0147] Optionally, the second storage module 303 is also used for: Retrieve the list of registered web pages, which is dynamically updated based on web page registration requests; if a web page is listed in the registered web page list, replace the web page resource data in the currently accessed directory with the web page resource data in the new version resource package.

[0148] Optionally, refer to Figure 7 As shown, it also includes a verification module 308, used for: Before storing static resource data into the corresponding runtime directory of the resource attribute information on the object storage service client, verification information is extracted from the new version resource package. The verification information includes at least one of the following: a list of file names in the new version resource package and the hash code of the new version resource package; the new version resource package is verified using the verification information; if the verification is successful, it enters the first storage module 302.

[0149] Optionally, the verification module 308 is also used for: Match the file names in the file name list with the file names in the new version resource package, and perform a hash operation on the new version resource package to obtain the hash code to be verified; if the file names in the new version resource package include all the file names in the file name list, and / or the hash code to be verified matches the hash code in the new version resource package, then the verification of the new version resource package is determined to be successful; otherwise, the verification of the new version resource package is determined to be unsuccessful.

[0150] Optionally, refer to Figure 7 As shown, the device 300 also includes: The recording module 309 is used to record webpage upgrade information in the upgrade management platform. The webpage upgrade information includes at least one of the following: resource attribute information, current operating environment, storage time of static resource data, storage time of webpage resource data, storage result information of static resource data, storage result information of webpage resource data, and webpage running status.

[0151] Optionally, refer to Figure 7 As shown, the device 300 also includes a cache module 310, used for: After storing static resource data in the runtime directory, the runtime directory is cached in the content delivery network (CDN) server. This allows the CDN server to return the static resource data in the locally stored runtime directory to the user client, provided it already exists locally. Similarly, after replacing the webpage resource data in the currently accessed directory with the webpage resource data from the new version resource package, the currently accessed directory is cached in the CDN server. This allows the CDN server to return the webpage resource data in the currently accessed directory to the user client, provided it already exists in the current accessed directory.

[0152] The above embodiments are device embodiments corresponding to the foregoing method embodiments. For details, please refer to the relevant descriptions of the foregoing method embodiments, which will not be repeated here.

[0153] This invention also provides an electronic device, such as... Figure 8 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404. The memory 403 is used to store computer programs; the processor 401, when executing the program stored in the memory 403, performs the following steps: The system receives a resource publishing request, which includes a new version resource package and its resource attribute information. The new version resource package includes static resource data and web page resource data. The resource attribute information includes version information and a web page identifier. The system stores the static resource data in the running directory corresponding to the resource attribute information on the object storage service. Upon receiving a storage result message from the object storage service indicating successful storage, the system determines the current access directory corresponding to the web page identifier on the object storage service and replaces the web page resource data in the current access directory with the web page resource data from the new version resource package. The content delivery network (CDN) server returns the web page resource data from the current access directory to the user client when the web page identifier in the web page access request sent by the user client matches the web page identifier corresponding to the current access directory. This allows the user client to load the static resource data that matches the version information in the web page resource data.

[0154] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0155] The communication interface is used for communication between the aforementioned terminal and other devices.

[0156] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0157] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0158] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the webpage upgrade methods described in the above embodiments.

[0159] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the webpage upgrade methods described in the above embodiments.

[0160] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0161] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0162] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0163] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for upgrading a webpage, characterized in that, The method, applied to an upgrade management platform, which is communicatively connected to an object storage service, and which is also communicatively connected to a content delivery network (CDN) service, includes: Receive a resource publishing request, the resource publishing request including a new version resource package and the resource attribute information of the new version resource package, the new version resource package including: static resource data and web page resource data, the resource attribute information including version information and web page identifier; The static resource data is stored in the running directory corresponding to the resource attribute information on the object storage service client; Upon receiving a storage result information indicating successful storage from the object storage service provider, the provider determines the current access directory corresponding to the webpage identifier in the object storage service provider, and replaces the webpage resource data in the current access directory with the webpage resource data in the new version resource package. The content delivery network service provider then returns the webpage resource data in the current access directory to the user client if the webpage identifier in the webpage access request sent by the user client matches the webpage identifier corresponding to the current access directory, so that the user client can load static resource data that matches the version information in the webpage resource data.

2. The method according to claim 1, characterized in that, The method further includes: Determine the current operating environment; Before storing the static resource data in the corresponding runtime directory of the resource attribute information on the object storage service client, the process further includes: The running directory is determined based on the resource attribute information and the current running environment; Determining the current access directory corresponding to the webpage identifier in the object storage service includes: The currently accessed directory is determined based on the webpage identifier and the current operating environment.

3. The method according to claim 2, characterized in that, Determine the current operating environment, including: Obtain a specified order for the runtime environment, and take the first runtime environment indicated by the specified order as the current runtime environment. Different runtime environments correspond to different user numbers, and the runtime environments in the specified order are arranged in ascending order of user number. After replacing the webpage resource data in the currently accessed directory with the webpage resource data in the new version resource package, the method further includes: The webpage running status is obtained from the object storage service client based on the resource attribute information and the current running environment. When the webpage running status indicates that the static resource data has been successfully loaded, the current running environment is updated to the next running environment indicated by the specified order, and the step of determining the running directory based on the resource attribute information and the current running environment is executed. The content delivery network server is also used to determine an access running environment from at least one of the running environments based on preset distribution information, and to obtain the webpage resource data from the object storage service based on the access running environment and the webpage identifier in the webpage access request.

4. The method according to claim 3, characterized in that, The step of obtaining the webpage running status from the object storage service based on the resource attribute information and the current running environment includes: Determine the state storage directory based on the resource attribute information and the current operating environment; The webpage running status is obtained from the state storage directory on the object storage service client.

5. The method according to claim 3, characterized in that, Also includes: If the webpage running status indicates that the static resource data has failed to load, the webpage resource data of the pre-backed historical version is obtained from the object storage service client. The webpage resource data of the historical version is backed up in the running directory corresponding to the historical version. The running directory corresponding to the historical version has the same webpage identifier and the same running environment as the webpage resource data in the currently accessed directory. Replace the webpage resource data in the currently accessed directory with the historical version of the network resource data.

6. The method according to claim 1, characterized in that, Replacing the webpage resource data in the currently accessed directory with the webpage resource data in the new version resource package includes: Obtain a list of registered web pages, which is dynamically updated based on web page registration requests; If the webpage identifier is located in the list of registered webpages, the webpage resource data in the currently accessed directory will be replaced with the webpage resource data in the new version resource package.

7. The method according to any one of claims 1 to 6, characterized in that, Before storing the static resource data in the corresponding runtime directory of the resource attribute information on the object storage service client, the process further includes: Extract verification information from the new version resource package, the verification information including at least one of the following: a list of file names in the new version resource package and a hash code of the new version resource package; The new version resource package is verified using the verification information. If the verification is successful, the step of storing the static resource data into the running directory corresponding to the resource attribute information on the object storage service client is executed.

8. The method according to claim 7, characterized in that, The verification of the new version resource package using the verification information includes: Match the file names in the file name list with the file names in the new version resource package, and perform a hash operation on the new version resource package to obtain the hash code to be verified; If the file names in the new version resource package include all file names in the file name list, and / or the hash code to be verified is consistent with the hash code in the new version resource package, then the new version resource package is determined to have been successfully verified. Otherwise, the verification of the new version resource package is deemed to have failed.

9. The method according to claim 3, characterized in that, The method further includes: The upgrade management platform records webpage upgrade information, which includes at least one of the following: resource attribute information, current operating environment, storage time of static resource data, storage time of webpage resource data, storage result information of static resource data, storage result information of webpage resource data, and webpage running status.

10. The method according to any one of claims 1 to 6, characterized in that, Also includes: After storing the static resource data in the running directory, the running directory is cached in the content delivery network server so that the content delivery network server can return the static resource data in the running directory stored locally to the user client if the running directory is stored locally. After replacing the webpage resource data in the currently accessed directory with the webpage resource data in the new version resource package, the currently accessed directory is cached in the content delivery network server so that the content delivery network server can return the webpage resource data in the currently accessed directory to the user client when the currently accessed directory is stored.

11. A webpage upgrade device, characterized in that, The device is applied to an upgrade management platform, which is communicatively connected to an object storage service (Object Storage Service) client, and the Object Storage Service client is also communicatively connected to a content delivery network (CDN) server. The device includes: The request receiving module is used to receive resource publishing requests, which include new version resource packages and resource attribute information. The new version resource packages include static resource data and web page resource data, and the resource attribute information includes version information and web page identifier. The first storage module is used to store the static resource data in the running directory corresponding to the resource attribute information on the object storage service client; The second storage module is used to determine the current access directory corresponding to the webpage identifier in the object storage service when it receives a storage result information indicating successful storage from the object storage service terminal, and replaces the webpage resource data in the current access directory with the webpage resource data. The content delivery network server is used to return the webpage resource data in the current access directory to the user client when the webpage identifier in the webpage access request sent by the user client matches the webpage identifier corresponding to the current access directory, so that the user client can load static resource data that matches the version information in the webpage resource data.

12. A webpage upgrade system, characterized in that, It includes an upgrade management platform, an object storage service object storage client, and a content delivery network server. The upgrade management platform is communicatively connected to the object storage service object storage client, and the object storage service client is also communicatively connected to the content delivery network server. The upgrade management platform is used for: Receive a resource publishing request, the resource publishing request including a new version resource package and the resource attribute information of the new version resource package, the new version resource package including: static resource data and web page resource data, the resource attribute information including version information and web page identifier; The static resource data is stored in the running directory corresponding to the resource attribute information on the object storage service client; Upon receiving storage result information indicating successful storage from the object storage service provider, the provider determines the current access directory corresponding to the webpage identifier in the object storage service provider, and replaces the webpage resource data in the current access directory with the webpage resource data. The content delivery network service provider then returns the webpage resource data in the current access directory to the user client if the webpage identifier in the webpage access request sent by the user client matches the webpage identifier corresponding to the current access directory, so that the user client can load static resource data that matches the version information in the webpage resource data.

13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1 to 10.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 10.