Gray release method and system and gray management device

The configuration information is automatically obtained and sent through the grayscale management device, which solves the problem of manual operations affecting efficiency in grayscale release, and realizes the gateway to quickly obtain configuration information, improving the efficiency of grayscale release.

CN118945218APending Publication Date: 2024-11-12ULTRAPOWER SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310539931.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

During the grayscale release process, gateway configuration information needs to be uploaded or changed manually, resulting in inefficiency and affecting the speed of grayscale release.

Method used

The grayscale management device receives the instruction information of the service node, obtains the configuration information of the grayscale service node, and sends configuration information to the gateway, so that the gateway can grayscale release based on the latest configuration information, avoiding manual operations.

Benefits of technology

Improve the efficiency of grayscale release, enable the gateway to quickly obtain the latest configuration information, reduce manual intervention, and improve release speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945218A_ABST
    Figure CN118945218A_ABST
Patent Text Reader

Abstract

The invention provides a gray release method, a gray release system and a gray management device. The gray release efficiency can be improved. The method is applied to a gray level management device, and comprises the following steps: receiving indication information sent by a micro-service for service registration, the indication information being used for indicating at least one service node accessed to a network; if the at least one service node comprises a gray service node and a configuration instruction for the gray service node is received, obtaining first configuration information of the gray service node; and sending the first configuration information to the gateway, so that the gateway performs gray release on the gray service node according to the first configuration information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of grayscale publishing technology, and in particular to a grayscale publishing method, system and grayscale management device. Background Art

[0002] In recent years, with the rapid development of Internet products, product upgrades have become more and more frequent. In order to ensure that products can provide stable services to users while also upgrading them, the grayscale release method came into being.

[0003] The current grayscale release method is to use some service nodes as stable service nodes and other service nodes as grayscale service nodes, where the stable service nodes provide stable services to users by running the released product (the version of the product can be called the released version), and the grayscale service nodes provide grayscale services to users by running the version of the product to be upgraded (the version of the product to be upgraded can be called the grayscale version). In addition, the gateway guides the traffic of some users accessing the product to the grayscale service node according to the configuration information for grayscale verification, where the configuration information is used to configure users accessing the grayscale service node. If the verification fails, all traffic can be immediately switched to the stable service node, and the grayscale release process can be canceled. If the verification is successful, the grayscale version will be fully released as the new version of the product, upgraded to the stable cluster of the production environment, and the grayscale release process is completed.

[0004] However, during the grayscale release process, staff are required to go to the gateway site to manually upload or change configuration information on the gateway. The speed of uploading or changing configuration information is slow, which affects the efficiency of grayscale release. Summary of the invention

[0005] The present application provides a grayscale publishing method, system and grayscale management device, which can improve the efficiency of grayscale publishing.

[0006] In a first aspect, a grayscale publishing method is provided, which is applied to a grayscale management device, comprising:

[0007] Receive indication information sent by a microservice for service registration, where the indication information is used to indicate at least one service node that has been connected to the network;

[0008] If the at least one service node includes a grayscale service node and a configuration instruction for the grayscale service node is received, obtaining first configuration information of the grayscale service node;

[0009] The first configuration information is sent to the gateway, so that the gateway performs grayscale publishing on the grayscale service node according to the first configuration information.

[0010] In one possible design, the method further includes:

[0011] If an instruction to release and upgrade the grayscale service node is received, re-determine the first configuration information of the grayscale service node according to a preset rule;

[0012] The re-determined first configuration information is sent to the gateway, so that the gateway determines the route corresponding to the grayscale service node according to the re-determined first configuration information.

[0013] In a feasible design, after sending the redetermined first configuration information to the gateway, the method further includes:

[0014] If a version rollback instruction is received, an instruction message is sent to the gateway to stop calling the grayscale service node;

[0015] Obtain second configuration information of a stable service node, where the stable service node is a service node that has been released and upgraded before the grayscale service node;

[0016] The second configuration information is sent to the gateway, so that the gateway determines the route corresponding to the stable service node according to the second configuration information.

[0017] In one possible design, the method further includes:

[0018] Determining the type of the user according to the user's login information and the first configuration information;

[0019] If the user type is a grayscale user, load the grayscale front-end page that calls the grayscale service node for the user.

[0020] In a feasible design, the first configuration information includes one or more of the following information: the network address of the service node, the service name corresponding to the service node, the application name corresponding to the service name, the grayscale policy name corresponding to the service node, and the user account or network address corresponding to the grayscale policy name.

[0021] In a second aspect, a grayscale publishing method is provided, which is applied to a gateway and includes:

[0022] Receiving first configuration information of at least one grayscale service node from a grayscale management device;

[0023] Determine the type of user according to the user request of the user;

[0024] If the type of the user is a grayscale user, determining a first grayscale service node of the at least one grayscale service node that satisfies the user request according to the user request and first configuration information of the at least one grayscale service node;

[0025] Send a user request to the first grayscale service node.

[0026] In one possible design, the method further includes:

[0027] Receiving a call request and a user request from a first grayscale service node, where the call request includes a service name;

[0028] If the at least one grayscale service node includes a service node corresponding to the service name, determining a second service node that satisfies the call request from the at least one grayscale service node according to the call request, the user request, and the first configuration information of the at least one grayscale service node;

[0029] Send a call request to the second service node.

[0030] In a third aspect, a grayscale release method is provided, which is applied to a service node, including:

[0031] Receive user requests from the gateway;

[0032] Determine, based on the user request, the type of the user sending the user request;

[0033] If the user type is a grayscale user, the user's data is stored in the grayscale database, which is used to store user data generated during the grayscale release process;

[0034] Otherwise, the user's data is stored in the publishing database, which is used to store the user data generated by the stable service node in the process of serving the user.

[0035] In a fourth aspect, a grayscale management device is provided, the device comprising:

[0036] A first information transmission module, used to receive indication information sent by a microservice for service registration, where the indication information is used to indicate at least one service node that has been connected to the network;

[0037] A first processing module, configured to obtain first configuration information of the grayscale service node if the at least one service node includes a grayscale service node and a configuration instruction for the grayscale service node is received;

[0038] The first information transmission module is also used to send first configuration information to the gateway, so that the gateway performs grayscale publishing on the grayscale service node according to the first configuration information.

[0039] In a fifth aspect, a gateway is provided, the gateway comprising:

[0040] A second information transmission module, configured to receive first configuration information of at least one grayscale service node from a grayscale management device;

[0041] A second processing module is used to determine the type of user according to the user request of the user;

[0042] The second processing module is further configured to determine, if the type of the user is a grayscale user, a first grayscale service node of the at least one grayscale service node that satisfies the user request according to the user request and first configuration information of the at least one grayscale service node;

[0043] The second information transmission module is used to send a user request to the first grayscale service node.

[0044] In a sixth aspect, a service node is provided, the service node comprising:

[0045] A third information transmission module, used for receiving a user request from a gateway;

[0046] A third processing module is used to determine the type of the user who sends the user request according to the user request;

[0047] The third processing module is further used to store the user's data in a grayscale database if the user type is a grayscale user, and the grayscale database is used to store the user data generated during the grayscale release process;

[0048] Otherwise, the user's data is stored in the publishing database, which is used to store the user data generated by the stable service node in the process of serving the user.

[0049] In a seventh aspect, a grayscale release system is provided, including:

[0050] A grayscale management device, used to execute the method described in any one of the examples of the grayscale publishing method embodiment applied to the grayscale management device;

[0051] A gateway, used to execute the method described in any one of the examples in the embodiment of the grayscale publishing method applied to the gateway;

[0052] A service node is used to execute the method described in any example of the above-mentioned grayscale publishing method embodiment applied to a service node.

[0053] In the existing grayscale publishing process, if it is necessary to upload or change the configuration information in the gateway, the staff needs to manually upload or change the configuration information on the corresponding device of the gateway, which affects the efficiency of grayscale publishing. In the above embodiment of the present application, after the grayscale management device receives the indication information and obtains at least one service node, if the at least one service node includes a grayscale service node and receives a configuration instruction for the grayscale service node, it can obtain the first configuration information of the grayscale service node. Then the first configuration information is sent to the gateway so that the gateway performs grayscale publishing on the grayscale service node according to the first configuration information. Compared with the staff manually uploading or changing the configuration information on the corresponding device of the gateway, the embodiment of the present application enables the gateway to quickly obtain the latest first configuration information through the interaction between the grayscale management device and the gateway, thereby improving the efficiency of grayscale publishing. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1 This is a schematic diagram of a grayscale publishing system architecture provided by an exemplary embodiment of the present application;

[0056] Figure 2 is a schematic flow chart of a grayscale publishing method provided by an exemplary embodiment of the present application;

[0057] Figure 3 is a schematic diagram of an operation interface displayed by a grayscale management device provided by an exemplary embodiment of the present application;

[0058] Figure 4 is a schematic diagram of an operation interface displayed by another grayscale management device provided by an exemplary embodiment of the present application;

[0059] Figure 5 is a schematic flow chart of another grayscale publishing method provided by an exemplary embodiment of the present application;

[0060] Figure 6 is a schematic flow chart of another grayscale publishing method provided by an exemplary embodiment of the present application;

[0061] Figure 7 is a schematic diagram of a grayscale management device structure provided by an exemplary embodiment of the present application;

[0062] Figure 8 This is a schematic diagram of a gateway structure provided by an exemplary embodiment of the present application;

[0063] Fig. 9 This is a schematic diagram of a service node structure provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0064] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0065] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0066] Figure 1 is a schematic diagram of a grayscale publishing system architecture provided by an exemplary embodiment of the present application. Figure 1 As shown, the grayscale publishing system 100 includes a microservice 110 , a registration center 120 , a gateway 130 , a user client 140 and a grayscale management device 150 .

[0067] The microservice 110 includes at least one service node, which includes a grayscale service node 111 and a stable service node 112. The grayscale service node 111 provides grayscale services to users by running grayscale versions of products. The stable service node 112 provides stable services to users by running released versions of products. After the grayscale service node 111 and the stable service node 112 are started, they register their respective information in the registration center 120. The information includes the network address of the service node and the name of the service node, wherein the network address includes an Internet protocol address, a port number, etc.

[0068] The registration center 120 is a microservice responsible for registering and discovering service nodes of microservices. Specifically, the registration center 120 can generate a service registration list based on the information of the registered service nodes, and the service registration list stores the information of the service nodes that can be called in the microservice 110. After receiving the information of the service registration list requested by the gateway, the registration center 120 can send the service registration list to the gateway 130. It can also send the service registration list to the gateway 130 after the service registration list is updated. The registration center 120 can also send the information of the service nodes that have been connected to the network to the gray management device 150.

[0069] The gateway 130 determines the service node that can be called according to the obtained service registration list, and then forwards the calling request of the user client 140 to the service node that can be called.

[0070] The user client 140 is a terminal device (such as a computer, mobile phone, etc.) that runs an application, and the application calls the microservice 110 through the gateway 130.

[0071] The grayscale management device 150 is used to configure the grayscale service node and the stable service node to realize grayscale release. The grayscale management device 150 provides a browsable user interface service based on the front-end file to the user client 140 through HTTP and a reverse proxy web server (engine x, Nginx).

[0072] In a feasible design, the microservice 110 is a service in the Spring Boot framework, the registration center 120 is a registration center (Eureka) developed by Spring Cloud, and the gateway 130 applies the gateway framework Spring Cloud Gateway developed by Spring Cloud.

[0073] In the present application, the grayscale release method can be applied to the grayscale management device 150. Through the interaction between the grayscale management device 150 and the microservice 110, the registration center 120 and the gateway 130, the grayscale release of the microservice 110 is realized, thereby improving the efficiency of the grayscale release.

[0074] Figure 2 is a schematic flow chart of a grayscale publishing method provided by an exemplary embodiment of the present application, such as Figure 2 As shown, the method 200 includes:

[0075] S210, receiving indication information sent by a microservice for service registration, where the indication information is used to indicate at least one service node that has been connected to the network.

[0076] Among them, the microservice used for service registration may be the registration center 120 .

[0077] In a feasible design, the scenario in which this method is applied is:

[0078] The registration center 120 sends indication information to the gray management device 150 every preset time period, and the indication information includes information about the service node of the microservice 110 that is newly connected to the network within the preset time period.

[0079] In this scenario, the grayscale management device 150 first determines whether a configured stable service node of the microservice 110 is stored (or whether the indication information is received for the first time).

[0080] If the stable service node of the microservice 110 is not stored (or if the indication information is received for the first time), it is determined that at least one service node does not include a grayscale service node, then the at least one service node is used as a stable service node, and the at least one service node is marked as a released version on the operation interface (such as Figure 3 The second operation interface is shown in Figure 1).

[0081] If a stable service node of the microservice 110 is stored (or if the indication information is not received for the first time), it is determined that at least one service node includes a grayscale service node. The grayscale management device 150 uses the service node in the indication information as the grayscale service node of the microservice 110 and identifies the grayscale service node as a grayscale version on the operation interface (e.g. Figure 3 The second operation interface is shown in Figure 1).

[0082] In a feasible design, the scenario in which this method is applied is:

[0083] The registration center 120 sends indication information to the gray management device 150 every preset time period. The indication information includes the latest service registration list corresponding to the microservice 110 . The service registration list includes all service nodes corresponding to the microservice 110 .

[0084] In this scenario, the grayscale management device 150 first determines whether a configured stable service node of the microservice 110 is stored (or whether the indication information is received for the first time).

[0085] If the stable service node of the microservice 110 is not stored (or if the indication information is received for the first time), it is determined that at least one service node does not include a grayscale service node, then the at least one service node is used as a stable service node, and the at least one service node is marked as a released version on the operation interface (such as Figure 3 The second operation interface is shown in Figure 1).

[0086] If a stable service node of the microservice 110 is stored (or if the indication information is not received for the first time), it is determined that at least one service node includes a grayscale service node. The grayscale management device 150 compares the service node in the indication information with the configured stable service node, thereby determining an unconfigured service node of the microservice 110. The unconfigured service node is used as a grayscale service node, and the grayscale service node is identified as a grayscale version on the second operation interface.

[0087] In the above example, through the interaction between the registration center 120 and the grayscale management device 150, the grayscale management device 150 can accurately and efficiently determine the grayscale service node according to the indication information, so as to facilitate the subsequent configuration of the grayscale service node.

[0088] like Figure 3 As shown, after the grayscale service node is identified as a grayscale version, the grayscale management device 150 displays a first operation interface to the grayscale administrator through a display. The first operation interface is used to display "serial number", "application name", "service name", "registration time" and configuration buttons. If a selection command for the configuration button of the microservice 110 is received from the grayscale administrator, a second operation interface is displayed to the grayscale administrator.

[0089] The second operation interface is used to display the information of service node 1, service node 2 and various operation buttons of the microservice 110. The information of the service node includes "serial number", "registration time", "service node address", "version number" and "status".

[0090] The operation button "Release Upgrade" is used to trigger the grayscale management device 150 to change the version identifier of the service node from the grayscale version to the release version, that is, to officially launch the grayscale service node as a stable service node (this process can be called releasing and upgrading the grayscale service node).

[0091] The operation button "version rollback" is used to trigger the grayscale management device 150 to instruct the gateway to stop calling the service node that has become the released version, and send the configuration information of the service node that has been released and upgraded before the service node to the gateway, so that the gateway can call the service node that has been released and upgraded again.

[0092] The operation button “grayscale release” is used to trigger the grayscale management device 150 to perform grayscale release of the grayscale service node.

[0093] The operation button “Abandon grayscale” is used to trigger the grayscale management device 150 to stop the ongoing grayscale release.

[0094] The operation button "Go Online" is used to trigger the grayscale management device 150 to instruct the gateway to allow the service node to provide services to the grayscale administrator.

[0095] The operation button "offline" is used to trigger the grayscale management device 150 to instruct the gateway to stop the service node from providing services to the grayscale administrator.

[0096] The operation button "Add" is used to trigger the grayscale management device 150 to display a third operation interface to the grayscale administrator, and the third operation interface is used to configure each service node according to the instruction of the grayscale administrator.

[0097] S220: If the at least one service node includes a grayscale service node and a configuration instruction for the grayscale service node is received, obtain first configuration information of the grayscale service node.

[0098] In a feasible design, the first configuration information includes one or more of the following information: the network address of the service node, the service name corresponding to the service node, the application name corresponding to the service name, the grayscale policy name corresponding to the service node, and the user account or network address corresponding to the grayscale policy name.

[0099] In a feasible design, the grayscale policy name includes Internet Protocol address policy or account policy.

[0100] In a feasible design, the grayscale management device 150 receives a configuration instruction for at least one grayscale service node through the second operation interface, and displays a third operation interface to the grayscale administrator in response to the configuration instruction. Then, the first configuration information of at least one grayscale service node is obtained according to the operation instruction of the grayscale administrator on the third operation interface.

[0101] For example, the third operation interface is as follows: Figure 4 The grayscale administrator can configure the grayscale policy of service node 2 by selecting "Internet Protocol Address" or "Account" in the grayscale policy name, and then configure the grayscale user corresponding to service node 2 by inputting the account or network address of the user who tests the grayscale version. The grayscale management device 150 obtains the first configuration information of service node 2 through the third operation interface.

[0102] S230: Send first configuration information to the gateway, so that the gateway performs grayscale publishing on the grayscale service node according to the first configuration information.

[0103] In the existing grayscale publishing process, if it is necessary to upload or change the configuration information in the gateway, the staff needs to manually upload or change the configuration information on the corresponding device of the gateway, which affects the efficiency of grayscale publishing. In the above embodiment of the present application, after the grayscale management device receives the indication information and obtains at least one service node, if the at least one service node includes a grayscale service node and receives a configuration instruction for the grayscale service node, it can obtain the first configuration information of the grayscale service node. Then the first configuration information is sent to the gateway so that the gateway performs grayscale publishing on the grayscale service node according to the first configuration information. Compared with the staff manually uploading or changing the configuration information on the corresponding device of the gateway, the embodiment of the present application enables the gateway to quickly obtain the latest first configuration information through the interaction between the grayscale management device and the gateway, thereby improving the efficiency of grayscale publishing.

[0104] In one feasible design, the method 200 further includes:

[0105] S240, if an instruction to release and upgrade the grayscale service node is received, re-determine the first configuration information of the grayscale service node according to a preset rule;

[0106] S250: Send the re-determined first configuration information to the gateway, so that the gateway determines the route corresponding to the grayscale service node according to the re-determined first configuration information.

[0107] Among them, the preset rules can be set according to actual needs. For example, the restriction that the grayscale service node can only be called by grayscale users is cancelled, and the grayscale service node is configured to be called by non-grayscale users.

[0108] Exemplarily, the implementation method of re-determining the first configuration information of the grayscale service node according to a preset rule includes:

[0109] Delete the grayscale policy name, account number or network address and grayscale policy description in the first configuration information, and add an identifier for identifying the service node as a stable service node in the first configuration information, so that the gateway determines the route of the service node after treating the service node as a stable service node according to the first configuration information.

[0110] by Figure 3 Taking the second operation interface as an example, the implementation method of receiving the instruction to publish and upgrade the grayscale service node is described:

[0111] After the grayscale administrator selects service node 2, he clicks the operation button "Publish Upgrade", and the grayscale management device 150 receives the instruction to publish and upgrade the grayscale service node. The grayscale management device 150 changes the version identifier of service node 2 from the grayscale version to the release version. Then, the grayscale management device 150 needs to change the operation area for configuring service node 2 on the second operation interface from the second operation area corresponding to the grayscale service node to the first operation area corresponding to the stable service node.

[0112] In the above embodiment, after receiving the instruction to publish and upgrade the grayscale service node, the grayscale management device promptly modifies and sends the first configuration information of the grayscale service node to the gateway, so that the gateway uses the service node as a stable service node according to the first configuration information and determines the route of the service node. This enables the grayscale administrator to configure the grayscale service node as a stable service node through the grayscale management device without having to go to the gateway site to manually modify the configuration information of the grayscale service node.

[0113] In a feasible design, after sending the re-determined first configuration information to the gateway, the method 200 further includes:

[0114] S260: If a version rollback instruction is received, an instruction message for stopping calling the grayscale service node is sent to the gateway;

[0115] S270, obtaining second configuration information of a stable service node, where the stable service node is a service node that has been released and upgraded before the grayscale service node;

[0116] S280: Send second configuration information to the gateway, so that the gateway determines a route corresponding to the stable service node according to the second configuration information.

[0117] The content of the second configuration information refers to the content of the first configuration information of the grayscale service node re-determined according to the preset rules, and will not be repeated here.

[0118] See also Figure 3 After the service node 2 is released and upgraded, its version identifier changes from the grayscale version to the released version, and it provides stable services to users as a stable service node. After the grayscale administrator selects the service node 2 and clicks the operation button "version rollback", the grayscale management device 150 receives the instruction to roll back the version. The grayscale management device 150 sends an instruction message to the gateway 130 to stop calling the grayscale service node 2. At this time, the status of the grayscale service node 2 changes from "online" to "offline". According to the version number V2 of the service node 2, the grayscale management device 150 sends the second configuration information of the previous version, that is, the service node 1 with the version number V1, to the gateway, so that the service node 1 can provide services to users as the released version again.

[0119] The user can also use the gray management device 150 to take the service node 1 offline and put other service nodes that have been released and upgraded online, such as a service node with a version number of V0.

[0120] This application takes into account that when a grayscale service node is gray-released and provides stable services to users as a released version, if a grayscale service node fails, the stable service node that has been released and upgraded before the grayscale service node can continue to provide stable services to users, avoiding service interruptions and poor user experience.

[0121] After the grayscale administrator uses the grayscale management device to configure the grayscale front-end page and publish the front-end page through Nginx, wherein the grayscale front-end page is used to provide grayscale services and the publish front-end page is used to provide stable services, in a feasible design, the method 200 further includes:

[0122] S290: Determine the type of the user according to the user's login information and the first configuration information.

[0123] In a feasible design, the user's login information includes the user's account number, the user's Internet protocol address, etc. When the user enters the user's account number, password, etc. on the login page of application A through the user client 140, the method of obtaining the user's login information includes:

[0124] The gray management device 150 obtains the user's Internet Protocol address, the user's account number sent by application A, and other information through interaction with application A.

[0125] S2100: If the user type is a grayscale user, load a grayscale front-end page that calls a grayscale service node for the user.

[0126] In a feasible design, the implementation of determining the type of the user according to the user's login information and the first configuration information includes:

[0127] If the grayscale policy name of the grayscale service node is configured as "account", determine whether the grayscale user accounts configured for the grayscale service node include the user's account; if so, determine that the user type is a grayscale user; otherwise, determine that the user type is a non-grayscale user.

[0128] If the grayscale policy name of the grayscale service node is configured as "Internet Protocol address", determine whether the Internet Protocol address of the grayscale user configured for the grayscale service node includes the Internet Protocol address of the user; if so, determine that the type of the user is a grayscale user; otherwise, determine that the type of the user is a non-grayscale user.

[0129] Furthermore, the method 200 further includes:

[0130] S2110: If the user type is a non-grayscale user, load a publishing front-end page that calls a stable service node for the user.

[0131] This application takes into account that if the grayscale user and the non-grayscale user use the same front-end page to call the grayscale service node and the stable service node respectively, if the configuration information of the grayscale service node is modified, it is necessary to stop the operation of the front-end page and modify the configuration information of the front-end page accordingly, which greatly affects the user experience of the non-grayscale user. In order to solve this problem, in the above example, the grayscale management device 150 provides the grayscale front-end page to the grayscale user and provides the publishing front-end page to the non-grayscale user, thereby ensuring the user experience of the non-grayscale user while performing grayscale publishing.

[0132] Based on the grayscale publishing system 100, the present application further provides a grayscale publishing method 300, which is applied to the gateway 130 and includes:

[0133] S310, receiving first configuration information of at least one grayscale service node from a grayscale management device.

[0134] S320: Determine the type of user according to the user request.

[0135] In a feasible design, the user request includes ticket information, and the ticket information includes the user's account number and / or network address.

[0136] In a feasible design, the gateway obtains user requests in the following ways:

[0137] The gateway receives a user request sent by a front-end page and / or receives a user request sent by a user client 140 .

[0138] In a feasible design, the network address is used as a grayscale identifier indicating that the user is a grayscale user. The implementation method of determining the type of the user according to the user request includes:

[0139] If the user request includes a network address, the user type is determined to be a grayscale user, otherwise, the user type is determined to be a non-grayscale user. In this example, since the user request usually does not include a network address, if the network address is included, it means that the user sending the user request is a grayscale user, and the user type can be quickly determined.

[0140] In a feasible design, the present application also provides a method for determining the type of user according to the user request without adding a grayscale identifier in the user request, that is, the user request only includes the user's account number, and the implementation method for determining the type of user includes:

[0141] The type of the user is determined according to the user request and the first configuration information.

[0142] Exemplarily, according to the user request of the user and the first configuration information of at least one grayscale service node, the method of determining the type of the user includes:

[0143] Determine whether the first configuration information of at least one grayscale service node includes the user's account. If included, determine that the user's type is a grayscale user. In order to authenticate the user, the user request usually includes the user's account. Determine the user's type through the user's account, and make full use of the information requested by the user to determine the user's type.

[0144] S330: If the user type is a grayscale user, determine a first grayscale service node of at least one grayscale service node that satisfies the user request according to the user request and first configuration information of at least one grayscale service node.

[0145] Exemplarily, the implementation of S330 includes:

[0146] After receiving the user request, the gateway parses the request context in the user request and screens out the grayscale service node that meets the user request based on the first configuration information of at least one grayscale service node and the service registration list obtained from the registration center 120.

[0147] S340: Send a user request to the first grayscale service node.

[0148] In the above embodiment, the gateway receives the first configuration information of at least one grayscale service node from the grayscale management device, and then determines the target grayscale service node (i.e., the first grayscale service node) that the grayscale user needs to call from at least one grayscale service node based on the first configuration information of the at least one grayscale service node and the user request, and then forwards the user request to the first grayscale service node, so that the grayscale service node provides the user with grayscale services according to the user request, so as to realize the grayscale release of the grayscale service node. During the grayscale release of the grayscale service node, if it is necessary to upload or change the configuration information in the gateway, the grayscale administrator can perform the first configuration or change the configuration of the grayscale service node on the grayscale management device, and the grayscale management device sends the latest first configuration information to the gateway, without the need for the grayscale administrator to manually upload or change the configuration information on the corresponding device of the gateway. The above embodiment enables the gateway to quickly obtain the latest first configuration information, thereby improving the efficiency of grayscale release.

[0149] The present application also considers the scenario where different microservices call each other's grayscale service nodes. In a feasible design, method 300 also includes:

[0150] S350, receiving a call request and a user request from a first grayscale service node, where the call request includes a service name;

[0151] S360, if the at least one grayscale service node includes a service node corresponding to the service name, determining a second grayscale service node that satisfies the call request from the at least one grayscale service node according to the call request, the user request, and the first configuration information of the at least one grayscale service node;

[0152] S370, sending a call request to the second grayscale service node.

[0153] For example Figure 5 As shown, a, the user client 140 sends a user request to the gateway 130 .

[0154] b. After determining the first grayscale service node of the microservice 110 according to the user request, the gateway 130 forwards the user request to the first grayscale service node of the microservice 110 .

[0155] c. If the first grayscale service node needs to call microservice 160 when providing services to the user, the gateway 130 sends a call request and a user request. After the gateway 130 determines that the user is a grayscale user according to the user request, it determines a second grayscale service node that meets the call request from at least one grayscale service node according to the service name of the call request (i.e., microservice 160) and the first configuration information of at least one grayscale service node.

[0156] d. The gateway 130 forwards the call request to the second grayscale service node, so that the second grayscale service node provides services to the first grayscale service node.

[0157] In the above example, the gateway receives a call request and a user request from the first grayscale service node, determines that the user is a grayscale user according to the user request, and then determines a second grayscale service node that meets the call request from at least one grayscale service node according to the service name in the call request and the first configuration information of at least one grayscale service node. Finally, a call request is sent to the second grayscale service node so that the second grayscale service node provides services to the first grayscale service node, thereby realizing calls between grayscale service nodes of different microservices.

[0158] The present application also provides a grayscale publishing method 400, which is applied to a service node. The method 400 includes:

[0159] S410, receiving a user request from a gateway.

[0160] S420: Determine the type of the user who sends the user request according to the user request.

[0161] S430: If the user type is a grayscale user, the user data is stored in a grayscale database, which is used to store user data generated during the grayscale publishing process.

[0162] S440: Otherwise, the user data is stored in a publishing database, where the publishing database is used to store user data generated by the stable service node in the process of serving the user.

[0163] In the above example, the service node implements classified storage of user data by user type, which is conducive to targeted management of data of each type of user.

[0164] The following is an example of the grayscale publishing process in combination with the grayscale publishing system 100 and grayscale publishing methods 200-400. Figure 6 As shown:

[0165] (1) After the stable service node and the grayscale service node of the microservice 110 are started, they send their respective information to the registration center 120. The registration center 120 updates the service registration list in real time according to the information of each service node. The registration center 120 sends the latest service registration list to the gateway 130 at a first preset time interval, and the registration center 120 sends the information of the service node of the microservice 110 newly registered within the second preset time interval to the grayscale management device 150 at a second preset time interval.

[0166] (2) The grayscale management device 150 uses the service node of the newly registered microservice 110 as a grayscale service node, and displays a second operation area for configuring the grayscale service node on the second operation interface. The first configuration information after the grayscale administrator configures the grayscale service node is obtained through the second operation area. The grayscale management device 150 is provided with a publishing front-end page and a grayscale front-end page configured by the grayscale administrator.

[0167] (3) The grayscale management device 150 sends the latest first configuration information of the grayscale service node to the gateway 130 every 30 seconds.

[0168] (4) The user client 140 logs in to application A, and application A sends a request to call the front-end page to the grayscale management device 150. The request also includes login information such as the user's account.

[0169] (5) The grayscale management device 150 determines the type of user based on the user's login information. If the user type is a grayscale user, a grayscale front-end page is loaded to the user client 140, and the grayscale front-end page can save the user's request. Then the grayscale front-end page sends the user request to the gateway 130. If the user type is a non-grayscale user, a publishing front-end page is loaded to the user client 140, and the publishing front-end page can save the user's request. Then the publishing front-end page sends the user request to the gateway 130.

[0170] (6) The gateway 130 determines a target service node that satisfies the user request according to the user request, and then forwards the user request to the target service node, calling the target service node to provide services for publishing the front-end page or the grayscale front-end page.

[0171] In combination with the above-mentioned grayscale publishing method 200, the present application also provides a grayscale management device, such as Figure 7 As shown, the device comprises:

[0172] A first information transmission module, used to receive indication information sent by a microservice for service registration, where the indication information is used to indicate at least one service node that has been connected to the network;

[0173] A first processing module, configured to obtain first configuration information of the grayscale service node if the at least one service node includes a grayscale service node and a configuration instruction for the grayscale service node is received;

[0174] The first information transmission module is also used to send first configuration information to the gateway, so that the gateway performs grayscale publishing on the grayscale service node according to the first configuration information.

[0175] In a feasible design, the first processing module is further used to re-determine the first configuration information of the grayscale service node according to a preset rule if an instruction to release and upgrade the grayscale service node is received;

[0176] The first information transmission module is further used to send the re-determined first configuration information to the gateway, so that the gateway determines the route corresponding to the grayscale service node according to the re-determined first configuration information.

[0177] In a feasible design, after the first information transmission module sends the re-determined first configuration information to the gateway,

[0178] The first information transmission module is also used to send instruction information of stopping calling the grayscale service node to the gateway if an instruction of version rollback is received;

[0179] The first information transmission module is also used to obtain second configuration information of a stable service node, where the stable service node is a service node that has been released and upgraded before the grayscale service node;

[0180] The first information transmission module is further used to send second configuration information to the gateway, so that the gateway determines the route corresponding to the stable service node according to the second configuration information.

[0181] In a feasible design, the first processing module is further used to determine the type of the user according to the user's login information and the first configuration information;

[0182] The first processing module is also used to load a grayscale front-end page that calls a grayscale service node for the user if the user type is a grayscale user.

[0183] In a feasible design, the first configuration information includes one or more of the following information: the network address of the service node, the service name corresponding to the service node, the application name corresponding to the service name, the grayscale policy name corresponding to the service node, and the user account or network address corresponding to the grayscale policy name.

[0184] For other implementation methods and effects of the device, please refer to the description in the above-mentioned embodiments of the grayscale publishing method, which will not be repeated here.

[0185] In combination with the above-mentioned grayscale publishing method 300, the present application also provides a gateway, such as Figure 8 As shown, the gateway includes:

[0186] A second information transmission module, configured to receive first configuration information of at least one grayscale service node from a grayscale management device;

[0187] A second processing module is used to determine the type of user according to the user request of the user;

[0188] The second processing module is further configured to determine, if the type of the user is a grayscale user, a first grayscale service node of the at least one grayscale service node that satisfies the user request according to the user request and first configuration information of the at least one grayscale service node;

[0189] The second information transmission module is used to send a user request to the first grayscale service node.

[0190] In a feasible design, the second information transmission module is further used to receive a call request and a user request from the first grayscale service node, where the call request includes a service name;

[0191] The second processing module is further configured to determine, if the at least one grayscale service node includes a service node corresponding to the service name, a second grayscale service node that satisfies the call request from the at least one grayscale service node according to the call request, the user request, and the first configuration information of the at least one grayscale service node;

[0192] The second information transmission module is also used to send a call request to the second grayscale service node.

[0193] For other implementation methods and effects of the gateway, please refer to the description in the above-mentioned embodiments of the grayscale publishing method, which will not be repeated here.

[0194] In combination with the above-mentioned grayscale release method 400, the present application also provides a service node, such as Fig. 9 As shown, the service node includes:

[0195] A third information transmission module, used for receiving a user request from a gateway;

[0196] A third processing module is used to determine the type of the user who sends the user request according to the user request;

[0197] The third processing module is further used to store the user's data in a grayscale database if the user type is a grayscale user, and the grayscale database is used to store the user data generated during the grayscale release process;

[0198] Otherwise, the user's data is stored in the publishing database, which is used to store the user data generated by the stable service node in the process of serving the user.

[0199] For other implementation methods and effects of the service node, please refer to the description in the above-mentioned embodiments of the grayscale release method, which will not be repeated here.

[0200] like Figure 1 As shown, the present application also provides a grayscale release system, which includes:

[0201] A grayscale management device, used to execute the method described in any example of the embodiment of the grayscale publishing method 200;

[0202] A gateway, configured to execute the method described in any example of the embodiment of the grayscale publishing method 300;

[0203] A service node is used to execute the method described in any example of the embodiment of the grayscale publishing method 400.

[0204] For other implementation methods and effects of the system, please refer to the descriptions in the above-mentioned embodiments of the grayscale release method, which will not be repeated here.

[0205] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0206] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0207] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0208] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0209] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0210] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A grayscale release method, characterized in that: Applicable to grayscale management devices, including: Receiving indication information sent by a microservice for service registration, where the indication information is used to indicate at least one service node that has been connected to the network; If the at least one service node includes a grayscale service node and a configuration instruction for the grayscale service node is received, obtaining first configuration information of the grayscale service node; The first configuration information is sent to a gateway, so that the gateway performs a grayscale release on the grayscale service node according to the first configuration information.

2. The method according to claim 1, characterized in that The method further comprises: If an instruction to release and upgrade the grayscale service node is received, re-determine the first configuration information of the grayscale service node according to a preset rule; The redetermined first configuration information is sent to the gateway, so that the gateway determines the route corresponding to the grayscale service node according to the redetermined first configuration information.

3. The method according to claim 2, characterized in that After sending the redetermined first configuration information to the gateway, the method further includes: If a version rollback instruction is received, sending instruction information to the gateway to stop calling the grayscale service node; Acquire second configuration information of a stable service node, where the stable service node is a service node that has been released and upgraded before the grayscale service node; The second configuration information is sent to the gateway, so that the gateway determines the route corresponding to the stable service node according to the second configuration information.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Determine the type of the user according to the user's login information and the first configuration information; If the type of the user is a grayscale user, a grayscale front-end page that calls the grayscale service node is loaded for the user.

5. The method according to any one of claims 1 to 3, characterized in that: The first configuration information includes one or more of the following information: the network address of the service node, the service name corresponding to the service node, the application name corresponding to the service name, the grayscale policy name corresponding to the service node, and the user account or network address corresponding to the grayscale policy name.

6. A grayscale release method, characterized in that: Applied to gateways, including: Receiving first configuration information of at least one grayscale service node from a grayscale management device; Determining the type of the user according to a user request of the user; If the type of the user is a grayscale user, determining, according to the user request and the first configuration information of the at least one grayscale service node, a first grayscale service node of the at least one grayscale service node that satisfies the user request; Send the user request to the first grayscale service node.

7. The method according to claim 6, characterized in that The method further comprises: receiving a call request from the first grayscale service node and the user request, wherein the call request includes a service name; If the at least one grayscale service node includes a service node corresponding to the service name, determining, according to the call request, the user request, and the first configuration information of the at least one grayscale service node, a second grayscale service node that satisfies the call request from the at least one grayscale service node; Send the call request to the second grayscale service node.

8. A grayscale release method, characterized in that: Applied to service nodes, including: Receive user requests from the gateway; Determining, according to the user request, the type of the user sending the user request; If the type of the user is a grayscale user, the user's data is stored in a grayscale database, where the grayscale database is used to store user data generated during the grayscale release process; Otherwise, the user data is stored in a publishing database, where the publishing database is used to store user data generated by the stable service node in the process of serving the user.

9. A grayscale management device, characterized in that: The device comprises: A first information transmission module, used to receive indication information sent by a microservice for service registration, where the indication information is used to indicate at least one service node that has been connected to the network; A first processing module, configured to obtain first configuration information of the grayscale service node if the at least one service node includes a grayscale service node and a configuration instruction for the grayscale service node is received; The first information transmission module is further used to send the first configuration information to the gateway, so that the gateway performs grayscale publishing on the grayscale service node according to the first configuration information.

10. A grayscale release system, characterized in that: include: A grayscale management device, configured to execute the method according to any one of claims 1 to 5; A gateway, configured to execute the method according to claim 6 or 7; A service node, configured to execute the method according to claim 8.