Resource loading method and device

By obtaining the cursor stay time, the user's possible operations are judged. If it is greater than the preset time, the data resources of the next page will be loaded, which solves the problems of high manual maintenance costs and waste of resources in the existing technology, realizes preloading resources on demand, and improves the page loading speed.

WO2025045181A1PCT designated stage expired Publication Date: 2025-03-06BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/115729
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-31
Filing Date
2024-08-30
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

The prior art has problems of high manual maintenance costs and waste of resources in page preloading, especially when real jumping may not occur, data prefetching or pre-rendering leads to waste of network bandwidth and computing resources.

Method used

By obtaining the target duration of the cursor staying in the interactive area, if the duration is greater than the preset first time, load the data resources of the next page. The first time length is determined based on a plurality of second time lengths and third time lengths, respectively representing the duration of the cursor moving to the interactive area to the start of the interaction area and the duration of the cursor moving into the interactive area to the start of the non-preset operation and the duration of the cursor moving into the interactive area to the start of the non-preset operation and being moved out.

Benefits of technology

It realizes the possibility of page jumping based on user behavior, preload resources on demand, reduces manual maintenance costs, avoids resource waste, and improves the speed of page loading and rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024115729_06032025_PF_FP_ABST
    Figure CN2024115729_06032025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a resource loading method and device. The method comprises: acquiring a target duration within which a cursor stays in an interaction region; when the target duration is longer than a preset first duration, loading data resources of a next page, wherein the first duration is determined on the basis of multiple second durations and multiple third durations; and then, when a preset operation performed in the interaction region by means of the cursor is detected, displaying the data resources.
Need to check novelty before this filing date? Find Prior Art

Description

Resource loading method and device

[0001] This application claims priority to Chinese patent application No. 202311121260.X filed on August 31, 2023. The contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field

[0002] The embodiments of the present disclosure relate to a resource loading method and device. Background Art

[0003] Page loading performance directly impacts user productivity and product experience, so most web applications prioritize page loading performance and related optimization. When optimizing client applications, pre-fetching data and resources for the page being redirected can significantly improve page loading and rendering speeds.

[0004] Manually maintain the list of pages that need to be preloaded and complete the preloading work. After that, after the user clicks the corresponding function button, the preloading work of the subsequent pages can be controlled and implemented.

[0005] However, in some cases there is a problem of manual maintenance costs, resulting in a corresponding waste of resources.

[0006] Summary of the Invention

[0007] The present disclosure provides a resource loading method, including:

[0008] Obtaining a target duration for a cursor to remain in an interactive area, wherein the interactive area is for jumping from a current page to a next page in response to a preset operation of the cursor;

[0009] If the target duration is greater than a preset first duration, the data resource of the next page is loaded; wherein the first duration is determined based on multiple second durations and multiple third durations, the second duration is the duration from when the user moves the cursor into the interactive area to when a first operation occurs, the third duration is the duration from when the user moves the cursor into the interactive area to when a second operation occurs, the first operation is a preset operation performed by the cursor in the interactive area, and the second operation is an operation in which the cursor does not perform the preset operation in the interactive area and moves out of the interactive area;

[0010] A preset operation performed by the cursor in the interactive area is detected, and the data resource is displayed.

[0011] An embodiment of the present disclosure provides a resource loading device, including:

[0012] An acquiring unit, configured to acquire a target duration for a cursor to stay in an interactive area, wherein the interactive area is a jump from a current page to a next page in response to a preset operation of the cursor;

[0013] a processing unit, configured to load the data resource of the next page if the target duration is greater than a preset first duration; wherein the first duration is determined based on a plurality of second durations and a plurality of third durations, the second duration being the duration from when the user moves the cursor into the interactive area until a first operation occurs, the third duration being the duration from when the user moves the cursor into the interactive area until a second operation occurs, the first operation being a preset operation performed by the cursor in the interactive area, and the second operation being an operation in which the cursor moves out of the interactive area without performing the preset operation;

[0014] A display unit is configured to detect a preset operation performed by the cursor in the interactive area and display the data resource.

[0015] An embodiment of the present disclosure provides an electronic device, comprising: a processor and a memory;

[0016] The memory stores computer-executable instructions;

[0017] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the resource loading method described in the various possible designs above.

[0018] An embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the resource loading method described in the above various possible designs is implemented.

[0019] An embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the resource loading method described in the various possible designs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] FIG1 is a schematic diagram of a resource loading method according to an embodiment of the present disclosure;

[0022] FIG2 is a diagram illustrating a user interaction behavior definition according to an embodiment of the present disclosure;

[0023] FIG3 is a second flow chart of a resource loading method according to an embodiment of the present disclosure;

[0024] FIG4 is a third flow chart of a resource loading method according to an embodiment of the present disclosure;

[0025] FIG5 is a schematic structural diagram of a resource loading device provided by an embodiment of the present disclosure; and

[0026] FIG6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0028] Page loading performance directly impacts user productivity and product experience, so most web applications prioritize page loading performance and related optimization. When optimizing client applications, pre-fetching data and resources for the page being redirected can significantly improve page loading and rendering speeds.

[0029] There are two possible implementations for existing page preloading:

[0030] First, manually maintain the list of pages that need to be preloaded and complete the preloading work. In this way, the preloading of subsequent pages can be controlled and implemented, but this page list needs to be manually maintained, which incurs certain labor costs during the project implementation.

[0031] Second, scan the Hypertext Markup Language (HTML) of the page and grab the hyperlink elements Tag, and pre-render the jump page corresponding to the link, and then render it on the corresponding page when the page jump is triggered.

[0032] In addition, both of the above methods pre-fetch or pre-render data for pages that may redirect to the current page, while the actual redirect action may not occur. Pre-fetching or pre-rendering resources for pages that do not redirect means wasting network bandwidth and computing resources.

[0033] In response to the above-mentioned technical problems, the inventor's technical conception is as follows: the length of time a user stays in the area that triggers page switching after a click operation and a non-click operation can be collected, and then the user's habits can be judged based on the collected length of time, that is, how long it is likely that the user will perform a click operation. Later, in actual implementation, the user's possible operation is judged based on the length of time the user stays in the area and the previously determined user habits. If it is a click operation, the resources of the corresponding page can be pre-loaded, and the resources can be directly rendered on the displayed page after the user clicks, thereby improving the response speed of the page and enhancing the user experience.

[0034] Furthermore, the above user habits can be continuously corrected based on the time taken for the current corresponding operation to increase the accuracy of the judgment.

[0035] In one scenario, a user opens a browser on a computer and then hovers the mouse over an interactive area on a web page. At this point, the computer begins to obtain the dwell time in real time to determine whether the user is likely to click. If so, the computer loads the data resources of the next page corresponding to the interactive area from the network.

[0036] Afterwards, when the user clicks the mouse in the interactive area, the computer directly renders the acquired data resources in response to the click operation of the mouse cursor in the interactive area, thereby achieving rapid loading and accuracy.

[0037] It should be understood that the execution subject of the embodiments of the present disclosure is an electronic device, which can specifically be a mobile phone, computer, notebook, tablet and other display devices.

[0038] The following are detailed embodiments of the technical solutions disclosed herein, and the following embodiments may be used in combination with each other.

[0039] FIG1 is a flow chart of a resource loading method according to an embodiment of the present disclosure. As shown in FIG1 , the resource loading method may include:

[0040] Step 11: Get the target duration of the cursor staying in the interactive area;

[0041] The interactive area jumps from the current page to the next page in response to a preset operation of the cursor.

[0042] In this step, when the user manipulates the mouse cursor to move the trigger tool into the interactive area, the duration of the cursor staying in the interactive area, ie, the target duration, is recorded.

[0043] This implementation can be real-time detection, and recording can be stopped when the following preset operations occur or when the user moves out of the interactive area.

[0044] As an implementation, the cursor can be a trigger tool for jumping from the current page to the next page. In other embodiments, it can be replaced with other trigger tools. The interactive area can be an area where the user can trigger a page jump by performing preset operations through the mouse cursor, such as buttons, menus, etc.

[0045] In a possible implementation, the preset operation may be a click operation, that is, clicking a button, a menu, etc.

[0046] That is, the interactive areas that may need to be redirected are screened out, and the interactive events occurring in the interactive areas are monitored.

[0047] For example, the current target acquisition duration is 201ms.

[0048] Step 12: If the target duration is greater than the preset first duration, load the data resources of the next page.

[0049] Among them, the first duration is determined based on multiple second durations and multiple third durations. The second duration is the duration from the user moving the cursor to the interaction area until the first operation occurs. The third duration is the duration from the user moving the cursor into the interaction area until the second operation occurs. The first operation is a preset operation performed by the cursor in the interaction area, and the second operation is an operation in which the cursor does not perform the preset operation in the interaction area and moves out of the interaction area.

[0050] In one possible implementation, the first duration is determined based on the user's previous historical data, and the historical data may include: a second duration in which the user moves the cursor to the interactive area to perform a first operation within a preset time period before the current time (for example, within 20 days before the current time), and a third duration in which the user moves the cursor into the interactive area to perform a second operation.

[0051] In this step, when the target duration is greater than the preset first duration, the electronic device determines that the user is likely to perform a preset operation on the interactive area. In order to quickly switch pages, it starts to pre-acquire data resources for the next page.

[0052] For example, the first duration may be 200ms. When the target duration 201ms is greater than 200ms, the data resource of the next page is loaded.

[0053] Under this implementation, when switching pages on a web page, a link instruction can be added to notify the browser to prefetch and preload resources of the subsequent page (ie, the next page).

[0054] In a possible implementation, the current page may be a page before a preset operation is detected; the next page may be a page after the preset operation occurs, and may be a next-level page or a previous-level page in actual situations.

[0055] Optionally, the first duration can be determined by two sets of data of the user, one set is the second duration of multiple cursors moving to the interactive area to perform preset operations, and the other set is the third duration of multiple cursors moving into the interactive area and then moving out of the interactive area. The determination process of the first duration is given in the following embodiment.

[0056] In one possible implementation, Figure 2 is a user interaction behavior definition diagram provided by an embodiment of the present disclosure. As shown in Figure 2, user interaction behaviors include: preset operations in the interaction area (for example, click operation Click) and operations that move out of the interaction area without performing preset operations (for example, Hover).

[0057] In this implementation, when the user moves the cursor into the interactive area, the electronic device starts timing until a preset operation occurs in the interactive area, which ends the timing, or no preset operation occurs and the cursor is moved out of the interactive area, which ends the timing.

[0058] For example, the historical data may include: 100 clicks (each click corresponds to the second duration mentioned above) and 100 hovers (each hover corresponds to the third duration mentioned above).

[0059] Step 13: Detect the preset operation performed by the cursor in the interactive area and display the data resources.

[0060] In this step, the user uses the mouse to control the cursor to perform a preset operation (for example, a click operation) in the interactive area, and the electronic device renders the above-obtained data resources and displays them on the corresponding page, such as the next page.

[0061] In addition, when it is detected that the cursor has moved out of the interactive area, the data resources of the next page are cleared after the preset fifth time period.

[0062] The implementation is as follows: the electronic device obtains data resources, but the cursor does not perform a preset operation and moves out of the interactive area, then the data resources are cleared after the above timing duration reaches the fifth duration.

[0063] For example, the fifth duration may be 800 ms, and the data resources are cleared after 800 ms.

[0064] This implementation can delete the loaded resource data to reduce memory resource usage.

[0065] The resource loading method provided by the embodiment of the present disclosure obtains the target duration of the cursor staying in the interactive area. The interactive area is a jump from the current page to the next page in response to the preset operation of the cursor. When the target duration is greater than the preset first duration, the data resources of the next page are loaded. The first duration is determined based on multiple second durations and multiple third durations. The second duration is the duration from the user moving the cursor to the interactive area until the first operation occurs. The third duration is the duration from the user moving the cursor into the interactive area until the second operation occurs. The first operation is the preset operation performed by the cursor in the interactive area. The second operation is the operation of the cursor not performing the preset operation in the interactive area and moving out of the interactive area. After that, the preset operation performed by the cursor in the interactive area is detected and the data resources are displayed. In this technical solution, the user's habit information used for related operations is determined by the duration data of the user's previous page switching related operations or non-page switching related operations, so as to predict whether there is a possibility of switching pages at present and preload page resources. This not only reduces manual maintenance costs, but also realizes on-demand preloading of resources and avoids resource waste.

[0066] Based on the embodiment shown in FIG1 , FIG3 is a second flow chart of the resource loading method provided by the embodiment of the present disclosure. As shown in FIG3 , before step 12, the resource loading method may further include:

[0067] Step 31: Determine, based on all second durations, a first proportion of first operations whose second duration is greater than the set initial duration in all first operations, and determine, based on all third durations, a second proportion of second operations whose third duration is greater than the initial duration in all second operations.

[0068] In this step, the second duration is the duration corresponding to the first operation. At this time, an initial duration is set, for example, 200ms, and the proportion of all first operations greater than 200ms in all second durations is determined as the first proportion.

[0069] For example, there are 100 first operations in total, and 90 of them take longer than 200 ms, so the first proportion is 90%.

[0070] The third duration is a duration corresponding to the second operation, and a proportion of all second operations longer than 200 ms in all second durations is determined as a second proportion.

[0071] For example, there are 100 second operations in total, and 5 of them take longer than 200 ms, so the second proportion is 5%.

[0072] Step 32: Determine, based on the first proportion and the second proportion, a first probability that the cursor stays in the interactive area for a time period longer than an initial time period and a first operation occurs.

[0073] Optionally, this step can be implemented by: determining the first product based on the product of the first proportion and a preset second probability of the first operation occurring, and determining the second product based on the product of the second proportion and a preset third probability of the second operation occurring; taking the ratio of the first product to the first sum as the first probability, and the first sum being the sum of the first product and the second product.

[0074] That is, the calculation formula of the first probability P1 is: P1=P2*P4 / (P2*P4+P3*P5)

[0075] Among them, P2 is the first proportion, P3 is the second proportion, P4 is the preset second probability of the first operation occurring, and P5 is the preset third probability of the second operation occurring. That is, the first product is P2*P4, the second product is P3*P5, and the first sum is P2*P4+P3*P5.

[0076] In this implementation, the second probability may be set to 50% and the third probability may be set to 50%, that is, it is assumed that the probability of the first operation and the second operation occurring are each half.

[0077] For example, if the first proportion P2 is 90% and the second proportion P3 is 5%, then the first probability P1 of the first operation occurring when the cursor stays in the interactive area longer than the initial duration is:

[0078] 90%*50% / (90%*50%+5%*50%)=94.7%

[0079] Step 33: When the first probability is greater than the preset probability, the initial duration is used as the first duration.

[0080] In this step, when the first probability is greater than the preset probability, it means that under the current initial duration, the preset operation is likely to occur when the duration is exceeded. Then the initial duration can be used as the judgment criterion corresponding to whether the data resources are loaded, that is, the first duration.

[0081] In order to improve the accuracy of the judgment, the preset probability here can be set to a larger value, for example, 90%.

[0082] At this time, combined with the above example, 94.7% is greater than 90%, so the initial duration of 200ms is used as the first duration.

[0083] It should be understood that after step 32, steps 33 and 34 trigger corresponding execution processes according to actual conditions, and there is no limitation on the order.

[0084] Step 34: When the first probability is less than or equal to the preset probability, adjust the initial duration, and repeat the above process of determining the first probability until the first probability is greater than the preset probability, and use the adjusted initial duration as the first duration.

[0085] In this step, when the first probability is less than or equal to the preset probability, the initial duration needs to be adjusted, and the above steps 31 and 32 are repeated. When the new first probability is greater than the preset probability, the corresponding initial duration is used as the first duration.

[0086] In this implementation, if the first probability is less than or equal to the preset probability, the value of the initial duration can be increased. For example, if the last initial duration was 200ms, it can be set to 202ms at present, and the above steps can be repeated to continue determining the first duration.

[0087] The resource loading method provided by the embodiment of the present disclosure determines the first proportion of the first operation whose second duration is greater than the set initial duration in all first operations based on all second durations, and determines the second proportion of the second operation whose third duration is greater than the initial duration in all second operations based on all third durations; determines the first probability that the cursor stays in the interactive area for a duration greater than the initial duration and the first operation occurs based on the first proportion and the second proportion; when the first probability is greater than the preset probability, the initial duration is used as the first duration; when the first probability is less than or equal to the preset probability, the initial duration is adjusted, and the above-mentioned determination process of the first probability is repeated until the first probability is greater than the preset probability, and the adjusted initial duration is used as the first duration. In this technical solution, by analyzing the durations corresponding to the preset operation and the operation of moving out of the interactive area without the preset operation in the user's historical data, and comparing the probability of the first operation occurring based on the continuously updated initial duration, the above-mentioned judgment criteria for predicting the user operation are determined, thereby increasing the accuracy of the above-mentioned possible resource preloading.

[0088] Based on the above embodiment, FIG4 is a schematic diagram of the resource loading method provided by the embodiment of the present disclosure. As shown in FIG4, after step 12, the resource loading method may further include:

[0089] Step 41: After detecting the user's target operation, obtain a fourth duration from when the cursor moves into the interactive area to when the target operation is performed;

[0090] The target operation includes a preset operation performed by the cursor in the interactive area, or an operation in which the cursor does not perform a preset operation in the interactive area and moves out of the interactive area;

[0091] In this implementation, the duration of the user's mouse stay in the actual application scenario also depends on the interaction area and the user's personal behavior habits. Therefore, for the current situation, it is also possible to update and correct the first duration based on the already occurred clicks and hovers.

[0092] That is, after detecting that the user has performed a preset operation in the interaction area or has moved the cursor out of the interaction area without performing the preset operation, the entire duration is used as the fourth duration.

[0093] For example, the fourth duration is 250 ms.

[0094] Step 42: Adjust the first duration according to the fourth duration.

[0095] In this step, based on the fourth duration, the first duration is dynamically adjusted to improve the accuracy of subsequent judgments.

[0096] In this implementation, the user has completed a preset operation using the mouse cursor, and the time taken (i.e., the fourth duration) is t.

[0097] If t < d (i.e., the first duration) at this time, it means that the prediction result is Hover; if the user's behavior this time is a Hover behavior, although the prediction is correct, the threshold d can be appropriately reduced to improve the accuracy of the judgment and also provide more room for subsequent operations; if the user's behavior this time is a Click, it means that the prediction is inaccurate and the threshold d needs to be reduced.

[0098] If t > d at this time, it means that the prediction result is Click; if the user's behavior this time is a Hover, it means that this interaction behavior is mispredicted as a click behavior and the threshold d needs to be increased; if the user's behavior this time is a Click, that is, the user's click behavior is correctly predicted and no adjustment is required.

[0099] Optionally, there are two cases for the implementation of this step:

[0100] The first case: If the fourth duration is less than or equal to the first duration, reduce the first duration according to the preset first step length.

[0101] For example, if the fourth duration is 197 ms, the first duration is 200 ms, and the first step length is 2 ms, then 200 ms - 2 ms = 198 ms is used as the new first duration.

[0102] The second case: If the fourth duration is greater than the first duration and the target operation is to move out of the interaction area, increase the first duration according to the preset second step length.

[0103] For example, if the fourth duration is 250 ms, the first duration is 200 ms, and the first step duration is 2 ms, then 200 ms+2 ms=202 ms is used as the new first duration.

[0104] The resource loading method provided by the disclosed embodiments detects a user's target action and then obtains a fourth duration, from the time the cursor enters the interactive area until the target action is performed. The target action includes a preset action performed by the cursor in the interactive area, or an action in which the cursor moves out of the interactive area without performing the preset action. The method then adjusts the first duration based on the fourth duration. This technical solution updates the first duration corresponding to the user's habit based on the duration of the user's current action, thereby increasing the accuracy of subsequent judgments.

[0105] The following are embodiments of the device disclosed herein, which can be used to implement the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0106] FIG5 is a schematic diagram of the structure of a resource loading device provided by an embodiment of the present disclosure. As shown in FIG5 , the device includes:

[0107] An acquiring unit 51 is configured to acquire a target duration for a cursor to remain in an interactive area, where the interactive area is a jump from a current page to a next page in response to a preset operation of the cursor;

[0108] Processing unit 52 is configured to load data resources for the next page if the target duration is greater than a preset first duration; wherein the first duration is determined based on multiple second durations and multiple third durations, the second duration being the duration from when the user moves the cursor into the interactive area until a first operation occurs, the third duration being the duration from when the user moves the cursor into the interactive area until a second operation occurs, the first operation being a preset operation performed by the cursor in the interactive area, and the second operation being an operation in which the cursor moves out of the interactive area without performing the preset operation;

[0109] The display unit 53 is used to detect a preset operation performed by the cursor in the interactive area and display the data resources.

[0110] In one or more embodiments, if the target duration is greater than the preset first duration, before loading the data resource of the next page, the processing unit 52 is further configured to:

[0111] Determine, based on all second durations, a first proportion of first operations whose second durations are longer than a set initial duration among all first operations, and determine, based on all third durations, a second proportion of second operations whose third durations are longer than the initial duration among all second operations;

[0112] Determining, based on the first proportion and the second proportion, a first probability that a time period for which the cursor stays in the interactive area is greater than an initial time period and a first operation occurs;

[0113] When the first probability is greater than the preset probability, the initial duration is used as the first duration;

[0114] When the first probability is less than or equal to the preset probability, the initial duration is adjusted and the above-mentioned determination process of the first probability is repeated until the first probability is greater than the preset probability, and the adjusted initial duration is used as the first duration.

[0115] In one or more embodiments, the processing unit 52 determines, based on the first proportion and the second proportion, a first probability of a first operation occurring when the cursor stays in the interactive area for a time period longer than an initial time period, specifically for:

[0116] Determine a first product based on the product of the first proportion and a preset second probability of the first operation occurring, and determine a second product based on the product of the second proportion and a preset third probability of the second operation occurring;

[0117] The ratio of the first product to the first sum is taken as the first probability, and the first sum is the sum of the first product and the second product.

[0118] In one or more embodiments, the processing unit 52 is further configured to:

[0119] After detecting the user's target operation, obtaining a fourth duration from when the cursor moves into the interactive area until the target operation is performed, where the target operation includes a preset operation performed by the cursor in the interactive area, or an operation in which the cursor does not perform the preset operation in the interactive area and moves out of the interactive area;

[0120] Adjust the first duration based on the fourth duration.

[0121] In one or more embodiments, the processing unit 52 adjusts the first duration according to the fourth duration, specifically to:

[0122] If the fourth duration is less than or equal to the first duration, reducing the first duration according to the preset first step;

[0123] If the fourth duration is greater than the first duration and the target operation is moving the cursor out of the interactive area, the first duration is increased according to a preset second step length.

[0124] In one or more embodiments, the processing unit 52 is further configured to:

[0125] Load the data resources of the next page through link instructions;

[0126] and / or,

[0127] It is detected that the cursor moves out of the interactive area, and the data resources of the next page are cleared after the preset fifth time period.

[0128] The resource loading device provided in the embodiments of the present disclosure may be used to execute the resource loading method in any of the above embodiments. The implementation principles and technical effects thereof are similar and will not be described in detail here.

[0129] It should be understood that the division of the various modules of the above devices is merely a division of logical functions. In actual implementation, they may be fully or partially integrated into a single physical entity or physically separated. Furthermore, these modules may be implemented entirely in software invoked by a processing element, or entirely in hardware. Alternatively, some modules may be implemented in software invoked by a processing element, while others may be implemented in hardware. Furthermore, these modules may be fully or partially integrated or implemented independently. The processing element here may be an integrated circuit with signal processing capabilities. During implementation, the steps of the above method or the modules above may be performed by hardware integrated logic circuits in the processor element or by software instructions.

[0130] FIG6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. FIG6 shows a schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present disclosure, wherein the electronic device may be a terminal device or a server. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers.

[0131] The electronic device shown in FIG6 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0132] As shown in FIG6 , the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 61, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 62 or a program loaded from a storage device 68 into a random access memory (RAM) 63. Various programs and data required for the operation of the electronic device are also stored in RAM 63. The processing device 61, ROM 62, and RAM 63 are connected to each other via a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64.

[0133] Typically, the following devices may be connected to the I / O interface 65: an input device 66 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 67 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 68 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 69. The communication device 69 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 illustrates an electronic device having various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0134] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 69, or installed from the storage device 68, or installed from the ROM 62. When the computer program is executed by the processing device 61, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0135] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0136] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0137] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0138] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0140] The units described in the embodiments of the present disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0141] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0142] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0143] The electronic device provided in the embodiments of the present disclosure may be used to execute the resource loading method provided in any of the above method embodiments. The implementation principles and technical effects thereof are similar and will not be described in detail here.

[0144] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed on a computer, the computer executes the resource loading method.

[0145] The computer-readable storage medium mentioned above may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The computer-readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0146] Optionally, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0147] An embodiment of the present disclosure also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and the at least one processor can implement the above-mentioned resource loading method when executing the computer program.

[0148] In addition, according to one or more embodiments of the present disclosure, a resource loading method is provided, including:

[0149] Obtaining a target duration for a cursor to remain in an interactive area, wherein the interactive area is for jumping from a current page to a next page in response to a preset operation of the cursor;

[0150] If the target duration is greater than a preset first duration, the data resource of the next page is loaded; wherein the first duration is determined based on multiple second durations and multiple third durations, the second duration is the duration from when the user moves the cursor into the interactive area to when a first operation occurs, the third duration is the duration from when the user moves the cursor into the interactive area to when a second operation occurs, the first operation is a preset operation performed by the cursor in the interactive area, and the second operation is an operation in which the cursor does not perform the preset operation in the interactive area and moves out of the interactive area;

[0151] A preset operation performed by the cursor in the interactive area is detected, and the data resource is displayed.

[0152] In one or more embodiments, before loading the data resource of the next page if the target duration is greater than a preset first duration, the method further includes:

[0153] Determine, based on all second durations, a first proportion of first operations whose second durations are longer than a set initial duration among all first operations, and determine, based on all third durations, a second proportion of second operations whose third durations are longer than the initial duration among all second operations;

[0154] Determining, based on the first proportion and the second proportion, a first probability that the cursor stays in the interactive area for a time period longer than the initial time period and a first operation occurs;

[0155] When the first probability is greater than the preset probability, using the initial duration as the first duration;

[0156] When the first probability is less than or equal to the preset probability, the initial duration is adjusted, and the above-mentioned first probability determination process is repeated until the first probability is greater than the preset probability, and the adjusted initial duration is used as the first duration.

[0157] In one or more embodiments, determining, based on the first proportion and the second proportion, a first probability that the cursor stays in the interactive area for a period longer than the initial period and a first operation occurs includes:

[0158] determining a first product based on the product of the first proportion and a preset second probability of the first operation occurring, and determining a second product based on the product of the second proportion and a preset third probability of the second operation occurring;

[0159] The ratio of the first product to a first sum is used as the first probability, where the first sum is the sum of the first product and the second product.

[0160] In one or more embodiments, the method further comprises:

[0161] After detecting the user's target operation, obtaining a fourth duration from when the cursor moves into the interaction area to when the target operation is performed, where the target operation includes a preset operation performed by the cursor in the interaction area, or an operation in which the cursor does not perform the preset operation in the interaction area and moves out of the interaction area;

[0162] Adjust the first duration according to the fourth duration.

[0163] In one or more embodiments, adjusting the first duration according to the fourth duration includes:

[0164] If the fourth duration is less than or equal to the first duration, reducing the first duration according to the preset first duration;

[0165] If the fourth duration is greater than the first duration, and the target operation is moving the cursor out of the interactive area, the first duration is increased according to a preset second step.

[0166] In one or more embodiments, the method further comprises:

[0167] Load the data resource of the next page by means of a link instruction;

[0168] and / or,

[0169] It is detected that the cursor moves out of the interactive area, and data resources of the next page are cleared after a preset fifth time period.

[0170] According to one or more embodiments of the present disclosure, a resource loading device is provided, including:

[0171] An acquiring unit, configured to acquire a target duration for a cursor to stay in an interactive area, wherein the interactive area is a jump from a current page to a next page in response to a preset operation of the cursor;

[0172] a processing unit, configured to load the data resource of the next page if the target duration is greater than a preset first duration; wherein the first duration is determined based on a plurality of second durations and a plurality of third durations, the second duration being the duration from when the user moves the cursor into the interactive area until a first operation occurs, the third duration being the duration from when the user moves the cursor into the interactive area until a second operation occurs, the first operation being a preset operation performed by the cursor in the interactive area, and the second operation being an operation in which the cursor moves out of the interactive area without performing the preset operation;

[0173] A display unit is configured to detect a preset operation performed by the cursor in the interactive area and display the data resource.

[0174] In one or more embodiments, before loading the data resource of the next page if the target duration is greater than a preset first duration, the processing unit is further configured to:

[0175] Determine, based on all second durations, a first proportion of first operations whose second durations are longer than a set initial duration among all first operations, and determine, based on all third durations, a second proportion of second operations whose third durations are longer than the initial duration among all second operations;

[0176] Determining, based on the first proportion and the second proportion, a first probability that the cursor stays in the interactive area for a time period longer than the initial time period and a first operation occurs;

[0177] When the first probability is greater than the preset probability, using the initial duration as the first duration;

[0178] When the first probability is less than or equal to the preset probability, the initial duration is adjusted, and the above-mentioned first probability determination process is repeated until the first probability is greater than the preset probability, and the adjusted initial duration is used as the first duration.

[0179] In one or more embodiments, the processing unit determines, based on the first proportion and the second proportion, a first probability that the cursor stays in the interactive area for a period longer than the initial period and a first operation occurs, specifically for:

[0180] determining a first product based on the product of the first proportion and a preset second probability of the first operation occurring, and determining a second product based on the product of the second proportion and a preset third probability of the second operation occurring;

[0181] The ratio of the first product to a first sum is used as the first probability, where the first sum is the sum of the first product and the second product.

[0182] In one or more embodiments, the processing unit is further configured to:

[0183] After detecting the user's target operation, obtaining a fourth duration from when the cursor moves into the interaction area to when the target operation is performed, where the target operation includes a preset operation performed by the cursor in the interaction area, or an operation in which the cursor does not perform the preset operation in the interaction area and moves out of the interaction area;

[0184] Adjust the first duration according to the fourth duration.

[0185] In one or more embodiments, the processing unit adjusts the first duration according to the fourth duration, specifically to:

[0186] If the fourth duration is less than or equal to the first duration, reducing the first duration according to the preset first duration;

[0187] If the fourth duration is greater than the first duration, and the target operation is moving the cursor out of the interactive area, the first duration is increased according to a preset second step.

[0188] In one or more embodiments, the processing unit is further configured to:

[0189] Load the data resource of the next page by means of a link instruction;

[0190] and / or,

[0191] It is detected that the cursor moves out of the interactive area, and data resources of the next page are cleared after a preset fifth time period.

[0192] The resource loading device provided in the embodiments of the present disclosure may be used to execute the resource loading method in any of the above embodiments. The implementation principles and technical effects thereof are similar and will not be described in detail here.

[0193] It should be noted that it should be understood that the division of the various modules of the above devices is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. Moreover, these modules can all be implemented in the form of software called by processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, these modules can be fully or partially integrated together or implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed by hardware integrated logic circuits in the processor element or instructions in the form of software.

[0194] According to one or more embodiments of the present disclosure, there is provided an electronic device, including: at least one processor and a memory;

[0195] The memory stores computer-executable instructions;

[0196] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the resource loading method in any of the above embodiments.

[0197] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the resource loading method in any of the above embodiments is implemented.

[0198] According to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the resource loading method in any of the above embodiments.

[0199] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0200] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0201] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A resource loading method, comprising: Obtaining a target duration for a cursor to stay in an interactive area, wherein the interactive area is a jump from a current page to a next page in response to a preset operation of the cursor; If the target duration is greater than a preset first duration, the data resource of the next page is loaded, wherein the first duration is determined based on a plurality of second durations and a plurality of third durations, the second duration is the duration from when the user moves the cursor to the interactive area until a first operation occurs, the third duration is the duration from when the user moves the cursor into the interactive area until a second operation occurs, the first operation is a preset operation performed by the cursor in the interactive area, and the second operation is an operation in which the cursor does not perform the preset operation in the interactive area and is moved out of the interactive area; and The preset operation performed by the cursor in the interactive area is detected, and the data resource is displayed.

2. The method according to claim 1, wherein: Before loading the data resource of the next page if the target duration is greater than the preset first duration, the method further includes: Determine, based on all the second durations, a first proportion of first operations whose second duration is longer than a set initial duration in all the first operations, and determine, based on all the third durations, a second proportion of second operations whose third duration is longer than the initial duration in all the second operations; Determining, according to the first proportion and the second proportion, a first probability that the time duration for which the cursor stays in the interactive area is greater than the initial time duration and the first operation occurs; When the first probability is greater than a preset probability, taking the initial duration as the first duration; and When the first probability is less than or equal to the preset probability, the initial duration is adjusted, and the process of determining the first probability is repeated until the first probability is greater than the preset probability, and the adjusted initial duration is used as the first duration.

3. The method according to claim 2, wherein: The determining, based on the first proportion and the second proportion, that the time duration for which the cursor stays in the interactive area is greater than the initial time duration and a first probability for the first operation to occur includes: Determine the first operation according to the product of the first proportion and the preset second probability of the first operation occurring. a product, and determining a second product according to the product of the second proportion and a preset third probability that the second operation occurs; The ratio of the first product to a first sum is taken as the first probability, wherein the first sum is the sum of the first product and the second product.

4. The method according to any one of claims 1 to 3, further comprising: After detecting the target operation of the user, obtaining a fourth duration from when the cursor moves into the interaction area to when the target operation is performed, wherein the target operation includes the preset operation performed by the cursor in the interaction area, or the operation in which the cursor does not perform the preset operation in the interaction area and is moved out of the interaction area; and The first duration is adjusted according to the fourth duration.

5. The method according to claim 4, wherein: The adjusting the first duration according to the fourth duration includes: If the fourth duration is less than or equal to the first duration, reducing the first duration according to the preset first duration; and If the fourth duration is greater than the first duration and the target operation is to move the cursor out of the interactive area, the first duration is increased according to a preset second step.

6. The method according to any one of claims 1 to 3, further comprising: Load the data resource of the next page by means of link instructions; and / or, It is detected that the cursor is moved out of the interactive area, and data resources of the next page are cleared after a preset fifth time period.

7. A resource loading device, comprising: an acquisition unit configured to acquire a target duration for a cursor to stay in an interactive area, wherein the interactive area is a jump from a current page to a next page in response to a preset operation of the cursor; The processing unit is configured to load the data resource of the next page if the target duration is greater than a preset first duration, wherein the first duration is determined based on a plurality of second durations and a plurality of third durations, the second duration is a duration from when the user moves the cursor to the interactive area until a first operation occurs, the third duration is a duration from when the user moves the cursor into the interactive area until a second operation occurs, the first operation is a preset operation performed by the cursor in the interactive area, and the second operation is a preset operation performed by the cursor in the interactive area. The preset operation and the operation of moving out of the interactive area; and The display unit is configured to detect the preset operation performed by the cursor in the interactive area and display the data resource.

8. An electronic device comprising: Processor and memory; Wherein, the memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the resource loading method according to any one of claims 1 to 6.

9. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the resource loading method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the resource loading method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Browser accelerating method and browser device with accelerator

    CN104298790A

  • Display method and device for video preview

    CN106610993A

  • Webpage processing method / system, computer readable storage medium and electronic equipment

    CN108280168A

  • Webpage preloading method and device and electronic equipment

    CN114168872A

  • Apparatus and method for performing application in electronic device

    US20180293087A1