Webpage resource loading method and device, equipment and storage medium

CN122594612APending Publication Date: 2026-08-18ANHUI SANQI JIYU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611007740.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

由此,实现了网页资源的精准预加载,减少了无意访问区域的无效加载,提高了网页响应效率和交互流畅性,有效地解决了现有网页资源加载方式无法结合用户行为类型准确预测后续交互位置,导致资源无效加载、加载时机滞后以及页面交互响应效率较低的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594612A_ABST
    Figure CN122594612A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a webpage resource loading method and device, equipment and a storage medium, the method comprising: obtaining a plurality of resource candidate areas in a webpage, and listening to user behavior information of a target object in the webpage to obtain a behavior type corresponding to the user behavior information; based on the behavior type, predicting a subsequent interaction position of the target object in the webpage to generate an interaction prediction result representing the predicted subsequent interaction position; based on the subsequent interaction position indicated by the interaction prediction result, determining a target resource candidate area satisfying a preset position relationship from the plurality of resource candidate areas, and performing preloading processing on a to-be-loaded resource configured by the target resource candidate area. The present scheme realizes accurate preloading of webpage resources, reduces invalid loading of unintentional access areas, and improves webpage response efficiency and interaction fluency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for loading web page resources. Background Technology

[0002] As the number of page resources such as images, videos, product information, and interactive components in web applications continues to increase, loading all resources at once during page initialization can easily increase the number of network requests and the browser's rendering load, affecting page loading speed. To reduce the initial loading pressure, existing web pages typically use lazy loading or preloading methods, loading relevant resources gradually based on the page display status or the user's browsing process, thereby improving the page access experience to some extent.

[0003] In existing technologies, web page resource loading is typically triggered by whether an element enters the visible area, the page scroll position, or a fixed distance threshold. For example, when a page element approaches or enters the viewport, the corresponding image, data, or other resources are then loaded. While this approach can reduce the initial loading volume, its judgment criteria are relatively singular and fail to accurately reflect the user's subsequent actual interaction needs. This can easily lead to a mismatch between the timing of resource loading and the user's actual access needs, resulting in numerous invalid loads, untimely preparation of resources in the target area, and low page interaction response efficiency. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for loading web page resources. It can acquire multiple candidate resource areas in a web page and predict the subsequent interaction position of a target object based on its behavior type. Then, based on the prediction results, it determines the target resource candidate area and preloads the corresponding resource when the loading trigger condition is met. This achieves accurate preloading of web page resources, reduces invalid loading of unintentionally accessed areas, improves web page response efficiency and interaction smoothness, and effectively solves the problems of existing web page resource loading methods that cannot accurately predict subsequent interaction positions based on user behavior types, leading to invalid resource loading, delayed loading timing, and low page interaction response efficiency.

[0005] In a first aspect, embodiments of this application provide a method for loading web page resources, the method comprising: Multiple resource candidate areas in a webpage are obtained, and user behavior information of the target object in the webpage is monitored to obtain the behavior type corresponding to the user behavior information. The resource candidate areas are page areas configured with resources to be loaded. Based on the behavior type, the subsequent interaction positions of the target object in the webpage are predicted, and an interaction prediction result is generated to characterize the predicted subsequent interaction positions. Based on the subsequent interaction positions indicated by the interaction prediction results, a target resource candidate area that satisfies a preset positional relationship is determined from multiple resource candidate areas, and the resources to be loaded configured in the target resource candidate area are preloaded.

[0006] In one embodiment, the process of monitoring user behavior information of the target object on the webpage and obtaining the behavior type corresponding to the user behavior information includes: Based on the current page display range, candidate resource areas that meet preset proximity conditions with the current page display range are determined from multiple resource candidate areas, and the behavior sampling range is determined based on the regional location of the candidate resource areas. When the target object triggers a page interaction event, the event type, page position parameter and trigger time corresponding to the page interaction event are obtained, and the page interaction event is determined as a candidate behavior event when the page position parameter is within the behavior sampling range or the distance between the page position parameter and the behavior sampling range is less than a preset distance threshold. The multiple candidate behavioral events acquired consecutively are sorted according to the trigger time to obtain a behavioral event sequence, and the user behavior information is determined based on the behavioral event sequence. Based on the event type of each candidate behavior event in the behavior event sequence, the behavior type corresponding to the user behavior information is determined, wherein the behavior type is one of mouse movement behavior, scroll wheel behavior, or keyboard navigation behavior.

[0007] In one embodiment, predicting the subsequent interaction positions of the target object on the webpage based on the behavior type and generating an interaction prediction result to characterize the predicted subsequent interaction positions includes: When the behavior type is mouse movement behavior, continuous mouse movement events are extracted from the behavior event sequence, and a mouse trajectory point sequence is generated based on the page position parameters and trigger time of each mouse movement event. Based on the direction and magnitude of position change between adjacent mouse trajectory points, jittery trajectory points in the mouse trajectory point sequence are filtered to obtain the target trajectory segment. Based on the starting and ending trajectory points of the target trajectory segment, the mouse movement direction and mouse movement amplitude of the target object are determined, and based on the mouse movement direction and mouse movement amplitude, the mouse prediction path is determined. Based on the extension position of the mouse prediction path in the webpage, the subsequent interaction position of the target object in the webpage is determined, and the corresponding interaction prediction result is generated.

[0008] In one embodiment, predicting the subsequent interaction positions of the target object on the webpage based on the behavior type and generating an interaction prediction result to characterize the predicted subsequent interaction positions includes: When the behavior type is scroll wheel behavior, continuous scroll events are extracted from the behavior event sequence, and the scrolling direction, display range offset and scrolling duration of the target object are determined based on the page position parameters and trigger time of each continuous scroll event. Based on the scrolling direction, the display range offset, and the current page display range, the current page display range is extrapolated along the scrolling direction to obtain at least one predicted display range, and a scrolling prediction coverage area is generated based on the at least one predicted display range. The scroll prediction coverage area is matched with each resource candidate area, and the page position corresponding to the resource candidate area that satisfies the positional correspondence with the scroll prediction coverage area is determined as the subsequent interaction position, generating the corresponding interaction prediction result.

[0009] In one embodiment, predicting the subsequent interaction positions of the target object on the webpage based on the behavior type and generating an interaction prediction result to characterize the predicted subsequent interaction positions includes: When the behavior type is keyboard navigation behavior, continuous focus switching events are extracted from the behavior event sequence, and the current focus element and focus switching direction are determined based on the page position parameters corresponding to each focus switching event. Based on the current focus element, the focus switching direction, and the arrangement order of focusable elements in the webpage, the target focus element is determined, and the page area of ​​the target focus element in the webpage is determined as the predicted focus area. If the predicted focus area and at least one of the resource candidate areas meet the preset focus association conditions, the predicted focus area is determined as the subsequent interaction position, and the corresponding interaction prediction result is generated.

[0010] In one embodiment, determining a target resource candidate region that satisfies a preset positional relationship from multiple resource candidate regions based on the subsequent interaction position indicated by the interaction prediction result includes: Based on the subsequent interaction positions indicated by the interaction prediction results, a predicted influence area is determined, wherein the predicted influence area is a page area formed by the subsequent interaction positions along the corresponding behavioral direction; Based on the regional boundaries of each resource candidate region and the resource loading attributes of the corresponding resource to be loaded, a candidate matching region corresponding to each resource candidate region is determined. The resource loading attributes include at least one of resource loading status, estimated loading time, and resource priority. The predicted influence area is matched with each candidate matching area to determine the location matching result corresponding to each resource candidate area, and the resource candidate area whose location matching result satisfies the preset location relationship is determined as the target resource candidate area.

[0011] In one embodiment, the preloading process for the resources to be loaded configured in the target resource candidate region includes: Based on the location matching results corresponding to the target resource candidate area, the predicted distance and predicted overlap range between the subsequent interaction location and the target resource candidate area are determined, and the resource loading attributes of the resource to be loaded configured in the target resource candidate area are obtained. Based on the predicted distance, the predicted overlap range, and the resource loading attributes, a loading trigger window corresponding to the target resource candidate area is determined, and a preloading instruction corresponding to the resource to be loaded is generated when the loading trigger window meets the preset loading trigger conditions. Based on the preloading instruction, preloading processing is performed on the resources to be loaded configured in the target resource candidate area, and the loading status of the resources to be loaded is associated with and recorded with the target resource candidate area.

[0012] Secondly, embodiments of this application also provide a web page resource loading device, including: A listening device is configured to acquire multiple resource candidate areas in a webpage and listen to user behavior information of a target object in the webpage to obtain the behavior type corresponding to the user behavior information, wherein the resource candidate area is a page area configured with resources to be loaded. The prediction module is configured to predict the subsequent interaction positions of the target object in the webpage based on the behavior type, and generate an interaction prediction result to characterize the predicted subsequent interaction positions. The preloading module is configured to determine a target resource candidate area that satisfies a preset positional relationship from multiple resource candidate areas based on the subsequent interaction position indicated by the interaction prediction result, and to perform preloading processing on the resources to be loaded configured in the target resource candidate area.

[0013] Thirdly, embodiments of this application also provide a web page resource loading device, the device comprising: One or more processors; Storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the web page resource loading method described in the embodiments of this application.

[0014] Fourthly, embodiments of this application also provide a non-volatile storage medium for storing computer-executable instructions, which, when executed by a computer processor, are configured to perform the web page resource loading method described in embodiments of this application.

[0015] Fifthly, embodiments of this application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the web page resource loading method described in embodiments of this application.

[0016] In this embodiment, multiple resource candidate areas in a webpage are obtained, and the corresponding behavior type is determined by combining the user behavior information of the target object on the webpage. The subsequent interaction position of the target object is then predicted to obtain an interaction prediction result. Based on the interaction prediction result, a target resource candidate area is determined from the multiple resource candidate areas, and the configured resources to be loaded are preloaded when a preset loading trigger condition is met. This achieves preloading of webpage resources based on actual user interaction trends, avoiding reliance on fixed visible areas or scroll positions for loading judgment, reducing invalid resource loading and loading lag issues, and improving the accuracy of webpage resource loading and page interaction response efficiency. Attached Figure Description

[0017] Figure 1 A flowchart illustrating a method for loading web page resources provided in an embodiment of this application; Figure 2 A flowchart illustrating a specific implementation process for monitoring user behavior information of a target object on a webpage and determining the behavior type, provided in an embodiment of this application; Figure 3 A flowchart illustrating a specific implementation process for generating interactive prediction results under mouse movement behavior, provided in an embodiment of this application; Figure 4 A flowchart illustrating a specific implementation process for generating interactive prediction results under the scrolling behavior of a roller, provided in this application embodiment; Figure 5 A flowchart illustrating a specific implementation process for generating interactive prediction results under keyboard navigation behavior, provided in an embodiment of this application; Figure 6 A flowchart illustrating a specific implementation process for determining a target resource candidate region, provided in an embodiment of this application; Figure 7A flowchart illustrating a specific implementation process of preloading resources to be loaded, provided in this application embodiment; Figure 8 A structural block diagram of a web page resource loading device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a web page resource loading device provided in an embodiment of this application. Detailed Implementation

[0018] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.

[0019] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. The term "several" means one or more, and multiple means two or more. Furthermore, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0020] The webpage resource loading method provided in this application can be applied to scenarios such as webpage browsing, webpage application interaction, long list browsing, image and text content display, video content display, product details display, and webpage form operations. The aforementioned application scenarios are merely exemplary and illustrative. In practical applications, this webpage resource loading method can also be used in other scenarios, and this application does not limit these applications.

[0021] The webpage resource loading method provided in this application embodiment can be executed by a computer device, which can be an electronic device capable of running webpages, processing data, and requesting resources, such as a terminal device, a browser client, or a web application running device. Optionally, the webpage resource loading method can be executed by a webpage front-end loading module, which can be a script module running independently in a webpage application or a page resource management module in a browser runtime environment. This application embodiment does not limit the scope of the method.

[0022] Figure 1This is a flowchart illustrating a method for loading web page resources according to an embodiment of this application. This method can be applied to a web page front-end loading module, such as... Figure 1 As shown, the method for loading this webpage resource specifically includes the following steps: Step S101: Obtain multiple resource candidate areas in the webpage and listen to the user behavior information of the target object in the webpage to obtain the behavior type corresponding to the user behavior information. The resource candidate area is a page area configured with resources to be loaded.

[0023] The resource candidate area can be a page area on the webpage configured with resources to be loaded. For example, the resource candidate area could be an image display area, a video cover area, a product card area, a recommended content area, or an input control associated area. Resources to be loaded can be resources that have not yet been loaded but will need to be loaded during subsequent interactions, such as image resources, video resources, product description data, detail data, script resources, and style resources. The target object can be a user browsing or operating on the webpage, or a client object representing the user performing interactive operations on the webpage.

[0024] Optionally, multiple resource candidate areas in a webpage can be obtained as follows: during the webpage initialization phase, read pre-configured resource loading identifiers, resource binding attributes, or page area configuration data; determine the page areas in the webpage that are configured with resources to be loaded based on the resource loading identifiers, resource binding attributes, or page area configuration data; use the determined page areas as resource candidate areas, and record the area boundaries, area positions, and corresponding resources to be loaded for each resource candidate area.

[0025] Optionally, the method for monitoring user behavior information of the target object on the webpage and obtaining the corresponding behavior type can be as follows: listen for page interaction events triggered by the target object through a webpage event listening mechanism; filter and sort the page interaction events; and then determine the user behavior information and its corresponding behavior type based on the filtered page interaction events. The behavior type can represent the interaction method currently performed by the target object on the webpage, such as mouse movement, scrolling, or keyboard navigation.

[0026] In one embodiment, a specific implementation process is described for monitoring user behavior information of a target object on a webpage and obtaining the behavior type corresponding to the user behavior information. Please refer to [reference needed]. Figure 2 , Figure 2 This is a flowchart illustrating a specific implementation process for monitoring user behavior information of a target object on a webpage and determining the behavior type, as provided in an embodiment of this application. Figure 2 As shown, the specific implementation process includes the following steps: Step S201: Based on the current page display range, determine the candidate resource area that meets the preset proximity condition with the current page display range from multiple resource candidate areas, and determine the behavior sampling range based on the regional location of the candidate resource area.

[0027] The current page display area can be the area of ​​the page that the target object can currently see in the webpage display window, or it can be the page coordinate range corresponding to the browser viewport. The candidate resource area can be the resource candidate area that is closest to the current page display area among multiple candidate resource areas. Preset proximity conditions can include the resource candidate area being within the current page display area, the resource candidate area intersecting with the current page display area, or the distance between the resource candidate area and the current page display area being less than a preset distance. The behavior sampling range can be the page area range used to filter page interaction events.

[0028] Optionally, based on the current page display range, the method for determining candidate resource areas that meet preset proximity conditions with the current page display range from multiple resource candidate areas, and determining the behavior sampling range based on the regional position of the candidate resource areas, can be as follows: First, obtain the page coordinates corresponding to the current page display range; then, calculate the positional relationship between each resource candidate area and the current page display range; determine the resource candidate areas that intersect with the current page display range or are less than a preset distance as candidate resource areas; finally, expand the preset range outward based on the regional boundaries of the candidate resource areas to obtain the behavior sampling range. For example, in an e-commerce long list page, the product card area near the current page display range can be determined as a candidate resource area, and the expanded range formed around the product card area can be used as the behavior sampling range.

[0029] Step S202: When the target object triggers a page interaction event, obtain the event type, page position parameters and trigger time corresponding to the page interaction event, and determine the page interaction event as a candidate behavior event if the page position parameters are within the behavior sampling range or the distance between the page position parameters and the behavior sampling range is less than a preset distance threshold.

[0030] Page interaction events can be operation events triggered by a target object on a webpage, such as pointer position change events, page scrolling events, and focus switching events. The event type indicates the event category to which the page interaction event belongs. Page position parameters indicate the page position corresponding to the occurrence of the page interaction event, such as mouse coordinates, the displayed area after scrolling, and the area where the focused element is located. The trigger time is the time information of when the page interaction event occurred. Candidate behavior events are page interaction events retained after filtering by the behavior sampling range, used for subsequent generation of behavior event sequences.

[0031] Optionally, when the page position parameter is within the behavior sampling range, or the distance between the page position parameter and the behavior sampling range is less than a preset distance threshold, the method for determining the page interaction event as a candidate behavior event can be as follows: after listening to the page interaction event, read the event type, page position parameter, and trigger time of the page interaction event; determine whether the page position parameter is within the behavior sampling range, or determine whether the distance between the page position parameter and the behavior sampling range is less than a preset distance threshold; if either of the above conditions is met, the page interaction event is considered to be related to resource loading prediction and is determined as a candidate behavior event; if the above conditions are not met, the page interaction event can be ignored to reduce the interference of irrelevant events on subsequent predictions.

[0032] Step S203: Sort the multiple candidate behavior events acquired consecutively according to the trigger time to obtain a behavior event sequence, and determine the user behavior information based on the behavior event sequence.

[0033] The sequence of behavioral events can be multiple candidate behavioral events arranged in chronological order. User behavior information can be a series of continuous user interactions represented by the sequence of behavioral events, such as a series of continuous mouse movements, a series of continuous scrolling, or a series of continuous focus switching.

[0034] Optionally, multiple candidate behavioral events acquired consecutively can be sorted according to their trigger times to obtain a behavioral event sequence. The user behavior information can then be determined based on this sequence by: sorting the multiple candidate behavioral events acquired within a continuous time window from earliest to latest according to their trigger times; determining the continuity of the sorted candidate behavioral events; combining the candidate behavioral events that meet the continuity requirement into a behavioral event sequence; and then using this behavioral event sequence as the user behavior information of the target object on the webpage. This approach avoids isolated events directly participating in subsequent predictions, improving the stability of behavior recognition.

[0035] Step S204: Based on the event type of each candidate behavior event in the behavior event sequence, determine the behavior type corresponding to the user behavior information, wherein the behavior type is one of mouse movement behavior, scroll wheel behavior, or keyboard navigation behavior.

[0036] The behavior type can be one of the following: mouse movement behavior, scroll wheel behavior, or keyboard navigation behavior. Mouse movement behavior can be composed of continuous pointer position change events; scroll wheel behavior can be composed of continuous page scrolling events; keyboard navigation behavior can be composed of continuous focus switching events.

[0037] Optionally, the behavior type corresponding to the user behavior information can be determined based on the event type of each candidate behavior event in the behavior event sequence as follows: The event type of each candidate behavior event in the behavior event sequence is statistically analyzed; if the behavior event sequence mainly consists of pointer position change events, the behavior type is determined to be mouse movement behavior; if the behavior event sequence mainly consists of page scrolling events, the behavior type is determined to be scroll wheel scrolling behavior; if the behavior event sequence mainly consists of focus switching events, the behavior type is determined to be keyboard navigation behavior. For example, if a user continuously presses keyboard navigation keys to switch the focus between multiple input boxes, the behavior type corresponding to this user behavior information can be determined as keyboard navigation behavior.

[0038] As can be seen from the above, by determining the behavior sampling range based on the current page display range and resource candidate area, and by filtering and sorting page interaction events, it is possible to extract the sequence of behavior events related to resource loading prediction from a large number of web page interaction events, thereby accurately determining user behavior information and its corresponding behavior type.

[0039] Step S102: Based on the behavior type, predict the subsequent interaction positions of the target object in the webpage and generate an interaction prediction result to represent the predicted subsequent interaction positions.

[0040] The subsequent interaction location can be the page position on the webpage where the target object will interact later, predicted based on user behavior information. This subsequent interaction location can be represented as the extension position of the mouse prediction path, the page position within the scroll prediction coverage area, or the page position corresponding to the predicted focus area. The interaction prediction result can be prediction data used to characterize the predicted subsequent interaction location, which may include information such as the subsequent interaction location, the corresponding behavior direction, and the corresponding prediction area.

[0041] Optionally, the method for predicting subsequent interaction positions based on behavior type can be as follows: when the behavior type is mouse movement, the mouse prediction path is determined based on the mouse trajectory point; when the behavior type is scroll wheel movement, the scroll prediction coverage area is determined based on the scroll direction and display range offset; when the behavior type is keyboard navigation, the predicted focus area is determined based on the focus switching direction and the arrangement order of focusable elements. Thus, different forms of interaction prediction results can be generated for different interaction methods.

[0042] In one embodiment, a specific implementation process for generating interaction prediction results in the case of mouse movement behavior is described. Please refer to [reference needed]. Figure 3 , Figure 3 This is a flowchart illustrating a specific implementation process for generating interactive prediction results based on mouse movement behavior, as provided in an embodiment of this application. Figure 3As shown, the specific implementation process includes the following steps: Step S301: When the behavior type is mouse movement behavior, extract continuous mouse movement events from the behavior event sequence, and generate a mouse trajectory point sequence based on the page position parameters and trigger time of each mouse movement event.

[0043] Mouse movement events can be page interaction events triggered when the pointer position changes. A mouse trajectory point sequence can be a sequence formed by arranging multiple mouse trajectory points according to their trigger times. Mouse trajectory points can include the mouse's position on the webpage and the corresponding trigger time.

[0044] Optionally, extracting consecutive mouse movement events from the sequence of behavioral events and generating a sequence of mouse trajectory points based on the page position parameters and trigger times of each mouse movement event can be achieved by: filtering candidate behavioral events whose event type is pointer position change event from the sequence of behavioral events; reading the page position parameters and trigger times corresponding to each pointer position change event; and arranging the page position parameters into a sequence of mouse trajectory points according to the trigger times. For example, when a user's mouse moves from the left side of a webpage to the product image area on the right, multiple consecutive mouse trajectory points can be formed.

[0045] Step S302: Based on the direction and magnitude of position change between adjacent mouse trajectory points, filter the jittery trajectory points in the mouse trajectory point sequence to obtain the target trajectory segment.

[0046] The jittering trajectory points can be interference trajectory points caused by slight hand movements, device sampling errors, or small back-and-forth movements within a short period of time. The target trajectory segment can be a trajectory segment that reflects the overall movement trend of the mouse after jitter filtering. The direction of position change can be the directional change between adjacent mouse trajectory points, and the magnitude of position change can be the change in distance between adjacent mouse trajectory points.

[0047] Optionally, the method for filtering jittery trajectory points in the mouse trajectory point sequence to obtain the target trajectory segment based on the direction and amplitude of positional change between adjacent mouse trajectory points can be as follows: calculate the direction and amplitude of positional change between adjacent mouse trajectory points; if the amplitude of positional change between a certain mouse trajectory point and the trajectory points before and after it is less than a preset amplitude threshold, or if its direction of positional change deviates significantly from the overall movement direction, then this mouse trajectory point is filtered as a jittery trajectory point; the continuously retained mouse trajectory points after filtering are determined as the target trajectory segment. This method can reduce the impact of local mouse jitter on subsequent interaction position prediction.

[0048] Step S303: Based on the starting and ending trajectory points of the target trajectory segment, determine the mouse movement direction and mouse movement amplitude of the target object, and based on the mouse movement direction and mouse movement amplitude, determine the mouse prediction path.

[0049] The starting trajectory point can be the earliest trajectory point in the target trajectory segment, and the ending trajectory point can be the latest trajectory point in the target trajectory segment. The mouse movement direction can be the direction from the starting trajectory point to the ending trajectory point. The mouse movement amplitude can be the amount of positional change between the starting and ending trajectory points. The mouse predicted path can be the subsequent mouse movement path predicted based on the mouse movement direction and mouse movement amplitude.

[0050] Optionally, the mouse movement direction and range of the target object can be determined based on the starting and ending trajectory points of the target trajectory segment by: determining the overall movement direction of the mouse based on the starting and ending trajectory points; and determining the range of mouse movement based on the distance between the starting and ending trajectory points.

[0051] Optionally, the mouse prediction path can be determined based on the mouse movement direction and the mouse movement amplitude by taking the end trajectory point as the starting point and extending the path along the mouse movement direction according to the mouse movement amplitude or a preset extrapolation distance to obtain the mouse prediction path.

[0052] Step S304: Based on the extension position of the mouse prediction path in the webpage, determine the subsequent interaction position of the target object in the webpage and generate the corresponding interaction prediction result.

[0053] The extended position can be the page location or area formed by extending the mouse's predicted path forward within the webpage. This extended position can serve as the location for subsequent interactions with the target object on the webpage.

[0054] Optionally, determining the subsequent interaction position of the target object on the webpage based on the extended position of the mouse predicted path and generating the corresponding interaction prediction result can be achieved by: extending the mouse predicted path along the mouse movement direction to a preset length; determining the page position traversed by the extended path or the page position corresponding to the end of the extended path as the subsequent interaction position; and generating the interaction prediction result based on the subsequent interaction position and the mouse predicted path. For example, when the user's mouse trajectory continuously points to a certain image display area, the position near that image display area can be predicted as the subsequent interaction position based on the extended position of the mouse predicted path.

[0055] As can be seen from the above, by filtering the mouse trajectory points for jitter and determining the predicted mouse path based on the target trajectory segment, the stability and accuracy of subsequent interaction position prediction under mouse movement behavior can be improved.

[0056] In one embodiment, a specific implementation process for generating interactive prediction results in the case of a scroll wheel behavior is described. Please refer to [reference needed]. Figure 4 , Figure 4 This is a flowchart illustrating a specific implementation process for generating interactive prediction results under the scrolling behavior of a roller, as provided in an embodiment of this application. Figure 4 As shown, the specific implementation process includes the following steps: Step S401: When the behavior type is scroll wheel scrolling behavior, extract continuous scrolling events from the behavior event sequence, and determine the scrolling direction, display range offset and scrolling duration of the target object based on the page position parameters and triggering time of each continuous scrolling event.

[0057] Among these, continuous scrolling events can be multiple page scrolling events triggered by the target object within a continuous time period. Scrolling direction can be the direction of movement of the page display area, such as scrolling up or down. Display area offset can be the amount of position change of the page display area during scrolling. Scrolling duration state can be used to indicate whether the scrolling behavior is occurring continuously, such as continuous scrolling, short pauses, or stopped scrolling.

[0058] Optionally, the method for extracting continuous scrolling events from the sequence of behavioral events and determining the scrolling direction, display range offset, and scrolling duration of the target object based on the page position parameters and triggering time of each continuous scrolling event can be as follows: filter page scrolling events from the sequence of behavioral events; calculate the position difference between the display ranges of adjacent pages based on the page position parameters corresponding to the continuous page scrolling events; determine the scrolling direction and display range offset based on the position difference; and then determine the scrolling duration by combining the triggering time interval between adjacent page scrolling events.

[0059] Step S402: Based on the scrolling direction, display range offset, and current page display range, extrapolate the current page display range along the scrolling direction to obtain at least one predicted display range, and generate a scrolling prediction coverage area based on at least one predicted display range.

[0060] The predicted display range can be the subsequent page display range predicted based on the current page display range and scrolling trend. The scrolling prediction coverage area can be a page region formed by combining one or more predicted display ranges, used to represent the set of page positions that may subsequently enter the display range under scrolling behavior.

[0061] Optionally, the method for extrapolating the current page display range along the scrolling direction to obtain at least one predicted display range and generating a scrolling predicted coverage area, based on the scrolling direction, display range offset, and current page display range, can be as follows: using the current page display range as a reference, determine the extrapolation direction according to the scrolling direction; determine the extrapolation distance according to the display range offset; generate one or more predicted display ranges along the extrapolation direction; and merge the various predicted display ranges to obtain the scrolling predicted coverage area. For example, when the target object continuously scrolls down the product list, the next screen or several screens of page display range can be extrapolated along the downward direction of the page, and these predicted display ranges can be merged into a scrolling predicted coverage area.

[0062] Step S403: Match the scroll prediction coverage area with each resource candidate area, and determine the page position corresponding to the resource candidate area that satisfies the position correspondence with the scroll prediction coverage area as the subsequent interaction position, and generate the corresponding interaction prediction result.

[0063] The location correspondence can be defined as the degree to which the scrolling prediction coverage area intersects, contains, is adjacent to, or overlaps with the resource candidate area, meeting preset conditions. The page location corresponding to the resource candidate area can be the center location, boundary location, or regional range of the resource candidate area.

[0064] Optionally, the scroll prediction coverage area is matched with each resource candidate area, and the page position corresponding to the resource candidate area that satisfies the positional correspondence with the scroll prediction coverage area is determined as the subsequent interaction position. The corresponding interaction prediction result can be generated as follows: calculate the intersection or distance relationship between the scroll prediction coverage area and each resource candidate area; if a resource candidate area is located within the scroll prediction coverage area, or the distance between it and the scroll prediction coverage area is less than a preset distance, then the page position corresponding to that resource candidate area is determined as the subsequent interaction position; and then the interaction prediction result is generated based on the subsequent interaction position. This method avoids coarse-grained loading judgment based solely on the scroll bar position, and instead determines the subsequent interaction position by combining the predicted display range.

[0065] As can be seen from the above, by determining the scrolling direction, display range offset, and scrolling duration based on continuous scrolling events, and further generating a scrolling prediction coverage area, the page position of the target object to be viewed later can be determined in advance in the scroll wheel scrolling scenario, providing a predictive basis for resource preloading.

[0066] In one embodiment, a specific implementation process for generating interaction prediction results in the case of a keyboard navigation behavior is described. Please refer to [reference needed]. Figure 5 , Figure 5 This is a flowchart illustrating a specific implementation process for generating interactive prediction results under keyboard navigation behavior, as provided in an embodiment of this application. Figure 5 As shown, the specific implementation process includes the following steps: Step S501: When the behavior type is keyboard navigation behavior, extract continuous focus switching events from the behavior event sequence, and determine the current focus element and focus switching direction based on the page position parameters corresponding to each focus switching event.

[0067] The focus switching event is an event triggered when the focus of a focusable element on a webpage changes. A focusable element can be a page element that can gain focus through keyboard navigation, such as links, buttons, input boxes, and selection boxes. The currently focused element is the page element that currently has keyboard focus. The focus switching direction can be the direction in which the focus moves between focusable elements, such as forward or reverse switching.

[0068] Optionally, extracting consecutive focus switching events from the sequence of behavioral events and determining the current focus element and focus switching direction based on the page position parameters corresponding to each focus switching event can be done by: filtering focus switching events from the sequence of behavioral events; determining the current focus element based on the most recent focus switching event; and determining the focus switching direction based on the order of change of focus elements in consecutive focus switching events. For example, when a user continuously presses the keyboard navigation keys to move the focus from the previous input box to the next button, the focus switching direction can be determined to be a forward switch based on the order of change of focus elements.

[0069] Step S502: Based on the current focus element, focus switching direction, and the arrangement order of focusable elements in the webpage, determine the target focus element, and determine the page area of ​​the target focus element in the webpage as the predicted focus area.

[0070] The order in which focusable elements are arranged can be based on the page structure, a preset focus order, or a navigation order determined by element attributes. The target focus element can be the element that will subsequently gain focus, predicted based on the current focus element and the focus switching direction. The predicted focus area can be the page area corresponding to the target focus element on the webpage.

[0071] Optionally, the method for determining the target focus element based on the current focus element, the focus switching direction, and the arrangement order of focusable elements in the webpage, and determining the page area of ​​the target focus element in the webpage as the predicted focus area, can be as follows: obtain the arrangement order of each focusable element in the webpage; when the focus switching direction is forward, determine the focusable element after the current focus element as the target focus element; when the focus switching direction is reverse, determine the focusable element before the current focus element as the target focus element; and then determine the predicted focus area based on the page boundary of the target focus element.

[0072] Step S503: If the predicted focus area and at least one of the resource candidate areas meet the preset focus association conditions, the predicted focus area is determined as the subsequent interaction location, and the corresponding interaction prediction result is generated.

[0073] The preset focus association conditions can include the predicted focus area coinciding with the resource candidate area, the predicted focus area being located within the resource candidate area, and the predicted focus area and the resource candidate area having a resource binding relationship. The resource binding relationship can refer to the pre-configured association between a focusable element and a resource to be loaded, such as a button corresponding to detail data resources, an input box corresponding to a tooltip resource, or a link area corresponding to an image resource.

[0074] Optionally, if the predicted focus area meets a preset focus association condition with at least one of the resource candidate areas, the method for determining the predicted focus area as the subsequent interaction location and generating the corresponding interaction prediction result can be as follows: compare the predicted focus area with each resource candidate area; if the predicted focus area overlaps with a resource candidate area or has a resource binding relationship, then determine that the predicted focus area meets the preset focus association condition; determine the predicted focus area as the subsequent interaction location; and generate the interaction prediction result based on the subsequent interaction location. This method allows for the early identification of the page area that the target object will subsequently operate on in keyboard navigation scenarios.

[0075] As can be seen from the above, by determining the current focus element and focus switching direction based on the focus switching event, and combining the arrangement order of focusable elements to determine the predicted focus area, a predictive basis can be provided for preloading web page resources in keyboard navigation scenarios, thereby improving the resource response efficiency during keyboard interaction.

[0076] Step S103: Based on the subsequent interaction position indicated by the interaction prediction result, determine the target resource candidate area that meets the preset position relationship from multiple resource candidate areas, and perform preloading processing on the resources to be loaded configured in the target resource candidate area.

[0077] The target resource candidate area can be any resource candidate area among multiple resource candidate areas that satisfies a preset positional relationship with the subsequent interaction position. The preset positional relationship can include conditions such as the subsequent interaction position being located within the resource candidate area, the subsequent interaction position intersecting with the resource candidate area, the distance between the subsequent interaction position and the resource candidate area being less than a preset threshold, and the predicted influence area overlapping with the candidate matching area corresponding to the resource candidate area. Preloading processing can refer to the process of initiating resource requests, cache writing, or loading status updates for the resources configured in the target resource candidate area before the target object actually accesses it.

[0078] Optionally, the method for determining the target resource candidate area can be as follows: determine the predicted influence area based on the subsequent interaction position indicated by the interaction prediction result; determine the candidate matching area based on the regional boundary of each resource candidate area and the resource loading attribute of the corresponding resource to be loaded; then perform position matching between the predicted influence area and each candidate matching area, and determine the resource candidate area that satisfies the preset position relationship as the target resource candidate area.

[0079] As can be seen from the above, the embodiments of this application obtain multiple resource candidate areas in the webpage, determine the behavior type based on the user behavior information of the target object in the webpage, predict the subsequent interaction position based on the behavior type, determine the target resource candidate area based on the subsequent interaction position, and perform resource preloading processing. This can make the webpage resource loading process match the user's subsequent interaction position, reduce invalid loading and loading lag problems, and improve the accuracy of webpage resource loading and page interaction response efficiency.

[0080] In one embodiment, a specific implementation process for determining a target resource candidate region that satisfies a preset positional relationship from multiple resource candidate regions is described. Please refer to [link / reference]. Figure 6 , Figure 6 This is a flowchart illustrating a specific implementation process for determining a target resource candidate region, as provided in an embodiment of this application. Figure 6 As shown, the specific implementation process includes the following steps: Step S601: Based on the subsequent interaction positions indicated by the interaction prediction results, determine the predicted influence area, wherein the predicted influence area is the page area formed by the subsequent interaction positions along the corresponding behavior direction.

[0081] The predicted influence area can be a page region formed by subsequent interaction locations along the corresponding behavior direction. The corresponding behavior direction can be the mouse movement direction corresponding to mouse movement, the scrolling direction corresponding to scroll wheel movement, or the focus switching direction corresponding to keyboard navigation. The predicted influence area represents the range of influence of subsequent interaction locations on the page.

[0082] Optionally, the method for determining the predicted influence area based on the subsequent interaction position indicated by the interaction prediction result can be as follows: extract the subsequent interaction position and corresponding behavior direction from the interaction prediction result; and extend the predicted influence area by a preset length or preset width along the corresponding behavior direction, using the subsequent interaction position as a reference. For example, under mouse movement behavior, the predicted influence area can be formed along the mouse prediction path direction; under scroll wheel behavior, the predicted influence area can be formed along the scrolling direction; and under keyboard navigation behavior, the predicted influence area can be formed along the focus switching direction.

[0083] Step S602: Based on the region boundary of each resource candidate region and the resource loading attributes of the corresponding resource to be loaded, determine the candidate matching region corresponding to each resource candidate region. The resource loading attributes include at least one of resource loading status, estimated loading time and resource priority.

[0084] The region boundary can be the boundary coordinates of the resource candidate region on the webpage. Resource loading attributes can be loading-related attributes of the resource to be loaded, including at least one of resource loading status, estimated loading time, and resource priority. The candidate matching region can be a page region determined based on the region boundary and resource loading attributes of the resource candidate region, used for location matching with the predicted influence region.

[0085] Optionally, the method for determining the candidate matching area corresponding to each resource candidate area based on the area boundary of each resource candidate area and the resource loading attributes of the corresponding resource to be loaded can be as follows: read the area boundary of each resource candidate area; obtain the resource loading status, estimated loading time, and resource priority of the resource to be loaded corresponding to each resource candidate area; expand or adjust the area boundary of the resource candidate area according to the resource loading attributes to obtain the candidate matching area. For example, for resources to be loaded with a long estimated loading time or a high resource priority, their candidate matching area can be appropriately expanded to allow for earlier matching judgment.

[0086] Step S603: Perform position matching between the predicted influence area and each candidate matching area to determine the position matching result corresponding to each resource candidate area, and determine the resource candidate area whose position matching result satisfies the preset position relationship as the target resource candidate area.

[0087] The location matching result can be the location relationship between the predicted influence area and the candidate matching area, such as intersection result, distance result, overlap range result, etc. The preset location relationship can be that the predicted influence area and the candidate matching area overlap, the distance between the predicted influence area and the candidate matching area is less than a preset threshold, or the overlap range between the predicted influence area and the candidate matching area is greater than a preset range threshold.

[0088] Optionally, the method of performing position matching between the predicted influence area and each candidate matching area, and determining the resource candidate area whose position matching results satisfy a preset positional relationship as the target resource candidate area, can be as follows: calculate the distance and overlap range between the predicted influence area and each candidate matching area respectively; if the distance between a candidate matching area and the predicted influence area is less than a preset threshold, or if there is overlap between the two and the overlap range reaches a preset range threshold, then the resource candidate area corresponding to the candidate matching area is determined as the target resource candidate area. In this way, resource candidate areas that are more suitable for subsequent interaction positions can be selected from multiple resource candidate areas.

[0089] As can be seen from the above, by forming a predicted influence area based on subsequent interaction locations and determining candidate matching areas in combination with resource loading attributes, the process of determining the target resource candidate area can simultaneously consider the interaction prediction location and resource loading requirements, thereby improving the accuracy of target resource candidate area matching.

[0090] In one embodiment, a specific implementation process for performing preloading processing on the resources to be loaded in the target resource candidate region configuration is described. Please refer to [reference needed]. Figure 7 , Figure 7 This is a flowchart illustrating a specific implementation process for preloading resources to be loaded, as provided in an embodiment of this application. Figure 7 As shown, the specific implementation process includes the following steps: Step S701: Based on the location matching results corresponding to the target resource candidate area, determine the predicted distance and predicted overlap range between the subsequent interaction location and the target resource candidate area, and obtain the resource loading attributes of the resource to be loaded configured in the target resource candidate area.

[0091] The predicted distance can be the spatial distance between the subsequent interaction location and the target resource candidate area. The predicted overlap range can be the overlap range between the predicted influence area or the area corresponding to the subsequent interaction location and the target resource candidate area. Resource loading attributes can include at least one of resource loading status, estimated loading time, and resource priority. Resource loading status can indicate whether the resource to be loaded has been loaded, is being loaded, or has not been loaded. Estimated loading time can indicate the estimated time required to load the resource to be loaded. Resource priority can indicate the processing priority of the resource to be loaded during the preloading process.

[0092] Optionally, based on the location matching results corresponding to the target resource candidate area, the predicted distance and predicted overlap range between the subsequent interaction location and the target resource candidate area can be determined, and the resource loading attributes of the resource to be loaded configured in the target resource candidate area can be obtained as follows: read the positional relationship between the predicted influence area and the target resource candidate area from the location matching results; calculate the predicted distance and predicted overlap range based on the positional relationship; and then obtain the resource loading status, estimated loading time, and resource priority of the corresponding resource to be loaded from the resource configuration data of the target resource candidate area.

[0093] Step S702: Based on the predicted distance, predicted overlap range, and resource loading attributes, determine the loading trigger window corresponding to the target resource candidate area, and generate a preloading instruction corresponding to the resource to be loaded if the loading trigger window meets the preset loading trigger conditions.

[0094] The loading trigger window can be a time window or a condition window used to determine whether to trigger preloading processing. Preset loading trigger conditions can be conditions that the loading trigger window meets, such as the predicted distance being less than a preset distance threshold, the predicted overlap range being greater than a preset range threshold, the resource to be loaded not being in a loaded state, or the estimated loading time matching the prediction lead. The preloading instruction can be a control instruction used to instruct the loading module to perform preloading processing on the resource to be loaded.

[0095] Optionally, the loading trigger window corresponding to the target resource candidate area can be determined based on the predicted distance, the predicted overlap range, and the resource loading attributes by: determining the degree to which the target object is close to the target resource candidate area based on the predicted distance; determining the degree of matching between the subsequent interaction position and the target resource candidate area based on the predicted overlap range; and determining the loading trigger window by combining the resource loading status, the estimated loading time, and the resource priority.

[0096] Optionally, if the loading trigger window meets the preset loading trigger conditions, the method for generating the preloading instruction corresponding to the resource to be loaded can be as follows: Generate the preloading instruction when the loading trigger window meets the preset loading trigger conditions. For example, when the image resource corresponding to the target resource candidate area is not loaded, and the prediction distance is small and the prediction overlap range is large, a preloading instruction corresponding to that image resource can be generated.

[0097] Step S703: Based on the preloading instruction, perform preloading processing on the resources to be loaded configured in the target resource candidate area, and associate the loading status of the resources to be loaded with the target resource candidate area.

[0098] The associated record can be a record that stores the loading status of the resource to be loaded and the target resource candidate area, which is used to determine whether the resource configured in the target resource candidate area has been loaded. The loading status can include not loaded, loading, loaded, or loading failed.

[0099] Optionally, based on the preloading instruction, the method for performing preloading processing on the resources to be loaded configured in the target resource candidate area and associating the loading status of the resources to be loaded with the target resource candidate area can be as follows: determine the resources to be loaded that need to be preloaded according to the preloading instruction; initiate a resource request to the resource server or local cache; after the resource request is initiated, update the loading status of the resources to be loaded to loading; after the resource loading is completed, update the loading status to loaded and associate the loading status with the target resource candidate area. If the resource loading fails, the loading status can be recorded as loading failed so that loading can be retried or degraded loading can be performed later.

[0100] As can be seen from the above, by determining the loading trigger window based on the predicted distance, predicted overlap range and resource loading attributes, and generating a preloading instruction when the preset loading trigger conditions are met, the resource preloading process can be matched with the subsequent interaction position and resource loading requirements, avoiding the invalid loading problem caused by simply loading upon hit.

[0101] In summary, the webpage resource loading method provided in this application obtains multiple resource candidate areas in a webpage, monitors user behavior information of the target object on the webpage and determines the behavior type, then predicts the subsequent interaction position for different behavior types, further determines the target resource candidate area based on the subsequent interaction position, and performs preloading processing on the resources to be loaded configured in the target resource candidate area. This method can prepare the corresponding resources in advance before the target object actually arrives at or operates on the relevant page area, reducing the problem of mismatch between the resource loading triggering time and the user's actual interaction needs, and improving the accuracy of webpage resource loading and the smoothness of page interaction.

[0102] Figure 8 This is a structural block diagram of a webpage resource loading device provided in an embodiment of this application. The device is configured to execute the webpage resource loading method provided in the above embodiment, and possesses the corresponding functional modules and beneficial effects of the method. For example... Figure 8 As shown, the device specifically includes: The listening device 801 is configured to acquire multiple resource candidate areas in a webpage and listen to the user behavior information of the target object in the webpage to obtain the behavior type corresponding to the user behavior information. The resource candidate area is a page area configured with resources to be loaded. The prediction module 802 is configured to predict the subsequent interaction positions of the target object in the webpage based on the behavior type, and generate an interaction prediction result to represent the predicted subsequent interaction positions. The preloading module 803 is configured to determine a target resource candidate area that meets a preset positional relationship from multiple resource candidate areas based on the subsequent interaction position indicated by the interaction prediction result, and to perform preloading processing on the resources to be loaded configured in the target resource candidate area.

[0103] As described above, by acquiring multiple resource candidate areas on a webpage and combining this with user behavior information of the target object on the webpage to determine the corresponding behavior type, the subsequent interaction position of the target object is further predicted to obtain the interaction prediction result. Then, based on the interaction prediction result, the target resource candidate area is determined from the multiple resource candidate areas, and the configured resources to be loaded are preloaded when the preset loading trigger conditions are met. This achieves preloading of webpage resources based on actual user interaction trends, avoiding reliance solely on fixed visible areas or scroll positions for loading judgment, reducing invalid resource loading and loading lag issues, and improving the accuracy of webpage resource loading and page interaction response efficiency.

[0104] In one possible embodiment, the listening device 801 is specifically configured as follows: Based on the current page display range, candidate resource areas that meet the preset proximity conditions with the current page display range are determined from multiple resource candidate areas, and the behavior sampling range is determined based on the regional location of the candidate resource areas. When a page interaction event is triggered by the target object, the event type, page position parameters and trigger time corresponding to the page interaction event are obtained. If the page position parameters are within the behavior sampling range, or the distance between the page position parameters and the behavior sampling range is less than a preset distance threshold, the page interaction event is determined as a candidate behavior event. Multiple candidate behavioral events acquired consecutively are sorted according to the trigger time to obtain a behavioral event sequence, and user behavior information is determined based on the behavioral event sequence. Based on the event type of each candidate behavior event in the behavior event sequence, the behavior type corresponding to the user behavior information is determined, wherein the behavior type is one of mouse movement behavior, scroll wheel behavior, or keyboard navigation behavior.

[0105] In one possible embodiment, the prediction module 802 is specifically configured as follows: When the behavior type is mouse movement, extract consecutive mouse movement events from the behavior event sequence, and generate a sequence of mouse trajectory points based on the page position parameters and trigger time of each mouse movement event. Based on the direction and magnitude of position change between adjacent mouse trajectory points, jittery trajectory points in the mouse trajectory point sequence are filtered to obtain the target trajectory segment; Based on the starting and ending trajectory points of the target trajectory segment, determine the mouse movement direction and amplitude of the target object, and based on the mouse movement direction and amplitude, determine the mouse prediction path. Based on the extension position of the mouse prediction path on the webpage, the subsequent interaction position of the target object on the webpage is determined, and the corresponding interaction prediction results are generated.

[0106] In one possible embodiment, the prediction module 802 is further configured as follows: When the behavior type is scroll wheel scrolling, extract continuous scrolling events from the behavior event sequence, and determine the scrolling direction, display range offset and scrolling duration of the target object based on the page position parameters and triggering time of each continuous scrolling event. Based on the scrolling direction, display range offset, and current page display range, the current page display range is extrapolated along the scrolling direction to obtain at least one predicted display range, and a scrolling prediction coverage area is generated based on at least one predicted display range. The scroll prediction coverage area is matched with each resource candidate area, and the page position corresponding to the resource candidate area that satisfies the positional correspondence with the scroll prediction coverage area is determined as the subsequent interaction position, generating the corresponding interaction prediction result.

[0107] In one possible embodiment, the prediction module 802 is further configured as follows: When the behavior type is keyboard navigation, extract consecutive focus switching events from the behavior event sequence, and determine the current focus element and focus switching direction based on the page position parameters corresponding to each focus switching event; Based on the current focus element, the focus switching direction, and the arrangement order of focusable elements in the webpage, the target focus element is determined, and the page area of ​​the target focus element in the webpage is determined as the predicted focus area. If the predicted focus area and at least one of the resource candidate areas meet the preset focus association conditions, the predicted focus area is determined as the subsequent interaction location, and the corresponding interaction prediction result is generated.

[0108] In one possible embodiment, the preloading module 803 is specifically configured as follows: Based on the subsequent interaction positions indicated by the interaction prediction results, the predicted influence area is determined, where the predicted influence area is the page area formed by the subsequent interaction positions along the corresponding behavior direction; Based on the regional boundaries of each resource candidate region and the resource loading attributes of the corresponding resource to be loaded, the candidate matching region corresponding to each resource candidate region is determined. The resource loading attributes include at least one of resource loading status, estimated loading time, and resource priority. The predicted impact area is matched with each candidate matching area to determine the location matching result corresponding to each resource candidate area, and the resource candidate area whose location matching result satisfies the preset location relationship is determined as the target resource candidate area.

[0109] In one possible embodiment, the preloading module 803 is further configured as follows: Based on the location matching results corresponding to the target resource candidate area, the predicted distance and predicted overlap range between the subsequent interaction location and the target resource candidate area are determined, and the resource loading attributes of the resource to be loaded configured in the target resource candidate area are obtained. Based on the predicted distance, predicted overlap range, and resource loading attributes, the loading trigger window corresponding to the target resource candidate area is determined, and if the loading trigger window meets the preset loading trigger conditions, the preloading instruction corresponding to the resource to be loaded is generated. Based on the preload instruction, preload processing is performed on the resources to be loaded configured in the target resource candidate area, and the loading status of the resources to be loaded is associated with the target resource candidate area and recorded.

[0110] Figure 9 A schematic diagram of a webpage resource loading device provided in an embodiment of this application is shown below. Figure 9 As shown, the device includes a processor 901, a memory 902, an input device 903, and an output device 904.

[0111] The number of processors 901 can be one or more. Figure 9 Taking a processor 901 as an example; the processor 901, memory 902, input device 903, and output device 904 can be connected via a bus or other means. Figure 9 Taking a bus connection as an example, the memory 902, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the webpage resource loading method in this embodiment. The processor 901 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 902, thereby implementing the aforementioned webpage resource loading method. The input device 903 can be configured to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 904 may include a display device such as a screen.

[0112] This application also provides a non-volatile storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are configured to perform a webpage resource loading method described in the above embodiments. The method includes: acquiring multiple resource candidate areas in a webpage, and monitoring user behavior information of a target object in the webpage to obtain the behavior type corresponding to the user behavior information; predicting the subsequent interaction position of the target object in the webpage based on the behavior type, and generating an interaction prediction result to characterize the predicted subsequent interaction position; determining a target resource candidate area that satisfies a preset positional relationship from the multiple resource candidate areas based on the subsequent interaction position indicated by the interaction prediction result, and performing preloading processing on the resources to be loaded configured in the target resource candidate area.

[0113] It is worth noting that in the embodiments of the web page resource loading device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not configured to limit the protection scope of the embodiments of this application.

[0114] In some possible implementations, various aspects of the methods provided in this application can also be implemented as a program product comprising program code that, when run on a computer device, is configured to cause the computer device to perform the steps of the methods according to the various exemplary embodiments of this application described above. For example, the computer device may execute the web page resource loading method described in the embodiments of this application. The program product may be implemented using a combination of one or more readable media.

Claims

1. A method for loading web page resources, characterized in that, include: Multiple resource candidate areas in a webpage are obtained, and user behavior information of the target object in the webpage is monitored to obtain the behavior type corresponding to the user behavior information. The resource candidate areas are page areas configured with resources to be loaded. Based on the behavior type, the subsequent interaction positions of the target object in the webpage are predicted, and an interaction prediction result is generated to characterize the predicted subsequent interaction positions. Based on the subsequent interaction positions indicated by the interaction prediction results, a target resource candidate area that satisfies a preset positional relationship is determined from multiple resource candidate areas, and the resources to be loaded configured in the target resource candidate area are preloaded.

2. The method for loading web page resources according to claim 1, characterized in that, The monitoring target object's user behavior information on the webpage is used to obtain the behavior type corresponding to the user behavior information, including: Based on the current page display range, candidate resource areas that meet preset proximity conditions with the current page display range are determined from multiple resource candidate areas, and the behavior sampling range is determined based on the regional location of the candidate resource areas. When the target object triggers a page interaction event, the event type, page position parameter and trigger time corresponding to the page interaction event are obtained, and the page interaction event is determined as a candidate behavior event when the page position parameter is within the behavior sampling range or the distance between the page position parameter and the behavior sampling range is less than a preset distance threshold. The multiple candidate behavioral events acquired consecutively are sorted according to the trigger time to obtain a behavioral event sequence, and the user behavior information is determined based on the behavioral event sequence. Based on the event type of each candidate behavior event in the behavior event sequence, the behavior type corresponding to the user behavior information is determined, wherein the behavior type is one of mouse movement behavior, scroll wheel behavior, or keyboard navigation behavior.

3. The method for loading web page resources according to claim 2, characterized in that, The step of predicting the subsequent interaction positions of the target object on the webpage based on the behavior type, and generating an interaction prediction result to characterize the predicted subsequent interaction positions, includes: When the behavior type is mouse movement behavior, continuous mouse movement events are extracted from the behavior event sequence, and a mouse trajectory point sequence is generated based on the page position parameters and trigger time of each mouse movement event. Based on the direction and magnitude of position change between adjacent mouse trajectory points, jittery trajectory points in the mouse trajectory point sequence are filtered to obtain the target trajectory segment. Based on the starting and ending trajectory points of the target trajectory segment, the mouse movement direction and mouse movement amplitude of the target object are determined, and based on the mouse movement direction and mouse movement amplitude, the mouse prediction path is determined. Based on the extension position of the mouse prediction path in the webpage, the subsequent interaction position of the target object in the webpage is determined, and the corresponding interaction prediction result is generated.

4. The method for loading web page resources according to claim 2, characterized in that, The step of predicting the subsequent interaction positions of the target object on the webpage based on the behavior type, and generating an interaction prediction result to characterize the predicted subsequent interaction positions, includes: When the behavior type is scroll wheel behavior, continuous scroll events are extracted from the behavior event sequence, and the scrolling direction, display range offset and scrolling duration of the target object are determined based on the page position parameters and trigger time of each continuous scroll event. Based on the scrolling direction, the display range offset, and the current page display range, the current page display range is extrapolated along the scrolling direction to obtain at least one predicted display range, and a scrolling prediction coverage area is generated based on the at least one predicted display range. The scroll prediction coverage area is matched with each resource candidate area, and the page position corresponding to the resource candidate area that satisfies the positional correspondence with the scroll prediction coverage area is determined as the subsequent interaction position, generating the corresponding interaction prediction result.

5. The method for loading web page resources according to claim 2, characterized in that, The step of predicting the subsequent interaction positions of the target object on the webpage based on the behavior type, and generating an interaction prediction result to characterize the predicted subsequent interaction positions, includes: When the behavior type is keyboard navigation behavior, continuous focus switching events are extracted from the behavior event sequence, and the current focus element and focus switching direction are determined based on the page position parameters corresponding to each focus switching event. Based on the current focus element, the focus switching direction, and the arrangement order of focusable elements in the webpage, the target focus element is determined, and the page area of ​​the target focus element in the webpage is determined as the predicted focus area. If the predicted focus area and at least one of the resource candidate areas meet the preset focus association conditions, the predicted focus area is determined as the subsequent interaction position, and the corresponding interaction prediction result is generated.

6. The method for loading web page resources according to claim 1, characterized in that, The step of determining a target resource candidate region that satisfies a preset positional relationship from multiple resource candidate regions based on the subsequent interaction position indicated by the interaction prediction result includes: Based on the subsequent interaction positions indicated by the interaction prediction results, a predicted influence area is determined, wherein the predicted influence area is a page area formed by the subsequent interaction positions along the corresponding behavioral direction; Based on the regional boundaries of each resource candidate region and the resource loading attributes of the corresponding resource to be loaded, a candidate matching region corresponding to each resource candidate region is determined. The resource loading attributes include at least one of resource loading status, estimated loading time, and resource priority. The predicted influence area is matched with each candidate matching area to determine the location matching result corresponding to each resource candidate area, and the resource candidate area whose location matching result satisfies the preset location relationship is determined as the target resource candidate area.

7. The method for loading web page resources according to claim 6, characterized in that, The preloading process for the resources to be loaded configured in the target resource candidate region includes: Based on the location matching results corresponding to the target resource candidate area, the predicted distance and predicted overlap range between the subsequent interaction location and the target resource candidate area are determined, and the resource loading attributes of the resource to be loaded configured in the target resource candidate area are obtained. Based on the predicted distance, the predicted overlap range, and the resource loading attributes, a loading trigger window corresponding to the target resource candidate area is determined, and a preloading instruction corresponding to the resource to be loaded is generated when the loading trigger window meets the preset loading trigger conditions. Based on the preloading instruction, preloading processing is performed on the resources to be loaded configured in the target resource candidate area, and the loading status of the resources to be loaded is associated with and recorded with the target resource candidate area.

8. A web page resource loading device, characterized in that, include: A listening device is configured to acquire multiple resource candidate areas in a webpage and listen to user behavior information of a target object in the webpage to obtain the behavior type corresponding to the user behavior information, wherein the resource candidate area is a page area configured with resources to be loaded. The prediction module is configured to predict the subsequent interaction positions of the target object in the webpage based on the behavior type, and generate an interaction prediction result to characterize the predicted subsequent interaction positions. The preloading module is configured to determine a target resource candidate area that satisfies a preset positional relationship from multiple resource candidate areas based on the subsequent interaction position indicated by the interaction prediction result, and to perform preloading processing on the resources to be loaded configured in the target resource candidate area.

9. A web page resource loading device, characterized in that, The device includes: one or more processors; and a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method for loading web page resources according to any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, The computer program is stored in a computer-readable storage medium, and at least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the method for loading web page resources according to any one of claims 1-7.