Application program loading method and device, equipment and storage medium thereof

Through the application loading method, the application basic package is first loaded, and then the application business package is loaded according to the business functional instructions. The differentiated list and historical loading record are used to filter out the business package with the smallest differentiated service package, which solves the large consumption of packaging resources in the existing technology. , the problem of low efficiency achieves an efficient loading process.

CN119179496AActive Publication Date: 2024-12-24PING AN BANK CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411181402.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-24
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

During the project packaging and loading process, although the business code has been changed slightly, the package volume has been continuously increased due to full compilation, which takes a long time to package, consumes a lot of resources and is inefficient.

Method used

A method of application loading is proposed. By obtaining the target application loading request, first load the application basic package, then load the application business package according to business functional instructions, and filter out the business package with the smallest differentiation by using differentiated list and historical loading record. Make adjustments to achieve business function loading and avoid duplicate loading of basic content.

Benefits of technology

It realizes the separation of basic loading and business function loading, reduces resource consumption, improves loading efficiency, saves loading resources, and improves the flexibility of the loading process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179496A_ABST
    Figure CN119179496A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the technical field of research and development design, is applied to an application program loading scene, and relates to an application program loading method and device, equipment and a storage medium thereof. According to the method, the application basic package is loaded first, then the application service package is loaded, basic loading and service function loading can be separately loaded, and it is avoided that basic content is repeatedly loaded when the service function is loaded; screening differentiated application service packets of the target service packet; if the differentiated application service packets are not loaded yet, obtaining a target service packet, and loading the target service packet to realize loading of a target service function; if the differentiated application service packets are loaded, the application service packet with the minimum differentiation is screened out, and the target service function is obtained through service function adjustment, so that the target service function is conveniently obtained by combining two modes of loading and adjustment, the operation is more flexible, the consumption of loading resources is reduced, and the loading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of research and development design technology, and is applied to application loading scenarios, and in particular to an application loading method, device, equipment 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] Since there is only one package file, all the code will be fully recompiled in each version even if there are only minor business changes. If this solution is followed, as the business functions are iterated, the package size will become larger and larger, the packaging will take a long time, and it will be inflexible, which will easily lead to large consumption of packaging resources 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 solution:

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

[0009] Obtaining the downloaded application basic package from the cache space, and performing 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;

[0010] Identify the business functional instructions clicked by the user in the home page interface of the application program 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] According to a preset service package differentiation list, the differentiated application service packages of the target service package are screened out, 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;

[0013] According to the historical loading record log, identifying whether the mutually differentiated application service packages of the target service package have been loaded;

[0014] If the mutually 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 service packages of the target service package have been loaded, the application service package with the smallest difference is selected from the loaded differentiated application service packages, and the service function corresponding to the application service package with the smallest difference is adjusted to obtain the target service 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 packaging file, wherein the packaging file includes the business source code, the packaging tool source code and the third-party dependent library;

[0018] By parsing the unique packaging file, identifying the common codes in all third-party dependent libraries, the packaging tool source code and the business source code;

[0019] The common code, all third-party dependent libraries and the packaging tool source code are packaged to obtain an application basic package;

[0020] Using a preset filter, filtering the packaging 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 executing the step of filtering the packaged file using a preset filter, the method further includes:

[0023] Setting a filter configuration interface and a filter display interface of the filter;

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

[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 business functional instruction clicked by the user in the homepage interface of the application program by means of 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 service package of the target service package according to the preset service package differentiation list, the method further includes:

[0031] Obtaining all application service packages included in the target application;

[0032] Using the BSD i ff 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 respectively;

[0034] Compare the difference data volume with a preset data volume threshold, and determine 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 sorting record results specifically includes:

[0040] Select different application service packages from the sorted record results as a cluster center respectively;

[0041] The application service packages corresponding to each cluster center are respectively used as focus service packages;

[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 the focus service packages are sorted from small to large in terms of difference data amount, to obtain sorting processing results corresponding to all the focus service packages;

[0044] The sorting processing results corresponding to all the focus business packages are recorded to obtain a differentiated list of the business packages.

[0045] Furthermore, the step of selecting the application service package with the smallest difference from the loaded differentiated application service packages, and adjusting the service function corresponding to the application service package with the smallest difference to obtain the target service function specifically includes:

[0046] Filtering out the sorting processing result with the target business package as the focus business package from the differentiated list of business packages;

[0047] According to the historical loading record log, identifying the application service packages that have been loaded in the sorting processing result with the target service package as the focus service package;

[0048] According to the sorting result, identifying the application service package with the highest sorting among the loaded application service packages as the application service package with the smallest 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] According to the difference data between the application service package with the smallest difference and the target service package, adjusting the service code to be adjusted 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 solution:

[0053] An application loading device, comprising:

[0054] A loading request acquisition module, used 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, used 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, 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;

[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 program through a human-computer interaction instruction monitoring method;

[0058] A target service package determination 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, used 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 the service package differentiation list in ascending order of difference data volume;

[0060] A service package loading identification module, used to identify whether the mutually differentiated application service packages of the target service package have been loaded according to the 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 been loaded;

[0062] The business function adjustment module is used to select the application business package with the smallest difference from the loaded differentiated application business packages if any differentiated application business packages of the target business package have been loaded, and to obtain the target business function by adjusting the business function corresponding to the application business package with the smallest difference.

[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 as 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 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 package has 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 load the target business function; if the differentiated application business package has been loaded, screening out the application business package with the smallest differentiation, and obtaining 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying 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 flow chart of an embodiment of an application loading method 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 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 schematic diagram of an embodiment of an application loading device according to the present application;

[0078] Fig. 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 meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0080] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood 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, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0083] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 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 (Moving Picture Experts Group Audio Layer IV) players, 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 only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0088] Continue to refer Figure 2 , shows a flow chart of an embodiment of an 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 It 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 business source code of the target application to obtain a unique packaging file, wherein the packaging file includes the business source code, packaging tool source code and third-party dependent libraries;

[0094] In this embodiment, the project packaging tool is, for example, Metro, AAPT (Android Asset Packaging Tool), etc., wherein Metro is a packaging tool provided by React Native, used to package the 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 the application code into an apk file.

[0095] Step 302, identifying the 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 parsing of the unique packaged file may specifically adopt a reverse code parsing method to parse and 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 basic package;

[0098] Step 304, using a preset filter to filter the packaging 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;

[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 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, 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;

[0103] Step 403: introduce the unique packaged file into the filter with completed filter item configuration by file import, and start the filter button in the filter display interface by clicking to start 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 displayed more intuitively when the application is packaged, and the packaging process can 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 the third-party dependent libraries and the packaging tool source code are packaged to obtain the application basic package, and all the unit code blocks are packaged separately to obtain all the application business packages, so that the packaging process becomes controllable, and 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, obtaining the downloaded application basic package from the cache space, and performing 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.

[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: identifying 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 address pointed to by the business functional instructions.

[0113] Specifically, for example: based on the loading address of the application basic package, after the basic loading of the application, 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 according to the business functional instruction, a new page jump is generated. 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 will contain a variety of business function modules, and most of the business function modules are not frequently used, and the commonly used business function 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 of infrequently used business function modules, so as to 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 service package differentiation list generation method.

[0118] Continue to refer Figure 5 , 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, including:

[0119] Step 501, obtaining 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 i ff 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, calculating the data volume of all the difference data respectively, and obtaining the difference data volumes corresponding to all the difference data respectively;

[0123] Step 504, comparing the difference data volume with a preset data volume threshold, and determining whether the difference data volume exceeds the data volume threshold;

[0124] Specifically, there must be differences between the two application service packages. The smaller the difference, the closer they are, and the larger the difference, the less similar the two application services are. By presetting the data volume threshold, a range is set for this difference. If the data volume threshold is exceeded, the difference is large, and the service function module is no longer updated through adjustment. If the data volume threshold is not exceeded, the two application service packages can be determined to be differentiated application service packages. The adjustment method can be used to adjust the service function modules of the loaded application service package to obtain the service function modules of its differentiated application service package, thereby avoiding the loading of the application service 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 mutually 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 service package differentiation list, it is convenient to differentiate the target service package into application service packages. Specifically, for example, if there are two relatively similar service functions in the target application, the difference between the application service packages of the two service functions must be small. Before loading the target service package, first identify whether its differentiated application service package has been loaded, so that after its differentiated application service package has been loaded, directly adjust the service function module corresponding to its differentiated application service package, and obtain the service function module corresponding to the target service package, convert the loading into the adjustment mode, and reduce the consumption of loading resources.

[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, selecting different application service packages from the sorted record results as a cluster center respectively;

[0132] Step 602, taking the application service packages corresponding to each cluster center as focus service packages;

[0133] Step 603, filtering out all mutually differentiated application service packages corresponding to all focus service packages;

[0134] Step 604, according to the difference data volume in the sorting record result, sorting the difference data volume of all mutually differentiated application service packages corresponding to all the focus service packages from small to large, and obtaining the sorting processing results corresponding to all the focus service packages;

[0135] Step 605 : Record the sorting processing results corresponding to all the focus service packages respectively, and obtain the differentiated list of the service 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 used as focus business packages respectively. 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 screen out the application business package with the smallest 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 according to the historical loading record log.

[0138] Step 208: If the differentiated application service packages of the target service package have not been loaded, 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 there is no mutually differentiated application service package of the target service package to be 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 service packages of the target service package have been loaded, the application service package with the smallest differentiation is selected from the loaded differentiated application service packages, and the service function corresponding to the application service package with the smallest differentiation is adjusted to obtain the target service 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, filtering out the sorting processing results with the target business package as the focus business package from the business package differentiation list;

[0144] Step 702, identifying the loaded application service packages in the sorting processing result with the target service package as the focus service package according to the historical loading record log;

[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 sorting result, identifying the application service package with the highest sorting among the loaded application service packages as the application service package with the smallest difference;

[0147] Step 704, obtaining the service code of the application service package with the smallest difference after loading, as the service code to be adjusted;

[0148] Step 705, adjusting the service code to be adjusted according to the difference data between the application service package with the smallest 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 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 the direct adjustment of the business function module corresponding to the application business package with the least differentiation after the differentiated application business package has been loaded, so as to obtain the business function module corresponding to the target business package, convert the loading into an adjustment mode, and reduce 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 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 package has 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 load the target business function; if the differentiated application business package has been loaded, screening out the application business package with the smallest differentiation, and obtaining 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.

[0152] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0153] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0154] In the 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, the basic loading and the business function loading can be well separated, avoiding the repeated loading of the basic content when loading the business function in the past, reducing the loading resource consumption, and improving the loading efficiency; filtering 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, obtaining the downloaded target business package from the cache space, and loading the target business package to load the target business function; if the differentiated application business package has been loaded, filtering out the application business package with the smallest difference, and adjusting the business function to obtain the target business function, it is convenient to combine the loading and adjustment methods to obtain the target business function, which 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, and the device embodiment is similar to 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 described in this embodiment includes: a loading request acquisition module 801, an application package downloading module 802, a basic loading module 803, a click instruction identification 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] A loading request acquisition module 801 is used 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;

[0158] The application package download module 802 is used 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 on 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 instruction clicked by the user in the homepage interface of the application program through a human-computer interaction instruction monitoring method;

[0161] A target service package determination module 805, 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 used 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 the service package differentiation list in ascending order of difference data volume;

[0163] A service package loading identification module 807, used to identify whether the mutually differentiated application service packages of the target service package have been loaded according to the historical loading record log;

[0164] A target service package loading module 808 is 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 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 smallest difference from the loaded differentiated application business packages if any differentiated application business packages of the target business package have been loaded, and to obtain the target business function by adjusting the business function corresponding to the application business package with the smallest difference.

[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 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 package has 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 load the target business function; if the differentiated application business package has been loaded, screening out the application business package with the smallest differentiation, and obtaining 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.

[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a 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 flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence 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 a part of the steps in the flowchart 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 part of the sub-steps or stages of other steps.

[0169] To solve the above technical problems, the present application also provides a computer device. Fig. 9 , Fig. 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 through a system bus. It should be noted that the figure only shows a computer device 9 with a memory 9a, a processor 9b, and a network interface 9c, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can 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 processor (DSP), an embedded device, etc.

[0171] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0172] The memory 9a includes at least one type of readable storage medium, and the 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 memory 9a can be an internal storage unit of the computer device 9, such as a 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 (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash 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 a computer-readable instruction of an application loading method, etc. 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 chips 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 run the computer-readable instructions stored in the memory 9a or process data, such as running the computer-readable instructions of 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 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 that the basic loading and the business function loading can be well separated, avoiding the repeated loading of the basic content when loading the business function in the past, reducing the consumption of loading resources and improving the 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 load the target business function; if the differentiated application business package has been loaded, then screen out the application business package with the smallest differentiation, and obtain the target business function through business function adjustment, so as to combine the two methods of loading and adjustment to obtain the target business function, which is more flexible and saves the consumption of loading resources.

[0176] The present application also provides another implementation, 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 that the basic loading and the business function loading can be well separated and loaded, avoiding the repeated loading of the basic content when loading the business function in the past, reducing the consumption of loading resources and improving the 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 load the target business function; if the differentiated application business package has been loaded, then screen out the application business package with the smallest differentiation, and obtain the target business function through business function adjustment, so as to combine the two methods of loading and adjustment to obtain the target business function, which is more flexible and saves the consumption of loading resources.

[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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an 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 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 embodiments of the present application, rather than all 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 is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this 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 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; Obtaining the downloaded application basic package from the cache space, and performing 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; Identify the business functional instructions clicked by the user in the home page interface of the application program 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; According to a preset service package differentiation list, the differentiated application service packages of the target service package are screened out, 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; According to the historical loading record log, identifying whether the mutually differentiated application service packages of the target service package have been loaded; If the mutually 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 service packages of the target service package have been loaded, the application service package with the smallest difference is selected from the loaded differentiated application service packages, and the service function corresponding to the application service package with the smallest difference is adjusted to obtain the target service 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 packaging file, wherein the packaging file includes the business source code, the packaging tool source code and the third-party dependent library; By parsing the unique packaging file, identifying the common codes in all third-party dependent libraries, the packaging tool source code and the business source code; The common code, all third-party dependent libraries and the packaging tool source code are packaged to obtain an application basic package; Using a preset filter, filtering the packaging 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 executing the step of filtering the packaged file using a preset filter, the method further includes: Setting a filter configuration interface and a filter display interface of the filter; 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; 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, characterized in that: After executing the step of identifying the business functional instruction clicked by the user in the homepage interface of the application program by means of 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 service package of the target service package according to the preset service package differentiation list, the method further includes: Obtaining all application service packages included in the target application; Using the BSD i ff 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 respectively; Compare the difference data volume with a preset data volume threshold, and determine 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: Select different application service packages from the sorted record results as a cluster center respectively; The application service packages corresponding to each cluster center are respectively used as focus service packages; 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 the focus service packages are sorted from small to large in terms of difference data amount, to obtain sorting processing results corresponding to all the focus service packages; The sorting processing results corresponding to all the focus business packages are recorded 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 smallest difference from the loaded differentiated application service packages, and adjusting the service function corresponding to the application service package with the smallest difference to obtain the target service function specifically includes: Filtering out the sorting processing result with the target business package as the focus business package from the differentiated list of business packages; According to the historical loading record log, identifying the application service packages that have been loaded in the sorting processing result with the target service package as the focus service package; According to the sorting result, identifying the application service package with the highest sorting among the loaded application service packages as the application service package with the smallest difference; Obtaining the service code of the application service package with the smallest difference after loading as the service code to be adjusted; According to the difference data between the application service package with the smallest difference and the target service package, adjusting the service code to be adjusted 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, used 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, used 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, 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; A click instruction recognition module is used to 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; A target service package determination 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, used 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 the service package differentiation list in ascending order of difference data volume; A service package loading identification module, used to identify whether the mutually differentiated application service packages of the target service package have been loaded according to the 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 been loaded; The business function adjustment module is used to select the application business package with the smallest difference from the loaded differentiated application business packages if any differentiated application business packages of the target business package have been loaded, and to obtain the target business function by adjusting the business function corresponding to the application business package with the smallest difference.

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, and when the computer-readable instructions are executed by a processor, the steps of the application loading method according to any one of claims 1 to 7 are implemented.

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

  • Call code generation method and device, electronic terminal and storage medium

    CN113535147A

  • In-place definition of software extensions

    US20140137079A1