Application loading method, device, equipment and storage medium thereof
By downloading basic packages and business packages to the cache space during application loading, identifying user instructions and screening differentiated application packages, the problem of high resource consumption in the existing technology is solved, and an efficient and flexible loading method is achieved.
Patent Information
- Application Number
- CN202411181402.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The existing application loading method results in large packaging resource consumption and low packaging efficiency. Especially when business functions are iterated, the package size becomes larger and larger, packaging takes a long time, and resource consumption is large.
By obtaining the target application loading request, downloading the application basic package and business package to the cache space, identifying the user's functional instructions, screening the differentiated application business packages, identifying the loaded packages based on historical loading records, and loading or adjusting the differentiated minimum package to realize the business function.
The separation of basic loading and business function loading is achieved, which reduces resource consumption, improves loading efficiency, increases flexibility, and saves loading resources.
Smart Images

Figure CN119179496B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of R&D and design technology, and is applied to application loading scenarios, and in particular to an application loading method, apparatus, device, and storage medium thereof. Background Art
[0002] During the project packaging and loading process, the package generated by the project packaging is only one jsbundle file, which contains our business code, packaging tool source code and dependent third-party libraries.
[0003] Because there's only one package file, all code must be fully recompiled for each version, even if there are only minor business changes. This approach can lead to increasing package size as business functionality iterates, long packaging times, and a lack of flexibility. This can lead to high packaging resource consumption and low packaging efficiency. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to propose an application loading method, device, equipment and storage medium thereof to solve the problem that the existing application loading easily causes large packaging resource consumption and low packaging efficiency.
[0005] In order to solve the above technical problems, the embodiment of the present application provides an application loading method, which adopts the following technical solutions:
[0006] A method for loading an application program comprises the following steps:
[0007] Obtaining a target application loading request, wherein the loading request includes a download address and a loading address of an application basic package, and a download address of an application service package;
[0008] Downloading the application basic package and the application business package to a preset cache space according to the download address of the application basic package and the download address of the application business package;
[0009] Obtaining the downloaded application base package from the cache space, and performing basic loading of the application based on the loading address of the application base package, wherein the basic loading includes loading the application homepage interface and common component information;
[0010] Identify the business functional instructions clicked by the user on the homepage interface of the application through human-computer interaction instruction monitoring;
[0011] Based on the service functional instruction, determining an application service package to be loaded as a target service package;
[0012] Filtering the differentiated application business packages of the target business package according to a preset business package differentiation list, wherein the differentiated application business packages of each application business package are recorded in ascending order of difference data volume;
[0013] Identifying, based on historical loading record logs, whether mutually differentiated application service packages of the target service package have been loaded;
[0014] If the differentiated application service packages of the target service package have not been loaded, obtaining the downloaded target service package from the cache space, and loading the target service package to load the target service function;
[0015] If any differentiated application business packages of the target business package have been loaded, the application business package with the least differentiation is selected from the loaded differentiated application business packages, and the business functions corresponding to the application business package with the least differentiation are adjusted to obtain the target business function.
[0016] Furthermore, before executing the step of obtaining the target application loading request, the method further includes:
[0017] Using a preset project packaging tool to package the business source code of the target application to obtain a unique package file, wherein the package file includes the business source code, the packaging tool source code and the third-party dependent library;
[0018] Identify common codes in all third-party dependent libraries, the packaging tool source code, and the business source code by parsing the unique packaging file;
[0019] Packaging the common code, all third-party dependent libraries, and the packaging tool source code to obtain an application base package;
[0020] Using a preset filter, filtering the packaged file to obtain the unit code blocks corresponding to each business unit other than the common code, all third-party dependent libraries, and the packaging tool source code;
[0021] All unit code blocks are packaged separately to obtain all application business packages.
[0022] Furthermore, before performing the step of filtering the packaged file using a preset filter, the method further includes:
[0023] Setting the filter configuration interface and filter display interface of the filter;
[0024] Adding the common code, all third-party dependent libraries and the packaging tool source code to the filter items of the filter through the filter configuration interface;
[0025] The unique packaged file is introduced into the filter with completed filter item configuration by file import, and the filter button in the filter display interface is activated by clicking to activate the filter.
[0026] Furthermore, after executing the step of identifying the service functional instruction clicked by the user in the homepage interface of the application program through the human-computer interaction instruction monitoring method, the method further includes:
[0027] Generating a loading address of the target service package according to the pointing address of the service functional instruction;
[0028] The step of acquiring the downloaded target service package from the cache space and loading the target service package to load the target service function specifically includes:
[0029] The application service package corresponding to the target service package is loaded into the loading address of the target service package to complete the service function block loading of the target service function.
[0030] Furthermore, before executing the step of screening out the differentiated application business package of the target business package according to the preset business package differentiation list, the method further includes:
[0031] Obtaining all application service packages included in the target application;
[0032] Using the BSD if difference algorithm to calculate the difference data between any two application service packages in all the application service packages;
[0033] Calculate the data volume of all the difference data respectively to obtain the difference data volume corresponding to all the difference data;
[0034] Comparing the difference data volume with a preset data volume threshold, and determining whether the difference data volume exceeds the data volume threshold;
[0035] If the difference data volume exceeds the data volume threshold, the two application service packages corresponding to the difference data volume are regarded as a pair of non-differentiated application service packages;
[0036] If the difference data volume does not exceed the data volume threshold, the two application service packages corresponding to the difference data volume are regarded as a pair of mutually differentiated application service packages;
[0037] Arrange all mutually differentiated application service packages, and record the difference data volume of each pair of mutually differentiated application service packages to obtain arrangement and recording results;
[0038] The service package differentiation list is generated according to the sorting record result.
[0039] Furthermore, the step of generating the differentiated list of the service packages according to the result of the record arrangement specifically includes:
[0040] Selecting different application service packages from the sorted record results as a cluster center respectively;
[0041] The application business package corresponding to each cluster center is used as the focus business package;
[0042] Filter out all mutually differentiated application business packages corresponding to all focus business packages;
[0043] According to the difference data amount in the sorting record result, all mutually differentiated application service packages corresponding to all focus service packages are sorted in ascending order of difference data amount to obtain sorting results corresponding to all focus service packages;
[0044] Record the sorting results corresponding to all focus business packages respectively to obtain a differentiated list of the business packages.
[0045] Furthermore, the step of selecting the application service package with the least differentiation from the loaded differentiated application service packages, and adjusting the service function corresponding to the application service package with the least differentiation to obtain the target service function specifically includes:
[0046] Filtering out the sorting processing results with the target business package as the focus business package from the differentiated list of business packages;
[0047] identifying, according to the historical loading record log, an application service package that has been loaded in a sorting processing result with the target service package as a focus service package;
[0048] identifying, according to the sorting result, the application service package with the highest sorting among the loaded application service packages as the application service package with the least difference;
[0049] Obtaining the service code of the application service package with the smallest difference after loading as the service code to be adjusted;
[0050] Adjusting the service code to be adjusted according to the difference data between the application service package with the minimum difference and the target service package to obtain an adjusted service code;
[0051] The adjusted service code is loaded into the loading address of the target service package to complete the loading of the target service function.
[0052] In order to solve the above technical problems, the embodiment of the present application also provides an application loading device, which adopts the following technical solutions:
[0053] An application loading device, comprising:
[0054] A loading request acquisition module, configured to acquire a target application loading request, wherein the loading request includes a download address and a loading address of an application basic package, and a download address of an application service package;
[0055] An application package download module, configured to download the application basic package and the application service package to a preset cache space according to the download address of the application basic package and the download address of the application service package;
[0056] A basic loading module, configured to obtain the downloaded application basic package from the cache space and perform basic loading of the application based on the loading address of the application basic package, wherein the basic loading includes loading the application homepage interface and common component information;
[0057] A click instruction recognition module is used to identify the business functional instructions clicked by the user in the homepage interface of the application through human-computer interaction instruction monitoring;
[0058] a target service package determining module, configured to determine, based on the service functional instruction, an application service package to be loaded as a target service package;
[0059] a differentiated application service package screening module, configured to screen out differentiated application service packages of the target service package according to a preset service package differentiation list, wherein the differentiated application service packages of each application service package are recorded in ascending order of differential data volume;
[0060] A service package loading identification module, configured to identify whether a differentiated application service package of the target service package has been loaded based on a historical loading record log;
[0061] a target service package loading module, configured to obtain a downloaded target service package from the cache space and load the target service package to load the target service function if the mutually differentiated application service packages of the target service package have not yet been loaded;
[0062] The business function adjustment module is used to, if any differentiated application business packages of the target business package have been loaded, select the application business package with the least differentiation from the loaded differentiated application business packages, and adjust the business functions corresponding to the application business package with the least differentiation to obtain the target business function.
[0063] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0064] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the above-mentioned application loading method when executing the computer-readable instructions.
[0065] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0066] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the application loading method described above.
[0067] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0068] The application loading method described in the embodiment of the present application obtains a target application loading request; first loads the application basic package, and then loads the application business package according to the business functional instructions, which can achieve good separation of basic loading and business function loading, avoiding the repeated loading of basic content when loading business functions in the past, reducing loading resource consumption, and improving loading efficiency; screening out differentiated application business packages of the target business package; identifying whether the differentiated application business packages have been loaded; if the differentiated application business packages have not been loaded, obtaining the downloaded target business package from the cache space, and loading the target business package to realize the loading of the target business function; if the differentiated application business package has been loaded, screening out the application business package with the smallest difference, and obtaining the target business function through business function adjustment, which is convenient for combining the loading and adjustment methods to obtain the target business function, is more flexible, and saves loading resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the solutions in this application, a brief introduction will be given below to the drawings required for use in the description of the embodiments of this application. Obviously, the drawings described below are some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0070] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0071] Figure 2 is a flowchart of an embodiment of a method for loading an application program according to the present application;
[0072] Figure 3 It is a flowchart of a specific embodiment of the application package packaging method described in the application loading method described in this application;
[0073] Figure 4 It is a flowchart of a specific embodiment of the filter setting method described in the application loading method described in this application;
[0074] Figure 5 It is a flowchart of a specific embodiment of the method for generating a differentiated list of service packages described in the application loading method described in this application;
[0075] Figure 6 yes Figure 5 A flowchart of a specific embodiment of step 508 is shown;
[0076] Figure 7 yes Figure 2 A flowchart of a specific embodiment of step 209 is shown;
[0077] Figure 8 is a structural diagram of an embodiment of an application loading device according to the present application;
[0078] Figure 9 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0079] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0080] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0081] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0082] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0083] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0084] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0085] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0086] It should be noted that the application loading method provided in the embodiment of the present application is generally executed by a terminal device, and accordingly, the application loading device is generally provided in the terminal device.
[0087] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0088] Continue to refer Figure 2 , shows a flow chart of an embodiment of the application loading method according to the present application. The application loading method comprises the following steps:
[0089] Step 201: Obtain a target application loading request, wherein the loading request includes a download address and a loading address of an application basic package, and a download address of an application service package.
[0090] In this embodiment, the target application, for example, the application corresponding to the credit card APP in the financial business, or the application corresponding to the banking business APP in the banking business, can achieve good separation of basic loading and business function loading through the application loading method described in this application, avoiding the repeated loading of basic content when loading business functions in the past, reducing loading resource consumption, and improving loading efficiency.
[0091] In this embodiment, before executing the step of obtaining the target application loading request, the method further includes an application package packaging method.
[0092] Continue to refer Figure 3 , Figure 3 This is a flowchart of a specific embodiment of the application package packaging method described in the application loading method described in this application, including:
[0093] Step 301: Using a preset project packaging tool to package the target application's business source code to obtain a unique package file, wherein the package file includes the business source code, packaging tool source code, and third-party dependent libraries;
[0094] In this embodiment, the project packaging tools are, for example, Metro and AAPT (Android Asset Packaging Tool), among which Metro is a packaging tool provided by React Native, used to package application source code into a jsbundle file. React Native is a cross-platform solution that enables one set of code to run on multiple platforms with performance close to native. jsbundle is a special JavaScript file packaging format used to run JavaScript code in iOS applications; and AAPT is a special APP packaging tool used to package application code into an apk file.
[0095] Step 302: Identify common codes in all third-party dependent libraries, the packaging tool source code, and the business source code by parsing the unique packaging file;
[0096] In this embodiment, the unique package file may be parsed by using a reverse code parsing method to obtain the common codes in all third-party dependent libraries, the packaging tool source code, and the business source code.
[0097] Step 303: Packaging the common code, all third-party dependent libraries, and the packaging tool source code to obtain an application base package;
[0098] Step 304: Using a preset filter, filter the packaged file to obtain unit code blocks corresponding to each business unit other than the common code, all third-party dependent libraries, and the packaging tool source code;
[0099] In this embodiment, before executing the step of using a preset filter to filter the packaged file, the method further includes a filter setting method.
[0100] Continue to refer Figure 4 , Figure 4 This is a flowchart of a specific embodiment of the filter setting method described in the application loading method described in this application, including:
[0101] Step 401, setting the filter configuration interface and filter display interface of the filter;
[0102] Step 402: Add the common code, all third-party dependent libraries, and the packaging tool source code to the filter items of the filter through the filter configuration interface;
[0103] Step 403: The unique packaged file is introduced into the filter with completed filter item configuration by file import, and a filter button in the filter display interface is activated by clicking to activate the filter.
[0104] By setting the filter and correspondingly setting the filter configuration interface and filter display interface of the filter, the packaging process of the application can be more intuitively displayed when the application is packaged, and the packaging process can also be monitored through the filter display interface to avoid repeated packaging.
[0105] Step 305: Pack all unit code blocks separately to obtain all application service packages.
[0106] By identifying the common codes in all third-party dependent libraries, the packaging tool source code and the business source code in the target application, the common codes, all third-party dependent libraries and the packaging tool source code are packaged to obtain the application basic package, and all unit code blocks are packaged separately to obtain all application business packages, so that the packaging process becomes controllable. The application basic package and the application business package are packaged separately, which avoids repeated loading of the application basic package when loading different business functions, thereby reducing resource loading consumption.
[0107] Step 202 : Download the application basic package and the application service package to a preset cache space according to the download address of the application basic package and the download address of the application service package.
[0108] By first downloading the application basic package and the application business package to a preset cache space, the application can be loaded directly from the cache space without cross-platform loading. The preset cache space is, for example, the cache space of the device where the target application is installed.
[0109] Step 203, obtain the downloaded application basic package from the cache space, and perform basic loading of the application based on the loading address of the application basic package, wherein the basic loading includes loading the application home page interface and public component information.
[0110] By first performing basic loading of the application based on the loading address of the application basic package, loading the application homepage interface and public component information, thereafter, only the business function package to be used needs to be loaded, and the business function can be used in the application, thus achieving good separation of public item loading and business item loading, avoiding blind loading, and reducing loading resource consumption.
[0111] Step 204: Identify the business functional instructions clicked by the user in the homepage interface of the application program through a human-computer interaction instruction monitoring method.
[0112] In this embodiment, after executing the step of identifying the business functional instructions clicked by the user in the application home page interface through the human-computer interaction instruction monitoring method, the method also includes: generating the loading address of the target business package according to the pointing address of the business functional instruction.
[0113] Specifically, for example: based on the loading address of the application basic package, after the application is loaded in a basic manner, the home page interface of the application must correspond to an address information. When any business function button in its home page interface is clicked, the business functional instruction is issued, and correspondingly, a new page jump is generated according to the business functional instruction. At this time, the target address of the jump, that is, the address pointed to by the business functional instruction, uses the pointed address as the loading address of the target business package. The main purpose is that, since each application contains a variety of business functional modules, and most business functional modules are not frequently used, and commonly used business functional models are sometimes limited to a few, the point-and-load method for the business functional modules of the application is adopted to avoid too much loading resource consumption and memory consumption by infrequently used business functional modules, and keep the resource space occupied by the application small.
[0114] Step 205: Based on the service functional instruction, determine the application service package that needs to be loaded as the target service package.
[0115] Specifically, when the user clicks any business function button in the home page interface, the business functional instruction is issued, and accordingly, a new page jump is generated according to the business functional instruction. Not only a new jump is generated, but the business functional instruction also includes the business function that the user wants to use. Since the unit code blocks corresponding to each business unit are packaged separately during packaging, each business function corresponds to an application business package. Here, it can be provided to the user end in the form of prior deployment or application configuration file, so that after obtaining the business functional instruction, the application business package that needs to be loaded is determined.
[0116] Step 206 , filtering out differentiated application service packages of the target service package according to a preset service package differentiation list, wherein the differentiated application service packages of each application service package are recorded in the service package differentiation list in ascending order of difference data volume.
[0117] In this embodiment, before executing the step of screening out the differentiated application service packages of the target service package according to the preset service package differentiation list, the method further includes a method for generating a service package differentiation list.
[0118] Continue to refer Figure 5 , Figure 5 This is a flowchart of a specific embodiment of the method for generating a differentiated list of service packages described in the application loading method described in this application, including:
[0119] Step 501: Acquire all application service packages included in the target application;
[0120] Step 502: using a BSD if difference algorithm to calculate the difference data between any two application service packages in all the application service packages;
[0121] Specifically, the BSD if difference algorithm is a binary difference algorithm, which is mainly used to generate difference data between two versions for efficient updating. In this application, the difference data between two application service packages is calculated to identify the difference data between the two application service packages.
[0122] Step 503: Calculate the data volume of all the difference data to obtain the difference data volume corresponding to all the difference data.
[0123] Step 504: Compare the difference data volume with a preset data volume threshold, and determine whether the difference data volume exceeds the data volume threshold;
[0124] Specifically, there must be differences between the two application business packages. The smaller the difference, the closer they are. The larger the difference, the less similar the two application services are. By presetting a data volume threshold, a range is set for this difference. If the data volume threshold is exceeded, the difference is large, and the business function module is no longer updated through adjustment. If the data volume threshold is not exceeded, the two application business packages can be determined to be differentiated application business packages. The adjustment method can be used to adjust the business function module of the loaded application business package to obtain the business function module of its differentiated application business package, thereby avoiding the loading of the application business package and saving loading resource consumption.
[0125] Step 505: If the difference data volume exceeds the data volume threshold, the two application service packages corresponding to the difference data volume are regarded as a pair of non-differentiated application service packages;
[0126] Step 506: If the difference data volume does not exceed the data volume threshold, the two application service packages corresponding to the difference data volume are regarded as a pair of differentiated application service packages;
[0127] Step 507: sorting all mutually differentiated application service packages and recording the difference data volume of each pair of mutually differentiated application service packages to obtain sorting and recording results;
[0128] Step 508: Generate the service package differentiation list according to the record sorting result.
[0129] By generating the differentiated service package list, it is convenient to differentiate the application service packages of the target service package. Specifically, for example, if there are two relatively similar service functions in the target application, the application service packages of the two service functions must be relatively different. Before loading the target service package, it is first determined whether its differentiated application service package has been loaded. After the differentiated application service package has been loaded, the service function module corresponding to the differentiated application service package can be directly adjusted to obtain the service function module corresponding to the target service package. The loading is converted to an adjustment method, which reduces the loading resource consumption.
[0130] Continue to refer Figure 6 , Figure 6 yes Figure 5 The flowchart of a specific embodiment of step 508 shown includes:
[0131] Step 601: Select different application service packages from the sorted record results as a cluster center respectively;
[0132] Step 602: The application service package corresponding to each cluster center is used as a focus service package;
[0133] Step 603: Filter out all mutually differentiated application service packages corresponding to all focus service packages;
[0134] Step 604: sorting all mutually differentiated application service packages corresponding to all focus service packages by the amount of difference data in the sorting record result from smallest to largest, to obtain sorting results corresponding to all focus service packages.
[0135] Step 605 : Record the sorting processing results corresponding to all focus business packages to obtain a differentiated list of the business packages.
[0136] Specifically, different application business packages are selected from the sorting record results as a cluster center respectively, and the application business packages corresponding to each cluster center are respectively used as focus business packages. According to the difference data volume in the sorting record results, all mutually differentiated application business packages corresponding to all focus business packages are sorted from small to large according to the difference data volume, and the sorting processing results corresponding to all focus business packages are obtained. When it is subsequently identified that the mutually differentiated application business packages of the target business package have been loaded, the sorting processing results corresponding to the target business package are directly used to quickly filter out the application business package with the least difference from the loaded mutually differentiated application business packages.
[0137] Step 207 : Identify whether the differentiated application service packages of the target service package have been loaded based on the historical loading record log.
[0138] Step 208 : If the differentiated application service packages of the target service package have not been loaded, then the downloaded target service package is obtained from the cache space, and the target service package is loaded to load the target service function.
[0139] In this embodiment, the step of obtaining the downloaded target business package from the cache space and loading the target business package to realize the loading of the target business function specifically includes: loading the application business package corresponding to the target business package to the loading address of the target business package to complete the loading of the business function block of the target business function.
[0140] Specifically, since no differentiated application service packages of the target service package have been loaded, when using the target service package, it is necessary to obtain the downloaded target service package from the cache space and load the application service package corresponding to the target service package to the loading address of the target service package to complete the service function block loading of the target service function, so that the user can enjoy the corresponding service function.
[0141] Step 209: If any differentiated application business packages of the target business package have been loaded, the application business package with the least differentiation is selected from the loaded differentiated application business packages, and the business functions corresponding to the application business package with the least differentiation are adjusted to obtain the target business function.
[0142] Continue to refer Figure 7 , Figure 7 yes Figure 2 The flowchart of a specific embodiment of step 209 shown includes:
[0143] Step 701: Filter out the sorting results of the target business package as the focus business package from the differentiated business package list;
[0144] Step 702 , identifying, based on the historical loading record log, the application service packages that have been loaded in the sorting processing result with the target service package as the focus service package;
[0145] Specifically, the historical loading record log records whether all application service packages are loaded and the loading information.
[0146] Step 703: According to the ranking result, identify the application service package with the highest ranking among the loaded application service packages as the application service package with the least difference;
[0147] Step 704: Obtain the service code of the loaded application service package with the minimum difference as the service code to be adjusted;
[0148] Step 705: Adjust the service code to be adjusted based on the difference data between the application service package with the minimum difference and the target service package to obtain an adjusted service code;
[0149] Step 706: Load the adjusted service code into the loading address of the target service package to complete the loading of the target service function.
[0150] Before loading the target business package, first identify whether its differentiated application business package has been loaded. If the mutually differentiated application business packages of the target business package have been loaded, identify the application business package with the highest ranking among the loaded application business packages as the application business package with the least differentiation. This facilitates directly adjusting the business function module corresponding to the application business package with the least differentiation after the differentiated application business package has been loaded, thereby obtaining the business function module corresponding to the target business package, converting the loading into an adjustment mode, and reducing the consumption of loading resources.
[0151] The present application obtains a target application loading request; first loads the application basic package, and then loads the application business package according to the business functional instructions, which can achieve good separation of basic loading and business function loading, avoiding the repeated loading of basic content when loading business functions in the past, reducing loading resource consumption, and improving loading efficiency; screening out differentiated application business packages of the target business package; identifying whether the differentiated application business packages have been loaded; if the differentiated application business packages have not been loaded, obtaining the downloaded target business package from the cache space, and loading the target business package to realize the loading of the target business function; if the differentiated application business package has been loaded, screening out the application business package with the smallest difference, and obtaining the target business function through business function adjustment, which is convenient for combining the two methods of loading and adjustment to obtain the target business function, is more flexible, and saves loading resource consumption.
[0152] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.
[0153] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0154] In an embodiment of the present application, by obtaining a target application loading request; first loading the application basic package, and then loading the application business package according to the business functional instructions, it is possible to achieve good separation of basic loading and business function loading, avoiding the previous repeated loading of basic content when loading business functions, reducing loading resource consumption, and improving loading efficiency; screening out differentiated application business packages of the target business package; identifying whether the differentiated application business packages have been loaded; if the differentiated application business packages have not been loaded, obtaining the downloaded target business package from the cache space, and loading the target business package to achieve the loading of the target business function; if the differentiated application business package has been loaded, screening out the application business package with the smallest difference, and obtaining the target business function through business function adjustment, which is convenient for combining the two methods of loading and adjustment to obtain the target business function, is more flexible, and saves loading resource consumption.
[0155] Further references Figure 8 , as a response to the above Figure 2 The present application provides an embodiment of an application loading device, which is similar to the embodiment of the present application loading device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0156] like Figure 8 As shown, the application loading device 800 of this embodiment includes: a loading request acquisition module 801, an application package downloading module 802, a basic loading module 803, a click instruction recognition module 804, a target business package determination module 805, a differentiated application business package screening module 806, a business package loading identification module 807, a target business package loading module 808, and a business function adjustment module 809. Among them:
[0157] The loading request acquisition module 801 is used to obtain a target application loading request, wherein the loading request includes the download address and loading address of the application basic package, and the download address of the application service package;
[0158] An application package downloading module 802 is configured to download the application basic package and the application service package to a preset cache space according to the download address of the application basic package and the download address of the application service package;
[0159] The basic loading module 803 is used to obtain the downloaded application basic package from the cache space and perform basic loading of the application based on the loading address of the application basic package, wherein the basic loading includes loading the application home page interface and common component information;
[0160] A click instruction recognition module 804 is used to identify the business functional instructions clicked by the user in the homepage interface of the application program through human-computer interaction instruction monitoring;
[0161] A target service package determining module 805 is configured to determine, based on the service functional instruction, an application service package to be loaded as a target service package;
[0162] A differentiated application service package screening module 806 is configured to screen differentiated application service packages of the target service package according to a preset service package differentiation list, wherein the differentiated application service packages of each application service package are recorded in ascending order of differential data volume;
[0163] A service package loading identification module 807 is configured to identify whether a differentiated application service package of the target service package has been loaded based on a historical loading record log;
[0164] a target service package loading module 808 for acquiring a downloaded target service package from the cache space and loading the target service package to load the target service function if the differentiated application service packages of the target service package have not been loaded;
[0165] The business function adjustment module 809 is used to select the application business package with the least differentiation from the loaded differentiated application business packages if any differentiated application business packages of the target business package have already been loaded, and to obtain the target business function by adjusting the business function corresponding to the application business package with the least differentiation.
[0166] The present application obtains a target application loading request; first loads the application basic package, and then loads the application business package according to the business functional instructions, which can achieve good separation of basic loading and business function loading, avoiding the repeated loading of basic content when loading business functions in the past, reducing loading resource consumption, and improving loading efficiency; screening out differentiated application business packages of the target business package; identifying whether the differentiated application business packages have been loaded; if the differentiated application business packages have not been loaded, obtaining the downloaded target business package from the cache space, and loading the target business package to realize the loading of the target business function; if the differentiated application business package has been loaded, screening out the application business package with the smallest difference, and obtaining the target business function through business function adjustment, which is convenient for combining the two methods of loading and adjustment to obtain the target business function, is more flexible, and saves loading resource consumption.
[0167] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware via computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0168] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0169] To solve the above technical problems, the present application also provides a computer device. Figure 9 , Figure 9 This is a basic structural block diagram of the computer device in this embodiment.
[0170] The computer device 9 includes a memory 9a, a processor 9b, and a network interface 9c that are interconnected via a system bus. It should be noted that the figure only shows the computer device 9 having the memory 9a, the processor 9b, and the network interface 9c, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead. Among them, those skilled in the art will understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0171] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.
[0172] The memory 9a includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), 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, magnetic disk, optical disk, etc. In some embodiments, the memory 9a can be an internal storage unit of the computer device 9, such as the hard disk or memory of the computer device 9. In other embodiments, the memory 9a can also be an external storage device of the computer device 9, such as a plug-in hard disk equipped on the computer device 9, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the memory 9a can also include both the internal storage unit of the computer device 9 and its external storage device. In this embodiment, the memory 9a is generally used to store the operating system and various application software installed on the computer device 9, such as computer-readable instructions of an application loading method. In addition, the memory 9a can also be used to temporarily store various types of data that have been output or are to be output.
[0173] The processor 9b may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 9b is generally used to control the overall operation of the computer device 9. In this embodiment, the processor 9b is used to execute computer-readable instructions stored in the memory 9a or process data, such as computer-readable instructions for executing the application loading method.
[0174] The network interface 9c may include a wireless network interface or a wired network interface. The network interface 9c is generally used to establish a communication connection between the computer device 9 and other electronic devices.
[0175] The computer device proposed in this embodiment belongs to the field of research and development design technology and is used in application loading scenarios. This application obtains a target application loading request; first loads the application basic package, and then according to the business functional instructions; loads the application business package, which can achieve good separation of basic loading and business function loading, avoiding the previous repeated loading of basic content when loading business functions, reducing loading resource consumption and improving loading efficiency; screening out the differentiated application business package of the target business package; identifying whether the differentiated application business package has been loaded; if the differentiated application business package has not been loaded, then obtain the downloaded target business package from the cache space, load the target business package to achieve the loading of the target business function; if the differentiated application business package has been loaded, then screen out the application business package with the smallest difference, and obtain the target business function through business function adjustment, so as to facilitate the combination of loading and adjustment to obtain the target business function, which is more flexible and saves loading resource consumption.
[0176] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by a processor to enable the processor to perform the steps of the application loading method as described above.
[0177] The computer-readable storage medium proposed in this embodiment belongs to the field of research and development design technology and is applied to application loading scenarios. This application obtains a target application loading request; first loads the application basic package, and then loads the application business package according to the business functional instructions, so as to achieve good separation of basic loading and business function loading, avoiding the previous repeated loading of basic content when loading business functions, reducing loading resource consumption and improving loading efficiency; screening out the differentiated application business package of the target business package; identifying whether the differentiated application business package has been loaded; if the differentiated application business package has not been loaded, then obtain the downloaded target business package from the cache space, load the target business package to achieve the loading of the target business function; if the differentiated application business package has been loaded, then screen out the application business package with the smallest difference, and obtain the target business function through business function adjustment, so as to facilitate the combination of loading and adjustment to obtain the target business function, which is more flexible and saves loading resource consumption.
[0178] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0179] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A method for loading an application, characterized in that: The steps include: Obtaining a target application loading request, wherein the loading request includes a download address and a loading address of an application basic package, and a download address of an application service package; Downloading the application basic package and the application business package to a preset cache space according to the download address of the application basic package and the download address of the application business package; Obtaining the downloaded application base package from the cache space, and performing basic loading of the application based on the loading address of the application base package, wherein the basic loading includes loading the application homepage interface and common component information; Identify the business functional instructions clicked by the user on the homepage interface of the application through human-computer interaction instruction monitoring; Based on the service functional instruction, determining an application service package to be loaded as a target service package; Filtering the differentiated application business packages of the target business package according to a preset business package differentiation list, wherein the differentiated application business packages of each application business package are recorded in ascending order of difference data volume; Identifying, based on historical loading record logs, whether mutually differentiated application service packages of the target service package have been loaded; If the differentiated application service packages of the target service package have not been loaded, obtaining the downloaded target service package from the cache space, and loading the target service package to load the target service function; If any differentiated application business packages of the target business package have been loaded, the application business package with the least differentiation is selected from the loaded differentiated application business packages, and the business functions corresponding to the application business package with the least differentiation are adjusted to obtain the target business function.
2. The application loading method according to claim 1, characterized in that: Before executing the step of obtaining the target application loading request, the method further includes: Using a preset project packaging tool to package the business source code of the target application to obtain a unique package file, wherein the package file includes the business source code, the packaging tool source code and the third-party dependent library; Identify common codes in all third-party dependent libraries, the packaging tool source code, and the business source code by parsing the unique packaging file; Packaging the common code, all third-party dependent libraries, and the packaging tool source code to obtain an application base package; Using a preset filter, filtering the packaged file to obtain the unit code blocks corresponding to each business unit other than the common code, all third-party dependent libraries, and the packaging tool source code; All unit code blocks are packaged separately to obtain all application business packages.
3. The application loading method according to claim 2, characterized in that: Before performing the step of filtering the packaged file using a preset filter, the method further includes: Setting the filter configuration interface and filter display interface of the filter; Adding the common code, all third-party dependent libraries and the packaging tool source code to the filter items of the filter through the filter configuration interface; The unique packaged file is introduced into the filter with completed filter item configuration by file import, and the filter button in the filter display interface is activated by clicking to activate the filter.
4. The application loading method according to claim 1, wherein: After executing the step of identifying the service functional instruction clicked by the user in the homepage interface of the application program through the human-computer interaction instruction monitoring method, the method further includes: Generating a loading address of the target service package according to the pointing address of the service functional instruction; The step of acquiring the downloaded target service package from the cache space and loading the target service package to load the target service function specifically includes: The application service package corresponding to the target service package is loaded into the loading address of the target service package to complete the service function block loading of the target service function.
5. The application loading method according to claim 4, characterized in that: Before executing the step of screening out the differentiated application business package of the target business package according to the preset business package differentiation list, the method further includes: Obtaining all application service packages included in the target application; Using the BSD if difference algorithm to calculate the difference data between any two application service packages in all the application service packages; Calculate the data volume of all the difference data respectively to obtain the difference data volume corresponding to all the difference data; Comparing the difference data volume with a preset data volume threshold, and determining whether the difference data volume exceeds the data volume threshold; If the difference data volume exceeds the data volume threshold, the two application service packages corresponding to the difference data volume are regarded as a pair of non-differentiated application service packages; If the difference data volume does not exceed the data volume threshold, the two application service packages corresponding to the difference data volume are regarded as a pair of mutually differentiated application service packages; Arrange all mutually differentiated application service packages, and record the difference data volume of each pair of mutually differentiated application service packages to obtain arrangement and recording results; The service package differentiation list is generated according to the sorting record result.
6. The application loading method according to claim 5, characterized in that: The step of generating the service package differentiation list according to the record sorting result specifically includes: Selecting different application service packages from the sorted record results as a cluster center respectively; The application business package corresponding to each cluster center is used as the focus business package; Filter out all mutually differentiated application business packages corresponding to all focus business packages; According to the difference data amount in the sorting record result, all mutually differentiated application service packages corresponding to all focus service packages are sorted in ascending order of difference data amount to obtain sorting results corresponding to all focus service packages; Record the sorting results corresponding to all focus business packages respectively to obtain a differentiated list of the business packages.
7. The application loading method according to claim 6, characterized in that: The step of selecting the application service package with the least difference from the loaded differentiated application service packages, and adjusting the service function corresponding to the application service package with the least difference to obtain the target service function specifically includes: Filtering out the sorting processing results with the target business package as the focus business package from the differentiated list of business packages; identifying, according to the historical loading record log, an application service package that has been loaded in a sorting processing result with the target service package as a focus service package; identifying, according to the sorting result, the application service package with the highest sorting among the loaded application service packages as the application service package with the least difference; Obtaining the service code of the application service package with the smallest difference after loading as the service code to be adjusted; Adjusting the service code to be adjusted according to the difference data between the application service package with the minimum difference and the target service package to obtain an adjusted service code; The adjusted service code is loaded into the loading address of the target service package to complete the loading of the target service function.
8. An application loading device, characterized in that: include: A loading request acquisition module, configured to acquire a target application loading request, wherein the loading request includes a download address and a loading address of an application basic package, and a download address of an application service package; An application package download module, configured to download the application basic package and the application service package to a preset cache space according to the download address of the application basic package and the download address of the application service package; A basic loading module, configured to obtain the downloaded application basic package from the cache space and perform basic loading of the application based on the loading address of the application basic package, wherein the basic loading includes loading the application homepage interface and common component information; A click instruction recognition module is used to identify the business functional instructions clicked by the user in the homepage interface of the application through human-computer interaction instruction monitoring; a target service package determining module, configured to determine, based on the service functional instruction, an application service package to be loaded as a target service package; a differentiated application service package screening module, configured to screen out differentiated application service packages of the target service package according to a preset service package differentiation list, wherein the differentiated application service packages of each application service package are recorded in ascending order of differential data volume; A service package loading identification module, configured to identify whether a differentiated application service package of the target service package has been loaded based on a historical loading record log; a target service package loading module, configured to obtain a downloaded target service package from the cache space and load the target service package to load the target service function if the mutually differentiated application service packages of the target service package have not yet been loaded; The business function adjustment module is used to, if any differentiated application business packages of the target business package have been loaded, select the application business package with the least differentiation from the loaded differentiated application business packages, and adjust the business functions corresponding to the application business package with the least differentiation to obtain the target business function.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the application loading method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the application loading method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for pluggable downloading of installation package of application program
CN106775838A
A method and apparatus for apply splitting and on-demand load
CN109298900A