Application generation method, system and device, module generation method, system and device, equipment, medium and product
By abstracting and processing independent applications to generate target shared modules, and calling them through the first shared interface, the problem of communication complexity between public shared modules and independent applications in the micro front-end architecture is solved, improving the efficiency of application generation and construction, and enhancing the maintainability of applications. sex.
Patent Information
- Application Number
- CN202410558597.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-08-23
AI Technical Summary
In the micro-front-end architecture, the communication protocols between public shared modules and independent applications are not unified, resulting in a complex application generation and construction process and affecting development efficiency and maintainability.
By abstracting independent applications, the target shared module is generated, and the module is called through the first shared interface, so that it has module federation characteristics, supports dependencies and code sharing, and simplifies the combined construction of public shared modules and target shared modules.
It improves the efficiency of application generation and construction, simplifies the development, deployment and maintenance of independent applications, and enhances the maintainability and flexibility of applications.
Smart Images

Figure CN118535151A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to application generation, module generation methods, systems, devices, equipment, media and products. Background Art
[0002] The micro front-end architecture can transform a single-page front-end application from a single monolithic application into an application that aggregates multiple small front-end applications. Each front-end application can be developed and deployed independently, but it still looks like a cohesive single product to users.
[0003] In actual applications, the module federation feature is usually used to help improve application development efficiency and reduce system complexity. However, the execution module needs to support sharing. In some scenarios, there are not only public shared modules that support sharing, but also some independent applications. For example, in order to facilitate independent development, deployment, and testing of applications, independent applications are usually established. When building a target application (for example, a display page), the process of combining public shared modules and independent applications is more complicated and difficult. For example, the communication protocol between public shared modules and independent applications is not unified, and dependencies and codes cannot be shared. Therefore, a solution is needed to improve the application generation capabilities in the micro-frontend architecture. Summary of the invention
[0004] In order to solve or improve the problems existing in the prior art, the embodiments of the present application provide application generation, module generation methods, systems, devices, equipment, media and products.
[0005] In a first aspect, in one embodiment of the present application, a method for generating a target application is provided. The method comprises:
[0006] Determine a plurality of sub-applications required for building a target application; wherein the plurality of sub-applications include: a common shared module and an independent application;
[0007] Searching for a target shared module corresponding to the independent application;
[0008] If the target shared module is found, calling the target shared module through the first shared interface;
[0009] A target application is constructed based on the common shared module and the target shared module.
[0010] In a second aspect, in one embodiment of the present application, a module generation method is provided. The method comprises:
[0011] Identify the individual applications to be processed;
[0012] Abstract the mounting logic of the independent application according to the interface specification of the micro-frontend architecture;
[0013] Determine that the abstract independent module obtained through the abstract processing provides a first shared interface for module sharing externally;
[0014] The abstract independent module is encapsulated into a target shared module supporting sharing based on the first shared interface, and the target shared module serves as a public shared module in the module federation.
[0015] In a third aspect, in one embodiment of the present application, a system for generating an application based on a micro-frontend architecture is provided, the system comprising:
[0016] The module generation end is used to determine the independent application to be processed; abstract the mounting logic of the independent application according to the interface specification of the micro-frontend architecture; determine that the abstract independent module obtained after the abstract processing provides a first shared interface for module sharing; based on the first shared interface, encapsulate the abstract independent module into a target shared module that supports sharing, and the target shared module serves as a public shared module in the module federation;
[0017] An application generation end is used to determine multiple sub-applications required when building a target application; wherein the multiple sub-applications include: a common shared module and an independent application; searching for a target shared module corresponding to the independent application; if the target shared module is found, calling the target shared module through a first shared interface; and building a target application based on the common shared module and the target shared module.
[0018] In a fourth aspect, in one embodiment of the present application, an application generating device is provided, the device comprising:
[0019] A determination unit, used to determine a plurality of sub-applications required for building a target application; wherein the plurality of sub-applications include: a common shared module and an independent application;
[0020] A searching unit, used for searching a target shared module corresponding to the independent application;
[0021] a calling unit, configured to call the target shared module through a first shared interface if the target shared module is found;
[0022] A construction unit is used to construct a target application based on the common shared module and the target shared module.
[0023] In a fifth aspect, in one embodiment of the present application, an electronic device is provided, including a memory and a processor; wherein:
[0024] The memory is used to store programs;
[0025] The processor is coupled to the memory, and is used to execute the program stored in the memory, so as to implement the method described in the first aspect or the method described in the second aspect.
[0026] In the fifth aspect, in one embodiment of the present application, a non-temporary machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the method described in the first aspect, or executes the method described in the second aspect.
[0027] In a sixth aspect, in one embodiment of the present application, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the method described in the first aspect, or executes the method described in the second aspect.
[0028] The technical solution provided by the embodiment of the present application may use many sub-applications when building a target application based on a front-end micro-application. These sub-applications may have multiple types, for example, they may be public shared modules with module federation characteristics, or they may be independent applications that can be independently released, independently tested, and independently maintained. Further, the target shared module corresponding to the independent application required for use is found, and the target shared module has the module federation characteristics. In the case of finding the target shared module corresponding to the independent application, calling the independent application becomes simpler, and the target shared module can be directly called through the first shared interface. Since the target shared module has the module federation characteristics, when building the target application, the target shared module can be called like calling the public shared module, making the target application construction simpler and more efficient. Through the above scheme, a certain independent application can be selectively abstracted into a target shared module, so that the independent application, on the basis of satisfying the characteristics of independent development, release, deployment, etc., the target shared module obtained by abstraction processing also supports module federation characteristics such as dependency sharing and code sharing, so that it is simpler and more efficient to build the target application by comprehensively utilizing the target shared module and the public shared module. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 A schematic diagram of an application generation system based on a micro-frontend architecture provided in an embodiment of the present application;
[0031] Figure 2 A flowchart of an application generation method provided in an embodiment of the present application;
[0032] Figure 3a An application generation schematic diagram is provided for illustrating an example of an embodiment of the present application;
[0033] Figure 3b Another application generation schematic diagram is illustrated as an example of an embodiment of the present application;
[0034] Figure 4 A schematic diagram of a module generation method proposed in an embodiment of the present application;
[0035] Figure 5a A schematic diagram of an application generation device provided in an embodiment of the present application;
[0036] Figure 5b A schematic diagram of a module generation device provided in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0039] In some processes described in the specification, claims and the above-mentioned figures of the present application, multiple operations appearing in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit "first" and "second" to different types. In addition, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0040] With the development of network technology, the demand for web page development is increasing, and the frequency and content of web page content updates are becoming more and more diverse. For the staff who develop and maintain backend web pages, this will undoubtedly increase the workload. Moreover, if there are many changes to the content, the work efficiency will be relatively low. Therefore, micro-frontend technology is used for web page development in many application scenarios, especially large and complex web page application scenarios. The front-end architecture can split a huge front-end application into multiple small, independent front-end sub-applications, which can be independently developed, tested, and deployed, and integrated together through the micro-frontend architecture. This can improve the parallelism of development and reduce the coupling of code, thereby improving the overall development efficiency and maintainability of the application. In order to further improve the efficiency of application development, a module federation technology is also proposed, which can be used to split the code into multiple independent modules and dynamically load these modules as needed at runtime. This can not only improve development efficiency and reduce duplicate code. However, in the micro-frontend architecture, the previously developed independent applications can be used for independent development, testing, deployment, and release, etc., with good independent management effects. However, the various public shared modules in the module federation cannot communicate and interact with independent applications. During the development process, public shared modules can be easily mounted to the main application directory, but independent applications require users to manually load, mount, and perform other tedious operations before they can be combined with public shared modules to obtain the target application. Obviously, the compatibility between independent applications and public shared modules is very poor, and even affects the overall work efficiency of using module federation technology to generate target applications. Therefore, a solution is needed to improve the work efficiency of using independent applications and public shared modules to jointly build applications.
[0041] Terminology explanation:
[0042] Micro front-end: Micro front-end architecture is an architectural concept similar to microservices. It transforms a single-page front-end application from a single monolithic application to an application that aggregates multiple small front-end applications. Each front-end application can be developed and deployed independently, but it still looks like a cohesive single product to the user. The main advantages of this architectural approach include improving development efficiency, reducing system complexity, and improving user experience. In the micro front-end architecture, each module or sub-application can choose a technology stack that suits it, which improves development efficiency and flexibility. At the same time, since each module is an independent application, it can be deployed and upgraded independently, which reduces the complexity of teamwork and makes parallel development and rapid iteration possible. In addition, when an application needs to add new features or modules, it only needs to develop and integrate new modules without refactoring the entire application, thereby achieving application scalability.
[0043] Micro-frontend tool library: mainly contains some tools and libraries for building and managing micro-frontend architecture. These tool libraries can help developers create, integrate and deploy micro-frontend applications more efficiently. The following are some common micro-frontend tool libraries: qiankun: is a micro-frontend implementation library based on single-spa. It aims to help developers build a production-available micro-frontend architecture system more simply and painlessly. Qiankun realizes independent development and deployment of applications by loading and isolating sub-applications, and provides communication and collaboration mechanisms between sub-applications. single-spa: single-spa is a lightweight micro-frontend framework that allows developers to use different technology stacks to write each micro-frontend application, and manage communication and collaboration between applications through routing and lifecycle hook functions. In addition, it also includes: MicroApp, wujie, garfish, etc.
[0044] Module Federation: It is an important feature in webpack 5. It allows multiple independent modules to build an application, and these independent builds will not depend on each other, so they can be developed and deployed separately. The core idea of Module Federation is to split the code into multiple independent modules and dynamically load these modules as needed at runtime. This can not only improve development efficiency and reduce duplicate code, but also make the application more flexible and scalable.
[0045] In order to solve the above technical problems, this application proposes an application generation system solution based on a micro front-end architecture. Figure 1 A schematic diagram of an application generation system based on a micro-frontend architecture provided in an embodiment of the present application. Figure 1 As can be seen in the figure, in the present application scheme, an application generation system based on a micro-frontend architecture includes:
[0046] The module generation end 1 is used to determine the independent application to be processed; abstract the mounting logic of the independent application according to the interface specification of the micro-front-end architecture; determine that the abstract independent module obtained after the abstract processing provides a first shared interface for module sharing; based on the first shared interface, encapsulate the abstract independent module into a target shared module that supports sharing, and the target shared module serves as a public shared module in the module federation.
[0047] The application generation end 2 is used to determine multiple sub-applications required for building a target application; wherein the multiple sub-applications include: a common shared module and an independent application; searching for a target shared module corresponding to the independent application; if the target shared module is found, calling the target shared module through a first shared interface; and building a target application based on the common shared module and the target shared module.
[0048] In actual applications, the server (for example, a local server or a cloud server) can abstract the independent application into a target shared module, and the server can also use the public shared module and the target shared module to jointly build the target application. Of course, a designated computer or server can also abstract the independent application into a target shared module, and then another computer or server can use the public shared module and the target shared module to jointly build the target application. In other words, there may be many ways to structure the above system. Among them, Figure 1 The structural diagram of the system is an example of a system structure. In actual applications, users can select a suitable system structure according to their needs, or adjust it according to their needs. However, the system needs to include a module generation end 1 and an application generation end 2.
[0049] In an optional solution, the user can initiate an application generation request to the server through the client 3. Then, the application generation module combines the target sharing module and the public sharing module to obtain the target application according to the user's application generation request. Since the target sharing module here has the module federation feature, it can be simpler when calling the target sharing module, and the target sharing module and the public sharing module can communicate. In addition, the independent application module is still independently developed and maintained, which makes the development and maintenance of the independent application module simpler and more efficient, and also realizes the isolation between different applications.
[0050] It should be noted that the module federation feature mentioned here mainly refers to the dependency sharing and code sharing functions provided by module federation. Dependency sharing is a core feature of module federation. In the micro-frontend architecture, different applications may depend on the same library or module. The traditional approach is that each application contains a complete copy of these dependencies, which leads to a lot of code redundancy and unnecessary loading. Module federation allows these dependencies to be shared dynamically at runtime, that is, after an application loads a dependency, other applications can reuse the already loaded dependency without having to load it again. This can not only reduce code redundancy and optimize page loading performance, but also reduce the overall size of the application and improve user experience.
[0051] Code sharing is another important feature of module federation. Through module federation, different applications can share and reuse the same code snippets or components. This means that developers can create a common component or module and use it in multiple applications without having to rewrite the same code in each application. This not only improves code reuse and reduces development workload, but also ensures that the same components or modules in different applications have consistent behavior and appearance.
[0052] In addition, module federation also provides dynamic loading capabilities. At runtime, applications can dynamically load code or modules from other applications as needed, which increases the flexibility and scalability of applications. By making reasonable use of these features, developers can build more efficient, maintainable, and user-friendly front-end applications. It should be noted that although module federation provides a lot of convenience, in actual use, it is also necessary to carefully handle issues such as dependency management and version control to ensure the stability and maintainability of the application.
[0053] The technical solution implemented in this application will be explained below in conjunction with specific embodiments.
[0054] like Figure 2 The following is a flow chart of the application generation method provided in the embodiment of the present application. The method can be run in a computing device such as a local computer or a cloud computer. Figure 2 You can see that the specific steps include the following:
[0055] 201: Determine a plurality of sub-applications required for building a target application; wherein the plurality of sub-applications include: a common shared module and an independent application.
[0056] 202: Searching for a target shared module corresponding to the independent application.
[0057] 203: If the target shared module is found, calling the target shared module through the first shared interface.
[0058] 204: Build a target application based on the common shared module and the target shared module.
[0059] The specified architecture mentioned here can be a micro-frontend architecture implemented based on the qiankun tool library.
[0060] The independent applications mentioned here can be understood as those that can be independently developed, tested, deployed, and released. For example, in the micro-frontend architecture scenario, when using independent applications to build the target application, users need to manually maintain the loading, mounting, and unloading of each application, and manually handle global variable pollution, global style pollution, etc. Although independent applications have a good decoupling effect, when using multiple independent applications to jointly build the target application, users need to manually handle a lot of work, and the overall work efficiency is not high.
[0061] Furthermore, the micro-frontend tool (such as qiankun) can be used to abstract the independent application to obtain the target shared module. For example, the steps of using the micro-frontend tool (such as qiankun) to abstract the independent application to obtain the target shared module are as follows:
[0062] Before starting to abstract independent applications, you first need to sort out the interface specifications of the micro-frontend architecture. This includes determining the communication protocols, data formats, lifecycle events, etc. between different modules in the micro-frontend architecture. By sorting out the interface specifications, you can ensure that the subsequent abstract processing of independent applications can meet the requirements of the overall architecture.
[0063] According to the interface specifications of the micro-frontend architecture, the mounting logic of independent applications is abstracted. This includes extracting the mounting, unmounting, and communication logic of independent applications from the specific application code to form a set of general abstract logic. The advantage of this is that the actual scenario logic of independent applications can be decoupled from the mounting logic of the micro-frontend architecture, making independent applications easier to integrate and expand.
[0064] After the abstract processing is completed, it is necessary to determine the first shared interface provided by the abstract independent module for module sharing. These interfaces should include module initialization, data acquisition, event monitoring and other functions, so that other applications or modules can interact with the abstract independent module through these interfaces.
[0065] Based on the determined first shared interface, the abstract independent module is encapsulated into a target shared module that supports sharing. In this process, it is necessary to ensure that the target shared module complies with the specifications of the module federation and can be seamlessly integrated with other modules. At the same time, factors such as module loading performance and security need to be considered to ensure the stability and availability of the target shared module.
[0066] Integrate the encapsulated target shared module into the micro front-end architecture and conduct detailed testing. This includes unit testing, integration testing, and system testing to ensure that the target shared module can work properly and there are no problems with the interaction with other modules. In addition, relevant documents need to be written, including instructions for use and interface documents of the target shared module, so that other developers can understand and use it. At the same time, a maintenance mechanism needs to be established to continuously monitor and maintain the target shared module to ensure that it can be continuously optimized and improved as demand develops. Through the above steps, micro front-end tools (such as qiankun) can be used to abstract independent applications to obtain target shared modules that support sharing, thereby realizing sharing and collaboration between public shared modules and independent applications in the micro front-end architecture.
[0067] After the target shared module is obtained through the above-mentioned processing method, the target shared module can be stored together with the public shared module. For example, it can be stored in a specified module library or a specified tool library. And it is uniformly managed and maintained by the registration center of the micro front-end architecture.
[0068] In actual applications, if you determine that a standalone application is needed as part of building the target application, you can find the target shared module corresponding to the standalone application. Use the registration center in the micro-frontend architecture to query the registered and available target shared modules. The registration center usually maintains a list of modules (including public shared modules and target shared modules), including the module's identification, version, interface and other information. After finding the target shared module, version matching is required. Make sure that the module version found is compatible with the version required by the standalone application. If there are multiple versions, you may need to select according to certain strategies (such as the latest version first, specified version, etc.). It should be noted that the target shared module may have other dependent modules and dependent codes. Before loading the target shared module, you need to parse its dependencies to ensure that all necessary dependent modules are loaded and available.
[0069] After finding the target shared module, it can be called through the first shared interface. The first shared interface is a standardized interface defined in the micro-frontend architecture for communication and collaboration between different applications. By calling these interfaces, the target shared module obtained by abstract processing of independent applications can provide services, data or functions like other public shared modules. Finally, based on the public shared module and the called target shared module, the target application is built. This process usually includes integrating the various sub-applications together to ensure that they can work together correctly. Some configuration and debugging may be required during the integration process to ensure the stability and performance of the application. In addition, during the construction process, it is also necessary to consider issues such as application loading performance, error handling, and security. For example, the sub-application can be loaded in a lazy loading manner to increase the initial loading speed of the application; at the same time, a reasonable error handling mechanism needs to be designed so that problems can be discovered and solved in time when the application has problems. Through the above steps, the public shared modules and target shared modules in the micro-frontend architecture can be effectively used to build the target application, improving development efficiency and application maintainability.
[0070] In one or more embodiments of the present application, if the target shared module is found, the target shared module is called through the first shared interface, including: judging whether the target shared module needs to be loaded repeatedly based on the specified architecture; if not loaded, calling the target shared module through the first shared interface; if loading has been completed and the loading mark indicates that repeated loading is not required, mounting the target shared module to the application directory according to the application generation requirements.
[0071] For example, assuming that the dependency management implementation injected by the webpack build tool is used, the underlying _webpack_require_ function determines whether repeated loading is required. Specifically, a module (either a public shared module or a target shared module) cache object is maintained inside the _webpack_require_ function to store the modules that have been loaded. In this way, when multiple attempts to load the same module are made, it can be directly obtained from the cache to avoid repeated loading. When a module needs to be loaded, the _webpack_require_ function will find the corresponding module code based on the module id. If the module code is loaded asynchronously (for example, through code splitting or dynamic import), _webpack_require_ will wait until the module is loaded before executing. Once the module code is loaded into memory, the _webpack_require_ function will execute the module code and return the module's export object. If the module has dependencies on other modules, _webpack_require_ will recursively load and execute these dependent modules. It should be noted that if errors occur during the loading or execution of the module, the _webpack_require_ function will catch these errors and may throw or log them. Through the _webpack_require_ function, webpack can achieve efficient module loading and caching, ensuring that each module is loaded only once, thereby improving application performance. At the same time, it also makes modular development more flexible and scalable. Developers can load and execute modules on demand, achieving more refined code splitting and optimization.
[0072] In one or more embodiments of the present application, mounting the target shared module to the application directory according to the application generation requirements includes: if an uninstall request for the target shared module is received during the mounting process, terminating the mounting; and loading the independent application corresponding to the target shared module into the target application.
[0073] In actual applications, when abstracting independent applications, it is necessary not only to encapsulate the interface to obtain the first shared interface that can be called. It is also necessary to encapsulate these processes and reference states through createSubItem: Mounting needs to wait to ensure that loading is complete, unmounting and mounting are mutually exclusive, and the mount will not be mounted again after unmounting is triggered during the mount waiting period, and it can be mounted again after unmounting. Through the life cycle of the target shared module processed by abstraction, mounting is triggered during onMounted and unmounting is triggered during onBeforeUnmount.
[0074] To facilitate understanding, specific embodiments will be used as examples below.
[0075] The createSubItem function maintains several key status variables, such as isMounted (indicating whether it has been mounted), isMounting (indicating whether it is being mounted), and unmountCallback (for unmount callbacks triggered before mounting is completed). When the mount method is called, the status of isMounted and isMounting is checked first. If it has been mounted or is being mounted, it returns directly without executing the mounting logic. Otherwise, isMounting is set to true to start simulating the asynchronous loading process (for example, loading data or performing other initialization tasks).
[0076] After the loading is complete, isMounted is set to true, isMounting is set to false, and unmountCallback (if any) is called to perform the actual unmounting logic (this is because the unmounting may have been triggered before the loading was completed).
[0077] When the unmount method is called, check the status of isMounted and isMounting. If it is not mounted and not being mounted, return directly without executing the unmount logic. Otherwise, set isMounted to false and clear the reference to unmountCallback.
[0078] If unmounting is triggered during the mount process, the unmount method will set unmountCallback. When the mount is completed, it will check whether unmountCallback exists. If it exists, it will be executed to ensure that the unmounting logic triggered before the mount is completed is executed. In this way, mounting and unmounting are mutually exclusive, ensuring that no new mount operations will be performed during the mount process, and remounting can be performed after unmounting.
[0079] In Vue components, use the onMounted hook to trigger the mounting process. This ensures that when the component is mounted to the DOM, the SubItem also starts loading. Use the onBeforeUnmount hook to trigger the unmounting process. This ensures that when the component is about to be unmounted from the DOM, the SubItem is also properly unmounted, avoiding memory leaks and other potential problems.
[0080] In one or more embodiments of the present application, the method further includes: if the target sharing module corresponding to the independent application is not found, and after receiving a publishing request for the independent application, publishing the independent application in a designated target application.
[0081] As mentioned above, after an independent application is abstracted into a target shared module, it can be called easily and quickly through the first shared interface together with other public shared modules. However, not all independent applications are abstracted into target shared modules. For example, some independent applications may not be allowed to be called by other applications, or refuse to share dependencies or code. In this case, such independent applications cannot be encapsulated into target shared modules.
[0082] like Figure 3a The following is a schematic diagram of an application generation method for illustrating an embodiment of the present application. Figure 3a As can be seen in the figure, the public shared module includes application 1, application 2, and independent application 3. After abstraction, the independent application 3 is converted into target shared module 4 (multiple target shared modules can be managed by component container). When building the target application, any one or more applications in the public shared module set and target shared module 4 can be used to jointly generate the target application. In addition, from Figure 3a It can be seen that each application in the public sharing module belongs to the main application, which means that when the public sharing module needs to be upgraded or modified, the main application also needs to be re-published as a whole after modification. In this embodiment, the maintenance and management of the main application and the public sharing module can be carried out simultaneously to improve maintenance efficiency.
[0083] like Figure 3b Another application generation schematic diagram is illustrated in the embodiment of the present application. Figure 3b As can be seen in the figure, the public shared module includes application 1, application 2, and independent application 3. After abstraction, the independent application 3 is converted into target shared module 4 (multiple target shared modules can be managed by the component container). When building the target application, any one or more applications in the public shared module set and target shared module 4 can be used to jointly generate the target application. Figure 3b The main application, public shared module and independent application are independent of each other, that is, when the public shared module can be upgraded or modified independently, it will not affect the main application (the main application does not need to be re-released together with the public shared module). In this embodiment, the main application and the public shared module are better decoupled and can be maintained and managed separately.
[0084] based on Figure 3a and Figure 3bIn the structure shown, if the target shared module corresponding to the target application is not found, the independent application 3 can be directly combined into the target application. For example, if the target shared module corresponding to the independent application is not found through the identification or ID, the user can manually process it. That is, when there is a need to publish the independent application, the independent application can be published in the target application. Through the above scheme, it is not necessary to abstract all independent applications into target shared modules, but to selectively abstract them according to actual conditions. While being able to meet the use requirements of the module federation feature, it also avoids unnecessary abstract processing.
[0085] For example, suppose the target application is the homepage of a website. As Arbor Day is approaching, add an Arbor Day icon to the title bar of the homepage. At this time, the Arbor Day icon only needs to be displayed on the homepage and will not be called by applications on other pages. In other words, there is no need to call it multiple times, and there is no need to share dependencies and code. Therefore, there is no need to abstract the independent application into a target shared module. You can directly use the Arbor Day icon to add it to the homepage page.
[0086] In one or more embodiments of the present application, building a target application based on the common shared module and the target shared module includes: obtaining shared dependencies provided by the target shared module through a first shared interface provided by the target shared module to the outside, the shared dependencies including: at least one of tool dependencies, framework dependencies and visualization libraries; and building the target application by combining the shared dependencies with the common shared module.
[0087] By calling the first shared interface, all necessary shared dependencies provided by the target shared module are obtained. Specifically including: Tool dependency: refers to the various tool classes or tool methods provided by the target shared module. These tools can help developers complete some common tasks more efficiently, such as data processing, file operations, etc. Framework dependency: refers to the framework or library contained in the target shared module. These frameworks or libraries provide developers with the skeleton or basic functions for building applications, such as Web development framework, database access framework, etc. Visualization library: refers to the library provided in the target shared module for creating graphical interfaces or visualization effects. These libraries can help developers display data or information more intuitively.
[0088] Integrate the public shared modules with other parts of the target application to ensure that they can work together. Integrate the acquired shared dependencies (tool dependencies, framework dependencies, visualization libraries, etc.) into the development of the target application to speed up the development process and improve the quality of the application. Perform comprehensive testing and debugging on the target application that integrates shared dependencies and public shared modules to ensure the stability and performance of the application. After the testing and debugging pass, deploy the target application to the target environment for users to use. By utilizing shared dependencies and public shared modules, the development efficiency and quality of the target application can be greatly improved. The standardized and modular design of shared dependencies makes it easier to maintain and upgrade applications.
[0089] Based on the same idea, the present application embodiment also proposes a module generation method. Figure 4 A flowchart of a module generation method proposed in an embodiment of the present application is shown in FIG. Figure 4 You can see that the specific steps include the following:
[0090] 401: Identify the standalone application to be processed.
[0091] 402: Abstract the mounting logic of the independent application according to the interface specification of the micro-frontend architecture.
[0092] 403: Determine that the abstract independent module obtained through the abstract processing provides a first shared interface for module sharing.
[0093] 404: Encapsulate the abstract independent module into a target shared module supporting sharing based on the first shared interface, and the target shared module serves as a public shared module in the module federation.
[0094] In actual applications, before building the target application, you first need to identify the multiple sub-applications you need. These sub-applications usually include common shared modules and independent applications. These common shared modules contain common functions or components that may be used by multiple sub-applications. By abstracting these common parts, you can increase code reuse and reduce duplicate development. Common shared modules should be stable and maintainable to ensure the stability and consistency of the entire system. These independent applications are components of the target application, and each independent application is responsible for implementing specific functions or interfaces. Independent applications should be loosely coupled so that they can be independently developed, tested, and deployed. Each independent application may contain its own unique logic, components, and styles.
[0095] After determining the required sub-applications, the next step is to find the target shared module corresponding to the independent application. This usually involves the following steps: Use the registration center in the micro-frontend architecture to query the registered and available target shared modules. The registration center usually maintains a list of modules, including the module's identification, version, interface and other information. After finding the target shared module, version matching is required. Make sure that the module version found is compatible with the version required by the independent application. If there are multiple versions, you may need to select according to certain strategies (such as the latest version first, specified version, etc.). The target shared module may have other dependent modules. Before loading the target shared module, you need to resolve its dependencies to ensure that all necessary dependent modules are loaded and available. Once the target shared module is found, it can be called through the first shared interface. The first shared interface is a standardized interface defined in the micro-frontend architecture for communication and collaboration between different applications. By calling these interfaces, independent applications can obtain services, data or functions provided by the target shared module.
[0096] Build the target application based on the public shared module and the called target shared module. This process usually includes integrating the various sub-applications together to ensure that they can work together correctly. Some configuration and debugging may be required during the integration process to ensure the stability and performance of the application. During the construction process, it is also necessary to consider issues such as application loading performance, error handling, and security. For example, you can use lazy loading to load sub-applications to increase the initial loading speed of the application; at the same time, you also need to design a reasonable error handling mechanism so that you can discover and solve problems in the application in a timely manner. Through the above steps, you can effectively use the public shared modules and target shared modules in the micro-frontend architecture to build the target application, improve development efficiency and application maintainability.
[0097] Through the above solution, independent applications are abstracted into target shared modules with module federation characteristics. As a result, independent applications can also share dependencies and codes like public shared modules. It is simpler and more efficient to call each sub-application when building an application.
[0098] In one or more embodiments of the present application, the abstract processing of the mounting logic of the independent application according to the interface specification of the micro-frontend architecture includes:
[0099] Abstract the independent applications using the interfaces and specification standards provided by the micro-frontend architecture;
[0100] During the abstract processing, the mounting logic of the abstract independent module obtained after the abstract processing is improved based on the fact that the URL and independent interface of the independent application remain unchanged; wherein the mounting logic includes at least the life cycle of the abstract independent module, the communication mechanism and the first shared interface for mounting.
[0101] Specifically, in the abstraction process, first, the interface of the independent application is standardized. This includes unifying the interface definition method, parameter format and return value specification to ensure that the abstracted module can seamlessly connect with other micro-frontend components or applications. The functions of the independent application are split into multiple modules, each of which is responsible for one or more specific functional points. The advantage of this is that it improves the reusability and maintainability of the code, while allowing each module to be tested and optimized independently. Integrate the communication mechanism of the independent application to make it conform to the communication standard of the micro-frontend architecture. This may involve processing in terms of message passing, event triggering, and state sharing. Through a unified communication mechanism, the abstract independent module can interact efficiently with other components or applications. According to the lifecycle management requirements of the micro-frontend architecture, define clear lifecycle stages for the abstract independent module, such as loading, initialization, mounting, and unloading. Ensure that the corresponding logical operations can be performed at each stage to support dynamic loading and unloading of modules.
[0102] When perfecting the mounting logic, it is necessary to ensure that the URL routing of the independent application remains unchanged. This means that when a user visits a certain URL, the corresponding abstract independent module can be correctly loaded and mounted. To achieve this, it may be necessary to implement a routing mapping mechanism in the micro-frontend architecture to map the URL to the corresponding module. Keeping the independent interface of the independent application unchanged is one of the keys to abstract processing. This means that during the abstraction process, these interfaces need to be integrated into the abstract independent module and ensure the integrity and correctness of their functions. In this way, other components or applications can interact with the abstract independent module by calling these interfaces. Perfect the mounting logic of the target shared module to ensure that it can be seamlessly integrated with other components or applications. The mounting logic should include but is not limited to operations such as module loading, initialization, rendering, and unloading. In the loading and initialization phases, necessary resource loading and configuration operations can be performed; in the rendering phase, ensure that the module can be correctly displayed on the page; in the unloading phase, clean up resources and release memory. In addition to the basic communication mechanism integration, the functions of the communication mechanism can also be extended according to specific needs. For example, functions such as cross-module data sharing, event monitoring and triggering can be implemented to improve the efficiency of collaborative work between modules.
[0103] In one or more embodiments of the present application, determining the independent application to be processed as described in step 401 includes: analyzing the association relationship between the independent application and other sub-applications in the main application; if the analysis result shows that the independent application has an association relationship with N other sub-applications, wherein N is greater than a quantity threshold, then determining the independent application as the independent application to be processed. If N is less than the quantity threshold, the independent application does not need to be abstracted as a target shared module, in other words, the independent application does not need to be treated as an independent application to be processed.
[0104] When abstracting independent modules, you can abstract them selectively. You can abstract independent applications that need to be called multiple times as target shared modules, and independent applications that only need to be used once or twice do not need to be abstracted. When there is a call requirement, the user manually schedules the mount of the independent application by passing in the parameter subApp.mount({userId:store.userId}).
[0105] The association relationship mentioned here can be understood as other sub-applications that have a calling relationship with the independent application. N can be understood as the number of other sub-applications that have calling requirements for the independent application. When an independent application needs to be called by N sub-applications, and N is greater than (or greater than or equal to) the quantity threshold (for example, the quantity threshold is 5), it means that the independent application is called many times, and it needs to be abstracted as a target shared module, which is conducive to improving application generation efficiency and facilitating sub-application management. When an independent application needs to be called by N sub-applications, and N is less than the quantity threshold (for example, the quantity threshold is 5), it means that the independent application is called less times, and it does not need to be abstracted as a target shared module, and it can still be used as an independent application.
[0106] In one or more embodiments of the present application, the determination that the abstract independent module obtained after abstraction processing provides a first shared interface for module sharing to the outside world includes: encapsulating the independent interface of the independent application to obtain the first shared interface for module sharing that can be recognized by the micro-front-end architecture; or, adding the first shared interface for module sharing that can be recognized by the micro-front-end architecture to the abstract independent module.
[0107] In the process of encapsulating independent applications into components, developers may need to appropriately encapsulate and adapt the original independent application APIs so that they can be connected and integrated with qiankun's APIs. Specifically, when encapsulating the interface, according to qiankun's requirements, the original independent application APIs are encapsulated to meet the specifications of the micro-frontend architecture. This may include converting the original application APIs into a format that qiankun can recognize, or adding additional interfaces to meet the requirements of the micro-frontend architecture.
[0108] Based on the same idea, an embodiment of the present application also provides an application generating device. Figure 5a A schematic diagram of an application generation device provided in an embodiment of the present application. Figure 5a It can also be seen that the device includes:
[0109] The determination unit 51 is used to determine a plurality of sub-applications required for constructing a target application; wherein the plurality of sub-applications include: a common shared module and an independent application.
[0110] The searching unit 52 is used to search for the target shared module corresponding to the independent application.
[0111] The calling unit 53 is configured to call the target shared module through the first shared interface if the target shared module is found.
[0112] The construction unit 54 is configured to construct a target application based on the common shared module and the target shared module.
[0113] A calling unit 53, configured to determine whether the target shared module needs to be loaded repeatedly based on a specified architecture;
[0114] If not loaded, calling the target shared module through the first shared interface;
[0115] If the loading has been completed and the loading mark indicates that repeated loading is not required, the target shared module is mounted to the application directory according to the application generation requirements.
[0116] The calling unit 53 is configured to terminate the mounting if an uninstallation request for the target shared module is received during the mounting process;
[0117] The independent application corresponding to the target shared module is loaded into the target application.
[0118] The calling unit 53 is configured to publish the independent application in a designated target application if the target shared module corresponding to the independent application is not found and after receiving a publishing request for the independent application.
[0119] A construction unit 54 is configured to obtain a shared dependency provided by the target shared module through a first shared interface provided externally by the target shared module, wherein the shared dependency includes at least one of a tool dependency, a framework dependency, and a visualization library;
[0120] The target application is constructed by combining the shared dependency with the public shared module.
[0121] Based on the same idea, an embodiment of the present application also provides a module generation device. Figure 5bA schematic diagram of a module generation device provided in an embodiment of the present application. Figure 5b It can also be seen that the device includes:
[0122] The determining unit 55 is used to determine the independent application to be processed.
[0123] The processing unit 56 is used to abstract the mounting logic of the independent application according to the interface specification of the micro-frontend architecture.
[0124] The determining unit 55 is further used to determine that the abstract independent module obtained through the abstraction process provides a first shared interface for module sharing.
[0125] The encapsulation unit 55 is used to encapsulate the abstract independent module into a target shared module supporting sharing based on the first shared interface, and the target shared module serves as a public shared module in the module federation.
[0126] The processing unit 56 is used to perform abstract processing on the independent application by using the interface and specification standards provided by the micro-frontend architecture;
[0127] During the abstract processing, the mounting logic of the abstract independent module obtained after the abstract processing is improved based on the fact that the URL and independent interface of the independent application remain unchanged; wherein the mounting logic includes at least the life cycle of the abstract independent module, the communication mechanism and the first shared interface for mounting.
[0128] A determination unit 55, configured to analyze the association relationship between the independent application and other sub-applications in the main application;
[0129] If the analysis result is that the independent application has an association relationship with N other sub-applications, wherein N is greater than a quantity threshold, the independent application is determined to be the independent application to be processed.
[0130] The determining unit 55 is configured to encapsulate the independent interface of the independent application to obtain the first shared interface for module sharing that can be recognized by the micro-front-end architecture; or
[0131] The first shared interface for module sharing that can be recognized by the micro-frontend architecture is added to the abstract independent module.
[0132] An embodiment of the present application further provides an electronic device, which is a master node electronic device in a computing unit. Figure 6 The electronic device includes a memory 601, a processor 602 and a communication component 603;
[0133] The memory 601 is used to store programs;
[0134] The processor 602 is coupled to the memory and is configured to execute the program stored in the memory to:
[0135] Determine a plurality of sub-applications required for building a target application; wherein the plurality of sub-applications include: a common shared module and an independent application;
[0136] Searching for a target shared module corresponding to the independent application;
[0137] If the target shared module is found, calling the target shared module through the first shared interface;
[0138] A target application is constructed based on the common shared module and the target shared module.
[0139] The processor 602 is used to determine whether the target shared module needs to be loaded repeatedly based on the specified architecture;
[0140] If not loaded, calling the target shared module through the first shared interface;
[0141] If the loading has been completed and the loading mark indicates that repeated loading is not required, the target shared module is mounted to the application directory according to the application generation requirements.
[0142] The processor 602 is configured to terminate the mounting if an uninstallation request for the target shared module is received during the mounting process;
[0143] The independent application corresponding to the target shared module is loaded into the target application.
[0144] The processor 602 is configured to publish the independent application in a designated target application if the target shared module corresponding to the independent application is not found and after receiving a publishing request for the independent application.
[0145] The processor 602 is configured to obtain a shared dependency provided by the target sharing module through a first shared interface provided externally by the target sharing module, wherein the shared dependency includes at least one of a tool dependency, a framework dependency, and a visualization library;
[0146] The target application is constructed by combining the shared dependency with the public shared module.
[0147] The processor 602 is further configured to determine an independent application to be processed;
[0148] Abstract the mounting logic of the independent application according to the interface specification of the micro-frontend architecture;
[0149] Determine that the abstract independent module obtained through the abstract processing provides a first shared interface for module sharing externally;
[0150] The abstract independent module is encapsulated into a target shared module supporting sharing based on the first shared interface, and the target shared module serves as a public shared module in the module federation.
[0151] The processor 602 is used to perform abstract processing on the independent application using the interface and specification standards provided by the micro-frontend architecture;
[0152] During the abstract processing, the mounting logic of the abstract independent module obtained after the abstract processing is improved based on the fact that the URL and independent interface of the independent application remain unchanged; wherein the mounting logic includes at least the life cycle of the abstract independent module, the communication mechanism and the first shared interface for mounting.
[0153] The processor 602 is used to analyze the association relationship between the independent application and other sub-applications in the main application;
[0154] If the analysis result is that the independent application has an association relationship with N other sub-applications, wherein N is greater than a quantity threshold, the independent application is determined to be the independent application to be processed.
[0155] The processor 602 is used to encapsulate the independent interface of the independent application to obtain the first shared interface for module sharing that can be recognized by the micro-front-end architecture; or,
[0156] The first shared interface for module sharing that can be recognized by the micro-frontend architecture is added to the abstract independent module.
[0157] The memory 601 can be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method for operating on the electronic device. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0158] Furthermore, the processor 602 in this embodiment may specifically be: a programmable switching processing chip, in which a data replication engine is configured to replicate received data.
[0159] When the processor 602 executes the program in the memory, in addition to the above functions, it can also realize other functions, which can be specifically referred to the description of the above embodiments. Figure 6As shown, the electronic device also includes: a power supply component 604 and other components.
[0160] The present application also provides a non-transitory machine-readable storage medium, wherein the non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes Figure 2 or Figure 4 The method described in the corresponding embodiment.
[0161] The present application also provides a computer program product, including a computer program / instruction, wherein when the computer program / instruction is executed by a processor, Figure 2 or Figure 4 The method described in the corresponding embodiment.
[0162] Based on the above embodiment, when building a target application based on a front-end micro-application, many sub-applications may be used. These sub-applications can be of various types, for example, a public shared module with module federation characteristics, or an independent application that can be independently released, independently tested, and independently maintained. Further, the target shared module corresponding to the independent application required for use is found, and the target shared module has the module federation characteristics. In the case of finding the target shared module corresponding to the independent application, calling the independent application becomes simpler, and the target shared module can be directly called through the first shared interface. Since the target shared module has the module federation characteristics, when building the target application, the target shared module can be called like calling the public shared module, making the target application construction simpler and more efficient. Through the above scheme, a certain independent application can be selectively abstracted into a target shared module, so that the independent application, on the basis of meeting the characteristics of independent development, release, deployment, etc., the target shared module obtained by abstraction processing also supports module federation characteristics such as dependency sharing and code sharing, so that it is simpler and more efficient to build the target application by comprehensively utilizing the target shared module and the public shared module.
[0163] In addition, independent applications can be abstracted into target shared modules with module federation characteristics according to actual needs. In this way, independent applications can also share dependencies and codes like public shared modules. It is simpler and more efficient to call each sub-application when building an application.
[0164] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0165] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0166] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generating an application, It is characterized in that The method comprises: Determine a plurality of sub-applications required for building a target application; wherein the plurality of sub-applications include: a common shared module and an independent application; Searching for a target shared module corresponding to the independent application; If the target shared module is found, calling the target shared module through the first shared interface; A target application is constructed based on the common shared module and the target shared module.
2. The method according to claim 1, It is characterized in that If the target shared module is found, calling the target shared module through the first shared interface includes: Determine whether the target shared module needs to be loaded repeatedly based on the specified architecture; If not loaded, calling the target shared module through the first shared interface; If the loading has been completed and the loading mark indicates that repeated loading is not required, the target shared module is mounted to the application directory according to the application generation requirements.
3. The method according to claim 2, It is characterized in that The step of mounting the target shared module to the application directory according to the application generation requirement includes: If during the mounting process, an uninstallation request for the target shared module is received, the mounting is terminated; The independent application corresponding to the target shared module is loaded into the target application.
4. The method according to claim 1, It is characterized in that Also includes: If the target shared module corresponding to the independent application is not found, and after receiving a publishing request for the independent application, the independent application is published in the designated target application.
5. The method according to claim 1, It is characterized in that The step of constructing a target application based on the common shared module and the target shared module includes: Acquire a shared dependency provided by the target shared module through a first shared interface provided externally by the target shared module, wherein the shared dependency includes: at least one of a tool dependency, a framework dependency, and a visualization library; The target application is constructed by combining the shared dependency with the public shared module.
6. A module generation method, It is characterized in that The method comprises: Identify the individual applications to be processed; Abstract the mounting logic of the independent application according to the interface specification of the micro-frontend architecture; Determine that the abstract independent module obtained through the abstract processing provides a first shared interface for module sharing externally; The abstract independent module is encapsulated into a target shared module supporting sharing based on the first shared interface, and the target shared module serves as a public shared module in the module federation.
7. The method according to claim 6, It is characterized in that The abstract processing of the mounting logic of the independent application according to the interface specification of the micro-frontend architecture includes: Abstract the independent application using the interfaces and specification standards provided by the micro-frontend architecture; During the abstract processing, the mounting logic of the abstract independent module obtained after the abstract processing is improved based on the fact that the URL and independent interface of the independent application remain unchanged; wherein the mounting logic includes at least the life cycle of the abstract independent module, the communication mechanism and the first shared interface for mounting.
8. The method according to claim 6, It is characterized in that The determining of the independent application to be processed comprises: Analyze the relationship between independent applications and other sub-applications in the main application; If the analysis result is that the independent application has an association relationship with N other sub-applications, wherein N is greater than a quantity threshold, the independent application is determined to be the independent application to be processed.
9. The method according to claim 6, It is characterized in that The step of determining that the abstract independent module obtained through the abstract processing provides a first shared interface for module sharing, comprises: Encapsulating the independent interface of the independent application to obtain the first shared interface for module sharing that can be recognized by the micro-frontend architecture; or, The first shared interface for module sharing that can be recognized by the micro-frontend architecture is added to the abstract independent module.
10. An application generation system based on micro front-end architecture, It is characterized in that The system comprises: The module generation end is used to determine the independent application to be processed; abstract the mounting logic of the independent application according to the interface specification of the micro-frontend architecture; determine that the abstract independent module obtained after the abstract processing provides a first shared interface for module sharing; based on the first shared interface, encapsulate the abstract independent module into a target shared module that supports sharing, and the target shared module serves as a public shared module in the module federation; An application generation end is used to determine multiple sub-applications required when building a target application; wherein the multiple sub-applications include: a common shared module and an independent application; searching for a target shared module corresponding to the independent application; if the target shared module is found, calling the target shared module through a first shared interface; and building a target application based on the common shared module and the target shared module.
11. An application generating device, It is characterized in that The device comprises: A determination unit, used to determine a plurality of sub-applications required for building a target application; wherein the plurality of sub-applications include: a common shared module and an independent application; A searching unit, used for searching a target shared module corresponding to the independent application; a calling unit, configured to call the target shared module through a first shared interface if the target shared module is found; A construction unit is used to construct a target application based on the common shared module and the target shared module.
12. An electronic device comprising a memory and a processor; in, The memory is used to store programs; The processor is coupled to the memory, and is configured to execute the program stored in the memory, so as to implement the method according to any one of claims 1 to 9.
13. A non-transitory machine-readable storage medium having executable code stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as claimed in any one of claims 1 to 9.
14. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
