Mobile application resource loading method and device based on user behaviors
Through the mobile application resource loading method based on user behavior, predicting the user's subsequent operations and determining the resource loading strategy, the page loading and response speed problems of mobile applications under weak network conditions are solved, and more efficient resource loading and traffic management are achieved.
Patent Information
- Application Number
- CN202411965825.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-28
AI Technical Summary
Existing mobile applications have long page loading time under weak or no network conditions, long response time of data interfaces, and hybrid mobile application page caching technology and lazy loading technology cannot effectively solve these problems. At the same time, overall page caching will lead to high traffic consumption.
By collecting user's page access behavior data, predicting user's subsequent access operations, determining corresponding resource loading strategies, and realizing targeted and intelligent dynamic scheduling of mobile application resource loading.
It improves the access speed of mobile application pages, avoids waste of traffic caused by unnecessary resource loading, and improves the performance of mobile applications under weak network conditions.
Smart Images

Figure CN119719544A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of mobile applications, and in particular, to a method, apparatus, computer device, and computer-readable storage medium for loading mobile application resources based on user behavior. Background Art
[0002] Compared with PC applications, mobile applications have higher requirements for page response and resource loading speed, but the network restrictions and traffic restrictions of mobile applications make it more difficult to ensure page response speed for mobile applications. Generally, in order to improve the efficiency of mobile application page loading, the following technologies are mainly used:
[0003] Hybrid mobile application page caching technology: Hybrid mobile applications (Hybrid Mobile Applications) combine the advantages of native applications and Web technologies. They usually use HTML, CSS and JavaScript to build application interfaces and are hosted through native frameworks (such as Cordova, Capacitor, React Native's Webview component, etc.). In order to improve the performance of mobile applications under weak network / no network conditions, hybrid mobile application frameworks usually use page caching technology. When the mobile application is used for the first time, the front-end code and resources of the mobile application are downloaded to the local storage. When the mobile application is opened again, it is used directly without repeated downloads. The hybrid mobile application page caching technology realizes the advance download of mobile application resources, but it cannot solve the problems of long mobile application page loading time and long mobile application data interface response time; at the same time, the overall hybrid mobile application page caching will also consume a lot of traffic.
[0004] Lazy loading technology: Lazy loading is a delayed loading technology that is mainly used to optimize the initial loading time of an application and improve the response speed of subsequent operations. It works by loading resources (such as pictures, videos, scripts, data, etc.) only when needed, rather than loading all content at once when the page is first loaded. This technology is widely used in the long page loading process of mobile applications. Lazy loading technology implements segmented loading for a single page, which is effective for improving the speed of longer pages, but cannot improve the response speed of subsequent pages.
[0005] Pre-rendering technology: Rendering means rendering page components into a hidden DOM node or generating static HTML before the user actually visits the page. Once the user navigates to the page, the rendered content can be displayed immediately. Pre-rendering technology can load subsequent pages in advance, but it cannot improve the response speed of long pages or download resource files in advance. Summary of the invention
[0006] The purpose of the embodiments of the present application is to provide a method, apparatus, computer device and computer-readable storage medium for loading mobile application resources based on user behavior, which can use the user behavior data collected in advance as prior knowledge to make decisions, adopt corresponding resource loading strategies, and achieve targeted and intelligent dynamic scheduling of mobile application resource loading strategies, thereby improving the access speed of mobile application pages and avoiding traffic waste caused by unnecessary resource loading.
[0007] One aspect of an embodiment of the present application provides a method for loading mobile application resources based on user behavior, including:
[0008] For the page of the mobile application currently visited by the user, the subsequent access operation of the user is predicted based on the previously collected data of the user's page access behavior;
[0009] Determine the corresponding resource loading strategy based on the predicted subsequent access operations of the user;
[0010] Perform subsequent application resource loading according to the determined resource loading strategy.
[0011] Optionally, the previously collected data on the user's page access behavior specifically includes:
[0012] When the user visited the page before, the page scrolled down and the page jump relationship.
[0013] Optionally, predicting the user's subsequent access operations based on previously collected data of the user's page access behavior specifically includes:
[0014] Predicting the user's page sliding position based on previously collected data on the user's page access behavior; and
[0015] Determining a corresponding resource loading strategy according to the predicted subsequent access operation of the user specifically includes:
[0016] According to the predicted page sliding position of the user, the corresponding resource loading strategy is determined to be a strategy for directly loading the relevant position data of the page.
[0017] Optionally, predicting the user's subsequent access operations based on previously collected data of the user's page access behavior specifically includes:
[0018] Predicting whether the user will scroll down the page based on previously collected data on the user's page access behavior; and
[0019] Determining a corresponding resource loading strategy according to the predicted subsequent access operation of the user specifically includes:
[0020] If it is predicted that the user will not scroll down the page, the corresponding resource loading strategy is determined to be a lazy loading strategy.
[0021] Optionally, predicting the user's subsequent access operations based on previously collected data of the user's page access behavior specifically includes:
[0022] Predicting the pages that the user will visit later based on previously collected data on the user's page access behavior; and
[0023] Determining a corresponding resource loading strategy according to the predicted subsequent access operation of the user specifically includes:
[0024] According to the predicted page that the user will visit later, the corresponding resource loading strategy is determined, including: the download strategy of the component where the page is located, and the loading strategy of the page.
[0025] One aspect of an embodiment of the present application further provides a mobile application resource loading device based on user behavior, including:
[0026] The user behavior analysis module is used to predict the user's subsequent access operations based on the previously collected data of the user's page access behavior for the mobile application page currently accessed by the user;
[0027] A resource loading strategy module is used to determine a corresponding resource loading strategy based on the predicted subsequent access operations of the user;
[0028] The mobile application component management module is used to perform subsequent application resource loading according to the determined resource loading strategy.
[0029] One aspect of an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for loading mobile application resources based on user behavior when executing the computer program.
[0030] One aspect of an embodiment of the present application provides a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned method for loading mobile application resources based on user behavior are implemented.
[0031] The embodiment of the present application provides a method, device, equipment and computer-readable storage medium for loading mobile application resources based on user behavior. For the page of the mobile application currently accessed by the user, the subsequent access operation of the user is predicted based on the previously collected data of the user's page access behavior; the corresponding resource loading strategy is determined based on the predicted subsequent access operation of the user; and the subsequent application resource loading is performed based on the determined resource loading strategy. In this way, the user behavior data collected in advance can be used as prior knowledge for decision-making, and the corresponding resource loading strategy can be adopted to achieve the pertinence of the mobile application resource loading strategy and intelligent dynamic scheduling, thereby improving the access speed of the mobile application page and avoiding the waste of traffic caused by unnecessary resource loading. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A flowchart of a method for loading mobile application resources based on user behavior according to a first embodiment of the present application is schematically shown;
[0033] Figure 2 The internal structure block diagram of the mobile application resource loading device based on user behavior of the second embodiment of the present application is schematically shown;
[0034] Figure 3 The hardware architecture diagram of a computer device suitable for the method for loading mobile application resources based on user behavior according to the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0036] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0037] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.
[0038] The technical solution of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0039] Embodiment 1
[0040] Figure 1 A flowchart of a method for loading mobile application resources based on user behavior in the first embodiment of the present application is schematically shown, comprising the following steps S100 to S103, wherein:
[0041] Step S100: When a user starts a mobile application, previously collected data on the page access behavior of the user when using the mobile application is obtained.
[0042] In this step, when the user starts the mobile application, the previously collected data of the page access behavior of the user when using the mobile application is obtained, including: the page sliding situation when the user accesses the page, and the page jump relationship;
[0043] In addition, in this step, the attribute information of each page previously collected for the mobile application can also be obtained; the attribute information marked for each page may include: 1) whether this page is a long page, and at which position of the page does it need to load the remaining data of the page; 2) which subordinate pages this page links to, and at which position of the page does it need to load the subordinate page (for example, the page reaches the submit button position, the next level page needs to be loaded, and it will not be loaded if it does not reach this position, thereby reducing resource consumption); 3) whether this page needs to download subsequent application modules; 4) whether this page can be preloaded, and the content that can be preloaded (such as page structure, certain specific data interface requests).
[0044] Step S101: for a page of a mobile application currently accessed by a user, predict the user's subsequent access operations based on previously collected data of the user's page access behavior.
[0045] In this step, when a user launches a mobile application on a mobile terminal and visits a page of the mobile application, the user's subsequent access operations are predicted based on the previously collected data on the user's page access behavior; and the collection of page access behavior data continues after the user launches the mobile application this time.
[0046] Specifically, based on the previously collected data of the user's page access behavior and the attribute information of the page, the user's subsequent access operations can be predicted:
[0047] For example, for the page currently visited by the user, based on the collected attribute information of the page, it is determined that the page is a long page, and the previously collected data of the user's page access behavior, if the probability of the user sliding down to a certain position when visiting the page is greater than a set upper threshold (for example, the set upper threshold is 70%), then it is predicted that the user's page sliding position is a position with a probability greater than the upper threshold; if the previously collected probability of the user sliding down to a certain position when visiting the page is less than a set lower threshold (for example, the set lower threshold is 30%), then it is predicted that the user will not slide down the page to that position, that is, it is predicted that the user will not perform a page sliding operation in the future;
[0048] For another example, based on the previously collected data on the user's page access behavior, the page jump relationship of the user to other pages after visiting the page is calculated, and the page that the user will visit subsequently can be predicted: for the page currently visited by the user, based on the collected attribute information of the page and the previously collected data on the user's page access behavior, the probability of the user jumping to other pages when visiting a certain position of the page (such as the initial position of the page or a certain sliding position) is calculated; based on the probability of jumping to other pages, the page that the user will visit subsequently is predicted; for example, when the user visits a certain position of page A, the probability of opening pages B, C, and D is 40%, 10%, and 10% respectively, and there is another 40% probability of not opening a new page, then it is predicted that the page that the user will visit subsequently is page A; that is, the page with the highest jump probability is predicted to be the page that the user will visit subsequently.
[0049] Step S102: Determine a corresponding resource loading strategy based on the predicted subsequent access operations of the user.
[0050] Generally, a mobile application can be regarded as a collection of a series of pages. To facilitate access to mobile applications, mobile applications are split into multiple components. When a user starts a mobile application on a mobile terminal, the required components can be downloaded from the server and related functions can be run. The strategy for component splitting is: 1) Try to ensure that mobile application resources that complete the same business process are split into the same component to reduce the number of loading times; 2) Common components that can be reused by multiple businesses can be split separately to reduce the size of the single load for each business process.
[0051] Specifically, if the page sliding position of the user is predicted in the above step S101, then in this step, the corresponding resource loading strategy can be determined as a strategy for directly loading the page-related position data;
[0052] If the above step S101 predicts that the user will not perform a page scrolling operation, then in this step, the corresponding resource loading strategy can be determined as a lazy loading strategy;
[0053] If the above step S101 predicts the page that the user will visit later, then the corresponding resource loading strategy that can be determined in this step includes: the download strategy of the component where the page is located, and the loading strategy of the page.
[0054] Step S103: Perform subsequent application resource loading according to the determined resource loading strategy.
[0055] Specifically, according to the direct loading strategy of the data at the relevant position of the page determined in the above step S102, the data at the relevant position of the page can be directly loaded in this step;
[0056] Alternatively, according to the lazy loading strategy determined in step S102 above, data at subsequent locations of the page are no longer loaded in this step;
[0057] Alternatively, according to the download strategy of the component where the page is located and the loading strategy of the page determined in the above step S102, in this step, the component where the page is located is first downloaded, and then the page is loaded from the component.
[0058] In a method for loading mobile application resources based on user behavior provided in the first embodiment of the present application, for the page of the mobile application currently accessed by the user, the subsequent access operation of the user is predicted based on the data of the page access behavior of the user collected previously; the corresponding resource loading strategy is determined based on the predicted subsequent access operation of the user; and the subsequent application resource loading is performed according to the determined resource loading strategy. Since the corresponding resource loading strategy is determined based on the predicted subsequent access operation of the user, the subsequent resource loading can be more targeted, and the resources that the user is about to access can be loaded in advance, or it can be predicted in advance that the user will not continue to access in the future. Therefore, the access speed of the mobile application page can be improved, and the waste of traffic caused by unnecessary resource loading can also be avoided.
[0059] Embodiment 2
[0060] Figure 2 A block diagram of a mobile application resource loading device based on user behavior in the second embodiment of the present application is schematically shown. The internal structure may include: a user behavior analysis module 201, a resource loading strategy module 202, and a mobile application component management module 203, wherein:
[0061] The user behavior analysis module 201 is used to predict the user's subsequent access operations for the mobile application page currently accessed by the user based on the previously collected data of the user's page access behavior;
[0062] The resource loading strategy module 202 is used to determine the corresponding resource loading strategy according to the predicted subsequent access operation of the user;
[0063] The mobile application component management module 203 is used to perform subsequent application resource loading according to the determined resource loading strategy.
[0064] Furthermore, the mobile application resource loading device based on user behavior may also include: a user behavior collection module 200;
[0065] The user behavior collection module 200 is used to collect data on the user's page access behavior after the user opens the mobile application.
[0066] Furthermore, the mobile application resource loading device based on user behavior may also include: a page information collection module 204;
[0067] The page information collection module 204 is used to collect attribute information of each page of the mobile application;
[0068] Accordingly, the user behavior analysis module 201 can predict the user's subsequent access operations for the page of the mobile application currently visited by the user based on the data of the user's page access behavior previously collected by the user behavior collection module 200 and the attribute information of the page collected by the page information collection module 204.
[0069] The implementation of the specific functions of each module in the above-mentioned mobile application resource loading device based on user behavior can refer to the above-mentioned Figure 1 The implementation methods of each step in the method flow shown will not be repeated here.
[0070] Embodiment 3
[0071] Figure 3 The schematic diagram of the hardware architecture of a computer device 1300 suitable for implementing a method for loading mobile application resources based on user behavior according to the third embodiment of the present application is shown schematically. In this embodiment, the computer device 1300 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. For example, it can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Figure 3 As shown, the computer device 1300 includes at least but is not limited to: a memory 1310, a processor 1320, and a network interface 1330 which can communicate with each other via a system bus. Among them:
[0072] The memory 1310 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 1310 may be an internal storage module of the computer device 1300, such as a hard disk or a memory of the computer device 1300. In other embodiments, the memory 1310 may also be an external storage device of the computer device 1300, such as a plug-in hard disk equipped on the computer device 1300, a smart memory card (Smart Media Card, referred to as SMC), a secure digital (Secure Digital, referred to as SD) card, a flash card, etc. Of course, the memory 1310 may also include both the internal storage module of the computer device 1300 and its external storage device. In this embodiment, the memory 1310 is generally used to store the operating system and various application software installed on the computer device 1300, such as the program code of the mobile application resource loading method based on user behavior, etc. In addition, the memory 1310 can also be used to temporarily store various data that have been output or will be output.
[0073] In some embodiments, the processor 1320 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 1320 is generally used to control the overall operation of the computer device 1300, such as performing control and processing related to data interaction or communication with the computer device 1300. In this embodiment, the processor 1320 is used to run the program code stored in the memory 1310 or process data.
[0074] The network interface 1330 may include a wireless network interface or a wired network interface, and the network interface 1330 is generally used to establish a communication link between the computer device 1300 and other computer devices. For example, the network interface 1330 is used to connect the computer device 1300 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 1300 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0075] It should be pointed out that Figure 3 Only a computer device having components 1310 - 1330 is shown, but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0076] In this embodiment, the method for identifying transition drawing stored in the memory 1310 can also be divided into one or more program modules and executed by one or more processors (processor 1320 in this embodiment) to complete the embodiment of the present application.
[0077] Embodiment 4
[0078] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the mobile application resource loading method based on user behavior in the above embodiment are implemented.
[0079] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, referred to as SMC), a secure digital (Secure Digital, referred to as SD) card, a flash card, etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device, such as the program code of the method for identifying transition drawing in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.
[0080] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0081] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for loading mobile application resources based on user behavior, characterized in that: include: For the page of the mobile application currently visited by the user, the subsequent access operation of the user is predicted based on the previously collected data of the user's page access behavior; Determine the corresponding resource loading strategy based on the predicted subsequent access operations of the user; Perform subsequent application resource loading according to the determined resource loading strategy.
2. The method according to claim 1, characterized in that The previously collected data on the user's page access behavior specifically includes: When the user visited the page before, the page scrolled down and the page jump relationship.
3. The method according to claim 2, characterized in that The predicting of the user's subsequent access operations based on the previously collected data of the user's page access behavior specifically includes: Predicting the user's page sliding position based on previously collected data on the user's page access behavior; and Determining a corresponding resource loading strategy according to the predicted subsequent access operation of the user specifically includes: According to the predicted page sliding position of the user, the corresponding resource loading strategy is determined to be a strategy for directly loading the relevant position data of the page.
4. The method according to claim 2, characterized in that: The predicting of the user's subsequent access operations based on the previously collected data of the user's page access behavior specifically includes: Predicting whether the user will scroll down the page based on previously collected data on the user's page access behavior; and Determining a corresponding resource loading strategy according to the predicted subsequent access operation of the user specifically includes: If it is predicted that the user will not scroll down the page, the corresponding resource loading strategy is determined to be a lazy loading strategy.
5. The method according to claim 2, characterized in that: The predicting of the user's subsequent access operations based on the previously collected data of the user's page access behavior specifically includes: Predicting the pages that the user will visit later based on previously collected data on the user's page access behavior; and Determining a corresponding resource loading strategy according to the predicted subsequent access operation of the user specifically includes: According to the predicted page that the user will visit later, the corresponding resource loading strategy is determined, including: the download strategy of the component where the page is located, and the loading strategy of the page.
6. A mobile application resource loading device based on user behavior, characterized in that: include: The user behavior analysis module is used to predict the user's subsequent access operations based on the previously collected data of the user's page access behavior for the mobile application page currently accessed by the user; A resource loading strategy module is used to determine a corresponding resource loading strategy based on the predicted subsequent access operations of the user; The mobile application component management module is used to perform subsequent application resource loading according to the determined resource loading strategy.
7. The device according to claim 6, characterized in that Also includes: The user behavior collection module is used to collect the data of the user's page access behavior after the user opens the mobile application.
8. The device according to claim 6, characterized in that Also includes: A page information collection module, used for collecting attribute information of each page of the mobile application; as well as The user behavior analysis module is specifically used to predict the user's subsequent access operations for the page of the mobile application currently accessed by the user based on previously collected data on the user's page access behavior and attribute information of the page.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it is used to implement the steps of the mobile application resource loading method based on user behavior as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which can be executed by at least one processor so that the at least one processor executes the steps of the user behavior-based mobile application resource loading method described in any one of claims 1 to 5.