Search

CN-115421771-B - Gray release method and device for micro front-end system, computer equipment and medium

CN115421771BCN 115421771 BCN115421771 BCN 115421771BCN-115421771-B

Abstract

The application relates to a gray level publishing method, a device, a computer readable storage medium and a computer program product of a micro front-end system, wherein the method comprises the steps of obtaining user information, and determining a main gray level identifier of a main application in the micro front-end system and a sub gray level identifier corresponding to each sub application according to the user information; and responding to a sub-application access request initiated under the running environment of the main application program corresponding to the main application version file, acquiring a sub-application version file of the sub-application to be accessed according to the sub-gray scale identification of the sub-application to be accessed corresponding to the sub-application access request, and issuing the sub-application version file. By adopting the method, the accuracy of the release result can be improved.

Inventors

  • CHEN HONGLIANG
  • ZHUANG HONGBIN
  • ZENG ZHAOZHI

Assignees

  • 深圳市科脉技术股份有限公司

Dates

Publication Date
20260512
Application Date
20220831

Claims (10)

  1. 1. The gray level release method of the micro front-end system is characterized by comprising the following steps of: Acquiring user information, and determining a main gray scale identifier of a main application in a micro front-end system and a sub gray scale identifier corresponding to each sub application according to the user information; Determining and issuing a main application version file corresponding to the main gray mark from all candidate main application version files of the main application; Responding to a sub-application access request, and acquiring a sub-application version file of a sub-application to be accessed according to a sub-gray scale identification of the sub-application to be accessed corresponding to the sub-application access request, wherein the sub-application access request is initiated under the running environment of a main application corresponding to the main application version file; and publishing the sub-application version file.
  2. 2. The method of claim 1, wherein the obtaining the sub-application version file of the sub-application to be accessed according to the sub-gray level identifier of the sub-application to be accessed corresponding to the sub-application access request includes: Determining a sub-application to be accessed requested to be accessed by the sub-application access request and a sub-gray scale identification of the sub-application to be accessed; Determining a file access address of the sub-application to be accessed according to the sub-gray scale identification of the sub-application to be accessed; And acquiring the sub-application version file of the sub-application to be accessed based on the file access address.
  3. 3. The method of claim 2, the method further comprising: Acquiring an initial access address and a candidate sub-gray scale identifier corresponding to each sub-application; And respectively adding each candidate sub-gray scale identifier to the initial access address for each sub-application to obtain a plurality of candidate access addresses corresponding to each sub-application.
  4. 4.A method according to claim 3, wherein said determining the file access address of the sub-application to be accessed according to the sub-gray level identification of the sub-application to be accessed comprises: extracting a candidate sub-gray scale identifier carried by each candidate access address corresponding to the sub-application to be accessed; and determining the file access address of the sub-application to be accessed from the candidate access addresses based on an identification matching result obtained by carrying out identification matching on the sub-gray identification of the sub-application to be accessed and the candidate sub-gray identifications.
  5. 5. The method according to any one of claims 1 to 4, wherein determining, according to the user information, a main gray scale identifier of a main application in the micro front-end system and a sub gray scale identifier corresponding to each sub application, respectively, includes: acquiring a corresponding relation between user information and a main gray scale mark and a corresponding relation between the user information and a sub gray scale mark; Determining a main gray scale identifier of a main application in a micro front-end system according to the acquired user information and the corresponding relation between the user information and the main gray scale identifier; And determining the sub-gray scale identifier corresponding to each sub-application in the micro front-end system according to the acquired user information and the corresponding relation between the user information and the sub-gray scale identifier.
  6. 6. The method of claim 5, wherein the user information comprises user identification information; acquiring historical user identification information and historical user equipment information corresponding to the historical user identification information; And establishing a corresponding relation between the user identification information and the main gray scale identification and a corresponding relation between the user identification information and the sub gray scale identification based on an equipment matching result obtained by matching the historical user equipment information with the gray scale version release equipment requirement of the micro front-end system.
  7. 7. A micro front-end system gray scale distribution device, comprising: The gray scale identification determining module is used for acquiring user information and determining a main gray scale identification of a main application in the micro front-end system and a sub gray scale identification corresponding to each sub application according to the user information; the main application release module is used for determining and releasing a main application version file corresponding to the main gray mark from all candidate main application version files of the main application; The sub-application version file acquisition module is used for responding to a sub-application access request and acquiring a sub-application version file of a sub-application to be accessed according to a sub-gray scale identifier of the sub-application to be accessed corresponding to the sub-application access request, wherein the sub-application access request is initiated under the running environment of a main application program corresponding to the main application version file; and the sub-application release module is used for releasing the sub-application version file.
  8. 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.

Description

Gray release method and device for micro front-end system, computer equipment and medium Technical Field The present application relates to the field of computer technology, and in particular, to a gray level publishing method, device, computer equipment, computer readable storage medium and computer program product for a micro front-end system. Background Along with the rapid development of computer technology, front-end development engineering is more and more huge, product functions are more and more complex, and micro front-ends are generated. The micro front end refers to the concept of back end micro service, and a huge front end project is split into small projects, and the small projects completely have independent development and operation capabilities. The whole system is cooperated by the small projects to realize the display and interaction of all pages. Gray release refers to that when a new version application is online, a new version application is released to a part of users, so that after the new version application which is not completely online is updated based on feedback of the users, the new version application is gradually expanded to release to all users. The traditional gray level release method is based on cookies stored in the user terminal, and the target version is switched to through cookie verification so as to realize gray level release. However, if the conventional gray level distribution method is applied to the micro front-end system, after the cookie of the user terminal is cleaned, the user needs to enter again through the weighted polling of the ngix, and may be allocated to a distinct application version from the last time. Therefore, the conventional gray level release method is applied to the micro front-end system, and has the defect of inaccurate release results. Disclosure of Invention In view of the foregoing, it is desirable to provide a micro front-end system gray scale distribution method, apparatus, computer device, computer readable storage medium, and computer program product that can improve the accuracy of distribution results. In a first aspect, the application provides a gray level publishing method of a micro front-end system. The method comprises the following steps: Acquiring user information, and determining a main gray scale identifier of a main application in a micro front-end system and a sub gray scale identifier corresponding to each sub application according to the user information; Determining and issuing a main application version file corresponding to the main gray mark from all candidate main application version files of the main application; Responding to a sub-application access request, and acquiring a sub-application version file of a sub-application to be accessed according to a sub-gray scale identification of the sub-application to be accessed corresponding to the sub-application access request, wherein the sub-application access request is initiated under the running environment of a main application corresponding to the main application version file; and publishing the sub-application version file. In some embodiments, the obtaining, according to the sub-gray level identifier of the sub-application to be accessed corresponding to the sub-application access request, a sub-application version file of the sub-application to be accessed includes: Determining a sub-application to be accessed requested to be accessed by the sub-application access request and a sub-gray scale identification of the sub-application to be accessed; Determining a file access address of the sub-application to be accessed according to the sub-gray scale identification of the sub-application to be accessed; And acquiring the sub-application version file of the sub-application to be accessed based on the file access address. In some embodiments, the method further comprises: Acquiring an initial access address and a candidate sub-gray scale identifier corresponding to each sub-application; And respectively adding each candidate sub-gray scale identifier to the initial access address for each sub-application to obtain a plurality of candidate access addresses corresponding to each sub-application. In some embodiments, the determining the file access address of the sub-application to be accessed according to the sub-gray scale identification of the sub-application to be accessed includes: extracting a candidate sub-gray scale identifier carried by each candidate access address corresponding to the sub-application to be accessed; and determining the file access address of the sub-application to be accessed from the candidate access addresses based on an identification matching result obtained by carrying out identification matching on the sub-gray identification of the sub-application to be accessed and the candidate sub-gray identifications. In some embodiments, the determining, according to the user information, a main gray scale identifier of a main application