Application loading method, device and electronic device

Through the parallel loading mechanism of the parent-child framework and the data sharing engine, the problems of slow loading speed and stuck switching of traditional micro-front-end frameworks are solved, efficient application loading and switching is achieved, and style conflicts and memory leaks are avoided.

CN114816564BActive Publication Date: 2024-10-29VIVO MOBILE COMM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210348809.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2024-10-29
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

Traditional micro-front-end frameworks are slow to load. When users need to switch sub-applications, they are slow to load and prone to lags. They are also prone to problems such as style conflicts and memory leaks.

Method used

The parent-child framework parallel loading mechanism is used to determine the loading path of the child application by obtaining the address information of the target application, and load the target application and the child application in parallel to avoid waiting for the parent frame to complete loading before loading the child application, achieving browser-level hard isolation and preventing javascript and CSS conflict.

Benefits of technology

It significantly improves the application loading speed and efficiency, reduces the time-consuming loading process, achieves instant response to application switching, has no lag experience, and ensures data consistency through the data sharing engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816564B_ABST
    Figure CN114816564B_ABST
Patent Text Reader

Abstract

The present application discloses an application loading method, device and electronic device, belonging to the field of computers. The application loading method comprises: obtaining first address information of a target application; determining a first loading path of a first sub-application in the target application according to the first address information; and loading the target application and the first sub-application in parallel according to the first loading path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computers, and specifically relates to an application loading method, device and electronic equipment. Background Art

[0002] Currently, in order to transform a single-page front-end application from a single monolithic application to an application that aggregates multiple small front-end applications, developers can use micro-frontend technology.

[0003] However, the traditional micro-frontend framework has a slow loading speed; and when the user needs to switch sub-applications, it is necessary to go through the process of loading the sub-application to be switched and displaying the sub-application page to be switched, so the loading speed of the sub-application is slow and prone to lag. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an application loading method, device and electronic device, which can improve the application loading speed.

[0005] In a first aspect, an embodiment of the present application provides an application loading method, the method comprising: obtaining first address information of a target application; determining a first loading path of a first sub-application in the target application based on the first address information; and loading the target application and the first sub-application in parallel based on the first loading path.

[0006] In a second aspect, an embodiment of the present application provides an application loading device, the device comprising: an acquisition module, a determination module and a loading module. The acquisition module is used to acquire first address information of a target application. The determination module is used to determine a first loading path of a first sub-application in the target application according to the first address information acquired by the acquisition module. The loading module is used to load the target application and the first sub-application in parallel according to the first loading path determined by the determination module.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0011] In an embodiment of the present application, the electronic device can obtain the first address information of the target application; determine the first loading path of the first sub-application in the target application according to the first address information; and load the target application and the first sub-application in parallel according to the first loading path. In this solution, since the electronic device can determine the loading path of the first sub-application, it can directly load the target application and the first sub-application in parallel according to the loading path of the first sub-application, that is, this solution uses the parent-child framework parallel loading mechanism to load the parent framework (i.e., the target application) and the sub-application at the same time, without waiting for the parent framework to load before loading the sub-application, thereby avoiding the problem of jamming when loading the sub-application after the parent framework is loaded, reducing the time consumption of the entire loading process, and thus improving the speed and efficiency of electronic devices loading applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 This is a flow chart of an application loading method of a traditional micro-frontend framework provided by the prior art;

[0013] Figure 2 It is a schematic diagram of a micro front-end architecture provided in an embodiment of the present application;

[0014] Figure 3 This is one of the flow charts of an application loading method provided in an embodiment of the present application;

[0015] Figure 4 This is a flow chart of an application loading method for a micro-frontend framework provided in an embodiment of the present application;

[0016] Figure 5 This is a micro-front-end full-screen framework node structure diagram provided in an embodiment of the present application;

[0017] Figure 6 This is one of the interface example schematic diagrams of an application loading method provided in an embodiment of the present application;

[0018] Figure 7 This is a second example diagram of an interface of an application loading method provided in an embodiment of the present application;

[0019] Figure 8 This is the second flowchart of an application loading method provided in an embodiment of the present application;

[0020] Fig. 9 This is the third flowchart of an application loading method provided in an embodiment of the present application;

[0021] Fig.10This is a fourth flowchart of an application loading method provided in an embodiment of the present application;

[0022] Fig.11 is a structural diagram of an application loading device provided in an embodiment of the present application;

[0023] Fig.12 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;

[0024] Fig.13 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0027] The application loading method provided in the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0028] Micro front-end technology can apply the concept of microservices to the browser side, and enable each front-end application to be independently developed and deployed. The architecture of a micro front-end is usually a parent framework base, and then different sub-applications are loaded according to different business needs. It has the following core values:

[0029] (1) Technology stack independence

[0030] The main framework does not restrict the technology stack of the connected application, and the sub-application has complete autonomy.

[0031] (2) Independent development and deployment

[0032] The sub-application repository is independent, and the front-end and back-end can be developed independently. After the deployment is completed, the main framework will automatically complete the synchronization update.

[0033] (3) Standalone runtime

[0034] The state of each sub-application is isolated and the runtime state is not shared.

[0035] The micro frontend architecture aims to solve the problem of unmaintainability of a monolithic application after it evolves from a common application to a frontend monolith due to the increase and change of the number of people and teams involved in a relatively long period of time. This kind of problem is particularly common in enterprise-level web applications.

[0036] However, although micro frontends have the above advantages, there are still many problems in operation, such as:

[0037] 1. Slow loading

[0038] Figure 1 The flowchart of the application loading method of the traditional micro front-end framework is shown as Figure 1 As shown in the figure, in the loading process of traditional micro-frontend frameworks, the parent framework needs to be loaded first, and then the child application is loaded. Therefore, each loading requires Figure 1 As shown in the process, since the traditional loading process is serial, the same process needs to be performed twice, which makes the loading process of the traditional micro-frontend framework about 1 times slower than that of the ordinary non-micro-frontend framework, which directly affects the user experience.

[0039] 2. Slow switching

[0040] In traditional micro-frontend frameworks, if users need to switch sub-applications, they need to destroy the current sub-application and then load other sub-applications. Therefore, the sub-application needs to go through the entire process of "downloading HyperText Markup Language (HTML)--->downloading javascript files-->running javascript code-->requesting server data-->page display", which causes the micro-frontend framework to switch applications lag and not be smooth.

[0041] 3. Style conflicts are likely to occur, and different sub-applications are likely to affect

[0042] Since all sub-applications in traditional micro-frontend frameworks are in the same context, if global styles, global listeners, and global variables appear, they will affect other sub-applications, making style conflicts, memory leaks, or unpredictable errors likely to occur.

[0043] The purpose of this method is to provide a micro-frontend framework solution based on a floating frame (iframe) of a full-screen HTML tag, which implements hard isolation at the browser level, prevents JavaScript conflicts and Cascading Style Sheets (CSS) conflicts, and achieves physical isolation. The parent-child frame parallel loading mechanism allows the parent frame and the child application to be loaded at the same time, without waiting for the parent frame to load before loading the child application, reducing the loading time by half, and switching different applications through routing, so that the old application is hidden and the new application is displayed, achieving instant switching capabilities, and application switching is smooth and without lag.

[0044] Figure 2 A schematic diagram of a micro front-end architecture provided by an embodiment of the present application is shown. Figure 2 As shown, the micro-frontend architecture includes a three-layer structure, namely the browser layer (address bar), the main application layer and the sub-application collection layer.

[0045] 1. Browser layer

[0046] The browser (address bar) is the user's entry point. The user can enter the Uniform Resource Locator (URL) at the browser level. The system has multiple pages corresponding to multiple URLs.

[0047] 2. Main application layer

[0048] The main application layer is the key part of the framework, mainly composed of the following two parts:

[0049] Routing engine: can realize the coordinated control of browser address bar and sub-application display and hiding. For example, when a user enters an application for the first time and switches pages, the browser address bar is synchronized (to facilitate users to copy and enter the same page again), and sub-applications are displayed and hidden according to the page URL.

[0050] Data sharing engine: It can realize data sharing between sub-applications and ensure the data consistency between each application, such as login information, user information, etc. In addition, if the user modifies the shared data in a certain application, it will be synchronized to the data sharing engine and then distributed to other applications, thus ensuring the consistency of shared data.

[0051] 3. Sub-application collection layer

[0052] This layer is a collection of sub-applications that are set up in advance by the system. The sub-applications are loaded by a full-screen iframe. Only one sub-application is visible at the same time, and the other sub-applications are hidden. When the application needs to be switched, the current application is hidden and the application to be displayed is displayed, and the switch is instant.

[0053] The present application embodiment provides an application loading method. Figure 3 FIG. 1 is a flow chart of an application loading method provided by an embodiment of the present application. Figure 3 As shown, the application loading method provided in the embodiment of the present application may include the following steps 201 to 203.

[0054] Step 201: The electronic device obtains first address information of a target application.

[0055] In the embodiment of the present application, the developer can reserve multiple sub-application Document Object Model (DOM) nodes in the front-end static page. Each positioning technology (DIVision, DIV) tag in the cascading style sheet in the DOM node has a unique identity document (ID). Each ID is used to represent a sub-application and corresponds to the sub-application loading path (i.e., the sub-application routing pathname). Therefore, the electronic device can obtain the first address information of the target application after the user inputs the target application.

[0056] It should be noted that the above pathname is the part of the address URL excluding the domain name. For example, if the URL is http: / / abcd.efg.xzy / New / Workbench / Personal, then http: / / abcd.efg.xzy is the domain name, and / New / Workbench / Personal is the pathname, where New corresponds to the / New / * route, that is, the routes starting with New all correspond to the sub-application with the ID "New".

[0057] Optionally, in an embodiment of the present application, when a developer can reserve DOM nodes of multiple sub-applications in a front-end static page, the following format can be used:

[0058] <div class="subapp”id="new”>

[0059] <div class="subapp”id="web”>

[0060] <div class="subapp”id="doc”>

[0061] <div class="subapp”id="board”> .

[0062] Optionally, in an embodiment of the present application, the electronic device may obtain the first address information through the parent frame after receiving the user input to the target application.

[0063] Step 202: The electronic device determines a first loading path of a first sub-application in a target application according to the first address information.

[0064] In the embodiment of the present application, after acquiring the first address information, the electronic device can determine the first loading path of the first sub-application in the target application according to the first address information.

[0065] Optionally, in an embodiment of the present application, after acquiring the first address information, the electronic device determines a first loading path of the first sub-application according to the node information of the first sub-application in the first address information.

[0066] Optionally, in the embodiment of the present application, the above step 202 can be specifically implemented by the following steps 202a and 202b.

[0067] Step 202a: The electronic device determines the code information of the target application according to the first address information.

[0068] In the embodiment of the present application, after acquiring the first address information, the electronic device determines the code information of the target application according to the first address information.

[0069] Step 202b: The electronic device determines a first loading path of the first sub-application according to the code information of the target application.

[0070] In an embodiment of the present application, after acquiring the code information of the target application, the electronic device can determine the identification information of the first sub-application based on the reserved first sub-application node information in the code information of the target application, and determine the first loading path corresponding to the identification information of the first sub-application based on the identification information of the first sub-application.

[0071] Step 203: The electronic device loads the target application and the first sub-application in parallel according to the first loading path.

[0072] In the embodiment of the present application, after acquiring the first loading path, the electronic device loads the target application and the first sub-application in parallel according to the first loading path.

[0073] Optionally, in an embodiment of the present application, after acquiring the first loading path, the electronic device loads the target application through the parent framework, and simultaneously loads the first sub-application through the micro-front-end framework, so that the electronic device loads the target application and the first sub-application in parallel at the same time.

[0074] Optionally, in the embodiment of the present application, the above step 203 can be implemented by the following step 203a.

[0075] Step 203a: The electronic device creates a full-screen framework structure, and loads the target application and the first sub-application in parallel in the full-screen framework structure according to the first loading path.

[0076] In an embodiment of the present application, after obtaining the first loading path, the electronic device can directly create a full-screen frame structure, hang it in the corresponding DOM node, and load the target application and the first sub-application in parallel in the full-screen frame structure.

[0077] For example, Figure 4 The following is a flow chart of the application loading method of the micro front-end framework provided in the embodiment of the present application. Figure 4 As shown, the micro front-end framework can load the target application (ie, parent application) and the first sub-application (ie, sub-application) in parallel.

[0078] The embodiment of the present application provides an application loading method. In the embodiment of the present application, the electronic device can obtain the first address information of the target application; determine the first loading path of the first sub-application in the target application according to the first address information; and load the target application and the first sub-application in parallel according to the first loading path. In this solution, since the electronic device can determine the loading path of the first sub-application, it can directly load the target application and the first sub-application in parallel according to the loading path of the first sub-application, that is, this solution uses the parent-child framework parallel loading mechanism to load the parent framework (that is, the target application) and the sub-application at the same time, without waiting for the parent framework to load and then load the sub-application, thus avoiding the problem of jamming when loading the sub-application after the parent framework is loaded, reducing the time consumption of the entire loading process, thereby improving the speed and efficiency of electronic devices loading applications.

[0079] Optionally, in the embodiment of the present application, after the above step 203, the application loading method provided in the embodiment of the present application further includes the following step 301.

[0080] Step 301: After the target application and the first sub-application are loaded, the electronic device simultaneously loads other sub-applications in the target application.

[0081] In the embodiment of the present application, the above-mentioned other sub-applications are sub-applications in the target application except the first sub-application.

[0082] In the embodiment of the present application, after the target application and the first sub-application are loaded, the electronic device can continue to load other sub-applications in the target application at the same time.

[0083] Optionally, in an embodiment of the present application, after the target application and the first sub-application are loaded, the electronic device can start loading the sub-application at the same time and use display:none (i.e., a method of hiding DOM nodes in CSS) to hide them in the page DOM structure.

[0084] For example, Figure 5 A structural diagram of a micro-front-end full-screen framework node (iframe dom) provided in an embodiment of the present application is shown.

[0085] Optionally, in the embodiment of the present application, after the above step 203, the application loading method provided in the embodiment of the present application further includes the following step 401.

[0086] Step 401: The electronic device displays the first page of the loaded first sub-application and hides other sub-applications.

[0087] In the embodiment of the present application, the above-mentioned other sub-applications are sub-applications in the target application except the first sub-application.

[0088] In the embodiment of the present application, after loading the target application and the first sub-application in parallel, the electronic device displays the first page of the loaded first sub-application and hides other sub-applications.

[0089] Optionally, in the embodiment of the present application, the above step 401 can be specifically implemented by the following step 401a.

[0090] Step 401a: The electronic device displays the first page in the visual area corresponding to the target application, and hides other sub-applications in the hidden area corresponding to the target application.

[0091] Optionally, in an embodiment of the present application, the area corresponding to the target application includes a visual area and a hidden area. After the electronic device loads the target application and the first sub-application in parallel, it can display the first page in the visual area corresponding to the target application and hide other sub-applications in the hidden area corresponding to the target application.

[0092] For example, Figure 6 As shown, the electronic device displays the page (i.e., the first page) of the first sub-application (e.g., the New application) and the address information of the first page (http: / / abcd.efg.xyz / New / ****) in the visualization area 10 corresponding to the target application, and hides other sub-applications (e.g., the Web application and the Doc application) in the hidden area 11 corresponding to the target application.

[0093] Optionally, in an embodiment of the present application, the first page includes at least one first identifier, and each first identifier is used to indicate another sub-application; after the above step 401, the application loading method provided in the embodiment of the present application also includes the following steps 501 and 502.

[0094] Step 501: An electronic device receives a first input from a user regarding a target first identifier among at least one first identifier.

[0095] In an embodiment of the present application, the first page includes multiple first identifiers, each of which is used to indicate another sub-application. The user can make a first input to any one of the first identifiers (for example, the target first identifier) ​​to trigger the electronic device to switch the sub-application displayed in the current visualization area to the page of the sub-application corresponding to the target first identifier.

[0096] Optionally, in an embodiment of the present application, the display mode of the above-mentioned target first identification can be text, image, video or URL, which is used to indicate the page corresponding to the target first identification. The specific display mode can be determined according to actual usage, and the embodiment of the present application does not impose any restrictions on this.

[0097] In the embodiment of the present application, the first input is an input by a user to switch the page of a sub-application displayed in the current visualization area to a page of another sub-application.

[0098] Optionally, in an embodiment of the present application, the first input may be a click input, a long press input, or any other form of input by the user on the target first identifier to trigger the electronic device to switch the page of the sub-application displayed in the visualization area.

[0099] Step 502: In response to a first input, the electronic device switches a first page in a visualization area to a second page, and hides a first sub-application in a hidden area.

[0100] In the embodiment of the present application, the second page is a page of the sub-application indicated by the target first identifier.

[0101] Optionally, in an embodiment of the present application, after receiving the user's first input, the electronic device switches the first page in the visualization area to the page of the sub-application indicated by the target first identifier (i.e., the second page), then switches the address information of the first page to the address information of the second page, and hides the first sub-application in the hidden area.

[0102] It should be noted that the rendering process of all sub-application iframes is: download HTML---> download JavaScript file--> run JavaScript code--> request server data--> page display.

[0103] In the embodiment of the present application, each sub-application hidden in the hidden area is at the page display level. Therefore, after receiving the user's first input, the electronic device can immediately display the page of the sub-application indicated by the target first identifier in the visual area.

[0104] It should be noted that after the electronic device switches the sub-application, only one sub-application page can be seen in the visualization area of ​​the target interface. The switching process is to hide the first sub-application in the hidden area, and display the page of the sub-application indicated by the target first identifier in the visualization area.

[0105] Optionally, in an embodiment of the present application, when a user needs to switch sub-applications, the electronic device can monitor the first address information. For example, if the pathname changes from / New / * to / Web / *, the sub-application iframe corresponding to / New / * will be hidden, and the sub-application iframe corresponding to / Web / will be displayed to achieve instant switching of applications.

[0106] For example, in combination Figure 6 ,like Figure 7 As shown, after receiving the first input from the user, the electronic device switches the first page displayed in the visualization area 10 to the second page (for example, a page of a Web application), switches the address information of the first page to the address information of the second page (for example, http / / abcd.efg.xyz / Web / ****), and moves the first sub-application (for example, a New application) to the hidden area 11.

[0107] In an embodiment of the present application, since the electronic device loads the target application and the first sub-application in parallel and loads other sub-applications at the same time, when the user needs to switch sub-applications, the page of the sub-application to be switched can be displayed immediately. In this way, there is no need to destroy the sub-application displayed in the current visualization area before loading the sub-application to be switched, which improves the speed of loading sub-applications by the electronic device and reduces the phenomenon of lag.

[0108] Optionally, in an embodiment of the present application, the first page includes at least one second identifier, and each second identifier is used to indicate a sub-page in the first sub-application; after the above step 401, the application loading method provided in the embodiment of the present application also includes the following steps 601 to 603.

[0109] Step 601: The electronic device receives a second input of a target second identifier among at least one second identifier by a user.

[0110] In an embodiment of the present application, the first page includes multiple second identifiers, each second identifier is used to indicate a sub-page in the first sub-application, and the user can make a second input to a target second identifier among the multiple second identifiers to trigger the electronic device to display the page corresponding to the target second identifier.

[0111] Optionally, in an embodiment of the present application, the display mode of the above-mentioned target second identification can be text, image, video or URL, which is used to indicate the page corresponding to the target second identification. The specific display mode can be determined according to actual usage, and the embodiment of the present application does not impose any restrictions on this.

[0112] Optionally, in an embodiment of the present application, the above-mentioned second input can be a user's click input (such as a single-click input, a double-click input, or an input of a preset number of times), a long press input, a sliding input, etc. on the target second identifier, so as to trigger the electronic device to display the page corresponding to the target second identifier.

[0113] Step 602: The electronic device performs route switching in response to the second input, obtains the first message, and obtains the second path corresponding to the target second identifier.

[0114] In the embodiment of the present application, after receiving the second input of the user for the target second identifier, the electronic device can perform route switching, obtain the first message, and obtain the second path corresponding to the target second identifier.

[0115] Optionally, in an embodiment of the present application, the first message is a postmessage message.

[0116] Optionally, in an embodiment of the present application, when a user needs to switch a page included in the first sub-application (i.e., needs to switch the first application sub-iframe route), since the page switching is performed in the first sub-application, the pathname structure is consistent. Therefore, the electronic device can switch the route through the first sub-application and obtain the first message, so that the electronic device can obtain the second path corresponding to the target second identifier.

[0117] Step 603: The electronic device switches the first page in the visualization area to the first sub-page based on the first message and the second path.

[0118] In the embodiment of the present application, the first sub-page is a sub-page in the first sub-application corresponding to the second path.

[0119] In the embodiment of the present application, after acquiring the first message and the second path, the electronic device switches the first page in the visualization area to the first sub-page based on the first message and the second path.

[0120] Optionally, in an embodiment of the present application, if the user needs to switch the route of the first application sub-iframe, since the pathname structure is consistent, the electronic device can switch the route through the first sub-application and send a postmessage message to the parent frame in the micro-front-end framework of the electronic device, so that the electronic device can obtain the second path, and then use the replace method through the parent frame to change the address information in the address bar, and switch the first page in the visualization area to the first sub-page.

[0121] Exemplarily, if the page currently displayed in the visualization area of ​​the electronic device is a subpage of the New application (for example, the New / b page), and the user needs to switch the New / b page to another subpage of the New application (for example, the New / c page), since their pathname structures are consistent, the electronic device can first switch the route (for example, using the push method) and send a message (for example, a postmessage message) to the parent frame in the micro-frontend framework of the electronic device, so that the parent frame can use a replacement (for example, replace) method to change the page address information in the browser address bar and display the New / c page in the visualization area.

[0122] For example, Figure 8 As shown, Figure 8 A flowchart of an application loading method provided in an embodiment of the present application is shown. If a user needs to switch the first page of the first sub-application to a first sub-page different from the first page of the first sub-application, the first sub-page can be switched to the first sub-page of the first sub-application. Figure 8 Use the method shown to switch pages.

[0123] Optionally, in an embodiment of the present application, the first sub-page includes at least one third identifier, and each third identifier is used to indicate a sub-page in another sub-application; after the above step 603, the application loading method provided in the embodiment of the present application also includes the following steps 604 to 606.

[0124] Step 604: The electronic device receives a third input from the user regarding a target third identifier among at least one third identifier.

[0125] In an embodiment of the present application, the first sub-page includes at least one third identifier, each third identifier is used to indicate a sub-page in another sub-application, and the user can input a third input of the target third identifier among the at least one third identifier to trigger the electronic device to switch to the sub-page of the sub-application corresponding to the target third identifier.

[0126] Optionally, in an embodiment of the present application, the first sub-application may include multiple third identifiers, each of which can be used to indicate a sub-page in another sub-application. If the user needs to switch the first page currently displayed in the first sub-application to a sub-page in another sub-application, the user can make a third input to any third identifier included in the first page (for example, a target third identifier), so that the electronic device can switch the first page currently displayed in the first sub-application to a sub-page of another sub-application indicated by the target third identifier according to the user's third input.

[0127] Optionally, in an embodiment of the present application, the above-mentioned third input can be a click input, a long press input, a sliding input, etc. of the target third identifier by the user, so as to trigger the electronic device to switch the first sub-page to the page corresponding to the target third identifier; specifically, it can be determined according to actual usage, and the embodiment of the present application does not impose any restrictions.

[0128] Step 605: The electronic device performs route switching in response to the third input, obtains the second message, obtains the third loading path corresponding to the target third identifier, and hides the first sub-application in the hidden area.

[0129] In an embodiment of the present application, after receiving the user's third input for the target third identifier, the electronic device can perform route switching, obtain the second message, and obtain the third loading path corresponding to the target third identifier, and then hide the first sub-application in the hidden area.

[0130] Optionally, in an embodiment of the present application, the second message is a postmessage message.

[0131] Optionally, in an embodiment of the present application, if the user needs to switch the first sub-page in the first sub-application to a sub-page of another sub-application (i.e., needs to perform route switching among sub-pages of different sub-applications), since the electronic device switches pages among sub-pages of different sub-applications, their pathname structures are inconsistent. Therefore, the electronic device can switch routes through the first sub-application and then obtain the second message, so that the electronic device can obtain the third loading path corresponding to the target third identifier and hide the first sub-application in the hidden area.

[0132] Step 606: The electronic device switches the first sub-page in the visualization area to the second sub-page based on the third loading path and the second message.

[0133] In the embodiment of the present application, the second sub-page is a sub-page in another sub-application corresponding to the third loading path indicated by the target third identifier.

[0134] Optionally, in an embodiment of the present application, if the user needs to switch routes between sub-pages of different sub-applications, the electronic device can first switch routes through the first sub-application, and then send a postmessage message to the parent frame in the micro-front-end framework of the electronic device, so that the parent frame can obtain a third loading path, and use the replace method through the parent frame to change the address information in the address bar, switch the first sub-page in the visualization area to the second sub-page, and hide the first sub-application at the same time.

[0135] Exemplarily, if the page currently displayed in the visualization area of ​​the electronic device is a subpage of the New application (for example, the New / b page), and the user needs to switch the New / b page to a subpage of the Web application (for example, the Web / c page), since their pathname structures are inconsistent, the electronic device can first switch the route (for example, using the push method) and send a message (for example, a postmessage message) to the parent frame in the micro-frontend framework of the electronic device, so that the parent frame can use a replacement (for example, replace) method to change the page address information in the browser address bar, switch the New / b page in the visualization area to the Web / c page, and hide the New application in the hidden area.

[0136] For example, Fig. 9 As shown, Fig. 9 A flow chart of an application loading method provided in an embodiment of the present application is shown. If a user needs to switch a first sub-page in a first sub-application to a sub-page in another sub-application (for example, a second sub-application), the user can Fig. 9 Use the method shown to switch pages.

[0137] Optionally, in the embodiment of the present application, the above step 606 can be specifically implemented by the following steps 606a and 606b.

[0138] Step 606a: Based on the third loading path and the second message, the electronic device switches the first sub-page in the visualization area to the second page, and obtains the third message.

[0139] In the embodiment of the present application, the second page is a page of a sub-application in other sub-applications corresponding to the third identifier.

[0140] In the embodiment of the present application, based on the third loading path and the second message, the electronic device can switch the first sub-page of the first sub-application in the visualization area to the second page of the sub-application corresponding to the third identifier, and obtain the third message.

[0141] Optionally, in an embodiment of the present application, the third message is a postmessage message.

[0142] Optionally, in an embodiment of the present application, the electronic device may send a third message to the sub-application corresponding to the third identifier after hiding the first sub-application in the hidden area, so that the sub-application corresponding to the third identifier can obtain the third message.

[0143] Step 606b: The electronic device performs route switching based on the third message, and switches the second page in the visualization area to the second sub-page.

[0144] In the embodiment of the present application, the electronic device can perform route switching based on the third message and switch the second page in the visualization area to the second sub-page.

[0145] Optionally, in an embodiment of the present application, the electronic device may perform route switching based on the third message through the sub-application corresponding to the third identifier, and then switch the second page in the visualization area to the second sub-page.

[0146] Optionally, in the embodiment of the present application, after the above step 401, the application loading method provided in the embodiment of the present application further includes the following steps 701 and 702.

[0147] Step 701: The electronic device receives a fourth input from a user.

[0148] In the embodiment of the present application, the fourth input is the user's input for updating the data information of the first sub-application.

[0149] In an embodiment of the present application, after the electronic device loads the target application and the first sub-application in parallel, the user can receive the user's fourth input on the data information in the first sub-application, so that the electronic device can update the data information of the first sub-application according to the user's fourth input.

[0150] Step 702: The electronic device updates the data information of the first sub-application in response to the fourth input, and stores the updated data information in the database of the target application to share with other sub-applications.

[0151] In an embodiment of the present application, after receiving the user's input to update the data information of the first sub-application, the electronic device updates the data information of the first sub-application and stores the updated data information of the first sub-application in the database of the target application to share with other sub-applications.

[0152] Optionally, in an embodiment of the present application, after receiving the user's update input for the data information of the first sub-application, the electronic device can store the data to be shared in a specific database (e.g., store) through the target application corresponding to the parent frame, so that the electronic device can obtain the data in the database through the data acquisition interface (e.g., getTopStore) corresponding to the specific database; update the data in the specific database through the data update interface (e.g., syncTopMutation) corresponding to the specific database; and distribute the data through the data distribution interface (e.g., syncTopStore) corresponding to the specific database.

[0153] For example, Fig.10 As shown, when an electronic device needs to load a sub-application, the data in the specific database can be obtained through the corresponding method of the data acquisition interface corresponding to the specific database (for example, the getTopStore method); when the electronic device needs to modify the data information of a sub-application, the data information in the specific database can be updated through the corresponding method of the data update interface corresponding to the specific database (for example, syncTopMutation), so that the electronic device can distribute the updated data information to other sub-applications through the shared data engine to share with other sub-applications.

[0154] In an embodiment of the present application, since the user can update the data information of any sub-application in any sub-application and store the updated data information in the database of the target application to share with other sub-applications, the fluency of application loading in the electronic device is improved.

[0155] The application loading method provided in the embodiment of the present application can be executed by an application loading device. In the embodiment of the present application, the application loading device provided in the embodiment of the present application is described by taking the application loading method executed by the application loading device as an example.

[0156] Fig.11 A possible structural diagram of the application loading device involved in the embodiment of the present application is shown. Fig.11 As shown, the application loading device 60 may include: an acquisition module 61 , a determination module 62 and a loading module 63 .

[0157] The acquisition module 61 is used to acquire the first address information of the target application. The determination module 62 is used to determine the first loading path of the first sub-application in the target application according to the first address information acquired by the acquisition module 61. The loading module 63 is used to load the target application and the first sub-application in parallel according to the first loading path determined by the determination module 62.

[0158] An embodiment of the present application provides an application loading device, and an electronic device can determine the loading path of a first sub-application, so as to directly load a target application and the first sub-application in parallel according to the loading path of the first sub-application. That is, the present solution uses a parent-child framework parallel loading mechanism to enable the parent framework (i.e., the target application) and the sub-application to be loaded at the same time, without having to wait for the parent framework to be loaded before loading the sub-application. This avoids the problem of jamming that may occur when loading the sub-application after the parent framework has been loaded, reduces the time consumption of the entire loading process, and thereby improves the speed and efficiency of the electronic device in loading the sub-applications in the target application.

[0159] In a possible implementation, the determination module 62 is specifically configured to determine the code information of the target application according to the first address information; and determine the first loading path of the first sub-application according to the code information of the target application.

[0160] In a possible implementation, the loading module 63 is specifically configured to create a full-screen framework structure, and load the target application and the first sub-application in parallel in the full-screen framework structure according to the first loading path.

[0161] In one possible implementation, the loading module 63 is also used to load the target application and the first sub-application in parallel according to the first loading path, and then, after the target application and the first sub-application are loaded, simultaneously load other sub-applications in the target application, where the other sub-applications are sub-applications in the target application other than the first sub-application.

[0162] In a possible implementation, the application loading device 60 further includes: a display module and a hiding module. The display module is used to display the first page of the loaded first sub-application after the loading module 63 loads the target application and the first sub-application in parallel according to the first loading path. The hiding module is used to hide other sub-applications, which are sub-applications in the target application except the first sub-application.

[0163] In a possible implementation, the display module is specifically used to display the first page in the visualization area corresponding to the target application. The hiding module is specifically used to hide other sub-applications in the hidden area corresponding to the target application.

[0164] In one possible implementation, the first page includes at least one first identifier, and each first identifier is used to indicate another sub-application; the above-mentioned application loading device 60 also includes: a receiving module and a switching module. The receiving module is used to receive the user's first input for the target first identifier in the at least one first identifier after the display module displays the first page of the first sub-application after loading, and the hiding module hides other sub-applications. The switching module is used to switch the first page in the visualization area to the second page in response to the first input received by the receiving module, and the second page is the page of the sub-application indicated by the target first identifier. The hiding module is also used to hide the first sub-application in the hidden area.

[0165] In one possible implementation, the first page includes at least one second identifier, and each second identifier is used to indicate a subpage in the first sub-application; the above-mentioned application loading device 60 also includes a receiving module, a processing module and a switching module. The receiving module is used to receive the user's second input for the target second identifier in at least one second identifier after the display module displays the first page of the loaded first sub-application and the hiding module hides other sub-applications. The processing module is used to perform route switching in response to the second input received by the receiving module, obtain the first message, and obtain the second path corresponding to the target second identifier. The switching module is used to switch the first page in the visualization area to the first sub-page based on the first message and the second path obtained by the processing module. The first sub-page is the sub-page in the first sub-application corresponding to the second path.

[0166] In one possible implementation, the first sub-page includes at least one third identifier, and each third identifier is used to indicate a sub-page in another sub-application; the receiving module is further used to receive a third input of a target third identifier from a user in at least one third identifier after the switching module switches the first page in the visualization area to the first sub-page based on the first message and the second path. The processing module is further used to perform route switching, obtain the second message, obtain the third loading path corresponding to the target third identifier, and hide the first sub-application in the hidden area in response to the third input received by the receiving module. The switching module is used to switch the first sub-page in the visualization area to the second sub-page based on the third loading path and the second message obtained by the processing module, and the second sub-page is a sub-page in another sub-application corresponding to the third loading path indicated by the target third identifier.

[0167] In one possible implementation, the switching module is specifically used to switch the first sub-page in the visualization area to the second page based on the third loading path and the second message, and obtain the third message, the second page being the page of the sub-application corresponding to the third identifier in other sub-applications; and based on the third message, perform route switching and switch the second page in the visualization area to the second sub-page.

[0168] In a possible implementation, the application loading device 60 further includes: a receiving module and a processing module. The receiving module is used to receive a fourth input from a user after the display module displays the first page of the loaded first sub-application and the hiding module hides the pages of other sub-applications. The fourth input is an input for updating the data information of the first sub-application by the user. The processing module is used to update the data information of the first sub-application in response to the fourth input received by the receiving module, and store the updated data information in the database of the target application to share with other sub-applications.

[0169] The application loading device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0170] The application loading device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0171] The application loading device provided in the embodiment of the present application can achieve Figures 1 to 10 The various processes implemented in the method embodiment achieve the same effect and will not be described again here to avoid repetition.

[0172] Alternatively, if Fig.12As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores programs or instructions that can be executed on the processor 901, and when the program or instructions are executed by the processor 901, the various steps of the above-mentioned device method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0173] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0174] Fig.13 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0175] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.

[0176] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.13 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0177] The processor 110 is used to obtain first address information of the target application, determine a first loading path of the first sub-application in the target application according to the first address information, and load the target application and the first sub-application in parallel according to the first loading path.

[0178] An embodiment of the present application provides an electronic device, which can determine the loading path of a first sub-application, so as to directly load a target application and the first sub-application in parallel according to the loading path of the first sub-application. That is, the present solution uses a parent-child framework parallel loading mechanism to enable the parent framework (i.e., the target application) and the sub-application to be loaded at the same time, without having to wait for the parent framework to be loaded before loading the sub-application. This avoids the problem of jamming that may occur when loading the sub-application after the parent framework is loaded, reduces the time consumption of the entire loading process, and thereby improves the speed and efficiency of the electronic device in loading the sub-applications in the target application.

[0179] Optionally, in an embodiment of the present application, the processor 110 is specifically configured to determine code information of a target application according to the first address information; and determine a first loading path of a first sub-application according to the code information of the target application.

[0180] Optionally, in an embodiment of the present application, the processor 110 is specifically used to create a full-screen framework structure, and load the target application and the first sub-application in parallel in the full-screen framework structure according to the first loading path.

[0181] Optionally, in an embodiment of the present application, the processor 110 is further used to load the target application and the first sub-application in parallel according to the first loading path, and then, after the target application and the first sub-application are loaded, simultaneously load other sub-applications in the target application, where the other sub-applications are sub-applications in the target application other than the first sub-application.

[0182] Optionally, in the embodiment of the present application, the display unit 106 is used to display the first page of the loaded first sub-application after loading the target application and the first sub-application in parallel according to the first loading path. The processor 110 is used to hide other sub-applications, where the other sub-applications are sub-applications in the target application except the first sub-application.

[0183] Optionally, in the embodiment of the present application, the display unit 106 is specifically configured to display the first page in the visualization area corresponding to the target application. The processor 110 is specifically configured to hide other sub-applications in the hidden area corresponding to the target application.

[0184] Optionally, in an embodiment of the present application, the first page includes at least one first identifier, each of which is used to indicate another sub-application; the user input unit 107 is used to receive a first input from a user for a target first identifier among the at least one first identifier after displaying the first page of the loaded first sub-application and after the hidden module hides other sub-applications. The processor 110 is used to switch the first page in the visualization area to a second page in response to the first input, and the second page is a page of the sub-application indicated by the target first identifier. The processor 110 is also used to hide the first sub-application in the hidden area.

[0185] Optionally, in an embodiment of the present application, the first page includes at least one second identifier, and each second identifier is used to indicate a sub-page in the first sub-application; the user input unit 107 is used to display the first page of the first sub-application after loading, and after the hidden module hides other sub-applications, receives the user's second input for the target second identifier in at least one second identifier. The processor 110 is used to perform route switching in response to the second input, obtain the first message, and obtain the second path corresponding to the target second identifier. The processor 110 is also used to switch the first page in the visualization area to the first sub-page based on the first message and the second path obtained by the processing module. The first sub-page is a sub-page in the first sub-application corresponding to the second path.

[0186] Optionally, in an embodiment of the present application, the first sub-page includes at least one third identifier, and each third identifier is used to indicate a sub-page in another sub-application; the user input unit 107 is also used to receive a third input from the user for a target third identifier in at least one third identifier after switching the first page in the visualization area to the first sub-page based on the first message and the second path. The processor 110 is also used to perform route switching in response to the third input, obtain the second message, obtain the third loading path corresponding to the target third identifier, and hide the first sub-application in the hidden area. The processor 110 is used to switch the first sub-page in the visualization area to the second sub-page based on the third loading path and the second message, and the second sub-page is a sub-page in another sub-application corresponding to the third loading path indicated by the target third identifier.

[0187] Optionally, in an embodiment of the present application, the processor 110 is specifically used to switch the first sub-page in the visualization area to the second page based on the third loading path and the second message, and obtain a third message, the second page being a page of a sub-application corresponding to the third identifier in other sub-applications; and based on the third message, perform route switching and switch the second page in the visualization area to the second sub-page.

[0188] Optionally, in the embodiment of the present application, the user input unit 107 is used to display the first page of the loaded first sub-application, and after the hidden module hides the pages of other sub-applications, receive the fourth input of the user, and the fourth input is the user's input for updating the data information of the first sub-application. The processor 110 is also used to update the data information of the first sub-application in response to the fourth input, and store the updated data information in the database of the target application to share with other sub-applications.

[0189] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0190] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0191] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.

[0192] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned device method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0193] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0194] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned device method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0195] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0196] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned device method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0197] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0198] 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 computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0199] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An application loading method, characterized in that: The method comprises: Obtaining the first address information of the target application; Determining a first loading path of a first sub-application in the target application according to the first address information; According to the first loading path, loading the target application and the first sub-application in parallel; The parallel loading of the target application and the first sub-application includes: Loading the target application through the parent framework, and loading the first sub-application in parallel through the micro front-end framework; The loading the target application and the first sub-application in parallel according to the first loading path includes: A full-screen framework structure is created, and according to the first loading path, the target application and the first sub-application are loaded in parallel in the full-screen framework structure.

2. The method according to claim 1, characterized in that: The determining, according to the first address information, a first loading path of the first sub-application in the target application includes: Determining code information of the target application according to the first address information; A first loading path of the first sub-application is determined according to the code information of the target application.

3. The method according to claim 1, characterized in that After loading the target application and the first sub-application in parallel according to the first loading path, the method further includes: After the target application and the first sub-application are loaded, other sub-applications in the target application are loaded simultaneously, where the other sub-applications are sub-applications in the target application except the first sub-application.

4. The method according to any one of claims 1 to 3, characterized in that: After loading the target application and the first sub-application in parallel according to the first loading path, the method further includes: The first page of the loaded first sub-application is displayed, and other sub-applications are hidden, where the other sub-applications are sub-applications in the target application except the first sub-application.

5. The method according to claim 4, characterized in that The displaying the loaded first page of the first sub-application and hiding other sub-applications includes: The first page is displayed in a visualization area corresponding to the target application, and the other sub-applications are hidden in a hidden area corresponding to the target application.

6. The method according to claim 4, characterized in that The first page includes at least one first identifier, each first identifier is used to indicate another sub-application; After displaying the loaded first page of the first sub-application and hiding other sub-applications, the method further includes: receiving a first input of a target first identifier among the at least one first identifier by a user; In response to the first input, the first page in the visualization area is switched to a second page, the second page is a page of the sub-application indicated by the target first identifier, and the first sub-application is hidden in the hidden area.

7. The method according to claim 4, characterized in that The first page includes at least one second identifier, each second identifier is used to indicate a sub-page in the first sub-application; After displaying the loaded first page of the first sub-application and hiding other sub-applications, the method further includes: receiving a second input of a target second identifier among the at least one second identifier by a user; In response to the second input, perform route switching, obtain the first message, and obtain the second path corresponding to the target second identifier; Based on the first message and the second path, the first page in the visualization area is switched to a first sub-page, where the first sub-page is a sub-page in the first sub-application corresponding to the second path.

8. The method according to claim 7, characterized in that The first sub-page includes at least one third identifier, and each third identifier is used to indicate a sub-page in another sub-application; After switching the first page in the visualization area to a first sub-page based on the first message and the second path, the method further includes: receiving a third input of a target third identifier among the at least one third identifier by a user; In response to the third input, perform route switching, obtain a second message, obtain a third loading path corresponding to the target third identifier, and hide the first sub-application in the hidden area; Based on the third loading path and the second message, the first subpage in the visualization area is switched to a second subpage, where the second subpage is a subpage in another sub-application indicated by the target third identifier and corresponding to the third loading path.

9. The method according to claim 8, characterized in that The step of switching the first sub-page in the visualization area to the second sub-page based on the third loading path and the second message includes: Based on the third loading path and the second message, the first sub-page in the visualization area is switched to a second page, and a third message is obtained, where the second page is a page of a sub-application corresponding to the third identifier in the other sub-applications; Based on the third message, route switching is performed, and the second page in the visualization area is switched to a second sub-page.

10. The method according to claim 4, characterized in that After displaying the loaded first page of the first sub-application and hiding the pages of other sub-applications, the method further includes: receiving a fourth input from a user, where the fourth input is an input by the user to update data information of the first sub-application; In response to the fourth input, the data information of the first sub-application is updated, and the updated data information is stored in the database of the target application to be shared with the other sub-applications.

11. An application loading device, characterized in that: The device comprises: an acquisition module, a determination module and a loading module; The acquisition module is used to acquire first address information of the target application; The determining module is used to determine a first loading path of a first sub-application in the target application according to the first address information acquired by the acquiring module; The loading module is configured to load the target application and the first sub-application in parallel according to the first loading path determined by the determining module; The loading module is specifically used to load the target application through the parent framework, and load the first sub-application in parallel through the micro front-end framework according to the first loading path determined by the determination module; The loading module is specifically used to create a full-screen framework structure, and according to the first loading path, load the target application and the first sub-application in parallel in the full-screen framework structure.

12. The device according to claim 11, characterized in that The determination module is specifically configured to determine the code information of the target application according to the first address information; and determine the first loading path of the first sub-application according to the code information of the target application.

13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the application loading method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Webpage loading method and device

    CN111639289A

  • Page processing method and device, electronic equipment and computer readable storage medium

    CN112182442A

  • Page loading method, system and equipment based on micro-front-end architecture and storage medium

    CN113806657A