Application startup method, device, equipment and medium
By obtaining shared modules and modifying the configuration locally, the problem of sub-applications in the micro-frontend framework relying on container startup is solved, and the independent startup of sub-applications and efficiency improvement are achieved.
Patent Information
- Application Number
- CN202210925609.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-03
AI Technical Summary
In existing micro-frontend frameworks, sub-applications need to rely on the functions provided by container applications to start normally, resulting in low development efficiency.
By obtaining the shared module, it is determined whether the sub-application is a new application, and the configuration is modified locally based on the shared module. Finally, the sub-application is started by configuring the container's stored resources to achieve independent and complete startup.
It realizes the independent and complete startup of sub-applications, improving the efficiency of application startup.
Smart Images

Figure CN115309471B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to an application startup method, device, equipment and medium. Background Art
[0002] As front-end applications become increasingly large and complex, splitting and maintaining front-end applications through micro-frontends has become the standard for most Internet companies. In particular, Webpack 5 proposed the module federation capability of introducing packaged js to load the export module corresponding to the application, which provides new ideas for micro-frontend technology.
[0003] However, the existing micro-frontend framework based on this technology only provides a set of micro-frontend splitting ideas and templates, and does not provide independent and complete startup capabilities for sub-applications in the micro-frontend framework, especially the complete startup capabilities of new sub-applications. Sub-applications often need to rely on many functions provided by container applications to start normally. This also means that when developers develop a sub-application, they have to start the container application first, make corresponding adjustments to the container application, and then start the sub-application before starting normal development. Therefore, this method greatly reduces the R&D efficiency of developers. Summary of the Invention
[0004] The present invention provides an application startup method, apparatus, computer equipment and medium to solve the problem that sub-applications of existing applications rely on functions provided by a container to start normally.
[0005] In a first aspect, a method for starting an application is provided, comprising:
[0006] Get the shared module according to the local configuration file;
[0007] Determine whether each sub-application in the application to be installed is a new application;
[0008] If yes, determining the shared module corresponding to the sub-application according to the acquired shared module;
[0009] Modifying the configuration of the sub-application locally according to the shared module corresponding to the sub-application;
[0010] After the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application.
[0011] In a second aspect, a device for launching an application is provided, comprising:
[0012] A shared module acquisition module is used to obtain shared modules according to local configuration files;
[0013] A new application determination module is used to determine whether each sub-application in the application to be installed is a new application;
[0014] a shared module determining module, configured to determine, if yes, a shared module corresponding to the sub-application based on the acquired shared module;
[0015] A first configuration module, configured to modify the configuration of the sub-application locally according to the shared module corresponding to the sub-application;
[0016] The startup module is used to start each sub-application after the local configuration of each new application is modified through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application.
[0017] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned application startup method when executing the computer program.
[0018] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned application startup method are implemented.
[0019] In the solution implemented by the above-mentioned application startup method, device, computer equipment and storage medium, in order to solve the problem that the sub-applications of existing applications rely on the functions provided by the container to start normally, first, a shared module is obtained according to the local configuration file; then it is determined whether each sub-application in the application to be installed is a new application; if so, the shared module corresponding to the sub-application is determined according to the obtained shared module; the configuration of the sub-application is modified locally according to the shared module corresponding to the sub-application; finally, after the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application. The present invention can not only realize the independent and complete startup of each application of the application to be installed, but also greatly improve the efficiency of opening the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 This is a schematic diagram of an application environment of a method for starting an application program in one embodiment of the present invention;
[0022] Figure 2 This is a flow chart of a method for starting an application program according to an embodiment of the present invention;
[0023] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step S10;
[0024] Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S30;
[0025] Figure 5 yes Figure 4 A schematic flow chart of a specific implementation of step S50;
[0026] Figure 6 is a structural diagram of an application startup device in one embodiment of the present invention;
[0027] Figure 7 is a structural diagram of a computer device in one embodiment of the present invention;
[0028] Figure 8 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0030] When the sub-application of the existing application to be installed is started independently, it is necessary to obtain the entry file address of the container application corresponding to the application to be installed from the local configuration file, and modify the resource link address corresponding to each sub-application in the application to a local link address respectively, and inject the replaced js string into the page by adding a script tag in the exported html file, so as to complete the process of each sub-application independently and completely starting the entire application. When the application to be installed is a brand new application, it is necessary to dynamically inject the module js exported by the brand new application, and use the global method to dynamically register to achieve a complete startup. The specific implementation process is as follows: start the parent container and sub-application corresponding to the application at the same time, and modify the sub-application resource address in the parent container to be local. Among them, it is also necessary to pay attention to and modify multiple sub-applications at the same time to start normal program development. Therefore, the development efficiency is very low. Under ideal circumstances, it takes more than 40 seconds to completely start the application.
[0031] Based on this, the application startup method provided by the embodiment of the present invention can be applied in Figure 1 In an application environment, the client communicates with the server through a network. The server can receive a startup instruction for starting the application to be installed through the client, and obtain a shared module according to a local configuration file; then determine whether each sub-application in the application to be installed is a new application; if so, determine the shared module corresponding to the sub-application according to the obtained shared module; modify the configuration of the sub-application locally according to the shared module corresponding to the sub-application; after all the sub-applications that are new applications have modified their local configurations, finally, start each sub-application through the stored resources configured in the configuration container corresponding to the application, so as to realize the startup of the application on the client. In the present invention, the startup of the application is realized in response to the problem that the sub-applications of the existing application rely on the functions provided by the container to start normally. The present invention can not only realize the independent and complete startup of each application of the application to be installed, but also greatly improve the efficiency of opening the application.
[0032] The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers. The present invention will be described in detail below through specific embodiments.
[0033] See also Figure 2 As shown, Figure 2 A flowchart of a method for starting an application program according to an embodiment of the present invention includes the following steps:
[0034] S10: Obtain the shared module according to the local configuration file.
[0035] It should be noted that after the client receives the startup instruction to start the application to be installed, it determines whether the development environment of the client that installs the application is a DEV environment. If so, it initializes the webpack development server and obtains the entry resource of the configuration container corresponding to the application, so that the shared module obtained in step S10 can modify the configuration of each sub-application in the configuration container corresponding to the application.
[0036] Here, the shared module can be a common resource module corresponding to each micro-application in different applications in the local configuration file. For example, when the client generates application 1, the multiple micro-applications in application 1 are split to obtain each shared module. The shared module may include but is not limited to a common component library, a common style library, and configuration data, etc. When obtaining the shared module, the common component library, common style library, and configuration data corresponding to each shared module of application 1 are separated from the local configuration file, and the common component library, common style library, and configuration data belonging to the same shared module are packaged separately to obtain each shared module.
[0037] In some implementations, in order to facilitate obtaining the target shared module from the local configuration file, thereby speeding up the configuration modification efficiency of the sub-application corresponding to the new application, see Figure 3 The step of obtaining the shared module according to the local configuration file may include the following steps:
[0038] S11: Export each of the shared modules according to the local configuration file.
[0039] Since the local configuration file includes configuration data of the application already installed on the client, each shared module in the local configuration file needs to be exported so that when a sub-application of the application to be installed is updated, a matching shared module can be quickly determined.
[0040] Specifically, a shared module refers to a module within an application installed on a client that implements a specific function and can be loaded by pages corresponding to multiple different applications. For example, if shared module 1 corresponds to function 1 in application A and application B also has a function corresponding to function 1, then shared module 1 is a shared module between application A and application B. Therefore, by exporting each shared module from a local configuration file, a data pool of shared modules can be obtained. This allows for selecting and modifying the configuration of the shared modules corresponding to the sub-applications of the application to be installed, based on the sub-applications of the application to be installed. This, in turn, speeds up the configuration modification efficiency of each sub-application.
[0041] S12: Generate module files corresponding to the shared modules respectively, and name the module files.
[0042] Since shared modules include but are not limited to public component libraries, public style libraries, and configuration data, in order to facilitate the acquisition of data corresponding to each shared module, module files are generated for each shared module respectively; and since each shared module corresponds to different functions, in order to distinguish the module files corresponding to different shared modules, each module file is named. Here, the module files corresponding to different shared modules can be named according to their corresponding functions. For example, if the function corresponding to shared module 1 is "login", then the module file corresponding to shared module 1 is named "login".
[0043] S13: Aggregate the named module files to generate a shared configuration file corresponding to the shared module.
[0044] In order to facilitate the step S30 to quickly obtain the target shared module, the named module files are aggregated to generate a shared configuration file corresponding to all shared modules, so that the target shared module can be obtained by searching in the shared configuration file.
[0045] Since shared modules refer to static, unchanging, and different resources in various sub-applications of an application that has been installed on the client, when the named module files are aggregated, the same shared modules may appear. In order to clarify the shared modules configured for the sub-applications corresponding to the new application in subsequent steps, in some embodiments, the aggregating of the named module files to generate a shared configuration file corresponding to the shared modules may include: deduplicating the shared modules with the same name in the shared configuration file. By deduplicating the shared modules with the same name, it is possible to avoid shared modules with the same function being located in the shared configuration file at the same time. While reducing the size of the shared configuration file, it is also possible to clarify the location of the shared module corresponding to the sub-application to be configured and modified, thereby improving the speed of sub-application configuration modification.
[0046] S14: Acquire each of the shared modules according to the shared configuration file.
[0047] After determining the shared configuration file with each shared module, the acquisition path of each shared module can be clarified. Therefore, based on the shared configuration file, the shared module used to modify the sub-application configuration corresponding to the new application can be quickly acquired.
[0048] S20: Determine whether each sub-application in the application to be installed is a new application.
[0049] Since the application to be installed includes different sub-applications, when the application to be installed is started on the client, the sub-applications of the new application need to be configured and modified before they can be started on the client. Therefore, when the application to be installed is started on the client, it is necessary to determine whether each sub-application is a new application so as to make targeted configuration modifications to the sub-applications of the new application.
[0050] Here, each sub-application in the application to be installed can refer to each micro-application that needs to be started when the application is started, or can refer to each micro-application that needs to be started during the use of the application after it is started. In actual application, after loading the target module, the client reads the micro-application to be started corresponding to the application, for example, reads a preset container, such as the corresponding micro-application in the webview, and obtains the micro-application currently to be started, and then can read the page to be loaded currently, for example, when the micro-application is started, the page identifier of the homepage in the micro-application is obtained.
[0051] S30: If yes, determine the shared module corresponding to the sub-application according to the acquired shared module.
[0052] Specifically, the startup instruction of the application to be installed is generated by the client after receiving a trigger for the icon of the application to be installed. For example, after the user clicks the icon of the corresponding application, the client generates the corresponding application startup instruction based on the click, so that the operating system in the client sends the application startup instruction to the application, so that the client starts loading the shared module of the sub-application corresponding to the application.
[0053] To quickly identify the shared modules of the sub-application to be configured, see Figure 4 The step of determining the shared module corresponding to the sub-application based on the acquired shared module may include the following steps:
[0054] S31: Determine a target module corresponding to the sub-application according to the function identifier of the sub-application.
[0055] Since each sub-application of the application to be installed has different functions, the target module corresponding to the function of the sub-application can be determined based on the function identifier of each sub-application. For example, if the function identifier of the sub-application is "login", it can be determined that the target module corresponding to the sub-application is a module with the "login" function.
[0056] S32: Determine the shared module corresponding to the target module in the shared configuration file according to the names of the shared modules.
[0057] Here, each shared module is named according to its corresponding function. Therefore, by searching the name of the shared module in the shared configuration file through the function identifier of the target module, the shared module corresponding to the target module in the shared configuration file can be determined.
[0058] S40: Modify the configuration of the sub-application locally according to the shared module corresponding to the sub-application.
[0059] Since the shared module corresponding to the sub-application is located locally, the developer only needs to modify the configuration of the sub-application once locally through the shared module, and the time taken for this configuration modification is about 5 seconds.
[0060] To expedite configuration modifications for the sub-application, in some embodiments, locally modifying the sub-application's configuration based on the sub-application's corresponding shared module may include exporting the shared module corresponding to the target module from the shared configuration file, and locally modifying the sub-application's configuration using the exported shared module. This embodiment exports the shared module corresponding to the sub-application from the shared configuration file, allowing the exported shared module to perform configuration modifications specific to the sub-application.
[0061] Specifically, the shared module is the dynamic data of the loading page corresponding to the application to be installed, which may include templates and data. The client needs to obtain it from the server according to the function identifier of the page. That is, the client sends the function identifier of the page to the server, and the server queries the corresponding shared module according to the function identifier and returns it to the terminal asynchronously to improve the configuration modification speed of each sub-application, and ultimately achieve the effect of opening the application in seconds.
[0062] S50: After the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to start the application.
[0063] By starting each sub-application through the stored resources configured in the configuration container corresponding to the application, developers can actually start the sub-application by just starting the sub-application, improving the startup speed of the sub-application and ultimately achieving the effect of opening the application in seconds.
[0064] In some embodiments, see Figure 5 After the local configuration of each of the sub-applications of the new application is modified, starting each of the sub-applications through the stored resources configured in the configuration container corresponding to the application to start the application may include:
[0065] S51: In the configuration container corresponding to the application, configure the storage resources of the configuration container according to each sub-application to start the corresponding page to be loaded.
[0066] Here, the stored resources corresponding to each sub-application are locally configured to the configuration container, so that by opening the specified sub-application located in the configuration container, the loading of the corresponding loading page can be completed.
[0067] S52: Starting the native function corresponding to the function identifier according to the shared module corresponding to the function identifier and the stored resource corresponding to the shared module.
[0068] By starting the shared module in the configuration container according to the library resources of the shared module corresponding to the function identifier, the native function corresponding to the function identifier can be started, thereby realizing the loading of the function identifier corresponding to the shared module on the loading page.
[0069] In some implementations, it is determined whether each sub-application in the application to be installed is a new application. If not, configuration modification is performed locally on the sub-application to quickly modify the configuration of the sub-application.
[0070] It can be seen that in the above scheme, in order to solve the problem that the sub-applications of existing applications rely on the functions provided by the container to start normally, first, the shared module is obtained according to the local configuration file; then it is determined whether each sub-application in the application to be installed is a new application; if so, the shared module corresponding to the sub-application is determined according to the obtained shared module; the configuration of the sub-application is modified locally according to the shared module corresponding to the sub-application; finally, after the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application. The present invention can not only realize the independent and complete startup of each application of the application to be installed, but also greatly improve the efficiency of starting the application.
[0071] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0072] In one embodiment, an application startup device is provided, which corresponds one-to-one to the application startup method in the above embodiment. Figure 6 As shown, the application startup device includes a shared module acquisition module 101, a new application judgment module 102, a shared module determination module 103, a first configuration module 104 and a startup module 105. The functional modules are described in detail as follows:
[0073] The shared module acquisition module 101 is used to acquire the shared module according to the local configuration file;
[0074] A new application determination module 102 is used to determine whether each sub-application in the application to be installed is a new application;
[0075] a shared module determining module 103, configured to determine, if yes, a shared module corresponding to the sub-application based on the acquired shared module;
[0076] A first configuration module 104, configured to modify the configuration of the sub-application locally according to the shared module corresponding to the sub-application;
[0077] The startup module 105 is used to start each sub-application after the local configuration of each new application is modified through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application.
[0078] In one embodiment, the shared module acquisition module 103 includes:
[0079] An exporting unit, configured to export each of the shared modules according to the local configuration file;
[0080] A naming unit, configured to generate module files corresponding to the shared modules and name the module files;
[0081] a shared configuration file generating unit, configured to aggregate the named module files to generate a shared configuration file corresponding to the shared module;
[0082] The shared module acquisition unit is configured to acquire each of the shared modules according to the shared configuration file.
[0083] In one embodiment, the shared module determination module 103 includes:
[0084] a target module determining unit, configured to determine a target module corresponding to the sub-application according to a function identifier of the sub-application;
[0085] According to the names of the respective shared modules, the shared modules corresponding to the target modules in the shared configuration file are determined.
[0086] In one embodiment, the first configuration module 104 includes:
[0087] The configuration modification unit is configured to export the shared module corresponding to the target module from the shared configuration file, and locally modify the configuration of the sub-application through the exported shared module.
[0088] In one embodiment, the startup module 105 includes:
[0089] A page to be loaded starting unit is used to start the corresponding page to be loaded in the configuration container corresponding to the application according to the storage resources configured in the configuration container by each sub-application;
[0090] The native function starting unit is used to start the native function corresponding to the function identifier according to the shared module corresponding to the function identifier and the stored resource corresponding to the shared module.
[0091] In one embodiment, the shared configuration file generating unit includes:
[0092] The deduplication subunit is used to perform deduplication processing on the shared modules with the same name in the shared configuration file.
[0093] In one embodiment, the apparatus further comprises:
[0094] The second configuration module is configured to, if not, locally modify the configuration of the sub-application.
[0095] The present invention provides an application startup device, which first obtains a shared module based on a local configuration file; then determines whether each sub-application in the application to be installed is a new application; if so, determines the shared module corresponding to the sub-application based on the obtained shared module; locally modifies the configuration of the sub-application based on the shared module corresponding to the sub-application; finally, after the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application. The present invention can not only realize the independent and complete startup of each application of the application to be installed, but also greatly improve the efficiency of starting the application.
[0096] For the specific definition of the application startup device, please refer to the definition of the intelligent question and answer method above, which will not be repeated here. The various modules in the above-mentioned application startup device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0097] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, memory, network interface and database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the server side of an application startup method.
[0098] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of an application startup method.
[0099] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:
[0100] Get the shared module according to the local configuration file;
[0101] Determine whether each sub-application in the application to be installed is a new application;
[0102] If yes, determining the shared module corresponding to the sub-application according to the acquired shared module;
[0103] Modifying the configuration of the sub-application locally according to the shared module corresponding to the sub-application;
[0104] After the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application.
[0105] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0106] Get the shared module according to the local configuration file;
[0107] Determine whether each sub-application in the application to be installed is a new application;
[0108] If yes, determining the shared module corresponding to the sub-application according to the acquired shared module;
[0109] Modifying the configuration of the sub-application locally according to the shared module corresponding to the sub-application;
[0110] After the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application.
[0111] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0112] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0113] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0114] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for starting an application, characterized in that: include: Obtain a shared module according to a local configuration file; wherein the local configuration file includes configuration data of an application already installed on the client, and the shared module is a common resource module corresponding to each micro-application in different applications in the local configuration file; Determine whether each sub-application in the application to be installed is a new application; If yes, determining the shared module corresponding to the sub-application according to the acquired shared module; Modifying the configuration of the sub-application locally according to the shared module corresponding to the sub-application; After the local configuration of each sub-application that is a new application is modified, each sub-application is started through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application.
2. The application startup method according to claim 1, wherein: The step of obtaining a shared module according to a local configuration file includes: Exporting each of the shared modules according to the local configuration file; Generate module files for each shared module and name each module file; Aggregate the named module files to generate a shared configuration file corresponding to the shared module; According to the shared configuration file, each of the shared modules is obtained.
3. The application startup method according to claim 2, wherein: The determining, based on the acquired shared module, a shared module corresponding to the sub-application includes: Determining a target module corresponding to the sub-application according to the function identifier of the sub-application; According to the names of the respective shared modules, the shared modules corresponding to the target modules in the shared configuration file are determined.
4. The application startup method according to claim 3, wherein: The locally modifying the configuration of the sub-application according to the shared module corresponding to the sub-application includes: The shared module corresponding to the target module is exported from the shared configuration file, and the configuration modification of the sub-application is completed locally through the exported shared module.
5. The application startup method according to claim 3, wherein: After the local configuration of each of the sub-applications of the new application is modified, each of the sub-applications is started by using the stored resources configured in the configuration container corresponding to the application to start the application, including: In the configuration container corresponding to the application, configuring the storage resources of the configuration container according to each sub-application to start the corresponding page to be loaded; The native function corresponding to the function identifier is started according to the shared module corresponding to the function identifier and the stored resource corresponding to the shared module.
6. The application startup method according to claim 2, wherein: The step of aggregating the named module files to generate a shared configuration file corresponding to the shared module includes: Deduplication is performed on the shared modules with the same name in the shared configuration file.
7. The application startup method according to claim 1, wherein: The step of determining whether each sub-application in the application to be installed is a new application, and if not, completing configuration modification for the sub-application locally.
8. An application startup device, characterized in that: include: A shared module acquisition module, configured to acquire a shared module based on a local configuration file; wherein the local configuration file includes configuration data of an application already installed on the client, and the shared module is a common resource module corresponding to each micro-application in different applications in the local configuration file; A new application determination module is used to determine whether each sub-application in the application to be installed is a new application; a shared module determining module, configured to determine, if yes, a shared module corresponding to the sub-application based on the acquired shared module; A first configuration module, configured to modify the configuration of the sub-application locally according to the shared module corresponding to the sub-application; The startup module is used to start each sub-application after the local configuration of each new application is modified through the stored resources configured in the configuration container corresponding to the application to realize the startup of the application.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the application startup method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the application startup method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Website data processing method and device
CN111124396A
Application access method and device and computer readable storage medium
CN112149169A