Data processing method, medium, device and computing equipment based on micro front end

By extending unified login and permission verification on micro front-end sandbox technology, combining the application platform and main application gateway, Nginx lacks unified business management capabilities, and achieving the effect of reducing development costs and improving user experience.

CN114416169BActive Publication Date: 2025-05-06NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210053558.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2025-05-06
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

Under micro front-end technology, Nginx lacks unified business management capabilities, resulting in the application server needing to repeatedly develop common functions such as login and permission control, which increases development costs.

Method used

By expanding on the basis of micro front-end sandbox technology, combining the application platform and the main application gateway, it provides unified login and permission verification, reduces development costs, and uniformly manages and releases front-end application versions to reduce the deployment resource consumption of front-end applications.

Benefits of technology

It has achieved the reduction of development costs, improved user experience, simplified the release process of front-end applications, reduced the deployment resource consumption of front-end applications, and simplified the development and debugging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416169B_ABST
    Figure CN114416169B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a data processing method, medium, device and computing equipment based on micro front-end, the method comprising: generating a resource package through an application platform, and publishing the resource package to each deployment environment; the client obtains the front-end static resources from the application platform, responds to the request operation of the target business service page, and sends a data request message to the main application gateway based on the micro front-end sandbox technology; the main application gateway performs authority authentication according to the data request message; if it is determined that the client has the authority to access the request address, the data request message is sent to the target back-end service according to the target service tag carried by the data request message and the preset back-end service configuration, and the received response message is sent to the client to render the target business service page. The present disclosure can reduce development costs and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of data processing technology. More specifically, the embodiments of the present disclosure relate to a data processing method, medium, apparatus and computing device based on a micro-frontend. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] Micro-frontend technology takes front-end applications as the core. On the user's browser, multiple different front-end applications are run simultaneously, while ensuring that they are independent of each other and do not affect each other. Users can browse different applications on the same browser interface, which improves user experience and user efficiency.

[0004] Currently, under the micro-frontend technology, Nginx is usually used as a proxy to map front-end application requests to different application servers through the Uniform Resource Locator (URL) path or domain name. However, Nginx lacks unified business management capabilities, so application servers are often required to repeatedly develop common functions such as login and permission control, which increases development costs. Summary of the invention

[0005] The present disclosure provides a data processing method, medium, device and computing equipment based on a micro-frontend to reduce development costs.

[0006] In a first aspect of the embodiments of the present disclosure, a data processing method based on a micro front-end is provided, which is applied to a main application gateway. The data processing method based on a micro front-end includes:

[0007] Receive a data request message sent by a client, where the data request message carries a source tag, a target service tag, and user information corresponding to the data request message. The source tag is used to indicate the source of the data request message, and the target service tag is used to indicate the target backend service corresponding to the data request message;

[0008] Perform authority authentication based on the source tag, user information, and request address corresponding to the data request message;

[0009] If it is determined that the client has the authority to access the request address, the data request message is sent to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration. The preset backend service configuration is used to characterize the correspondence between the service tag and the backend service. The preset backend service configuration is configured by the application platform;

[0010] The response message corresponding to the data request message sent by the target backend service is sent to the client.

[0011] In a second aspect, an embodiment of the present disclosure provides a data processing method based on a micro front end, which is applied to a client. The data processing method based on a micro front end includes:

[0012] In response to the opening operation of the front-end application, obtaining the front-end static resources corresponding to the front-end application from the application platform;

[0013] Render the corresponding front-end application page according to the front-end static resources;

[0014] In response to the request operation of the target business service page, based on the micro-frontend sandbox technology, a data request message is sent to the main application gateway. The data request message carries the source tag, target service tag and user information corresponding to the data request message;

[0015] Receive a response message corresponding to the data request message sent by the main application gateway;

[0016] Render the target business service page based on the response message.

[0017] In a third aspect, an embodiment of the present disclosure provides a data processing method based on a micro front end, which is applied to an application platform. The data processing method based on a micro front end includes:

[0018] Receive the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool, where the version file at least includes the front-end static resources and codes corresponding to the front-end application;

[0019] Generate resource packages with corresponding version numbers according to the version file, and publish the resource packages to various deployment environments, including development deployment environment, test deployment environment, and operation and maintenance deployment environment;

[0020] The information corresponding to the resource package is stored to switch the corresponding versions of the resource packages of each deployment environment. The information at least includes the front-end application identifier corresponding to the resource package, the version number of the resource package, and the deployment environment corresponding to the resource package.

[0021] In a fourth aspect, an embodiment of the present disclosure provides a data processing device based on a micro front end, which is applied to a main application gateway. The data processing device based on the micro front end includes:

[0022] A receiving module is used to receive a data request message sent by a client, wherein the data request message carries a source tag, a target service tag and user information corresponding to the data request message, wherein the source tag is used to indicate the source of the data request message, and the target service tag is used to indicate the target backend service corresponding to the data request message;

[0023] An authentication module, used to perform authority authentication based on the source tag, user information, and the request address corresponding to the data request message;

[0024] The sending module is used to send the data request message to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration if it is determined that the client has the authority to access the request address. The preset backend service configuration is used to characterize the correspondence between the service tag and the backend service. The preset backend service configuration is configured by the application platform; and send the response message corresponding to the data request message sent by the target backend service to the client.

[0025] In a fifth aspect, an embodiment of the present disclosure provides a data processing device based on a micro front end, which is applied to a client. The data processing device based on a micro front end includes:

[0026] An acquisition module, used to acquire the front-end static resources corresponding to the front-end application from the application platform in response to the opening operation of the front-end application;

[0027] The first rendering module is used to render the corresponding front-end application page according to the front-end static resources;

[0028] The sending module is used to respond to the request operation of the target business service page and send a data request message to the main application gateway based on the micro-frontend sandbox technology. The data request message carries the source tag, target service tag and user information corresponding to the data request message;

[0029] A receiving module, used to receive a response message corresponding to the data request message sent by the main application gateway;

[0030] The second rendering module is used to render the target business service page according to the response message.

[0031] In a sixth aspect, an embodiment of the present disclosure provides a data processing device based on a micro front end, which is applied to an application platform. The data processing device based on a micro front end includes:

[0032] A receiving module, used to receive a version file corresponding to a front-end application uploaded by a developer of the front-end application through an uploading tool, wherein the version file at least includes front-end static resources and codes corresponding to the front-end application;

[0033] The processing module is used to generate a resource package with a corresponding version number according to the version file, and publish the resource package to various deployment environments, including the development deployment environment, the test deployment environment, and the operation and maintenance deployment environment;

[0034] The storage module is used to store the information corresponding to the resource package so as to switch the corresponding versions of the resource packages of each platform. The information at least includes the front-end application identifier corresponding to the resource package, the version number of the resource package, and the deployment environment corresponding to the resource package.

[0035] In a seventh aspect, an embodiment of the present disclosure provides a computing device, including: a processor, and a memory communicatively connected to the processor;

[0036] Memory stores computer-executable instructions;

[0037] The processor executes the computer execution instructions stored in the memory to implement the data processing method based on the micro-frontend as described in the first aspect of the present disclosure.

[0038] In an eighth aspect, an embodiment of the present disclosure provides a computing device, including: a processor, and a memory communicatively connected to the processor;

[0039] Memory stores computer-executable instructions;

[0040] The processor executes the computer execution instructions stored in the memory to implement the data processing method based on the micro-frontend as described in the second aspect of the present disclosure.

[0041] In a ninth aspect, an embodiment of the present disclosure provides a computing device, including: a processor, and a memory communicatively connected to the processor;

[0042] Memory stores computer-executable instructions;

[0043] The processor executes the computer execution instructions stored in the memory to implement the data processing method based on the micro-frontend as described in the third aspect of the present disclosure.

[0044] In a tenth aspect, an embodiment of the present disclosure provides a storage medium, in which computer program instructions are stored. When the computer program instructions are executed, the micro-front-end-based data processing method as described in the first aspect of the present disclosure is implemented.

[0045] In the eleventh aspect, an embodiment of the present disclosure provides a storage medium, in which computer program instructions are stored. When the computer program instructions are executed, the micro-front-end-based data processing method as described in the second aspect of the present disclosure is implemented.

[0046] In the twelfth aspect, an embodiment of the present disclosure provides a storage medium, in which computer program instructions are stored. When the computer program instructions are executed, the micro-front-end-based data processing method as described in the third aspect of the present disclosure is implemented.

[0047] In a thirteenth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the micro-front-end-based data processing method as described in the first aspect of the present disclosure.

[0048] In a fourteenth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the micro-front-end-based data processing method as described in the second aspect of the present disclosure.

[0049] In the fifteenth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the micro-front-end based data processing method as described in the third aspect of the present disclosure.

[0050] The data processing method, medium, device and computing device based on the micro-frontend provided by the embodiments of the present disclosure receive the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool through the application platform, generate a resource package with the corresponding version number, publish the resource package to each deployment environment, and store the information corresponding to the resource package; the client obtains the front-end static resources corresponding to the front-end application from the application platform in response to the opening operation of the front-end application, and renders the corresponding front-end application page; the client responds to the request operation of the target business service page, and based on the micro-frontend sandbox technology, sends a data request message to the main application gateway, and the data request message carries the source tag, target service tag and user information corresponding to the data request message; the main application gateway performs authority authentication according to the source tag, user information and the request address corresponding to the data request message; if it is determined that the client has the authority to access the request address, the main application gateway sends the data request message to the target back-end service according to the target service tag and the preset back-end service configuration, sends the received response message sent by the target back-end service to the client, and the client renders the target business service page. Since the disclosed embodiment performs authorization authentication on the data request message through the main application gateway and sends the data request message containing user information to the target backend service, there is no need for each backend service to repeatedly develop login and authorization control functions. Therefore, it can reduce development costs and improve user experience. Moreover, the generation and release of resource packages are uniformly managed by the application platform, which can simplify the release process of the front-end application and reduce the deployment resource consumption of the front-end application. In addition, the main application gateway sends the data request message to the target backend service according to the target service tag and the preset backend service configuration. It does not need to modify the code configuration of each deployment environment separately, and can send it to the correct backend service, which can simplify the development and debugging process. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0052] Figure 1 A schematic diagram of an application server using Nginx as a proxy provided by an embodiment of the present disclosure;

[0053] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0054] Figure 3 A schematic diagram of signaling interaction of a micro-frontend-based data processing method provided in an embodiment of the present disclosure;

[0055] Figure 4 A schematic diagram of resource package version management through an application platform provided in an embodiment of the present disclosure;

[0056] Figure 5 A flowchart of a data processing method based on a micro-frontend provided in one embodiment of the present disclosure;

[0057] Figure 6 A flowchart of a data processing method based on a micro-frontend provided in another embodiment of the present disclosure;

[0058] Figure 7 A schematic diagram of the structure of a micro-front-end-based data processing device provided in one embodiment of the present disclosure;

[0059] Figure 8 A schematic diagram of the structure of a micro-frontend-based data processing device provided in another embodiment of the present disclosure;

[0060] Fig. 9 A schematic diagram of the structure of a micro-front-end-based data processing device provided in another embodiment of the present disclosure;

[0061] Fig.10 A schematic diagram of a storage medium provided in an embodiment of the present disclosure;

[0062] Fig.11 A schematic diagram of the structure of a computing device provided in one embodiment of the present disclosure.

[0063] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0064] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0065] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0066] According to an embodiment of the present disclosure, a data processing method, medium, apparatus and computing device based on a micro-frontend are proposed.

[0067] In this article, it is important to understand the terms involved: Micro frontend refers to a technical solution that splits a huge business frontend system into multiple small systems for vertical businesses, and combines them into a complex system in a preset way; Micro frontend sub-applications are the carriers that carry all the functions of a single vertical business in the micro frontend; Micro frontend main application is the carrier of micro frontend sub-applications that are responsible for combining and deploying the micro frontend sub-applications corresponding to the vertical business in the micro frontend; Micro frontend sandbox technology, that is, the technology that runs different scripts (JavaScript, JS) on the browser at the same time and can maintain isolation and not affect each other, is the key technology for the implementation of micro frontend technology; Service middle layer (Backend For Frontend, BFF) refers to the middle layer technology built using Node.js and other technologies in the interaction between frontend business and backend service to serve the frontend business and integrate the backend business; Main application gateway refers to the gateway built by combining BFF functions and micro frontend main application functions, which is responsible for distributing frontend resources and completing the forwarding of backend service interfaces, and completing login and permission functions during forwarding; Application platform refers to the version management, server Internet interconnection protocol (Internet Protocol) of each micro frontend sub-application Protocol (IP) configuration centralized platform; Cookie, is the data (usually encrypted) stored on the user's local terminal in order to identify the user and track the user, and is temporarily or permanently stored by the user's client computer; Nginx, a high-performance Hyper Text Transfer Protocol (HTTP) and reverse proxy World Wide Web (Web) server; Extensible Markup Language Hyper Text Transfer Protocol Request (XMLHTTPRequest), refers to the technology of JavaScript in the browser to initiate HTTP requests. In addition, any number of elements in the drawings is for example rather than limitation, and any naming is only for distinction and does not have any limiting meaning.

[0068] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION

[0070] The inventors have found that, currently, under the micro-frontend technology, Nginx is usually used as a proxy to map frontend application requests to different application servers through URL addresses or domain names. For example, Figure 1 A schematic diagram of an application server using Nginx as a proxy provided by an embodiment of the present disclosure, as shown in FIG. Figure 1 As shown, in response to the user's opening operation of the front-end application, according to the corresponding front-end application request, the front-end resources are obtained from the front-end resource service through Nginx, and the back-end application program interface (Application Programming Interface, API) service is accessed through Nginx, or other back-end services or other front-end services are accessed to obtain the corresponding service information. Since Nginx lacks unified business management capabilities, it is often necessary for the application server to repeatedly develop common functions such as login and permission control, which increases the development cost. In addition, under the micro-front-end technology, due to the increase in business, it is often necessary to deploy multiple front-end resource services, while the front-end application often only needs a browser to run, resulting in unnecessary waste of server resources. The server deployment process is generally cumbersome, takes a lot of time, and there may be a situation where the deployment fails due to different server configurations; the front-end service and the back-end service often need to agree on the Nginx configuration through manual verbal agreement, and it is also necessary to manually confirm that the Nginx configuration is available in multiple environments such as the test environment and the online environment, so there is a certain degree of uncontrollability. Micro-frontend technology takes front-end applications as its core, and mainly uses JavaScript proxies or snapshots to run multiple different front-end applications simultaneously on the user's browser, while ensuring that they are independent of each other and do not affect each other. Users can browse different applications on the same browser interface, which improves user experience and user efficiency. However, the current micro-frontend technology has the following defects: the configuration of micro-frontend sub-applications often needs to be implemented by modifying the code, resulting in the need to simultaneously release the micro-frontend main application every time the micro-frontend sub-application is updated and released, which increases the release cost.

[0071] Based on the above problems, the present invention provides a data processing method, medium, device and computing equipment based on micro-frontend. By expanding on the basis of micro-frontend sandbox technology and combining the application platform and the main application gateway, it can provide unified login and permission verification, reduce development costs, and can uniformly manage and release front-end application versions, reducing the deployment resource consumption of front-end applications.

[0072] Application Scenario Overview

[0073] First reference Figure 2 The application scenarios of the solutions provided in the present disclosure are illustrated by examples. Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure, such as Figure 2 As shown, in this application scenario, when the user opens the front-end application through the client 201, the client 201 obtains the front-end static resources corresponding to the front-end application from the application platform 202, and renders the corresponding front-end application page; the client 201 responds to the user's request operation for the target business service page, and sends a data request message to the main application gateway 203; the main application gateway 203 sends the data request message to the target back-end service 204, and sends the received response message sent by the target back-end service 204 to the client 201, so that the client 201 renders the target business service page.

[0074] It should be noted that Figure 2 This is only a schematic diagram of an application scenario provided by the embodiment of the present disclosure. Figure 2 does not limit the equipment included in Figure 2 The positional relationship between the devices is limited.

[0075] Exemplary Methods

[0076] Combine the following Figure 2 For application scenarios, refer to Figure 3 To describe a method for micro-frontend-based data processing according to an exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0077] First, a data processing method based on a micro front-end is introduced through a specific implementation example.

[0078] Figure 3 The following is a schematic diagram of signaling interaction of a micro-frontend-based data processing method provided in an embodiment of the present disclosure. Figure 3 As shown, the method of the embodiment of the present disclosure includes:

[0079] S301. The application platform receives a version file corresponding to the front-end application uploaded by the developer of the front-end application through an upload tool. The version file at least includes front-end static resources and codes corresponding to the front-end application.

[0080] In the embodiments of the present disclosure, illustratively, Figure 4 A schematic diagram of resource package version management through an application platform provided in an embodiment of the present disclosure, such as Figure 4As shown, the developer of the front-end application completes the development of the front-end application on his local computer, and then uses the upload tool to upload the version file corresponding to the front-end application. The version file at least contains the front-end static resources and code corresponding to the front-end application. Correspondingly, the application platform receives the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool. It can be understood that the version files corresponding to the front-end application will be uploaded to the application platform in a unified manner.

[0081] Optionally, before the application platform receives the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool, it may also include: the application platform authenticates the key configured by the developer in the upload tool to determine whether the developer has the authority to upload the version file corresponding to the front-end application through the upload tool.

[0082] Exemplarily, before the developer of the front-end application uploads the version file corresponding to the front-end application through the upload tool, the application platform will generate a key for each developer, and the developer will configure the key into the upload tool. Before receiving the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool, the application platform authenticates the key configured by the developer in the upload tool to determine whether the developer has the authority to upload the version file corresponding to the front-end application through the upload tool. If the authentication result is authentication passed, the application platform receives the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool; if the authentication result is authentication failed, the application platform prompts the developer that he does not have the authority to upload the version file corresponding to the front-end application through the upload tool. In the above manner, the security of the application platform receiving the version file can be guaranteed.

[0083] S302. The application platform generates a resource package with a corresponding version number according to the version file, and publishes the resource package to various deployment environments, including a development deployment environment, a test deployment environment, and an operation and maintenance deployment environment.

[0084] In this step, illustratively, reference Figure 4 , the version file corresponding to the front-end application uploaded by the developer through the upload tool contains a build packaging script for generating a resource package of the corresponding version number and a deployment script for publishing the resource package of the corresponding version number to each deployment environment. Therefore, after receiving the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool, the application platform can generate a resource package of the corresponding version number according to the version file through the build packaging script in the version file, and publish the resource package to each deployment environment through the deployment script in the version file. The deployment environment includes a development deployment environment, a test deployment environment, and an operation and maintenance deployment environment. It can be understood that the resource package of the corresponding version number of the front-end application is uniformly generated through the application platform, and the resource package is published to each deployment environment.

[0085] S303. The application platform stores information corresponding to the resource package to switch the corresponding versions of the resource packages in each deployment environment. The information at least includes the front-end application identifier corresponding to the resource package, the version number of the resource package, and the deployment environment corresponding to the resource package.

[0086] Exemplarily, the application platform stores the information corresponding to the resource package through a database. After the application platform generates a resource package with a corresponding version number according to the version file and publishes the resource package to each deployment environment, it stores the information corresponding to the resource package, which at least includes the front-end application identifier corresponding to the resource package, the version number of the resource package, and the deployment environment corresponding to the resource package, wherein the deployment environment includes the development deployment environment, the test deployment environment, and the operation and maintenance deployment environment. Figure 4 It can be understood that based on the information of the resource package stored in the application platform (including the historical version information of the resource package), the resource package of each deployment environment can be switched to the corresponding version. Figure 4 If the developer finds that there is a problem with the current version of the resource package through the information corresponding to the resource package displayed by the application platform, the developer can quickly switch to the resource package corresponding to the correct historical version through the historical version of the resource package stored in the application platform. For example, the application platform generates resource packages corresponding to version 1 and version 2 for a front-end application A; if the developer finds that the resource package of version 2 currently used by the front-end application A has defects and needs to roll back to the resource package of version 1, the developer only needs to modify the version 2 currently used by the front-end application A stored in the database of the application platform to version 1 to complete the version switch. In the above way, the release process of the front-end application is simplified from the complex [upload code → build and generate resource packages on the servers corresponding to each deployment environment → publish resource packages in each deployment environment] to [the application platform uniformly generates resource packages and publishes resource packages to each deployment environment → performs version switching through the database of the application platform]. For example, for front-end application X, the current release process is to upload the code of front-end application X, build it in the development, test and operation and maintenance environments respectively, generate the corresponding resource packages, and publish the resource packages to each deployment environment respectively; while this solution is to develop and upload the code to the application platform, generate resource packages, and publish them to the development, test and operation and maintenance environments, which can simplify the release process of front-end application X and reduce the deployment resource consumption of front-end application X.

[0087] In addition, since the versions of resource packages are uniformly managed through the application platform, the front-end deployment is simplified from requiring two independent servers for each front-end application to supporting multiple front-end applications through the two servers where the application platform is located, thereby reducing the use of server resources. Specifically, for example, originally at least two independent servers were required for deployment of each front-end application. If there are N front-end applications, at least 2N independent servers are required for deployment. The present invention supports the deployment of N front-end applications through the two servers where the application platform is located, thereby transforming the application-level server redundant deployment originally performed for each front-end application into the platform-level server redundant deployment for the application platform, thereby greatly reducing the use of server resources. At the same time, in the version switching process, there is no need to repeatedly perform build tasks for multiple deployment environments, thereby greatly reducing the workload of task construction.

[0088] In this step, optionally, the resource package includes at least one front-end static resource, and the application platform stores information corresponding to the resource package, including: the application platform obtains the access address corresponding to each front-end static resource included in the resource package; and stores the correspondence between the access address and the version number.

[0089] Exemplarily, if the resource package includes two front-end static resources, the application platform will generate corresponding access addresses for the two front-end static resources, and combine the access addresses corresponding to the two front-end static resources into the data of the current version. Specifically, the access addresses corresponding to the two front-end static resources are combined into a string in JavaScript Object Notation (JSON) format, and the application platform stores the string and the version number corresponding to the current version in the database.

[0090] S304: In response to the opening operation of the front-end application, the client obtains the front-end static resources corresponding to the front-end application from the application platform.

[0091] In the embodiments of the present disclosure, for example, the opening operation of the front-end application is for example to open the front-end application for the user. In response to the opening operation of the front-end application, the client reads the front-end static resources corresponding to the front-end application from the application platform. It can be understood that when a user uses a certain front-end application, the corresponding front-end static resources are automatically distributed from the application platform.

[0092] S305: The client renders the corresponding front-end application page according to the front-end static resources.

[0093] In this step, after the client obtains the front-end static resources corresponding to the front-end application from the application platform, it can render the corresponding front-end application page according to the front-end static resources, and present the rendered front-end application page to the user, so that the user can browse the rendered front-end application page.

[0094] S306. In response to the request operation of the target business service page, the client sends a data request message to the main application gateway based on the micro-frontend sandbox technology. The data request message carries the source tag, target service tag and user information corresponding to the data request message. The source tag is used to indicate the source of the data request message, and the target service tag is used to indicate the target backend service corresponding to the data request message.

[0095] Correspondingly, the main application gateway receives the data request message sent by the client.

[0096] In the disclosed embodiment, the micro-frontend sandbox technology is a technology for isolating JavaScript code based on the JavaScript Proxy function. On the basis of the micro-frontend sandbox technology, the monitoring capability of the front-end application code running in the browser is increased. XMLHTTPRequest is a method for the front-end to initiate HTTP requests. The micro-frontend sandbox technology can proxy XMLHTTPRequest to intercept the HTTP requests sent out and add the source tag and the target service tag. The request operation of the target business service page is, for example, the user's request operation on the target business service page. The main application gateway is, for example, built by BFF technology. Exemplarily, the client responds to the request operation of the target business service page and sends a data request message to the main application gateway based on the micro-frontend sandbox technology. Among them, the data request message carries the source tag, target service tag and user information corresponding to the data request message. The user information is, for example, the user name, user login status and user mailbox saved by the client using Cookie, and the user information is the login user information. After receiving the data request message sent by the client, the main application gateway will obtain the source tag, target service tag and user information corresponding to the data request message from the data request message. As for how the client sends a data request message to the main application gateway based on the micro-frontend sandbox technology, please refer to the subsequent embodiments and will not be repeated here.

[0097] S307. The main application gateway performs authority authentication according to the source tag, user information and the request address corresponding to the data request message.

[0098] In this step, after receiving the data request message sent by the client, the main application gateway can perform permission authentication based on the source tag, user information and request address corresponding to the data request message in the data request message to determine whether the client has the authority to access the request address corresponding to the data request message. For how the main application gateway performs permission authentication based on the source tag, user information and request address corresponding to the data request message, please refer to the subsequent embodiments, which will not be repeated here.

[0099] If it is determined that the client has the authority to access the request address corresponding to the data request message, step S308 is executed; if it is determined that the client does not have the authority to access the request address, the main application gateway sends a prompt message to the client, and the prompt message is used to indicate that the client does not have the authority to access the request address corresponding to the data request message. Correspondingly, the client receives the prompt message sent by the main application gateway and feeds back the prompt message.

[0100] It can be understood that if the main application gateway determines that the client does not have permission to access the request address, it will send a prompt message to the client to prompt the client that it does not have permission to access the request address corresponding to the data request message; the client receives and feedbacks the prompt message to notify the user that it does not have permission to access the above-mentioned target business service page.

[0101] S308: If it is determined that the client has the authority to access the request address, the main application gateway sends the data request message to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration. The preset backend service configuration is used to characterize the correspondence between the service tag and the backend service, and the preset backend service configuration is configured by the application platform.

[0102] Exemplarily, after the application platform publishes the resource package to each deployment environment, the preset backend service configuration can be obtained by the application platform configuration according to the backend service of each deployment environment. Specifically, optionally, the application platform receives the backend service configuration corresponding to the backend service, and the backend service configuration is used to characterize the corresponding relationship between the service tag and the backend service; store the backend service configuration. Exemplarily, the corresponding relationship between the service tag and the backend service (i.e., the backend service configuration) is manually configured on the application platform. Accordingly, the application platform receives the backend service configuration corresponding to the backend service and stores the backend service configuration, which is the preset backend service configuration mentioned above. In this step, after determining that the client has the right to access the request address corresponding to the data request message, the main application gateway can send the data request message containing user information to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration. The target backend service will obtain the user information carried by the data request message and perform corresponding logical processing. Among them, the main application gateway can directly send the login user information to the target backend service, and the target backend service no longer needs to re-obtain the login user information through Cookie, so it can avoid the repeated development of login functions for each backend service.

[0103] Furthermore, the target service tag corresponds to at least two backend services, and the main application gateway sends a data request message to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration, including: the main application gateway queries the preset backend service configuration according to the target service tag to determine at least two backend services corresponding to the target service tag; determines that the backend service with less access among the at least two backend services is the target backend service; and sends the data request message to the target backend service.

[0104] For example, assuming that the two backend services corresponding to the target service tag are backend service a and backend service b, the main application gateway queries the preset backend service configuration according to the target service tag, and determines that the target service tag corresponds to backend service a and backend service b; if the number of visits to backend service a is less than the number of visits to backend service b, then backend service a is determined to be the target backend service; and the data request message is sent to backend service a. Backend service a will obtain the user information carried in the data request message and perform corresponding logical processing.

[0105] For this step, it can be understood that the front-end application does not need to do any additional operations, and can send the data request message to the target back-end service through the main application gateway, thereby completing the correct HTTP request behavior; and because the preset back-end service configuration is configured by the application platform, it has better flexibility.

[0106] S309: The main application gateway sends a response message corresponding to the data request message sent by the target backend service to the client.

[0107] Correspondingly, the client receives a response message corresponding to the data request message sent by the main application gateway.

[0108] In this step, after sending the data request message to the target backend service, the main application gateway will receive a response message corresponding to the data request message sent by the target backend service. Therefore, the main application gateway sends the response message to the client, and the client receives the response message.

[0109] S310: The client renders the target business service page according to the response message.

[0110] After receiving the response message corresponding to the data request message sent by the main application gateway, the client can render the target business service page according to the response message. For example, if the data request message is to obtain list information, the corresponding response message contains the list information, and the client renders the list service page according to the response message.

[0111] It should be noted that the client is based on micro-frontend sandbox technology, which can run different front-end applications on the same page, providing users with a one-stop usage experience.

[0112] The data processing method based on micro-frontend provided by the embodiment of the present disclosure receives the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool through the application platform, generates a resource package with the corresponding version number, publishes the resource package to each deployment environment, and stores the information corresponding to the resource package; the client obtains the front-end static resources corresponding to the front-end application from the application platform in response to the opening operation of the front-end application, and renders the corresponding front-end application page; the client responds to the request operation of the target business service page, and based on the micro-frontend sandbox technology, sends a data request message to the main application gateway, and the data request message carries the source tag, target service tag and user information corresponding to the data request message; the main application gateway performs authority authentication according to the source tag, user information and the request address corresponding to the data request message; if it is determined that the client has the authority to access the request address, the main application gateway sends the data request message to the target back-end service according to the target service tag and the preset back-end service configuration, sends the received response message sent by the target back-end service to the client, and the client renders the target business service page. Since the disclosed embodiment performs authorization authentication on the data request message through the main application gateway and sends the data request message containing user information to the target backend service, there is no need for each backend service to repeatedly develop login and authorization control functions. Therefore, it can reduce development costs and improve user experience. Moreover, the generation and release of resource packages are uniformly managed by the application platform, which can simplify the release process of the front-end application and reduce the deployment resource consumption of the front-end application. In addition, the main application gateway sends the data request message to the target backend service according to the target service tag and the preset backend service configuration. It does not need to modify the code configuration of each deployment environment separately, and can send it to the correct backend service, which can simplify the development and debugging process.

[0113] Figure 5 A flowchart of a data processing method based on a micro front end provided in an embodiment of the present disclosure. Based on the above embodiment, the present disclosure further describes how the main application gateway performs data processing based on a micro front end. Figure 5 As shown, the method of the embodiment of the present disclosure may include:

[0114] S501. Receive a data request message sent by a client, where the data request message carries a source tag, a target service tag, and user information corresponding to the data request message.

[0115] The source tag is used to indicate the source of the data request message, and the target service tag is used to indicate the target backend service corresponding to the data request message.

[0116] The detailed description of this step can be found in Figure 3 The relevant description of step S306 in the illustrated embodiment will not be repeated here.

[0117] In the present disclosure, Figure 3 The step S307 may further include the following three steps S502 to S504:

[0118] S502: Query in the application platform according to the source tag, user information and the request address corresponding to the data request message.

[0119] It can be understood that the corresponding relationship between the source tag, user information and the request address corresponding to the data request message can be pre-configured on demand through the application platform, that is, the user's access rights can be determined, and the user's access rights related information can be stored in the database of the application platform. For example, if user C wants to access the interface " / api / edit" of the front-end application 1 to complete an editing operation, the main application gateway will receive the corresponding data request message, in which the source tag is the identification information of the front-end application 1, and the request address corresponding to the data request message is the interface " / api / edit" of the front-end application 1. Therefore, the source tag, user information and the request address corresponding to the data request message can be queried in the application platform.

[0120] S503: If there is data information in the application platform that completely matches the source tag, user information, and the request address corresponding to the data request message, it is determined that the client has the authority to access the request address.

[0121] Exemplarily, based on the example in step S502, by comparing the access permission related information of user C stored in the application platform with the source tag, user information and request address corresponding to the data request message obtained according to the current data request message, if there is data information in the application platform that completely matches the source tag, user information and request address corresponding to the data request message, it is determined that user C has the right to access the request address, and then steps S505 and S506 are executed.

[0122] It should be noted that permission verification is across different front-end applications. For example, the interface " / api / edit" of front-end application 1 and the interface " / api / edit2" of front-end application 2 may only require user C to have the same permission to access. In this way, it is possible to provide users with higher flexibility and convenience in configuring access rights.

[0123] S504: If there is no data information in the application platform that completely matches the source tag, user information, and the request address corresponding to the data request message, it is determined that the client has no authority to access the request address.

[0124] Exemplarily, based on the example in step S502, the access permission related information of user C stored in the application platform is compared with the source tag, user information and the request address corresponding to the data request message obtained according to the current data request message. If there is no data information in the application platform that completely matches the source tag, user information and the request address corresponding to the data request message, it is determined that user C does not have the authority to access the request address, and then step S507 is executed.

[0125] Through step S504, data request messages that do not comply with user access rights can be intercepted. It can be understood that through this interception behavior, the data request message can be intercepted before it reaches the back-end service. Early interception can ensure that when the data request message actually reaches the back-end service, it has passed the permission check, that is, the user has the authority to access the request address corresponding to the data request message, and the back-end service does not need to consider additional user permission-related issues. Through the above method, it can not only simplify the intrusiveness of the back-end service to the business code when using the user permission function, so that developers can focus on the development of the business code, but also ensure the security of user operations by configuring permissions on the application platform.

[0126] S505. If it is determined that the client has the authority to access the requested address, the data request message is sent to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration. The preset backend service configuration is used to characterize the correspondence between the service tag and the backend service. The preset backend service configuration is configured by the application platform.

[0127] The detailed description of this step can be found in Figure 3 Relevant description in step S308 in the illustrated embodiment.

[0128] S506: Send a response message corresponding to the data request message sent by the target backend service to the client.

[0129] The detailed description of this step can be found in Figure 3 The relevant description in step S309 in the illustrated embodiment will not be repeated here.

[0130] S507: Send a prompt message to the client, where the prompt message is used to indicate that the client does not have the authority to access the request address corresponding to the data request message.

[0131] The detailed description of this step can be found in Figure 3 The relevant description in step S307 in the illustrated embodiment will not be repeated here.

[0132] The data processing method based on micro-frontend provided by the embodiment of the present disclosure performs query and authorization authentication in the application platform according to the source tag and user information carried by the data request message and the request address corresponding to the data request message. After determining that the client has the authority to access the request address corresponding to the data request message, the data request message containing the user information is sent to the target backend service. There is no need for each backend service to repeatedly develop login and authorization control functions. Therefore, it can reduce development costs and improve user experience. Moreover, the main application gateway sends the data request message to the target backend service according to the target service tag and the preset backend service configuration. There is no need for each deployment environment to modify the backend service-related configuration corresponding to the code, and it can be sent to the correct backend service, which can simplify the development and debugging process.

[0133] On the basis of the above embodiment, optionally, before performing authority authentication according to the source tag, user information and the request address corresponding to the data request message, it also includes: obtaining user authentication information corresponding to the user information according to the user information and a preset encryption algorithm; sending the data request message to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration, including: adding user authentication information to the data request message; sending the data request message with added user authentication information to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration, so that the target backend service obtains the corresponding user information according to the user authentication information.

[0134] Exemplarily, the preset encryption algorithm is, for example, the RSA encryption algorithm (an encryption algorithm named after Rivest, Shamir, and Adleman). After the user logs in to the front-end application, the main application gateway obtains the user authentication information corresponding to the user information based on the user information and the RSA encryption algorithm, and adds the user information authentication information to the message header of each data request message that needs to be forwarded to the back-end server. The main application gateway sends the data request message with the added user authentication information to the target back-end service corresponding to the target service tag based on the target service tag and the preset back-end service configuration, so that the target back-end service obtains the corresponding user information based on the user authentication information.

[0135] It should be noted that since user information can be transmitted between servers, some additional security measures need to be considered. Therefore, in one possible implementation, each server may only be allowed to establish a communication connection within the local area network to ensure the security of user information transmitted between servers.

[0136] In addition, user information can also be authenticated based on the RSA encryption algorithm to ensure the reliability of the source of user information and ultimately ensure the security of user information during transmission.

[0137] Figure 6 This is a flowchart of a data processing method based on a micro front end provided by another embodiment of the present disclosure. Based on the above embodiment, the present disclosure embodiment further explains how the client performs data processing based on a micro front end. Figure 6 As shown, the method of the embodiment of the present disclosure may include:

[0138] S601. In response to an opening operation of a front-end application, obtain front-end static resources corresponding to the front-end application from an application platform.

[0139] The detailed description of this step can be found in Figure 3 The relevant description in step S304 in the illustrated embodiment will not be repeated here.

[0140] S602: Render the corresponding front-end application page according to the front-end static resources.

[0141] The detailed description of this step can be found in Figure 3 The relevant description in step S305 in the illustrated embodiment will not be repeated here.

[0142] In the present disclosure, Figure 3 The step S306 may further include the following three steps S603 to S605:

[0143] S603. In response to the request operation of the target business service page, the global object of the front-end application is replaced with the global object of the proxy module through the micro-front-end sandbox technology.

[0144] The front-end application includes a target business service page, and the proxy module is used to isolate different front-end applications by creating different global objects for different front-end applications.

[0145] Exemplarily, the micro-frontend sandbox technology can proxy the XMLHTTPRequest object in the front-end application, that is, replace the XMLHTTPRequest object in the front-end application with the global object of the proxy module to isolate different front-end applications and realize the ability to modify the data request message of the front-end application.

[0146] S604: Based on the global object of the proxy module, a source tag and a target service tag are added to the initial request message corresponding to the request operation of the target business service page to obtain a data request message.

[0147] Exemplarily, XMLHttpRequest is a method used in front-end applications to make data requests. On the basis of XMLHttpRequest proxying through micro-front-end sandbox technology, that is, based on the global object of the proxy module, a source tag and a target service tag are added to the initial request message corresponding to the request operation of the target business service page (that is, the data request message to be sent currently) to obtain a data request message. For example, in front-end application 1, a user needs to send a data request message to the back-end service to edit data. The request address corresponding to the data request message is the interface " / api / edit" of the front-end application 1. Through the method provided in the embodiment of the present disclosure, the source tag and the target service tag corresponding to the data request message can be obtained before sending the data request message without modifying the code of the front-end application. Then, the source tag and the target service tag are uniformly added through the micro-front-end sandbox technology to obtain the data request message, so as to send the obtained data request message to the main application gateway.

[0148] S605: Send a data request message to the main application gateway, where the data request message carries a source tag, a target service tag, and user information corresponding to the data request message.

[0149] The detailed description of this step can be found in Figure 3 The relevant description in step S306 in the illustrated embodiment will not be repeated here.

[0150] S606: Receive a response message corresponding to the data request message sent by the main application gateway.

[0151] The detailed description of this step can be found in Figure 3 The relevant description of step S309 in the illustrated embodiment will not be repeated here.

[0152] S607: Render the target business service page according to the response message.

[0153] The detailed description of this step can be found in Figure 3 The relevant description of step S310 in the illustrated embodiment will not be repeated here.

[0154] The data processing method based on micro-frontend provided by the embodiment of the disclosure, because the client is based on the micro-frontend sandbox technology, adds the source tag and the target service tag to the initial request message corresponding to the request operation of the target business service page, obtains the data request message; sends the data request message to the main application gateway, so that the main application gateway performs authority authentication according to the source tag and sends the data request message to the corresponding target backend service according to the target service tag. Therefore, it can reduce development costs and improve user experience; and it can be sent to the correct backend service without modifying the code configuration of each deployment environment separately, which can simplify the development and debugging process.

[0155] Exemplary Devices

[0156] After introducing the medium of the exemplary embodiment of the present disclosure, next, reference is made to Figure 7 The data processing device based on the micro front end of the exemplary embodiment of the present disclosure is described. The device of the exemplary embodiment of the present disclosure can implement each process in the aforementioned data processing embodiment based on the micro front end applied to the main application gateway, and achieve the same functions and effects.

[0157] Figure 7 This is a schematic diagram of the structure of a micro-front-end-based data processing device provided in an embodiment of the present disclosure, which is applied to the main application gateway. Figure 7 As shown, the micro-front-end-based data processing device 700 of the embodiment of the present disclosure includes: a receiving module 701, an identification module 702 and a sending module 703. Among them:

[0158] The receiving module 701 is used to receive a data request message sent by a client. The data request message carries a source tag, a target service tag and user information corresponding to the data request message. The source tag is used to represent the source of the data request message, and the target service tag is used to represent the target backend service corresponding to the data request message.

[0159] The identification module 702 is used to perform authority identification according to the source tag, user information and the request address corresponding to the data request message.

[0160] The sending module 703 is used to send the data request message to the target backend service corresponding to the target service tag according to the target service tag and the preset backend service configuration if it is determined that the client has the authority to access the request address. The preset backend service configuration is used to characterize the correspondence between the service tag and the backend service, and the preset backend service configuration is configured by the application platform; and send the response message corresponding to the data request message sent by the target backend service to the client.

[0161] In some embodiments, the identification module 702 can be specifically used to: query in the application platform according to the source tag, user information and the request address corresponding to the data request message; if there is data information in the application platform that completely matches the request address corresponding to the source tag, user information and the data request message, it is determined that the client has the authority to access the request address; or, if there is no data information in the application platform that completely matches the request address corresponding to the source tag, user information and the data request message, it is determined that the client does not have the authority to access the request address.

[0162] Optionally, the identification module 702 may also be used to: if it is determined that the client does not have the authority to access the request address, send a prompt message to the client, where the prompt message is used to indicate that the client does not have the authority to access the request address corresponding to the data request message.

[0163] In some embodiments, the target service tag corresponds to at least two backend services, and the sending module 703 can be specifically used to: query the preset backend service configuration according to the target service tag, and determine at least two backend services corresponding to the target service tag; determine that the backend service with less visits among the at least two backend services is the target backend service; and send the data request message to the target backend service.

[0164] Optionally, the micro-front-end based data processing device 700 also includes an acquisition module 704, which is used to obtain user authentication information corresponding to the user information based on the user information and a preset encryption algorithm before the identification module performs authority identification based on the source tag, user information and the request address corresponding to the data request message; the sending module is specifically used to: add user authentication information to the data request message; and send the data request message with the user authentication information added to it to the target backend service corresponding to the target service tag based on the target service tag and the preset backend service configuration, so that the target backend service obtains the corresponding user information based on the user authentication information.

[0165] The micro-frontend-based data processing device provided in the embodiment of the present disclosure can be used to execute the solution of the micro-frontend-based data processing method applied to the main application gateway in any of the above-mentioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0166] Figure 8 This is a schematic diagram of the structure of a micro-frontend-based data processing device provided by another embodiment of the present disclosure, which is applied to a client. Figure 8 As shown, the data processing device 800 based on the micro front-end of the embodiment of the present disclosure includes: an acquisition module 801, a first rendering module 802, a sending module 803, a receiving module 804 and a second rendering module 805. Among them:

[0167] The acquisition module 801 is used to acquire the front-end static resources corresponding to the front-end application from the application platform in response to the opening operation of the front-end application.

[0168] The first rendering module 802 is used to render the corresponding front-end application page according to the front-end static resources.

[0169] The sending module 803 is used to respond to the request operation of the target business service page, and based on the micro-frontend sandbox technology, send a data request message to the main application gateway. The data request message carries the source tag, target service tag and user information corresponding to the data request message.

[0170] The receiving module 804 is used to receive a response message corresponding to the data request message sent by the main application gateway.

[0171] The second rendering module 805 is used to render the target business service page according to the response message.

[0172] In some embodiments, the sending module 803 can be specifically used to: replace the global object of the front-end application with the global object of the proxy module through the micro-front-end sandbox technology, the front-end application includes a target business service page, and the proxy module is used to isolate different front-end applications by creating different global objects for different front-end applications; based on the global object of the proxy module, add a source tag and a target service tag to the initial request message corresponding to the request operation of the target business service page to obtain a data request message; send a data request message to the main application gateway.

[0173] Optionally, the receiving module 804 may also be used to: receive prompt information sent by the main application gateway, the prompt information being used to indicate that the client does not have the authority to access the request address corresponding to the data request message; and feed back the prompt information.

[0174] The micro-frontend-based data processing device provided in the embodiment of the present disclosure can be used to execute the solution of the micro-frontend-based data processing method applied to the client in any of the above-mentioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0175] Fig. 9 This is a schematic diagram of the structure of a micro-front-end-based data processing device provided by another embodiment of the present disclosure, which is applied to an application platform. Fig. 9 As shown, the data processing device 900 based on the micro front-end of the embodiment of the present disclosure includes: a receiving module 901, a processing module 902 and a storage module 903. Among them:

[0176] The receiving module 901 is used to receive the version file corresponding to the front-end application uploaded by the developer of the front-end application through the uploading tool, and the version file at least contains the front-end static resources and codes corresponding to the front-end application.

[0177] Processing module 902 is used to generate a resource package with a corresponding version number according to the version file, and publish the resource package to various deployment environments, including a development deployment environment, a test deployment environment, and an operation and maintenance deployment environment.

[0178] The storage module 903 is used to store the information corresponding to the resource package so as to switch the corresponding version of the resource package of each platform. The information at least includes the front-end application identifier corresponding to the resource package, the version number of the resource package, and the deployment environment corresponding to the resource package.

[0179] In some embodiments, the resource package includes at least one front-end static resource, and the storage module 903 can be specifically used to: obtain the access address corresponding to each front-end static resource included in the resource package; and store the corresponding relationship between the access address and the version number.

[0180] Optionally, the micro-front-end based data processing device 900 also includes an authentication module 904, which is used to authenticate the key configured by the developer in the upload tool before the receiving module receives the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool, so as to determine whether the developer has the authority to upload the version file corresponding to the front-end application through the upload tool.

[0181] In some embodiments, the receiving module 901 can also be used to: receive the backend service configuration corresponding to the backend service, the backend service configuration is used to characterize the correspondence between the service tag and the backend service; the storage module 903 can also be used to store the backend service configuration.

[0182] The micro-frontend-based data processing device provided in the embodiment of the present disclosure can be used to execute the solution of the micro-frontend-based data processing method applied to the application platform in any of the above-mentioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0183] Exemplary Media

[0184] After introducing the method of the exemplary embodiment of the present disclosure, next, refer to Fig.10 A storage medium according to an exemplary embodiment of the present disclosure is described.

[0185] Fig.10 A schematic diagram of a storage medium provided by an embodiment of the present disclosure. Fig.10 As shown, the storage medium 1000 stores a program product for implementing the above method according to an embodiment of the present disclosure, which can be a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto.

[0186] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0187] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable signal medium may also be any readable medium other than a readable storage medium.

[0188] Program code for performing the disclosed operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN).

[0189] Exemplary Computing Devices

[0190] After introducing the method, medium and apparatus of the exemplary embodiments of the present disclosure, next, reference is made to Fig.11 A computing device according to an exemplary embodiment of the present disclosure is described.

[0191] Fig.11 The computing device 1100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0192] Fig.11 A schematic diagram of a computing device according to an embodiment of the present disclosure is shown in FIG. Fig.11As shown, the computing device 1100 is in the form of a general computing device. The components of the computing device 1100 may include but are not limited to: at least one processing unit 1101, at least one storage unit 1102, and a bus 1103 connecting different system components (including the processing unit 1101 and the storage unit 1102).

[0193] The bus 1103 includes a data bus, a control bus, and an address bus.

[0194] The storage unit 1102 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 11021 and / or a cache memory 11022 , and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 11023 .

[0195] The storage unit 1102 may also include a program / utility 11025 having a set (at least one) of program modules 11024, such program modules 11024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0196] The computing device 1100 may also communicate with one or more external devices 1104 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 1105. Furthermore, the computing device 1100 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1106. Fig.11 As shown, the network adapter 1106 communicates with other modules of the computing device 1100 via the bus 1103. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the computing device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0197] It should be noted that although several units / modules or sub-units / modules of a micro-frontend-based data processing device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more units / modules described above may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided to be embodied by multiple units / modules.

[0198] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0199] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. A data processing method based on a micro front end, the data processing method based on a micro front end comprising: The application platform receives a version file corresponding to the front-end application uploaded by the developer of the front-end application through an uploading tool, wherein the version file at least includes the front-end static resources and codes corresponding to the front-end application; The front-end static resources are used to render the corresponding front-end application pages; The application platform generates a resource package with a corresponding version number according to the version file, and publishes the resource package to various deployment environments, including a development deployment environment, a test deployment environment, and an operation and maintenance deployment environment; The application platform stores information corresponding to the resource packages of each version. If there is a problem with the resource package of the current version of the front-end application, the resource packages of the historical versions of the front-end application stored in the application platform are used to switch the resource packages of the various deployment environments to the resource packages corresponding to the correct historical versions of the front-end application; the information includes at least the front-end application identifier corresponding to the resource package, the version number of the resource package, and the deployment environment corresponding to the resource package.

2. According to the micro-frontend-based data processing method of claim 1, the resource package includes at least one front-end static resource, and the application platform stores information corresponding to the resource package, including: The application platform obtains the access address corresponding to each front-end static resource contained in the resource package; The application platform stores the corresponding relationship between the access address and the version number.

3. According to the data processing method based on micro front-end in claim 1, before the application platform receives the version file corresponding to the front-end application uploaded by the developer of the front-end application through the uploading tool, it also includes: The application platform authenticates the key configured by the developer in the upload tool to determine whether the developer has the authority to upload the version file corresponding to the front-end application through the upload tool.

4. The micro-frontend-based data processing method according to any one of claims 1 to 3, further comprising: The application platform receives a backend service configuration corresponding to the backend service, wherein the backend service configuration is used to characterize a correspondence between a service tag and the backend service; The application platform stores the backend service configuration.

5. The micro-frontend-based data processing method according to claim 2 further comprises: The client, in response to the opening operation of the front-end application, obtains the front-end static resources corresponding to the front-end application from the application platform; The client renders the corresponding front-end application page according to the front-end static resources; The client responds to the request operation of the target business service page and sends a data request message to the main application gateway based on the micro-frontend sandbox technology. The data request message carries the source tag, target service tag and user information corresponding to the data request message; The client receives a response message corresponding to the data request message sent by the main application gateway; The client renders the target business service page according to the response message.

6. According to the data processing method based on micro front-end in claim 5, the sending of data request message to the main application gateway based on micro front-end sandbox technology comprises: The client replaces the global object of the front-end application with the global object of the proxy module through the micro-front-end sandbox technology, the front-end application includes the target business service page, and the proxy module is used to isolate different front-end applications by creating different global objects for different front-end applications; The client adds the source tag and the target service tag to the initial request message corresponding to the request operation of the target business service page based on the global object of the proxy module to obtain the data request message; The client sends the data request message to the main application gateway.

7. The micro-frontend-based data processing method according to claim 5 or 6, further comprising: The client receives a prompt message sent by the main application gateway, where the prompt message is used to indicate that the client does not have permission to access the request address corresponding to the data request message; The client feeds back the prompt information.

8. The micro-frontend-based data processing method according to claim 4 further comprises: The main application gateway receives a data request message sent by the client, wherein the data request message carries a source tag, a target service tag and user information corresponding to the data request message, wherein the source tag is used to indicate the source of the data request message, and the target service tag is used to indicate the target backend service corresponding to the data request message; The main application gateway performs authority authentication according to the source tag, the user information and the request address corresponding to the data request message; If it is determined that the client has the authority to access the request address, the main application gateway sends the data request message to the target backend service corresponding to the target service tag according to the target service tag and the backend service configuration; The main application gateway sends a response message corresponding to the data request message sent by the target backend service to the client.

9. According to the micro-frontend-based data processing method of claim 8, the main application gateway performs authority identification according to the source tag, the user information and the request address corresponding to the data request message, including: The main application gateway performs a query in the application platform according to the source tag, the user information and the request address corresponding to the data request message; If data information that completely matches the source tag, the user information, and the request address corresponding to the data request message exists in the application platform, it is determined that the client has the authority to access the request address; Alternatively, if there is no data information in the application platform that completely matches the source tag, the user information, and the request address corresponding to the data request message, it is determined that the client does not have the authority to access the request address.

10. The micro-frontend-based data processing method according to claim 9, further comprising: If it is determined that the client does not have the authority to access the request address, the main application gateway sends a prompt message to the client, where the prompt message is used to indicate that the client does not have the authority to access the request address corresponding to the data request message.

11. According to the micro-frontend-based data processing method of claim 8, the target service tag corresponds to at least two backend services, and the main application gateway sends the data request message to the target backend service corresponding to the target service tag according to the target service tag and the backend service configuration, including: The main application gateway queries the backend service configuration according to the target service tag to determine at least two backend services corresponding to the target service tag; The main application gateway determines the backend service with the smaller access volume among the at least two backend services as the target backend service; The primary application gateway sends the data request message to the target backend service.

12. According to any one of claims 8 to 10, the data processing method based on the micro-frontend, before the main application gateway performs authority authentication according to the source tag, the user information and the request address corresponding to the data request message, further comprising: The main application gateway obtains user authentication information corresponding to the user information according to the user information and a preset encryption algorithm; The main application gateway sends the data request message to the target backend service corresponding to the target service tag according to the target service tag and the backend service configuration, including: The main application gateway adds the user authentication information to the data request message; The main application gateway sends the data request message with the user authentication information added thereto to the target backend service corresponding to the target service tag according to the target service tag and the backend service configuration, so that the target backend service obtains the corresponding user information according to the user authentication information.

13. A data processing device based on a micro front end, the data processing device based on a micro front end comprising: A receiving module is used for the application platform to receive a version file corresponding to the front-end application uploaded by the developer of the front-end application through an uploading tool, wherein the version file at least includes the front-end static resources and codes corresponding to the front-end application; The front-end static resources are used to render the corresponding front-end application pages; A processing module is used for the application platform to generate a resource package with a corresponding version number according to the version file, and publish the resource package to various deployment environments, including a development deployment environment, a test deployment environment, and an operation and maintenance deployment environment; A storage module is used for the application platform to store information corresponding to the resource packages of each version. If there is a problem with the resource package of the current version of the front-end application, the resource packages of the historical versions of the front-end application stored in the application platform are used to switch the resource packages of the various deployment environments to the resource packages corresponding to the correct historical versions of the front-end application. The information includes at least the front-end application identifier corresponding to the resource package, the version number of the resource package, and the deployment environment corresponding to the resource package.

14. According to the micro-frontend-based data processing device of claim 13, the resource package includes at least one frontend static resource, and the storage module is specifically used to: The application platform obtains the access address corresponding to each front-end static resource contained in the resource package; The application platform stores the corresponding relationship between the access address and the version number.

15. According to claim 13, the micro-front-end based data processing device further includes an authentication module, which is used for the application platform to authenticate the key configured by the developer of the front-end application in the upload tool before the receiving module receives the version file corresponding to the front-end application uploaded by the developer of the front-end application through the upload tool to determine whether the developer has the authority to upload the version file corresponding to the front-end application through the upload tool.

16. According to any one of claims 13 to 15, the micro-frontend-based data processing device, the receiving module is further used for: The application platform receives a backend service configuration corresponding to the backend service, wherein the backend service configuration is used to characterize a correspondence between a service tag and the backend service; The storage module is also used for: The application platform stores the backend service configuration.

17. The micro-frontend-based data processing device according to claim 14, further comprising: An acquisition module, used for the client to respond to the opening operation of the front-end application and obtain the front-end static resources corresponding to the front-end application from the application platform; A first rendering module, used for the client to render a corresponding front-end application page according to the front-end static resource; A sending module, which is used for the client to respond to the request operation of the target business service page, and based on the micro-frontend sandbox technology, send a data request message to the main application gateway, wherein the data request message carries a source tag, a target service tag and user information corresponding to the data request message; A receiving module, used for the client to receive a response message corresponding to the data request message sent by the main application gateway; The second rendering module is used for the client to render the target business service page according to the response message.

18. According to the micro-frontend-based data processing device of claim 17, the sending module is specifically used to: The client replaces the global object of the front-end application with the global object of the proxy module through the micro-front-end sandbox technology, the front-end application includes the target business service page, and the proxy module is used to isolate different front-end applications by creating different global objects for different front-end applications; The client adds the source tag and the target service tag to the initial request message corresponding to the request operation of the target business service page based on the global object of the proxy module to obtain the data request message; The client sends the data request message to the main application gateway.

19. According to the micro-frontend-based data processing device according to claim 17 or 18, the receiving module is further used for: The client receives a prompt message sent by the main application gateway, where the prompt message is used to indicate that the client does not have permission to access the request address corresponding to the data request message; The client feeds back the prompt information.

20. According to the micro-frontend-based data processing device of claim 17, the receiving module is further used for the main application gateway to receive a data request message sent by the client, the data request message carries a source tag, a target service tag and user information corresponding to the data request message, the source tag is used to indicate the source of the data request message, and the target service tag is used to indicate the target backend service corresponding to the data request message; The micro-front-end-based data processing device further includes an identification module, which is used for the main application gateway to perform authority identification according to the source tag, the user information and the request address corresponding to the data request message; The sending module is also used to, if it is determined that the client has the authority to access the request address, the main application gateway sends the data request message to the target backend service corresponding to the target service tag according to the target service tag and the backend service configuration; and the main application gateway sends the response message corresponding to the data request message sent by the target backend service to the client.

21. According to the micro-frontend-based data processing device of claim 20, the identification module is specifically used to: The main application gateway performs a query in the application platform according to the source tag, the user information and the request address corresponding to the data request message; If data information that completely matches the source tag, the user information, and the request address corresponding to the data request message exists in the application platform, it is determined that the client has the authority to access the request address; Alternatively, if there is no data information in the application platform that completely matches the source tag, the user information, and the request address corresponding to the data request message, it is determined that the client does not have the authority to access the request address.

22. The micro-frontend-based data processing device according to claim 21, wherein the identification module is further used for: If it is determined that the client does not have the authority to access the request address, the main application gateway sends a prompt message to the client, where the prompt message is used to indicate that the client does not have the authority to access the request address corresponding to the data request message.

23. According to the micro-frontend-based data processing device of claim 20, the target service tag corresponds to at least two backend services, and the sending module is specifically used to: The main application gateway queries the backend service configuration according to the target service tag to determine at least two backend services corresponding to the target service tag; The main application gateway determines the backend service with the smaller access volume among the at least two backend services as the target backend service; The primary application gateway sends the data request message to the target backend service.

24. The micro-frontend-based data processing device according to any one of claims 20 to 22, further comprising an acquisition module, configured for obtaining, by the main application gateway, user authentication information corresponding to the user information according to the user information and a preset encryption algorithm, before the identification module performs authority identification according to the source tag, the user information and the request address corresponding to the data request message; The sending module is specifically used for: The main application gateway adds the user authentication information to the data request message; The main application gateway sends the data request message with the user authentication information added thereto to the target backend service corresponding to the target service tag according to the target service tag and the backend service configuration, so that the target backend service obtains the corresponding user information according to the user authentication information.

25. A computing device comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the micro-frontend-based data processing method according to any one of claims 1 to 12.

26. A storage medium storing computer program instructions, wherein the computer program instructions, when executed, implement the micro-frontend-based data processing method as described in any one of claims 1 to 12.

27. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the micro-frontend-based data processing method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Method for data transmission, ESB platform and client

    CN108683722A

  • Code file packaging deployment method, continuous integration server and system

    CN109725909A