CN113760303A - Processing method, device and equipment of micro front-end application resource and storage medium - Google Patents

Processing method, device and equipment of micro front-end application resource and storage medium Download PDF

Info

Publication number
CN113760303A
CN113760303A CN202111323012.4A CN202111323012A CN113760303A CN 113760303 A CN113760303 A CN 113760303A CN 202111323012 A CN202111323012 A CN 202111323012A CN 113760303 A CN113760303 A CN 113760303A
Authority
CN
China
Prior art keywords
application
sub
micro
configuration center
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111323012.4A
Other languages
Chinese (zh)
Other versions
CN113760303B (en
Inventor
罗徐斌
范渊
杨勃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Anheng Xin'an Technology Co ltd
Original Assignee
DBAPPSecurity Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202111323012.4A priority Critical patent/CN113760303B/en
Publication of CN113760303A publication Critical patent/CN113760303A/en
Application granted granted Critical
Publication of CN113760303B publication Critical patent/CN113760303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a processing method, a device, equipment and a storage medium of micro front-end application resources, wherein the method comprises the following steps: constructing a front-end resource package of the sub-application required by the micro front-end project, and uploading the constructed front-end resource package to the CDN service; generating a configuration center by using the configuration file of the micro front-end project, and storing the configuration center to the CDN service; deploying a main application required by a micro front-end project, and adding a CDN address of a configuration center into the main application; and controlling the main application to add the front-end resource packet of the sub-application according to the CDN address of the configuration center so as to access the resources of the micro front-end project. Therefore, the CDN resources and the micro front end technologies are aggregated through configuration of the configuration center, the micro front end resources are stored in the CDN service, the micro front end main application loads corresponding resources on the CDN service, resource access of the micro front end can be effectively controlled, and the access speed of a user can be improved and the consumption of a server can be saved by loading the resources through the CDN.

Description

Processing method, device and equipment of micro front-end application resource and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing micro front-end application resources.
Background
With the rapid development of internet industry in recent years, business requirements of various enterprise-level applications are more and more complex, in order to improve development efficiency, a framework with front and back ends separated is gradually popularized, and the front end independently operates from the processes of development, construction, deployment, operation and the like. However, most of architectures with separated front and back ends are applied to single-page applications, with the rise of front-end engineering, the amount of front-end services is larger and larger, and this single architecture cannot meet the requirement of multi-service applications and cross-team collaborative development, so a micro front-end technology architecture is proposed and used.
The micro front end is a front end architecture similar to micro service, applies the architecture concept of micro service to the front end architecture, converts a large single web application into a plurality of small web applications to be aggregated into a single application, namely, a large web application is formed after the plurality of small web applications are aggregated, and each small web application can be independently developed, independently operated and independently deployed.
However, in the existing micro front-end system, the packages of the main application and the sub-applications are integrated together to be deployed uniformly when finally packaged, the main application and the sub-applications need to be packaged again to be deployed each time a project is updated, and any application needs to be switched to an old version and needs to be packaged again, which is not convenient for version control and resource access.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus, a device and a storage medium for processing a micro front-end application resource, which can effectively control resource access of a micro front-end, improve access speed of a user and save consumption of a server. The specific scheme is as follows:
a method for processing micro front-end application resources comprises the following steps:
constructing a front-end resource package of a sub-application required by a micro front-end project, and uploading the constructed front-end resource package to a CDN service;
generating a configuration center by using the configuration file of the micro front-end project, and storing the configuration center to the CDN service;
deploying a main application required by the micro front-end project, and adding a CDN address of the configuration center into the main application;
and controlling a main application to add the front-end resource packet of the sub-application according to the CDN address of the configuration center so as to enable the resources of the micro front-end project to be accessed.
Preferably, in the method for processing micro front-end application resources provided in the embodiment of the present invention, after uploading the front-end resource package to the CDN service, the method further includes:
storing the front-end resource packet in a wildcard catalogue corresponding to the sub-application; and each application stores the front-end resource packages of a plurality of versions of the corresponding application under the corresponding wildcard catalog.
Preferably, in the processing method for the micro front-end application resource provided by the embodiment of the present invention, the configuration center includes different versions of each application and a unique wildcard of each application.
Preferably, in the method for processing micro front-end application resources provided in the embodiment of the present invention, the controlling the front-end resource packet of the main application loading sub-application according to the CDN address of the configuration center includes:
acquiring a configuration file of the configuration center according to the CDN address of the configuration center when a main application is initialized, and storing the configuration file locally;
when the routing address is switched, judging whether to add sub application resources or not according to the comparison result of the wildcard character of the routing address and the configuration file of the configuration center;
if so, requesting a CDN address of the configuration center according to the configuration of the sub-application to obtain the front-end resource packet of the sub-application;
and controlling the main application to load the acquired front-end resource packet of the sub-application.
Preferably, in the processing method of the micro front-end application resource provided in the embodiment of the present invention, the method further includes:
when the version of the sub-application is to be upgraded, reconstructing a front-end resource package of the sub-application to be upgraded, uploading the reconstructed front-end resource package to CDN service, and then only changing the version of the sub-application in the configuration center.
Preferably, in the processing method of the micro front-end application resource provided in the embodiment of the present invention, the method further includes:
only the version of the sub-application in the configuration center is changed when the version of the sub-application is switched to an old version.
The embodiment of the invention also provides a device for processing the micro front-end application resource, which comprises:
the resource package construction module is used for constructing a front-end resource package of the sub-application required by the micro front-end project and uploading the constructed front-end resource package to the CDN service;
the configuration center generating module is used for generating a configuration center by using the configuration file of the micro front-end project and storing the configuration center to the CDN service;
the main application deployment module is used for deploying the main application required by the micro front-end project and adding the CDN address of the configuration center into the main application;
and the resource loading module is used for controlling a main application to load the front-end resource packet of the sub-application according to the CDN address of the configuration center so as to enable the resource of the micro front-end project to be accessed.
Preferably, in the processing apparatus for micro front-end application resources provided in an embodiment of the present invention, the apparatus further includes:
the version switching module is used for reconstructing a front-end resource package of the sub-application to be upgraded when the version of the sub-application is to be upgraded, uploading the reconstructed front-end resource package to the CDN service, and then only changing the version of the sub-application in the configuration center; and is further configured to only alter the version of the sub-application in the configuration center when the version of the sub-application is switched to an old version.
The embodiment of the present invention further provides an electronic device, which includes a processor and a memory, wherein when the processor executes a computer program stored in the memory, the processing method of the micro front-end application resource provided in the embodiment of the present invention is implemented.
The embodiment of the present invention further provides a computer-readable storage medium, configured to store a computer program, where the computer program, when executed by a processor, implements the processing method for the micro front-end application resource provided in the embodiment of the present invention.
According to the technical scheme, the processing method of the micro front-end application resource provided by the invention comprises the following steps: constructing a front-end resource package of the sub-application required by the micro front-end project, and uploading the constructed front-end resource package to the CDN service; generating a configuration center by using the configuration file of the micro front-end project, and storing the configuration center to the CDN service; deploying a main application required by a micro front-end project, and adding a CDN address of a configuration center into the main application; and controlling the main application to add the front-end resource packet of the sub-application according to the CDN address of the configuration center so as to access the resources of the micro front-end project.
By applying the processing method of the micro front end application resource provided by the invention, the CDN resource and the micro front end technology are aggregated through the configuration of a configuration center, the micro front end resource is stored on the CDN service, and the micro front end mainly applies the scheme of loading the corresponding resource on the CDN service to realize the resource management of the micro front end project, so that the resource access of the micro front end can be effectively controlled, in addition, the resource is loaded in a CDN mode, the access speed of a user can be improved, the consumption of a server is saved, the decoupling of the original huge front end resource package is reduced, all front end resource packages are not required to be placed on a local server, and the pressure of the micro front end project service is relieved.
In addition, the invention also provides a corresponding device, equipment and a computer readable storage medium aiming at the processing method of the micro front-end application resource, so that the method has higher practicability, and the device, the equipment and the computer readable storage medium have corresponding advantages.
Drawings
In order to more clearly illustrate the embodiments of the present invention or technical solutions in related arts, the drawings used in the description of the embodiments or related arts will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a processing method for micro front-end application resources according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a relationship between a micro front-end project, a configuration center, and a CDN according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a processing apparatus for micro front-end application resources according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a processing method of micro front-end application resources, as shown in fig. 1, comprising the following steps:
s101, constructing a front-end resource package of a sub-application required by a micro front-end project, and uploading the constructed front-end resource package to a CDN service;
it should be noted that the basic principle of a CDN (Content Delivery Network) is to widely use various cache servers, distribute the cache servers to a region or a Network where user access is relatively concentrated, and when a user accesses a website, point the user access to a cache server that is closest to the user and is working normally by using a global load technology, and directly respond to a user request by the cache server.
And constructing a sub-application front-end resource package required by the micro front-end project in the steps, wherein the front-end resource package comprises static resources such as javascript, html, css compressed files and pictures required by the web application.
S102, generating a configuration center by using a configuration file of a micro front-end project, and storing the configuration center to CDN service;
specifically, as shown in fig. 2, the present invention mainly includes three modules, which are a configuration center, a micro front-end project and a CDN.
The micro front-end project is a large web application constructed by a micro front-end architecture and consists of a main application and a plurality of sub-applications. The main application is an inlet of a micro front-end project, and when the project runs, the main application loads resources and a series of logics of each sub-application to realize the aggregation of a plurality of applications, which is equivalent to a base and a carrier for running the project. The sub-application is a module in the web application, can be independently deployed and operated, can be developed by adopting different front-end technical frameworks, and is also a project.
The configuration center is mainly generated by a configuration file of the whole micro front-end project, and comprises different versions of each application and unique wildcards of each application; it will be appreciated that the version of each application, the unique wildcard of each application, is used to distinguish which sub-application the current route needs to load, some basic configuration that each application needs.
The CDN is used for storing the front-end resource packages constructed by each application, and when the main application needs to add the sub-application resource packages, the front-end resource packages can be loaded in a mode of requesting CDN resources.
S103, deploying a main application required by the micro front-end project, and adding a CDN address of a configuration center into the main application;
in a practical application, the project of the main application can be run on an online server.
S104, according to the CDN address of the configuration center, the main application is controlled to add the front-end resource packet of the sub-application, so that the resources of the micro front-end project are accessed.
In the method for processing the micro front-end application resource provided by the embodiment of the invention, the CDN resource and the micro front-end technology are aggregated through the configuration of one configuration center, the micro front-end resource is stored in the CDN service, and the micro front-end main application implements resource management on the micro front-end project by using a scheme of loading corresponding resources on the CDN service, so that the resource access of the micro front-end can be effectively controlled, and in addition, loading resources in the CDN manner can also improve the access speed of a user, save the consumption of a server, reduce decoupling of an original huge front-end resource package, eliminate the need to put all front-end resource packages on a local server, and relieve the pressure of the micro front-end project service.
Further, in a specific implementation, in the method for processing a micro front-end application resource provided in the embodiment of the present invention, after the step S101 is executed to upload the front-end resource package to the CDN service, the method may further include: storing the front-end resource packet under a wildcard catalogue corresponding to the sub-application; and each application stores a plurality of versions of resource packages of the corresponding application under the corresponding wildcard catalog. Therefore, when the main application needs to load the front-end resource packages of the sub-applications, the front-end resource packages of different versions of different sub-applications can be loaded in a mode of requesting CDN resources.
Further, in a specific implementation, in the method for processing micro front-end application resources provided in the embodiment of the present invention, the step S104 of controlling a front-end resource package of a host application loading sub-application according to a CDN address of a configuration center may specifically include: firstly, acquiring a configuration file of a configuration center according to a CDN address of the configuration center during initialization of a main application and storing the configuration file in the local; when the routing address is switched, judging whether to add sub application resources or not according to a comparison result of a wildcard character of the routing address and a configuration file of a configuration center; if so, requesting a CDN address of a configuration center according to the configuration of the sub-application to obtain a front-end resource package of the sub-application; and then controlling the main application to load the acquired front-end resource packet of the sub-application.
Specifically, step S104 is a step of loading the resource by the micro front end. When the main application is initialized, the configuration file of the configuration center can be requested to be acquired and stored locally according to the CND address of the configuration center. When a user switches a routing address in a web browser, comparing the wildcard character of the routing address with the configuration in the configuration center, and judging whether sub-application resources need to be loaded and acquiring the configuration of the sub-application needing to be loaded according to the comparison result. If the sub-application resources need to be loaded, the sub-application front-end resources are acquired according to the CDN address in the configuration request of the sub-application, and finally the main application loads the sub-application front-end resources, so that the micro front-end resource access can be realized.
Further, in a specific implementation, in the processing method for micro front-end application resources provided in the embodiment of the present invention, the method may further include: when the version of the sub-application is to be upgraded, the front-end resource package of the sub-application to be upgraded is reconstructed, the reconstructed front-end resource package is uploaded to the CDN service, and then only the version of the sub-application in the configuration center is changed. And only the version of the sub-application in the configuration center is changed when the version of the sub-application is switched to the old version.
It should be noted that the above steps are version management of the sub-application. When the micro front-end project is updated each time, only the corresponding sub-application resource is needed to be updated (namely, the operation of the step one is carried out) and the version of the sub-application contained in the configuration center is needed to be updated; when the application is required to be switched into the old version, only the version of the sub-application contained in the configuration center needs to be updated, so that the resource access of the micro front end can be further effectively controlled, and the version switching of the sub-application module is facilitated.
Based on the same inventive concept, embodiments of the present invention further provide a device for processing a micro front-end application resource, and because the principle of the device for solving the problem is similar to the aforementioned method for processing a micro front-end application resource, the implementation of the device may refer to the implementation of the method for processing a micro front-end application resource, and repeated details are not repeated.
In specific implementation, the processing apparatus for micro front-end application resources provided in the embodiment of the present invention, as shown in fig. 3, may specifically include:
the resource package construction module 11 is configured to construct a front-end resource package of a sub-application required by a micro front-end project, and upload the constructed front-end resource package to a CDN service;
the configuration center generating module 12 is configured to generate a configuration center by using a configuration file of the micro front-end project, and store the configuration center to the CDN service;
the main application deployment module 13 is configured to deploy a main application required by the micro front-end project, and add a CDN address of the configuration center to the main application;
and the resource loading module 14 is configured to control the main application to load the front-end resource packet of the sub-application according to the CDN address of the configuration center, so that the resource of the micro front-end project is accessed.
In the processing apparatus for micro front-end application resources provided in the embodiment of the present invention, through interaction of the four modules, a CDN resource and a micro front-end technology are aggregated through configuration of a configuration center, a micro front-end resource is stored in a CDN service, and a micro front-end mainly applies a scheme of loading a corresponding resource on the CDN service to implement resource management on a micro front-end project, so that resource access of a micro front-end can be effectively controlled.
Further, in a specific implementation, the processing apparatus for micro front-end application resources provided in an embodiment of the present invention may further include:
the version switching module is used for reconstructing a front-end resource package of the sub-application to be upgraded when the version of the sub-application is to be upgraded, uploading the reconstructed front-end resource package to the CDN service, and then only changing the version of the sub-application in the configuration center; and also for only changing the version of the sub-application in the configuration center when the version of the sub-application is switched to an old version.
For more specific working processes of the modules, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Correspondingly, the embodiment of the invention also discloses an electronic device, which comprises a processor and a memory; the processing method of the micro front-end application resource disclosed in the foregoing embodiment is implemented when the processor executes the computer program stored in the memory.
For more specific processes of the above method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Further, the present invention also discloses a computer readable storage medium for storing a computer program; the computer program, when executed by a processor, implements the processing method of the aforementioned disclosed micro front-end application resource.
For more specific processes of the above method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the equipment and the storage medium disclosed by the embodiment correspond to the method disclosed by the embodiment, so that the description is relatively simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
To sum up, a method for processing micro front-end application resources provided by the embodiment of the present invention includes: constructing a front-end resource package of the sub-application required by the micro front-end project, and uploading the constructed front-end resource package to the CDN service; generating a configuration center by using the configuration file of the micro front-end project, and storing the configuration center to the CDN service; deploying a main application required by a micro front-end project, and adding a CDN address of a configuration center into the main application; and controlling the main application to add the front-end resource packet of the sub-application according to the CDN address of the configuration center so as to access the resources of the micro front-end project. By applying the method, the CDN resources and the micro front end technologies are aggregated through the configuration of a configuration center, the micro front end resources are stored in CDN service, the micro front end mainly applies a scheme of loading corresponding resources on the CDN service to realize the resource management of a micro front end project, the resource access of the micro front end can be effectively controlled, in addition, the resources are loaded in a CDN mode, the access speed of a user can be improved, the consumption of a server is saved, the original huge front end resource package is reduced, all front end resource packages do not need to be placed on a local server, and the pressure of the micro front end project service is relieved. In addition, the invention also provides a corresponding device, equipment and a computer readable storage medium aiming at the processing method of the micro front-end application resource, so that the method has higher practicability, and the device, the equipment and the computer readable storage medium have corresponding advantages.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, apparatus, device and storage medium for processing micro front-end application resources provided by the present invention are described in detail above, and a specific example is applied in the present document to illustrate the principle and implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for processing micro front-end application resources is characterized by comprising the following steps:
constructing a front-end resource package of a sub-application required by a micro front-end project, and uploading the constructed front-end resource package to a CDN service;
generating a configuration center by using the configuration file of the micro front-end project, and storing the configuration center to the CDN service;
deploying a main application required by the micro front-end project, and adding a CDN address of the configuration center into the main application;
and controlling a main application to add the front-end resource packet of the sub-application according to the CDN address of the configuration center so as to enable the resources of the micro front-end project to be accessed.
2. The method for processing micro front-end application resources of claim 1, further comprising, after uploading the front-end resource package onto a CDN service:
storing the front-end resource packet in a wildcard catalogue corresponding to the sub-application; and each application stores the front-end resource packages of a plurality of versions of the corresponding application under the corresponding wildcard catalog.
3. The method of claim 2, wherein the configuration hub comprises different versions of each application and a unique wildcard for each application.
4. The method as claimed in claim 3, wherein the controlling the front-end resource packet of the host application loading sub-application according to the CDN address of the configuration center comprises:
acquiring a configuration file of the configuration center according to the CDN address of the configuration center when a main application is initialized, and storing the configuration file locally;
when the routing address is switched, judging whether to add sub application resources or not according to the comparison result of the wildcard character of the routing address and the configuration file of the configuration center;
if so, requesting a CDN address of the configuration center according to the configuration of the sub-application to obtain the front-end resource packet of the sub-application;
and controlling the main application to load the acquired front-end resource packet of the sub-application.
5. The method for processing micro front-end application resources of claim 4, further comprising:
when the version of the sub-application is to be upgraded, reconstructing a front-end resource package of the sub-application to be upgraded, uploading the reconstructed front-end resource package to CDN service, and then only changing the version of the sub-application in the configuration center.
6. The method for processing micro front-end application resources of claim 5, further comprising:
only the version of the sub-application in the configuration center is changed when the version of the sub-application is switched to an old version.
7. A device for processing micro-front-end application resources, comprising:
the resource package construction module is used for constructing a front-end resource package of the sub-application required by the micro front-end project and uploading the constructed front-end resource package to the CDN service;
the configuration center generating module is used for generating a configuration center by using the configuration file of the micro front-end project and storing the configuration center to the CDN service;
the main application deployment module is used for deploying the main application required by the micro front-end project and adding the CDN address of the configuration center into the main application;
and the resource loading module is used for controlling a main application to load the front-end resource packet of the sub-application according to the CDN address of the configuration center so as to enable the resource of the micro front-end project to be accessed.
8. The apparatus for processing micro-front-end application resources of claim 7, further comprising:
the version switching module is used for reconstructing a front-end resource package of the sub-application to be upgraded when the version of the sub-application is to be upgraded, uploading the reconstructed front-end resource package to the CDN service, and then only changing the version of the sub-application in the configuration center; and is further configured to only alter the version of the sub-application in the configuration center when the version of the sub-application is switched to an old version.
9. An electronic device comprising a processor and a memory, wherein the processor implements the processing method of the micro front-end application resource of any one of claims 1 to 6 when executing the computer program stored in the memory.
10. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the processing method of a micro front-end application resource of any of claims 1 to 6.
CN202111323012.4A 2021-11-10 2021-11-10 Processing method, device and equipment of micro front-end application resource and storage medium Active CN113760303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111323012.4A CN113760303B (en) 2021-11-10 2021-11-10 Processing method, device and equipment of micro front-end application resource and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111323012.4A CN113760303B (en) 2021-11-10 2021-11-10 Processing method, device and equipment of micro front-end application resource and storage medium

Publications (2)

Publication Number Publication Date
CN113760303A true CN113760303A (en) 2021-12-07
CN113760303B CN113760303B (en) 2022-02-08

Family

ID=78784819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111323012.4A Active CN113760303B (en) 2021-11-10 2021-11-10 Processing method, device and equipment of micro front-end application resource and storage medium

Country Status (1)

Country Link
CN (1) CN113760303B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024000917A1 (en) * 2022-07-01 2024-01-04 上海淇毓信息科技有限公司 Non-intrusive, pluggable front-end build transfer acceleration method and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847382A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 CDN file distribution method and system
CN111737032A (en) * 2020-07-27 2020-10-02 腾讯科技(深圳)有限公司 Subprogram running method and device based on microkernel system and electronic equipment
WO2021031767A1 (en) * 2019-08-22 2021-02-25 中兴通讯股份有限公司 Resource scheduling method, smart front-end device, smart gateway, and distributed system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847382A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 CDN file distribution method and system
WO2021031767A1 (en) * 2019-08-22 2021-02-25 中兴通讯股份有限公司 Resource scheduling method, smart front-end device, smart gateway, and distributed system
CN111737032A (en) * 2020-07-27 2020-10-02 腾讯科技(深圳)有限公司 Subprogram running method and device based on microkernel system and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
每日优鲜大前端团队: "每日优先供应链前端团队微前端改造", 《HTTPS://JUEJIN.CN/POST/6844903943873675271》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024000917A1 (en) * 2022-07-01 2024-01-04 上海淇毓信息科技有限公司 Non-intrusive, pluggable front-end build transfer acceleration method and apparatus

Also Published As

Publication number Publication date
CN113760303B (en) 2022-02-08

Similar Documents

Publication Publication Date Title
US8131706B2 (en) Dynamic binding of portlets
CN112000348A (en) Control method and device for service gray release and computer equipment
US20120166650A1 (en) Method of load balancing edge-enabled applications in a content delivery network (CDN)
US20150242197A1 (en) Automatic Installing and Scaling of Application Resources in a Multi-Tenant Platform-as-a-Service (PaaS) System
US20090327460A1 (en) Application Request Routing and Load Balancing
CN101106578B (en) A method and system for changing interface subject
CN106371889B (en) Method and device for realizing high-performance cluster system of scheduling mirror image
CN104243537A (en) Automatic retractable method and system used under cloud computing environment
US10855796B2 (en) Data storage method and device
CN108595510A (en) A kind of reptile based on browser end, distributed reptile system and method
CN114281263B (en) Storage resource processing method, system and equipment of container cluster management system
CN113760303B (en) Processing method, device and equipment of micro front-end application resource and storage medium
CN112433863A (en) Micro-service calling method and device, terminal equipment and storage medium
CN109254804A (en) A kind of static resource loading method, device, equipment and readable storage medium storing program for executing
US20170017380A1 (en) Mobile enabling a web application developed without mobile rendering capabilities
AlShahwan et al. Evaluation of Distributed SOAP and RESTful MobileWeb Services
O'Sullivan et al. The cloud personal assistant for providing services to mobile clients
Phani Praveen et al. An optimized rendering solution for ranking heterogeneous VM instances
US8533333B2 (en) Shared hosting using host name affinity
CN114827276A (en) Data processing method and device based on edge calculation and readable storage medium
CN112333270B (en) Method and system for dynamic routing of micro-services
CN112468463B (en) Device and method for arranging scene capacity based on cloud native capacity gateway
CN104219277A (en) Rearranging a server response
CN114461424A (en) Inter-unit service discovery method, device and system under unitized deployment architecture
US10298689B2 (en) Network node, electronic device and methods for benefitting from a service provided by a cloud

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230330

Address after: No. 208, Floor 2, No. 31 Haidian Street, Haidian District, Beijing 100080

Patentee after: Beijing Anheng Xin'an Technology Co.,Ltd.

Address before: No. 188, Lianhui street, Xixing street, Binjiang District, Hangzhou, Zhejiang Province, 310000

Patentee before: Dbappsecurity Co.,Ltd.