WO2023179725A1 - 应用集成方法及装置 - Google Patents

应用集成方法及装置 Download PDF

Info

Publication number
WO2023179725A1
WO2023179725A1 PCT/CN2023/083449 CN2023083449W WO2023179725A1 WO 2023179725 A1 WO2023179725 A1 WO 2023179725A1 CN 2023083449 W CN2023083449 W CN 2023083449W WO 2023179725 A1 WO2023179725 A1 WO 2023179725A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
sub
main
type
identifier
Prior art date
Application number
PCT/CN2023/083449
Other languages
English (en)
French (fr)
Inventor
陆晓勇
赵熙朝
陈新新
Original Assignee
阿里云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里云计算有限公司 filed Critical 阿里云计算有限公司
Publication of WO2023179725A1 publication Critical patent/WO2023179725A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular, to an application integration method and device.
  • Embodiments of the present application provide an application integration method and device to solve the problem that existing technologies cannot effectively realize interaction and functional unification, making user operations cumbersome and thus affecting user experience.
  • embodiments of the present application provide an application integration method, which method includes:
  • the type of each of the applications and the front-end routing information of each of the applications are determined.
  • the types of the applications include a first application type and a second application type.
  • the first application type The application includes a main application and a first sub-application, and the application of the second application type includes a second sub-application;
  • the target page is a page integrated by each of the applications, and the integrated main application supports providing services for the first sub-application and/or the second sub-application.
  • determining the type of each application and the front-end routing information of each application according to each identifier including:
  • the front-end routing information of the application is obtained through route analysis.
  • determining the type of the application based on the combination of character strings in the identifier includes:
  • the identifier does not contain a string representing the unique identification of the application, determine that the type of the application is the first application type and the application is the main application;
  • the identifier contains a string representing a path and a unique identification of the application, it is determined that the type of the application is the first application type and the application is the first sub-application;
  • the identifier contains a character string representing a unique identifier of an application and a unique identifier of a page number, it is determined that the type of the application is the second application type and the application is the second sub-application.
  • the front-end routing information of the application is obtained through route analysis according to the identifier and the corresponding type of the application, including:
  • the preset routing information corresponding to the main application is obtained according to the identifier, and the preset routing information is used as the front-end route corresponding to the main application. information;
  • the application unique identifier and the page number unique identifier corresponding to the first sub-application are parsed according to the identifier, and the corresponding first sub-application is The application unique identifier and the page number unique identifier are used as the front-end routing information corresponding to the first sub-application;
  • the application unique identifier and the page number unique identifier corresponding to the second sub-application are parsed according to the identifier, and the corresponding second sub-application is The application unique identifier and the page number unique identifier are used as the front-end routing information corresponding to the second sub-application.
  • loading each application according to the type of each application and the front-end routing information of each application to obtain a target page including:
  • the configuration information corresponding to the main application is obtained according to the preset routing information corresponding to the main application, and the main application is loaded according to the configuration information corresponding to the main application.
  • the main framework initialize multiple modules in the main application to support the main application in providing services for the first sub-application and/or the second sub-application, and initialize to store the first sub-application and/or the application container of the second sub-application; rendering the main page corresponding to the main application; wherein the plurality of modules include an application communication module, a business component module and a statistical management module;
  • the configuration information corresponding to the first sub-application is obtained according to the application unique identifier and the page number unique identifier corresponding to the first sub-application, and the configuration information corresponding to the first sub-application is obtained according to the first sub-application.
  • Apply the corresponding configuration information Load the static resources corresponding to the first sub-application and initialize the application communication module to support the first sub-application communicating with the main application; render the first sub-page corresponding to the first sub-application;
  • the preset login URL corresponding to the second sub-application is obtained according to the application unique identifier and the page number unique identifier corresponding to the second sub-application, and the preset login URL is loaded.
  • the preset login URL is used. If the login is successful, the login state is marked and the second sub-page corresponding to the second sub-application is rendered; the application communication module and the statistics management module are initialized, using To support the second sub-application to communicate with the main application and the second sub-application to support automatic management and on-demand management functions;
  • the main page, the first sub-page and the second sub-page are integrated on the target page.
  • load the main framework of the main application according to the configuration information corresponding to the main application including:
  • the initialization of multiple modules in the main application includes:
  • loading the static resources corresponding to the first sub-application according to the configuration information corresponding to the first sub-application includes:
  • the second static resource is the static resource corresponding to the first sub-application ;
  • the initialization of the application communication module includes:
  • the preset login-free URL corresponding to the second sub-application is obtained based on the application unique identifier and page number unique identifier corresponding to the second sub-application, including:
  • the preset login URL corresponding to the second sub-application is obtained through a preset protocol
  • the initialization of the application communication module and the statistical management module includes:
  • determining the identifier corresponding to each application based on the obtained uniform resource locator URL corresponding to each application including:
  • the identifier corresponding to each application is obtained.
  • an application integration device which includes:
  • the first processing module is configured to determine the identifier corresponding to each application according to the obtained uniform resource locator URL corresponding to each application;
  • a second processing module configured to determine the type of each application and the front-end routing information of each application according to each of the identifiers, where the application types include a first application type and a second application type,
  • the application of the first application type includes a main application and a first sub-application, and the application of the second application type includes a second sub-application;
  • An integration module configured to load each application according to the type of each application and the front-end routing information of each application to obtain a target page
  • the target page is a page integrated by each of the applications, and the main application on the target page supports providing services for the first sub-application and/or the second sub-application.
  • the application integration method and device provided by the embodiments of this application first determine the identifier corresponding to each application based on the obtained URL corresponding to each application, and then parse to obtain the identifier of each application based on the identifier of each application. type and front-end routing information. Since different application types correspond to different loading methods, the corresponding application is loaded by combining the application type and front-end routing information, and the target page integrated by each application is rendered and displayed. After loading the application During the process, multiple modules provided by the main application are initialized, so that the integrated main application can support providing services for the first sub-application and/or the second sub-application, achieving functional reuse and unified interaction without the need to open a new window.
  • the pages of each application can be operated on one page, providing users with convenient operations and thus improving the user experience.
  • Figure 1 is a schematic flowchart of an application integration method provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of a target page provided by an embodiment of the present application.
  • Figure 3 is a schematic flow chart of an application integration method provided by yet another embodiment of the present application.
  • Figure 4 is a schematic structural diagram of an application integration device provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • the inventive concept of this application is to load applications through iframes. Different application types correspond to different loading logics to achieve application decoupling. At the same time, based on URL routing parsing, front-end routing information is obtained through identifiers. And the application is loaded based on the front-end routing information to realize interaction and unified functions, making the user's operation convenient and thus affecting the user experience.
  • Figure 1 is a schematic flowchart of an application integration method provided by an embodiment of the present application.
  • the method of this embodiment can be executed by a server and applied to industrial scenarios.
  • the method of this embodiment may include:
  • a Uniform Resource Locator (URL) is provided, and the server can obtain the URL. Access the URL through the browser and obtain the identifier, such as activeKey.
  • the identifier corresponding to each application is obtained.
  • route analysis is performed based on the access URL to obtain the activeKey.
  • the activeKey string is parsed.
  • each identifier determines the type of each application and the front-end routing information of each application.
  • the application type includes a first application type and a second application type
  • the first application type application includes a main application and a first sub-application
  • the second application type application includes a second sub-application
  • the application is the first application type (such as a party application). If it is the first application type, it is continued to determine whether the application is a main application or a first sub-application (a party sub-application); If it is a second application type, the application is a second sub-application (such as a third-party sub-application).
  • the front-end routing information of the application is obtained. Based on the front-end routing information, resources can be loaded and modules initialized, and the target page can be rendered.
  • the target page is a page integrated by each of the applications, and the integrated main application supports providing services for the first sub-application and/or the second sub-application.
  • the main application is the entire framework of the digital factory developed by developer A
  • the first sub-application can be some applications derived or newly created in the digital factory developed by developer A (such as Enterprise Resource Planning (ERP) ) system, manufacturing enterprise production process execution system (Manufacturing Execution System, MES)), and the second sub-application is an application developed by developer B.
  • ERP Enterprise Resource Planning
  • MES Manufacturing Execution System
  • main application loading can be loading the main framework, application initialization and application container initialization.
  • the first sub-application loading can load static resources, initialize the application communication module preset by the main application, and communicate with the main application on demand.
  • the second sub-application is loaded, which can be to obtain the free login URL, load the free login URL, and initialize the application communication module, statistics management module, etc. preset by the main application. Therefore, through the above-mentioned application loading and application integration method, there is no need to open the pages of each application in a new window. Multiple windows can be opened on one page, achieving unified interaction and functional reuse, and simplifying the user's operation steps. It is easier for users to view, thereby improving user experience.
  • the application integration method provided by this application determines the identifier corresponding to each application based on the obtained URL corresponding to each application, and then parses the type and front-end routing information of each application based on the identifier of each application. Since Different application types correspond to different loading methods. Therefore, by combining the application type and front-end routing information, the corresponding application is loaded, the target page integrated by each application is rendered and displayed, and the main application provided by the main application is initialized during the application loading process. Multiple modules enable the integrated main application to support providing services for the first sub-application and/or the second sub-application, achieving functional reuse and unified interaction without the need to open the pages of each application in a new window. Page Operations can be implemented on the interface, providing users with convenient operations, effectively realizing unified interaction, data interoperability, and application integration to meet diverse needs, thereby improving user experience.
  • determine the type of each application and the front-end routing information of each application according to each identifier which can be achieved through the following steps (perform the following steps for each identifier) :
  • Step a1 Determine the type of the application according to the combination of the character strings in the identifier
  • Step a2 According to the identifier and the corresponding type of the application, obtain the front-end routing information of the application through route analysis.
  • the combination rule of the string can be determined, and based on the combination rule, the type of the application can be determined. For this type of application, routing parsing is implemented through the identifier to obtain the front-end routing information, and then the configuration resources of the application are obtained.
  • determine the type of each application based on the combination of the strings in each identifier which can be achieved through the following steps (perform the following steps for each identifier):
  • Step b1 If the identifier does not contain a character string representing a unique identification of the application, determine that the type of the application is the first application type and the application is the main application.
  • Step b2 If the identifier contains a string representing a path and a unique identification of the application, determine that the type of the application is the first application type and the application is the first sub-application.
  • Step b3 If the identifier contains a character string representing an application unique identifier and a page number unique identifier, determine that the type of the application is the second application type and the application is the second sub-application.
  • the type of the application is determined to be the first application type; otherwise, it is the second application type.
  • the activeKey appears with the rule /:appId/:path, it means that the link (that is, the URL) is a sub-application (that is, the first sub-application).
  • the appId here represents the unique identification of the application, and path represents the path. Among them, the application needs to configure relevant menu information, permission information, application purchase and activation information, etc. in advance.
  • the activeKey appears in the form of $ ⁇ appId ⁇ _$ ⁇ pageId ⁇ , such as e1cb05ecc58f46fda3d0ac6fa736ea04_1043519, it means that the application is a second-party sub-application.
  • the pageId here represents the unique identification of the page number.
  • the application needs to register in advance to obtain the application ask (i.e. public key and secret key), and the application implements the login-free interface in accordance with the SSO protocol or the OAuth2.0 protocol (an application/user authorization protocol); the relevant menus and permissions need to be configured Wait for the information, put it on the app market, and then get the page URL based on appId+pageId.
  • this embodiment is based on the scenario where the user has purchased and activated the application.
  • the identifier and the corresponding type of the application obtain the front-end routing information of the application through route analysis, which can be achieved through the following steps (perform the following steps for each application):
  • Step c1 If the application is the main application in the first application type, obtain the preset routing information corresponding to the main application according to the identifier, and use the preset routing information as the main application corresponding front-end routing information.
  • Step c2 If the application is the first sub-application of the first application type, parse and obtain the application unique identifier and page number unique identifier corresponding to the first sub-application according to the identifier, and add the first sub-application to the first sub-application.
  • the application unique identifier and page number unique identifier corresponding to the sub-application are used as the front-end routing information corresponding to the first sub-application.
  • Step c3 If the application is a second sub-application of the first application type, parse and obtain the application unique identifier and page number unique identifier corresponding to the second sub-application according to the identifier, and add the second sub-application to the second sub-application.
  • the application unique identifier and page number unique identifier corresponding to the sub-application are used as the front-end routing information corresponding to the second sub-application.
  • application loading can be implemented through route resolution.
  • the static resources include at least public resources, various types of files, etc.
  • the default route ie, preset routing information
  • the required static resources are parsed based on the preset routing information.
  • the appId and pageId are parsed through routing, and the page is rendered based on the appId and pageId.
  • this embodiment provides a detailed description of how each application is loaded. According to the type of the application and the front-end routing information of the application, loading the application and obtaining the target page can be achieved through the following steps (perform the following steps for each application):
  • Step d1 If the application is the main application, obtain the configuration information corresponding to the main application according to the preset routing information corresponding to the main application, and load the configuration information corresponding to the main application according to the configuration information corresponding to the main application.
  • the main framework of the main application initialize multiple modules in the main application to support the main application in providing services for the first sub-application and/or the second sub-application, and initialize to store the third sub-application.
  • the configuration information required to load the main application can be obtained, and based on the configuration information, page loading and rendering of the main application is implemented, and the main page is displayed.
  • the application needs to be initialized during the loading process, that is, giving the module functions in the application to ensure that the module can normally provide corresponding services.
  • the main application initialization process includes application initialization and application container initialization.
  • the application container here is used to store integrated sub-applications, such as the first sub-application and the second sub-application.
  • loading the main application's main framework according to the configuration information corresponding to the main application can be implemented through the following steps:
  • Step d11 Obtain the first static resource required for loading the main application through the preset configuration information corresponding to the main application.
  • Step d12 Load the main frame corresponding to the main application according to the first static resource to obtain the main page; the main frame is used to represent the page layout.
  • the loading process of the main application can be: loading the main frame: page layout (Layout), which consists of three parts, including the sidebar-navigation menu, the top-toolbar, and the application container.
  • the initialization of multiple modules in the main application can be achieved through the following steps:
  • Step d13 Match application program interfaces to the main application, the first sub-application and the second sub-application to support communication between the main application and the first sub-application and the second sub-application respectively.
  • Step d15 Match the automatic and on-demand management functions for the statistical management module and enable the automatic and on-demand management functions to support the main application in monitoring the statistical management request of the second sub-application, and if the main application monitors the statistical management request,
  • the second sub-application is supported to achieve automatic management and on-demand management functions by obtaining the corresponding software development tool kit SDK.
  • application initialization 1. Initialize the application communication module; configure the application program interface and enable its function, that is, realize communication between the main application and sub-applications (such as the first sub-application and the second sub-application) through the application program interface (postmessage) , the implemented sub-application can call the methods provided by the main application, such as opening Tab, full screen and other common functional operations. 2.
  • Initialize the business component module configure the business component module to enable its function, that is, in order to solve the problem of traditional iframe UI out of synchronization, the main application presets common business components (dynamic loading through module packagers, such as webpack); for example, data selection components , the sub-application can trigger the main application to open the data selection pop-up box through the application communication module, and the user selects the data, and transmits the result back to the sub-application to complete the subsequent business; for another example, the sub-application has content that it hopes to display as a pop-up window, side border, etc. Open in the traditional iframe mode, the content can only be limited to the sub-application container. In this way, the content can be displayed globally. 3.
  • Initialize the statistics management module configure the statistics management module and start its function, that is, it is used to monitor the statistics management requests of sub-applications.
  • the sub-applications realize automatic management and on-demand management functions through relevant SDKs.
  • initialize the application container configure the application container and enable its functions. That is, the application container is assigned and opened to store the integrated first sub-application and second sub-application.
  • Step d2 If the application is the first sub-application, obtain the configuration information corresponding to the first sub-application according to the application unique identifier and page number unique identifier corresponding to the first sub-application, and obtain the configuration information corresponding to the first sub-application according to the Configuration information corresponding to the first sub-application, loading the static resources corresponding to the first sub-application and initializing the application communication module to support the first sub-application communicating with the main application; rendering the first sub-application The first subpage corresponding to the application.
  • the loading process of the first sub-application can be as follows: obtaining the appId and pageId through route analysis, and obtaining the corresponding configuration, that is, the configuration information corresponding to the first sub-application based on the appId and pageId, and then loading the first sub-application. .
  • the front-end routing information is parsed through routing, and the static resources required to load the application are obtained through the configuration information that has been preset in Application Configuration Management (ACM).
  • ACM Application Configuration Management
  • the simplified configuration is as follows, where common is reusable. Resource configuration, navigation is application resource configuration, and navigation/:path is specific page configuration. Through configuration, it can flexibly realize sub-application rendering, and support theme switching, permission control, etc.
  • loading the static resources corresponding to the first sub-application according to the configuration information corresponding to the first sub-application can be achieved through the following steps:
  • Step d21 Determine whether the user of the first sub-application has access permission according to the permission point in the configuration information corresponding to the first sub-application.
  • Step d22 If there is access permission, obtain the second static resource from the configuration information corresponding to the first sub-application, and load the second static resource.
  • the second static resource is a static resource corresponding to the first sub-application.
  • the initialization of the application communication module can be achieved through the following steps:
  • the application communication module is initialized, the application program interface is configured and its function is enabled, that is, communication between the main application and the first sub-application is realized through the application program interface, and the first sub-application is realized You can call the methods provided by the main application, such as opening Tab, full screen and other common functional operations.
  • Step d3 If the application is the second sub-application, obtain the preset login URL corresponding to the second sub-application based on the application unique identifier and page number unique identifier corresponding to the second sub-application, And according to the preset login URL, if the login is successful, the login state is marked, and the second sub-page corresponding to the second sub-application is rendered; the application communication module and the statistical management are initialized A module to support the second sub-application to communicate with the main application and the second sub-application to support automatic management and on-demand management functions.
  • the main page, the first sub-page and the second sub-page are integrated on the target page.
  • the loading process of the second sub-application can be as follows: obtaining the appId and pageId through route analysis, obtaining the preset login URL based on the appId and pageId and loading it, realizing the login exemption, and jumping to the target page.
  • obtaining the preset login-free URL corresponding to the second sub-application based on the application unique identifier and page number unique identifier corresponding to the second sub-application can be achieved through the following steps:
  • Step d31 Obtain the public key and secret key of the second sub-application according to the application unique identifier and page number unique identifier of the second sub-application;
  • Step d32 Obtain the preset login URL corresponding to the second sub-application through the preset protocol according to the public key and the secret key;
  • ISV Independent Software Vendors
  • the application integration method relies on the basic data provided by the ISV; specifically, it supports the ISV to synchronize basic data (metadata definition, master data definition, factory model, process path, etc.) to the platform through the application of AKS to realize system data and business Data synchronization to achieve business data analysis (quality defect analysis, yield analysis, etc.).
  • the initialization of the application communication module and the statistical management module can be achieved through the following steps:
  • Step e1 Match application program interfaces between the main application and the second sub-application to support communication between the main application and the second sub-application;
  • Step e1 Match the automatic scoring and on-demand scoring functions for the statistical scoring module and enable the automatic scoring and on-demand scoring functions to support the second sub-application to achieve automatic scoring and on-demand scoring by obtaining the corresponding software development tool kit SDK. RBI function.
  • the main page, the first sub-page and the second sub-page are integrated on the target page.
  • the application communication module and the statistical management module are initialized.
  • the application communication module is initialized; the application program interface is configured and its function is enabled, that is, communication between the main application and the second sub-application is realized through the application program interface, and the second sub-application can call the methods provided by the main application, such as opening Tab, Full screen and other common function operations.
  • Initialize the statistics management module configure the statistics management module and start its function, that is, it is used to monitor the statistics management request of the second sub-application.
  • the second sub-application realizes automatic management and on-demand management functions through the relevant SDK.
  • the target page includes: 1. Address bar; 2. Menu: menus are divided according to application types; 3. Tabs: the page is opened in multiple windows; 4. Ribbon: alarms, messages, enterprise information, etc.; 5. Sub-applications: responsible Render specific content; 6. Main application: responsible for main frame initialization, related SDK initialization, etc.
  • FIG. 3 is a schematic flowchart of an application integration method provided by yet another embodiment of the present application.
  • the URL is obtained, then parsed through routing, the identifier is obtained and the corresponding application is loaded.
  • the specific process is: first determine whether the application is a party application. If it is a party application, determine whether it is the main application. If it is the main application, match the default route and parse the required static resources (including public resources); load the main body based on the static resources. framework, and then perform application initialization operations, such as initializing the application communication module, business component module, statistical management module, etc., then initialize the application container, and load the sub-application according to the activeKey.
  • application initialization operations such as initializing the application communication module, business component module, statistical management module, etc.
  • the route is matched, the corresponding static resources are loaded according to the route, and the application communication module, statistics management module, etc. are initialized.
  • the route is matched, the corresponding application configuration information is obtained based on activeKey, the login URL is obtained (supports SSO and Oauth2.0 protocols), and the page is rendered.
  • one party's application uses iframe to realize Jushi application decoupling, independent development, independent deployment, and has nothing to do with the technology stack; second and third party applications use iframe+application login to achieve application integration, from interaction, data, and services.
  • the user is unaware; through the application communication module, the sub-application URL is synchronized to the main application to achieve browser and iframe URL synchronization; through the main application to dynamically register business components, the sub-application and the main application share components to achieve UI synchronization;
  • Through the integration of basic data, business data, application services, etc., data, interaction, and functions are unified; based on iframe, the cost of UI transformation is low.
  • application integration is implemented based on lightweight iframe, achieving application decoupling, independent development, and independent deployment; heterogeneous system application integration has nothing to do with the technology stack, and sub-applications have complete autonomy; function reuse maintains Function and experience consistency; integrate all applications required in each stage through a unified system platform, unified portal, unified permission management and unified data model.
  • FIG. 4 is a schematic structural diagram of the application integration device provided by the embodiment of the present application.
  • Application integration devices may include:
  • the first processing module 401 is configured to determine the identifier corresponding to each application according to the obtained uniform resource locator URL corresponding to each application;
  • the second processing module 402 is configured to determine the type of each application and the front-end routing information of each application according to each of the identifiers.
  • the types of applications include a first application type and a second application type.
  • the application of the first application type includes a main application and a first sub-application
  • the application of the second application type includes a second sub-application
  • the integration module 403 is configured to load each application according to the type of each application and the front-end routing information of each application to obtain a target page;
  • the target page is a page integrated by each of the applications, and the main application on the target page supports providing services for the first sub-application and/or the second sub-application.
  • the identifier corresponding to each application is determined based on the obtained URL corresponding to each application, and then based on the identification of each application symbol, the type and front-end routing information of each application are parsed. Since different application types correspond to different loading methods, the corresponding application is loaded through the combination of application type and front-end routing information, and each application is rendered and displayed.
  • the integrated target page initializes multiple modules provided by the main application during the application loading process, so that the integrated main application can support providing services for the first sub-application and/or the second sub-application, realizing function reuse and The interaction is unified, and there is no need to open the pages of each application in a new window. Operations can be implemented on one page, providing users with convenient operations and thus improving the user experience.
  • the second processing module 402 includes a first processing unit and a second processing unit; the first processing unit is configured to determine, for each application, the application according to the combination of the strings in the identifier. type; a second processing unit configured to, for each application, obtain the front-end routing information of the application through route analysis according to the identifier and the corresponding type of the application.
  • the first processing unit is specifically used for:
  • the identifier does not contain a string representing the unique identification of the application, determine that the type of the application is the first application type and the application is the main application;
  • the identifier contains a string representing a path and a unique identification of the application, it is determined that the type of the application is the first application type and the application is the first sub-application;
  • the identifier contains a character string representing a unique identifier of an application and a unique identifier of a page number, it is determined that the type of the application is the second application type and the application is the second sub-application.
  • second processing unit specifically used for:
  • the preset routing information corresponding to the main application is obtained according to the identifier, and the preset routing information is used as the front-end route corresponding to the main application. information;
  • the application unique identifier and the page number unique identifier corresponding to the first sub-application are parsed according to the identifier, and the corresponding first sub-application is The application unique identifier and the page number unique identifier are used as the front-end routing information corresponding to the first sub-application;
  • the application unique identifier and the page number unique identifier corresponding to the second sub-application are parsed according to the identifier, and the corresponding second sub-application is The application unique identifier and the page number unique identifier are used as the front-end routing information corresponding to the second sub-application.
  • integrated module specifically used for:
  • the configuration information corresponding to the main application is obtained according to the preset routing information corresponding to the main application, and the main application is loaded according to the configuration information corresponding to the main application.
  • the main framework initialize multiple modules in the main application to support the main application in providing services for the first sub-application and/or the second sub-application, and initialize to store the first sub-application and/or the application container of the second sub-application; rendering the main page corresponding to the main application; wherein the plurality of modules include an application communication module, a business component module and a statistical management module;
  • the configuration information corresponding to the first sub-application is obtained according to the application unique identifier and the page number unique identifier corresponding to the first sub-application, and the configuration information corresponding to the first sub-application is obtained according to the first sub-application.
  • Apply the corresponding configuration information load the static resources corresponding to the first sub-application and initialize the application communication module to support the first sub-application communicating with the main application; render the corresponding first subpage;
  • the preset login URL corresponding to the second sub-application is obtained according to the application unique identifier and the page number unique identifier corresponding to the second sub-application, and the preset login URL is loaded.
  • the preset login URL is used. If the login is successful, the login state is marked and the second sub-page corresponding to the second sub-application is rendered; the application communication module and the statistics management module are initialized, using To support the second sub-application to communicate with the main application and the second sub-application to support automatic management and on-demand management functions;
  • the main page, the first sub-page and the second sub-page are integrated on the target page.
  • integrated module specifically used for:
  • the main frame corresponding to the main application is loaded, and the main frame is used to represent the page layout.
  • integrated modules are also specifically used for:
  • integrated module specifically used for:
  • the second static resource is the static resource corresponding to the first sub-application .
  • integrated modules are also specifically used for:
  • integrated module specifically used for:
  • the preset login URL corresponding to the second sub-application is obtained through a preset protocol.
  • integrated modules are also specifically used for:
  • the first processing module is specifically used for:
  • the identifier corresponding to each application is obtained.
  • the device provided by the embodiment of the present application can implement the above-mentioned method as shown in the embodiment shown in Figures 1-3. Its implementation principles and technical effects are similar and will not be described again here.
  • FIG. 5 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • the electronic device 500 provided in this embodiment includes: a processor 501, and a memory communicatively connected to the processor. Among them, the processor 501 and the memory 502 are connected through a bus 503.
  • the processor 501 executes the computer execution instructions stored in the memory 502, so that the processor 501 executes the method in the above method embodiment.
  • the processor may be a central processing unit (English: Central Processing Unit, referred to as: CPU), or other general-purpose processor, digital signal processor (English: Digital Signal Processor) Signal Processor (DSP for short), Application Specific Integrated Circuit (English: Application Specific Integrated Circuit (ASIC for short)), etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the memory may include high-speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
  • the bus can be an Industry Standard Architecture (Industry Standard Architecture, ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into address bus, data bus, control bus, etc.
  • the bus in the drawings of this application is not limited to only one bus or one type of bus.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • the processor executes the computer-executable instructions, the application integration method of the above method embodiment is implemented.
  • An embodiment of the present application also provides a computer program product, which includes a computer program.
  • a computer program product which includes a computer program.
  • the application integration method as described above is implemented.
  • the above-mentioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable memory.
  • SRAM static random access memory
  • EEPROM Programmable read-only memory
  • EPROM erasable programmable read-only memory
  • PROM programmable read-only memory
  • ROM read-only memory
  • Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
  • An exemplary readable storage medium is coupled to the processor such that the processor can read information from the readable storage medium and write information to the readable storage medium.
  • the readable storage medium may also be an integral part of the processor.
  • the processor and readable storage medium may be located in Application Specific Integrated Circuits (ASICs for short).
  • ASICs Application Specific Integrated Circuits
  • the processor and the readable storage medium may also exist as discrete components in the device.
  • the aforementioned program can be stored in a computer-readable storage medium.
  • the steps including the above-mentioned method embodiments are executed; and the aforementioned storage media include: ROM, RAM, magnetic disks, optical disks and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

本申请实施例提供应用集成方法及装置,其方法包括:根据获取的每个应用对应的统一资源定位符URL,确定每个应用对应的标识符;根据每个标识符,确定每个应用的类型和每个应用的前端路由信息,应用的类型包括第一应用类型和第二应用类型,第一应用类型的应用包括主应用和第一子应用,第二应用类型的应用包括第二子应用;根据每个应用的类型和每个应用的前端路由信息,加载每个应用,得到目标页面;其中,目标页面是由每个应用集成的页面,且目标页面上的主应用支持为第一子应用和/或第二子应用提供服务。解决了无法有效地实现交互统一、数据互通以及满足多样化需求的应用集成的问题,进而提高用户体验。

Description

应用集成方法及装置
本申请要求于2022年03月24日提交中国专利局、申请号为202210303778.4、申请名称为“应用集成方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,尤其涉及一种应用集成方法及装置。
背景技术
随着技术的发展,前端应用承载的内容日益复杂,特别是在工业领域中,由于工业涉及行业非常多,且每个行业下细分领域,因此,面临大量异构存量系统,具体到每个行业各类系统需求量也非常大,为了满足用户多样化需求,可以通过应用集成实现。
目前,在传统的应用集成中,一般通过单点登录(Single Sign On,SSO)的方式实现应用免登,并在新窗口打开,但是,这种方式应用和应用之间交互上是割裂的,导致用户体验效果较差。
因此,现有的应用集成方法无法有效地实现交互、功能统一,使得用户操作繁琐,进而影响用户体验。
发明内容
本申请实施例提供一种应用集成方法及装置,以解决现有技术无法有效地实现交互、功能统一,使得用户操作繁琐,进而影响用户体验。
第一方面,本申请实施例提供一种应用集成方法,所述方法包括:
根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符;
根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,所述应用的类型包括第一应用类型和第二应用类型,所述第一应用类型的应用包括主应用和第一子应用,所述第二应用类型的应用包括第二子应用;
根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面;
其中,所述目标页面是由每个所述应用集成的页面,且集成后的所述主应用支持为所述第一子应用和/或第二子应用提供服务。
可选的,所述根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,包括:
针对每个所述标识符,执行下述步骤:
根据所述标识符中字符串的组合方式,确定所述应用的类型;
根据所述标识符和对应的所述应用的类型,通过路由解析,得到所述应用的前端路由信息。
可选的,所述根据所述标识符中字符串的组合方式,确定所述应用的类型,包括:
若所述标识符中未含有用于表示应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为主应用;
若所述标识符中含有用于表示路径和应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为第一子应用;
若所述标识符中含有用于表示应用唯一标识和页码唯一标识的字符串,则确定所述应用的类型为第二应用类型且所述应用为第二子应用。
可选的,所述根据所述标识符和对应的所述应用的类型,通过路由解析,得到所述应用的前端路由信息,包括:
若所述应用为第一应用类型中的主应用,则根据所述标识符,得到所述主应用对应的预设路由信息,并将所述预设路由信息作为所述主应用对应的前端路由信息;
若所述应用为第一应用类型中的第一子应用,则根据所述标识符,解析得到所述第一子应用对应的应用唯一标识和页码唯一标识,并将所述第一子应用对应的应用唯一标识和页码唯一标识作为所述第一子应用对应的前端路由信息;
若所述应用为第一应用类型中的第二子应用,则根据所述标识符,解析得到所述第二子应用对应的应用唯一标识和页码唯一标识,并将所述第二子应用对应的应用唯一标识和页码唯一标识作为所述第二子应用对应的前端路由信息。
可选的,所述根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面,包括:
针对每个所述应用,执行下述步骤:
若所述应用为所述主应用,则根据所述主应用对应的预设路由信息,获取到所述主应用对应的配置信息,并根据所述主应用对应的配置信息,加载所述主应用的主体框架;初始化所述主应用中的多个模块,用以支持所述主应用为所述第一子应用和/或第二子应用提供服务,并初始化用于存放所述第一子应用和/或第二子应用的应用容器;渲染所述主应用对应的主页面;其中,所述多个模块包括应用通讯模块、业务组件模块以及统计打点模块;
若所述应用为所述第一子应用,则根据所述第一子应用对应的应用唯一标识和页码唯一标识,获取到所述第一子应用对应的配置信息,并根据所述第一子应用对应的配置信息, 加载所述第一子应用对应的静态资源并初始化所述应用通讯模块,用以支持所述第一子应用向所述主应用通讯;渲染所述第一子应用对应的第一子页面;
若所述应用为所述第二子应用,则根据所述第二子应用对应的应用唯一标识和页码唯一标识,获取到所述第二子应用对应的预设的免登URL,并加载所述预设的免登URL,若免登成功,则对登录态进行标记,并渲染得到所述第二子应用对应的第二子页面;初始化所述应用通讯模块和所述统计打点模块,用以支持所述第二子应用向所述主应用通讯以及所述第二子应用支持自动打点和按需打点功能;
其中,所述主页面、所述第一子页面和第二子页面集成在所述目标页面上。
可选的,根据所述主应用对应的配置信息,加载所述主应用的主体框架,包括:
通过所述主应用对应的预设的配置信息,获取到加载所述主应用所需的第一静态资源;
根据所述第一静态资源,加载所述主应用对应的主体框架,所述主体框架用于表示页面布局;
相应的,所述初始化所述主应用中的多个模块,包括:
对所述主应用、所述第一子应用以及所述第二子应用匹配应用程序接口,用以支持所述主应用分别与所述第一子应用和第二子应用之间通讯;
通过预设的模块打包器,动态加载所述主应用中预先配置的所述业务组件模块并开启所述业务组件模块提供的功能,用以支持所述第一子应用和/或第二子应用通过所述应用通讯模块使用所述主应用中所述业务组件模块提供的功能,所述业务组件模块提供的功能至少包括应用内容在页面上的打开方式;
为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持所述主应用监听第二子应用的统计打点请求,且若监听到所述统计打点请求,则支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。
可选的,所述根据所述第一子应用对应的配置信息,加载所述第一子应用对应的静态资源,包括:
根据所述第一子应用对应的配置信息中的权限点,确定所述第一子应用的用户是否具有访问权限;
若有访问权限,则从所述第一子应用对应的配置信息中获取第二静态资源,并加载所述第二静态资源;所述第二静态资源为所述第一子应用对应的静态资源;
相应的,所述初始化所述应用通讯模块,包括:
对所述主应用和所述第一子应用匹配应用程序接口,用以支持所述主应用与所述第一子应用之间通讯。
可选的,所述根据所述第二子应用对应的应用唯一标识和页码唯一标识,获取到所述第二子应用对应的预设的免登URL,包括:
根据所述第二子应用的应用唯一标识和页码唯一标识,获取所述第二子应用的公钥和密钥;
根据所述公钥和所述密钥,通过预设协议,获取到所述第二子应用对应的预设的免登URL;
相应的,所述初始化所述应用通讯模块和所述统计打点模块,包括:
对所述主应用和所述第二子应用匹配应用程序接口,用以支持所述主应用与所述第二子应用之间通讯;
为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。
可选的,所述根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符,包括:
通过访问获取的每个所述应用对应的URL,得到每个所述应用对应的标识符。
第二方面,本申请实施例提供一种应用集成装置,所述装置包括:
第一处理模块,用于根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符;
第二处理模块,用于根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,所述应用的类型包括第一应用类型和第二应用类型,所述第一应用类型的应用包括主应用和第一子应用,所述第二应用类型的应用包括第二子应用;
集成模块,用于根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面;
其中,所述目标页面是由每个所述应用集成的页面,且所述目标页面上的所述主应用支持为所述第一子应用和/或第二子应用提供服务。
本申请实施例提供的应用集成方法及装置,该方法首先根据获取的每个应用对应的URL,确定每个应用相对应的标识符,然后基于每个应用的标识符,解析得到每个应用所属类型以及前端路由信息,由于不同的应用的类型对应不同的加载方式,因此,通过应用的类型以及前端路由信息相结合,加载相应的应用,渲染并显示每个应用集成的目标页面,在加载应用过程中初始化主应用提供的多个模块,使得集成后的主应用能够支持为所述第一子应用和/或第二子应用提供服务,实现了功能复用且交互统一,无需新窗口打开该各个应用的页面,在一个页面上即可实现操作,为用户提供了便捷的操作,进而提高了用户体验。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的应用集成方法的流程示意图;
图2为本申请实施例提供的目标页面的示意图;
图3为本申请再一实施例提供的应用集成方法的流程示意图;
图4为本申请实施例提供的应用集成装置的结构示意图;
图5为本申请实施例提供的电子设备的硬件结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例还能够包括除了图示或描述的那些实例以外的其他顺序实例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
目前,在传统的应用集成中,一般通过单点登录的方式实现应用免登,并在新窗口打开,但是,这种方式应用和应用之间交互上是割裂的,导致用户体验效果较差因此,现有的应用集成方法无法有效地实现交互、功能统一,使得用户操作繁琐,进而影响用户体验。
为了解决上述问题,本申请的发明构思为:通过iframe的方式加载应用,不同的应用的类型对应不同的加载逻辑,实现应用解耦,同时,基于URL路由解析,通过标识符来获取前端路由信息并依据前端路由信息加载应用,实现交互、功能统一,使得用户操作便捷,进而影响用户体验。
下面以具体实施例对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图1为本申请实施例提供的应用集成方法的流程示意图,本实施例的方法可以由服务器执行,应用于工业场景。如图1所示,本实施例的方法,可以包括:
S101、根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符。
本实施例中,应用在平台上注册后,提供统一资源定位符(Uniform Resource Locator,URL),服务器可以获取到该URL。通过浏览器访问该URL,获取到标识符,比如activeKey。
可选的,根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符,可以通过以下步骤实现:
通过访问获取的每个所述应用对应的URL,得到每个所述应用对应的标识符。
本实施例中,根据访问URL做路由解析,获取activeKey。比如URL为“https://…/iframe?activeKey=…”,解析得到activeKey的字符串。
S102、根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息。
其中,所述应用的类型包括第一应用类型和第二应用类型,所述第一应用类型的应用包括主应用和第一子应用,所述第二应用类型的应用包括第二子应用。
本实施例中,基于标识符中字符串,判断应用是否为第一应用类型(比如一方应用),若是第一应用类型,继续判断该应用是主应用还是第一子应用(一方子应用);若是第二应用类型,则该应用即为第二子应用(比如三方子应用)。通过结合类型以及标识符,获取到应用的前端路由信息,基于前端路由信息可以加载资源并初始化模块,渲染得到目标页面。
S103、根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面;
其中,所述目标页面是由每个所述应用集成的页面,且集成后的所述主应用支持为所述第一子应用和/或第二子应用提供服务。比如,主应用为A开发商开发的数字工厂的整个框架,第一子应用可以为A开发商开发的该数字工厂中衍生或新创建的某些应用(比如企业资源计划(Enterprise Resource Planning,ERP)系统、制造企业生产过程执行系统(Manufacturing Execution System,MES)),第二子应用为B开发商开发的应用。
本实施例中,不同的应用的类型加载应用的方式不同。比如,主应用加载,可以是加载主体框架、应用初始化以及应用容器初始化。第一子应用加载,可以是加载静态资源、初始化主应用预置的应用通讯模块,按需向主应用通讯。第二子应用加载,可以是获取免登URL,加载免登URL,并初始化主应用预置的应用通讯模块、统计打点模块等等。因此,通过上述应用加载进而实现应用集成的方式,无需新窗口打开各个应用的页面,在一个页面上即可实现多窗口打开,实现了交互统一、功能复用,同时简化了用户的操作步骤,便于用户查看,进而提高了用户体验。
本申请提供的应用集成方法,根据获取的每个应用对应的URL,确定每个应用相对应的标识符,然后基于每个应用的标识符,解析得到每个应用所属类型以及前端路由信息,由于不同的应用的类型对应不同的加载方式,因此,通过应用的类型以及前端路由信息相结合,加载相应的应用,渲染并显示每个应用集成的目标页面,在加载应用过程中初始化主应用提供的多个模块,使得集成后的主应用能够支持为所述第一子应用和/或第二子应用提供服务,实现了功能复用且交互统一,无需新窗口打开该各个应用的页面,在一个页 面上即可实现操作,为用户提供了便捷的操作,有效地实现交互统一、数据互通以及满足多样化需求的应用集成,进而提高用户体验
可选的,根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,可以通过以下步骤实现(针对每个所述标识符,执行下述步骤):
步骤a1、根据所述标识符中字符串的组合方式,确定所述应用的类型;
步骤a2、根据所述标识符和对应的所述应用的类型,通过路由解析,得到所述应用的前端路由信息。
本实施例中,通过解析标识符中的字符串,可以确定字符串的组合规则,基于组合规则,可以判断出该应用所属类型。针对该类型的应用,通过标识符,实现路由解析得到前端路由信息,进而拿到应用的配置资源。
可选的,根据每个所述标识符中字符串的组合方式,确定每个所述应用的类型,可以通过以下步骤实现(针对每个所述标识符,执行下述步骤):
步骤b1、若所述标识符中未含有用于表示应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为主应用。
步骤b2、若所述标识符中含有用于表示路径和应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为第一子应用。
步骤b3、若所述标识符中含有用于表示应用唯一标识和页码唯一标识的字符串,则确定所述应用的类型为第二应用类型且所述应用为第二子应用。
本实施例中,若所述标识符中至少含有用于表示路径的字符串,则确定所述应用的类型为第一应用类型,否则为第二应用类型。
示例性的,若activeKey是以/:appId/:path这种规则出现,表示该链接(即URL)为一方子应用(即第一子应用)。这里的appId表示应用唯一标识,path表示路径。其中,该应用需提前配置好相关菜单信息、权限信息、应用购买及开通信息等。
若activeKey是以${appId}_${pageId}的方式出现,如e1cb05ecc58f46fda3d0ac6fa736ea04_1043519,表示该应用为第二方子应用。这里的pageId表示应页码唯一标识。该应用需提前注册,以获得应用ask(即公钥和密钥),且该应用按照SSO协议或者OAuth2.0协议(一种应用/用户授权协议)实现免登接口;需配置相关菜单、权限等信息,并上架应用市场然后根据appId+pageId获取到页面URL。
其中,本实施例的实现是基于用户已购买并开通应用的场景下。
可选的,根据所述标识符和对应的所述应用的类型,通过路由解析,得到所述应用的前端路由信息,可以通过以下步骤实现(针对每个所述应用,执行下述步骤):
步骤c1、若所述应用为第一应用类型中的主应用,则根据所述标识符,得到所述主应用对应的预设路由信息,并将所述预设路由信息作为所述主应用对应的前端路由信息。
步骤c2、若所述应用为第一应用类型中的第一子应用,则根据所述标识符,解析得到所述第一子应用对应的应用唯一标识和页码唯一标识,并将所述第一子应用对应的应用唯一标识和页码唯一标识作为所述第一子应用对应的前端路由信息。
步骤c3、若所述应用为第一应用类型中的第二子应用,则根据所述标识符,解析得到所述第二子应用对应的应用唯一标识和页码唯一标识,并将所述第二子应用对应的应用唯一标识和页码唯一标识作为所述第二子应用对应的前端路由信息。
本实施例中,针对主应用,可以通过路由解析实现应用加载。在加载应用之前,需要先解析到主应用加载所需的静态资源,这里的静态资源至少包括公共资源、各类型的文件等。具体地,若该应用属于主应用,则匹配默认路由(即预设路由信息),然后基于该预设路由信息解析所需静态资源。针对第一子应用和第二子应用,通过路由解析到appId和pageId,根据appId和pageId渲染页面。
可选的,本实施例在上述实施例的基础上,对各个应用是如何实现加载的进行了详细说明。根据所述应用的类型和所述应用的前端路由信息,加载所述应用,得到目标页面,可以通过以下步骤实现(针对每个所述应用,执行下述步骤):
步骤d1、若所述应用为所述主应用,则根据所述主应用对应的预设路由信息,获取到所述主应用对应的配置信息,并根据所述主应用对应的配置信息,加载所述主应用的主体框架;初始化所述主应用中的多个模块,用以支持所述主应用为所述第一子应用和/或第二子应用提供服务,并初始化用于存放所述第一子应用和/或第二子应用的应用容器;渲染所述主应用对应的主页面;其中,所述多个模块包括应用通讯模块、业务组件模块以及统计打点模块。
本实施例中,针对主应用,基于预设路由信息,可以获取到加载主应用所需的配置信息,基于配置信息实现主应用的页面加载和渲染,显示出主页面。
其中,应用在加载过程中,需要初始化,即赋予应用中模块功能,保证模块能够正常提供相应的服务。主应用初始化过程包括应用初始化以及应用容器初始化。这里的应用容器是用来存在集成进来的子应用,比如第一子应用、第二子应用。
可选的,根据所述主应用对应的配置信息,加载所述主应用的主体框架,可以通过以下步骤实现:
步骤d11、通过所述主应用对应的预设的配置信息,获取到加载所述主应用所需的第一静态资源。
步骤d12、根据所述第一静态资源,加载所述主应用对应的主体框架,得到所述主页面;所述主体框架用于表示页面布局。
本实施例中,主应用(不包含应用名)的加载过程可以为:加载主体框架:页面布局(Layout),由三部分组成即包含侧边栏-导航菜单、顶部-工具栏以及应用容器。
可选的,所述初始化所述主应用中的多个模块,可以通过以下步骤实现:
步骤d13、对所述主应用、所述第一子应用以及所述第二子应用匹配应用程序接口,用以支持所述主应用分别与所述第一子应用和第二子应用之间通讯;
步骤d14、通过预设的模块打包器,动态加载所述主应用中预先配置的所述业务组件模块并开启所述业务组件模块提供的功能,用以支持所述第一子应用和/或第二子应用通过所述应用通讯模块使用所述主应用中所述业务组件模块提供的功能,所述业务组件模块提供的功能至少包括应用内容在页面上的打开方式;
步骤d15、为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持所述主应用监听第二子应用的统计打点请求,且若监听到所述统计打点请求,则支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。
具体地,应用初始化:1、初始化应用通讯模块;配置应用程序接口并开启其功能,即通过应用程序接口(postmessage)实现主应用和子应用(比如第一子应用和第二子应用)之间通讯,实现子应用可以调用主应用提供的方法,如打开Tab、全屏等常见功能操作。2、初始化业务组件模块;配置业务组件模块开启其功能,即为了解决传统iframe UI不同步问题,主应用预置常见业务组件(通过模块打包器,比如webpack实现动态加载);比如,数据选择组件,子应用可以通过应用通讯模块,触发主应用打开数据选择弹框,由用户选择数据,并把结果回传子应用,完成后续业务;又比如,子应用有内容希望以弹窗、侧边框等方式打开,传统iframe方式,内容只能局限在子应用容器内,通过这种方式,可以实现内容全局展示。3、初始化统计打点模块;配置统计打点模块并开始其功能,即用于监听子应用统计打点请求,子应用通过相关SDK,实现自动打点和按需打点功能。
其次,初始化应用容器,配置应用容器并开启其功能。即赋予并开启应用容器用于存放集成进来的第一子应用和第二子应用。
步骤d2、若所述应用为所述第一子应用,则根据所述第一子应用对应的应用唯一标识和页码唯一标识,获取到所述第一子应用对应的配置信息,并根据所述第一子应用对应的配置信息,加载所述第一子应用对应的静态资源并初始化所述应用通讯模块,用以支持所述第一子应用向所述主应用通讯;渲染所述第一子应用对应的第一子页面。
本实施例中,第一子应用的加载过程可以为:通过路由解析得到appId和pageId,并根据appId和pageId获取到对应的配置即第一子应用对应的配置信息,进而实现第一子应用加载。具体地,通过路由解析出前端路由信息,通过已预置在应用配置管理(Application Configuration Management,ACM)的配置信息,获取到加载应用所需静态资源,简化后配置如下,其中common为可复用资源配置,navigation为应用资源配置,navigation/:path为具体页面配置,通过配置灵活实现一方子应用渲染,并支持主题切换、权限控制等等。
可选的,根据所述第一子应用对应的配置信息,加载所述第一子应用对应的静态资源,可以通过以下步骤实现:
步骤d21、根据所述第一子应用对应的配置信息中的权限点,确定所述第一子应用的用户是否具有访问权限。
步骤d22、若有访问权限,则从所述第一子应用对应的配置信息中获取第二静态资源,并加载所述第二静态资源。
其中,所述第二静态资源为所述第一子应用对应的静态资源。
本实施例中,根据配置中的权限点,判断当前用户是否有权限访问,无权限则重定向至用于表示无权限的页面。加载配置中的静态资源,前端路由至对应页面。
可选的,所述初始化所述应用通讯模块,可以通过以下步骤实现:
对所述主应用和所述第一子应用匹配应用程序接口,用以支持所述主应用与所述第一子应用之间通讯。
本实施例中,在第一子应用加载过程中,初始化应用通讯模块,配置应用程序接口并开启其功能,即通过应用程序接口实现主应用和第一子应用之间通讯,实现第一子应用可以调用主应用提供的方法,如打开Tab、全屏等常见功能操作。
步骤d3、若所述应用为所述第二子应用,则根据所述第二子应用对应的应用唯一标识和页码唯一标识,获取到所述第二子应用对应的预设的免登URL,并根据所述预设的免登URL,若免登成功,则对登录态进行标记,并渲染得到所述第二子应用对应的第二子页面;初始化所述应用通讯模块和所述统计打点模块,用以支持所述第二子应用向所述主应用通讯以及所述第二子应用支持自动打点和按需打点功能。
其中,所述主页面、所述第一子页面和第二子页面集成在所述目标页面上。
本实施例中,第二子应用的加载过程可以为:通过路由解析得到appId和pageId,并根据appId和pageId获取到预设的免登URL并加载,实现免登,并跳转至目标页面。
可选的,根据所述第二子应用对应的应用唯一标识和页码唯一标识,获取到所述第二子应用对应的预设的免登URL,可以通过以下步骤实现:
步骤d31、根据所述第二子应用的应用唯一标识和页码唯一标识,获取所述第二子应用的公钥和密钥;
步骤d32、根据所述公钥和所述密钥,通过预设协议,获取到所述第二子应用对应的预设的免登URL;
本实施例中,首先,前置条件:独立软件开发商(Independent Software Vendors,ISV)注册应用、用户购买并开通应用。然后基于此场景下,根据appId和pageId获取预先定义好的免登URL,实现免登(SSO、Oauth2.0),加载免登URL,免登成功,设置登录态、跳转至目标页面(已有登录态可以跳过免登,直接跳转目标页面)。同时,该应用集成方法依赖于ISV提供的基础数据;具体地,支持ISV通过应用AKS,向平台同步基础数据(元数据定义、主数据定义、工厂模型、工艺路径等等)实现系统数据、业务数据同步,以实现业务数据分析(质量缺陷分析、成品率分析等等)。
可选的,所述初始化所述应用通讯模块和所述统计打点模块,可以通过以下步骤实现:
步骤e1、对所述主应用和所述第二子应用匹配应用程序接口,用以支持所述主应用与所述第二子应用之间通讯;
步骤e1、为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。其中,所述主页面、所述第一子页面和第二子页面集成在所述目标页面上。
本实施例中,在第二子应用加载过程中,初始化应用通讯模块和统计打点模块。其中,初始化应用通讯模块;配置应用程序接口并开启其功能,即通过应用程序接口实现主应用和第二子应用之间通讯,实现第二子应用可以调用主应用提供的方法,如打开Tab、全屏等常见功能操作。初始化统计打点模块;配置统计打点模块并开始其功能,即用于监听第二子应用统计打点请求,第二子应用通过相关SDK,实现自动打点和按需打点功能。
示例性的,参见图2所示的目标页面的示意图。其中,目标页面包括:1.地址栏;2.菜单:按应用类型区分菜单;3.Tabs:页面多窗口打开;4.功能区:告警、消息、企业信息等等;5.子应用:负责渲染具体内容;6.主应用:负责主体框架初始化、相关sdk初始化等。
本实施例中,结合图3所示,图3为本申请再一实施例提供的应用集成方法的流程示意图。首先,获取到URL,然后通过路由解析,获取标识符并加载对应的应用。具体过程为:首先判断该应用是否为一方应用,若是一方应用,则判断是否为主应用,若是主应用,则匹配默认路由,解析所需静态资源(包含公共资源);基于该静态资源加载主体框架,然后执行应用初始化操作,比如初始化应用通讯模块、业务组件模块、统计打点模块等,再初始化应用容器,根据activeKey加载子应用。
若判断一方应用不是主应用,则确定该应用为一方子应用,匹配路由,根据路由加载对应静态资源,初始化应用通讯模块、统计打点模块等。
若判断该应用不是一方应用,则确定该应用为三方子应用,匹配路由,根据activeKey获取对应应用配置信息,获取免登URL(支持SSO、Oauth2.0两种协议),渲染页面。
具体地,一方应用通过iframe的方式,实现巨石应用解耦,独立开发、独立部署,并与技术栈无关;二三方应用通过iframe+应用免登的方式,实现应用融合,从交互、数据、服务都为一体,用户无感知;通过应用通讯模块,把子应用URL同步至主应用,实现浏览器和iframe URL同步;通过主应用动态注册业务组件,实现子应用和主应用共享组件,实现UI同步;通过基础数据、业务数据、应用服务等集成,实现数据、交互、功能统一;基于iframe,UI改造成本较低。因此,本实施例中,基于iframe轻量化实现应用集成,实现了应用解耦、独立开发、独立部署;异构系统应用集成,与技术栈无关、子应用具备完全自主权;功能复用,保持功能、体验一致性;通过统一系统平台、统一门户入口、统一权限管理和统一的数据模型来集成各个阶段制中需要的所有应用。
基于同样的思路,本申请实施例还提供了上述方法对应的装置,如图4所示,图4为本申请实施例提供的应用集成装置的结构示意图。应用集成装置可以包括:
第一处理模块401,用于根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符;
第二处理模块402,用于根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,所述应用的类型包括第一应用类型和第二应用类型,所述第一应用类型的应用包括主应用和第一子应用,所述第二应用类型的应用包括第二子应用;
集成模块403,用于根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面;
其中,所述目标页面是由每个所述应用集成的页面,且所述目标页面上的所述主应用支持为所述第一子应用和/或第二子应用提供服务。
本实施例中,通过设置第一处理模块401、第二处理模块402、集成模块403,根据获取的每个应用对应的URL,确定每个应用相对应的标识符,然后基于每个应用的标识符,解析得到每个应用所属类型以及前端路由信息,由于不同的应用的类型对应不同的加载方式,因此,通过应用的类型以及前端路由信息相结合,加载相应的应用,渲染并显示每个应用集成的目标页面,在加载应用过程中初始化主应用提供的多个模块,使得集成后的主应用能够支持为所述第一子应用和/或第二子应用提供服务,实现了功能复用且交互统一,无需新窗口打开该各个应用的页面,在一个页面上即可实现操作,为用户提供了便捷的操作,进而提高了用户体验。
可选的,第二处理模块402包括第一处理单元和第二处理单元;第一处理单元,用于针对每个所述应用,根据所述标识符中字符串的组合方式,确定所述应用的类型;第二处理单元,用于针对每个所述应用,根据所述标识符和对应的所述应用的类型,通过路由解析,得到所述应用的前端路由信息。
可选的,第一处理单元,具体用于:
若所述标识符中未含有用于表示应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为主应用;
若所述标识符中含有用于表示路径和应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为第一子应用;
若所述标识符中含有用于表示应用唯一标识和页码唯一标识的字符串,则确定所述应用的类型为第二应用类型且所述应用为第二子应用。
可选的,第二处理单元,具体用于:
若所述应用为第一应用类型中的主应用,则根据所述标识符,得到所述主应用对应的预设路由信息,并将所述预设路由信息作为所述主应用对应的前端路由信息;
若所述应用为第一应用类型中的第一子应用,则根据所述标识符,解析得到所述第一子应用对应的应用唯一标识和页码唯一标识,并将所述第一子应用对应的应用唯一标识和页码唯一标识作为所述第一子应用对应的前端路由信息;
若所述应用为第一应用类型中的第二子应用,则根据所述标识符,解析得到所述第二子应用对应的应用唯一标识和页码唯一标识,并将所述第二子应用对应的应用唯一标识和页码唯一标识作为所述第二子应用对应的前端路由信息。
可选的,集成模块,具体用于:
针对每个所述应用,执行下述步骤:
若所述应用为所述主应用,则根据所述主应用对应的预设路由信息,获取到所述主应用对应的配置信息,并根据所述主应用对应的配置信息,加载所述主应用的主体框架;初始化所述主应用中的多个模块,用以支持所述主应用为所述第一子应用和/或第二子应用提供服务,并初始化用于存放所述第一子应用和/或第二子应用的应用容器;渲染所述主应用对应的主页面;其中,所述多个模块包括应用通讯模块、业务组件模块以及统计打点模块;
若所述应用为所述第一子应用,则根据所述第一子应用对应的应用唯一标识和页码唯一标识,获取到所述第一子应用对应的配置信息,并根据所述第一子应用对应的配置信息,加载所述第一子应用对应的静态资源并初始化所述应用通讯模块,用以支持所述第一子应用向所述主应用通讯;渲染所述第一子应用对应的第一子页面;
若所述应用为所述第二子应用,则根据所述第二子应用对应的应用唯一标识和页码唯一标识,获取到所述第二子应用对应的预设的免登URL,并加载所述预设的免登URL,若免登成功,则对登录态进行标记,并渲染得到所述第二子应用对应的第二子页面;初始化所述应用通讯模块和所述统计打点模块,用以支持所述第二子应用向所述主应用通讯以及所述第二子应用支持自动打点和按需打点功能;
其中,所述主页面、所述第一子页面和第二子页面集成在所述目标页面上。
可选的,集成模块,具体用于:
通过所述主应用对应的预设的配置信息,获取到加载所述主应用所需的第一静态资源;
根据所述第一静态资源,加载所述主应用对应的主体框架,所述主体框架用于表示页面布局。
可选的,集成模块,还具体用于:
对所述主应用、所述第一子应用以及所述第二子应用匹配应用程序接口,用以支持所述主应用分别与所述第一子应用和第二子应用之间通讯;
通过预设的模块打包器,动态加载所述主应用中预先配置的所述业务组件模块并开启所述业务组件模块提供的功能,用以支持所述第一子应用和/或第二子应用通过所述应用通讯模块使用所述主应用中所述业务组件模块提供的功能,所述业务组件模块提供的功能至少包括应用内容在页面上的打开方式;
为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持所述主应用监听第二子应用的统计打点请求,且若监听到所述统计打点请求,则支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。
可选的,集成模块,具体用于:
根据所述第一子应用对应的配置信息中的权限点,确定所述第一子应用的用户是否具有访问权限;
若有访问权限,则从所述第一子应用对应的配置信息中获取第二静态资源,并加载所述第二静态资源;所述第二静态资源为所述第一子应用对应的静态资源。
可选的,集成模块,还具体用于:
对所述主应用和所述第一子应用匹配应用程序接口,用以支持所述主应用与所述第一子应用之间通讯。
可选的,集成模块,具体用于:
根据所述第二子应用的应用唯一标识和页码唯一标识,获取所述第二子应用的公钥和密钥;
根据所述公钥和所述密钥,通过预设协议,获取到所述第二子应用对应的预设的免登URL。
可选的,集成模块,还具体用于:
对所述主应用和所述第二子应用匹配应用程序接口,用以支持所述主应用与所述第二子应用之间通讯;
为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。
可选的,第一处理模块,具体用于:
通过访问获取的每个所述应用对应的URL,得到每个所述应用对应的标识符。
本申请实施例提供的装置,可以实现上述如图1-3所示的实施例的方法,其实现原理和技术效果类似,此处不再赘述。
图5为本申请实施例提供的电子设备的硬件结构示意图。如图5所示,本实施例提供的电子设备500包括:处理器501,以及与所述处理器通信连接的存储器。其中,处理器501、存储器502通过总线503连接。
在具体实现过程中,处理器501执行所述存储器502存储的计算机执行指令,使得处理器501执行上述方法实施例中的方法。
处理器501的具体实现过程可参见上述方法实施例,其实现原理和技术效果类似,本实施例此处不再赘述。
在上述的图5所示的实施例中,应理解,处理器可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合发明所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
存储器可能包含高速RAM存储器,也可能还包括非易失性存储NVM,例如至少一个磁盘存储器。
总线可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component Interconnect,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,本申请附图中的总线并不限定仅有一根总线或一种类型的总线。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现上述方法实施例的应用集成方法。
本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现如上所述的应用集成方法。
上述的计算机可读存储介质,上述可读存储介质可以是由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。可读存储介质可以是通用或专用计算机能够存取的任何可用介质。
一种示例性的可读存储介质耦合至处理器,从而使处理器能够从该可读存储介质读取信息,且可向该可读存储介质写入信息。当然,可读存储介质也可以是处理器的组成部分。处理器和可读存储介质可以位于专用集成电路(Application Specific Integrated Circuits,简称:ASIC)中。当然,处理器和可读存储介质也可以作为分立组件存在于设备中。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (10)

  1. 一种应用集成方法,其特征在于,所述方法包括:
    根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符;
    根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,所述应用的类型包括第一应用类型和第二应用类型,所述第一应用类型的应用包括主应用和第一子应用,所述第二应用类型的应用包括第二子应用;
    根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面;
    其中,所述目标页面是由每个所述应用集成的页面,且所述目标页面上的所述主应用支持为所述第一子应用和/或第二子应用提供服务。
  2. 根据权利要求1所述的方法,其特征在于,所述根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,包括:
    针对每个所述标识符,执行下述步骤:
    根据所述标识符中字符串的组合方式,确定所述应用的类型;
    根据所述标识符和对应的所述应用的类型,通过路由解析,得到所述应用的前端路由信息。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述标识符中字符串的组合方式,确定所述应用的类型,包括:
    若所述标识符中未含有用于表示应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为主应用;
    若所述标识符中含有用于表示路径和应用唯一标识的字符串,则确定所述应用的类型为第一应用类型且所述应用为第一子应用;
    若所述标识符中含有用于表示应用唯一标识和页码唯一标识的字符串,则确定所述应用的类型为第二应用类型且所述应用为第二子应用。
  4. 根据权利要求2或3所述的方法,其特征在于,所述根据所述标识符和对应的所述应用的类型,通过路由解析,得到所述应用的前端路由信息,包括:
    若所述应用为第一应用类型中的主应用,则根据所述标识符,得到所述主应用对应的预设路由信息,并将所述预设路由信息作为所述主应用对应的前端路由信息;
    若所述应用为第一应用类型中的第一子应用,则根据所述标识符,解析得到所述第一子应用对应的应用唯一标识和页码唯一标识,并将所述第一子应用对应的应用唯一标识和页码唯一标识作为所述第一子应用对应的前端路由信息;
    若所述应用为第一应用类型中的第二子应用,则根据所述标识符,解析得到所述第二子应用对应的应用唯一标识和页码唯一标识,并将所述第二子应用对应的应用唯一标识和页码唯一标识作为所述第二子应用对应的前端路由信息。
  5. 根据权利要求4所述的方法,其特征在于,所述根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面,包括:
    针对每个所述应用,执行下述步骤:
    若所述应用为所述主应用,则根据所述主应用对应的预设路由信息,获取到所述主应用对应的配置信息,并根据所述主应用对应的配置信息,加载所述主应用的主体框架;初始化所述主应用中的多个模块,用以支持所述主应用为所述第一子应用和/或第二子应用提供服务,并初始化用于存放所述第一子应用和/或第二子应用的应用容器;渲染所述主应用对应的主页面;其中,所述多个模块包括应用通讯模块、业务组件模块以及统计打点模块;
    若所述应用为所述第一子应用,则根据所述第一子应用对应的应用唯一标识和页码唯一标识,获取到所述第一子应用对应的配置信息,并根据所述第一子应用对应的配置信息,加载所述第一子应用对应的静态资源并初始化所述应用通讯模块,用以支持所述第一子应用向所述主应用通讯;渲染所述第一子应用对应的第一子页面;
    若所述应用为所述第二子应用,则根据所述第二子应用对应的应用唯一标识和页码唯一标识,获取到所述第二子应用对应的预设的免登URL,并加载所述预设的免登URL,若免登成功,则对登录态进行标记,并渲染得到所述第二子应用对应的第二子页面;初始化所述应用通讯模块和所述统计打点模块,用以支持所述第二子应用向所述主应用通讯以及所述第二子应用支持自动打点和按需打点功能;
    其中,所述主页面、所述第一子页面和第二子页面集成在所述目标页面上。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述主应用对应的配置信息,加载所述主应用的主体框架,包括:
    通过所述主应用对应的预设的配置信息,获取到加载所述主应用所需的第一静态资源;
    根据所述第一静态资源,加载所述主应用对应的主体框架,所述主体框架用于表示页面布局;
    相应的,所述初始化所述主应用中的多个模块,包括:
    对所述主应用、所述第一子应用以及所述第二子应用匹配应用程序接口,用以支持所述主应用分别与所述第一子应用和第二子应用之间通讯;
    通过预设的模块打包器,动态加载所述主应用中预先配置的所述业务组件模块并开启所述业务组件模块提供的功能,用以支持所述第一子应用和/或第二子应用通过所述应用通讯模块使用所述主应用中所述业务组件模块提供的功能,所述业务组件模块提供的功能至少包括应用内容在页面上的打开方式;
    为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持所述主应用监听第二子应用的统计打点请求,且若监听到所述统计打点请求,则支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述第一子应用对应的配置信息,加载所述第一子应用对应的静态资源,包括:
    根据所述第一子应用对应的配置信息中的权限点,确定所述第一子应用的用户是否具有访问权限;
    若有访问权限,则从所述第一子应用对应的配置信息中获取第二静态资源,并加载所述第二静态资源;所述第二静态资源为所述第一子应用对应的静态资源;
    相应的,所述初始化所述应用通讯模块,包括:
    对所述主应用和所述第一子应用匹配应用程序接口,用以支持所述主应用与所述第一子应用之间通讯。
  8. 根据权利要求5所述的方法,其特征在于,所述根据所述第二子应用对应的应用唯一标识和页码唯一标识,获取到所述第二子应用对应的预设的免登URL,包括:
    根据所述第二子应用的应用唯一标识和页码唯一标识,获取所述第二子应用的公钥和密钥;
    根据所述公钥和所述密钥,通过预设协议,获取到所述第二子应用对应的预设的免登URL;
    相应的,所述初始化所述应用通讯模块和所述统计打点模块,包括:
    对所述主应用和所述第二子应用匹配应用程序接口,用以支持所述主应用与所述第二子应用之间通讯;
    为所述统计打点模块匹配自动打点和按需打点功能并开启自动打点和按需打点功能,用以支持第二子应用通过获取对应的软件开发工具包SDK,实现自动打点和按需打点功能。
  9. 根据权利要求1-3任一项所述的方法,其特征在于,所述根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符,包括:
    通过访问获取的每个所述应用对应的URL,得到每个所述应用对应的标识符。
  10. 一种应用集成装置,其特征在于,所述装置包括:
    第一处理模块,用于根据获取的每个应用对应的统一资源定位符URL,确定每个所述应用对应的标识符;
    第二处理模块,用于根据每个所述标识符,确定每个所述应用的类型和每个所述应用的前端路由信息,所述应用的类型包括第一应用类型和第二应用类型,所述第一应用类型的应用包括主应用和第一子应用,所述第二应用类型的应用包括第二子应用;
    集成模块,用于根据每个所述应用的类型和每个所述应用的前端路由信息,加载每个所述应用,得到目标页面;
    其中,所述目标页面是由每个所述应用集成的页面,且所述目标页面上的所述主应用支持为所述第一子应用和/或第二子应用提供服务。
PCT/CN2023/083449 2022-03-24 2023-03-23 应用集成方法及装置 WO2023179725A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210303778.4 2022-03-24
CN202210303778.4A CN114661375A (zh) 2022-03-24 2022-03-24 应用集成方法及装置

Publications (1)

Publication Number Publication Date
WO2023179725A1 true WO2023179725A1 (zh) 2023-09-28

Family

ID=82031666

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/083449 WO2023179725A1 (zh) 2022-03-24 2023-03-23 应用集成方法及装置

Country Status (2)

Country Link
CN (1) CN114661375A (zh)
WO (1) WO2023179725A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661375A (zh) * 2022-03-24 2022-06-24 阿里云计算有限公司 应用集成方法及装置
CN117235405A (zh) * 2023-11-09 2023-12-15 北京白龙马云行科技有限公司 页面展示的方法、系统、计算机设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948035A (zh) * 2021-01-29 2021-06-11 北京高途云集教育科技有限公司 微前端页面的控制方法、装置、终端设备及存储介质
CN113761412A (zh) * 2020-09-17 2021-12-07 北京沃东天骏信息技术有限公司 应用页面的显示方法、装置、电子设备、介质及应用系统
CN113806657A (zh) * 2021-09-10 2021-12-17 济南浪潮数据技术有限公司 基于微前端架构的页面加载方法、系统、设备及存储介质
CN114661375A (zh) * 2022-03-24 2022-06-24 阿里云计算有限公司 应用集成方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761412A (zh) * 2020-09-17 2021-12-07 北京沃东天骏信息技术有限公司 应用页面的显示方法、装置、电子设备、介质及应用系统
CN112948035A (zh) * 2021-01-29 2021-06-11 北京高途云集教育科技有限公司 微前端页面的控制方法、装置、终端设备及存储介质
CN113806657A (zh) * 2021-09-10 2021-12-17 济南浪潮数据技术有限公司 基于微前端架构的页面加载方法、系统、设备及存储介质
CN114661375A (zh) * 2022-03-24 2022-06-24 阿里云计算有限公司 应用集成方法及装置

Also Published As

Publication number Publication date
CN114661375A (zh) 2022-06-24

Similar Documents

Publication Publication Date Title
WO2023179725A1 (zh) 应用集成方法及装置
US10705942B1 (en) Simulated testing of API
TW526429B (en) Graphical editor for defining and creating a computer system
WO2020233048A1 (zh) 定制化软件生成方法、系统、电子设备及存储介质
EP1986369B1 (en) End user control configuration system with dynamic user interface
CN1906575B (zh) 动态软件更新系统、方法
US7647370B1 (en) Screen scraping interface
US20180101371A1 (en) Deployment manager
US9569328B2 (en) Managing application log levels in cloud environment
CN109542427B (zh) 一种系统定制方法、装置及电子设备和存储介质
WO2017124976A1 (zh) 一种应用资源获取方法及装置
US11019168B2 (en) System and method for integrating cloud applications into a cloud service broker platform using an automated, universal connector package
US20080288622A1 (en) Managing Server Farms
KR20120128661A (ko) 위젯 프레임워크, 실시간 서비스 결합, 및 실시간 리소스 집계
US11029802B2 (en) Automated command-line interface
US9396053B2 (en) Error handling in a network resource generation environment
US11243753B2 (en) Mobile app publishing for a responsive community experience
CN115795211A (zh) 一种页面展示方法、装置、系统、设备和存储介质
US9779070B2 (en) Providing aggregated data to page generation code for network page generation
CN113485927A (zh) 一种测试数据生成方法、装置、设备及存储介质
US10841175B2 (en) Model driven service state machine linkage methodology and system
Cisco Read Me First - CiscoWorks2000 for Mobile Wireless Release 1.1
RU2571577C2 (ru) Способ выдачи веб-страниц на оборудование пользователя, а также предназначенная для этого система
CN113591000A (zh) 一种浏览器引擎的切换方法和装置及设备
WO2023162260A1 (ja) 環境構築支援装置、システム及び方法、並びに、コンピュータ可読媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23773970

Country of ref document: EP

Kind code of ref document: A1