Page resource loading method and device, electronic equipment and storage medium

By receiving the loading operation of the application page and obtaining target resource information, the problem of high cost of loading new version page resources in the existing technology is solved, and the effect of timely loading the current version page resources and reducing costs is achieved.

CN119829855APending Publication Date: 2025-04-15BEIJING KINGSOFT OFFICE SOFTWARE INC +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411917491.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, application pages need to frequently update the URL and SRI information of page resources, resulting in high cost of loading new version of page resources and affecting user experience.

Method used

By receiving the loading operation of the application page, the target resource information is obtained, including the URL and SRI information of the page resource, which is used to load the current version of the page resource and perform reliability verification.

Benefits of technology

It realizes the timely loading of the current version of the application page resources without relying on the page resource maintenance object release operation, reducing loading costs and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829855A_ABST
    Figure CN119829855A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a page resource loading method and device, electronic equipment and a storage medium. The method comprises the steps that loading operation for page resources in an application page is received; in response to the loading operation, target resource information is obtained, the target resource information is used for loading page resources of a current version of the application page and verification information of the page resources, and the verification information is used for verifying the reliability of the page resources; and loading page resources of the current version of the application page based on the target resource information. Therefore, after the loading operation is received, the page resource of the current version of the application page can be loaded without depending on the release operation of the maintenance object of the page resource on the page resource of the current version, so that the timeliness of loading the page resource of the current version can be improved, and the cost of loading the page resource of the current version can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for loading page resources. Background Art

[0002] In the related art, an application page usually has a fixed page resource URL (Uniform Resource Locator) address and SRI (Subresource Integrity) and other page resource information to download resource files from the page resource URL and verify the integrity of the downloaded resource files based on SRI.

[0003] However, if the maintenance object of the page resource releases a new version of the page resource, the access party's application page often needs to obtain the latest version URL and SRI information of the page resource after the release, continue to write it into the application page, and then release the application page.

[0004] That is to say, in the above scheme, it is generally necessary to make more modifications to the source code of the application page, that is, to change the resource information of the page resources in the application page, and to republish the service, which makes the cost of loading the new version of the page resources higher. If the access party cannot get the update message of the page resources in time, the function of the application page will not be the latest version, which will affect the user experience of the access party and cause the timeliness of loading the current version of the page resources to be lower.

[0005] It can be seen that how to improve the timeliness of loading the current version of page resources and reduce the cost of loading the current version of page resources is a technical issue worthy of attention. Summary of the invention

[0006] In view of this, in order to solve some or all of the above-mentioned technical problems, an embodiment of the present application provides a method, device, electronic device and storage medium for loading page resources.

[0007] In a first aspect, an embodiment of the present application provides a method for loading a page resource, the method comprising:

[0008] Receive loading operations for page resources in the application page;

[0009] In response to the loading operation, acquiring target resource information, wherein the target resource information is used to load a page resource of a current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource;

[0010] Based on the target resource information, the page resource of the current version of the application page is loaded.

[0011] In a possible implementation manner, the acquiring target resource information includes:

[0012] Determine the resource identifier of the page resource to be loaded by the application page;

[0013] Determine a target storage space, wherein the target storage space stores the resource identifier and target resource information of the current version of the page resource in an associated manner;

[0014] The target resource information stored in association with the resource identifier is acquired from the target storage space.

[0015] In a possible implementation manner, the page resource to be loaded by the application page includes a first page resource of a current version and a second page resource of a current version; and

[0016] The obtaining of target resource information includes:

[0017] Obtaining target resource information for loading the first page resource;

[0018] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0019] Loading the first page resource based on target resource information for loading the first page resource;

[0020] The obtaining of target resource information further includes:

[0021] Obtaining target resource information for loading the second page resource;

[0022] The step of loading the page resource of the current version of the application page based on the target resource information further includes:

[0023] Based on the target resource information for loading the second page resource, the second page resource is loaded.

[0024] In a possible implementation manner, the page resource to be loaded by the application page includes a first page resource of a current version and a second page resource of a current version; and

[0025] The obtaining of target resource information includes:

[0026] Obtaining, through a single request, target resource information for loading the first page resource and target resource information for loading the second page resource from a preset storage space;

[0027] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0028] Loading the first page resource based on target resource information for loading the first page resource;

[0029] Based on the target resource information for loading the second page resource, the second page resource is loaded.

[0030] In a possible implementation manner, the acquiring target resource information includes:

[0031] Acquire target resource information from a preset storage space; and

[0032] The preset storage space stores and updates target resource information in the following manner:

[0033] Determine whether the target resource information stored in the preset storage space is updated;

[0034] When the target resource information of the preset storage space is updated, the updated target resource information is stored.

[0035] In a possible implementation manner, determining whether the target resource information stored in the preset storage space is updated includes:

[0036] Determine whether there is an update to the target resource information stored in the target storage space;

[0037] In the case that the target resource information stored in the target storage space is updated, determining that the target resource information stored in the preset storage space is updated; or

[0038] In a case where the target resource information stored in the target storage space is not updated, it is determined that the target resource information stored in the preset storage space is not updated.

[0039] In a possible implementation manner, determining whether the target resource information stored in the target storage space is updated includes:

[0040] At a preset time interval, it is periodically determined whether the target resource information stored in the target storage space is updated.

[0041] In a possible implementation, the target resource information includes the uniform resource locator and sub-resource integrity information of the page resource; and

[0042] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0043] Downloading the page resource based on the uniform resource locator of the page resource;

[0044] Based on the sub-resource integrity information, determining whether the page resource passes the resource integrity verification;

[0045] In a case where the page resource passes the resource integrity verification, the page resource indicated by the uniform resource locator is loaded as the page resource of the current version of the application page.

[0046] In a second aspect, an embodiment of the present application provides a device for loading page resources, the device comprising:

[0047] A receiving unit, used to receive a loading operation for a page resource in an application page;

[0048] an acquisition unit, configured to acquire target resource information in response to the loading operation, wherein the target resource information is used to load a page resource of a current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource;

[0049] A loading unit is used to load the page resource of the current version of the application page based on the target resource information.

[0050] In a possible implementation manner, the acquiring target resource information includes:

[0051] Determine the resource identifier of the page resource to be loaded by the application page;

[0052] Determine a target storage space, wherein the target storage space stores the resource identifier and target resource information of the current version of the page resource in an associated manner;

[0053] The target resource information stored in association with the resource identifier is acquired from the target storage space.

[0054] In a possible implementation manner, the page resource to be loaded by the application page includes a first page resource of a current version and a second page resource of a current version; and

[0055] The obtaining of target resource information includes:

[0056] Obtaining target resource information for loading the first page resource;

[0057] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0058] Loading the first page resource based on target resource information for loading the first page resource;

[0059] The obtaining of target resource information further includes:

[0060] Obtaining target resource information for loading the second page resource;

[0061] The step of loading the page resource of the current version of the application page based on the target resource information further includes:

[0062] Based on the target resource information for loading the second page resource, the second page resource is loaded.

[0063] In a possible implementation manner, the page resource to be loaded by the application page includes a first page resource of a current version and a second page resource of a current version; and

[0064] The obtaining of target resource information includes:

[0065] Obtaining, through a single request, target resource information for loading the first page resource and target resource information for loading the second page resource from a preset storage space;

[0066] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0067] Loading the first page resource based on target resource information for loading the first page resource;

[0068] Based on the target resource information for loading the second page resource, the second page resource is loaded.

[0069] In a possible implementation manner, the acquiring target resource information includes:

[0070] Acquire target resource information from a preset storage space; and

[0071] The preset storage space stores and updates target resource information in the following manner:

[0072] Determine whether the target resource information stored in the preset storage space is updated;

[0073] When the target resource information of the preset storage space is updated, the updated target resource information is stored.

[0074] In a possible implementation manner, determining whether the target resource information stored in the preset storage space is updated includes:

[0075] Determine whether there is an update to the target resource information stored in the target storage space;

[0076] In the case that the target resource information stored in the target storage space is updated, determining that the target resource information stored in the preset storage space is updated; or

[0077] In a case where the target resource information stored in the target storage space is not updated, it is determined that the target resource information stored in the preset storage space is not updated.

[0078] In a possible implementation manner, determining whether the target resource information stored in the target storage space is updated includes:

[0079] At a preset time interval, it is periodically determined whether the target resource information stored in the target storage space is updated.

[0080] In a possible implementation, the target resource information includes the uniform resource locator and sub-resource integrity information of the page resource; and

[0081] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0082] Downloading the page resource based on the uniform resource locator of the page resource;

[0083] Based on the sub-resource integrity information, determining whether the page resource passes the resource integrity verification;

[0084] In a case where the page resource passes the resource integrity verification, the page resource indicated by the uniform resource locator is loaded as the page resource of the current version of the application page.

[0085] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0086] Memory for storing computer programs;

[0087] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the page resource loading method of the first aspect of the present application is implemented.

[0088] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method of any embodiment of the method for loading page resources of the first aspect described above is implemented.

[0089] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer-readable code. When the computer-readable code runs on a device, the processor in the device implements a method as in any embodiment of the method for loading page resources in the first aspect mentioned above.

[0090] The page resource loading method provided in the embodiment of the present application can receive a loading operation for a page resource in an application page, and then, in response to the loading operation, obtain target resource information, wherein the target resource information is used to load the page resource of the current version of the application page, and verification information of the page resource, and the verification information is used to verify the reliability of the page resource, and then, based on the target resource information, the page resource of the current version of the application page is loaded. Thus, after receiving the loading operation, the page resource of the current version of the application page can be loaded without relying on the publishing operation of the maintenance object of the page resource on the current version of the page resource, so that the timeliness of loading the page resource of the current version can be improved and the cost of loading the page resource of the current version can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0092] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0093] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0094] Figure 1 A schematic diagram of a flow chart of a method for loading page resources provided in an embodiment of the present application;

[0095] Figure 2 A flowchart of another method for loading page resources provided in an embodiment of the present application;

[0096] Figure 3A A schematic diagram of an application scenario of a page resource loading method provided in an embodiment of the present application;

[0097] Figure 3B A schematic diagram of a flow chart of a method for loading page resources provided in an embodiment of the present application involving multiple page resources;

[0098] Figure 3C A schematic diagram of another application scenario of a page resource loading method provided in an embodiment of the present application;

[0099] Figure 3D Another flow chart of a method for loading page resources provided in an embodiment of the present application involving multiple page resources;

[0100] Figure 3E A schematic diagram of a process of storing and updating target resource information in a preset storage space in a page resource loading method provided in an embodiment of the present application;

[0101] Figure 3F A schematic diagram of a process of storing and updating target resource information in a preset storage space in a page resource loading method provided in an embodiment of the present application;

[0102] Figure 3G A flowchart of another method for loading page resources provided in an embodiment of the present application;

[0103] Figure 4 A schematic diagram of the structure of a device for loading page resources provided in an embodiment of the present application;

[0104] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0105] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values ​​described in these embodiments do not limit the scope of the present application.

[0106] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.

[0107] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.

[0108] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0109] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0110] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0111] The following description of at least one exemplary embodiment is merely illustrative in nature and is not intended to limit the present application, its application, or uses.

[0112] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.

[0113] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0114] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0115] In order to solve the technical problem in the prior art of how to improve the timeliness of loading the current version of page resources and reduce the cost of loading the current version of page resources, the present application provides a page resource loading method, device, electronic device and storage medium, which can improve the timeliness of loading the current version of page resources and reduce the cost of loading the current version of page resources.

[0116] Figure 1 A schematic flow chart of a method for loading page resources provided in an embodiment of the present application. This method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of this method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute this method, or a plurality of electronic devices can cooperate with each other to execute this method. When the above-mentioned execution subject is software, this method can be implemented as multiple software or software modules, or as a single software or software module. It is not specifically limited here.

[0117] like Figure 1 As shown, the method specifically includes:

[0118] Step 101: receiving a loading operation for a page resource in an application page.

[0119] In this embodiment, the application page may be a page of any application running in the execution subject. As an example, the application page may include but is not limited to: a page of office software, a page of a shopping platform, a page of a browser, etc. The application may be a software application or a web application.

[0120] The page resources may be part or all of the application running in the above-mentioned execution subject. In addition, the page resources may be a collection of various elements that constitute the above-mentioned application page and enable it to be displayed and interacted normally. These resources are combined together to provide users with a complete page experience, including visual presentation, functional interaction and other aspects. As an example, the page resources may include at least one of the following: SDK (Software Development Kit), HTML (HyperText Markup Language) file, CSS (Cascading Style Sheets) file, JavaScript (a scripting language) file, font file, etc.

[0121] In one embodiment, when an application page is loaded, related page resources constituting the application page are loaded.

[0122] Step 102, in response to the loading operation, obtaining target resource information, wherein the target resource information is used to load the page resource of the current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource.

[0123] In this embodiment, after receiving the loading operation, the target resource information can be obtained so as to load the page resource of the current version of the application page, and the verification information (e.g., SRI information) of the page resource, which is used to verify the reliability of the page resource. Among them, the reliability is at least used to verify the integrity of the page resource and whether the page resource has been tampered with. In the case where the reliability is used to verify the integrity of the page resource, the verification information may include the SRI information.

[0124] The target resource information may include the URL of the page resource of the current version for loading the application page and the verification information of the page resource. In addition, the target resource information may also include information such as the loading strategy of the page resource. Among them, the page resource of the current version is downloaded through the URL of the page resource. The verification information is used to verify the reliability of the downloaded current version of the page resource.

[0125] In some cases, the execution subject may obtain the target resource information from other electronic devices (eg, a server) rather than locally. In other words, obtaining the target resource information may specifically be obtaining the target resource information remotely.

[0126] Each of the other electronic devices may store one or more page resources of the current version of the application page.

[0127] In addition, the above-mentioned execution subject may obtain target resource information from other electronic devices each time after receiving a loading operation.

[0128] The reliability of page resources may include, for example, the integrity, stability, and source legitimacy of the page resources.

[0129] As an example, at least one of the following methods may be used to verify the stability of the page resource:

[0130] Method 1: determine a set of loading durations of a page resource (for example, the loading duration of the page resource by multiple electronic devices other than the above-mentioned execution subject). Determine whether there are large fluctuations in the loading durations in the loading duration set. If there is a large deviation in the loading duration of a page resource (for example, the deviation is greater than a first preset threshold), it can be determined that there is a problem with the stability of the page resource. In this case, the verification information may include the above-mentioned loading duration set, or may also include a deviation of the loading duration set.

[0131] Method 2: monitor the server's CPU (Central Processing Unit) usage, memory usage, disk I / O (input / out) and other indicators. If the server resources are tight when loading the page resource (for example, at least one of the above indicators is greater than or equal to the second preset threshold), it usually means that the stability of the page resource is insufficient. In this case, the verification information may include the server's usage, memory usage, disk I / O (and other indicators.

[0132] In addition, as an example, the source legitimacy of the page resource can be verified by determining whether the domain name of the page resource belongs to at least one of a preset domain name set (i.e., a domain name whitelist) and a digital signature of the page resource. In this case, the verification information may include the domain name of the page resource.

[0133] For the specific method of verifying the integrity of page resources, please refer to the following description, which will not be repeated here.

[0134] The number of page resources to be loaded by the application page may be one or more.

[0135] It can be seen that in this embodiment, the target resource information is not fixed in the application page, but after responding to the loading operation, the current latest version of the target resource information is obtained from the server, thereby avoiding the need to republish the application page due to the update of the target resource information, and ensuring that the application page can always obtain the latest version of the target resource information.

[0136] Step 103: Load the page resource of the current version of the application page based on the target resource information.

[0137] In this embodiment, after acquiring the target resource information, the execution subject may further load the page resource of the current version of the application page based on the target resource information.

[0138] As an example, see Figure 3A , Figure 3A A schematic diagram of an application scenario of a page resource loading method provided in an embodiment of the present application.

[0139] exist Figure 3A In the application scenario shown, after receiving the loading operation for page resources in the application page (i.e., the front-end page of the access party in the diagram), the following target resource information can be obtained: the latest version link and SRI information of sdk1.js, the latest version link and SRI information of sdk2.js, the latest version link and SRI information of sdk3.js, and the latest version link and SRI information of other.js. Afterwards, based on the target resource information, the following page resources of the current version of the application page can be loaded: sdk1.js, sdk2.js, sdk3.js, and other.js.

[0140] The link may be a uniform resource locator.

[0141] In some optional implementations of this embodiment, the target resource information includes the uniform resource locator (ie, URL) of the page resource and sub-resource integrity information (ie, SRI information).

[0142] On this basis, the following method can be adopted to load the page resource of the current version of the application page based on the target resource information:

[0143] The first step is to download the page resource based on the uniform resource locator of the page resource.

[0144] Here, since the uniform resource locator can be used to locate and obtain various page resources, after obtaining the uniform resource locator of the page resource, the page resource corresponding to the uniform resource locator can be downloaded.

[0145] The second step is to determine whether the page resource passes the resource integrity verification based on the sub-resource integrity information.

[0146] Among them, sub-resource integrity information is a security mechanism used to ensure that page resources (such as JavaScript) have not been tampered with during transmission. Here, verification can be achieved by calculating the hash value of the page resource. If the page resource has been tampered with, the page resource cannot pass the resource integrity verification; if the page resource has not been tampered with, the page resource can pass the resource integrity verification.

[0147] Specifically, after a page resource is created or updated, a hash algorithm may be used to calculate a hash value of the content in the page resource, and the hash value may be used as the sub-resource integrity information. Afterwards, the uniform resource locator of the page resource and the sub-resource integrity information may be stored, for example, the sub-resource integrity information and the uniform resource locator may be associated and stored in a server.

[0148] Afterwards, when loading the above page resources, the following operations can be performed: Download the corresponding page resources according to the uniform resource locator. After the download is completed, the hash value of the content in the downloaded page resource can be calculated using the same hash algorithm as above. And compare the hash value with the acquired sub-resource integrity information. If the two match, it means that the page resource has not been tampered with during the transmission process, which means that the page resource has passed the resource integrity verification and can be loaded and used normally. If the two do not match, it means that the page resource has not passed the resource integrity verification and the page resource is refused to be loaded.

[0149] In the third step, when the page resource passes the resource integrity verification, the page resource indicated by the uniform resource locator is loaded as the page resource of the current version of the application page.

[0150] It is understandable that in the above optional implementation, the page resource indicated by the uniform resource locator can be loaded as the page resource of the current version of the application page only when the page resource passes the resource integrity verification, thereby avoiding the situation where the page resource is still loaded after being tampered with.

[0151] Optionally, in the case where the target resource information further includes a loading strategy for page resources, the page resource of the current version of the application page may be loaded according to the loading strategy.

[0152] In some optional implementations of this embodiment, the page resources to be loaded by the application page include a first page resource of a current version and a second page resource of a current version.

[0153] The first page resource and the second page resource may be two different page resources.

[0154] On this basis, the target resource information can be obtained in the following ways:

[0155] Obtain target resource information for loading the first page resource.

[0156] In addition, the page resource of the current version of the application page may be loaded based on the target resource information in the following manner:

[0157] Based on target resource information for loading the first page resource, the first page resource is loaded.

[0158] Furthermore, target resource information for loading the second page resource may be acquired, and the second page resource may be loaded based on the target resource information for loading the second page resource.

[0159] As an example, see Figure 3B , Figure 3B A flow chart of a method for loading page resources provided in an embodiment of the present application involving multiple page resources.

[0160] like Figure 3B As shown, the page resources to be loaded in the application page include the first page resource sdk3.js of the current version and the second page resource sdk2.js of the current version. In this case, the above-mentioned execution subject can first obtain the url (also the above-mentioned URL) and sri (also the above-mentioned SRI) information of the target resource information sdk3.js for loading the first page resource sdk3.js from the sdk3.js server. Then, the url (also the above-mentioned URL) and sri (also the above-mentioned SRI) information of the target resource information sdk2.js for loading the second page resource sdk2.js are obtained from the sdk2.js server.

[0161] In addition, when the page resources to be loaded by the application page also include the current version of the third page resource sdk1.js, the above-mentioned execution entity can also obtain the url (that is, the above-mentioned URL) and sri (that is, the above-mentioned SRI) information of the target resource information sdk1.js used to load the third page resource sdk1.js from the sdk1.js server.

[0162] It can be understood that in the above optional implementation, when there are multiple page resources to be loaded in the application page, the target resource information for loading each page resource can be obtained respectively, and then the corresponding page resources can be loaded respectively accordingly. Thus, once there is an update of the page resource, the current latest version of the page resource can be loaded in time without waiting for all the page resources of the application page, or even all the page resources of all the pages of the application to be updated and published before loading. In this way, the current latest version of the page resource can be loaded more timely.

[0163] In some optional implementations of this embodiment, the page resources to be loaded by the application page include a first page resource of a current version and a second page resource of a current version.

[0164] The first page resource and the second page resource may be two different page resources.

[0165] On this basis, the target resource information can be obtained in the following ways:

[0166] Through a single request, target resource information for loading the first page resource and target resource information for loading the second page resource are obtained from a preset storage space.

[0167] In other words, the page information of multiple page resources can be obtained from the preset storage space through one request. For example, the target resource information for loading the first page resource and the target resource information for loading the second page resource can be obtained from the preset storage space through one request. Since the preset storage space is used, all page resources of the application page can be obtained through only one request, which avoids multiple requests for page resources and serial requests for page resources that cause the download process to be blocked due to the inability to obtain a certain page resource, thereby ensuring the smoothness of the application page loading page resources and improving the loading speed of page resources.

[0168] The preset storage space may be used to store the target resource information of all page resources. In other words, the target resource information of all page resources may be stored in the same preset storage space. The preset storage space may be a storage space of the server, and the server may also be used to download the page resources to the preset storage space in advance based on the URL in the target resource information.

[0169] Furthermore, the page resource of the current version of the application page can be loaded based on the target resource information in the following manner:

[0170] The first page resource is loaded based on target resource information for loading the first page resource, and the second page resource is loaded based on target resource information for loading the second page resource.

[0171] As an example, see Figure 3C , Figure 3C A schematic diagram of another application scenario of a method for loading page resources provided in an embodiment of the present application. Figure 3C In the above-mentioned execution entity, through a single request, the latest version link and SRI information for loading the page resource sdk1.js, the latest version link and SRI information for loading the page resource sdk2.js, the latest version link and SRI information for loading the page resource sdk3.js, and the latest version link and SRI information for loading the page resource other.js can be obtained from the preset storage space.

[0172] Please continue to see Figure 3F , Figure 3F A schematic diagram of a process of storing and updating target resource information in a preset storage space in a page resource loading method provided in an embodiment of the present application.

[0173] like Figure 3F As shown, after the application front end (that is, the above-mentioned execution entity) passes in the key (that is, resource identifier) ​​list of all js that need to be requested (including the above-mentioned first page resources and second page resources), the application front end can return the js file url and sri information from the JS-SRI configuration platform (that is, the above-mentioned preset storage space), and then load all the page resources represented by each key in the above list, such as the above-mentioned first page resources and the second page resources.

[0174] It can be understood that in the above optional implementation, multiple page resources can be loaded through a single request, thereby reducing the number of interactions with the above preset storage space.

[0175] In some optional implementations of this embodiment, the target resource information may be acquired in the following manner: acquiring the target resource information from a preset storage space.

[0176] The preset storage space may be used to store the target resource information of all page resources. In other words, the target resource information of all page resources may be stored in the same preset storage space.

[0177] On this basis, the preset storage space can store and update the target resource information in the following manner:

[0178] The first step is to determine whether the target resource information stored in the preset storage space is updated.

[0179] In the second step, when the target resource information of the preset storage space is updated, the updated target resource information is stored.

[0180] Here, when there is a new version of the page resource, the target resource information stored in the preset storage space may be updated; when there is no new version of the page resource, the target resource information stored in the preset storage space may not be updated.

[0181] It can be understood that in the above optional implementation, by timely updating and storing the target resource information, the timeliness of loading the latest version of the page resource can be improved. Moreover, the publisher of the page resource (publishing device) only needs to send the latest version of the page resource to the preset storage space, without the publisher of the application page (publishing device) having to republish, load or install the application page.

[0182] In some application scenarios of the above optional implementations, the following method may be used to determine whether the target resource information stored in the preset storage space is updated:

[0183] The first step is to determine whether the target resource information stored in the target storage space is updated.

[0184] In the second step, if the target resource information stored in the target storage space is updated, it is determined that the target resource information stored in the preset storage space is updated; or, if the target resource information stored in the target storage space is not updated, it is determined that the target resource information stored in the preset storage space is not updated.

[0185] As an example, see Figure 3D , Figure 3D Another flowchart diagram of a page resource loading method provided in an embodiment of the present application involving multiple page resources.

[0186] like Figure 3DAs shown, after the SDK (that is, the page resource) publisher publishes a json file containing at least one latest version of the SDK and the SRI information corresponding to the SDK, it can be determined whether the latest version of the SDK is the first release. If it is not the first release, you can further configure whether you need to configure the platform (that is, the preset storage space) to manually release it. If so, manually release it on the platform. In the case of the first release, you can register the SDK key (that is, the resource identifier) ​​on the platform to automatically obtain the latest version switch and other information. Further, you can determine whether to automatically obtain the latest version. In the case of automatically obtaining the latest version, you can obtain the latest version URL and SRI information of the SDK at fixed intervals; in the case of not needing to automatically obtain the latest version, the publisher can manually update the latest version URL and SRI information on the platform after the SDK is released.

[0187] It can be understood that in the above optional implementation, the target resource information stored in the preset storage space can be automatically updated, thereby further improving the timeliness of loading the current latest version of the page resource and reducing the maintenance cost of the page resource.

[0188] Optionally, the target resource information stored in the preset storage space may also be manually updated by the publisher of the page resource.

[0189] Please continue to see Figure 3G , Figure 3G A flowchart of another method for loading page resources provided in an embodiment of the present application.

[0190] like Figure 3G As shown, after the SDK provider releases a new version of the SDK each time, the latest version released each time can be updated to the JS-SRI configuration platform, so that the JS-SRI configuration platform can return the latest URL and SRI to the JS access party. In this way, the JS access party can be seamlessly upgraded without publishing services. Among them, the JS-SRI configuration platform is used to configure the above-mentioned preset storage space.

[0191] In some examples of the above application scenarios, the following method may be used to determine whether the target resource information stored in the target storage space is updated:

[0192] At a preset time interval, it is periodically determined whether the target resource information stored in the target storage space is updated.

[0193] The preset time interval may be a pre-set time interval, for example, 5 minutes, 10 minutes, etc.

[0194] As an example, see Figure 3E , Figure 3EA schematic diagram of a process of storing and updating target resource information in a preset storage space in a page resource loading method provided in an embodiment of the present application.

[0195] like Figure 3E As shown, the JS-SRI configuration platform (i.e., the preset storage space) can execute a scheduled task every X minutes (i.e., the preset time interval) to obtain the list data that the platform configuration needs to automatically publish, and then obtain the latest JS version url and sri of the configuration address. After that, it is determined whether a new version is released. If a new version is released, the latest data of the platform is updated to the latest version.

[0196] Wherein, the above X can be a positive integer.

[0197] It can be understood that in the above example, it is possible to periodically determine whether the target resource information stored in the target storage space is updated according to a preset time interval. This can further improve the timeliness of loading the latest version of the page resource.

[0198] It should be noted that, in the absence of conflict, the technical features recorded in different optional implementations may be included in the same embodiment, and for the sake of brevity, they are not repeated here.

[0199] In the prior art, after developing an application, the URL and SRI information of the page resources of all application pages in the application are usually stored in the source code of the application. Furthermore, the latest URL and SRI information can only be obtained after the application is republished and the application page of the application is reinstalled by the user device. The above SRI information is used to verify the page resources downloaded through the URL.

[0200] The page resource loading method provided in the embodiment of the present application can receive a loading operation for a page resource in an application page, and then, in response to the loading operation, obtain target resource information, wherein the target resource information is used to load the page resource of the current version of the application page, and verification information of the page resource, and the verification information is used to verify the reliability of the page resource, and then, based on the target resource information, the page resource of the current version of the application page is loaded. Thus, after receiving the loading operation, the page resource of the current version of the application page can be loaded without relying on the publishing operation of the maintenance object of the page resource on the current version of the page resource, so that the timeliness of loading the page resource of the current version can be improved and the cost of loading the page resource of the current version can be reduced.

[0201] Figure 2 A flow chart of another method for loading page resources provided in an embodiment of the present application. Figure 2 As shown, the method specifically includes:

[0202] Step 201: receiving a loading operation for a page resource in an application page.

[0203] In this embodiment, step 201 and Figure 1 Step 101 in the corresponding embodiment is basically the same and will not be described again here.

[0204] Step 202: In response to the loading operation, determine the resource identifier of the page resource to be loaded in the application page.

[0205] In this embodiment, the resource identifier can be used to uniquely identify the page resource. The resource identifier can be the key for registering the SDK on the platform.

[0206] Step 203, determine the target storage space, wherein the target storage space is associated with and stores target resource information of the resource identifier and the current version of the page resource, the target resource information is used to load the current version of the page resource of the application page, and verification information of the page resource, the verification information is used to verify the reliability of the page resource.

[0207] In this embodiment, the target resource information of each page resource can be stored in one target storage space. The target resource information of different page resources can be stored in different target storage spaces.

[0208] The target resource information may include the URL of the page resource for loading the current version of the application page and the verification information of the page resource. In addition, the target resource information may also include information such as the loading strategy of the page resource.

[0209] In some cases, the execution entity may obtain the target resource information from other electronic devices (eg, a server) rather than locally.

[0210] Each of the other electronic devices may store one or more page resources of the current version of the application page.

[0211] In addition, the above-mentioned execution subject may obtain target resource information from other electronic devices each time after receiving a loading operation.

[0212] The reliability of page resources may include, for example, the integrity, stability, and source legitimacy of the page resources.

[0213] The number of page resources to be loaded by the application page may be one or more.

[0214] Step 204: Acquire target resource information stored in association with the resource identifier from the target storage space.

[0215] In this embodiment, after determining the target resource information in which the resource identifier and the current version of the page resource are stored in association, the target resource information in which the resource identifier is stored in association may be acquired.

[0216] Step 205: Load the page resource of the current version of the application page based on the target resource information.

[0217] In this embodiment, step 205 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.

[0218] It should be noted that, in addition to the above contents, this embodiment may also include Figure 1 The corresponding technical features described in the corresponding embodiments are realized Figure 1 For more details, please refer to the technical effect of the loading method of the page resources shown. Figure 1 For the sake of brevity, the relevant description is not repeated here.

[0219] The page resource loading method provided in the embodiment of the present application can first determine the resource identifier of the page resource, and then obtain the target resource information stored in association with the resource identifier from the corresponding target storage space, so that the storage location of the target resource information can be determined more accurately.

[0220] The following is an illustrative description of the embodiments of the present application, but it should be noted that the following content is only used to understand the technical solutions of the embodiments of the present application and does not constitute a limitation on the protection scope of the embodiments of the present application.

[0221] Before introducing this solution, we first explain the professional terms involved in the solution as follows:

[0222] SRI is a security feature that allows browsers to check whether page resources they obtain (such as page resources obtained from CDN (Content Delivery Network)) have been tampered with. It determines whether the page resource is reliable by verifying the hash value of the file.

[0223] JS (JavaScript) is a powerful and flexible high-level interpreted programming language.

[0224] In the prior art, the access party page usually hard-codes the URL address and SRI information of the known page resource. After the page resource maintainer releases a new version of the page resource, the access party page needs to update the latest version of the page resource address and SRI information before publishing the service.

[0225] The publishing service refers to the front-end developer publishing the modified code to the production environment after modifying the code. For example, in the prior art, when a webpage updates a text, the front-end needs to modify the code and publish it to the production environment before users can see the modified text.

[0226] In the above existing solutions, when the access party updates the page resources, it needs to modify the code and re-publish the service. The access party cannot get the update information of the page resources in time, resulting in that the functions it uses may not be the latest version, affecting the access party's best experience. Among them, the new version usually involves content updates such as upgrading capabilities, fixing problems, and adding new functions.

[0227] In view of this, this solution can solve the problem that the access party needs to modify the code and republish after the page resources are updated.

[0228] Specifically, the page resource provider may provide an online configuration file with a fixed service address, which contains the URL link address and SRI information of the latest page resource.

[0229] The access page obtains the URL connection address and SRI information of the latest page resource from each page resource provider each time, and then loads the page resource in the page.

[0230] The page resources contain the link to the latest version of the SDK and SRI information. It can be understood that you must first request this page resource to obtain the SDK link and SRI information, and then you can request the specific SDK content, that is, the specific content of the page resource.

[0231] like Figure 3A As shown, in this solution, the fixed configuration server address of the page resource and SRI information is known, and the URL and SRI information of the latest version of the page resource are obtained each time the application page is loaded. This can solve the problem that the access party needs to repair the code and publish it again due to the update of the page resource.

[0232] However, if Figure 3B As shown, the above solution requires multiple requests in the case of multiple page resources. In this regard, based on the above solution, the number of requests for the access party to obtain the configuration file can be reduced.

[0233] Specifically, a new configuration platform can be added, and the page resource publisher fills in the configuration information on the platform and selects the publishing method. Only automatic publishing or manual publishing methods are available.

[0234] Among them, automatic release: the SDK provider fills in an interface on the platform, and then queries this interface regularly to obtain the latest version of the SDK information, and then returns it to the SDK access party. After the SDK provider modifies the content later, it only needs to update the content of the interface it provides, and does not need to come to the configuration platform again to modify the content. The configuration platform can regularly pull the latest content through the interface provided by the SDK provider.

[0235] Manual release: The SDK provider does not fill in the interface on the platform, but directly fills in the latest SDK information, so that this information can be directly returned to the SDK access party. This solution requires the SDK provider to come to the configuration platform to make changes every time there is a change.

[0236] The access party uses the service address provided by the platform, and the parameter is the unique key name of the page resource (that is, the resource identifier mentioned above), and obtains the version URL address and SRI configuration information of all page resources required from the platform interface at one time.

[0237] like Figure 3C As shown, the latest version of the page resource and SRI information are obtained through one request. This can solve the problem that the access party needs to repair the code and publish again due to the update of the page resource. In addition, the problem of multiple requests by the access party can be solved and optimized to only one request configuration. The more page resources are accessed before, the greater the efficiency will be after using this solution.

[0238] In addition, the platform stores a copy of the latest configuration information (that is, the target resource information mentioned above), and visits the server where the page resource is located every few minutes to obtain the latest version of the data for comparison and to determine whether a new version has been released.

[0239] In this way, access parties that do not support JS dynamic update can support automatic update capabilities.

[0240] In the prior art, a non-dynamic update method is usually adopted, that is, each time the SDK provider updates the SDK content, it needs to release a new version and then notify the access party to modify the code and adjust the version of the access SDK.

[0241] This solution adopts dynamic update, that is, after the SDK provider releases a new version, the SDK access party can automatically apply the latest version of the SDK without changing the code and publishing it.

[0242] It should be noted that, in addition to the contents recorded above, this embodiment may also include the technical features described in the above embodiments, so as to achieve the technical effects of the method for loading page resources shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.

[0243] The method for loading page resources provided in the embodiment of the present application allows the front end to obtain the latest version URLs and SRI values ​​of all required JS files (i.e., the above-mentioned page resources) at one time. A configuration platform can be established to support automatic publishing and manual publishing mechanisms for JS providers. It also supports seamless upgrades for JS access parties. The maintenance cost of this solution is low, and no maintenance is required after successful access. All the latest versions of page resources are obtained, and the publishing method is highly flexible, and the resource party can choose automatic publishing or manual publishing mode.

[0244] Figure 4 A schematic diagram of a structure of a page resource loading device provided in an embodiment of the present application. Specifically comprising:

[0245] The receiving unit 401 is used to receive a loading operation for a page resource in an application page;

[0246] An acquisition unit 402 is used to acquire target resource information in response to the loading operation, wherein the target resource information is used to load the page resource of the current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource;

[0247] The loading unit 403 is used to load the page resource of the current version of the application page based on the target resource information.

[0248] In a possible implementation manner, the acquiring target resource information includes:

[0249] Determine the resource identifier of the page resource to be loaded by the application page;

[0250] Determine a target storage space, wherein the target storage space stores the resource identifier and target resource information of the current version of the page resource in an associated manner;

[0251] The target resource information stored in association with the resource identifier is acquired from the target storage space.

[0252] In a possible implementation manner, the page resource to be loaded by the application page includes a first page resource of a current version and a second page resource of a current version; and

[0253] The obtaining of target resource information includes:

[0254] Obtaining target resource information for loading the first page resource;

[0255] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0256] Loading the first page resource based on target resource information for loading the first page resource;

[0257] The obtaining of target resource information further includes:

[0258] Obtaining target resource information for loading the second page resource;

[0259] The step of loading the page resource of the current version of the application page based on the target resource information further includes:

[0260] Based on the target resource information for loading the second page resource, the second page resource is loaded.

[0261] In a possible implementation manner, the page resource to be loaded by the application page includes a first page resource of a current version and a second page resource of a current version; and

[0262] The obtaining of target resource information includes:

[0263] Obtaining, through a single request, target resource information for loading the first page resource and target resource information for loading the second page resource from a preset storage space;

[0264] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0265] Loading the first page resource based on target resource information for loading the first page resource;

[0266] Based on the target resource information for loading the second page resource, the second page resource is loaded.

[0267] In a possible implementation manner, the acquiring target resource information includes:

[0268] Acquire target resource information from a preset storage space; and

[0269] The preset storage space stores and updates target resource information in the following manner:

[0270] Determine whether the target resource information stored in the preset storage space is updated;

[0271] When the target resource information of the preset storage space is updated, the updated target resource information is stored.

[0272] In a possible implementation manner, determining whether the target resource information stored in the preset storage space is updated includes:

[0273] Determine whether there is an update to the target resource information stored in the target storage space;

[0274] In the case that the target resource information stored in the target storage space is updated, determining that the target resource information stored in the preset storage space is updated; or

[0275] In a case where the target resource information stored in the target storage space is not updated, it is determined that the target resource information stored in the preset storage space is not updated.

[0276] In a possible implementation manner, determining whether the target resource information stored in the target storage space is updated includes:

[0277] At a preset time interval, it is periodically determined whether the target resource information stored in the target storage space is updated.

[0278] In a possible implementation, the target resource information includes the uniform resource locator and sub-resource integrity information of the page resource; and

[0279] The step of loading the page resource of the current version of the application page based on the target resource information includes:

[0280] Downloading the page resource based on the uniform resource locator of the page resource;

[0281] Based on the sub-resource integrity information, determining whether the page resource passes the resource integrity verification;

[0282] In a case where the page resource passes the resource integrity verification, the page resource indicated by the uniform resource locator is loaded as the page resource of the current version of the application page.

[0283] The page resource loading device provided in this embodiment can be as follows: Figure 4 The page resource loading device shown in can execute all the steps of the above-mentioned page resource loading methods, thereby achieving the technical effects of the above-mentioned page resource loading methods. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.

[0284] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 5The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505 .

[0285] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0286] It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0287] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .

[0288] Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.

[0289] In this embodiment, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:

[0290] Receive loading operations for page resources in the application page;

[0291] In response to the loading operation, acquiring target resource information, wherein the target resource information is used to load a page resource of a current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource;

[0292] Based on the target resource information, the page resource of the current version of the application page is loaded.

[0293] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

[0294] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.

[0295] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0296] The electronic device provided in this embodiment may be Figure 5 The electronic device shown in can execute all steps of the above-mentioned method for loading each page resource, thereby achieving the technical effect of the above-mentioned method for loading each page resource. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.

[0297] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0298] When one or more programs in the storage medium can be executed by one or more processors, the page resource loading method executed on the electronic device side can be implemented.

[0299] The processor is used to execute the page resource loading program stored in the memory to implement the following steps of the page resource loading method executed on the electronic device side:

[0300] Receive loading operations for page resources in the application page;

[0301] In response to the loading operation, acquiring target resource information, wherein the target resource information is used to load a page resource of a current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource;

[0302] Based on the target resource information, the page resource of the current version of the application page is loaded.

[0303] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0304] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0305] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0306] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A method for loading page resources, characterized in that: The method comprises: Receive loading operations for page resources in the application page; In response to the loading operation, acquiring target resource information, wherein the target resource information is used to load a page resource of a current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource; Based on the target resource information, the page resource of the current version of the application page is loaded.

2. The method according to claim 1, characterized in that The obtaining of target resource information includes: Determine the resource identifier of the page resource to be loaded by the application page; Determine a target storage space, wherein the target storage space stores the resource identifier and target resource information of the current version of the page resource in an associated manner; The target resource information stored in association with the resource identifier is acquired from the target storage space.

3. The method according to claim 1, characterized in that The page resources to be loaded by the application page include a first page resource of the current version and a second page resource of the current version; as well as The obtaining of target resource information includes: Obtaining target resource information for loading the first page resource; The step of loading the page resource of the current version of the application page based on the target resource information includes: Loading the first page resource based on target resource information for loading the first page resource; The obtaining of target resource information further includes: Obtaining target resource information for loading the second page resource; The step of loading the page resource of the current version of the application page based on the target resource information further includes: Based on the target resource information for loading the second page resource, the second page resource is loaded.

4. The method according to claim 1, characterized in that: The page resources to be loaded by the application page include a first page resource of the current version and a second page resource of the current version; as well as The obtaining of target resource information includes: Obtaining, through a single request, target resource information for loading the first page resource and target resource information for loading the second page resource from a preset storage space; The step of loading the page resource of the current version of the application page based on the target resource information includes: Loading the first page resource based on target resource information for loading the first page resource; Based on the target resource information for loading the second page resource, the second page resource is loaded.

5. The method according to claim 1, characterized in that The obtaining of target resource information includes: Acquire target resource information from a preset storage space; and The preset storage space stores and updates target resource information in the following manner: Determine whether the target resource information stored in the preset storage space is updated; When the target resource information of the preset storage space is updated, the updated target resource information is stored.

6. The method according to claim 5, characterized in that The determining whether the target resource information stored in the preset storage space is updated includes: Determine whether there is an update to the target resource information stored in the target storage space; In the case that the target resource information stored in the target storage space is updated, determining that the target resource information stored in the preset storage space is updated; or In a case where the target resource information stored in the target storage space is not updated, it is determined that the target resource information stored in the preset storage space is not updated.

7. The method according to claim 6, characterized in that The step of determining whether the target resource information stored in the target storage space is updated includes: At a preset time interval, it is periodically determined whether the target resource information stored in the target storage space is updated.

8. The method according to any one of claims 1 to 7, characterized in that: The target resource information includes the uniform resource locator of the page resource and the sub-resource integrity information; as well as The step of loading the page resource of the current version of the application page based on the target resource information includes: Downloading the page resource based on the uniform resource locator of the page resource; Based on the sub-resource integrity information, determining whether the page resource passes the resource integrity verification; In a case where the page resource passes the resource integrity verification, the page resource indicated by the uniform resource locator is loaded as the page resource of the current version of the application page.

9. A device for loading page resources, characterized in that: The device comprises: A receiving unit, used to receive a loading operation for a page resource in an application page; an acquisition unit, configured to acquire target resource information in response to the loading operation, wherein the target resource information is used to load a page resource of a current version of the application page, and verification information of the page resource, wherein the verification information is used to verify the reliability of the page resource; A loading unit is used to load the page resource of the current version of the application page based on the target resource information.

10. An electronic device, characterized in that: include: Memory for storing computer programs; The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method for loading the page resource of any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for loading the page resource of any one of claims 1 to 8 is implemented.