A page loading method, device, equipment and computer-readable storage medium

The method addresses the inefficiencies in handling static resource loading failures by automatically determining and updating static resource paths within the method, ensuring efficient and proactive page loading without user or developer intervention.

CN113392349BActive Publication Date: 2025-03-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110655381.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-11
Publication Date
2025-03-18
Estimated Expiration
2041-06-11

AI Technical Summary

Technical Problem

Existing solutions for handling static resource loading failures in mobile web pages are operationally cumbersome and lack proactive capabilities, requiring users to clear client caches or uninstall apps, and developers to manually modify HTML paths, leading to inefficiencies.

Method used

A method that receives access requests, determines if static resources need updating based on page coding information, and generates new static resource paths automatically, allowing for dynamic page loading without user intervention or developer action.

Benefits of technology

Automatically handles static resource updates and loading failures, ensuring page accessibility and reducing operational burdens by generating appropriate resource paths dynamically, thus improving efficiency and responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113392349B_ABST
    Figure CN113392349B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a page loading method, the method comprising: receiving an access request; wherein the access request carries an access identifier; obtaining page encoding information corresponding to the access identifier from a server based on the access request; determining whether to update the static resource path when it is determined based on the page encoding information that the static resource corresponding to the access identifier needs to be reloaded; generating a target static resource path based on the determination result, and generating a target page based on the target static resource path. The embodiment of the present application also discloses a page loading device, an apparatus, and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to data determination technology in the computer field, and in particular to a page loading method, device, equipment and computer-readable storage medium. Background Art

[0002] With the development of Internet technology, mobile websites have gradually become an indispensable part of people's daily lives. When we browse the web in our daily lives, static resource loading failures caused by network fluctuations often occur. After the failure to load JavaScript script resources in some client applications (Application, APP) or browser page views (web views), when the user enters the page again, the failed JavaScript script resources previously cached by the client will be used, resulting in the page still being inaccessible.

[0003] In response to the above problems, the related technologies generally adopt the following two methods to deal with them: Method 1: Users actively clean up the client cache or uninstall the client APP; Method 2: After receiving the notification, the R&D personnel go online to modify the static resource path in the Hypertext Markup Language (HTML), so that the user can re-request the static resource when visiting again. However, the solutions in the related technologies are cumbersome to operate, and require R&D personnel to deal with the problem passively, which is less timely. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present application hope to provide a page loading method, device, equipment and computer-readable storage medium, which solves the defects of the related technology in processing the user's inability to access the page normally, that is, the operation is cumbersome and the processing cannot be actively done online.

[0005] The technical solution of this application is implemented as follows:

[0006] A page loading method, the method comprising:

[0007] Receiving an access request; wherein the access request carries an access identifier;

[0008] Acquiring page encoding information corresponding to the access identifier from a server based on the access request;

[0009] In the case where it is determined based on the page encoding information that the static resource corresponding to the access identifier needs to be reloaded, determining whether to update the static resource path;

[0010] A target static resource path is generated based on the determination result, and a target page is generated based on the target static resource path.

[0011] In the above scheme, when it is determined based on the page coding information that the static resource corresponding to the access identifier needs to be reloaded, before determining whether to update the static resource path, the method further includes:

[0012] Acquire a first parameter corresponding to the access identifier based on the page encoding information, and determine that a parameter value of the first parameter is a first value;

[0013] When the parameter value of the first parameter is the first value, it is determined whether the static resource corresponding to the access identifier needs to be reloaded.

[0014] In the above solution, determining whether to update the static resource path includes:

[0015] Acquire a second parameter corresponding to the access identifier from a memory of the terminal;

[0016] When the parameter value of the second parameter is the first value, determining to update the static resource path;

[0017] When the parameter value of the second parameter is the second value or is empty, it is determined not to update the static resource path.

[0018] In the above solution, the generating of the target static resource path based on the determination result, and the generating of the target page based on the target static resource path, includes:

[0019] If the result indicates that the static resource path is not to be updated, generating a first static resource path;

[0020] Generate the target page based on the first static resource path and display it;

[0021] In the case where the result indicates updating the static resource path, generating a second static resource path; wherein the target static resource path includes the first static resource path and the second static resource path;

[0022] The target page is generated and displayed based on the second static resource path.

[0023] In the above solution, generating and displaying the target page based on the first static resource path includes:

[0024] Setting the parameter value of the second parameter to the first value;

[0025] Acquire the target static resource corresponding to the access identifier based on the first static resource path;

[0026] The target page is generated and displayed based on the acquisition result.

[0027] In the above solution, generating and displaying the target page based on the second static resource path includes:

[0028] Acquire the target static resource corresponding to the access identifier based on the second static resource path;

[0029] The target page is generated and displayed based on the acquisition result.

[0030] In the above solution, generating and displaying the target page based on the acquisition result includes:

[0031] In a case where the acquisition result indicates that the target static resource corresponding to the access identifier is acquired, setting the parameter value of the second parameter to a second value;

[0032] Based on the target static resource, a first target page is generated and displayed.

[0033] In the above scheme, the method further includes:

[0034] If the acquisition result indicates that the target static resource is not acquired, and the parameter value of the first parameter is the second value, generating and displaying a second target page;

[0035] If the acquisition result indicates that the target static resource is not acquired, and the parameter value of the first parameter is the first value, setting the parameter value of the first parameter to the second value;

[0036] The second static resource path is generated, and the target page is generated based on the second static resource path until the first target page or the second target page is displayed.

[0037] In the above solution, the second parameter is stored in the memory of the terminal using local storage technology.

[0038] A page loading device, comprising: a receiving unit, a determining unit and a processing unit, wherein:

[0039] The receiving unit is used to receive an access request; wherein the access request carries an access identifier;

[0040] The processing unit is used to obtain the page coding information corresponding to the access identifier from the server based on the access request;

[0041] The determining unit is used to determine whether to update the static resource path when it is determined based on the page encoding information that the static resource corresponding to the access identifier needs to be reloaded;

[0042] The processing unit is further configured to generate a target static resource path based on the determination result, and generate a target page based on the target static resource path.

[0043] A page loading device, the device comprising: a processor and a memory;

[0044] The processor is used to execute the page loading program stored in the memory to implement the steps of the page loading method described above.

[0045] A computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the page loading method described above.

[0046] After receiving the access request, the page coding information corresponding to the access identifier is obtained from the server based on the access request. When it is determined based on the page coding information that the static resource corresponding to the access identifier needs to be reloaded, it is determined whether to update the static resource path, and the target static resource path is generated based on the determination result, and the target page is generated based on the target static resource path. In this way, during the page access process, when it is determined that the static resource of the access identifier needs to be reloaded, different static resource paths can be automatically generated according to the result of whether the static resource is updated, and then the corresponding target page is generated through different static resource paths. There is no need for the user to clean up the client cache or uninstall the client APP when an access error occurs, and there is no need for R&D personnel to passively modify the static resource path in HTML. The defects of cumbersome operation and inability to actively go online in the solution for handling users' inability to access pages normally in the related technology are solved, and the problem is automatically handled and timeliness is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of a page loading method provided in an embodiment of the present application;

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

[0049] Figure 3 A flowchart of another page loading method provided in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of a flow chart of a page loading method provided for another embodiment of the present application;

[0051] Figure 5 A schematic diagram of the structure of a page loading device provided in an embodiment of the present application;

[0052] Figure 6A schematic diagram of the structure of a page loading device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0054] The embodiment of the present application provides a page loading method, which can be applied to a page loading device, referring to Figure 1 As shown, the method may include the following steps:

[0055] Step 101: Receive an access request, and obtain page coding information corresponding to the access identifier from a server based on the access request.

[0056] The access request carries an access identifier.

[0057] In an embodiment of the present application, an access request may be generated when a user performs an operation on the display interface of a terminal when the user wants to open and access a certain page; the identifier to be accessed may be used to indicate the page that the user needs to access, and may refer to the identification information of the page that the user needs to access; and, the identifier to be accessed may be used to uniquely indicate the page that the user needs to access.

[0058] The page coding information may refer to coding data information used to generate a page that a user needs to access; it should be noted that the page coding information may refer to some code data corresponding to the page that a user needs to access.

[0059] Step 102: When it is determined based on the page coding information that the static resource corresponding to the access identifier needs to be reloaded, determine whether to update the static resource path.

[0060] In an embodiment of the present application, the page loading device first determines whether it is necessary to reload the static resource corresponding to the access identifier based on the page coding information. After determining that the static resource corresponding to the access identifier needs to be reloaded, it can further determine whether to update the static resource path; wherein, the page loading device can determine whether it is necessary to reload the static resource corresponding to the access identifier based on the value of the parameter carried in the code statement of the page that the user needs to access; the page loading device can determine whether to update the static resource path based on the value of the parameter corresponding to the access identifier stored locally in the page loading device. It should be noted that the page loading device can refer to a terminal that has the ability to generate access pages and data processing capabilities.

[0061] Step 103: Generate a target static resource path based on the determination result, and generate a target page based on the target static resource path.

[0062] In an embodiment of the present application, the determination results may include the need to update the static resource path and the need not to update the static resource path; that is, the page loading device can generate different target static resource paths based on different determination results, and then perform different processing based on the different target static resource paths to generate and display different pages corresponding to the pages that the user needs to access.

[0063] The page loading method provided in the embodiment of the present application obtains the page coding information corresponding to the access identifier from the server based on the access request after receiving the access request. When it is determined based on the page coding information that the static resource corresponding to the access identifier needs to be reloaded, it is determined whether to update the static resource path, generate the target static resource path based on the determination result, and generate the target page based on the target static resource path. In this way, when it is determined that the static resource of the access identifier needs to be reloaded during the page access process, different static resource paths can be automatically generated according to the result of whether the static resource is updated, and then the corresponding target page is generated through different static resource paths. There is no need for the user to clean up the client cache or uninstall the client APP when an access error occurs, and there is no need for R&D personnel to passively modify the static resource path in HTML. The defects of the related technology in processing the user's inability to access the page normally, which are cumbersome operation and cannot be actively processed online, are solved, and the problem is automatically processed and timeliness is guaranteed.

[0064] Based on the above embodiments, the embodiments of the present application provide a page loading method, referring to Figure 2 As shown, the method comprises the following steps:

[0065] Step 201: The page loading device receives an access request and obtains page coding information corresponding to the access identifier from a server based on the access request.

[0066] The access request carries an access identifier.

[0067] In an embodiment of the present application, the page coding information may include code statements corresponding to the page that the user needs to access, which are generated using a certain programming language; in a feasible implementation method, the programming language may refer to the HTML language, and the page coding information may include HTML statement information.

[0068] Step 202: The page loading device obtains a first parameter corresponding to the access identifier based on the page coding information, and determines that the parameter value of the first parameter is a first value.

[0069] In an embodiment of the present application, the page loading device can analyze the page coding information and obtain the first parameter corresponding to the access identifier from the page coding information; wherein, when the page coding information is initially generated using a programming language, the first parameter can be directly written into the programming statement, and the initial value of the first parameter is set to the first value; in a feasible implementation method, the first parameter can be written into the HTML code statement corresponding to the access identifier using the HTML language, and the value of the first parameter in the HTML code statement corresponding to the access identifier is the first value; that is, when the user initiates an access request for the first time, the parameter value of the first parameter obtained from the page coding information can only be the first value.

[0070] It should be noted that the first value may refer to true, that is, the initial value of the first parameter may be set to true. In a feasible implementation, the first parameter may refer to a variable reload, and the initial value of the variable reload is true.

[0071] Step 203: When the parameter value of the first parameter is the first value, the page loading device determines that the static resource corresponding to the access identifier needs to be reloaded.

[0072] Among them, when the user initiates an access request for the first time, the value of the variable reload must be true; at this time, the page loading device can determine that the static resources corresponding to the access identifier need to be reloaded; of course, if the value of the variable reload is the second value (ie, false), it means that the static resources corresponding to the access identifier do not need to be reloaded.

[0073] Step 204: When it is determined that the static resource corresponding to the access identifier needs to be reloaded, the page loading device obtains a second parameter corresponding to the access identifier from the memory of the terminal.

[0074] Among them, the second parameter may refer to a variable used to indicate whether to update the static resource path; in a feasible implementation, the second parameter may include isUpdate; and the variable isUpdate may be stored in the local memory of the terminal; it should be noted that the second parameter may be stored in the local memory of the terminal using local storage technology. In a feasible implementation, the local storage technology may refer to localStorage technology. Because localStorage technology can be used to store website data for a long time, and the stored data has no expiration time until it is manually deleted, so it can be ensured that the second parameter stored locally in the terminal will not be lost.

[0075] Of course, the page loading device can determine whether to update the static resource path based on the value of the variable isUpdate obtained from the terminal local memory.

[0076] In the embodiment of the present application, steps 205 to 207 may be performed after step 204, and steps 208 to 210 may also be performed after step 204;

[0077] Step 205: When the parameter value of the second parameter is the first value, the page loading device determines to update the static resource path.

[0078] In the embodiment of the present application, the first value may include true, that is, when it is determined that the value of the variable isUpdate is true, it can be determined that the static resource path needs to be updated.

[0079] Step 206: When the result indicates that the static resource path is updated, the page loading device generates a second static resource path.

[0080] In the embodiment of the present application, the second static resource path may refer to a static resource path with a timestamp; wherein the timestamp may be the time when the user currently generates the access request, and the timestamp may be a millisecond-level number generated according to the current time; because the second static resource path has a timestamp, the static resource path is different at every moment; it should be noted that the timestamp may be appended to the end of the static resource path, and in a feasible implementation, the second static resource path may be: https: / / www.xxxx.com / abc.js?timer=12345.

[0081] At this time, because the value of the variable isUpdate is true, it means that the static resources stored in the cache are incorrect. After generating a second static resource path with a timestamp, the browser application in the terminal will not use the static resources in the original cache, and will re-request the static resources from the network based on the generated second static resource path.

[0082] Step 207: The page loading device generates and displays a target page based on the second static resource path.

[0083] In the embodiment of the present application, the static resource can be obtained through the second static resource path, and different target pages can be generated based on the result of whether the static resource is successfully obtained. If the static resource is successfully obtained, the real first target page that the user wants to access corresponding to the access identifier can be generated at this time; if the static resource is not successfully obtained, a second target page that is not related to the access identifier can be generated at this time.

[0084] Step 208: When the parameter value of the second parameter is the second value or is empty, the page loading device determines not to update the static resource path.

[0085] In the embodiment of the present application, the second value may include false, that is, when the value of the variable isUpdate is determined to be false or undefined, it can be determined not to update the static resource path. Among them, the parameter value of the second parameter being empty may mean that the parameter value of the variable isUpdate is undefined.

[0086] Step 209: When the result indicates that the static resource path is not to be updated, the page loading device generates a first static resource path.

[0087] In an embodiment of the present application, the first static resource path may refer to a static resource path without a timestamp; because the first static resource path has no timestamp, the static resource path is the same at all times. At this time, because the value of the variable isUpdate is false or undefined, it means that the static resources stored in the cache are correct. After the first static resource path without a timestamp is generated, the browser application in the terminal will use the static resources in the original cache, which avoids resource waste and ensures that the user can successfully access the page. In a feasible implementation method, the first static resource path can be url=`https: / / www.xxxx.com / abc.js.

[0088] Step 210: The page loading device generates and displays a target page based on the first static resource path.

[0089] In the embodiment of the present application, a static resource can be obtained through the first static resource path, and different target pages can be generated based on the result of whether the static resource is successfully obtained. If the static resource is successfully obtained, the real first target page that the user wants to access corresponding to the access identifier can be generated at this time; if the static resource is not successfully obtained, a second target page that is not related to the access identifier can be generated at this time.

[0090] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.

[0091] The page loading method provided in the embodiment of the present application can automatically generate different static resource paths according to whether the static resources are updated when it is determined that the static resources of the access identifier need to be reloaded during the page access process, and then generate the corresponding target page through different static resource paths. There is no need for the user to clean up the client cache or uninstall the client APP when an access error occurs, and there is no need for R&D personnel to passively modify the static resource path in HTML. The defects of the related technology in handling the problem of users being unable to access the page normally, which are cumbersome operations and unable to actively go online for processing, are solved, and the problem is automatically processed and timeliness is guaranteed.

[0092] Based on the above embodiments, the embodiments of the present application provide a page loading method, referring to Figure 3 As shown, the method comprises the following steps:

[0093] Step 301: The page loading device receives an access request and obtains page coding information corresponding to the access identifier from a server based on the access request.

[0094] The access request carries an access identifier.

[0095] Step 302: The page loading device obtains a first parameter corresponding to the access identifier based on the page coding information, and determines that the parameter value of the first parameter is a first value.

[0096] Step 303: When the parameter value of the first parameter is the first value, the page loading device determines that the static resource corresponding to the access identifier needs to be reloaded.

[0097] Step 304: When it is determined that the static resource corresponding to the access identifier needs to be reloaded, the page loading device obtains a second parameter corresponding to the access identifier from the memory of the terminal.

[0098] In the embodiment of the present application, after step 304, steps 305 to 307 may be performed, or steps 308 to 311 may be performed;

[0099] Step 305: When the parameter value of the second parameter is the first value, the page loading device determines to update the static resource path.

[0100] Step 306: When the result indicates that the static resource path is updated, the page loading device generates a second static resource path.

[0101] Step 307: The page loading device obtains the target static resource corresponding to the access identifier based on the second static resource path.

[0102] In an embodiment of the present application, after the second static resource path is generated, the second static resource path can be hung in the corresponding HTML, so that the terminal can go to the corresponding location through the second static resource path to request access to the target static resource corresponding to the identifier.

[0103] Step 308: When the parameter value of the second parameter is the second value or is empty, the page loading device determines not to update the static resource path.

[0104] Step 309: When the result indicates that the static resource path is not to be updated, the page loading device generates a first static resource path.

[0105] Step 310: The page loading device sets the parameter value of the second parameter to the first value.

[0106] Among them, after determining to generate the first static resource path without timestamp, in order to avoid individual browser compatibility or individual extreme cases, after the static resource request fails, the corresponding operation event will not be triggered. After the first static resource path without timestamp is generated, it is necessary to set the variable isUpdate to true. If the subsequent static resource request is successful, the variable isUpdate can be set to false. If the subsequent static resource request fails or the JavaScript script is parsed incorrectly, resulting in a white screen on the page, because the variable isUpdate has been set to true before, the next time the user enters the page, a second static resource path with a timestamp will be generated, and the static resource of the server will be requested again.

[0107] Step 311: The page loading device obtains the target static resource corresponding to the access identifier based on the first static resource path.

[0108] In an embodiment of the present application, after the first static resource path is generated, the first static resource path can be hung in the corresponding HTML, so that the terminal can go to the corresponding location through the first static resource path to request access to the target static resource corresponding to the identifier.

[0109] Wherein, step 312 may be executed after step 307 and step 311;

[0110] Step 312: The page loading device generates a target page based on the acquired result and displays it.

[0111] In the embodiment of the present application, different target pages are generated based on different acquisition results.

[0112] Wherein, step 312 can be implemented by the following methods:

[0113] Step 312a: When the acquisition result indicates that the target static resource corresponding to the access identifier is acquired, the page loading device sets the parameter value of the second parameter to the second value.

[0114] Step 312b: The page loading device generates and displays a first target page based on the target static resource.

[0115] In an embodiment of the present application, if the target static resource corresponding to the access identifier is obtained, that is, the static resource request is successful, the page is rendered normally, that is, the first target page can be generated and presented based on the target static resource, and the parameter value of the variable isUpdate is set to false.

[0116] It should be noted that because the parameter value of the variable isUpdate is set to false after the first target page is rendered normally, it can be ensured that the variable isUpdate=false the next time the user enters the page, and the first static resource path without timestamp will still be accessed. Since the path has not changed, the terminal cache will be used, reducing network access and server pressure.

[0117] Step 312c: when the acquisition result indicates that the target static resource is not acquired and the parameter value of the first parameter is the second value, the page loading device generates and displays a second target page.

[0118] In an embodiment of the present application, if the target static resource fails to load due to various reasons, the script.onerror event will be triggered, that is, the second target page will be directly generated and displayed; even if the script.onerror event is not triggered, since the variable isUpdate has been set to true before, the second static resource path with a timestamp will be generated the next time the page is entered, such as: var url = `https: / / www.xxxx.com / abc.js? currTime = `+newDate().getTime(). Among them, if the script.onerror event is triggered due to the failure to load the target static resource, the value of the variable reload will be judged at this time. If the value of the variable reload is false, the second target page will be directly generated and displayed. It should be noted that the second target page can be a page that is not related to the access identifier, that is, it is not the page that the user really wants to access; in a feasible implementation method, the second target page can be a fallback page, that is, it can include a small game interface or an interface that prompts access abnormalities.

[0119] Step 312d: When the acquisition result indicates that the target static resource is not acquired and the parameter value of the first parameter is the first value, the page loading device sets the parameter value of the first parameter to the second value.

[0120] Step 312e: The page loading device generates a second static resource path, and generates a target page based on the second static resource path until the first target page or the second target page is displayed.

[0121] In an embodiment of the present application, if the value of the variable reload is true, the second static resource path with a timestamp will be re-requested, and reload will be changed to false, that is, in the case of a failure in requesting the target static resource, the second static resource path with a timestamp will be re-requested. Of course, after generating the second static resource path with a timestamp, the step of generating and displaying the target page based on the second static resource path can be performed again; that is, the target static resource corresponding to the access identifier can be obtained based on the second static resource path, and the first target page or the second target page can be generated and displayed based on the acquisition result. If the automatic request for the target static resource again still fails, since the value of the variable reload is already false at this time, the fallback page will be displayed, which not only limits the number of re-requests, but also ensures that the target static resource requested again is the second static resource path with a timestamp.

[0122] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.

[0123] The page loading method provided in the embodiment of the present application can automatically generate different static resource paths according to whether the static resources are updated when it is determined that the static resources of the access identifier need to be reloaded during the page access process, and then generate the corresponding target page through different static resource paths. There is no need for the user to clean up the client cache or uninstall the client APP when an access error occurs, and there is no need for R&D personnel to passively modify the static resource path in HTML. The defects of the related technology in handling the problem of users being unable to access the page normally, which are cumbersome operations and unable to actively go online for processing, are solved, and the problem is automatically processed and timeliness is guaranteed.

[0124] In other embodiments of the present application, the page encoding information is HTML, the first parameter is the variable reload, the second parameter is the variable isUpdate, the first value is true, the second value is false, the first target page refers to the normal display page, and the second target page is the fallback page. For example, Figure 4As shown, after the user requests a page, the server returns HTML and determines that the value of the variable reload is true, and then queries the value of the variable isUpdate. If the value of isUpdate is false or undefined, a first static resource path without a timestamp is generated, and the value of the variable isUpdate is set to true; if the value of the variable isUpdate is true, a second static resource path with a timestamp is generated; then, the static resources corresponding to the generated first static resource path / second static resource path need to be requested; if the request is successful, the value of the variable isUpdate is set to false, and the page is displayed normally; if the request fails, the value of the variable reload is judged; if the value of the variable reload is false, jump to the fallback page, if the value of the variable reload is true, set the value of the variable reload to false, and return to execute the steps again to generate a second static resource path with a timestamp until the page is displayed.

[0125] Based on the above embodiments, the embodiments of the present application provide a page loading device, referring to Figure 5 As shown, the device 4 includes: a receiving unit 41, a determining unit 42 and a processing unit 43, wherein:

[0126] The receiving unit 41 is used to receive an access request and obtain page coding information corresponding to the access identifier from the server based on the access request; wherein the access request carries the access identifier;

[0127] A determination unit 42, configured to determine whether to update the static resource path when it is determined based on the page coding information that the static resource corresponding to the access identifier needs to be reloaded;

[0128] The processing unit 43 is used to generate a target static resource path based on the determination result, and generate a target page based on the target static resource path.

[0129] In other embodiments of the present application, refer to Figure 5 As shown, the device further includes: an acquisition unit 44, wherein:

[0130] The acquisition unit 44 is configured to acquire a first parameter corresponding to the access identifier based on the page coding information, and determine that a parameter value of the first parameter is a first value.

[0131] The determining unit 42 is further configured to determine that the static resource corresponding to the access identifier needs to be reloaded when the parameter value of the first parameter is the first value.

[0132] In other embodiments of the present application, the determining unit 42 is further configured to implement the following steps:

[0133] Acquire a second parameter corresponding to the access identifier from a memory of the terminal;

[0134] When the parameter value of the second parameter is the first value, determining to update the static resource path;

[0135] When the parameter value of the second parameter is the second value or is empty, it is determined not to update the static resource path.

[0136] In other embodiments of the present application, the processing unit 43 is further configured to implement the following steps:

[0137] If the result indicates that the static resource path is not to be updated, generating a first static resource path;

[0138] Generate a target page based on the first static resource path and display it;

[0139] If the result indicates that the static resource path is updated, generating a second static resource path; wherein the target static resource path includes the first static resource path and the second static resource path;

[0140] Generate and display the target page based on the second static resource path.

[0141] In other embodiments of the present application, the processing unit 43 is further configured to implement the following steps:

[0142] Set the parameter value of the second parameter to the first value;

[0143] Acquire a target static resource corresponding to the access identifier based on the first static resource path;

[0144] Generate the target page based on the acquisition results and display it.

[0145] In other embodiments of the present application, the processing unit 43 is further configured to implement the following steps:

[0146] Acquire a target static resource corresponding to the access identifier based on the second static resource path;

[0147] Generate the target page based on the acquisition results and display it.

[0148] In other embodiments of the present application, the processing unit 43 is further configured to implement the following steps:

[0149] When the acquisition result indicates that the target static resource corresponding to the access identifier is acquired, setting the parameter value of the second parameter to the second value;

[0150] Based on the target static resource, a first target page is generated and displayed.

[0151] In other embodiments of the present application, the processing unit 43 is further configured to implement the following steps:

[0152] If the acquisition result indicates that the target static resource has not been acquired, and the parameter value of the first parameter is the second value, generating and displaying a second target page;

[0153] When the acquisition result indicates that the target static resource is not acquired and the parameter value of the first parameter is the first value, setting the parameter value of the first parameter to the second value;

[0154] A second static resource path is generated, and a target page is generated based on the second static resource path until the first target page or the second target page is displayed.

[0155] In other embodiments of the present application, the second parameter is stored in the memory of the terminal using local storage technology.

[0156] It should be noted that the specific implementation process of the steps performed by each unit in this embodiment can be referred to Figures 1 to 3 The implementation process of the page loading method provided in the corresponding embodiment will not be repeated here.

[0157] The page loading device provided in the embodiment of the present application can automatically generate different static resource paths according to whether the static resources are updated when it is determined that the static resources identified by the access need to be reloaded during the page access process, and then generate the corresponding target page through different static resource paths. There is no need for the user to clean up the client cache or uninstall the client APP when an access error occurs, and there is no need for R&D personnel to passively modify the static resource path in HTML. The defects of the related technology in handling the problem of users being unable to access the page normally, which is cumbersome to operate and unable to actively go online for processing, are solved, and the problem is automatically processed and timeliness is guaranteed.

[0158] Based on the above embodiments, the embodiments of the present application provide a page loading device, which can be applied to Figures 1 to 3 In the page loading method provided in the corresponding embodiment, refer to Figure 6 As shown, the device may include: a processor 51 and a memory 52, wherein:

[0159] The processor 51 is used to execute the page loading program stored in the memory 52 to implement the following steps:

[0160] receiving an access request, and obtaining page encoding information corresponding to the access identifier from a server based on the access request; wherein the access request carries the access identifier;

[0161] In the case where it is determined based on the page encoding information that the static resource corresponding to the access identifier needs to be reloaded, determining whether to update the static resource path;

[0162] A target static resource path is generated based on the determination result, and a target page is generated based on the target static resource path.

[0163] In other embodiments of the present application, the processor 51 is used to execute the page loading program stored in the memory 52 to implement the following steps:

[0164] Acquire a first parameter corresponding to the access identifier based on the page encoding information, and determine that a parameter value of the first parameter is a first value;

[0165] When the parameter value of the first parameter is the first value, it is determined that the static resource corresponding to the access identifier needs to be reloaded.

[0166] In other embodiments of the present application, the processor 51 is used to execute the determination of whether to update the static resource path stored in the memory 52 to implement the following steps:

[0167] Acquire a second parameter corresponding to the access identifier from a memory of the terminal;

[0168] When the parameter value of the second parameter is the first value, determining to update the static resource path;

[0169] When the parameter value of the second parameter is the second value or is empty, it is determined not to update the static resource path.

[0170] In other embodiments of the present application, the processor 51 is used to execute the steps stored in the memory 52 to generate a target static resource path based on the determination result, and to generate a target page based on the target static resource path, and may also implement the following steps:

[0171] If the result indicates that the static resource path is not to be updated, generating a first static resource path;

[0172] Generate a target page based on the first static resource path and display it;

[0173] If the result indicates that the static resource path is updated, generating a second static resource path; wherein the target static resource path includes the first static resource path and the second static resource path;

[0174] Generate and display the target page based on the second static resource path.

[0175] In other embodiments of the present application, the processor 51 is used to execute the target page generated based on the first static resource path and displayed stored in the memory 52 to implement the following steps:

[0176] Set the parameter value of the second parameter to the first value;

[0177] Acquire a target static resource corresponding to the access identifier based on the first static resource path;

[0178] Generate the target page based on the acquisition results and display it.

[0179] In other embodiments of the present application, the processor 51 is used to execute the target page generated based on the second static resource path stored in the memory 52 and display it, so as to implement the following steps:

[0180] Acquire a target static resource corresponding to the access identifier based on the second static resource path;

[0181] Generate the target page based on the acquisition results and display it.

[0182] In other embodiments of the present application, the processor 51 is used to execute the target page generated and displayed based on the acquisition result stored in the memory 52 to implement the following steps:

[0183] When the acquisition result indicates that the target static resource corresponding to the access identifier is acquired, setting the parameter value of the second parameter to the second value;

[0184] Based on the target static resource, a first target page is generated and displayed.

[0185] In other embodiments of the present application, the processor 51 is used to execute the page loading program stored in the memory 52 to implement the following steps:

[0186] If the acquisition result indicates that the target static resource has not been acquired, and the parameter value of the first parameter is the second value, generating and displaying a second target page;

[0187] When the acquisition result indicates that the target static resource is not acquired and the parameter value of the first parameter is the first value, setting the parameter value of the first parameter to the second value;

[0188] A second static resource path is generated, and a target page is generated based on the second static resource path until the first target page or the second target page is displayed.

[0189] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can refer to Figures 1 to 3 The implementation process of the page loading method provided in the corresponding embodiment will not be repeated here.

[0190] The page loading device provided in the embodiment of the present application can automatically generate different static resource paths according to whether the static resources are updated when it is determined that the static resources identified by the access need to be reloaded during the page access process, and then generate the corresponding target page through different static resource paths. There is no need for the user to clean up the client cache or uninstall the client APP when an access error occurs, and there is no need for R&D personnel to passively modify the static resource path in HTML. The defects of the related technology in handling the problem of users being unable to access the page normally, which are cumbersome operations and unable to be actively processed online, are solved, and the problem is automatically processed and timeliness is guaranteed.

[0191] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following Figures 1 to 3 The corresponding embodiment provides steps of the page loading method.

[0192] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0193] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0194] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0195] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0196] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0197] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0198] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A page loading method, characterized in that: The method comprises: Receiving an access request; wherein the access request carries an access identifier; Acquiring page encoding information corresponding to the access identifier from a server based on the access request; In the case where it is determined based on the page encoding information that the static resource corresponding to the access identifier needs to be reloaded, determining whether to update the static resource path; Generate a target static resource path based on the determination result, and generate a target page based on the target static resource path; Wherein, in the case where it is determined based on the page coding information that the static resource corresponding to the access identifier needs to be reloaded, before determining whether to update the static resource path, the method further includes: Acquire a first parameter corresponding to the access identifier based on the page encoding information, and determine that a parameter value of the first parameter is a first value; When the parameter value of the first parameter is the first value, determining that the static resource corresponding to the access identifier needs to be reloaded; The step of determining whether to update the static resource path includes: Acquire a second parameter corresponding to the access identifier from a memory of the terminal; When the parameter value of the second parameter is the first value, it is determined to update the static resource path.

2. The method according to claim 1, characterized in that The determining whether to update the static resource path also includes: When the parameter value of the second parameter is the second value or is empty, it is determined not to update the static resource path.

3. The method according to claim 1, characterized in that The step of generating a target static resource path based on the determination result, and generating a target page based on the target static resource path, includes: If the result indicates that the static resource path is not to be updated, generating a first static resource path; Generate the target page based on the first static resource path and display it; In the case where the result indicates updating the static resource path, generating a second static resource path; wherein the target static resource path includes the first static resource path and the second static resource path; The target page is generated and displayed based on the second static resource path.

4. The method according to claim 3, characterized in that The step of generating and displaying the target page based on the first static resource path includes: Set the parameter value of the second parameter to the first value; Acquire the target static resource corresponding to the access identifier based on the first static resource path; The target page is generated and displayed based on the acquisition result.

5. The method according to claim 3, characterized in that: The step of generating and displaying the target page based on the second static resource path includes: Acquire the target static resource corresponding to the access identifier based on the second static resource path; The target page is generated and displayed based on the acquisition result.

6. The method according to claim 4 or 5, characterized in that: The step of generating and displaying the target page based on the acquisition result includes: In a case where the acquisition result indicates that the target static resource corresponding to the access identifier is acquired, setting the parameter value of the second parameter to a second value; Based on the target static resource, a first target page is generated and displayed.

7. The method according to claim 6, characterized in that The method further comprises: If the acquisition result indicates that the target static resource is not acquired, and the parameter value of the first parameter is the second value, generating and displaying a second target page; If the acquisition result indicates that the target static resource is not acquired, and the parameter value of the first parameter is the first value, setting the parameter value of the first parameter to the second value; The second static resource path is generated, and the target page is generated based on the second static resource path until the first target page or the second target page is displayed.

8. The method according to claim 1 or 3, characterized in that: The second parameter is stored in the memory of the terminal using a local storage technology.

9. A page loading device, characterized in that: The device comprises: a receiving unit, a determining unit and a processing unit, wherein: The receiving unit is used to receive an access request; wherein the access request carries an access identifier; The processing unit is used to obtain the page coding information corresponding to the access identifier from the server based on the access request; The determining unit is used to determine whether to update the static resource path when it is determined based on the page encoding information that the static resource corresponding to the access identifier needs to be reloaded; The processing unit is further used to generate a target static resource path based on the determination result, and generate a target page based on the target static resource path; Wherein, in the case where it is determined based on the page coding information that the static resource corresponding to the access identifier needs to be reloaded, before determining whether to update the static resource path, the method further includes: Acquire a first parameter corresponding to the access identifier based on the page encoding information, and determine that a parameter value of the first parameter is a first value; When the parameter value of the first parameter is the first value, determining that the static resource corresponding to the access identifier needs to be reloaded; The step of determining whether to update the static resource path includes: Acquire a second parameter corresponding to the access identifier from a memory of the terminal; When the parameter value of the second parameter is the first value, it is determined to update the static resource path.

10. A page loading device, characterized in that: The device comprises: a processor and a memory; The processor is used to execute the page loading program stored in the memory to implement the steps of the page loading method described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the page loading method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Website access method, apparatus, and website system

    CA2954294A1

  • Method and device for webpage load

    CN103455547A