Front-end resource dynamic preloading method and system based on user behavior intention prediction

By collecting user behavior data in real time in the client browser and using an intent prediction model for dynamic preloading, the problem of insufficient accuracy and timeliness of preloading in existing technologies is solved, achieving more efficient resource utilization and improved user experience.

CN120803564APending Publication Date: 2025-10-17BEIJING HESI HUIZHI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202511248314.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing front-end resource preloading technology has deficiencies in accuracy, timeliness, and adaptability. It is difficult to adapt to the diversity of user behavior and the dynamic changes in page content, resulting in limited preloading efficiency.

Method used

By collecting continuous user behavior data in real time in the client browser, generating behavior feature vectors, and using an intent prediction model deployed on the client to predict click intent, dynamically creating browser preload tags, and dynamically preloading front-end resources.

Benefits of technology

It improves the accuracy and timeliness of preloading, reduces unnecessary bandwidth consumption, enhances resource utilization and page loading efficiency, reduces waste of server and network resources, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803564A_ABST
    Figure CN120803564A_ABST
Patent Text Reader

Abstract

The invention provides a front-end resource dynamic preloading method and system based on user behavior intention prediction, and relates to the technical field of computers, and the method comprises the steps: collecting continuous behavior data of a user in real time in a client browser, carrying out the feature extraction of the collected behavior data, and generating a behavior feature vector; on the basis of an intention prediction model deployed at a client, according to the behavior feature vector, performing real-time prediction on the click intention probability of each interactive element in the page; when the predicted click intention probability exceeds a preset threshold value, triggering a resource preloading instruction; and according to the resource preloading instruction, dynamically creating a browser preloading label, and starting background downloading of a target resource so as to perform dynamic preloading of a front-end resource. According to the method and the device, the resource utilization rate and the page loading efficiency are improved, so that the waste of a server and network resources is reduced while the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a front-end resource dynamic preloading method and system based on user behavior intention prediction. BACKGROUND

[0002] In modern web applications, improving page loading speed and response performance is the key to improving user experience. Existing front-end resource preloading techniques mainly include static preloading and preloading based on simple events. Static preloading is implemented by hard-coding preloading tags in HTML, but it lacks flexibility and is prone to waste bandwidth. Although preloading based on hover events is slightly intelligent, it triggers too late and has low accuracy in judging intention, and cannot accurately reflect the user's real click intention. In addition, these methods are difficult to adapt to the diversity of user behavior and the dynamic changes of page content, resulting in limited preloading efficiency. Therefore, the existing technology still has obvious deficiencies in the accuracy, timeliness and adaptability of preloading. SUMMARY

[0003] The purpose of the present application is to provide a front-end resource dynamic preloading method and system based on user behavior intention prediction to alleviate the above technical problems in the prior art.

[0004] In a first aspect, the present application provides a front-end resource dynamic preloading method based on user behavior intention prediction, comprising: Collecting continuous behavior data of a user in real time in a client browser, extracting features from the collected behavior data, and generating a behavior feature vector; Based on an intention prediction model deployed on the client, the click intention probability of each interactive element in the page is predicted in real time according to the behavior feature vector; When the predicted click intention probability exceeds a preset threshold, a resource preloading instruction is triggered; According to the resource preloading instruction, a browser preloading tag is dynamically created, and the background download of the target resource is started to perform dynamic preloading of the front-end resource.

[0005] In an optional embodiment, the collected behavior data is extracted to generate a behavior feature vector, comprising: The collected raw behavior data is subjected to time window sliding processing; the behavior data at least includes one or more of mouse movement trajectory coordinates, page scrolling position, or hovering time over an interactive element; In the corresponding time window, the behavior data is extracted to extract feature parameters; the feature parameters at least include one or more of speed, acceleration, direction vector, and dwell time; According to the feature parameters, a feature vector sequence containing multiple time steps is generated.

[0006] In an optional embodiment, the feature parameters further include a dwell time statistic of the mouse on the interactive element, and the behavior data is feature extracted in a corresponding time window, and the feature parameters include: In each time window, a horizontal speed, a vertical speed, and a combined speed of the mouse movement track are calculated; A direction angle, a horizontal acceleration, a vertical acceleration, and a combined acceleration of the mouse movement track are calculated; A dwell time of the mouse on the interactive element is counted, wherein the dwell time is a time period during which the mouse stays in the element region and a displacement change in the time period is less than a displacement threshold.

[0007] In an optional embodiment, according to the feature parameters, a feature vector sequence containing multiple time steps is generated, including: For each time window, a corresponding feature vector is constructed, and the feature vector contains the following feature parameters: the horizontal speed, the vertical speed, the combined speed, the direction angle, the horizontal acceleration, the vertical acceleration, the combined acceleration, and the dwell time of the mouse on the interactive element; The feature vectors of all time windows are spliced in time sequence to generate a feature vector sequence containing multiple time steps, and the feature vector sequence is used as an input of a subsequent behavior recognition or analysis model.

[0008] In an optional embodiment, the intention prediction model includes a lightweight machine learning model running based on TensorFlow.js, and the structure includes an input layer, an LSTM layer, and an output layer; wherein: The input layer is configured to receive a behavior vector sequence corresponding to a behavior feature vector; The LSTM layer is configured to obtain a time dependence of the behavior vector sequence; The output layer is configured to output a click intention probability value of the interactive element.

[0009] In an optional embodiment, according to the resource preloading instruction, a browser preloading tag is dynamically created, including: According to the resource preloading instruction, a document header element is dynamically generated; A web hyperlink attribute type is configured, and a target attribute is determined as a resource preloading attribute; Resource location information is determined as a URL format; The dynamically generated document header element is inserted into a document header of a current page to dynamically create a browser preloading tag.

[0010] In an optional embodiment, the method further comprises: updating the model based on difference data between the prediction result of the intention prediction model and the actual behavior of the user.

[0011] The updating of the intention prediction model comprises the following steps: The server receives the prediction record uploaded by the client and the actual behavior data of the user; retraining the prediction model based on the actual behavior data of the user to obtain an updated intention prediction model; The updated intention prediction model is distributed to the client to replace the original model.

[0012] In a second aspect, the present application provides a front-end resource dynamic preloading system based on user behavior intention prediction, comprising: A feature extraction module is configured to collect continuous behavior data of a user in real time in a client browser, extract features from the collected behavior data, and generate a behavior feature vector; A prediction module is configured to predict the click intention probability of each interactive element in a page in real time based on an intention prediction model deployed on the client according to the behavior feature vector; A triggering module is configured to trigger a resource preloading instruction when the predicted click intention probability exceeds a preset threshold; A preloading module is configured to dynamically create a browser preloading tag according to the resource preloading instruction, start background download of target resources, and perform dynamic preloading of front-end resources.

[0013] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory stores computer executable instructions executable by the processor, and the processor executes the computer executable instructions to implement the front-end resource dynamic preloading method based on user behavior intention prediction according to any one of the preceding embodiments.

[0014] In a fourth aspect, the present application provides a computer readable storage medium storing computer executable instructions, wherein the computer executable instructions, when invoked and executed by a processor, cause the processor to implement the front-end resource dynamic preloading method based on user behavior intention prediction according to any one of the preceding embodiments.

[0015] The front-end resource dynamic preloading method and system based on user behavior intention prediction provided by the present application have the following advantages: By collecting the continuous behavior data of the user in real time in the client browser and performing feature extraction, more abundant and more predictive behavior features than single events (such as hovering) can be obtained, and the accuracy of the intention judgment is improved; the local intention prediction model deployed in the client is used, so that the system can make a preloading decision hundreds of milliseconds before the user clicks, and the preloading triggering time is significantly advanced; the method of dynamically creating a browser preloading label ensures the flexibility and real-time performance of the loading strategy; through the probability threshold control mechanism, only resources with high intention probability are preloaded, unnecessary bandwidth consumption is effectively reduced, resource utilization and page loading efficiency are improved, so that the user experience is improved, and the waste of server and network resources is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the specific embodiments or prior art of the present application, the drawings needed to be used in the description of the specific embodiments or prior art will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0017] Figure 1 A flowchart of a front-end resource dynamic preloading method based on user behavior intention prediction provided by an embodiment of the present application; Figure 2 A specific framework of a front-end resource dynamic preloading system based on user behavior intention prediction provided by an embodiment of the present application; Figure 3 A specific execution process provided by an embodiment of the present application; Figure 4 A structural diagram of a front-end resource dynamic preloading system based on user behavior intention prediction provided by an embodiment of the present application; Figure 5 A structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0019] Therefore, the following detailed description of embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application claimed, but merely represents selected embodiments of the application. Based upon the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present application.

[0020] It should be noted that similar reference numbers and letters represent similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0021] The embodiments of the present application provide a front-end resource dynamic preloading method based on user behavior intention prediction, referring to FIG. 1, the method mainly includes the following steps: Figure 1 S110, continuously collecting user behavior data in the client browser in real time, performing feature extraction on the collected behavior data, and generating a behavior feature vector.

[0022] In an embodiment, the behavior collection module can be deployed in the client browser, and the continuous behavior data of the user can be obtained in real time by listening to events such as mousemove, scroll, click, etc. The behavior data can include mouse coordinates, scroll position, hover time, etc., which are used for subsequent feature extraction and intention prediction.

[0023] After the above behavior data is obtained, the original behavior data collected can be processed by a time window sliding mechanism for feature extraction, and feature parameters including speed, acceleration, direction vector, and dwell time are extracted to generate a behavior feature vector. The behavior feature vector is used to represent the operation intention of the user, thereby facilitating the prediction ability of the subsequent intention model.

[0024] S120, based on the intention prediction model deployed in the client, the click intention probability of each interactive element in the page is predicted in real time according to the behavior feature vector.

[0025] A lightweight machine learning model (such as an LSTM network) based on TensorFlow.js is deployed in the client browser, which receives the behavior feature vector as input and outputs the click intention probability of each interactive element in the page.

[0026] ​The intention prediction model comprises a lightweight machine learning model running based on TensorFlow.js, and the structure comprises an input layer, an LSTM layer and an output layer; wherein: the input layer is used to receive a behavior vector sequence corresponding to a behavior feature vector; the LSTM layer is used to obtain the time dependence of the behavior vector sequence; and the output layer is used to output a click intention probability value of the interactable element.

[0027] Preferably, to improve the prediction effect of the model, model updating can be performed based on difference data between the prediction result of the intention prediction model and the actual behavior of the user. In specific implementation, the updating of the intention prediction model can first receive the prediction record uploaded by the client and the actual behavior data of the user by the server, then retrain the prediction model based on the actual behavior data of the user to obtain an updated intention prediction model, and finally distribute the updated intention prediction model to the client to replace the original model.

[0028] S130, when the predicted click intention probability exceeds a preset threshold, triggering a resource preloading instruction.

[0029] When the click intention probability of a certain element exceeds a preset threshold (such as 0.8), the system determines that the user has a high probability of clicking the link, and the resource preloading instruction is triggered.

[0030] S140, according to the resource preloading instruction, dynamically creating a browser preloading tag, starting the background download of the target resource to perform dynamic preloading of the front-end resource.

[0031] According to the triggering instruction, a preloading tag is dynamically created and inserted into the document header part of the current page, and the browser will automatically download the target resource in the background to prepare for the content loading after the user clicks. In specific implementation, the following steps A to D can be included: Step A, dynamically generating a document header element according to the resource preloading instruction. In actual application, the document header element refers to an HTML link tag.

[0032] Step B, configuring the attribute type of the web hyperlink, and determining that the target attribute is a resource preloading attribute. The attribute of the web hyperlink is the rel attribute, and the resource preloading attribute is prefetch or preload.

[0033] Step C, determining the resource location information as a URL format. The resource location information refers to the href attribute.

[0034] Step D, inserting the dynamically generated document header element into the document header of the current page to dynamically create a browser preloading tag.

[0035] The above method improves the accuracy and timeliness of the preloading trigger by collecting continuous behavior data in real time and combining a machine learning model to predict user intent, avoiding resource waste caused by misjudgment in traditional methods. At the same time, the dynamic creation of preloading labels enhances the flexibility of the loading strategy, making resource loading more in line with user actual needs, thereby improving page response speed and user experience.

[0036] For ease of understanding, the above-mentioned front-end resource dynamic preloading method based on user behavior intent prediction provided by the embodiments of the present application is described in detail below.

[0037] The above-mentioned behavior data is collected and feature extraction is performed to generate a behavior feature vector. In specific implementation, the following steps can be included: Step 1-1, time window sliding processing is performed on the collected original behavior data; the behavior data includes at least one or more of mouse movement trajectory coordinates, page scrolling position, or dwell time on an interactive element.

[0038] The original behavior data collected (such as mouse coordinate sequence, scrolling position, etc.) is subjected to time window sliding processing, for example, data can be collected every 50 ms, thereby generating behavior segments within a continuous time window.

[0039] Step 1-2, feature extraction is performed on the behavior data in the corresponding time window, and feature parameters are extracted; the feature parameters include at least one or more of speed, acceleration, direction vector, and dwell time.

[0040] In each of the above-mentioned corresponding time windows, the speed, acceleration, direction vector of mouse movement, and dwell time on an interactive element are extracted based on the above-mentioned behavior data.

[0041] The above-mentioned feature parameters also include dwell time statistics of the mouse on the interactive element. Further, the above-mentioned step 1-2 of feature extraction on the behavior data in the corresponding time window to extract feature parameters can further include steps 1-2.1 to 1-2.3: Step 1-2.1, in each time window, the horizontal speed, vertical speed, and combined speed of the mouse movement trajectory are calculated; Step 1-2.2, the direction angle, horizontal acceleration, vertical acceleration, and combined acceleration of the mouse movement trajectory are calculated; Step 1-2.3, the dwell time of the mouse on the interactive element is counted, wherein the dwell time is the time the mouse stays in the element area for more than a preset threshold, and the displacement changes less than a displacement threshold within the dwell time.

[0042] When the dwell time is counted, it can be detected whether the mouse is in the region of a certain interactive element in each time window, and the dwell time is counted. Only when the mouse stays in the region for more than a preset threshold (such as 200 ms) and the displacement change is less than a displacement threshold (such as 5px), it is determined as an effective stay.

[0043] This way effectively filters the user's unconscious sliding behavior by introducing a displacement change threshold and a dwell time threshold, improves the accuracy of intent recognition, and reduces the false loading situation.

[0044] Steps 1-3, generate a feature vector sequence containing multiple time steps according to the feature parameters.

[0045] Encapsulate the feature parameters in each time window as a feature vector, and concatenate in time sequence to form a feature vector sequence containing multiple time steps as model input.

[0046] The above method can capture the time dependence and dynamic change trend of user behavior through the time window sliding mechanism and feature parameter extraction, improve the input quality of the intent prediction model, and thus improve the prediction accuracy.

[0047] Further, the above-mentioned generation of a feature vector sequence containing multiple time steps according to the feature parameters can further include the following steps 1-3.1 and 1-3.2: Step 1-3.1, for each time window, construct a corresponding feature vector, which contains the following feature parameters: horizontal velocity, vertical velocity, combined velocity, direction angle, horizontal acceleration, vertical acceleration, combined acceleration, and dwell time of the mouse on the interactive element.

[0048] When constructing the feature vector, for each time window, construct a vector containing the following feature parameters: horizontal velocity, vertical velocity, combined velocity, direction angle, horizontal acceleration, vertical acceleration, combined acceleration, and dwell time.

[0049] Step 1-3.2, concatenate the feature vectors of all time windows in time sequence to generate a feature vector sequence containing multiple time steps, and the feature vector sequence is used as input for subsequent behavior recognition or analysis model.

[0050] When performing multi-time step concatenation, the feature vectors of all time windows can be concatenated in time sequence to form a complete feature vector sequence containing multiple time steps for model input.

[0051] This way enables the model to process the time sequence information of user behavior, enhances its ability to recognize behavior trends, and thus improves the accuracy and robustness of the prediction model.

[0052] Figure 2 A specific framework of a user behavior intention prediction based front-end resource dynamic preloading system for implementing the above-mentioned user behavior intention prediction based front-end resource dynamic preloading method is shown. Among them, The above-mentioned service end platform includes a data receiving and storing module and a model training module, which is used to receive the log data returned by the client, and to train and update the model.

[0053] The client agent runs in the user browser, including a data acquisition module, a feature extraction module, a local prediction module and a preloading execution module.

[0054] When the service end platform and the client agent interact, the service end platform downloads the trained and updated model (i.e. the latest model) to the client, and the client returns the log data to the service end platform after prediction by the model, to form a continuous optimization closed loop.

[0055] Based on the above-mentioned system architecture, Figure 3 A specific execution process is shown, including the following steps S101 to S108: S101, page loading, client agent initialization, loading local prediction model.

[0056] In actual application, this step is used for system initialization. When the user accesses the website page, the client agent JS script deployed in the page starts to execute. The script first loads the latest version of the intention prediction model file (for example, from the CDN address https: / / cdn.ekuaibao.com / model / intent_v1 / model.json) hosted by the service end platform through network request.

[0057] S102, real-time cyclic acquisition of original user behavior data (mouse, scroll, touch, etc.).

[0058] S103, processing the original user behavior data into a feature vector.

[0059] The above-mentioned steps S102 and S103 are mainly that the client agent listens to the mousemove, scroll and other events through addEventListener, and uses requestAnimationFrame or throttling technology (for example, every 50ms) for high-frequency sampling. The original data collected (such as mouse coordinate sequence) is processed into a feature vector (such as moving speed, directionality, and residence time near the interactive element).

[0060] For example, in one sampling period, the mouse coordinate sequence [(100, 200), (110, 205), (125, 212)] is collected. The average speed, acceleration, and direction vector can be calculated. At the same time, it is detected that the mouse is currently hovering over the link with ID "product-link", and the dwell time has increased by 50 ms.

[0061] S104, input the feature vector into the prediction model.

[0062] S105, the model outputs the intent probability of each element.

[0063] The above S104 and S105 mainly input the feature vector sequence of the last N sampling periods into the TensorFlow.js model loaded locally. The model calculates and outputs the intent probability of all interactive elements in the field of view in real time. For example, the model output result is {"product-link": 0.85, "contact-link": 0.15, "about-link": 0.1}.

[0064] S106, judge whether the probability is greater than the preset threshold. If yes, execute S107, if not, execute S102.

[0065] S107, get the target resource URL, dynamically create a link tag, and execute preloading.

[0066] Suppose the preset probability threshold T = 0.8. At this time, the probability of "link-A" is 0.85 > 0.8, triggering preloading. The client agent executes JavaScript code, dynamically creates <link rel="prefetch" href="..."> the tag and inserts it into the document header, and the browser starts to download the resource pointed by the link in the background.

[0067] S108, record the prediction and actual results, and regularly return the data to the server.

[0068] The agent continues to listen to the user's final click event. If the user indeed clicks "link-A" within the specified time, a successful prediction log is sent to the server. If the user clicks other links or does not click, a failed prediction log is sent. These logs will be used for the next round of model training on the server to continuously improve the accuracy of the model.

[0069] In summary, by analyzing the continuous behavior trajectory of the user (rather than a single hover event), the operation intention of the user can be accurately predicted hundreds or even thousands of milliseconds before the user explicitly clicks, thereby obtaining a key time window for preloading front-end resources. Based on the complex pattern recognition capability of the machine learning model, this method can effectively filter out interference noise such as unconscious mouse movement, and only accurately preloads targets with high intention probability, thereby significantly reducing the misjudgment rate. The system has continuous learning capability and can automatically adapt to the page layout of different websites and the behavior characteristics of user groups, without the need for manual maintenance of rules by the developer. Since the target resource is most likely to have been preloaded, the page switching after the user clicks the link is almost instantaneous, thereby significantly reducing the perceived loading delay and greatly improving the interactive experience.

[0070] Based on the above method embodiment, an embodiment of the present application also provides a front-end resource dynamic preloading system based on user behavior intention prediction, as shown in Figure 4 The system mainly includes the following parts: A feature extraction module 410 is configured to collect continuous behavior data of a user in real time in a client browser, extract features from the collected behavior data, and generate a behavior feature vector. A prediction module 420 is configured to predict the click intention probability of each interactive element in a page based on an intention prediction model deployed on the client according to the behavior feature vector. A triggering module 430 is configured to trigger a resource preloading instruction when the predicted click intention probability exceeds a preset threshold. A preloading module 440 is configured to dynamically create a browser preloading tag according to the resource preloading instruction, start background downloading of a target resource, and perform dynamic preloading of front-end resources.

[0071] In a feasible implementation, the feature extraction module 410 is configured to: perform time window sliding processing on the collected original behavior data; the behavior data at least includes one or more of mouse movement trajectory coordinates, page scrolling position, or dwell time on an interactive element; extract feature parameters from the behavior data in the corresponding time window; the feature parameters at least include one or more of speed, acceleration, direction vector, and dwell time; generate a feature vector sequence including multiple time steps according to the feature parameters.

[0072] In a feasible implementation, the feature parameters further include dwell time statistics of the mouse on the interactive element, and the feature extraction module 410 is configured to: calculate the horizontal speed, vertical speed, and resultant speed of the mouse movement trajectory in each time window; Calculate the direction angle, horizontal acceleration, vertical acceleration and resultant acceleration of the mouse movement trajectory. Count the dwell time of the mouse on the interactive element, wherein the dwell time is the time that the mouse stays in the element area for more than a preset threshold, and the displacement change in the dwell time is less than a displacement threshold.

[0073] In a feasible implementation, the feature extraction module 410 is configured to: For each time window, a corresponding feature vector is constructed, which includes the following feature parameters: horizontal velocity, vertical velocity, resultant velocity, direction angle, horizontal acceleration, vertical acceleration, and dwell time of the mouse on the interactive element. The feature vectors of all time windows are concatenated in chronological order to generate a feature vector sequence containing multiple time steps, which is used as input for subsequent behavior recognition or analysis models.

[0074] In a feasible implementation, the intent prediction model includes a lightweight machine learning model running based on TensorFlow.js, and the structure includes an input layer, an LSTM layer and an output layer; wherein: The input layer is configured to receive the behavior vector sequence corresponding to the behavior feature vector; The LSTM layer is configured to obtain the time dependence of the behavior vector sequence; The output layer is configured to output the click intent probability value of the interactive element.

[0075] In a feasible implementation, the preloading module 440 is configured to: Generate a document header element dynamically according to the resource preloading instruction; Configure the hyperlink attribute type of the webpage, and determine that the target attribute is a resource preloading attribute; Determine the resource location information as a URL format; Insert the dynamically generated document header element into the document header of the current page to dynamically create a browser preloading tag.

[0076] In a feasible implementation, the system further includes a model update module configured to: Update the model based on the difference data between the prediction results of the intent prediction model and the actual behavior of the user.

[0077] The update of the intent prediction model includes the following steps: The server receives the prediction records and user actual behavior data uploaded by the client; Retrain the prediction model based on the user actual behavior data to obtain an updated intent prediction model; The updated intention prediction model is sent to the client to replace the original model.

[0078] The implementation principle, the technical effects and the foregoing method embodiments are the same for the front-end resource dynamic preloading device based on user behavior intention prediction. For brevity, the embodiments of the front-end resource dynamic preloading device based on user behavior intention prediction are not mentioned in the foregoing method embodiments, and the corresponding content can be referred to in the foregoing method embodiments.

[0079] The embodiments of the application also provide an electronic device, as shown in the accompanying drawings, which is a structural schematic diagram of the electronic device. The electronic device 100 includes a processor 51 and a memory 50. The memory 50 stores computer executable instructions capable of being executed by the processor 51. The processor 51 executes the computer executable instructions to implement any one of the foregoing front-end resource dynamic preloading methods based on user behavior intention prediction. Figure 5

[0080] In the embodiment shown in the accompanying drawings, the electronic device further includes a bus 52 and a communication interface 53. The processor 51, the communication interface 53 and the memory 50 are connected through the bus 52. Figure 5

[0081] The memory 50 can include a high-speed random access memory (RAM) and can also include a non-volatile memory, for example, at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 53 (which can be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used. The bus 52 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 52 can be divided into an address bus, a data bus, a control bus, etc. For the sake of brevity, Figure 5 In the accompanying drawings, only one bidirectional arrow is used to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0082] ​​The processor 51 can be an integrated circuit chip with processing capability. In implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the processor 51 or by instructions in the form of software. The processor 51 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor to execute, or be executed by a combination of hardware and software modules in the code processor. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the storage, and the processor 51 reads the information in the storage, and combines the hardware to complete the steps of the front-end resource dynamic preloading method based on user behavior intention prediction of the foregoing embodiments.

[0083] The embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions. When the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to implement the front-end resource dynamic preloading method based on user behavior intention prediction described above. For specific implementation, refer to the foregoing method embodiments, which will not be described here.

[0084] The computer program product of the front-end resource dynamic preloading method and system based on user behavior intention prediction provided by the embodiment of the present application includes a computer readable storage medium storing program codes. The instructions included in the program codes can be used to execute the method in the foregoing method embodiments. For specific implementation, refer to the method embodiments, which will not be described here.

[0085] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0086] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the parts of the prior art that make contributions or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0087] In the description of the present application, it should be further pointed out that, unless otherwise explicitly specified and limited, the terms "set", "install", "connect", "connect" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the communication between two elements. For those skilled in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0088] Finally, it should be pointed out that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A front-end resource dynamic preloading method based on user behavior intention prediction, characterized in that: include: Collect the user's continuous behavior data in real time in the client browser, extract features from the collected behavior data, and generate behavior feature vectors; Based on the intention prediction model deployed on the client, the click intention probability of each interactive element on the page is predicted in real time according to the behavior feature vector; When the predicted click intention probability exceeds the preset threshold, the resource preloading instruction is triggered; According to the resource preloading instruction, a browser preloading tag is dynamically created, and background downloading of the target resource is started to perform dynamic preloading of the front-end resource.

2. The front-end resource dynamic preloading method based on user behavior intention prediction according to claim 1 is characterized in that: Extract features from the collected behavioral data to generate behavioral feature vectors, including: Performing time window sliding processing on the collected raw behavior data; the behavior data includes at least one or more of the coordinates of the mouse movement trajectory, the page scrolling position, or the dwell time on the interactive element; Performing feature extraction on the behavior data in a corresponding time window to extract feature parameters; the feature parameters include at least one or more of speed, acceleration, direction vector, and dwell time; A feature vector sequence including multiple time steps is generated according to the feature parameters.

3. The front-end resource dynamic preloading method based on user behavior intention prediction according to claim 2 is characterized in that: The characteristic parameters also include statistics on the time the mouse stays on the interactive element. Feature extraction is performed on the behavior data in the corresponding time window to extract characteristic parameters, including: In each time window, calculate the horizontal velocity, vertical velocity and total velocity of the mouse movement trajectory; Calculate the direction angle, horizontal acceleration, vertical acceleration and total acceleration of the mouse movement trajectory; The dwell time of the mouse on the interactive element is counted, wherein the dwell time is the time the mouse stays in the element area exceeding a preset threshold and the displacement change during the dwell time is less than the displacement threshold time.

4. The front-end resource dynamic preloading method based on user behavior intention prediction according to claim 2 is characterized in that: Generating a feature vector sequence comprising multiple time steps according to the feature parameters, including: For each time window, a corresponding feature vector is constructed. The feature vector contains the following feature parameters: horizontal velocity, vertical velocity, total velocity, direction angle, horizontal acceleration, vertical acceleration, total acceleration, and the time the mouse stays on the interactive element. The feature vectors of all time windows are concatenated in chronological order to generate a feature vector sequence containing multiple time steps, which is used for subsequent behavior recognition or analysis model input.

5. The front-end resource dynamic preloading method based on user behavior intention prediction according to claim 1 is characterized in that: The intent prediction model includes a lightweight machine learning model running on TensorFlow.js, and its structure includes an input layer, an LSTM layer, and an output layer; wherein: The input layer is used to receive the behavior vector sequence corresponding to the behavior feature vector; The LSTM layer is used to obtain the temporal dependency of the behavior vector sequence; The output layer is used to output the click intention probability value of the interactive element.

6. The front-end resource dynamic preloading method based on user behavior intention prediction according to claim 1 is characterized in that: Dynamically create a browser preloading tag according to the resource preloading instruction, including: Dynamically generate a document header element according to the resource preloading instruction; Configure the web page hyperlink attribute type and determine that the target attribute is a resource preloading attribute; Determine the resource location information as a URL format; The dynamically generated document header element is inserted into the document header of the current page to dynamically create a browser preloading tag.

7. The front-end resource dynamic preloading method based on user behavior intention prediction according to claim 1 is characterized in that: The method further comprises: Updating the model based on the difference between the prediction result of the intention prediction model and the actual behavior of the user; The updating of the intention prediction model includes the following steps: The server receives the prediction records and user actual behavior data uploaded by the client; Retraining the prediction model based on the actual user behavior data to obtain an updated intention prediction model; The updated intent prediction model is sent to the client to replace the original model.

8. A front-end resource dynamic preloading system based on user behavior intention prediction, characterized in that: include: The feature extraction module is used to collect the user's continuous behavior data in real time in the client browser, extract features from the collected behavior data, and generate a behavior feature vector; A prediction module, configured to perform real-time prediction of the click intention probability of each interactive element on the page based on the behavior feature vector based on the intention prediction model deployed on the client; A trigger module is used to trigger a resource preloading instruction when the predicted click intention probability exceeds a preset threshold; The preloading module is used to dynamically create a browser preloading tag according to the resource preloading instruction, start the background download of the target resource, and perform dynamic preloading of the front-end resource.

9. An electronic device, characterized in that: It includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the front-end resource dynamic preloading method based on user behavior intention prediction as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the front-end resource dynamic preloading method based on user behavior intention prediction as described in any one of claims 1 to 7.

Citation Information

Cited By

  • CAD toolbar dynamic arrangement method and system based on operation chain mining

    CN121365439A

  • Method and device for loading platform online resources

    CN121614197A

  • Web application instantaneous loading method and system based on behavior prediction and resource preloading, equipment and medium

    CN121614686A

  • Intelligent television integrated service quick starting and channel switching system

    CN121619463A

  • An application program dynamic response method and device, electronic equipment and storage medium

    CN122412026A