Parent and child application integration method and device, electronic equipment and storage medium

By adopting a dual-loading engine structure and an event bus mechanism, the complex configuration and data transmission issues in the integration process of parent and child applications are resolved, resulting in a simplified integration process and efficient data management, which reduces the difficulty of technology implementation and maintenance costs.

CN121833073APending Publication Date: 2026-04-10SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN COMTOP INFORMATION TECH
Filing Date
2025-12-05
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, the integration and configuration of parent and child applications is complex and the process is cumbersome. The lack of a unified protocol and management for event data transmission leads to high integration difficulty and complex maintenance.

Method used

It adopts a dual-loading engine structure and event bus mechanism, integrates sub-applications into parent applications through business declarative configuration information, and uses the singleton pattern for cross-application data transmission, thereby simplifying configuration and unifying management.

Benefits of technology

It significantly simplifies the integration process between parent and child applications, lowers the technical implementation threshold and long-term maintenance costs, and improves integration efficiency and data transmission consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833073A_ABST
    Figure CN121833073A_ABST
Patent Text Reader

Abstract

The invention discloses a father and son application integration method and device, electronic equipment and a storage medium. The method comprises the following steps: determining service declarative configuration information required for starting a sub-application; adopting a double-loading engine structure, integrating a child application into a parent application according to the service declaration type configuration information, and starting the child application; and performing cross-application data transmission by adopting an event bus mechanism according to a singleton mode between the double loading engine structures. By adopting the technical scheme of the embodiment of the invention, father-son application integration and child application starting are completed in an extremely simple declarative configuration mode through the service declarative configuration information and a double-loading engine structure, the integration process is greatly simplified, and the technical landing threshold and long-term maintenance cost of complex father-son application integration are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology, and in particular to a method, apparatus, electronic device, and storage medium for integrating parent and child applications. Background Technology

[0002] As enterprises accelerate their digital transformation, web applications are exhibiting a complex form of multi-team collaborative development and the coexistence of multiple technology stacks. The needs for enterprise-level project integration have evolved from simple system deployment to complex requirements such as cross-technology stack, application environment isolation, and performance improvement, making the need for cross-technology framework integration and improved development efficiency increasingly urgent.

[0003] In early internet projects, sub-application loading often relied on iframe nesting, which was simple to implement. With the diversification of front-end technology stacks, the need for cross-frame integration spurred the evolution of micro-frontend architectures. From route hijacking solutions to application sandbox mechanisms, the technical approach gradually focused on balancing runtime isolation and resource sharing, solving the problem of heterogeneous framework coexistence.

[0004] Existing technical solutions still suffer from complex configuration for parent-child application integration and cumbersome event communication mechanisms. Specifically, the configuration of the iframe solution is scattered across tag attributes and communication logic, lacking a unified configuration standard; while the micro-frontend solution provides configuration APIs, there are syntactic differences between different frameworks. After parent-child application integration, data communication is required to unify the overall data flow of the system and achieve complex cross-application data transfer functions. The traditional iframe solution's postMessage method has strict cross-domain restrictions and requires manual data serialization / deserialization, while the micro-frontend solution has inconsistent communication APIs across different frameworks. Both suffer from a lack of standardization and high debugging complexity. Summary of the Invention

[0005] This invention provides a method, apparatus, electronic device, and storage medium for integrating parent and child applications, in order to solve the problems of cumbersome and complex configuration, excessively long and error-prone steps, and lack of unified protocol and management for event data transmission during the integration process of parent and child applications.

[0006] According to one aspect of the present invention, a parent-child application integration method is provided, the method comprising:

[0007] Determine the business declarative configuration information required for sub-application startup;

[0008] A dual-loading engine structure is adopted, which integrates the sub-application into the parent application based on the business declarative configuration information and performs startup processing on the sub-application;

[0009] Based on the singleton pattern between the dual-loading engine architecture, an event bus mechanism is used for cross-application data transmission.

[0010] According to another aspect of the present invention, a parent-child application integration device is provided, the device comprising:

[0011] The declarative configuration information determination module is used to determine the business declarative configuration information required for the sub-application to start;

[0012] The dual-loading engine structure application module is used to integrate sub-applications into the parent application and start the sub-applications based on the business declarative configuration information using a dual-loading engine structure.

[0013] The cross-application data transfer module is used to perform cross-application data transfer based on the singleton pattern between the dual loading engine structures and using an event bus mechanism.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the parent-child application integration method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the parent-child application integration method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the parent-child application integration method as described in any embodiment of the present invention.

[0020] The technical solution of this invention determines the business declarative configuration information required for the startup of a sub-application; adopts a dual-loading engine structure, integrates the sub-application into the parent application based on the business declarative configuration information, and performs startup processing on the sub-application; and uses an event bus mechanism for cross-application data transmission based on the singleton pattern between the dual-loading engine structures. This solves the problems of cumbersome and complex configuration, lengthy and error-prone steps, and lack of a unified protocol and management for event data transmission during parent-child application integration. It achieves the beneficial effect of completing the integration of parent and child applications and the startup of sub-applications with a minimalist declarative configuration mode, significantly simplifying the integration process and effectively reducing the technical implementation threshold and long-term maintenance costs of complex parent-child application integration.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of a parent-child application integration method provided in Embodiment 1 of the present invention;

[0024] Figure 2 This is a flowchart of a parent-child application integration method provided in Embodiment 2 of the present invention;

[0025] Figure 3 This is a schematic diagram of the core design of a parent-child application integration method provided in Embodiment 2 of the present invention;

[0026] Figure 4 This is a schematic diagram of a native tag configuration provided in Embodiment 2 of the present invention;

[0027] Figure 5 This is a schematic diagram of a cross-domain mechanism for judgment provided in Embodiment 2 of the present invention;

[0028] Figure 6 This is a schematic diagram of a loader singleton initialization according to Embodiment 2 of the present invention;

[0029] Figure 7 This is a schematic diagram of the overall data flow of a loader loading engine according to Embodiment 2 of the present invention;

[0030] Figure 8 This is a schematic diagram of a sub-application startup data stream provided according to Embodiment 2 of the present invention;

[0031] Figure 9 This is a schematic diagram of event code for a parent application subscribing to a child application's publication, provided in Embodiment 2 of the present invention;

[0032] Figure 10 This is a schematic diagram of a child application transmitting message code to a parent application according to Embodiment 2 of the present invention;

[0033] Figure 11 This is a schematic diagram of a launcher publishing event code provided in Embodiment 2 of the present invention;

[0034] Figure 12 This is a schematic diagram of a sub-application subscription event code provided according to Embodiment 2 of the present invention;

[0035] Figure 13 This is a schematic diagram of the structure of a parent-child application integration device provided in Embodiment 3 of the present invention;

[0036] Figure 14 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

[0037] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0038] The acquisition, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. It should be noted that the terms "first," "second," "target," and "original," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising," "etc.," and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0039] Example 1

[0040] Figure 1 This is a flowchart illustrating a parent-child application integration method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where a child application is integrated into a parent application through a simplified configuration method. This method can be executed by a parent-child application integration device, which can be implemented in hardware and / or software. This device can be configured in any electronic device with network communication capabilities. Figure 1 As shown, the method includes:

[0041] S110. Determine the business declarative configuration information required for the sub-application to start.

[0042] In this micro-frontend architecture, the parent application and child applications are the core roles. The parent application acts as a container and coordinator, responsible for the overall page layout, user authentication, menu navigation, and route distribution; child applications are independent units of business functions, such as order systems and user centers, which can be independently developed, tested, and deployed by different teams using different technology stacks. When a user accesses a specific route, the parent application dynamically loads and renders the corresponding child application, thereby achieving decoupling and efficient collaboration in large and complex applications.

[0043] In existing technologies, sub-application loading and startup often rely on iframe nesting or micro-frontend solutions. However, these solutions require manually writing over 80% of the loading logic code, significantly increasing the cost of parent-child application integration and sub-application loading and startup. Therefore, this invention provides a parent-child application integration method that obtains the business declarative configuration information required for sub-application startup and uses this information to complete the sub-application loading and startup, greatly simplifying the integration process.

[0044] Declarative configuration is a system configuration method that manages the system by describing the "desired state" rather than writing "specific execution steps." In this embodiment of the invention, the business declarative configuration information can refer to abstracting the complex parent-child application integration problem into a set of standard HTML attribute configuration information, allowing business developers to quickly complete the access and startup of sub-applications without delving into the underlying mechanisms. Optionally, the business declarative configuration information includes, but is not limited to, launcher address, sub-application address, sub-application name, data to be acquired by the sub-application, sub-application startup icon, and sub-application event listening information.

[0045] S120. A dual-loading engine structure is adopted, and the sub-application is integrated into the parent application according to the business declarative configuration information and the sub-application is started.

[0046] The dual-loading engine structure includes a loader loading engine and a launcher loading engine. The launcher loading engine is a core execution unit within the launcher, specifically responsible for implementing key capabilities such as collecting business declarative configuration information, cross-domain judgment, and loader initialization. The loader loading engine is the central control center for the entire sub-application loading process, responsible for receiving the business declarative configuration information obtained by the launcher loading engine and dynamically loading sub-application resources and preparing the runtime environment based on this information.

[0047] This invention employs a dual-loading-engine architecture. A launcher loading engine dynamically introduces and initializes the loader to integrate sub-applications into the parent application. The loader loading engine dynamically loads sub-application resources and prepares the runtime environment for startup. This dual-loading-engine structure adapts to all scenarios, from simple page combinations to complex business system integration, effectively reducing the technical barriers to implementation and long-term maintenance costs of complex parent-child application integration.

[0048] S130. Based on the singleton pattern between the dual loading engine structures, an event bus mechanism is used for cross-application data transmission.

[0049] In this context, the singleton pattern can refer to the existence of only one instance between the loader loading engine and the launcher loading engine, in order to complete cross-application data transfer between the child application and the parent application.

[0050] The event bus mechanism is a centralized communication mechanism based on the publish-subscribe pattern, which allows different components or modules in a system to exchange messages loosely without directly depending on each other. In this embodiment of the invention, it refers to a centralized communication mechanism based on the publish-subscribe pattern implemented between a child application and a parent application through a single instance.

[0051] This invention provides a method for integrating parent and child applications. It determines the business declarative configuration information required for the child application to start; employs a dual-loading engine structure, integrates the child application into the parent application based on the business declarative configuration information, and performs startup processing on the child application; and utilizes an event bus mechanism for cross-application data transmission based on the singleton pattern between the dual-loading engine structures. This invention, through business declarative configuration information and a dual-loading engine structure, completes the integration of parent and child applications and the startup of the child application using a minimalist declarative configuration mode, significantly simplifying the integration process and effectively reducing the technical implementation threshold and long-term maintenance costs of complex parent-child application integration.

[0052] Example 2

[0053] Figure 2 This is a flowchart of a parent-child application integration method provided in Embodiment 2 of the present invention. This embodiment further optimizes the aforementioned embodiments, and can be combined with various optional solutions from one or more of the above embodiments. For example... Figure 2 As shown, the method includes:

[0054] S210. Determine the business declarative configuration information required for the sub-application to start.

[0055] Among them, see Figure 3 Determine the business declarative configuration information required for the sub-application to start, and then perform business declarative configuration.

[0056] S220: The launcher loading engine obtains the business declarative configuration information, initializes the loader according to the business declarative configuration information, and integrates the sub-application into the parent application.

[0057] The dual-loading engine structure includes a loader loading engine and a launcher loading engine. The launcher loading engine is responsible for collecting business declarative configuration information, storing the business declarative configuration information according to type, so that it can be used as a parameter required for the execution of the loader in the next step, and finally initializing the loader according to the business declarative configuration information.

[0058] As an optional but non-limiting implementation, the launcher loading engine obtains business declarative configuration information, initializes the loader based on the business declarative configuration information, and integrates the sub-application into the parent application, including but not limited to steps A1-A3:

[0059] Step A1: The launcher loading engine obtains the business declarative configuration information and performs native tag configuration on the target page based on the configuration information to introduce the launcher and launcher configuration parameters.

[0060] In this context, the target page refers to the sub-application integration page, which in this embodiment refers to an HTML page. Business developers can configure native script tags on the HTML page where the sub-application is to be integrated to introduce the launcher and configuration parameters. The key configuration fields are explained in Table 1.

[0061] Table 1 Explanation of Key Fields in Business Declarative Configuration Information

[0062]

[0063] The `<script>` tag is a core element in HTML used to embed or reference client-side scripts. It determines the script's loading, execution timing, and relationship to page rendering. The native `<script>` tag configuration is as follows: Figure 4 As shown, you can configure the business declarative configuration information required for the sub-application to start on the script tag.

[0064] Step A2: During the parent-child application integration process, determine whether the parent application and the child application are in the same domain in order to determine the execution environment of the loader.

[0065] When integrating parent and child applications, it's necessary to consider the actual scenario where the parent and child applications are from different domains. If the parent and child applications are from the same domain, the loader executes in the parent application's browser environment. If the parent and child applications are from different domains, the loader is degraded to execute in the child application's browser environment. Specifically, whether a cross-domain issue occurs is determined by checking if accessing the `window.top` property results in an error.

[0066] As an optional but non-limiting implementation, the process of integrating parent and child applications involves determining whether the parent and child applications are in the same domain to determine the execution environment of the loader, including but not limited to steps B1-B3:

[0067] Step B1: During the integration of parent and child applications, determine whether the parent and child applications are on the same domain by checking whether the key attributes referenced by the top-level window of the browser report an error.

[0068] Step B2: If no error is reported when accessing a critical property referenced by the top-level window of the browser, it is determined that the parent application and the child application are in the same domain, and the loader is executed in the browser environment of the parent application.

[0069] Step B3: If an error occurs when accessing a critical attribute referenced by the top-level window of the browser, it is determined that the parent application and the child application are cross-domain, and the loader will then execute in the browser environment of the child application.

[0070] Among them, see Figure 5 During the integration of parent and child applications, the system determines whether the parent and child applications are in the same domain by checking for errors in accessing key properties referenced by the top-level browser window. Accessing the `window.top` property may result in an error. If an error occurs, it's determined that the parent and child applications are in a cross-domain relationship, and the loader executes in the child application's browser environment. If no error occurs, it's determined that the parent and child applications are in the same domain, and the loader executes in the parent application's browser environment. Optionally, if the parent and child applications are in the same domain, the child application will fill the entire parent application page; if they are in a cross-domain relationship, the child application will be displayed only within a portion of the parent application page.

[0071] Step A3: The launcher imports loader resources via dynamic scripts, initializes the loader after the launcher resources are loaded, and integrates the child application into the parent application; the loader always maintains a singleton pattern during initialization.

[0072] After collecting business declarative configuration information and performing cross-domain checks, the launcher imports loader resources via a dynamic script. This step requires no business implementation and is encapsulated within the launcher's internal logic. After the launcher resources are loaded, the loader is initialized. To maintain a single global resource context, the loader initialization always adheres to a singleton pattern. See [link to relevant documentation]. Figure 6 After completing the collection of business declarative configuration information and cross-domain judgment, it determines whether the loader resource has been successfully introduced through dynamic script. If the loader resource has been successfully introduced through dynamic script and the loader instance exists, the loader configuration is updated and the loader initialization is completed to integrate the sub-application into the parent application.

[0073] Compared to the cumbersome configuration of traditional iframe and micro-frontend parent-child application integration, this invention only requires configuring business information on the browser's natively supported script tags to seamlessly integrate the child application into the parent application. This provides efficient and low-barrier technical support for complex parent-child application integration projects, bridging the gap between developers and underlying technologies. For project integrators, this means achieving a higher return on investment with lower manpower costs.

[0074] S230: The loader loading engine receives the business declarative configuration information obtained by the launcher loading engine, and performs dynamic loading of sub-application resources and preparation of the runtime environment based on the business declarative configuration information in order to start the sub-application.

[0075] The loader loading engine is responsible for the dynamic loading of sub-application resources and the preparation of the runtime environment. It encapsulates the complex underlying logic such as sub-application registration, resource preloading and parsing, and runtime environment isolation into standardized configurations and mounts them on the global variables of the launcher. Business developers can call the abstract and encapsulated underlying capabilities of the loader through the global variables of the launcher to start the sub-application.

[0076] As an optional but non-limiting implementation, the loader loading engine receives business declarative configuration information obtained by the launcher loading engine, and performs dynamic loading of sub-application resources and preparation of the runtime environment based on the business declarative configuration information to start the sub-application, including but not limited to steps C1-C2:

[0077] Step C1: The loader loading engine receives the business declarative configuration information obtained by the launcher loading engine, and converts the business declarative configuration information into sub-application configuration information through data shaping;

[0078] Step C2: Based on the sub-application configuration information, dynamically load sub-application resources and prepare the runtime environment to start the sub-application; wherein, the loader loading engine provides an interactive method to start the sub-application by clicking the icon, and starts the sub-application by binding a click event to the entry icon.

[0079] The loader initializes by receiving the declarative configuration information of the services configured on the script tags collected by the launcher, and then shapes the data into sub-application configuration information. It also integrates the Wujie micro-frontend internally, utilizing its capabilities to mount and launch the sub-applications. The shaped sub-application configuration information is shown in Table 2.

[0080] Table 2 Sub-application configuration information after data shaping

[0081]

[0082] Among them, see Figure 7 The launcher loading engine passes the collected business declarative configuration information to the loader loading engine. The loader loading engine then uses a data cleaning algorithm to identify sub-application-related configuration information and calls the sub-application pre-loading method provided by the Wujie micro-frontend framework to pre-load the sub-application's network resources. This avoids excessively long resource loading times during sub-application startup, preventing a poor user experience due to long waiting times and achieving the goal of fast sub-application startup. The key to the data cleaning algorithm is identifying all data-prop-* attributes (such as data-prop-page-title="page title") in the business declarative configuration information and converting them into sub-application configuration information, similar to {pageTitle: "page title"}. This is done to provide a rule to restrict the attributes passed to the sub-application, rather than passing all business configuration information to the sub-application, thus avoiding data pollution.

[0083] Among them, see Figure 8 The loader loading engine provides an interactive method for launching sub-applications by clicking icons, to meet scenarios such as AI assistant pop-ups integrated into the main application. The main implementation principle is to bind a click event to the entry icon, launch the sub-application within the click event, and notify the sub-application to open the pop-up window via the event bus.

[0084] In this embodiment of the invention, a loader engine is used to further encapsulate the capabilities of the micro-frontend, encapsulating complex underlying logic such as application registration, resource resolution, and runtime environment isolation into standardized configurations. Developers do not need to deeply understand the underlying implementation principles of the micro-frontend; they can complete the registration and activation of sub-applications simply through business declarative configuration information, greatly simplifying the integration process.

[0085] S240. Based on the singleton pattern between the dual loading engine structures, an event bus mechanism is used for cross-application data transmission.

[0086] The event bus mechanism is responsible for handling event communication between parent and child applications. It specifically implements event subscription, publishing, and cancellation management, provides a unified built-in tool for data interaction across applications, and uses namespaces to clearly express event types in different scenarios, avoiding confusion in event maintenance and data transmission.

[0087] As an optional but non-limiting implementation, the method of using an event bus mechanism for cross-application data transfer based on the singleton pattern between the dual-loading engine architecture includes, but is not limited to, steps D1-D2:

[0088] Step D1: Use namespaces to identify events in different scenarios and build a mapping relationship between event names and callback functions;

[0089] Step D2: When an event occurs, based on the singleton pattern between the dual loading engine structures, the event bus traverses the callback functions corresponding to the event names, executes the callbacks asynchronously and passes parameters to perform cross-application data transfer.

[0090] Business users can register, listen for, and remove events through the event bus instance exposed by the starter's global variables, without needing to concern themselves with the underlying implementation logic of the event bus. Specifically, the core capabilities of the event bus are encapsulated using ES6 classes, and event callback mappings are maintained through a private object `events`, exposing a chained API of `on`, `emit`, `off`, and `once` to implement event subscription and publication. The single responsibility principle is followed to ensure the cohesion of event management logic. See Table 3 for API descriptions of the event bus mechanism.

[0091] Table 3 Event Bus Mechanism API Description

[0092]

[0093] This approach uses namespaces to identify events in different scenarios and establishes a mapping between event names and callback functions. When an event occurs, based on the singleton pattern between the dual-loading engine architecture, the event bus traverses the callback functions corresponding to the event name, executes the callbacks asynchronously, and passes parameters for cross-application data transfer. Specifically, through research and practice on typical business scenarios, and combined with the event bus mechanism, the following three typical scenarios are summarized, each with event names marked with namespace identifiers. Scenario analysis is as follows:

[0094] Scenario 1: The parent application subscribes to events published by the child application. See sample code. Figure 9 To address the issue of child applications passing data to parent applications, such as when the child application is a form and the parent application needs to obtain the form information filled out by the child application, the parent application subscribes to the form submission events published by the child application and can receive the form data from the child application through callback parameters within the events.

[0095] Scenario 2: Child application sends a message to parent application. See sample code. Figure 10 In conjunction with Scenario 1, sub-applications can publish events to the event bus and throw out business data as parameters so that subscribers can receive them.

[0096] Scenario 3: Launcher notifies sub-applications to start; see sample code. Figure 11 as well as Figure 12As described in the previous embodiments, the interaction method of launching a sub-application by clicking an icon involves publishing an event to the event bus in the launcher to open a pop-up window for the sub-application, and the sub-application subscribing to the message to open the pop-up window.

[0097] The embodiments of this invention rely on the singleton pattern of the loader, providing an event bus mechanism that can be shared between parent and child applications. Developers do not need to worry about the data transfer risks brought about by traditional iframe communication. They can flexibly handle cross-application data transmission through the "publish-subscriber" pattern, while providing a namespace mechanism to solve the traditional event conflict problem, thereby improving the efficiency and maintainability of cross-application data interaction.

[0098] By following the steps above, a sub-application intelligent integration tool based on declarative configuration and dual loading engines can be implemented. This tool is suitable for scenarios that require rapid integration of sub-applications into a parent application. It features out-of-the-box declarative configuration, cross-application logic interaction maintained by an event bus, and minimal business configuration, helping business personnel to quickly integrate complex parent and child applications that are independent of the technology stack.

[0099] In one optional embodiment of the present invention, one application scenario is integrating an AI intelligent assistant project into multiple business systems. Typically, the AI ​​intelligent assistant project and the main business system are two independently maintained projects. Their technology stacks may differ, and they require data interaction. In this case, the sub-application intelligent loading tool, based on declarative configuration and a dual loading engine, can be used to integrate the AI ​​intelligent assistant project's sub-applications into the business system, helping system integrators improve system integration efficiency.

[0100] This invention adopts a minimalist configuration as its core design concept, aiming to achieve seamless integration and collaborative operation of applications across technology frameworks, and providing efficient and low-threshold technical support for the integration and deployment of complex parent-child applications. Overall, it features multi-technology stack coexistence, simple user configuration, and excellent user experience performance, and can solve the practical needs of enterprise-level project integration processes regarding development integration, deployment and maintenance, and performance.

[0101] Example 3

[0102] Figure 13 This is a schematic diagram of a parent-child application integration device provided in Embodiment 3 of the present invention. Figure 13 As shown, the device includes:

[0103] The declarative configuration information determination module 1310 is used to determine the business declarative configuration information required for the sub-application to start;

[0104] The dual-loading engine structure application module 1320 is used to integrate the sub-application into the parent application and perform startup processing on the sub-application based on the business declarative configuration information using a dual-loading engine structure.

[0105] The cross-application data transmission module 1330 is used to perform cross-application data transmission based on the singleton pattern between the dual loading engine structures and using an event bus mechanism.

[0106] Optionally, the business declarative configuration information includes the launcher address, sub-application address, sub-application name, sub-application data to be acquired, sub-application launch icon, and sub-application event listening information.

[0107] Optional, a dual-loading engine architecture application module, specifically used for:

[0108] The launcher loading engine unit is used to obtain business declarative configuration information, initialize the loader according to the business declarative configuration information, and integrate the sub-application into the parent application.

[0109] The loader loading engine unit is used to receive business declarative configuration information obtained by the launcher loading engine, and to dynamically load sub-application resources and prepare the runtime environment based on the business declarative configuration information in order to start the sub-application; wherein, the dual loading engine structure includes a loader loading engine and a launcher loading engine.

[0110] Optionally, the launcher loads the engine unit, specifically for:

[0111] The launcher loading engine obtains the business declarative configuration information and performs native tag configuration on the target page based on the configuration information to introduce the launcher and launcher configuration parameters.

[0112] During the integration of parent and child applications, it is necessary to determine whether the parent and child applications are in the same domain in order to determine the execution environment of the loader;

[0113] The launcher imports loader resources via dynamic scripts, initializes the loader after the launcher resources are loaded, and integrates child applications into the parent application; the loader always maintains a singleton pattern during initialization.

[0114] Optionally, the launcher loads the engine unit, which is also specifically used for:

[0115] During the integration of parent and child applications, whether the parent and child applications are on the same domain can be determined by checking whether the key properties referenced by the top-level window of the browser report an error.

[0116] If no error is reported when accessing a critical property referenced by the top-level browser window, it is determined that the parent application and the child application are in the same domain, and the loader executes in the browser environment of the parent application.

[0117] If an error occurs when accessing a critical property referenced by the browser's top-level window, it indicates that the parent and child applications are cross-domain, and the loader will then execute in the child application's browser environment.

[0118] Optionally, the loader loads the engine unit, specifically used for:

[0119] The loader loading engine receives the business declarative configuration information obtained by the launcher loading engine, and converts the business declarative configuration information into sub-application configuration information through data shaping;

[0120] Based on the sub-application configuration information, the sub-application resources are dynamically loaded and the runtime environment is prepared in order to start the sub-application; among them, the loader loading engine provides an interactive method to start the sub-application by clicking the icon, and starts the sub-application by binding a click event to the entry icon.

[0121] Optional, cross-application data transfer module, specifically used for:

[0122] Namespaces are used to identify events in different scenarios, and a mapping relationship between event names and callback functions is established.

[0123] When an event occurs, based on the singleton pattern between the dual loading engine structures, the event bus traverses the callback functions corresponding to the event names, executes the callbacks asynchronously and passes parameters to perform cross-application data transfer.

[0124] The parent-child application integration device provided in the embodiments of the present invention can execute the parent-child application integration method provided in any of the embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the parent-child application integration method. For details, please refer to the relevant operations of the parent-child application integration method in the foregoing embodiments.

[0125] Example 4

[0126] Figure 14A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0127] like Figure 14 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0128] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0129] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the parent-child application integration method.

[0130] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0131] In some embodiments, the parent-child application integration method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the parent-child application integration method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the parent-child application integration method by any other suitable means (e.g., by means of firmware).

[0132] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0134] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0135] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0136] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0137] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0138] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0139] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for integrating parent and child applications, characterized in that, The method includes: Determine the business declarative configuration information required for sub-application startup; A dual-loading engine structure is adopted, which integrates the sub-application into the parent application based on the business declarative configuration information and performs startup processing on the sub-application; Based on the singleton pattern between the dual-loading engine architecture, an event bus mechanism is used for cross-application data transmission.

2. The method according to claim 1, characterized in that, The business declarative configuration information includes the launcher address, sub-application address, sub-application name, sub-application data to be acquired, sub-application launch icon, and sub-application event listening information.

3. The method according to claim 1, characterized in that, The dual-loading engine structure integrates sub-applications into the parent application based on the business declarative configuration information and performs startup processing on the sub-applications, including: The launcher loading engine obtains the business declarative configuration information, initializes the loader based on the business declarative configuration information, and integrates the sub-application into the parent application; The loader loading engine receives the business declarative configuration information obtained by the launcher loading engine, and performs dynamic loading of sub-application resources and preparation of the runtime environment based on the business declarative configuration information to start the sub-application; wherein, the dual loading engine structure includes a loader loading engine and a launcher loading engine.

4. The method according to claim 3, characterized in that, The launcher loading engine obtains business declarative configuration information, initializes the loader based on the business declarative configuration information, and integrates the sub-application into the parent application, including: The launcher loading engine obtains the business declarative configuration information and performs native tag configuration on the target page based on the configuration information to introduce the launcher and launcher configuration parameters. During the integration of parent and child applications, it is necessary to determine whether the parent and child applications are in the same domain in order to determine the execution environment of the loader; The launcher imports loader resources via dynamic scripts, initializes the loader after the launcher resources are loaded, and integrates child applications into the parent application; the loader always maintains a singleton pattern during initialization.

5. The method according to claim 4, characterized in that, During the parent-child application integration process, determining whether the parent and child applications are in the same domain is crucial for determining the loader's execution environment. This includes: During the integration of parent and child applications, whether the parent and child applications are on the same domain can be determined by checking whether the key properties referenced by the top-level window of the browser report an error. If no error is reported when accessing a critical property referenced by the top-level browser window, it is determined that the parent application and the child application are in the same domain, and the loader executes in the browser environment of the parent application. If an error occurs when accessing a critical property referenced by the browser's top-level window, it indicates that the parent and child applications are cross-domain, and the loader will then execute in the child application's browser environment.

6. The method according to claim 3, characterized in that, The loader loading engine receives the business declarative configuration information obtained by the launcher loading engine, and performs dynamic loading of sub-application resources and preparation of the runtime environment based on the business declarative configuration information to start the sub-application, including: The loader loading engine receives the business declarative configuration information obtained by the launcher loading engine, and converts the business declarative configuration information into sub-application configuration information through data shaping; Based on the sub-application configuration information, the sub-application resources are dynamically loaded and the runtime environment is prepared in order to start the sub-application; among them, the loader loading engine provides an interactive method to start the sub-application by clicking the icon, and starts the sub-application by binding a click event to the entry icon.

7. The method according to claim 1, characterized in that, The method of using an event bus mechanism for cross-application data transfer based on the singleton pattern between the dual-loading engine architecture includes: Namespaces are used to identify events in different scenarios, and a mapping relationship between event names and callback functions is established. When an event occurs, based on the singleton pattern between the dual loading engine structures, the event bus traverses the callback functions corresponding to the event names, executes the callbacks asynchronously and passes parameters to perform cross-application data transfer.

8. A parent-child application integration device, characterized in that, The device includes: The declarative configuration information determination module is used to determine the business declarative configuration information required for the sub-application to start; The dual-loading engine structure application module is used to integrate sub-applications into the parent application and start the sub-applications based on the business declarative configuration information using a dual-loading engine structure. The cross-application data transfer module is used to perform cross-application data transfer based on the singleton pattern between the dual loading engine structures and using an event bus mechanism.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the parent-child application integration method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the parent-child application integration method according to any one of claims 1-7.