Webpage resource preloading method and system based on multi-factor dynamic evaluation
By monitoring network quality and user behavior in real time and adjusting resource loading strategies dynamically, the efficiency and experience problems of front-end resource optimization solutions under the complexity of dynamic network and user behavior are solved, and intelligent and efficient resource loading is achieved.
Patent Information
- Application Number
- CN202510990169.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-08-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When faced with the dynamic network environment and the complexity of user behavior, existing front-end resource optimization solutions cannot effectively improve page loading speed and user experience, and there are problems of waste of resources and improper loading.
By monitoring network quality scores and user interaction behavior in real time, dynamically adjusting the loading priority and strategy of web page resources, combining network quality assessment and user behavior prediction, multi-factor scoring method is used to optimize resource loading.
Significantly improve page loading speed and overall performance, optimize user experience, save network bandwidth, adapt to changes in the network environment, accurately meet user needs, and realize intelligent and efficient resource loading.
Smart Images

Figure CN120508722A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of front-end performance optimization, and in particular to a web page resource preloading method and system based on multi-factor dynamic evaluation. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] Current front-end resource optimization solutions typically use the following strategies: static priority sorting, preloading key resources by setting tags or framework-built-in resource loading strategies; basic optimization based on network type, such as detecting whether it is Wi-Fi or 4G and setting different loading thresholds; user behavior prediction, such as predicting the page the user is likely to enter through click / scroll events.
[0004] However, the aforementioned resource optimization solutions all have their limitations: static priority sorting relies on developers to preset resource priorities, lacks a mechanism for dynamic adjustment based on real-time network quality, and cannot adapt to dynamic network environments (network fluctuations caused by switching between 4G / 5G / Wi-Fi); basic optimization solutions based on network type lead to ineffective bandwidth consumption. For example, blindly preloading non-critical resources such as videos and large images wastes bandwidth, and advertising media still loads in full even in weak network environments; solutions based on user behavior prediction fail to consider interactive intent such as scrolling depth, resulting in the problem of premature loading of resources outside the first screen, which consumes critical bandwidth. Summary of the Invention
[0005] In order to solve the problem of unstable client network in the existing technology, the present invention provides a web resource preloading method and system based on multi-factor dynamic evaluation. By real-time monitoring of network quality scores and user interaction behaviors, the loading priority and strategy of key resources are dynamically adjusted, and network quality evaluation is combined with user behavior prediction. It breaks through the limitations of traditional static resource loading strategies, significantly improves page loading speed and overall performance, optimizes user experience, saves network bandwidth, and can adapt to changes in the network environment.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a web page resource preloading method based on multi-factor dynamic evaluation.
[0007] A webpage resource preloading method based on multi-factor dynamic evaluation includes the following steps: Obtain a network quality score based on the bandwidth factor, network delay factor, and resource stability factor of the current web page; Dynamically adjust the behavior weight score of each web resource based on user behavior; Determine the corresponding loading priority weight score according to the type of different web page resources; A final loading score is obtained by weighting the network quality score, the behavior weight score, and the loading priority weight score, and corresponding web page resources are loaded according to the final loading score.
[0008] In an implementation manner of the first aspect of the present invention, the network quality score is a weighted sum of the bandwidth factor, the network delay factor, and the resource stability factor.
[0009] In an implementation of the first aspect of the present invention, the user behavior includes: user click path, scroll depth and dwell time; A pre-trained machine learning algorithm is used to predict the user's next action based on the user behavior, and the behavior weight score of each web page resource is dynamically adjusted based on the predicted user's next action.
[0010] In an implementation of the first aspect of the present invention, determining corresponding loading priority weight scores according to different types of web page resources includes: The core layer is loaded first and is given the highest loading priority weight score; The middle layer is loaded after the core layer and is given a lower loading priority weight score than the core layer; Low-priority tiers are loaded last and are given a lower loading priority weight score than middle tiers.
[0011] In an implementation of the first aspect of the present invention, loading the corresponding webpage resource according to the final loading score includes: When the final loading score is greater than the first set threshold, synchronous preloading is performed according to the highest priority; When the final loading score is less than or equal to the first set threshold and greater than the second set threshold, asynchronous preloading is performed and an execution delay is set; When the final loading score is less than or equal to the second set threshold and greater than the third set threshold, loading is delayed until the idle period; When the final loading score is less than or equal to the third set threshold, preloading is prohibited.
[0012] In one implementation of the first aspect of the present invention, when a webpage resource is loaded, if the resource is a video resource, preloading is prohibited, and upon receiving a click instruction or a play instruction from a user, hierarchical loading is performed based on a network quality score, including: When the network quality score is greater than or equal to the first video threshold, load 720p and pre-buffer for 10 seconds; when the network quality score is less than the first video threshold and greater than or equal to the second video threshold, load 480p and buffer after receiving the click instruction; when the network quality score is less than the second video threshold, only load the cover and use text instead.
[0013] In an implementation of the first aspect of the present invention, when loading a webpage resource, if the resource is an image resource, hierarchical preloading is performed based on the network quality score, including: When the network quality score is greater than or equal to the first image threshold, the AVIF high-definition version is preloaded; when the network quality score is less than the first image threshold and greater than the second image threshold, the WebP standard format is preloaded; when the network quality score is less than or equal to the second image threshold, the JPEG low-definition version is preloaded; After preloading is complete, images outside the viewport are delayed in loading, and when the image scrolls into the visible area, the high-definition version of the image is progressively loaded.
[0014] In a second aspect, the present invention provides a web resource preloading system based on multi-factor dynamic evaluation.
[0015] A web resource preloading system based on multi-factor dynamic evaluation, comprising: The network quality scoring unit is configured to obtain a network quality score based on the obtained bandwidth factor, network delay factor, and resource stability factor of the current webpage; The behavior weight scoring unit is configured to dynamically adjust the behavior weight score of each web page resource according to user behavior; The loading priority weight scoring unit is configured to: determine corresponding loading priority weight scores according to the types of different web page resources; The webpage resource loading unit is configured to: load the corresponding webpage resource according to a final loading score obtained by weighting the network quality score, the behavior weight score and the loading priority weight score.
[0016] In a third aspect, the present invention provides a computer device comprising: a processor and a computer-readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method for preloading web resources based on multi-factor dynamic evaluation as described in the first aspect of the present invention is implemented.
[0017] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the web page resource preloading method based on multi-factor dynamic evaluation as described in the first aspect of the present invention.
[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention innovatively proposes a web resource preloading method based on multi-factor dynamic evaluation. By real-time monitoring of network quality scores and user interaction behaviors, the loading priority and strategy of key resources are dynamically adjusted. Network quality evaluation, loading priority and user behavior prediction are combined. The final loading score is obtained by weighting the network quality score, behavior weight score and loading priority weight score. The corresponding web resource is loaded according to the final loading score. This breaks through the limitations of traditional static resource loading strategies, significantly improves page loading speed and overall performance, optimizes user experience, saves network bandwidth, and can adapt to changes in the network environment.
[0019] 2. The present invention innovatively proposes a web resource preloading method based on multi-factor dynamic evaluation. The network quality score is the weighted sum of the bandwidth factor, the network delay factor and the resource stability factor. Bandwidth determines the data transmission speed, delay affects the response time, and stability is related to the connection reliability. The combination of the three makes the network quality assessment more complete. This score is used as an important basis to calculate the final loading score together with the behavior weight score and the loading priority weight score, which can achieve a more intelligent and flexible resource loading strategy.
[0020] 3. The invention innovatively proposes a web resource preloading method based on multi-factor dynamic evaluation. By considering user behaviors such as click paths, scrolling depth, and dwell time, it can more accurately grasp user interests and needs. Based on the predicted results, the behavioral weight score of each web resource is dynamically adjusted, realizing intelligent resource loading. For resources that users may soon access, their weight is increased to ensure priority loading, reducing user waiting time; for resources that users are less concerned about, their weight is reduced to avoid unnecessary resource usage. This not only optimizes resource allocation and improves web page loading efficiency, but also significantly enhances the user experience, allowing users to obtain the required content faster, making web page interactions smoother and more intelligent, and better meeting users' personalized needs.
[0021] 4. The invention innovatively proposes a web resource preloading method based on multi-factor dynamic evaluation. By determining the loading priority weight score according to the web resource type and clarifying the loading order and weight of the core layer, middle layer, and low-priority layer, the orderly loading of resources is achieved. The core layer is loaded first and has the highest weight, ensuring the rapid presentation of basic functions and key content of the web page, allowing users to obtain core information as soon as possible and improving the initial experience. The middle layer is loaded after the core layer, and on the basis of ensuring the core functions, the web page content is gradually enriched. The low-priority layer is loaded last to avoid it occupying too many initial resources. This layered loading strategy, combined with the network quality score and the user behavior weight score, can flexibly adjust resource loading according to actual conditions, fully utilizing network resources while meeting user needs, effectively improving web page loading efficiency and user experience, and making web page presentation smoother and more reasonable.
[0022] 5. The invention innovatively proposes a web resource preloading method based on multi-factor dynamic evaluation. By dividing different loading strategies according to the final loading score, it realizes the refined management of resource loading. When the score is high, the highest priority synchronous preloading ensures that key resources are quickly in place and improves the user's initial experience. When the score is in the medium range, asynchronous preloading is combined with execution delay to avoid instantaneous resource grabbing and prepare resources at the right time. When the score is low, loading is delayed until the idle period to make full use of the idle time of the network and device and reduce interference with user operations. Preloading is prohibited when resource conditions are extremely poor to avoid invalid loading and consumption of resources. This hierarchical strategy combines multi-factor scores such as network, user behavior and resource type, can flexibly adapt to various scenarios, effectively balance resource utilization and user experience, and make web page loading more intelligent and efficient.
[0023] 6. The invention innovatively proposes a web resource preloading method based on multi-factor dynamic evaluation. Disabling video preloading can avoid unnecessary resource usage, especially when network resources are tight or users have not clearly defined their needs, saving bandwidth and device processing power. Tiered loading is performed according to network quality scores, which is extremely flexible. When the network is good, 720p is loaded and pre-buffered, which can provide a high-definition and smooth viewing experience. Pre-buffering also reduces playback stuttering. When the network is average, 480p is loaded and buffered after clicking, which reduces the initial loading pressure while ensuring a certain image quality. When the network is poor, only the cover and text replacement are loaded, which can quickly present content while avoiding loading failures or long waits. This strategy combines dynamic adjustments with network conditions, balances resource consumption and user experience, makes video loading more intelligent and efficient, and adapts to user needs in different network environments.
[0024] 7. The invention innovatively proposes a web resource preloading method based on multi-factor dynamic evaluation, performing hierarchical preloading according to the network quality score, achieving a precise match between resources and network conditions. When the network is good, the AVIF high-definition version is preloaded to present high-quality images to users and enhance the visual experience; when the network is average, the WebP standard format is loaded to strike a balance between image quality and resource consumption; when the network is poor, the JPEG low-definition version is selected to ensure that the image can load quickly and avoid long waits; after preloading is completed, the loading of images outside the viewport is delayed, and the high-definition version is progressively loaded when scrolling into the visible area, further optimizing resource utilization, ensuring smooth browsing for users, and reducing unnecessary resource usage. This strategy combines multiple factors such as the network and potential user needs to make image loading more intelligent and efficient, effectively improving web page loading performance and user experience.
[0025] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0027] Figure 1 A priority decision diagram provided for an exemplary embodiment of the present invention; Figure 2 A schematic diagram of hierarchical loading of images provided by an exemplary embodiment of the present invention; Figure 3 A schematic diagram of the overall process of a webpage resource preloading method based on multi-factor dynamic evaluation provided by an exemplary embodiment of the present invention; Figure 4 A schematic diagram of a web resource preloading system based on multi-factor dynamic evaluation provided by an exemplary embodiment of the present invention; Figure 5 A schematic diagram of a computer device is provided for an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0028] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0029] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0030] This implementation method proposes a web resource preloading method based on multi-factor dynamic evaluation, which for the first time uses a lightweight solution to achieve three-dimensional real-time dynamic collaborative decision-making of network score-behavior weight-resource type, and achieves a major breakthrough in loading speed and bandwidth consumption in the weak network environment of the client. Specifically, it includes the following processes: S101: Calculate the network quality score.
[0031] The network score includes index factors such as bandwidth, latency, and resource loading stability. Among them, the resource stability factor is calculated from index indicators such as the success rate of resource loading, average loading time, maximum loading time, and number of failures, and each index factor is normalized. The specific calculation method of the network quality score is as follows: Network quality score = 0.55 Bandwidth factor + 0.3 Network latency factor + 0.15 Resource stability factor; It should be noted that 0.55, 0.3, and 0.15 here are the corresponding custom weight coefficients, and those skilled in the art can adjust them according to specific usage situations or select other values, which will not be elaborated here.
[0032] S102: Predict user behavior.
[0033] By recording the user's click path, scroll depth, stay duration, etc., a user behavior prediction model is constructed through machine learning algorithms (such as random forest, deep learning model) to predict the user's next operation, and the behavior weights of each resource are dynamically adjusted. <00001When the user clicks the button, the page will jump to Page B. After the jump, the resources to be loaded on Page A do not need to be loaded anymore (because these resources are not needed after the jump). Therefore, first clear the resource list (i.e., resourceList = []), and then add the resources of Page B. Specifically, it includes: { name:'resource 5', address: 'xxx', U: 1}, the weight of the first-screen resources (the resources immediately displayed after the jump) is 1 because they will surely be displayed; { name:'resource 6', address: 'xxx', U: 1}, the resources that must be loaded; { name:'resource x', address: 'xxx', U: 0.8}, the resources that are not the first-screen but will be displayed after the page scrolls. The farther away from the first screen, the smaller the weight.
[0036] The hover event is similar. When hovering on a resource (such as hovering on the jump button), add that resource and assign a weight. The hover weight is lower than the click weight (hovering may cause a jump, while clicking will surely cause a jump). The longer the hover time, the higher the weight.
[0037] S103: Build a resource type classifier.
[0038] Establish a three-layer resource type priority model, determine the loading priority according to the resource type, and at the same time introduce a resource type conflict resolution mechanism. When multiple types of resources compete for bandwidth, use a weighted priority algorithm (dynamic scoring calculation) to dynamically adjust in combination with the network quality score (N) and the user behavior weight (U).
[0039] As Figure 1 shown, it is the priority decision tree. The three-layer priority model (weight coefficients) is as follows: The core layer (the loading priority weight score is 0.7 - 1.0). The target resources in the core layer directly affect the first-screen rendering speed (LCP) and the time to interactive (TTI), and need to be loaded first. The core layer resources include the following: The HTML main document - the basic skeleton of the page; The critical CSS - the styles required for the first-screen rendering; The critical JS - the script for rendering the first-screen content or handling core interactions; The first-screen images - the images corresponding to the LCP elements; The critical fonts - the custom fonts used for the first-screen text; The first-screen API data - the data interfaces required for dynamically rendering the first-screen content.
[0040] Middle layer (loading priority weight score is 0.3 - 0.7). The target resources in the middle layer affect the complete experience but are allowed to be loaded after the core layer. The resources in the middle layer include the following: Non-critical CSS - styles outside the initial screen / UI component library / pop-up window styles, etc.; Non-critical JS - interactive components (carousel / video control), data analysis, advertising scripts, etc.; Non-initial screen images - images below the initial screen / images that are displayed only after user operations; Non-critical fonts - text outside the initial screen / icon fonts, etc.; Other API data - data triggered by user interactions; Wasm - computational modules for non-core functions (such as audio and video decoding).
[0041] Low-priority layer (loading priority weight score is 0.0 - 0.3). The target resources in the low-priority layer can be loaded lazily or on demand without blocking interactions. The resources in the low-priority layer include the following: Videos / audios - background videos / promotional videos, etc.; Large media files - 3D models, PDFs, etc.; Advertising tracking scripts - third-party advertising, statistical scripts, etc.
[0042] By establishing a three-level resource priority model, key resources are guaranteed to be loaded first (CSS weight 0.9 > video 0.0). Based on the three-level resource priority model, for image and video types, the following dedicated loading strategies are established: Image grading loading strategy: Dynamically switch image formats (AVIF → WebP → JPEG). Preload low-resolution images in case of poor network quality and preload high-resolution images in case of good network quality. The specific strategy can be seen in Appendix Figure 2 : Calculate the network quality score to obtain a score value N, and select a loading strategy based on the score value N; If N ≥ 0.8 (i.e., the first image threshold), select "Preload the high-definition version of AVIF"; If 0.5 < N < 0.8, select "Preload the standard format of WebP"; If N ≤ 0.5 (i.e., the second image threshold), select "Preload the low-definition version of JPEG"; Regardless of which preloading strategy is selected, the next step will be "Lazy load images outside the viewport". Finally, when the image scrolls into the visible area, progressively load the high-definition version.
[0043] Intelligent Suppression and Intelligent Degradation Strategies for Video Resources: Intelligent suppression strategy is adopted for video preloading. Video resources usually consume a large amount of bandwidth, and preloading increases the bandwidth burden. At the same time, if the user behavior prediction is inaccurate, it will cause a large amount of bandwidth waste. Therefore, such resources are prohibited from preloading. The prohibition of preloading only means that they will not be loaded in advance. When the user actually plays the video, the video loading adopts an intelligent degradation strategy to achieve adaptive smooth loading: Calculate the network quality score to obtain the score value N, and select the loading strategy according to the score value N; If N ≥ 0.7 (i.e., the first video threshold), load 720p + pre-buffer for 10 seconds; If 0.4 ≤ N < 0.7, load 480p + buffer after click; If N < 0.4 (i.e., the second video threshold), only load the cover + text substitution.
[0044] S104: Dynamic score calculation.
[0045] When multiple types of resources compete for bandwidth, it is necessary to dynamically adjust by combining the network quality score (N) and the user behavior weight (U) using the weighted priority algorithm (dynamic score calculation).
[0046] Based on the dynamic score calculator, perform weighted priority calculation to obtain the final loading score P : ; Among them, 、 and are all weight coefficients. In this implementation method, it is preferably α = 0.4, β = 0.1, γ = 0.5, represents the loading priority weight score, represents the network quality score, represents the behavior weight score.
[0047] Through the above weighted calculation, it can ensure that resources with a high degree of criticality and a large trend of behavior weight can be loaded first.
[0048] The specific loading strategies are as follows: When P > 0.8 (i.e., the first set threshold), perform the highest priority synchronous preloading, such as the resource "CSS critical path"; When 0.5 < P ≤ 0.8, perform asynchronous preloading + execution delay, such as the resource "critical font"; When 0.2 < P ≤ 0.5 (i.e., the second set threshold), delay the loading until the idle period, such as the resource "non-first screen image"; When P ≤ 0.2 (i.e., the third set threshold), prohibit preloading, such as the resource "background video".
[0049] Through the designed resource loading scheduler, based on the resource loading sequence, relevant resources (such as images, scripts, style sheets, etc.) are synchronously / asynchronously loaded into the user's browser or cache on the current page in the order of priority.
[0050] Such as Figure 3 As shown, this implementation provides an exemplary schematic diagram of the usage process, including the following: (1) Input and initial processing.
[0051] Network quality monitoring (real-time): The system monitors the quality of the current network in real-time and obtains the network quality score; User event capture (real-time): The system captures various user behavior events in real-time, such as clicks, hovering, scrolling, etc.
[0052] (2) Prediction and calculation.
[0053] User behavior prediction: Based on the captured user events, predict the user's next operation; Resource weight calculation: Combining the results of user behavior prediction, calculate the behavior weight scores of each web page resource; Resource type classifier: Classify different web page resources to determine their resource types.
[0054] (3) Policy matching.
[0055] Score calculator: Considering the network quality score, resource weight score, and the loading priority weight score determined according to the resource type comprehensively, calculate the final loading score through weighted calculation; Policy matching matrix: According to the final loading score P, match the corresponding resource loading policy: If P > 0.8, adopt the "highest priority synchronous preloading" policy; If 0.5 < P <= 0.8, adopt the "asynchronous preloading + execution delay" policy; If 0.2 < P <= 0.5, adopt the "delay until idle period for loading" policy; If P <= 0.2, adopt the "prohibit preloading" policy.
[0056] (4) Resource loading execution.
[0057] Resource loading priority queue: According to the matched loading policy, put the resources into the corresponding priority queue; Resource loading scheduler: Schedule the resources according to the priority order in the queue. During the loading process, there are special treatments for image and video resources: When requesting a resource, first judge whether it is an image or a video; If it is a video, further determine whether it is a video resource (the logic here may be repeated, presumably for a more detailed judgment), and then load it according to the hierarchical loading strategy (combined with the hierarchical loading based on network quality score mentioned above); If it is an image, it will be processed according to the normal hierarchical loading strategy; The process ends after the loading is complete.
[0058] The entire process described above optimizes resource loading efficiency and user experience by monitoring the network and user behavior in real time and dynamically adjusting resource loading strategies.
[0059] Figure 4 A web resource preloading system based on multi-factor dynamic evaluation is shown, comprising: The network quality scoring unit 401 is configured to obtain a network quality score based on the obtained bandwidth factor, network delay factor, and resource stability factor of the current webpage; The behavior weight scoring unit 402 is configured to dynamically adjust the behavior weight score of each web page resource according to user behavior; The loading priority weight scoring unit 403 is configured to: determine corresponding loading priority weight scores according to the types of different web page resources; The webpage resource loading unit 404 is configured to: obtain a final loading score based on the weighted sum of the network quality score, the behavior weight score, and the loading priority weight score, and load corresponding webpage resources according to the final loading score.
[0060] It is understandable that each of the above-mentioned units can be separately or completely combined into one or several other units to form a unit, or one (or some) of the units can be further divided into multiple functionally smaller units to form a unit, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the system may also include other units. In actual applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of multiple units.
[0061] According to another embodiment of the present application, the system described in this embodiment can be constructed by running a computer program (including program code) capable of executing the steps involved in the corresponding method of the present invention on a general-purpose computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.
[0062] Figure 5 A computer device is shown, which includes a processor 501, a communication interface 502, and a computer-readable storage medium 503. The processor 501, the communication interface 502, and the computer-readable storage medium 503 may be connected via a bus or other means.
[0063] Among them, the communication interface 502 is used to receive and send data, the computer-readable storage medium 503 can be stored in the memory of the electronic device, the computer-readable storage medium 503 is used to store computer programs, the computer programs include program instructions, and the processor 501 is used to execute the program instructions stored in the computer-readable storage medium 503.
[0064] The processor 501 is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.
[0065] The processor 501 is configured to perform the following process: Obtain a network quality score based on the bandwidth factor, network delay factor, and resource stability factor of the current web page; Dynamically adjust the behavior weight score of each web resource based on user behavior; Determine the corresponding loading priority weight score according to the type of different web page resources; A final loading score is obtained by weighting the network quality score, the behavior weight score, and the loading priority weight score, and corresponding web page resources are loaded according to the final loading score.
[0066] The present invention also provides a computer-readable storage medium, which is a memory device in an electronic device for storing programs and data. It is understood that the computer-readable storage medium herein may include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium provides storage space that stores the processing system of the electronic device.
[0067] Furthermore, the storage space also stores one or more instructions suitable for being loaded and executed by the processor. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium herein may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device; alternatively, it may be at least one computer-readable storage medium located remotely from the processor.
[0068] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to implement the following process: Obtain a network quality score based on the bandwidth factor, network delay factor, and resource stability factor of the current web page; Dynamically adjust the behavior weight score of each web resource based on user behavior; Determine the corresponding loading priority weight score according to the type of different web page resources; A final loading score is obtained by weighting the network quality score, the behavior weight score, and the loading priority weight score, and corresponding web page resources are loaded according to the final loading score.
[0069] The present invention also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the following process: Obtain a network quality score based on the bandwidth factor, network delay factor, and resource stability factor of the current web page; Dynamically adjust the behavior weight score of each web resource based on user behavior; Determine the corresponding loading priority weight score according to the type of different web page resources; A final loading score is obtained by weighting the network quality score, the behavior weight score, and the loading priority weight score, and corresponding web page resources are loaded according to the final loading score.
[0070] Those skilled in the art will appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0071] The above embodiments can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. A computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data processing device such as a server or data center that integrates one or more available media. Available media can include magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives).
[0072] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A webpage resource preloading method based on multi-factor dynamic evaluation, characterized in that: The following processes are included: Obtain a network quality score based on the bandwidth factor, network delay factor, and resource stability factor of the current web page; Dynamically adjust the behavior weight score of each web resource based on user behavior; Determine the corresponding loading priority weight score according to the type of different web page resources; A final loading score is obtained by weighting the network quality score, the behavior weight score, and the loading priority weight score, and corresponding web page resources are loaded according to the final loading score.
2. The webpage resource preloading method based on multi-factor dynamic evaluation according to claim 1, characterized in that: The network quality score is a weighted sum of the bandwidth factor, the network delay factor, and the resource stability factor.
3. The webpage resource preloading method based on multi-factor dynamic evaluation according to claim 1, characterized in that: The user behavior includes: user click path, scroll depth and dwell time; A pre-trained machine learning algorithm is used to predict the user's next action based on the user behavior, and the behavior weight score of each web page resource is dynamically adjusted based on the predicted user's next action.
4. The webpage resource preloading method based on multi-factor dynamic evaluation according to claim 1, characterized in that: Determine the corresponding loading priority weight score based on the type of different web page resources, including: The core layer is loaded first and is given the highest loading priority weight score; The middle layer is loaded after the core layer and is given a lower loading priority weight score than the core layer; Low-priority tiers are loaded last and are given a lower loading priority weight score than middle tiers.
5. The webpage resource preloading method based on multi-factor dynamic evaluation according to claim 1, characterized in that: Loading corresponding web page resources according to the final loading score includes: When the final loading score is greater than the first set threshold, synchronous preloading is performed according to the highest priority; When the final loading score is less than or equal to the first set threshold and greater than the second set threshold, asynchronous preloading is performed and an execution delay is set; When the final loading score is less than or equal to the second set threshold and greater than the third set threshold, loading is delayed until the idle period; When the final loading score is less than or equal to the third set threshold, preloading is prohibited.
6. The webpage resource preloading method based on multi-factor dynamic evaluation according to any one of claims 1 to 5, characterized in that: When loading web resources, if they are video resources, preloading is prohibited. When receiving a user's click command or play command, hierarchical loading is performed based on the network quality score, including: When the network quality score is greater than or equal to the first video threshold, load 720p and pre-buffer for 10 seconds; when the network quality score is less than the first video threshold and greater than or equal to the second video threshold, load 480p and buffer after receiving the click instruction; when the network quality score is less than the second video threshold, only load the cover and use text instead.
7. The webpage resource preloading method based on multi-factor dynamic evaluation according to any one of claims 1 to 5, characterized in that: When loading web resources, if they are image resources, hierarchical preloading is performed based on the network quality score, including: When the network quality score is greater than or equal to the first image threshold, the AVIF high-definition version is preloaded; when the network quality score is less than the first image threshold and greater than the second image threshold, the WebP standard format is preloaded; when the network quality score is less than or equal to the second image threshold, the JPEG low-definition version is preloaded; After preloading is complete, images outside the viewport are delayed in loading, and when the image scrolls into the visible area, the high-definition version of the image is progressively loaded.
8. A web resource preloading system based on multi-factor dynamic evaluation, characterized in that: include: The network quality scoring unit is configured to obtain a network quality score based on the obtained bandwidth factor, network delay factor, and resource stability factor of the current webpage; The behavior weight scoring unit is configured to dynamically adjust the behavior weight score of each web page resource according to user behavior; The loading priority weight scoring unit is configured to: determine corresponding loading priority weight scores according to the types of different web page resources; The webpage resource loading unit is configured to: load the corresponding webpage resource according to a final loading score obtained by weighting the network quality score, the behavior weight score and the loading priority weight score.
9. A computer device, characterized in that: include: a processor and a computer-readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method for preloading web resources based on multi-factor dynamic evaluation according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded by a processor and executing the web page resource preloading method based on multi-factor dynamic evaluation according to any one of claims 1 to 7.
Citation Information
Patent Citations
Game loading method, related equipment, storage medium and program product
CN118210602A
Picture preloading method based on image annotation
CN119622138A
Offline data loading method based on dynamic priority adjustment
CN119690543A
Component page rendering method and device for online education, equipment and medium
CN120029692A
Dynamic page loading optimization method and device based on user behavior and network environment
CN120151299A
Cited By
Page preloading decision-making method and device, electronic equipment and storage medium
CN121523764A
Page loading optimization method and device, storage medium and computer equipment
CN121560415A
Resource level detection method and device of third-party script, equipment and storage medium
CN121637188A