Resource loading method and device

By obtaining the length of the cursor stay, we can judge the user's operating habits and automatically load the data resources of the next page, solving the problems of high manual maintenance costs and waste of resources, and improving the page loading performance.

CN119536577APending Publication Date: 2025-02-28BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311121260.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, there are problems such as high manual maintenance costs and waste of resources in page loading performance optimization.

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 duration is determined based on a plurality of second durations and a plurality of third durations, and is used to determine possible user operating habits.

Benefits of technology

Reduce manual maintenance costs, realize on-demand preload resources, avoid resource waste, and improve page loading and rendering speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource loading method and device.The method comprises the steps that the continuous target duration of a cursor staying in an interaction region is obtained, when the target duration is larger than the preset first duration, data resources of a next page are loaded, the first duration is determined based on multiple second durations and multiple third durations, and the data resources of the next page are loaded according to the second durations and the third durations. And then detecting a preset operation performed by the cursor in the interaction area, and displaying the data resources. In the technical scheme, the habit information corresponding to the related operation of the user is determined according to the duration data of the previous related operation of page switching or the related operation of not carrying out page switching by the user, so that whether the possibility of page switching exists at present or not is pre-judged to pre-load page resources, the manual maintenance cost is reduced, and the user experience is improved. And resources are preloaded as required, so that the waste of the resources is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a resource loading method and device. Background Art

[0002] The page loading performance directly affects the user's business efficiency and product experience, so most network applications attach great importance to page loading performance and related optimization work. In the performance optimization work of the end application, pre-fetching data and resources for the page to be jumped in advance can greatly improve the loading and rendering speed of the page.

[0003] In the prior art, a list of pages that need to be preloaded is manually maintained and the preloading work is completed. After that, after the user clicks a corresponding function button, the preloading work of subsequent pages can be controlled and implemented.

[0004] However, there is a problem of manual maintenance cost in the prior art, resulting in a corresponding waste of resources. Summary of the invention

[0005] The embodiments of the present disclosure provide a resource loading method and device to overcome the problem of waste of human resources in the process of fast loading of pages.

[0006] In a first aspect, an embodiment of the present disclosure provides a resource loading method, including:

[0007] 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;

[0008] 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 a preset operation in the interactive area and moves out of the interactive area;

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

[0010] In a second aspect, an embodiment of the present disclosure provides a resource loading device, including:

[0011] 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;

[0012] 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 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 moves out of the interactive area;

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

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0015] The memory stores computer-executable instructions;

[0016] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the resource loading method as described in the first aspect and various possible designs of the first aspect.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the resource loading method described in the first aspect and various possible designs of the first aspect is implemented.

[0018] In a fifth aspect, 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 first aspect and various possible designs of the first aspect.

[0019] The resource loading method and device provided in this embodiment include: obtaining the target duration of the cursor staying in the interactive area, the interactive area is to jump from the current page to the next page in response to the preset operation of the cursor, and when the target duration is greater than the preset first duration, loading the data resources of the next page; wherein 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, and then when the preset operation performed by the cursor in the interactive area is detected, the data resources are displayed. In this technical solution, the habit information corresponding to the user's related operation is determined by the duration data of the user's previous page switching related operation or the non-page switching related operation, so as to predict whether there is a possibility of switching pages at present, so as to preload page resources, which not only reduces the manual maintenance cost, but also realizes on-demand preloading of resources and avoids waste of resources. 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, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative labor.

[0021] Figure 1 Schematic diagram of the resource loading method provided in the embodiment of the present disclosure Figure 1 ;

[0022] Figure 2 A user interaction behavior definition diagram provided for an embodiment of the present disclosure;

[0023] Figure 3 Schematic diagram of the resource loading method provided in the embodiment of the present disclosure Figure 2 ;

[0024] Figure 4 Schematic diagram of the resource loading method provided in the embodiment of the present disclosure Figure 3 ;

[0025] Figure 5 A schematic diagram of the structure of a resource loading device provided in an embodiment of the present disclosure;

[0026] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0028] The page loading performance directly affects the user's business efficiency and product experience, so most network (English: Web) applications attach great importance to page loading performance and related optimization work. In the performance optimization work of the end application, pre-fetching data and resources for the page to be jumped in advance can greatly improve the loading and rendering speed of the page.

[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 work of subsequent pages can be controlled and realized, but this page list needs to be maintained manually, and there is a certain loss of labor costs during the project implementation;

[0031] Second, scan and traverse the page Hypertext Markup Language (HTML) 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, the above two methods both pre-fetch or pre-render data for pages that may jump to the current page, while the actual jump action may not occur. Pre-fetching or pre-rendering resources for pages that do not jump means a waste of 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 an area that triggers a page switch after a click operation and a non-click operation can be collected, and then the user's habits can be determined based on the collected length of time, that is, how long it will take for the user to most likely perform a click operation; in actual implementation, the user's possible operation can be determined 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 may be continuously corrected based on the time taken for the corresponding operation to occur, so as to increase the accuracy of the judgment.

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

[0036] Afterwards, when the user clicks the mouse in the interactive area, in response to the click operation of the mouse cursor in the interactive area, the computer directly renders the acquired data resources, 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 may specifically be a display device such as a mobile phone, a computer, a notebook, or a tablet.

[0038] The following are detailed embodiments of the technical solution of the present disclosure, and the following embodiments can be used in combination with each other.

[0039] Figure 1 Schematic diagram of the resource loading method provided in the embodiment of the present disclosure Figure 1 .like Figure 1 As shown, the resource loading method may include:

[0040] Step 11, obtaining 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 for the user to move the cursor to the interaction 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 for the user to move the cursor into the interaction 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, and starts pre-acquiring data resources for the next page to quickly switch pages.

[0052] For example, the first duration may be 200 ms. When the target duration 201 ms is greater than 200 ms, 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 pre-fetch and pre-load the 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, a previous-level page, etc. in actual situations.

[0055] Optionally, the first duration can be determined by two groups of data of the user, one group is a second duration of moving the cursor to the interaction area for multiple preset operations, and the other group is a third duration of moving the cursor to the interaction area and then out of the interaction area. The determination process of the first duration is given in the following embodiment.

[0056] In one possible implementation, Figure 2 A user interaction behavior definition diagram provided by the embodiment of the present disclosure, such as Figure 2 As shown, the user interaction behaviors include: a preset operation in the interaction area (eg, a click operation Click) and an operation of moving out of the interaction area without performing a preset operation (eg, 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 as the timing ends, or no preset operation occurs and the cursor is moved out of the interactive area as the timing ends.

[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 (eg, a click operation) in the interactive area, and the electronic device renders the acquired data resources and displays them on a corresponding page, such as the next page.

[0061] In addition, 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.

[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 cleaned up after 800 ms.

[0064] This implementation can delete the loaded resource data to reduce the 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 to jump from the current page to the next page in response to the preset operation of the cursor, and when the target duration is greater than the preset first duration, the data resources of the next page are loaded, wherein 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, and then the preset operation performed by the cursor in the interactive area is detected, and the data resources are displayed. In this technical solution, the habit information used by the user for the relevant operation is determined by the duration data of the user's previous page switching related operations or the related operations without page switching, so as to predict whether there is a possibility of switching pages at present, so as to preload page resources, which not only reduces the labor maintenance cost, but also realizes on-demand preloading of resources and avoids waste of resources.

[0066] exist Figure 1 Based on the embodiment shown, Figure 3 Schematic diagram of the resource loading method provided in the embodiment of the present disclosure Figure 2 .like Figure 3 As shown, 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 longer than a set initial duration in all first operations, and determine, based on all third durations, a second proportion of second operations whose third duration is longer 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 are 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 that are longer than 200 ms in all second durations is determined as the second proportion.

[0071] For example, there are 100 second operations in total, and 5 second operations 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 time the cursor stays in the interactive area is greater than the initial time and a first operation occurs;

[0073] Optionally, this step may 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:

[0075] P1=P2*P4 / (P2*P4+P3*P5)

[0076] 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.

[0077] 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 is half each.

[0078] For example, the first proportion P2 is 90%, and the second proportion P3 is 5%. Then, when the cursor stays in the interactive area for a time longer than the initial time, the first probability P1 of the first operation occurring is:

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

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

[0081] 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 to load the data resources, that is, the first duration.

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

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

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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, the current value can be set to 202ms, and the above steps can be repeated to continue determining the first duration.

[0088] 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 the first operations according to all the second durations, and determines the second proportion of the second operation whose third duration is greater than the initial duration in all the second operations according to all the third durations; determines the first probability that the time the cursor stays in the interactive area is greater than the initial duration and the first operation occurs according to 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 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 that moves 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 judgment criteria for predicting the user operation are determined, thereby increasing the accuracy of the above possible resource preloading.

[0089] Based on the above embodiments, Figure 4 Schematic diagram of the resource loading method provided in the embodiment of the present disclosure Figure 3 .like Figure 4 As shown, after step 12, the resource loading method may further include:

[0090] 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;

[0091] 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;

[0092] In this implementation, the duration of the user's mouse stay in the actual application scenario also depends on the interactive area and the user's personal behavior habits. Therefore, the first duration can also be updated and corrected for the click and hover that have occurred in the current situation.

[0093] That is, after it is detected that the user performs a preset operation in the interactive area or moves the cursor out of the interactive area without performing a preset operation, the entire duration is taken as the fourth duration.

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

[0095] Step 42: adjust the first duration according to the fourth duration.

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

[0097] Under this implementation, the user completes the preset operation using the mouse cursor, and the time consumed (i.e., the fourth duration) is t;

[0098] 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 Hover, although it is a correct prediction, the threshold d can be appropriately lowered to improve the accuracy of the judgment and provide more space for subsequent operations; if the user's behavior this time is Click, it means that the prediction is inaccurate and the threshold d needs to be lowered;

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

[0100] Optionally, this step can be implemented in two ways:

[0101] The first type is that if the fourth duration is less than or equal to the first duration, the first duration is reduced according to the preset first step;

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

[0103] The second type is that if the fourth duration is greater than the first duration and the target operation is to move out of the interactive area, the first duration is increased according to a preset second step length.

[0104] For example, 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.

[0105] The resource loading method provided by the embodiment of the present disclosure obtains the fourth duration from the cursor moving into the interactive area to the execution of the target operation after detecting the user's target operation, wherein the target operation includes the preset operation performed by the cursor in the interactive area, or the operation of the cursor not performing the preset operation in the interactive area and moving out of the interactive area, and then adjusts the first duration according to the fourth duration. In this technical solution, the first duration corresponding to the user's habit is updated by the duration of the user's current behavior to increase the accuracy of subsequent judgments.

[0106] 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.

[0107] Figure 5 This is a schematic diagram of the structure of the resource loading device provided in the embodiment of the present disclosure. Figure 5 As shown, the device includes:

[0108] An acquisition unit 51 is used to acquire a target duration for a cursor to stay 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;

[0109] The processing unit 52 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 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 a preset operation in the interactive area and moves out of the interactive area;

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

[0111] 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:

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

[0113] Determining, according to the first proportion and the second proportion, a first probability that a time duration for which the cursor stays in the interactive area is greater than an initial time duration and a first operation occurs;

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

[0115] 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.

[0116] 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:

[0117] Determine a first product according to the product of the first proportion and a preset second probability of the first operation occurring, and determine a second product according to the product of the second proportion and a preset third probability of the second operation occurring;

[0118] 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.

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

[0120] After detecting the user's target operation, obtaining a fourth duration from when the cursor moves into the interactive area to when 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;

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

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

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

[0124] 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 length.

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

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

[0127] and / or,

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

[0129] 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 herein.

[0130] It should be noted that it should be understood that the division of the various modules of the above devices is only 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. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together or implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0131] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present disclosure, and 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 (Portable Media Players, PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0132] Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0133] like Figure 6As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, 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 to a random access memory (RAM) 63. In the RAM 63, various programs and data required for the operation of the electronic device are also stored. The processing device 61, the ROM 62, and the 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.

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

[0135] 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 contains 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 through 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 executed.

[0136] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit 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 of the above.

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

[0138] 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.

[0139] 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 an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via 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).

[0140] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

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

[0142] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0143] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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.

[0144] 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, and its implementation principle and technical effects are similar and will not be described in detail here.

[0145] An embodiment of the present disclosure provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the resource loading method.

[0146] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage 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 memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0147] 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 a component 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.

[0148] An embodiment of the present disclosure also provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the above-mentioned resource loading method can be implemented.

[0149] also:

[0150] In a first aspect, according to one or more embodiments of the present disclosure, a resource loading method is provided, comprising:

[0151] 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;

[0152] 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 a preset operation in the interactive area and moves out of the interactive area;

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

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

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

[0156] Determining, according to the first proportion and the second proportion, a first probability that a time duration for which the cursor stays in the interactive area is greater than an initial time duration and a first operation occurs;

[0157] When the first probability is greater than the preset probability, taking the initial duration as the first duration;

[0158] 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.

[0159] In one or more embodiments, determining, based on 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 a first operation occurs includes:

[0160] Determine a first product according to the product of the first proportion and a preset second probability of the first operation occurring, and determine a second product according to the product of the second proportion and a preset third probability of the second operation occurring;

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

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

[0163] 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 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;

[0164] The first duration is adjusted according to the fourth duration.

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

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

[0167] 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.

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

[0169] Load the data resource of the next page by means of link instructions;

[0170] and / or,

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

[0172] In a second aspect, according to one or more embodiments of the present disclosure, a resource loading device is provided, including:

[0173] 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;

[0174] 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 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 moves out of the interactive area;

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

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

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

[0178] Determining, according to the first proportion and the second proportion, a first probability that a time duration for which the cursor stays in the interactive area is greater than an initial time duration and a first operation occurs;

[0179] When the first probability is greater than the preset probability, taking the initial duration as the first duration;

[0180] 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.

[0181] In one or more embodiments, the processing unit determines, based on 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 a first operation occurs, specifically for:

[0182] Determine a first product according to the product of the first proportion and a preset second probability of the first operation occurring, and determine a second product according to the product of the second proportion and a preset third probability of the second operation occurring;

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

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

[0185] 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 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;

[0186] The first duration is adjusted according to the fourth duration.

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

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

[0189] 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.

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

[0191] Load the data resource of the next page by means of link instructions;

[0192] and / or,

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

[0194] 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 herein.

[0195] It should be noted that it should be understood that the division of the various modules of the above devices is only 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. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together or implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0196] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0197] The memory stores computer-executable instructions;

[0198] 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 described in the first aspect and various possible designs of the first aspect.

[0199] In a fourth aspect, 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 execution instructions. When a processor executes the computer execution instructions, the resource loading method described in the first aspect and various possible designs of the first aspect is implemented.

[0200] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the resource loading method described in the first aspect and various possible designs of the first aspect is implemented.

[0201] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. 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 a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0202] 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 are 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.

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

Claims

1. A resource loading method, characterized in that: include: 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 a preset operation in the interactive area and moves out of the interactive area; A 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, characterized in that 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 durations are longer than a set initial duration among all the first operations, and determine, based on all the third durations, a second proportion of second operations whose third durations are longer than the initial duration among all the second operations; Determining, according to the first proportion and the second proportion, a first probability that a time duration for which the cursor stays in the interactive area is greater than an initial time duration and a first operation occurs; When the first probability is greater than the preset probability, taking the initial duration 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 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.

3. The method according to claim 2, characterized in that The determining, according to 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 a first operation to occur includes: Determine a first product according to the product of the first proportion and a preset second probability of the first operation occurring, and determine a second product according to the product of the second proportion and a preset third probability of the second operation occurring; The ratio of the first product to a first sum is taken as the first probability, and 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, characterized in that: The method further comprises: 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 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; The first duration is adjusted according to the fourth duration.

5. The method according to claim 4, characterized in that 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 step; 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.

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

7. A resource loading device, characterized in that: include: 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; 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 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 an operation in which the cursor does not perform the preset operation in the interactive area and moves out of the interactive area; A display unit is used to detect a preset operation performed by the cursor in the interactive area and display the data resource.

8. An electronic device, characterized in that: include: Processor and memory; 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, characterized in that: 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, characterized in that When the computer program is executed by a processor, the resource loading method according to any one of claims 1 to 6 is implemented.