Sub-application startup method, device, terminal and server

Loading the rendering resource path through resource tables, the problem of low HTML file parsing efficiency in the micro front-end architecture is solved, the startup efficiency and resource acquisition efficiency of sub-applications are improved, and resource management is simplified.

CN113220366BActive Publication Date: 2024-12-31BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110512997.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-11
Publication Date
2024-12-31
Estimated Expiration
2041-05-11

AI Technical Summary

Technical Problem

In the existing micro front-end architecture, the parsing efficiency of HTML files is low, resulting in low rendering resource acquisition efficiency, which in turn affects the startup efficiency of sub-applications.

Method used

Maintain the rendering resource path of the sub-app through the resource table, load the rendering resource and call the loaded rendering resource to launch the sub-app, avoiding parsing the HTML file.

Benefits of technology

It improves the efficiency of rendering resource acquisition and the efficiency of the startup of the sub-application, simplifies the resource discovery mechanism, and reduces the maintenance difficulty and coupling of the sub-application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113220366B_ABST
    Figure CN113220366B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a sub-application startup method, device, terminal and server, and belongs to the field of computer technology. The method includes: based on the resource table path corresponding to the sub-application, loading the resource table pointed to by the resource table path, the resource table including the rendering resource path corresponding to the rendering resource of the sub-application; based on at least one rendering resource path in the resource table, loading the rendering resource pointed to by the at least one rendering resource path; calling at least one loaded rendering resource to start the sub-application. By maintaining the rendering resource path corresponding to the rendering resource of the sub-application through the resource table, the rendering resource path in the resource table can be used to load the rendering resource without parsing the relevant files, realizing an efficient sub-application resource discovery mechanism and improving the efficiency of obtaining rendering resources. On this basis, based on the loaded rendering resources, the sub-application is started, thereby improving the startup efficiency of the sub-application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a sub-application startup method, device, terminal and server. Background Art

[0002] With the continuous development of computer technology, a micro-frontend architecture has been proposed in the industry. The micro-frontend architecture includes a shell application and multiple sub-applications that can be scheduled by the shell application. The multiple sub-applications are independent of each other.

[0003] In the related art, each sub-application corresponds to an HTML (Hyper Text Markup Language) file, and the HTML file includes the rendering resource path of the rendering resource corresponding to the sub-application. The shell application parses the HTML file of the sub-application to determine the rendering resource path of the rendering resource, obtains the rendering resource based on the rendering resource path, and thus starts the sub-application based on the rendering resource.

[0004] However, the parsing efficiency of HTML files is low, which leads to low efficiency in acquiring rendering resources, and further leads to low efficiency in starting sub-applications. Summary of the invention

[0005] The embodiments of the present disclosure provide a sub-application startup method, device, terminal and server to improve the startup efficiency of sub-applications. The technical solution of the present disclosure is as follows:

[0006] According to one aspect of an embodiment of the present disclosure, a sub-application startup method is provided, the sub-application startup method comprising:

[0007] Based on the resource table path corresponding to the sub-application, load the resource table pointed to by the resource table path, wherein the resource table includes the rendering resource path corresponding to the rendering resource of the sub-application;

[0008] Based on at least one rendering resource path in the resource table, loading the rendering resource pointed to by the at least one rendering resource path;

[0009] The at least one loaded rendering resource is called to start the sub-application.

[0010] In some embodiments, loading the resource table pointed to by the resource table path based on the resource table path corresponding to the sub-application includes:

[0011] Based on the resource table path, sending a resource table acquisition request to the server, the resource table acquisition request carries the resource table path, and the resource table acquisition request is used to instruct the server to return the resource table pointed to by the resource table path;

[0012] Receive the resource list returned by the server.

[0013] In some embodiments, before loading the resource table pointed to by the resource table path based on the resource table path corresponding to the sub-application, the sub-application startup method further includes:

[0014] In response to a page rendering instruction, obtaining a sub-application identifier from a URL corresponding to the page rendering instruction, wherein the sub-application identifier is used to identify the sub-application;

[0015] Based on the stored correspondence between the sub-application identifier and the resource table path, the resource table path corresponding to the sub-application identifier is obtained.

[0016] In some embodiments, before loading the resource table pointed to by the resource table path based on the resource table path corresponding to the sub-application, the sub-application startup method further includes:

[0017] Obtaining a rendering resource path corresponding to at least one rendering resource of the sub-application;

[0018] Based on the acquired at least one rendering resource path, a resource table corresponding to the sub-application is generated.

[0019] In some embodiments, loading the rendering resource pointed to by the at least one rendering resource path based on the at least one rendering resource path in the resource table includes:

[0020] Inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs;

[0021] By running the framework resource, the rendering resource pointed to by the at least one rendering resource path is loaded.

[0022] In some embodiments, the inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs includes:

[0023] For each first rendering resource path in the at least one rendering resource path, creating a link tag for the first rendering resource path in the framework resource, the first rendering resource path is a path of a cascading style sheet CSS resource, and the framework resource is a hypertext markup language HTML resource;

[0024] Insert the first rendering resource path into the link tag.

[0025] In some embodiments, loading the rendering resource pointed to by the at least one rendering resource path by running the framework resource includes:

[0026] By running the framework resource, based on the first rendering resource path in each link tag, the CSS resource pointed to by the first rendering resource path in each link tag is loaded.

[0027] In some embodiments, the inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs includes:

[0028] For each second rendering resource path in the at least one rendering resource path, creating a script tag for the second rendering resource path in the framework resource, where the second rendering resource path is a path of a scripting language JS resource, and the framework resource is an HTML resource;

[0029] Insert the second rendering resource path into the script tag.

[0030] In some embodiments, loading the rendering resource pointed to by the at least one rendering resource path by running the framework resource includes:

[0031] By running the framework resource, based on the second rendering resource path in each script tag, the JS resource pointed to by the second rendering resource path in each script tag is loaded.

[0032] In some embodiments, loading the rendering resource pointed to by the at least one rendering resource path based on the at least one rendering resource path in the resource table includes:

[0033] In response to the at least one rendering resource path including N second rendering resource paths arranged in order, after the JS resources pointed to by the first N-1 second rendering resource paths are loaded, the JS resource pointed to by the last second rendering resource path is loaded, where N is an integer greater than 1, and the second rendering resource path is the path of the JS resource.

[0034] In some embodiments, the at least one rendering resource path includes multiple rendering resource paths, and loading the rendering resource pointed to by the at least one rendering resource path based on the at least one rendering resource path in the resource table includes:

[0035] According to the arrangement order of the multiple rendering resource paths in the resource table, the rendering resources pointed to by each rendering resource path are loaded in sequence.

[0036] In some embodiments, loading the rendering resource pointed to by the at least one rendering resource path based on the at least one rendering resource path in the resource table includes:

[0037] Sending a resource acquisition request to the server, wherein the resource acquisition request carries a rendering resource path in the resource table, and the resource acquisition request is used to instruct the server to return the rendering resource pointed to by the rendering resource path;

[0038] Receive the rendering resource returned by the server.

[0039] In some embodiments, a last rendering resource of the at least one rendering resource includes a launch interface;

[0040] The calling of the at least one loaded rendering resource to start the sub-application includes:

[0041] Determining the startup interface from the last rendering resource loaded;

[0042] The sub-application is started by running the startup interface and calling the at least one loaded rendering resource.

[0043] In some embodiments, the at least one rendering resource path includes N second rendering resource paths, the second rendering resource path is a path of a JS resource, and N is an integer greater than 1;

[0044] The determining the startup interface of the sub-application from the last loaded rendering resource includes:

[0045] In response to the completion of loading of the JS resources pointed to by the first N-1 second rendering resource paths among the N second rendering resource paths, obtaining a first name set consisting of interface names of the current global interface, where the global interface is an interface called in the global interface;

[0046] In response to the JS resources pointed to by the N second rendering resource paths being loaded, obtaining a second name set consisting of interface names of the current global interface;

[0047] Determine a target interface name newly added to the second name set relative to the first name set, and determine the interface corresponding to the target interface name in the last loaded JS resource as the startup interface.

[0048] In some embodiments, before determining the target interface name newly added to the second name set relative to the first name set, the sub-application startup method further includes:

[0049] Obtaining the first interface name in the first name set, and obtaining the first interface name in the second name set;

[0050] The determining of a target interface name newly added to the second name set relative to the first name set includes:

[0051] In response to a first interface name in the first name set being different from a first interface name in the second name set, the first interface name in the second name set is determined as the target interface name.

[0052] In some embodiments, obtaining the first interface name in the first name set, and obtaining the first interface name in the second name set, comprises:

[0053] Obtaining a first interface name in the first name set and a second interface name in the first name set, and obtaining a first interface name in the second name set;

[0054] The step of determining a target interface name newly added to the second name set relative to the first name set further includes:

[0055] In response to the first interface name in the first name set being the same as the first interface name in the second name set, obtaining the second interface name in the second name set;

[0056] In response to the second interface name in the first name set being different from the second interface name in the second name set, the second interface name in the second name set is determined as the target interface name.

[0057] In some embodiments, obtaining the first interface name in the first name set and the second interface name in the first name set, and obtaining the first interface name in the second name set, comprises:

[0058] Obtaining a first interface name in the first name set, a second interface name in the first name set, and a last interface name in the first name set, and obtaining a first interface name in the second name set;

[0059] The step of determining a target interface name newly added to the second name set relative to the first name set further includes:

[0060] In response to the second interface name in the first name set being the same as the second interface name in the second name set, obtaining the last interface name in the second name set;

[0061] In response to the last interface name in the first name set being different from the last interface name in the second name set, the last interface name in the second name set is determined as the target interface name.

[0062] According to one aspect of an embodiment of the present disclosure, a sub-application startup method is provided, the sub-application startup method comprising:

[0063] In response to receiving a resource table acquisition request sent by a terminal, acquiring a resource table path carried in the resource table acquisition request;

[0064] Obtain the resource table pointed to by the resource table path;

[0065] The acquired resource table is returned to the terminal, where the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application, and the rendering resource pointed to by the rendering resource path is used by the terminal to start the sub-application.

[0066] In some embodiments, before obtaining the resource table pointed to by the resource table path, the sub-application startup method further includes:

[0067] Receiving resource tables corresponding to multiple sub-applications sent by a management terminal, the management terminal is used to generate a resource table corresponding to each sub-application based on a rendering resource path corresponding to at least one rendering resource of each sub-application;

[0068] The resource table corresponding to each sub-application is stored under the resource table path corresponding to each sub-application.

[0069] In some embodiments, after returning the acquired resource table to the terminal, the sub-application startup method further includes:

[0070] In response to receiving a resource acquisition request sent by the terminal, acquiring a rendering resource path carried in the resource acquisition request;

[0071] Obtain the rendering resource pointed to by the rendering resource path;

[0072] The acquired rendering resource is returned to the terminal.

[0073] According to one aspect of an embodiment of the present disclosure, a sub-application startup device is provided, the sub-application startup device comprising:

[0074] A first resource table loading unit is configured to execute, based on a resource table path corresponding to a sub-application, loading a resource table pointed to by the resource table path, wherein the resource table includes a rendering resource path corresponding to a rendering resource of the sub-application;

[0075] A rendering resource loading unit, configured to execute, based on at least one rendering resource path in the resource table, loading a rendering resource pointed to by the at least one rendering resource path;

[0076] The sub-application starting unit is configured to execute and call at least one loaded rendering resource to start the sub-application.

[0077] In some embodiments, the first resource table loading unit is configured to execute:

[0078] Based on the resource table path, sending a resource table acquisition request to the server, the resource table acquisition request carries the resource table path, and the resource table acquisition request is used to instruct the server to return the resource table pointed to by the resource table path;

[0079] Receive the resource list returned by the server.

[0080] In some embodiments, the first resource table loading unit is further configured to execute:

[0081] In response to a page rendering instruction, obtaining a sub-application identifier from a URL corresponding to the page rendering instruction, wherein the sub-application identifier is used to identify the sub-application;

[0082] Based on the stored correspondence between the sub-application identifier and the resource table path, the resource table path corresponding to the sub-application identifier is obtained.

[0083] In some embodiments, the sub-application launching device further includes:

[0084] A first resource path acquisition unit is configured to execute acquisition of a rendering resource path corresponding to at least one rendering resource of the sub-application;

[0085] The resource table generating unit is configured to generate a resource table corresponding to the sub-application based on the acquired at least one rendering resource path.

[0086] In some embodiments, the rendering resource loading unit includes:

[0087] A resource path insertion sub-unit, configured to execute inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs;

[0088] The rendering resource loading subunit is configured to load the rendering resource pointed to by the at least one rendering resource path by running the framework resource.

[0089] In some embodiments, the resource path insertion subunit is configured to execute:

[0090] For each first rendering resource path in the at least one rendering resource path, creating a link tag for the first rendering resource path in the framework resource, the first rendering resource path is a path of a cascading style sheet CSS resource, and the framework resource is a hypertext markup language HTML resource;

[0091] Insert the first rendering resource path into the link tag.

[0092] In some embodiments, the rendering resource loading subunit is configured to execute:

[0093] By running the framework resource, based on the first rendering resource path in each link tag, the CSS resource pointed to by the first rendering resource path in each link tag is loaded.

[0094] In some embodiments, the resource path insertion subunit is configured to execute:

[0095] For each second rendering resource path in the at least one rendering resource path, creating a script tag for the second rendering resource path in the framework resource, where the second rendering resource path is a path of a scripting language JS resource, and the framework resource is an HTML resource;

[0096] Insert the second rendering resource path into the script tag.

[0097] In some embodiments, the rendering resource loading subunit is configured to execute:

[0098] By running the framework resource, based on the second rendering resource path in each script tag, the JS resource pointed to by the second rendering resource path in each script tag is loaded.

[0099] In some embodiments, the rendering resource loading unit is configured to execute:

[0100] In response to the at least one rendering resource path including N second rendering resource paths arranged in order, after the JS resources pointed to by the first N-1 second rendering resource paths are loaded, the JS resource pointed to by the last second rendering resource path is loaded, where N is an integer greater than 1, and the second rendering resource path is the path of the JS resource.

[0101] In some embodiments, the at least one rendering resource path includes multiple rendering resource paths, and the rendering resource loading unit is configured to execute:

[0102] According to the arrangement order of the multiple rendering resource paths in the resource table, the rendering resources pointed to by each rendering resource path are loaded in sequence.

[0103] In some embodiments, the rendering resource loading unit is configured to execute:

[0104] Sending a resource acquisition request to the server, wherein the resource acquisition request carries a rendering resource path in the resource table, and the resource acquisition request is used to instruct the server to return the rendering resource pointed to by the rendering resource path;

[0105] Receive the rendering resource returned by the server.

[0106] In some embodiments, a last rendering resource of the at least one rendering resource includes a launch interface;

[0107] The sub-application startup unit includes:

[0108] A startup interface determination subunit, configured to determine a startup interface of the sub-application from the last loaded rendering resource;

[0109] The sub-application starting sub-unit is configured to execute the starting interface and call the at least one loaded rendering resource to start the sub-application.

[0110] In some embodiments, the at least one rendering resource path includes N second rendering resource paths, the second rendering resource path is a path of a JS resource, and N is an integer greater than 1;

[0111] The startup interface determination subunit includes:

[0112] A first name set acquisition sub-sub-unit is configured to execute, in response to completion of loading of the JS resources pointed to by the first N-1 second rendering resource paths among the N second rendering resource paths, acquiring a first name set consisting of interface names of the current global interface, wherein the global interface is an interface called in the global interface;

[0113] A second name set acquisition sub-sub-unit is configured to execute, in response to completion of loading of the JS resources pointed to by the N second rendering resource paths, acquiring a second name set consisting of interface names of the current global interface;

[0114] The interface name determination sub-subunit is configured to determine the target interface name newly added to the second name set relative to the first name set, and determine the interface corresponding to the target interface name in the last JS resource loaded as the startup interface.

[0115] In some embodiments, the sub-application launching device further includes:

[0116] an interface name acquisition sub-subunit, configured to execute acquisition of a first interface name in the first name set, and acquisition of a first interface name in the second name set;

[0117] The interface name determines the sub-subunit that is configured to perform:

[0118] In response to a first interface name in the first name set being different from a first interface name in the second name set, the first interface name in the second name set is determined as the target interface name.

[0119] In some embodiments, the interface name acquisition sub-sub-unit is configured to perform:

[0120] Obtaining a first interface name in the first name set and a second interface name in the first name set, and obtaining a first interface name in the second name set;

[0121] The interface name determines the sub-subunit, which is also configured to perform:

[0122] In response to the first interface name in the first name set being the same as the first interface name in the second name set, obtaining the second interface name in the second name set;

[0123] In response to the second interface name in the first name set being different from the second interface name in the second name set, the second interface name in the second name set is determined as the target interface name.

[0124] In some embodiments, the interface name acquisition sub-sub-unit is configured to perform:

[0125] Obtaining a first interface name in the first name set, a second interface name in the first name set, and a last interface name in the first name set, and obtaining a first interface name in the second name set;

[0126] The interface name determines the sub-subunit, which is also configured to perform:

[0127] In response to the second interface name in the first name set being the same as the second interface name in the second name set, obtaining the last interface name in the second name set;

[0128] In response to the last interface name in the first name set being different from the last interface name in the second name set, the last interface name in the second name set is determined as the target interface name.

[0129] According to one aspect of an embodiment of the present disclosure, a sub-application startup device is provided, the sub-application startup device comprising:

[0130] A resource table path acquisition unit, configured to execute, in response to receiving a resource table acquisition request sent by a terminal, acquiring a resource table path carried in the resource table acquisition request;

[0131] A second resource table acquisition unit is configured to execute acquisition of the resource table pointed to by the resource table path;

[0132] The resource table returning unit is configured to execute returning the acquired resource table to the terminal, wherein the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application, and the rendering resource pointed to by the rendering resource path is used by the terminal to start the sub-application.

[0133] In some embodiments, the sub-application launching device further includes:

[0134] A resource table receiving unit is configured to receive resource tables corresponding to multiple sub-applications sent by a management terminal, wherein the management terminal is used to generate a resource table corresponding to each sub-application based on a rendering resource path corresponding to at least one rendering resource of each sub-application;

[0135] The resource table storage unit is configured to store the resource table corresponding to each sub-application under the resource table path corresponding to each sub-application.

[0136] In some embodiments, the sub-application launching device further includes:

[0137] A second resource path acquisition unit is configured to execute, in response to receiving a resource acquisition request sent by the terminal, acquiring a rendering resource path carried in the resource acquisition request;

[0138] A rendering resource acquisition unit, configured to execute acquisition of the rendering resource pointed to by the rendering resource path;

[0139] The rendering resource returning unit is configured to return the acquired rendering resource to the terminal.

[0140] According to one aspect of an embodiment of the present disclosure, a terminal is provided, comprising: one or more processors; a memory for storing instructions executable by the processors; wherein the processors are configured to execute the instructions to implement the sub-application startup method described in the above aspects.

[0141] According to one aspect of an embodiment of the present disclosure, a server is provided, comprising: one or more processors; a memory for storing instructions executable by the processors; wherein the processors are configured to execute the instructions to implement the sub-application startup method described in the above aspects.

[0142] According to one aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a terminal, the terminal is enabled to execute the sub-application startup method described in the above aspect.

[0143] According to one aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a server, the server can execute the sub-application startup method described in the above aspect.

[0144] According to one aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the sub-application startup method described in the above aspect is implemented.

[0145] According to one aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the sub-application startup method described in the above aspect is implemented.

[0146] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0147] The resource table is used to maintain the rendering resource path corresponding to the rendering resources of the sub-application. The rendering resource path in the resource table can be used to load the rendering resources without parsing the relevant files. This implements an efficient sub-application resource discovery mechanism and improves the efficiency of obtaining rendering resources. On this basis, the sub-application is started based on the loaded rendering resources, thereby improving the startup efficiency of the sub-application.

[0148] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0149] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0150] Figure 1 is a schematic diagram of an implementation environment according to an exemplary embodiment;

[0151] Figure 2 is a flow chart of a method for starting a sub-application according to an exemplary embodiment;

[0152] Figure 3 is a flow chart of a method for starting a sub-application according to an exemplary embodiment;

[0153] Figure 4is an interactive flow chart of a sub-application startup method according to an exemplary embodiment;

[0154] Figure 5 is a schematic diagram showing a method of loading a rendering resource according to an exemplary embodiment;

[0155] Figure 6 is a flow chart showing a method of obtaining an interface name from a first name set according to an exemplary embodiment;

[0156] Figure 7 is a flow chart showing a method of determining an interface name of a startup interface according to an exemplary embodiment;

[0157] Figure 8 is a schematic diagram of a micro front-end architecture according to an exemplary embodiment;

[0158] Fig. 9 is a block diagram of a sub-application startup device according to an exemplary embodiment;

[0159] Fig.10 is a block diagram of a sub-application startup device according to an exemplary embodiment;

[0160] Fig.11 is a block diagram of a terminal according to an exemplary embodiment;

[0161] Fig.12 It is a block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION

[0162] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0163] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0165] Figure 1 is a schematic diagram of an implementation environment according to an exemplary embodiment. Figure 1 , the implementation environment includes a terminal 110 and a server 120 .

[0166] The terminal 110 may be a smart phone, a tablet computer, a laptop computer, a desktop computer or other electronic device with a display function. The terminal 110 has the function of rendering a page corresponding to any URL. In some embodiments, a browser client is installed on the terminal 110, and the terminal 110 renders a page corresponding to any URL by running the browser client.

[0167] It should be noted that the terminal 110 generally refers to one of a plurality of terminals, and this embodiment is only illustrated by taking the terminal 110 as an example. Those skilled in the art may know that the number of the above terminals may be more or less. For example, the above terminals may be only a few, or the above terminals may be dozens or hundreds, or a greater number. The embodiment of the present disclosure does not limit the number and device type of the terminals.

[0168] The server 120 may be one server, multiple servers, a cloud server, a cloud computing platform, or a virtualization center. In some embodiments, the server 120 is a backend server of any website or any multiple websites, and the server 120 stores resources for rendering pages belonging to the any website or the any multiple websites. The server 120 provides backend services for page rendering of the any website or the any multiple websites based on the stored resources.

[0169] The terminal 110 communicates with the server 120 via a wireless network or a wired network. The terminal 110 runs a browser client, responds to a page rendering instruction, and the URL corresponding to the page rendering instruction belongs to the website corresponding to the server 120, communicates with the server 120 to obtain resources for rendering the page corresponding to the URL, and renders the page corresponding to the URL based on the obtained resources.

[0170] It should be noted that the server 120 generally refers to one of a plurality of servers, wherein each server is a backend server of a different website. The terminal 110 communicates with the backend servers of different websites to render pages of different websites.

[0171] The sub-application startup method provided in the embodiment of the present disclosure is implemented based on the micro-frontend architecture. The sub-application startup method under the micro-frontend architecture is briefly described below.

[0172] The terminal runs the web (World Wide Web) application corresponding to any website through the browser client to render the page of the website. In the micro-frontend architecture, the web application includes a shell application and multiple sub-applications. The multiple sub-applications are independent of each other, which facilitates the development and maintenance of the web application. When any website is visited, the terminal loads the shell application in the web application corresponding to the website; after the shell application is loaded, the sub-application is scheduled through the shell application. If the page of a sub-application is visited and the sub-application has not been loaded, the sub-application is loaded through the shell application; if the page of a sub-application is not visited and the sub-application has been loaded, the sub-application is uninstalled through the shell application.

[0173] Among them, the shell application includes a framework resource, which is used to define the framework of the page, that is, to define the layout of the page or to define the structure of the page. The framework resource of the shell application is loaded by the terminal from the server. The framework resource of the shell application can be reused in multiple sub-applications, that is, the framework of the page of each sub-application is built based on the framework resource. In some embodiments, the framework resource is an HTML resource. The HTML resource includes at least one program code for indicating the framework of the page. In some embodiments, the HTML resource is also referred to as an HTML file, an HTML code file or an HTML code. Each sub-application includes a rendering resource, and the rendering resource of each sub-application is used to define the presentation style and interaction logic of the page of the sub-application. The terminal starts the sub-application based on the framework resource of the shell application and the rendering resource of the loaded sub-application, so that after the sub-application is started, the page of the sub-application is rendered based on the operation of the sub-application.

[0174] Figure 2 FIG. 1 is a flowchart of a method for starting a sub-application according to an exemplary embodiment. Figure 2 The sub-application startup method is executed by the terminal and includes the following steps.

[0175] 201. Based on the resource table path corresponding to the sub-application, load the resource table pointed to by the resource table path, where the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application.

[0176] 202. Based on at least one rendering resource path in the resource table, load a rendering resource pointed to by at least one rendering resource path.

[0177] 203. Call at least one loaded rendering resource to start the sub-application.

[0178] The technical solution provided by the embodiment of the present disclosure maintains the rendering resource path corresponding to the rendering resources of the sub-application through a resource table. The rendering resource path in the resource table can be used to load the rendering resources without parsing the relevant files, thereby realizing an efficient sub-application resource discovery mechanism and improving the efficiency of obtaining rendering resources. On this basis, the sub-application is started based on the loaded rendering resources, thereby improving the startup efficiency of the sub-application.

[0179] Figure 3 FIG. 1 is a flowchart of a method for starting a sub-application according to an exemplary embodiment. Figure 3 The sub-application startup method is executed by the server and includes the following steps.

[0180] 301. In response to receiving a resource table acquisition request sent by a terminal, acquire a resource table path carried in the resource table acquisition request.

[0181] 302. Obtain the resource table pointed to by the resource table path.

[0182] 303. Return the acquired resource table to the terminal, where the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application, and the rendering resource pointed to by the rendering resource path is used by the terminal to start the sub-application.

[0183] The technical solution provided by the embodiment of the present disclosure provides support for the terminal to load rendering resources more efficiently by using the rendering resource path in the resource table, and then the terminal starts the sub-application based on the loaded rendering resources, which can improve the startup efficiency of the sub-application.

[0184] Figure 4 is an interactive flow chart of a sub-application startup method according to an exemplary embodiment. Figure 4 The sub-application startup method is executed through interaction between the terminal and the server, and the sub-application startup method includes the following steps.

[0185] 401. The terminal obtains a resource table path corresponding to the sub-application.

[0186] The terminal needs to start the sub-application based on the rendering resources of the above sub-application and render the page of the sub-application. The terminal has not yet loaded the rendering resources of the sub-application locally. Therefore, the terminal obtains the resource table path corresponding to the sub-application, obtains the resource table corresponding to the sub-application based on the resource table path, and loads the rendering resources of the sub-application based on the resource table. Among them, a resource table path points to a resource table corresponding to a sub-application, which is used to indicate the storage location of a resource table corresponding to a sub-application.

[0187] In some embodiments, the terminal locally stores a correspondence between the sub-application identifier and the resource table path. In response to the page rendering instruction, the terminal obtains the sub-application identifier from the URL corresponding to the page rendering instruction, the sub-application identifier is used to identify the sub-application, and the page rendering instruction is used to indicate that the rendered page is the page of the sub-application; based on the stored correspondence between the sub-application identifier and the resource table path, the terminal obtains the resource table path corresponding to the sub-application identifier.

[0188] In some embodiments, the website address is an address in the URL (Uniform Resource Locator) format, and the website address is also called a URL. For example, the website address is "https: / / aaaaa.com / b", and the sub-application identifier in the website address is " / b". The terminal obtains the resource table path corresponding to " / b" from the stored correspondence between the sub-application identifier and the resource table path.

[0189] One thing that needs to be explained is that the correspondence between the sub-application identifier and the resource table path is pre-configured in the shell application. Before the website corresponding to the shell application is accessed, the shell application is stored in the server. When the website corresponding to the shell application is accessed, the terminal loads the shell application from the server and stores the loaded shell application locally. The terminal responds to the page rendering instruction and obtains the correspondence between the sub-application identifier and the resource table path from the shell application stored locally.

[0190] Another point that needs to be explained is that the above-mentioned page rendering instruction is triggered by a page access operation performed by the user on the terminal. For example, the page access operation is an access operation to an input URL, and the terminal triggers a page rendering instruction in response to the page access operation, and the URL corresponding to the page rendering instruction is the above-mentioned input URL. For another example, the page access operation is a click operation on a displayed page link, and the page link corresponds to a URL. The terminal triggers a page rendering instruction in response to the page access operation, and the URL corresponding to the page rendering instruction is the URL corresponding to the above-mentioned page link.

[0191] In the disclosed embodiment, if it is necessary to render a page of a sub-application, the resource table path corresponding to the sub-application can be quickly queried from the local storage, thereby improving the efficiency of obtaining the resource table path. Then, based on the obtained resource table path, the rendering resources corresponding to the sub-application are obtained, which can further improve the efficiency of obtaining rendering resources.

[0192] 402. The terminal sends a resource table acquisition request to the server, where the resource table acquisition request carries a resource table path.

[0193] The resource table corresponding to the sub-application is stored in the server. The terminal sends a resource table acquisition request carrying a resource table path to the server to instruct the server to return the resource table pointed to by the resource table path.

[0194] 403. The server receives the resource table acquisition request sent by the terminal, and acquires the resource table pointed to by the resource table path according to the resource table path carried in the received resource table acquisition request.

[0195] The server stores resource tables corresponding to multiple sub-applications, and each resource table corresponding to a sub-application is stored under a resource table path. The server obtains the resource table under the resource table path according to the resource table path carried in the received resource table acquisition request.

[0196] It should be noted that before the server obtains the stored resource table pointed to by the resource table path, it also receives the resource tables corresponding to multiple sub-applications sent by the management terminal, and stores the resource table corresponding to each sub-application under the resource table path corresponding to each sub-application. The management terminal is a terminal used to develop and maintain sub-applications. The management terminal is used to generate a resource table corresponding to each sub-application based on the rendering resource path corresponding to at least one rendering resource of each sub-application.

[0197] 404. The server returns the acquired resource list to the terminal.

[0198] After obtaining the resource table, the server returns the resource table to the terminal, thereby responding to the resource table acquisition request sent by the terminal.

[0199] 405. The terminal receives a resource table returned by the server, where the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application.

[0200] Among them, a rendering resource path points to a rendering resource, which is used to indicate the storage location of the rendering resource. The rendering resource is used to define the presentation style and interaction logic of the sub-application page. The rendering resource includes at least JS (JavaScript, a scripting language) resources. In some embodiments, the rendering resource also includes CSS (Cascading Style Sheets) resources, and the CSS resources exist independently of the JS resources, and the JS resources and CSS resources are loaded independently. In some embodiments, the CSS resources depend on the JS resources to exist, and the loading of the CSS resources depends on the execution of the JS resources. In the embodiments of the present disclosure, the existence of CSS resources independent of JS resources is used as an example for explanation.

[0201] It should be noted that JS resources include at least one program code for indicating the interactive logic of the page. In some embodiments, JS resources are also referred to as JS files, JS code files, or JS codes. CSS resources include at least one program code for indicating the presentation style of the page. In some embodiments, CSS resources are also referred to as CSS files, CSS code files, or CSS codes.

[0202] It should be noted that in the above steps 401 to 405, the terminal obtains the resource table pointed to by the resource table path from the server according to the resource table path corresponding to the sub-application. In some embodiments, the terminal locally stores multiple resource tables corresponding to the sub-application, and the terminal can obtain the resource table corresponding to the sub-application from the multiple resource tables stored locally. Among them, the resource table corresponding to each sub-application is represented by the sub-application identifier of the sub-application. Accordingly, the step of the terminal obtaining the resource table corresponding to the sub-application from the multiple resource tables stored locally includes: the terminal responds to the page rendering instruction and obtains the sub-application identifier from the website corresponding to the page rendering instruction; and obtains the resource table represented by the sub-application identifier from the multiple resource tables stored locally. In addition, it should be noted that the above multiple resource tables represented by the sub-application identifier are pre-configured in the shell application, and the shell application is stored in the server before the website corresponding to the shell application is accessed. When the website corresponding to the shell application is accessed, the terminal loads the shell application from the server and stores the loaded shell application locally. The above multiple resource tables stored locally are the multiple resource tables included in the shell application stored locally.

[0203] In the disclosed embodiment, the rendering resource path of the sub-application is maintained through a resource table, and the sub-application does not correspond to an HTML file. Since there is reusable HTML code in each HTML file, compared to the solution in which each sub-application corresponds to an HTML file, the technical solution provided by the disclosed embodiment reduces the storage of redundant resources, making the resources of the sub-application more concise and reducing the difficulty of maintaining the sub-application. Moreover, in the disclosed embodiment, if the rendering resource path of the rendering resource of the sub-application is updated, the resource table will be updated accordingly, but the resource table path of the resource table will not be updated. The resource table pointed to by the resource table path can still be obtained through the resource table path. Compared to the solution of configuring the rendering resource path in the shell application, there is no need to update the shell application as the rendering resource path is updated, which further reduces the coupling between the shell application and the sub-application, making the update and maintenance of the sub-application more convenient and efficient.

[0204] 406. The terminal inserts at least one rendering resource path in the resource table into the framework resources of the shell application to which the sub-application belongs.

[0205] The terminal inserts the rendering resource path into the framework resource to load the rendering resource pointed to by the rendering resource path through the operation of the framework resource. In some embodiments, the framework resource is an HTML resource. At least one rendering resource path includes at least a second rendering resource path, which is a path of a JS resource and is used to point to a JS resource. For example, a second rendering resource path is " / static / js / chunk-vendors.7eb6ae.js". In some embodiments, at least one rendering resource path also includes a first rendering resource path, which is a path of a CSS resource and is used to point to a CSS resource. For example, a first resource rendering resource path is " / static / css / chunk-vendors.eb67df.css". In an embodiment of the present disclosure, at least one rendering resource path is a plurality of rendering resource paths, and the plurality of rendering resource paths include at least one first rendering resource path and at least one second rendering resource path.

[0206] The following describes the step in which the terminal inserts the first rendering resource path into the framework resource, and the step in which the terminal inserts the second rendering resource path into the framework resource.

[0207] For each first rendering resource path in at least one rendering resource path, the terminal creates a link tag for the first rendering resource path in the framework resource; and inserts the first rendering resource path into the link tag. The link tag is used to define the relationship between the HTML resource and the external resource. In the embodiment of the present disclosure, the link tag is used to link the CSS resource, and the element inserted in the link tag is the path of the CSS resource.

[0208] For each second rendering resource path in at least one rendering resource path, the terminal creates a script tag for the second rendering resource path in the framework resource; and inserts the second rendering resource path into the script tag. The script tag is used to define a script. In the disclosed embodiment, the script tag is used to link to a JS resource, and the element inserted into the script tag is the path of the JS resource.

[0209] 407. The terminal loads a rendering resource pointed to by at least one rendering resource path by running the framework resource.

[0210] After the above step 406 is executed, at least one link tag and at least one script tag are added to the framework resources. The terminal runs the framework resources, and when executing the link tag, it loads the CSS resource pointed to by the path of the CSS resource in the link tag; when executing the script tag, it loads the JS resource pointed to by the path of the JS resource in the script tag. That is, the terminal loads the CSS resource pointed to by the first rendering resource path in each link tag based on the first rendering resource path in each link tag by running the framework resources; and loads the JS resource pointed to by the second rendering resource path in each script tag by running the framework resources based on the second rendering resource path in each script tag.

[0211] In the disclosed embodiment, the terminal declares the rendering resource path to the browser client on the terminal by inserting the rendering resource path into the framework resource, thereby being able to load the rendering resource with the help of the resource loading function of the browser client. The resource loading function of the browser client can effectively circumvent cross-domain restrictions, and the loaded rendering resources do not need to have cross-domain access permissions, thereby improving the flexibility of resource loading.

[0212] It should be noted that, since the JS resource pointed to by the last second rendering resource path includes the startup interface of the sub-application, and the operation of the startup interface depends on the JS resources pointed to by the previous multiple second rendering resource paths, if the JS resource pointed to by the last second rendering resource path is loaded and run before the JS resources pointed to by other second rendering resource paths are loaded, the terminal will report an error due to the inability to find the pre-dependency, and since the polluted memory cannot be cleaned, it cannot be restored to normal. Therefore, in order to ensure the stability of resource loading and operation, it is necessary to load the JS resource pointed to by the last second rendering resource path after the JS resources pointed to by the previous multiple second rendering resource paths are loaded. That is, in response to at least one rendering resource path including N second rendering resource paths arranged in order, the terminal loads the JS resource pointed to by the last second rendering resource path after the JS resources pointed to by the first N-1 second rendering resource paths are loaded, where N is an integer greater than 1.

[0213] It should be noted that each time the terminal completes loading of a JS resource, a first load event is triggered. In response to monitoring N-1 first load events, the terminal determines that the loading of the JS resources pointed to by the first N-1 second rendering resource paths is completed. In some embodiments, the JS resources pointed to by the first N-1 second rendering resource paths can be loaded in parallel, that is, the JS resources pointed to by the first N-1 second rendering resource paths are loaded synchronously; or, the JS resources pointed to by the first N-1 second rendering resource paths can also be loaded serially, that is, the JS resources pointed to by the first N-1 second rendering resource paths are arranged in the order in the resource table, and the next JS resource is loaded after one JS resource is loaded. The embodiment of the present disclosure does not limit the loading order of the JS resources pointed to by the first N-1 second rendering resource paths.

[0214] It should be noted that if the resources pointed to by multiple rendering resource paths include CSS resources, since the operation of the startup interface also depends on the loaded CSS resources, the terminal should first load the CSS resources pointed to by the first rendering resource path in the multiple rendering resource paths before loading the JS resources pointed to by the last second rendering resource path. In some embodiments, the terminal first loads the CSS resources pointed to by the first rendering resource path in the multiple rendering resource paths, and after the CSS resources are loaded, the JS resources pointed to by the second rendering resource path in the multiple rendering resource paths are loaded. It should be noted that each time the terminal loads a CSS resource, a second load event will be triggered. If the number of first rendering resource paths in the multiple rendering resource paths is M, the terminal determines that M CSS resources have been loaded in response to listening to M second load events, where M is an integer greater than 1. In some embodiments, the CSS resources pointed to by multiple first rendering resource paths can be loaded serially to avoid the rendering of the style being incorrectly overwritten and improve the stability of the style rendering; or, the CSS resources pointed to by multiple first rendering resource paths can also be loaded in parallel, and the embodiment of the present disclosure does not limit the loading order of the CSS resources pointed to by multiple first rendering resource paths.

[0215] For ease of understanding, the following Figure 5 For an explanation of the loading process of rendering resources, see Figure 5 , the terminal first loads the resource table; according to the path of the CSS resources in the resource table, loads all CSS resources; according to the arrangement order of the path of the JS resources in the resource table, first loads the first N-1 JS resources; and then loads the last JS resource.

[0216] It should be noted that at least one rendering resource path includes multiple rendering resource paths. In some embodiments, the terminal loads the rendering resources pointed to by each rendering resource path in sequence according to the arrangement order of the multiple rendering resource paths in the resource table, so as to avoid errors caused by delayed loading of rendering resources that should be loaded in advance, thereby improving the stability of page rendering.

[0217] It should be noted that, in some embodiments, the rendering resource is stored on the server, and the terminal loads the rendering resource from the server. The step of the terminal loading the rendering resource from the server includes: the terminal sends a resource acquisition request to the server, the resource acquisition request carries a rendering resource path in the resource table, and the resource acquisition request is used to instruct the server to return the rendering resource pointed to by the rendering resource path; the server obtains the rendering resource path carried by the resource acquisition request in response to receiving the resource acquisition request sent by the terminal; the server obtains the rendering resource pointed to by the rendering resource path; the server returns the acquired rendering resource to the terminal; and the terminal receives the rendering resource returned by the server.

[0218] The above technical solution stores rendering resources on the server, and only requests the server to obtain rendering resources when rendering a page, thereby reducing the occupation of the terminal cache by rendering resources and improving the utilization rate of cache resources.

[0219] 408. The terminal determines a startup interface of the sub-application from a last rendering resource of the at least one loaded rendering resource.

[0220] The startup interface has the function of calling the loaded rendering resource to start the sub-application, and the startup interface is in the last JS resource. In some embodiments, since the global interface in the last JS resource only includes the startup interface, the terminal can determine the global interface newly added before and after the last JS resource is loaded as the startup interface. Accordingly, the above step 408 includes: the terminal responds to the completion of loading of the JS resources pointed to by the first N-1 second rendering resource paths among the N second rendering resource paths, and obtains a first name set consisting of the interface names of the current global interface, wherein the global interface is an interface called in the global; the terminal responds to the completion of loading of the JS resources pointed to by the N second rendering resource paths, and obtains a second name set consisting of the interface names of the current global interface; the terminal determines the target interface name newly added to the second name set relative to the first name set, and determines the interface corresponding to the target interface name in the last JS resource loaded as the startup interface.

[0221] It should be noted that, since the startup interface is an interface declared in the global context, after the last JS resource is loaded, the interface name of the startup interface will be mounted in the global object, where the global object is also the window object, and the global object includes the interface name of the interface declared in the global context. The first name set is composed of the interface names included in the global object after the first N-1 JS resources are loaded and before the last JS resource is loaded. The second name set is composed of the interface names included in the global object after the last JS resource is loaded.

[0222] The above technical solution determines the global interface added before and after the last JS resource is loaded as the startup interface. Even if the startup interface is not named according to the specified rules, the startup interface can be automatically detected, eliminating unnecessary conventions and couplings and improving the flexibility of determining the startup interface.

[0223] In some embodiments, the interface name of the newly added global interface is either located at the first position of the second name set, the second position of the second name set, or the last position of the second name set. The terminal determines whether the interface names at the above three positions are the newly added interface names.

[0224] In some embodiments, the terminal first determines whether the first interface name in the second name set is a newly added interface name. If the first interface name in the second name set is a newly added interface name, the first interface name in the second name set is determined as the interface name of the startup interface, and the process of determining the interface name of the startup interface is ended. The time complexity of the above process is only O(1), which greatly improves the efficiency of determining the interface name of the startup interface, and can further improve the startup efficiency of the sub-application.

[0225] Correspondingly, before the terminal determines the target interface name newly added to the second name set relative to the first name set, it also obtains the first interface name in the first name set, and obtains the first interface name in the second name set; the step of the terminal determining the target interface name newly added to the second name set relative to the first name set includes: in response to the first interface name in the first name set being different from the first interface name in the second name set, the terminal determines the first interface name in the second name set as the target interface name.

[0226] If the first interface name in the second name set is not a newly added interface name, the terminal continues to determine whether the second interface name in the second name set is a newly added interface name. If the second interface name in the second name set is a newly added interface name, the second interface name in the second name set is determined as the interface name of the startup interface, and the process of determining the interface name of the startup interface ends. Accordingly, the above-mentioned terminal obtains the first interface name in the first name set, and the step of obtaining the first interface name in the second name set includes: the terminal obtains the first interface name in the first name set and the second interface name in the first name set, and obtains the first interface name in the second name set; the step of the above-mentioned terminal determining the target interface name newly added to the second name set relative to the first name set also includes: the terminal obtains the second interface name in the second name set in response to the first interface name in the first name set being the same as the first interface name in the second name set; the terminal determines the second interface name in the second name set as the target interface name in response to the second interface name in the first name set being different from the second interface name in the second name set.

[0227] In the above process, only when the first interface name is not a newly added interface name, the second interface name in the second name set is obtained and compared with the second interface name in the first name set. Compared with obtaining the second interface name in the second name set without determining whether the first interface name is a newly added interface name, the step of obtaining the second interface name in unnecessary situations is reduced, which can further improve the efficiency of determining the interface name of the startup interface, and further improve the startup efficiency of the sub-application. In addition, if the second interface name in the second name set is a newly added interface name, the time complexity of the above process of determining the interface name of the startup interface is only O(1), which greatly improves the efficiency of determining the interface name of the startup interface, and further improves the startup efficiency of the sub-application.

[0228] In some embodiments, if the second interface name in the second name set is not a newly added interface name, the terminal continues to determine whether the last interface name in the second name set is a newly added interface name. If the last interface name in the second name set is a newly added interface name, the last interface name in the second name set is determined as the interface name of the startup interface to ensure the accuracy of determining the interface name of the startup interface. Accordingly, the terminal obtains the first interface name in the first name set and the second interface name in the first name set, and the step of obtaining the first interface name in the second name set includes: obtaining the first interface name in the first name set, the second interface name in the first name set, and the last interface name in the first name set, and obtaining the first interface name in the second name set; the step of the terminal determining the target interface name newly added to the second name set relative to the first name set also includes: the terminal obtains the last interface name in the second name set in response to the second interface name in the first name set being the same as the second interface name in the second name set; the terminal determines the last interface name in the second name set as the target interface name in response to the last interface name in the first name set being different from the last interface name in the second name set.

[0229] In the above process, only when the second interface name is not a newly added interface name, the last interface name in the second name set is obtained and compared with the last interface name in the first name set. Compared with obtaining the last interface name in the second name set when it is uncertain whether the first interface name or the second interface name is a newly added interface name, the step of obtaining the interface name in unnecessary situations is reduced, which can further improve the efficiency of determining the interface name of the startup interface, and further improve the startup efficiency of the sub-application. In addition, if the last interface name in the second name set is the newly added interface name, the time complexity of the above process of determining the interface name of the startup interface is only O(n), where n represents the number of interface names in the second name set, and n is an integer greater than 2. Compared with the method of comparing the interface names in the first name set and the second name set one by one, the efficiency of determining the interface name of the startup interface is greatly improved, which can further improve the startup efficiency of the sub-application.

[0230] It should be noted that, in some embodiments, the terminal may first obtain the first interface name, the second interface name, and the last interface name from the first name set when determining the interface name of the startup interface. In some embodiments, the terminal may also first obtain the first interface name from the first name set, and in response to the first interface name not being a newly added interface name, obtain the second interface name from the first name set; in response to the second interface name not being a newly added interface name, obtain the last interface name from the first name set. In the embodiments of the present disclosure, the timing of the terminal obtaining the first interface name, the second interface name, and the last interface name from the first name set is not limited.

[0231] In order to make the above process of determining the interface name of the startup interface clearer, the following Figure 6 and Figure 7 For example, before the terminal determines the interface name of the startup interface, it first obtains the first interface name, the second interface name, and the last interface name from the first name set. Figure 6 , after the first N-1 JS resources are rendered and before the last JS resource is rendered, the terminal traverses the interface names in the first name set; the terminal first obtains the first interface name and determines whether the first parameter is empty. The first parameter is used to represent the first interface name in the first name set; at this time, the first parameter is empty, and the terminal assigns the first interface name to the first parameter; the terminal then obtains the second interface name and determines whether the first parameter is empty; at this time, the first parameter is not empty, and the terminal determines whether the second parameter is empty. The second parameter is used to represent the second interface name in the first name set; at this time, the second parameter is empty, and the terminal assigns the second interface name to the second parameter; the terminal then Get the third interface name and determine whether the first parameter is empty; at this time, the first parameter is not empty; the terminal determines whether the second parameter is empty; at this time, the second parameter is not empty, and the terminal assigns the third interface name to the third parameter, and the third parameter is used to represent the last interface name in the first name set; if the traversal is not over, the terminal then gets the fourth interface name and determines whether the first parameter is empty; at this time, the first parameter is not empty; the terminal determines whether the second parameter is empty; at this time, the second parameter is not empty, and the terminal assigns the fourth interface name to the third parameter; if the traversal is not over, the terminal continues to execute steps similar to the above steps; if the traversal is over, the value finally assigned to the third parameter is the last interface name.

[0232] The above process of obtaining the first interface name, the second interface name and the last interface name from the first name set can also be expressed as the following steps: the terminal executes the step of "p in window" to traverse the interface names in the window object, where p represents the interface name and window represents the window object; the terminal executes the judgment step of "firstGlobalProp==null?", where firstGlobalProp (the first global property) represents the first parameter and null (empty) represents empty; if the judgment result is yes, the assignment step of "firstGlobalProp=p" is executed to assign the interface name represented by the current p to firstGlobalProp, and return the step of "p in window"; if the judgment result is no, the judgment step of "secondGlobalProp==null?" is executed, where secondGlobalProp (the second global property) represents the second parameter; if the judgment result is yes, the assignment step of "secondGlobalProp=p" is executed to assign the interface name represented by the current p to secondGlobalProp, and return "p in window". If the traversal is not over, the step of "lastGlobalProp=p" is executed, and the interface name represented by the current p is assigned to lastGlobalProp. If the traversal is not over, the step of "p in window" is continued, where lastGlobalProp (the last global property) represents the third parameter. If the traversal is not over, the assignment of lastGlobalProp is updated until the traversal is over, and the assignment of lastGlobalProp is the last interface name.

[0233] After the terminal obtains the first interface name, the second interface name, and the last interface name from the first name set, and after the last JS resource is loaded, the terminal determines the newly added interface name in the second name set. Figure 7, the terminal traverses the interface names in the second name set and records the number of traversals as the fourth parameter. The initial value of the fourth parameter is 0. When the fourth parameter is 0, the traversed interface name is the first interface name; the terminal determines whether the fourth parameter is 0 and whether the traversed first interface name is different from the first parameter; if the fourth parameter is 0 and the first interface name is different from the first parameter, the first interface name is returned and the first interface name is determined as the interface name of the startup interface; if the fourth parameter is not 0 or the first interface name is the same as the first parameter, the terminal continues to traverse the interface names in the second name set, and the traversed interface name is the second interface name. At this time, the fourth parameter is 1; the terminal determines whether the fourth parameter is 1 and whether the traversed second interface name is different from the second parameter; if the fourth parameter is 1 and the second interface name is different from the second parameter, the first interface name is returned. Two interface names, the second interface name is determined as the interface name of the startup interface; if the fourth parameter is not 1 or the second interface name is the same as the second parameter, the terminal continues to traverse the interface names in the second name set, and the traversed interface name is the third interface name; the value of the fourth parameter is increased by 1; the third interface name is assigned to the fifth parameter, and the fifth parameter is used to represent the last interface name in the second name set; if the traversal is not completed, the terminal returns to the step of traversing the interface names in the second name set, and continues to perform steps similar to the above steps until the traversal is completed, and the assignment of the fifth parameter is updated to the last interface name in the second name set; after the traversal is completed, the terminal determines whether the third parameter is different from the fifth parameter. If the third parameter is different from the fifth parameter, the fifth parameter is returned, and the last interface name is determined as the interface name of the startup interface. The traversed interface name is assigned to the fifth parameter.

[0234] The above process of determining the newly added interface name in the second name set can also be expressed as the following steps: the terminal executes the step of "cnt=0" to assign 0 to cnt, where cnt represents the fourth parameter; the terminal executes "pin window"; the terminal executes the judgment step of "cnt==0&&firstGlobalProp!=p?"; if the judgment result is yes, the first interface name represented by the current p is determined as the interface name of the startup interface; if the judgment result is no, the judgment step of "cnt==1&&secondGlobalProp!=p?" is executed; if the judgment result is yes, the second interface name represented by the current p is determined as the interface name of the startup interface; if the judgment result is no, the step of "cnt++" is executed to add 1 to the value of the fourth parameter; the step of "lastProp=p" is executed until the traversal ends, wherein lastProp (the last property) represents the fifth parameter; after the traversal ends, the value of lastProp is assigned to the last interface name in the second name set; the terminal executes the judgment step of "lastProp!=lastGlobalProp", and if the judgment result is yes, lastProp is returned, that is, the last interface name is determined as the interface name of the startup interface.

[0235] In some embodiments, the step of the above-mentioned terminal determining the target interface name newly added to the second name set relative to the first name set includes: the terminal obtains the first interface name, the second interface name and the last interface name from the first name set; the terminal obtains the first interface name, the second interface name and the last interface name from the second name set; the terminal compares the first interface name in the first name set and the first interface name in the second name set, the second interface name in the first name set and the second interface name in the second name set, and the last interface name in the first name set and the last interface name in the second name set; if the first interface name in the first name set and the first interface name in the second name set are different, the first interface name in the second name set is determined as the target interface name; if the second interface name in the first name set and the second interface name in the second name set are different, the second interface name in the second name set is determined as the target interface name; if the last interface name in the first name set and the last interface name in the second name set are different, the last interface name in the second name set is determined as the target interface name.

[0236] The above technical solution can determine the newly added interface name only by comparing the names at the first, second and last positions in the name set. Compared with comparing all the interface names in the name set one by one, it improves the efficiency of determining the target interface name and can further improve the startup efficiency of the sub-application.

[0237] In some embodiments, the step in which the terminal determines the target interface name newly added to the second name set relative to the first name set includes: the terminal compares each interface name in the first name set with each interface name in the second name set respectively; and determines an interface name in the second name set that is different from multiple interface names in the first name set as the target interface name.

[0238] 409. The terminal calls at least one loaded rendering resource and starts the sub-application by running the startup interface.

[0239] In some embodiments, the terminal responds to the page rendering instruction and executes step 401. The terminal then calls at least one loaded rendering resource by running a startup interface to start a sub-application. After the sub-application is started, the terminal renders a page corresponding to the URL corresponding to the page rendering instruction based on the running of the sub-application.

[0240] The technical solution provided by the embodiment of the present disclosure maintains the rendering resource path corresponding to the rendering resources of the sub-application through a resource table. The rendering resource path in the resource table can be used to load the rendering resources without parsing the relevant files, thereby realizing an efficient sub-application resource discovery mechanism and improving the efficiency of obtaining rendering resources. On this basis, the sub-application is started based on the loaded rendering resources, thereby improving the startup efficiency of the sub-application.

[0241] It should be noted that the above embodiments are all implemented on the premise that the terminal does not cache the resource table and rendering resources locally. In some embodiments, after the terminal obtains the resource table, it caches the resource table locally; the terminal loads the rendering resources into the cache for storage. If the page rendering instruction indicates to render the page of the sub-application, and the terminal has the rendering resources of the sub-application cached locally, the terminal obtains the rendering resources of the sub-application from the local cache, calls the rendering resources, and starts the sub-application; if the terminal does not cache the rendering resources of the sub-application locally, and the terminal has the resource table of the sub-application cached locally, the terminal obtains the resource table of the sub-application from the local cache, and based on the rendering resource path in the resource table, loads the rendering resources pointed to by the rendering resource path, calls the rendering resources, and starts the sub-application.

[0242] It should be noted that the server stores a resource table corresponding to the sub-application, which is uploaded to the server by the management terminal. Before uploading the resource table to the server, the management terminal also generates a resource table corresponding to the sub-application. The step of the management terminal generating a resource table corresponding to any sub-application includes: the management terminal obtains a rendering resource path corresponding to at least one rendering resource of the sub-application; based on the obtained at least one rendering resource path, generates a resource table corresponding to the sub-application.

[0243] In the process of developing a web application, a shell application and multiple sub-applications constitute a development project, and the framework resources of the shell application and the rendering resources of each sub-application are respectively in different paths of the development project. The step of the management terminal obtaining the rendering resource path corresponding to at least one rendering resource of the sub-application includes: after the development of the sub-application is completed, the management terminal obtains the path of each rendering resource of the sub-application under the development project; before each rendering resource under the path of the development project, the path allocated by the splicing server to the development project is obtained to obtain the rendering resource path of each rendering resource of the sub-application.

[0244] The arrangement order of the rendering resource paths of the rendering resources in the resource table will affect the loading order of the rendering resources. The terminal generates a resource table corresponding to the sub-application according to the loading order of each rendering resource, and the arrangement order of the rendering resource paths in the resource table is consistent with the loading order of the rendering resources. Among them, the arrangement order of the rendering resources including the startup interface is at the end of the resource table. In some embodiments, the arrangement order of the rendering resource paths of the JS resources is after the arrangement order of the rendering resource paths of the CSS resources.

[0245] In some embodiments, the data format of the generated resource table is JSON (JavaScript Object Notation, an object notation of a scripting language) format. JSON format is a lightweight data exchange format. The reading of the rendering resource path in the resource table in JSON format is more concise and efficient, which can further improve efficiency. In some embodiments, the management terminal packages the at least one rendering resource path obtained into a resource table in JSON format based on a webpack (network package) plug-in, wherein the webpack plug-in has the function of packaging resources into files in JSON format.

[0246] In some embodiments, the resource table also includes a version field, which is used to represent the version of the format of the resource table. If the format of the resource table changes, the version field is updated. For example, the resource table generated by the management terminal for a sub-application is as follows:

[0247] {“version”:1,

[0248] "CSS":[" / static / css / chunk-vendors.eb67df.css"," / static / css / app.67de0f.css"]

[0249] "JS":[" / static / js / chunk-vendors.7eb6ae.js"," / static / js / app.6cf80a.js"]}.

[0250] Among them, "version" is the version field, and "1" is the current version. "CSS" is the field of the path of the CSS resource, and " / static / css / chunk-vendors.eb67df.css" and " / static / css / app.67de0f.css" are the paths of different CSS resources. "JS" is the field of the path of the JS resource, and " / static / js / chunk-vendors.7eb6ae.js" and " / static / js / app.6cf80a.js" are the paths of different JS resources.

[0251] If the resource table has additional fields in addition to the "version", "CSS", and "JS" fields, the format of the resource table has changed and the version field is updated.

[0252] In order to make the process of sub-application loading under the micro-frontend architecture clearer, the following is combined Figure 8 For instructions, see Figure 8 The architecture of the micro front-end includes a sub-application and a shell application. After the sub-application is built on the management terminal, the management terminal generates a resource table corresponding to the sub-application through a resource table generation module; the sub-application and the resource table corresponding to the sub-application are published to the server of the production environment; the terminal executes the above steps 401 to 407 through the resource loading module to load the rendering resources of the sub-application; the above step 408 is executed through the entry sniffing module to determine the startup interface of the sub-application, and then the startup interface is run through step 409 to call the loaded rendering resources to start the sub-application, so as to render the page of the sub-application based on the operation of the sub-application.

[0253] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0254] Fig. 9 is a block diagram of a sub-application startup device according to an exemplary embodiment. Fig. 9 The device includes a first resource table loading unit 901, a rendering resource loading unit 902 and a sub-application starting unit 903.

[0255] The first resource table loading unit 901 is configured to execute, based on the resource table path corresponding to the sub-application, loading the resource table pointed to by the resource table path, wherein the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application;

[0256] The rendering resource loading unit 902 is configured to load the rendering resource pointed to by at least one rendering resource path based on at least one rendering resource path in the resource table;

[0257] The sub-application starting unit 903 is configured to execute calling of at least one loaded rendering resource to start the sub-application.

[0258] The technical solution provided by the embodiment of the present disclosure maintains the rendering resource path corresponding to the rendering resources of the sub-application through a resource table. The rendering resource path in the resource table can be used to load the rendering resources without parsing the relevant files, thereby realizing an efficient sub-application resource discovery mechanism and improving the efficiency of obtaining rendering resources. On this basis, the sub-application is started based on the loaded rendering resources, thereby improving the startup efficiency of the sub-application.

[0259] In some embodiments, the first resource table loading unit 901 is configured to execute:

[0260] Based on the resource table path, a resource table acquisition request is sent to the server, the resource table acquisition request carries the resource table path, and the resource table acquisition request is used to instruct the server to return the resource table pointed to by the resource table path;

[0261] Receive the resource list returned by the server.

[0262] In some embodiments, the first resource table loading unit 901 is further configured to execute:

[0263] In response to the page rendering instruction, obtaining a sub-application identifier from the URL corresponding to the page rendering instruction, where the sub-application identifier is used to identify the sub-application;

[0264] Based on the stored correspondence between the sub-application identifier and the resource table path, the resource table path corresponding to the sub-application identifier is obtained.

[0265] In some embodiments, the sub-application launching means further comprises:

[0266] A first resource path acquisition unit is configured to execute acquisition of a rendering resource path corresponding to at least one rendering resource of a sub-application;

[0267] The resource table generating unit is configured to generate a resource table corresponding to the sub-application based on the acquired at least one rendering resource path.

[0268] In some embodiments, the rendering resource loading unit 902 includes:

[0269] A resource path insertion sub-unit, configured to execute inserting at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs;

[0270] The rendering resource loading subunit is configured to execute loading of rendering resources pointed to by at least one rendering resource path by running the framework resources.

[0271] In some embodiments, the resource path insertion subunit is configured to perform:

[0272] For each first rendering resource path in the at least one rendering resource path, creating a link tag for the first rendering resource path in the frame resource, the first rendering resource path is a path of a cascading style sheet CSS resource, and the frame resource is a hypertext markup language HTML resource;

[0273] Insert the first render resource path into the link tag.

[0274] In some embodiments, the rendering resource loading subunit is configured to perform:

[0275] By running the framework resource, based on the first rendering resource path in each link tag, the CSS resource pointed to by the first rendering resource path in each link tag is loaded.

[0276] In some embodiments, the resource path insertion subunit is configured to perform:

[0277] For each second rendering resource path in the at least one rendering resource path, in the framework resource, create a script tag for the second rendering resource path, where the second rendering resource path is a path of a scripting language JS resource, and the framework resource is an HTML resource;

[0278] Insert the second render resource path into the script tag.

[0279] In some embodiments, the rendering resource loading subunit is configured to perform:

[0280] By running the framework resource, based on the second rendering resource path in each script tag, the JS resource pointed to by the second rendering resource path in each script tag is loaded.

[0281] In some embodiments, the rendering resource loading unit 902 is configured to execute:

[0282] In response to at least one rendering resource path including N second rendering resource paths arranged in order, after the JS resources pointed to by the first N-1 second rendering resource paths are loaded, the JS resource pointed to by the last second rendering resource path is loaded, N is an integer greater than 1, and the second rendering resource path is the path of the JS resource.

[0283] In some embodiments, the at least one rendering resource path includes multiple rendering resource paths, and the rendering resource loading unit 902 is configured to execute:

[0284] According to the arrangement order of multiple rendering resource paths in the resource table, the rendering resource pointed to by each rendering resource path is loaded in sequence.

[0285] In some embodiments, the rendering resource loading unit 902 is configured to execute:

[0286] Send a resource acquisition request to the server. The resource acquisition request carries a rendering resource path in the resource table. The resource acquisition request is used to instruct the server to return the rendering resource pointed to by the rendering resource path.

[0287] Receive the rendering resource returned by the server.

[0288] In some embodiments, a last rendering resource of the at least one rendering resource includes a launch interface;

[0289] The sub-application startup unit 903 includes:

[0290] A startup interface determination subunit, configured to determine a startup interface of a sub-application from the last loaded rendering resource;

[0291] The sub-application startup sub-unit is configured to execute by running a startup interface, calling at least one loaded rendering resource, and starting the sub-application.

[0292] In some embodiments, the at least one rendering resource path includes N second rendering resource paths, the second rendering resource path is a path of a JS resource, and N is an integer greater than 1;

[0293] The startup interface determines the subunit, including:

[0294] A first name set acquisition sub-sub-unit is configured to execute, in response to completion of loading of JS resources pointed to by first N-1 second rendering resource paths among the N second rendering resource paths, to acquire a first name set consisting of interface names of current global interfaces, where the global interface is an interface called in the global interface;

[0295] A second name set acquisition sub-sub-unit is configured to execute, in response to completion of loading of the JS resources pointed to by the N second rendering resource paths, acquiring a second name set consisting of interface names of the current global interface;

[0296] The interface name determination sub-subunit is configured to determine the target interface name newly added to the second name set relative to the first name set, and determine the interface corresponding to the target interface name in the last loaded JS resource as the startup interface.

[0297] In some embodiments, the sub-application launching means further comprises:

[0298] An interface name acquisition sub-subunit configured to execute acquisition of a first interface name in a first name set, and acquisition of a first interface name in a second name set;

[0299] The interface name identifies the sub-subunit that is configured to perform:

[0300] In response to a first interface name in the first name set being different from a first interface name in the second name set, the first interface name in the second name set is determined as the target interface name.

[0301] In some embodiments, the interface name acquisition sub-sub-unit is configured to perform:

[0302] Get the first interface name in the first name set and the second interface name in the first name set, and get the first interface name in the second name set;

[0303] The interface name identifies the sub-subunit and is also configured to perform:

[0304] In response to a first interface name in the first name set being the same as a first interface name in the second name set, obtaining a second interface name in the second name set;

[0305] In response to the second interface name in the first name set being different from the second interface name in the second name set, the second interface name in the second name set is determined as the target interface name.

[0306] In some embodiments, the interface name acquisition sub-sub-unit is configured to perform:

[0307] Get the first interface name in the first name set, the second interface name in the first name set, and the last interface name in the first name set, and get the first interface name in the second name set;

[0308] The interface name identifies the sub-subunit and is also configured to perform:

[0309] In response to the second interface name in the first name set being the same as the second interface name in the second name set, obtaining the last interface name in the second name set;

[0310] In response to a last interface name in the first name set being different from a last interface name in the second name set, the last interface name in the second name set is determined as the target interface name.

[0311] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0312] Fig.10 is a block diagram of a sub-application startup device according to an exemplary embodiment. Fig.10 The device includes a resource table path acquisition unit 1001, a second resource table acquisition unit 1002 and a resource table returning unit 1003.

[0313] The resource table path acquisition unit 1001 is configured to execute, in response to receiving a resource table acquisition request sent by a terminal, acquiring a resource table path carried in the resource table acquisition request;

[0314] The second resource table acquisition unit 1002 is configured to execute acquisition of the resource table pointed to by the resource table path;

[0315] The resource table returning unit 1003 is configured to execute returning the acquired resource table to the terminal, where the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application, and the rendering resource pointed to by the rendering resource path is used for the terminal to start the sub-application.

[0316] The technical solution provided by the embodiment of the present disclosure provides support for the terminal to load rendering resources more efficiently by using the rendering resource path in the resource table, and then the terminal starts the sub-application based on the loaded rendering resources, which can improve the startup efficiency of the sub-application.

[0317] In some embodiments, the sub-application launching means further comprises:

[0318] A resource table receiving unit is configured to receive resource tables corresponding to multiple sub-applications sent by a management terminal, and the management terminal is used to generate a resource table corresponding to each sub-application based on a rendering resource path corresponding to at least one rendering resource of each sub-application;

[0319] The resource table storage unit is configured to store the resource table corresponding to each sub-application under the resource table path corresponding to each sub-application.

[0320] In some embodiments, the sub-application launching means further comprises:

[0321] A second resource path acquisition unit is configured to execute, in response to receiving a resource acquisition request sent by a terminal, acquiring a rendering resource path carried in the resource acquisition request;

[0322] A rendering resource acquisition unit, configured to execute acquisition of the rendering resource pointed to by the rendering resource path;

[0323] The rendering resource returning unit is configured to return the acquired rendering resource to the terminal.

[0324] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0325] Fig.11 1 is a block diagram of a terminal according to an exemplary embodiment. The terminal 1100 may be a portable mobile terminal, such as a smart phone, a tablet computer, a notebook computer, or a desktop computer. The terminal 1100 may also be called a user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other names.

[0326] Typically, the terminal 1100 includes a processor 1101 and a memory 1102 .

[0327] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0328] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store at least one instruction, which is used to be executed by the processor 1101 to implement the sub-application startup method provided in the method embodiment of the present disclosure.

[0329] In some embodiments, the terminal 1100 may also optionally include: a peripheral device interface 1103 and at least one peripheral device. The processor 1101, the memory 1102 and the peripheral device interface 1103 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1103 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1104, a display screen 1105, a camera assembly 1106, an audio circuit 1107, a positioning assembly 1108 and a power supply 1109.

[0330] The peripheral device interface 1103 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102, and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102, and the peripheral device interface 1103 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0331] The radio frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1104 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1104 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1104 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.

[0332] The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to collect touch signals on the surface or above the surface of the display screen 1105. The touch signal can be input to the processor 1101 as a control signal for processing. At this time, the display screen 1105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1105 can be one, set on the front panel of the terminal 1100; in other embodiments, the display screen 1105 can be at least two, respectively set on different surfaces of the terminal 1100 or in a folding design; in other embodiments, the display screen 1105 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 1100. Even, the display screen 1105 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0333] The camera assembly 1106 is used to capture images or videos. Optionally, the camera assembly 1106 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0334] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1101 for processing, or input them into the radio frequency circuit 1104 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1100. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1107 may also include a headphone jack.

[0335] The positioning component 1108 is used to locate the current geographical location of the terminal 1100 to implement navigation or LBS (Location Based Service). The positioning component 1108 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system or Russia's Galileo system.

[0336] The power supply 1109 is used to power various components in the terminal 1100. The power supply 1109 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1109 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0337] In some embodiments, the terminal 1100 further includes one or more sensors 1110 , including but not limited to: an acceleration sensor 1111 , a gyroscope sensor 1112 , a pressure sensor 1113 , a fingerprint sensor 1114 , an optical sensor 1115 , and a proximity sensor 1116 .

[0338] Those skilled in the art will understand that Fig.11 The structure shown in the figure does not constitute a limitation on the terminal 1100, and the terminal 1100 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.

[0339] Fig.12 It is a block diagram of a server according to an exemplary embodiment. The server 1200 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1201 and one or more memories 1202, wherein the memory 1202 is used to store executable instructions, and the processor 1201 is configured to execute the above executable instructions to implement the sub-application startup method provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be repeated here.

[0340] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1202 including instructions, and the instructions can be executed by the processor 1201 of the server 1200 to complete the above-mentioned sub-application startup method. Optionally, the computer-readable storage medium can be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0341] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the sub-application startup method in each of the above method embodiments is implemented.

[0342] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the sub-application startup method in each of the above method embodiments is implemented.

[0343] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0344] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A sub-application startup method, characterized in that: The sub-application startup method includes: Based on the resource table path corresponding to the sub-application, the resource table pointed to by the resource table path is loaded, wherein the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application, the rendering resource includes a scripting language JS resource, and the JS resource includes at least one program code for indicating the interaction logic of the page of the sub-application; Based on at least one rendering resource path in the resource table, sequentially load the rendering resources pointed to by the at least one rendering resource path; the at least one rendering resource path includes N second rendering resource paths arranged in sequence, the second rendering resource path is a path of a JS resource, N is an integer greater than 1, and the last JS resource pointed to by the second rendering resource path includes a startup interface of the sub-application; In response to the completion of loading of the JS resources pointed to by the first N-1 second rendering resource paths among the N second rendering resource paths, obtaining a first name set consisting of interface names of the current global interface, where the global interface is an interface called in the global interface; In response to the JS resources pointed to by the N second rendering resource paths being loaded, obtaining a second name set consisting of interface names of the current global interface; Determine a target interface name newly added to the second name set relative to the first name set, and determine the interface corresponding to the target interface name in the last loaded JS resource as the startup interface of the sub-application; The sub-application is started by running the startup interface and calling the at least one loaded rendering resource.

2. The sub-application startup method according to claim 1, characterized in that: The loading of the resource table pointed to by the resource table path based on the resource table path corresponding to the sub-application includes: Based on the resource table path, sending a resource table acquisition request to the server, the resource table acquisition request carries the resource table path, and the resource table acquisition request is used to instruct the server to return the resource table pointed to by the resource table path; Receive the resource list returned by the server.

3. The sub-application startup method according to claim 2, characterized in that: Before loading the resource table pointed to by the resource table path based on the resource table path corresponding to the sub-application, the sub-application startup method further includes: In response to a page rendering instruction, obtaining a sub-application identifier from a URL corresponding to the page rendering instruction, wherein the sub-application identifier is used to identify the sub-application; Based on the stored correspondence between the sub-application identifier and the resource table path, the resource table path corresponding to the sub-application identifier is obtained.

4. The sub-application startup method according to claim 1, characterized in that: Before loading the resource table pointed to by the resource table path based on the resource table path corresponding to the sub-application, the sub-application startup method further includes: Obtaining a rendering resource path corresponding to at least one rendering resource of the sub-application; Based on the acquired at least one rendering resource path, a resource table corresponding to the sub-application is generated.

5. The sub-application startup method according to claim 1, characterized in that: The loading, based on at least one rendering resource path in the resource table, a rendering resource pointed to by the at least one rendering resource path, comprises: Inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs; By running the framework resource, the rendering resource pointed to by the at least one rendering resource path is loaded.

6. The sub-application startup method according to claim 5, characterized in that: The inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs includes: For each first rendering resource path in the at least one rendering resource path, creating a link tag for the first rendering resource path in the framework resource, the first rendering resource path is a path of a cascading style sheet CSS resource, and the framework resource is a hypertext markup language HTML resource; Insert the first rendering resource path into the link tag.

7. The sub-application startup method according to claim 6, characterized in that: The step of loading the rendering resource pointed to by the at least one rendering resource path by running the framework resource includes: By running the framework resource, based on the first rendering resource path in each link tag, the CSS resource pointed to by the first rendering resource path in each link tag is loaded.

8. The sub-application startup method according to claim 5, characterized in that: The inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs includes: For each second rendering resource path in the at least one rendering resource path, creating a script tag for the second rendering resource path in the framework resource, where the second rendering resource path is a path of a scripting language JS resource, and the framework resource is an HTML resource; Insert the second rendering resource path into the script tag.

9. The sub-application startup method according to claim 8, characterized in that: The step of loading the rendering resource pointed to by the at least one rendering resource path by running the framework resource includes: By running the framework resource, based on the second rendering resource path in each script tag, the JS resource pointed to by the second rendering resource path in each script tag is loaded.

10. The sub-application startup method according to claim 1, characterized in that: The at least one rendering resource path includes a plurality of rendering resource paths, and loading the rendering resource pointed to by the at least one rendering resource path based on the at least one rendering resource path in the resource table includes: According to the arrangement order of the multiple rendering resource paths in the resource table, the rendering resources pointed to by each rendering resource path are loaded in sequence.

11. The sub-application startup method according to claim 1, characterized in that: The loading, based on at least one rendering resource path in the resource table, a rendering resource pointed to by the at least one rendering resource path, comprises: Sending a resource acquisition request to the server, wherein the resource acquisition request carries a rendering resource path in the resource table, and the resource acquisition request is used to instruct the server to return the rendering resource pointed to by the rendering resource path; Receive the rendering resource returned by the server.

12. The sub-application startup method according to claim 1, characterized in that: Before determining the target interface name newly added to the second name set relative to the first name set, the sub-application startup method further includes: Obtaining the first interface name in the first name set, and obtaining the first interface name in the second name set; The determining of a target interface name newly added to the second name set relative to the first name set includes: In response to a first interface name in the first name set being different from a first interface name in the second name set, the first interface name in the second name set is determined as the target interface name.

13. The sub-application startup method according to claim 12, characterized in that: The obtaining of the first interface name in the first name set and the obtaining of the first interface name in the second name set include: Obtaining a first interface name in the first name set and a second interface name in the first name set, and obtaining a first interface name in the second name set; The step of determining a target interface name newly added to the second name set relative to the first name set further includes: In response to the first interface name in the first name set being the same as the first interface name in the second name set, obtaining the second interface name in the second name set; In response to the second interface name in the first name set being different from the second interface name in the second name set, the second interface name in the second name set is determined as the target interface name.

14. The sub-application startup method according to claim 13, characterized in that: The obtaining of the first interface name in the first name set and the second interface name in the first name set, and obtaining of the first interface name in the second name set, comprises: Obtaining a first interface name in the first name set, a second interface name in the first name set, and a last interface name in the first name set, and obtaining a first interface name in the second name set; The step of determining a target interface name newly added to the second name set relative to the first name set further includes: In response to the second interface name in the first name set being the same as the second interface name in the second name set, obtaining the last interface name in the second name set; In response to the last interface name in the first name set being different from the last interface name in the second name set, the last interface name in the second name set is determined as the target interface name.

15. A sub-application startup method, characterized in that: The sub-application startup method includes: In response to receiving a resource table acquisition request sent by a terminal, acquiring a resource table path carried in the resource table acquisition request; Obtain the resource table pointed to by the resource table path; Returning the acquired resource table to the terminal, the resource table including a rendering resource path corresponding to the rendering resource of the sub-application, the rendering resource pointed to by the rendering resource path is used by the terminal to start the sub-application; the rendering resource includes a scripting language JS resource, and the JS resource includes at least one program code for indicating the interactive logic of the page of the sub-application; The terminal is used to sequentially load the rendering resources pointed to by the at least one rendering resource based on the at least one rendering resource path in the resource table, wherein the at least one rendering resource path includes N second rendering resource paths arranged in sequence, the second rendering resource path is a path of a JS resource, N is an integer greater than 1, and the JS resource pointed to by the last second rendering resource path includes a startup interface of the sub-application; in response to the completion of loading of the JS resources pointed to by the first N-1 second rendering resource paths among the N second rendering resource paths, a first name set consisting of interface names of the current global interface is obtained, wherein the global interface is an interface called in the global interface; in response to the completion of loading of the JS resources pointed to by the N second rendering resource paths, a second name set consisting of interface names of the current global interface is obtained; a target interface name newly added to the second name set relative to the first name set is determined, and an interface corresponding to the target interface name in the last loaded JS resource is determined as the startup interface of the sub-application; and the sub-application is started by calling the loaded at least one rendering resource by running the startup interface.

16. The sub-application startup method according to claim 15, characterized in that: Before obtaining the resource table pointed to by the resource table path, the sub-application startup method further includes: Receiving resource tables corresponding to multiple sub-applications sent by a management terminal, the management terminal is used to generate a resource table corresponding to each sub-application based on a rendering resource path corresponding to at least one rendering resource of each sub-application; The resource table corresponding to each sub-application is stored under the resource table path corresponding to each sub-application.

17. The sub-application startup method according to claim 15, characterized in that: After returning the acquired resource table to the terminal, the sub-application startup method further includes: In response to receiving a resource acquisition request sent by the terminal, acquiring a rendering resource path carried in the resource acquisition request; Obtain the rendering resource pointed to by the rendering resource path; The acquired rendering resource is returned to the terminal.

18. A sub-application startup device, characterized in that: The sub-application starting device comprises: A first resource table loading unit is configured to execute, based on a resource table path corresponding to a sub-application, loading a resource table pointed to by the resource table path, wherein the resource table includes a rendering resource path corresponding to a rendering resource of the sub-application, the rendering resource includes a scripting language JS resource, and the JS resource includes at least one program code for indicating an interactive logic of a page of the sub-application; A rendering resource loading unit is configured to execute, based on at least one rendering resource path in the resource table, sequentially loading rendering resources pointed to by the at least one rendering resource path; the at least one rendering resource path includes N second rendering resource paths arranged in sequence, the second rendering resource path is a path of a JS resource, the N is an integer greater than 1, and the last JS resource pointed to by the second rendering resource path includes a startup interface of the sub-application; The sub-application startup unit includes a startup interface determination sub-unit and a sub-application startup sub-unit; the startup interface determination sub-unit includes: a first name set acquisition sub-sub-unit, a second name set acquisition sub-sub-unit and an interface name determination sub-sub-unit; The first name set acquisition sub-sub-unit is configured to execute, in response to the completion of loading of the JS resources pointed to by the first N-1 second rendering resource paths among the N second rendering resource paths, acquiring a first name set consisting of interface names of the current global interface, wherein the global interface is an interface called in the global interface; The second name set acquisition sub-sub-unit is configured to execute, in response to completion of loading of the JS resources pointed to by the N second rendering resource paths, acquiring a second name set consisting of interface names of the current global interface; The interface name determination sub-sub-unit is configured to determine a target interface name newly added to the second name set relative to the first name set, and determine the interface corresponding to the target interface name in the last loaded JS resource as the startup interface of the sub-application; The sub-application starting sub-unit is configured to execute the calling of the at least one loaded rendering resource by running the starting interface to start the sub-application.

19. The sub-application startup device according to claim 18, characterized in that: The first resource table loading unit is configured to execute: Based on the resource table path, sending a resource table acquisition request to the server, the resource table acquisition request carries the resource table path, and the resource table acquisition request is used to instruct the server to return the resource table pointed to by the resource table path; Receive the resource list returned by the server.

20. The sub-application startup device according to claim 19, characterized in that: The first resource table loading unit is further configured to execute: In response to a page rendering instruction, obtaining a sub-application identifier from a URL corresponding to the page rendering instruction, wherein the sub-application identifier is used to identify the sub-application; Based on the stored correspondence between the sub-application identifier and the resource table path, the resource table path corresponding to the sub-application identifier is obtained.

21. The sub-application startup device according to claim 18, characterized in that: The sub-application starting device also includes: A first resource path acquisition unit is configured to execute acquisition of a rendering resource path corresponding to at least one rendering resource of the sub-application; The resource table generating unit is configured to generate a resource table corresponding to the sub-application based on the acquired at least one rendering resource path.

22. The sub-application startup device according to claim 18, characterized in that: The rendering resource loading unit includes: A resource path insertion sub-unit, configured to execute inserting the at least one rendering resource path into the framework resources of the shell application to which the sub-application belongs; The rendering resource loading subunit is configured to load the rendering resource pointed to by the at least one rendering resource path by running the framework resource.

23. The sub-application startup device according to claim 22, characterized in that: The resource path insertion subunit is configured to perform: For each first rendering resource path in the at least one rendering resource path, creating a link tag for the first rendering resource path in the framework resource, the first rendering resource path is a path of a cascading style sheet CSS resource, and the framework resource is a hypertext markup language HTML resource; Insert the first rendering resource path into the link tag.

24. The sub-application startup device according to claim 23, characterized in that: The rendering resource loading subunit is configured to execute: By running the framework resource, based on the first rendering resource path in each link tag, the CSS resource pointed to by the first rendering resource path in each link tag is loaded.

25. The sub-application startup device according to claim 22, characterized in that: The resource path insertion subunit is configured to perform: For each second rendering resource path in the at least one rendering resource path, creating a script tag for the second rendering resource path in the framework resource, where the second rendering resource path is a path of a scripting language JS resource, and the framework resource is an HTML resource; Insert the second rendering resource path into the script tag.

26. The sub-application startup device according to claim 25, characterized in that: The rendering resource loading subunit is configured to execute: By running the framework resource, based on the second rendering resource path in each script tag, the JS resource pointed to by the second rendering resource path in each script tag is loaded.

27. The sub-application startup device according to claim 18, characterized in that: The at least one rendering resource path includes a plurality of rendering resource paths, and the rendering resource loading unit is configured to execute: According to the arrangement order of the multiple rendering resource paths in the resource table, the rendering resources pointed to by each rendering resource path are loaded in sequence.

28. The sub-application startup device according to claim 18, characterized in that: The rendering resource loading unit is configured to execute: Sending a resource acquisition request to the server, wherein the resource acquisition request carries a rendering resource path in the resource table, and the resource acquisition request is used to instruct the server to return the rendering resource pointed to by the rendering resource path; Receive the rendering resource returned by the server.

29. The sub-application startup device according to claim 18, characterized in that: The sub-application starting device also includes: an interface name acquisition sub-subunit, configured to execute acquisition of a first interface name in the first name set, and acquisition of a first interface name in the second name set; The interface name determines the sub-subunit that is configured to perform: In response to a first interface name in the first name set being different from a first interface name in the second name set, the first interface name in the second name set is determined as the target interface name.

30. The sub-application startup device according to claim 29, characterized in that: The Interface Name Acquisition sub-sub-unit is configured to perform: Obtaining a first interface name in the first name set and a second interface name in the first name set, and obtaining a first interface name in the second name set; The interface name determines the sub-subunit, which is also configured to perform: In response to the first interface name in the first name set being the same as the first interface name in the second name set, obtaining the second interface name in the second name set; In response to the second interface name in the first name set being different from the second interface name in the second name set, the second interface name in the second name set is determined as the target interface name.

31. The sub-application startup device according to claim 30, characterized in that: The Interface Name Acquisition sub-sub-unit is configured to perform: Obtaining a first interface name in the first name set, a second interface name in the first name set, and a last interface name in the first name set, and obtaining a first interface name in the second name set; The interface name determines the sub-subunit, which is also configured to perform: In response to the second interface name in the first name set being the same as the second interface name in the second name set, obtaining the last interface name in the second name set; In response to the last interface name in the first name set being different from the last interface name in the second name set, the last interface name in the second name set is determined as the target interface name.

32. A sub-application startup device, characterized in that: The sub-application starting device comprises: A resource table path acquisition unit, configured to execute, in response to receiving a resource table acquisition request sent by a terminal, acquiring a resource table path carried in the resource table acquisition request; A second resource table acquisition unit is configured to execute acquisition of the resource table pointed to by the resource table path; A resource table returning unit is configured to execute and return the acquired resource table to the terminal, wherein the resource table includes a rendering resource path corresponding to the rendering resource of the sub-application, and the rendering resource pointed to by the rendering resource path is used by the terminal to start the sub-application; the rendering resource includes a scripting language JS resource, and the JS resource includes at least one program code for indicating the interactive logic of the page of the sub-application; wherein the terminal is used to sequentially load the rendering resource pointed to by the at least one rendering resource based on the at least one rendering resource path in the resource table, and the at least one rendering resource path includes N second rendering resource paths arranged in order, and the second rendering resource path is a path of the JS resource, and N is an integer greater than 1, and the last second rendering resource path points to The JS resources include the startup interface of the sub-application; in response to the completion of loading of the JS resources pointed to by the first N-1 second rendering resource paths among the N second rendering resource paths, a first name set consisting of the interface names of the current global interface is obtained, and the global interface is an interface called globally; in response to the completion of loading of the JS resources pointed to by the N second rendering resource paths, a second name set consisting of the interface names of the current global interface is obtained; the target interface name newly added to the second name set relative to the first name set is determined, and the interface corresponding to the target interface name in the last JS resource loaded is determined as the startup interface of the sub-application; by running the startup interface, the at least one loaded rendering resource is called to start the sub-application.

33. The sub-application startup device according to claim 32, characterized in that: The sub-application starting device also includes: A resource table receiving unit is configured to receive resource tables corresponding to multiple sub-applications sent by a management terminal, wherein the management terminal is used to generate a resource table corresponding to each sub-application based on a rendering resource path corresponding to at least one rendering resource of each sub-application; The resource table storage unit is configured to store the resource table corresponding to each sub-application under the resource table path corresponding to each sub-application.

34. The sub-application startup device according to claim 33, characterized in that: The sub-application starting device also includes: A second resource path acquisition unit is configured to execute, in response to receiving a resource acquisition request sent by the terminal, acquiring a rendering resource path carried in the resource acquisition request; A rendering resource acquisition unit, configured to execute acquisition of the rendering resource pointed to by the rendering resource path; The rendering resource returning unit is configured to return the acquired rendering resource to the terminal.

35. A terminal, characterized in that: The terminal comprises: one or more processors; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the sub-application startup method as described in any one of claims 1 to 14.

36. A server, characterized in that: The server comprises: one or more processors; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the sub-application startup method as described in any one of claims 15 to 17.

37. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a terminal, the terminal is enabled to execute the sub-application startup method according to any one of claims 1 to 14.

38. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of the server, the server is enabled to execute the sub-application startup method as described in any one of claims 15 to 17.

39. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the sub-application startup method according to any one of claims 1 to 14 is implemented.

40. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the sub-application startup method described in any one of claims 15 to 17 is implemented.