A resource pool selection method and device based on a micro-frontend architecture
The method enhances user experience in cloud computing systems by using route hijacking to manage resource pool selection based on user roles, simplifying navigation and decoupling resource pools from the top navigation bar, thus improving usability and clarity in micro-frontend architectures.
Patent Information
- Application Number
- CN202210999695.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-08-19
AI Technical Summary
In the micro front-end architecture of the cloud management platform, the resource pool selection scheme results in the congestion and unsightly navigation bar, making it difficult for users to find and operate, and the ease of use is reduced after integrating third-party systems.
Through routing hijacking technology, determine roles and cookie information when users log in, control route jump to resource pool selection page, and design resource pool switching devices within the system, simplify the top navigation bar, and use resource pool display devices and route jump devices to establish mappings to realize resource pool selection throughout the entire system.
It improves the ease of use of the cloud management platform and the participation of the resource pool, simplifies the display of the navigation bar, avoids confusion with other drop-down boxes, and decouples the operation of the resource pool and third-party systems, improving user friendliness.
Smart Images

Figure CN115567519B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of micro-frontend architecture. Specifically, it relates to a resource pool selection method and device based on the micro-frontend architecture. Background Art
[0002] In a cloud computing system, computing and storage resources are placed in a common resource pool. It can be said that the resource pool is the core of cloud services. The micro-frontend architecture is divided into a main application and multiple sub-applications. The main application is responsible for user login and the display of public content within the platform, which is equivalent to the scaffolding of the platform. The sub-applications are responsible for the display of specific content. In a cloud management platform (CMP), the resource pool is the entry point for the system to access various heterogeneous infrastructure platforms, and the integrated operation and maintenance capabilities provided by the cloud management platform are to monitor and alarm various resources within the resource pool. Therefore, users need to select a resource pool before entering the operation and maintenance system of the cloud management platform. The conventional resource pool selection scheme is to place it in the top navigation bar and display it through a drop-down selection box for users to select. Such a display form not only compresses the limited display space of the navigation bar, making the navigation bar overly crowded and unaesthetic, but also causes confusion with other drop-down boxes in the navigation bar, making it difficult for users to find, which goes against the original intention of product usability. Moreover, in the micro-frontend architecture, various third-party systems are integrated into the cloud management platform (for example, the operation and maintenance side can integrate third-party system physical facility monitoring, etc.). However, these third-party systems on the operation and maintenance side do not have the concept of a resource pool. Therefore, placing the resource pool switching and the third-party system menu in the same top navigation bar will cause confusion for users during operation and also reduce the usability of the product. Summary of the Invention
[0003] The purpose of the present invention is to solve the problem that the micro-frontend architecture level of the cloud management platform in the prior art is not clear and concise. A resource pool selection method and device based on the micro-frontend architecture are proposed, establishing a link channel with the resource pool as the core, integrating the selection of the resource pool throughout the system, improving the participation and importance of the resource pool, and enhancing the layering and usability of the cloud management platform.
[0004] To achieve the above technical objectives, a technical solution provided by the present invention is a resource pool selection method based on the micro-frontend architecture, including the following steps:
[0005] S1. The user logs in to the cloud management platform and enters the main application, or obtains the user's role type information and sends it to the route hijacking device;
[0006] S2. The route hijacking device sequentially judges the role type information, the corresponding resource pool information in the cookie, and the source information of the route; if it is determined that: the role type information is a non-operation and maintenance user, there is no corresponding resource pool information in the cookie, and the route does not originate from a third-party sub-application, then perform the first operation to enter the internal sub-application within the cloud management system;
[0007] If it is determined that there is corresponding resource pool information in the cookie and the route comes from an internal sub-application of a third-party system, perform the second operation to enter the internal sub-application of the cloud management system;
[0008] S3. The user performs corresponding business operations through the resource pool switching device;
[0009] S4. When the user switches the corresponding resource pool according to business requirements, the route hijacking device obtains the user's role type information again and performs S2 again.
[0010] Preferably, the first operation is: the route hijacking device controls the route to jump to the resource pool display device.
[0011] Preferably, the resource pool display device includes keywords representing the characteristics of all resource pools.
[0012] Preferably, the route jump device establishes a mapping with the keywords in the resource pool display device, and enters the corresponding internal sub-application of the cloud management system through the route jump device after clicking on the keyword.
[0013] Preferably, the second operation is: the route hijacking device controls the route to directly jump to the internal sub-application of the cloud management system.
[0014] Preferably, S4 includes the following steps:
[0015] S41. The user clicks the switch button of the resource pool switching device to trigger the resource switching operation;
[0016] S42. Retrieve a pop-up window to display all keyword information of the resource pool;
[0017] S43. The user selects the corresponding keyword information according to business requirements.
[0018] A resource pool display device based on a micro-frontend architecture, comprising: a route hijacking device, a resource pool display device, a route jump device, and a resource pool switching device;
[0019] The route hijacking device interacts with the resource pool switching device and is used to judge the role type information, the corresponding resource pool information in the cookie, and the source information of the route;
[0020] The resource pool display device interacts with the route jump device and is used for keywords of all resource pool characteristics;
[0021] The route jump device interacts with the internal sub-application of the cloud management system, establishes a mapping with the keywords in the resource pool display device, and enters the corresponding internal sub-application of the cloud management system through the route jump device after clicking on the keyword;
[0022] The resource pool switching device and the routing hijacking device are used to switch to the corresponding resource pool according to the user's service requirements.
[0023] Advantages of the present invention: The present invention proposes a resource pool selection method and device based on the micro-frontend architecture. By using the routing hijacking technology, after the user logs in and obtains the user information, the routing is controlled to jump to the resource pool selection page through routing hijacking. After the user selects a certain resource pool on the resource pool selection page, it then jumps to the corresponding sub-application. At the same time, this solution designs a resource pool switching device inside the system, which facilitates the user to switch the resource pool at any time inside the system to view the monitoring information of relevant resources. By adopting this solution, the selection of the resource pool can be separated from the top navigation bar, making the display of the top navigation bar more concise and not easily confused with other selection dropdown boxes, improving the usability of the product. At the same time, the selection of the resource pool is also integrated throughout the system, enhancing the participation and importance of the resource pool, which conforms to the concept that the resource pool is the core in cloud computing; and decouples the resource pool from the integrated third-party systems. When the user uses the third-party systems inside the cloud management platform, they are no longer affected by the concept of the resource pool, which is also conducive to improving user-friendliness and product usability. Description of the Drawings
[0024] Figure 1 It is a flowchart of a resource pool selection method based on the micro-frontend architecture of the present invention.
[0025] Figure 2 It is a structural schematic diagram of a resource pool selection device based on the micro-frontend architecture of the present invention.
[0026] Explanation of the marks in the figure: 1 - Routing hijacking device, 2 - Resource pool display device, 3 - Routing jump device, 4 - Resource pool switching device, 5 - Cloud management system sub-application. Detailed Embodiments
[0027] To make the purpose, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only the best embodiments of the present invention, which are only used to explain the present invention and do not limit the protection scope of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
[0028] Embodiment: As Figure 2As shown in the figure, a resource pool display device based on a micro-frontend architecture is composed of a routing hijacking device 1, a resource pool display device 2, a routing jump device 3, and a resource pool switching device 4. The routing hijacking device interacts with the resource pool switching device to determine the role type information, the corresponding resource pool information in the cookie, and the source information of the route. The resource pool display device interacts with the routing jump device to obtain the keywords of all resource pool characteristics. The routing jump device interacts with the internal sub-applications of the cloud management system, establishes a mapping with the keywords in the resource pool display device, and enters the corresponding internal sub-application 5 of the cloud management system through the routing jump device after clicking on the keyword. The resource pool switching device interacts with the routing hijacking device to switch to the corresponding resource pool according to the user's business requirements.
[0029] As Figure 1 shown, a resource pool selection method based on a micro-frontend architecture includes the following steps:
[0030] S1. The user logs in to the cloud management platform and enters the main application, obtains the user's role type information, and sends it to the routing hijacking device.
[0031] S2. The routing hijacking device sequentially determines the role type information, the corresponding resource pool information in the cookie, and the source information of the route. If it is determined that: the role type information is a non-operations user, there is no corresponding resource pool information in the cookie, and the route does not originate from a third-party sub-application, then perform the first operation to enter the internal sub-application of the cloud management system.
[0032] If it is determined that: there is corresponding resource pool information in the cookie and the route originates from the internal sub-application of a third-party system, then perform the second operation to enter the internal sub-application of the cloud management system.
[0033] S3. The user performs corresponding business operations through the resource pool switching device.
[0034] S4. When the user switches to the corresponding resource pool according to the business requirements, the routing hijacking device obtains the user's role type information again and performs S2 again.
[0035] The first operation is: the routing hijacking device controls the route to jump to the resource pool display device.
[0036] The resource pool display device includes keywords representing all resource pool characteristics.
[0037] The routing jump device establishes a mapping with the keywords in the resource pool display device, and enters the corresponding internal sub-application of the cloud management system through the routing jump device after clicking on the keyword.
[0038] The second operation is: the routing hijacking device controls the route to directly jump to the internal sub-application of the cloud management system.
[0039] S4 includes the following steps:
[0040] S41. The user clicks the switching button of the resource pool switching device to trigger a resource switching operation;
[0041] S42. Retrieve a pop-up window to display all keyword information of the resource pool;
[0042] S43. The user selects the corresponding keyword information according to business requirements.
[0043] In this embodiment, when the user logs in to the system, they first enter the main application. At this time, relevant information of the logged-in user (including information such as the role type of the logged-in user) is obtained by calling an interface through ajax, and then a pre-interception of the route is performed. In the route hijacking device, it is judged whether there is resource pool information in the user role type and cookie, and whether the route source is a third-party sub-application. If it is an operation and maintenance user, there is no resource pool in the cookie, and the route source is not a third-party sub-application, the route will be redirected to the resource pool selection page; on the resource pool selection page (resource pool display device), the information of the resource pool is displayed in detail in the form of a table, and a link entry is set at the resource pool name. When the user clicks on a certain resource pool name, the resource pool information selected by the user (including clusterId, clusterType, and clusterName) is set into the cookie, and then enter the route jumping device, and enter the internal part of the pointed sub-application according to the corresponding link in the route jumping device; when jumping to the internal part of the sub-application, the entire page will be refreshed. At this time, the menu information and user information corresponding to the currently selected resource pool will be obtained again, and then judged again in the route hijacking device. At this time, there is already resource pool information in the cookie, so it will not enter the resource pool selection page again, but directly enter the internal part of the cloud management platform system; when the user wants to switch the resource pool inside the sub-application, they need to use the resource pool switching device. The resource pool switching device can be fixed at the top of the left navigation bar of the main application for easy access by the user, and a prominent click button design is used to guide the user to switch the resource pool. After the user clicks the switching button, the device will display all the information of the resource pool in a pop-up window for the user to select. When the user selects a certain resource pool, they will enter the route hijacking device again. If the user clicks on the menu of the third-party system in the main application, it will also be intercepted by the route hijacking device. Because the route source is a third-party system, it does not meet the conditions for route interception, and it will directly jump to the internal part of the third-party sub-application pointed to by the route.
[0044] The above-described specific embodiments are the preferred embodiments of a resource pool selection method and device based on a micro front-end architecture of the present invention, and do not limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to these specific embodiments. Any equivalent changes made according to the shape and structure of the present invention are within the protection scope of the present invention.
Claims
1. A resource pool selection method based on a micro-frontend architecture, characterized in that It includes the following steps: S1. The user logs in to the cloud management system to enter the main application, obtains the user's role type information and sends it to the routing hijacking device; S2. The routing hijacking device sequentially judges the role type information, the corresponding resource pool information in the cookie, and the source information of the routing; If it is determined that: the role type information is a non-operations and maintenance user, there is no corresponding resource pool information in the cookie, and the routing does not originate from the internal sub-application of the third-party system, then perform the first operation to enter the resource pool display device; If it is determined that: there is corresponding resource pool information in the cookie, and the routing originates from the internal sub-application of the third-party system, then perform the second operation to enter the internal part of the internal sub-application of the cloud management system; S3. The user performs corresponding business operations through the resource pool switching device; S4. When the user switches the corresponding resource pool according to the business requirements, the routing hijacking device obtains the user's role type information again and executes S2 again; The second operation is: the routing jump device controls the routing to directly jump to the internal part of the internal sub-application of the cloud management system; The first operation is: the routing jump device controls the routing to jump to the resource pool display device.
2. A resource pool selection method based on the micro-frontend architecture according to claim 1, wherein The resource pool display device includes keywords characterizing the characteristics of all resource pools.
3. A resource pool selection method based on the micro-frontend architecture according to claim 2, wherein The routing jump device establishes a mapping with the keywords in the resource pool display device, and after clicking the keyword, enters the internal part of the corresponding internal sub-application of the cloud management system through the routing jump device.
4. A resource pool selection method based on the micro-frontend architecture according to claim 1, wherein S4 includes the following steps: S41. The user clicks the switching button of the resource pool switching device to trigger the resource switching operation; S42. Invoke a pop-up window to display all keyword information of the resource pool; S43. The user selects the corresponding keyword information according to the business requirements.
5. A resource pool display device based on a micro-frontend architecture, applicable to the resource pool selection method as described in claim 1, characterized in that, It includes: A routing hijacking device, a resource pool display device, a routing jump device, and a resource pool switching device; The routing hijacking device interacts with the resource pool switching device and is used to judge the role type information, the corresponding resource pool information in the cookie, and the source information of the routing; The resource pool display device interacts with the routing jump device and is used to display keywords characterizing the characteristics of the resource pool; The routing jump device interacts with the internal sub-application of the cloud management system, establishes a mapping with the keywords in the resource pool display device, and after clicking the keyword, enters the internal part of the corresponding internal sub-application of the cloud management system through the routing jump device; The resource pool switching device and the routing hijacking device are used to switch to the corresponding resource pool according to the user's business requirements.
Citation Information
Patent Citations
Data processing method and system based on micro front end
CN114070618A
Resource sharing implementation method and system based on micro-front-end architecture
CN114090003A