CN116414441A - Gray release method, device, terminal equipment and storage medium - Google Patents

Gray release method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN116414441A
CN116414441A CN202310335070.1A CN202310335070A CN116414441A CN 116414441 A CN116414441 A CN 116414441A CN 202310335070 A CN202310335070 A CN 202310335070A CN 116414441 A CN116414441 A CN 116414441A
Authority
CN
China
Prior art keywords
gray
gray scale
request information
gray level
version
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.)
Pending
Application number
CN202310335070.1A
Other languages
Chinese (zh)
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.)
China Merchants Bank Co Ltd
Original Assignee
China Merchants Bank 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 China Merchants Bank Co Ltd filed Critical China Merchants Bank Co Ltd
Priority to CN202310335070.1A priority Critical patent/CN116414441A/en
Publication of CN116414441A publication Critical patent/CN116414441A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a gray level release method, a device, a terminal device and a storage medium, wherein the gray level release method comprises the following steps: receiving request information of a client through a gray level entry; based on a preset gray level flow control rule, determining whether the request information meets the entry condition of a gray level lane, wherein the gray level lane is used for delineating a gray level version instance. Based on the scheme, the flow control between the original version instance and the gray version instance can be realized by combining the gray flow control rule and the gray lanes, and the controllability of gray release is improved.

Description

Gray release method, device, terminal equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a gray level publishing method, a device, a terminal device, and a storage medium.
Background
In the version updating process of the internet product, the new version is not generally pushed to all users directly, but a gray level release mode is adopted, so that the original version and the gray level version exist simultaneously. After a period of verification, if the gray scale version meets the predetermined release requirements, the original version is further replaced with the gray scale version to a greater extent or entirely to complete the version update.
The gray release needs to control the flow between the original version and the gray version, and the current gray release technology mostly adopts a physical isolation mode to control the flow, namely, another complete system corresponding to the gray version is deployed, and the flow is controlled through a gateway. The gray level release technology based on physical isolation has the problem of poor controllability.
Disclosure of Invention
The main purpose of the application is to provide a gray level release method, a device, a terminal device and a storage medium, and aims to solve the problem that the gray level release technology based on physical isolation is poor in controllability at present.
In order to achieve the above object, the present application provides a gray scale distribution method, including:
receiving request information of a client through a gray level entry;
and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example.
Optionally, before the step of receiving the request information of the client through the grayscale portal, the method further includes:
one or more of the gray scale entry, the gray scale flow control rule, and the gray scale lane are set in response to a setting operation by a user.
Optionally, the step of determining whether the request information meets the entry condition of the gray scale lane based on the preset gray scale flow control rule includes:
determining whether the flow type corresponding to the request information is gray version flow or not based on the preset gray level flow control rule;
if not, determining that the request information does not meet the entry condition of the gray level lane;
if yes, determining that the request information meets the entry condition of the gray level lanes.
Optionally, after the step of determining that the request information meets the entry condition of the grayscale lane, the method further includes:
and adding a gray scale mark to the request head of the request information to obtain request information carrying the gray scale mark, wherein the request information carrying the gray scale mark enters one or more of a gray scale version instance defined by the gray scale lane and an original version instance outside the gray scale lane according to a corresponding request link.
Optionally, the step of determining whether the traffic type corresponding to the request information is a gray version traffic based on the preset gray level traffic control rule includes:
based on a preset first type gray scale flow control rule, analyzing flow proportion information of the gray scale inlet, and determining whether the flow type corresponding to the request information is gray scale version flow.
Optionally, the step of determining whether the traffic type corresponding to the request information is a gray version traffic based on the preset gray level traffic control rule includes:
and analyzing the request content of the request information based on a preset second type gray scale flow control rule, and determining whether the flow type corresponding to the request information is gray scale version flow.
Optionally, the gray scale release method further includes:
and displaying the gray-scale published process information based on at least one view form in the trend graph and the topological graph.
The embodiment of the application also provides a gray scale release device, which comprises:
the receiving module is used for receiving the request information of the client through the gray portal;
and the flow control module is used for determining whether the request information meets the entry condition of a gray level lane based on a preset gray level flow control rule, wherein the gray level lane is used for defining a gray level version example.
The embodiment of the application also provides a terminal device, which comprises a memory, a processor and a gray distribution program stored in the memory and capable of running on the processor, wherein the gray distribution program realizes the steps of the gray distribution method when being executed by the processor.
The embodiments of the present application also propose a computer-readable storage medium on which a gradation release program is stored, which when executed by a processor implements the steps of the gradation release method described above.
The gray level publishing method, the gray level publishing device, the terminal equipment and the storage medium provided by the embodiment of the application receive the request information of the client through the gray level entrance; and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example. Based on the scheme, the request information firstly enters the gray level entrance, then, whether the request information can enter the gray level lane is determined based on the gray level flow control rule, and the gray level lane defines a gray level version example, that is, the flow control between the original version example and the gray level version example can be realized by combining the gray level flow control rule and the gray level lane, so that the controllability of gray level release is improved.
Drawings
Fig. 1 is a schematic diagram of a functional module of a terminal device to which a gray level publishing device of the present application belongs;
FIG. 2 is a flowchart of a gray level distribution method according to a first exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of gray scale flow control according to the gray scale distribution method of the present application;
FIG. 4 is a flowchart of a second exemplary embodiment of a gray scale publishing method of the present application;
fig. 5 is a schematic diagram of full-link gray scale SDK configuration thermal validation related to the gray scale release method of the present application;
FIG. 6 is a schematic diagram of a setting interface related to the gray level publishing method of the present application;
FIG. 7 is a flowchart of a third exemplary embodiment of a gray scale distribution method according to the present application;
FIG. 8 is a flowchart of a fourth exemplary embodiment of a gray scale distribution method according to the present application;
FIG. 9 is a flowchart of a fifth exemplary embodiment of a gray scale distribution method according to the present application;
FIG. 10 is a schematic diagram of a first type of gray scale flow control rule related to the gray scale distribution method of the present application;
FIG. 11 is a flowchart of a sixth exemplary embodiment of a gray scale distribution method of the present application;
FIG. 12 is a schematic diagram of a second type of gray scale flow control rule related to the gray scale distribution method of the present application;
FIG. 13 is a schematic diagram of a comprehensive gray scale flow control rule related to the gray scale distribution method of the present application;
fig. 14 is a schematic diagram of a gray scale distribution process information display interface according to the gray scale distribution method of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The main solutions of the embodiments of the present application are: receiving request information of a client through a gray level entry; and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example. Based on the scheme, the request information firstly enters the gray level entrance, then, whether the request information can enter the gray level lane is determined based on the gray level flow control rule, and the gray level lane defines a gray level version example, that is, the flow control between the original version example and the gray level version example can be realized by combining the gray level flow control rule and the gray level lane, so that the controllability of gray level release is improved.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram of functional modules of a terminal device to which the gray scale distribution device of the present application belongs. The gradation issuing device may be a device capable of gradation issuing independent of the terminal device, which may be carried on the terminal device in the form of hardware or software. The terminal equipment can be an intelligent mobile terminal with a data processing function such as a mobile phone and a tablet personal computer, and can also be a fixed terminal equipment or a server with a data processing function.
In this embodiment, the terminal device to which the gray-scale issuing device belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores an operating system and a gradation release program, and the gradation release device can release request information of the client received through the gradation entry; a preset gray scale flow control rule; information such as a preset gray level lane is stored in the memory 130; the output module 110 may be a display screen or the like. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein the gray level distribution program in the memory 130, when executed by the processor, performs the steps of:
receiving request information of a client through a gray level entry;
and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example.
Further, the gray level distribution program in the memory 130, when executed by the processor, further performs the steps of:
one or more of the gray scale entry, the gray scale flow control rule, and the gray scale lane are set in response to a setting operation by a user.
Further, the gray level distribution program in the memory 130, when executed by the processor, further performs the steps of:
determining whether the flow type corresponding to the request information is gray version flow or not based on the preset gray level flow control rule;
if not, determining that the request information does not meet the entry condition of the gray level lane;
if yes, determining that the request information meets the entry condition of the gray level lanes.
Further, the gray level distribution program in the memory 130, when executed by the processor, further performs the steps of:
and adding a gray scale mark to the request head of the request information to obtain request information carrying the gray scale mark, wherein the request information carrying the gray scale mark enters one or more of a gray scale version instance defined by the gray scale lane and an original version instance outside the gray scale lane according to a corresponding request link.
Further, the gray level distribution program in the memory 130, when executed by the processor, further performs the steps of:
based on a preset first type gray scale flow control rule, analyzing flow proportion information of the gray scale inlet, and determining whether the flow type corresponding to the request information is gray scale version flow.
Further, the gray level distribution program in the memory 130, when executed by the processor, further performs the steps of:
and analyzing the request content of the request information based on a preset second type gray scale flow control rule, and determining whether the flow type corresponding to the request information is gray scale version flow.
Further, the gray level distribution program in the memory 130, when executed by the processor, further performs the steps of:
and displaying the gray-scale published process information based on at least one view form in the trend graph and the topological graph.
According to the scheme, the request information of the client is received through the gray level entrance; and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example. In this embodiment, the request information first enters the gray level entry, and then, based on the gray level flow control rule, it is determined whether the request information can enter the gray level lane, and the gray level lane defines a gray level version instance, that is, the flow control between the original version instance and the gray level version instance can be implemented by combining the gray level flow control rule and the gray level lane, so that the controllability of gray level release is improved.
Referring to fig. 2, a first embodiment of a gray scale distribution method of the present application provides a flowchart, where the gray scale distribution method includes:
step S10, receiving request information of a client through a gray level entry.
In particular, the gray scale publishing process involves several instances, some of which have only an original version, while others have both an original version and a gray scale version. The flow control of the gray scale release process is to distribute the flow between the original version instance and the gray scale version instance, so as to achieve the purpose of verifying the gray scale version by using partial flow.
In order to shunt the request information of the client when entering the system, at least one gray scale entry can be preset, and the request information of the client is received by the gray scale entry first. The gray level entry may be in the form of an instance, where at least one instance is only required to be designated as a gray level entry in advance, and the instance designated as the gray level entry is responsible for providing the corresponding service, and distributing the original version traffic and the gray level version traffic.
Step S20, based on a preset gray level flow control rule, determining whether the request information meets the entry condition of a gray level lane, wherein the gray level lane is used for defining a gray level version example.
Specifically, since the instances through which the request information needs to pass may be the original version instance and the gray version instance, in order to divide the traffic type corresponding to the request information into the gray version traffic and the original version traffic, a gray flow control rule may be preset. When receiving request information of a client, the gray portal performs calculation and analysis based on gray flow control rules, and determines that the flow type corresponding to the request information is original version flow or gray version flow.
When the flow type corresponding to the request information is gray version flow, meeting the entry condition of gray lanes; when the traffic type corresponding to the request information is the original version traffic, the entry condition of the gray level lane is not satisfied. The gray level lanes need to be preset and used for delineating gray level version examples, only request information entering the gray level lanes can enter the gray level version examples, otherwise, only the original version examples can be entered. It can be understood that the request information entering the gray level lane can also enter the original version instance outside the gray level lane according to the actual requirement, so that the request information shuttles between the original version instance and the gray level version instance without faults, and the request information is ensured to obtain complete response.
The present embodiment describes a flow control process of gradation release by taking an example of a micro-service form as an example. As shown in fig. 3, fig. 3 is a schematic diagram of gray scale flow control related to the gray scale distribution method of the present application. The micro service A is designated as a gray portal, receives the HTTP request sent by the client, calculates gray flow control rules and determines the flow type corresponding to the HTTP request of the client.
If the traffic type corresponding to the HTTP request of the client is gray version traffic, the micro service A forwards the HTTP request of the client, and sequentially passes through the micro service B (gray version), the micro service C and the micro service D (gray version).
If the traffic type corresponding to the HTTP request of the client is the original version traffic, the micro service A forwards the HTTP request of the client, and the HTTP request passes through the micro service B (original version), the micro service C and the micro service D (original version) in sequence.
It can be seen that HTTP requests with traffic type of original version traffic do not enter the grayscale version of the micro-service, whereas HTTP requests with traffic type of grayscale version traffic can shuttle between the grayscale version of the micro-service and the original version of the micro-service.
Likewise, the type of instance may take other forms than a micro-service.
The gray scale distribution related to the embodiment may be full-link gray scale distribution, and the definition of full-link gray scale distribution is as follows: under the current micro-service architecture, a business system comprises a plurality of micro-services, one iteration of online often involves updating a plurality of micro-services on a call chain, and full-link gray release can isolate gray version instances of each micro-service on the line from a single running environment (i.e. gray lanes), so that a request coming in through a traffic entry can stably access gray version instances of the micro-services on the call chain.
The full-link gray level distribution mainly comprises four steps: (1) releasing a gray version instance; (2) creating a gray scale flow control rule; (3) the instance is updated; (4) and finishing gray level release. Wherein, setting the gray level lanes as a precondition, and after the gray level lanes are divided, entering the step (1), namely, issuing a gray level version instance. In step (1), an instance can still be added to the gray scale lane. If a grayscale version instance has not been published, or if a grayscale version instance has been deleted, it may be removed from the grayscale lane. If the status of all gray version instances is stopped or unpublished, the full link gray publishing task may be terminated. After the release of all gray version examples in the gray lanes is completed, the step (2) is entered, namely, a gray flow control rule is created, and the method specifically relates to gray rule editing, rule issuing and flow condition observation, and can also fall back to the step (1). After the gray version instance is sufficiently verified, step (3) is entered, namely, the instance is updated, wherein the number of gray version instances can be adjusted, and the instance resource switching can be rapidly completed. If the traffic is not entirely imported into the gray version instance, then the process may revert to step (2). After the traffic is completely led into the gray version instance, the step (4) can be entered, the instance of the original version (gray conversion type scheme) or the gray version (in-situ upgrade scheme) is stopped, the gray lanes and the gray traffic control rule are cleaned, and the final gray release is completed. In the whole full-link gray level release process, each step is safe and controllable, so that the successful execution of the full-link gray level release is ensured.
According to the scheme, the request information of the client is received through the gray level entrance; and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example. In this embodiment, the request information first enters the gray level entry, and then, based on the gray level flow control rule, it is determined whether the request information can enter the gray level lane, and the gray level lane defines a gray level version instance, that is, the flow control between the original version instance and the gray level version instance can be implemented by combining the gray level flow control rule and the gray level lane, so that the controllability of gray level release is improved.
Further, referring to fig. 4, a flowchart is provided in a second embodiment of the gray level distribution method according to the present application, based on the embodiment shown in fig. 2, step S10 further includes, before receiving, through the gray level entry, the request information of the client:
and step S001, setting one or more of the gray scale entrance, the gray scale flow control rule and the gray scale lane in response to a setting operation of a user.
Specifically, the embodiment provides a man-machine interaction interface for gray release, and gray inlets, gray flow control rules and gray lanes can be set by a user through the man-machine interaction interface in a self-defining manner.
(1) Gray scale entrance: the user may designate one or more instances as gray level entries, the instance designated as gray level entry being responsible for providing the corresponding service, distributing control of the original version traffic as well as the gray level version traffic.
(2) Gray scale flow control rules: the user can set a first type gray scale flow control rule based on the proportion, and under the control of the first type gray scale flow control rule, the original version flow and the gray scale version flow are in corresponding proportion; the user can set a second type gray scale flow control rule based on the request content, and the request information with the preset request content is divided into gray scale version flows under the control of the second type gray scale flow control rule.
(3) Gray lanes: the user can set a gray level lane, and at least one gray level version instance is circled into the gray level lane, and when the request information enters the gray level lane, the condition of entering the gray level version instance is provided.
In addition, the setting can be realized by matching with a full-link gray scale SDK, and the full-link gray scale SDK reserves extension on the realization level, so that the user customized gray scale rule extraction and rule logic judgment are supported. The user needs to implement a custom extended gray scale flow control rule interface in the code, and the custom extended gray scale rule interface supports rule extraction and logic judgment of request information of the Spring MVC framework and the WebFlux framework.
As shown in fig. 5, fig. 5 is a schematic diagram of thermal validation of full-link gray scale SDK configuration related to the gray scale publishing method of the present application. The gray level entry, the gray level flow control rule and the gray level lanes set by the user form corresponding configuration information, and the configuration information is further stored in the configuration center. The full-link gray level SDK monitors whether the configuration information of the configuration center changes through long polling, if so, the configuration information is acquired again, and the full-link gray level publishing behavior is changed according to the latest configuration information. In conclusion, the full-link gray scale SDK has the capability of configuring thermal validation, and is one of key points for realizing full-link gray scale release.
More specifically, as shown in fig. 6, fig. 6 is a schematic diagram of a setting interface related to the gray level distribution method of the present application. In the "create gray rule" page, the "position" drop-down menu selects "custom" and "tag value" fills in the gray flow control rule class bean name (based on Spring framework) implemented by the code. After the configuration is completed, traffic conditions of the gray version instance (micro service) can be observed.
The embodiment sets one or more of the gray scale entry, the gray scale flow control rule and the gray scale lane by the above scheme, specifically by responding to a setting operation of a user. The embodiment provides the setting functions of the gray level entrance, the gray level flow control rule and the gray level lane, so that a user can set according to actual requirements, and the controllability of the gray level release process is improved.
Further, referring to fig. 7, a flowchart is provided in a third embodiment of the gray level distribution method of the present application, based on the embodiment shown in fig. 2, step S20, based on a preset gray level flow control rule, determines whether the request information meets the entry condition of the gray level lane, and further refines the request information, including:
step S201, determining whether the flow type corresponding to the request information is a gray scale version flow based on the preset gray scale flow control rule.
Specifically, the gradation flow control rule includes a first type gradation flow control rule set based on the ratio and a second type gradation flow control rule set based on the requested content.
Under the control of the first type gray scale flow control rule, the original version flow and the gray scale version flow are in corresponding proportion; the user can set a second type gray scale flow control rule based on the request content, and the request information with the preset request content is divided into gray scale version flows under the control of the second type gray scale flow control rule. That is, the gray scale entry performs analysis and calculation according to the first type gray scale flow control rule or the second type gray scale flow control rule, and determines whether the flow type corresponding to the request information is gray scale version flow.
Step S202, if not, determining that the request information does not meet the entry condition of the gray level lane.
Specifically, the gray level entry performs analysis and calculation according to the first type gray level flow control rule or the second type gray level flow control rule, and determines that the flow type corresponding to the request information is not gray level version flow, so that it can be further determined that the request information does not meet the entry condition of the gray level lane and cannot enter the gray level lane.
Step S203, if yes, determining that the request information meets the entry condition of the gray level lane.
Specifically, the gray scale entry performs analysis and calculation according to the first type gray scale flow control rule or the second type gray scale flow control rule, and determines that the flow type corresponding to the request information is gray scale version flow, so that it can be further determined that the request information meets the entry condition of the gray scale lane, and the gray scale lane can be entered.
It should be noted that the first type gray scale flow control rule and the second type gray scale flow control rule may be applied alternatively or simultaneously.
According to the scheme, whether the flow type corresponding to the request information is gray version flow or not is determined specifically based on the preset gray level flow control rule; if not, determining that the request information does not meet the entry condition of the gray level lane; if yes, determining that the request information meets the entry condition of the gray level lanes. In this embodiment, the division of the original version flow and the gray version flow can be realized based on the gray flow control rule, so that gray release flow control is realized, and the controllability of the gray release process is improved.
Further, referring to fig. 8, a flowchart is provided in a fourth embodiment of the gray scale distribution method according to the present application, based on the embodiment shown in fig. 7, step S203 further includes, after determining that the request information meets the entry condition of the gray scale lane:
step S204, adding gray scale marks to the request header of the request information to obtain request information carrying gray scale marks, wherein the request information carrying gray scale marks enters one or more of gray scale version examples defined by gray scale lanes and original version examples outside the gray scale lanes according to corresponding request links.
Specifically, after determining that the request information meets the entry condition of the gray lanes, the gray portal adds gray marks to the request header of the request information to obtain the request information carrying the gray marks. The request message carrying the gray identification is transmitted downwards from the gray portal according to the request link, and before entering the next instance of the non-gray portal, the request message needs to be analyzed to determine whether the context of the request message carries the gray identification. If the request information is provided with a gray scale mark, the request information can enter a gray scale version example; if the request information does not have a gray scale identification, the request information can only enter the original version instance. That is, the gray scale identification may be used to cause the request information carrying the gray scale identification to enter the gray scale version instance of the gray scale lane delineation.
In addition, if the original version instance beyond the gray level lane exists in the request link corresponding to the request information carrying the gray level mark, the request information carrying the gray level mark can jump out of the gray level lane and further enter the original version instance beyond the gray level lane. It will be appreciated that the request message carrying the greyscale identifier may be shuttled inside and outside the greyscale lanes.
The request links as shown in fig. 3 are: micro service a, micro service B, micro service C, micro service D. The micro service A and the micro service C are original versions, no corresponding gray version exists, and the micro service A and the micro service C can be regarded as original version examples outside gray lanes; while both micro-service B and micro-service D exist in original and gray versions, that is, gray version micro-service B and micro-service D can be regarded as gray version instances of gray lane delineations. After being processed by the gray entrance micro service A, the HTTP request is changed into an HTTP request carrying gray marks, and the HTTP request carrying the gray marks sequentially passes through the micro service A (original version), the micro service B (gray version), the micro service C (original version) and the micro service D (gray version) according to a request link, so that the shuttle inside and outside the gray lanes is realized, on the one hand, the normal operation of gray release is ensured, and on the other hand, the integrity of the request link is ensured.
According to the scheme, the request information carrying the gray scale mark is obtained by adding the gray scale mark to the request header of the request information, and the request information carrying the gray scale mark enters one or more of a gray scale version instance defined by the gray scale lane and an original version instance outside the gray scale lane according to the corresponding request link. The request information carrying the gray scale mark continuously flows downwards, the gray scale version flow and the original version flow are separated in a gray scale mark identification mode, the controllability of the gray scale release process is further improved, the hardware construction cost required by realizing flow isolation is effectively reduced, and the effects of reducing cost and enhancing efficiency are achieved in the gray scale release process.
Further, referring to fig. 9, a fifth embodiment of the gray scale release method of the present application provides a flowchart, based on the embodiment shown in fig. 7, step S201, based on the preset gray scale flow control rule, determines whether the flow type corresponding to the request information is gray scale version flow further refined, including:
step 2011, based on a preset first type gray scale flow control rule, analyzing flow proportion information of the gray scale inlet, and determining whether the flow type corresponding to the request information is gray scale version flow.
Specifically, under the control of the first type gray scale flow control rule, the original version flow and the gray scale version flow are in a corresponding proportion, and then whether the flow type corresponding to the request information is the gray scale version flow or not is determined.
As shown in fig. 10, fig. 10 is a schematic diagram of a first type gray scale flow control rule related to the gray scale distribution method of the present application. The micro service A is used as a gray scale inlet, and according to a first type gray scale flow control rule, the flow type corresponding to 80% of request information is determined to be the original version flow, and the flow type corresponding to 20% of request information is determined to be the gray scale version flow. Thus, 80% of the request information will enter micro service B (original version) and 20% of the request information will enter micro service B (gray scale version).
Similarly, the ratio of the original version flow to the gray scale version flow can be correspondingly adjusted according to the actual requirement, and the values of 80% and 20% are only used for explaining the effect of the first type gray scale flow control rule.
According to the scheme, specifically, based on a preset first type gray scale flow control rule, flow proportion information of the gray scale inlet is analyzed, and whether the flow type corresponding to the request information is gray scale version flow or not is determined. In the embodiment, the proportion of the original version flow to the gray version flow is controlled by adopting the first type gray flow control rule, and the proportion can be flexibly adjusted, so that the controllability of the gray release process is improved.
Further, referring to fig. 11, a flowchart is provided in a sixth embodiment of the gray scale release method, based on the embodiment shown in fig. 7, step S201, based on the preset gray scale flow control rule, determines whether the flow type corresponding to the request information is gray scale version flow further refined, including:
step S2012, based on a preset second type gray scale flow control rule, analyzes the request content of the request information, and determines whether the flow type corresponding to the request information is gray scale version flow.
Specifically, under the control of the second type gray scale flow control rule, the request information with the preset request content is divided into gray scale version flows, and the request content can be a label.
As shown in fig. 12, fig. 12 is a schematic diagram of a second type gray scale flow control rule related to the gray scale distribution method of the present application. The micro service A is used as a gray level entry, and analyzes whether a request header Host field of the request information contains a 'gray.com' tag according to a second type gray level flow control rule. If yes, determining that the flow type corresponding to the request information is gray version flow, wherein the request information enters micro service B (gray version); if not, determining that the traffic type corresponding to the request information is not gray version traffic, and entering the micro service B (original version) by the request information.
Similarly, the content of the request for analysis can be adjusted according to the actual requirement, and the above-mentioned "gray. Com" tag is only used for explaining the effect of the second type gray flow control rule.
More specifically, the present embodiment supports the creation of a plurality of second-type gray scale flow control rules, with or and logic supported between the plurality of second-type gray scale flow control rules. The tag locations involved may be a request header, a request path, a query parameter, and an RPC parameter (used in the RPC call scenario).
According to the scheme, specifically, based on a preset second type gray scale flow control rule, the request content of the request information is analyzed, and whether the flow type corresponding to the request information is gray scale version flow or not is determined. In the embodiment, the second type gray scale flow control rule is adopted to judge whether the request information has specific content, the request information with the specific content is led to the gray scale environment, and the second type gray scale flow control rule can be flexibly adjusted, so that the controllability of the gray scale release process is improved.
Further, a seventh embodiment of the gray scale distribution method of the present application is proposed based on the embodiments shown in fig. 9 and 11 described above, and the gray scale distribution method further includes:
based on the preset priority, the first type gray scale flow control rule and the second type gray scale flow control rule are simultaneously applied.
Specifically, when the first type gray scale flow control rule and the second type gray scale flow control rule are applied simultaneously, the priority of the second type gray scale flow control rule is higher than that of the first type gray scale flow control rule, namely after the request content is matched, the request information is routed to the original version instance or the gray scale version instance according to the flow proportion.
As shown in fig. 13, fig. 13 is a schematic diagram of a comprehensive gray scale flow control rule related to the gray scale distribution method of the present application. Meanwhile, the first type gray scale flow control rule and the second type gray scale flow control rule are applied, request information of host=gray.com is carried in the request header in a preferential matching mode, and the successfully matched request information is routed to the micro service B (gray scale version) according to the weight of 20%.
In the embodiment, a flow control mode of combining the first type gray scale flow control rule and the second type gray scale flow control rule is adopted, and the priority is set to coordinate the sequence relationship between the two rules, so that the flow control can meet more abundant application requirements, and the controllability of the gray scale release process is improved.
Further, an eighth embodiment of the gray scale distribution method of the present application is proposed based on the embodiment shown in fig. 2, where the gray scale distribution method further includes:
step S002, displaying the gray-scale published process information based on at least one view form in the trend graph and the topological graph.
Specifically, the full-link gray level release process of the embodiment has observable characteristics, helps a user to master gray level flow conditions in real time, and supports the user to quickly and intuitively judge whether full-link gray level release is successful or not. Full link gray scale release observables specifically provide two dimensional observation views, one is a trend graph and the other is a topology graph.
Taking the micro service instance as an example: the trend graph shows the trend of flow data of an original version and a gray scale version of a certain micro service in the micro service system in a period of time, wherein the trend includes indexes such as total request quantity, average response time, success rate, application error code and the like. The topological graph shows the calling relation between the micro services and comprises the flow ratio of the original version and the gray version, the total request quantity, the average response time, the success rate, the application error code details and the like. As shown in fig. 14, fig. 14 is a schematic diagram of a gray scale distribution process information display interface related to the gray scale distribution method of the present application, and is shown in a topology diagram form.
In addition, the information such as the historical gray level release task, the completion state, the operation details of the gray level release task, the operation audit and the like can be checked.
The embodiment displays the gray release process information through the scheme, specifically through at least one view form based on the trend graph and the topological graph. According to the embodiment, the related information of the gray level release process is displayed in the form of a trend graph and a topological graph, so that the observability of the gray level release process is realized, and the interactivity and the controllability of the gray level release process are enhanced.
In addition, an embodiment of the present application further provides a gray scale distribution device, where the gray scale distribution device includes:
the receiving module is used for receiving the request information of the client through the gray portal;
and the flow control module is used for determining whether the request information meets the entry condition of a gray level lane based on a preset gray level flow control rule, wherein the gray level lane is used for defining a gray level version example.
The principle and implementation process of gray level distribution are realized in this embodiment, please refer to the above embodiments, and are not repeated here.
In addition, the embodiment of the application also provides a terminal device, which comprises a memory, a processor and a gray distribution program stored in the memory and capable of running on the processor, wherein the gray distribution program realizes the steps of the gray distribution method when being executed by the processor.
Because the gray level release program is executed by the processor and adopts all the technical schemes of all the embodiments, the gray level release program at least has all the beneficial effects brought by all the technical schemes of all the embodiments and is not described in detail herein.
In addition, the embodiment of the application also proposes a computer readable storage medium, on which a gradation release program is stored, which when executed by a processor, implements the steps of the gradation release method as described above.
Because the gray level release program is executed by the processor and adopts all the technical schemes of all the embodiments, the gray level release program at least has all the beneficial effects brought by all the technical schemes of all the embodiments and is not described in detail herein.
Compared with the prior art, the gray level publishing method, the gray level publishing device, the terminal equipment and the storage medium provided by the embodiment of the application receive the request information of the client through the gray level entrance; and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example. Based on the scheme, the request information firstly enters the gray level entrance, then, whether the request information can enter the gray level lane is determined based on the gray level flow control rule, and the gray level lane defines a gray level version example, that is, the flow control between the original version example and the gray level version example can be realized by combining the gray level flow control rule and the gray level lane, so that the controllability of gray level release is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as above, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to perform the method of each embodiment of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (10)

1. A gradation release method, characterized in that the gradation release method comprises:
receiving request information of a client through a gray level entry;
and determining whether the request information meets the entry condition of a gray level lane or not based on a preset gray level flow control rule, wherein the gray level lane is used for delineating a gray level version example.
2. The gray scale distribution method according to claim 1, wherein before the step of receiving the request information of the client through the gray scale portal, further comprising:
one or more of the gray scale entry, the gray scale flow control rule, and the gray scale lane are set in response to a setting operation by a user.
3. The gray scale distribution method of claim 1, wherein the step of determining whether the request information satisfies an entry condition of a gray scale lane based on a preset gray scale flow control rule comprises:
determining whether the flow type corresponding to the request information is gray version flow or not based on the preset gray level flow control rule;
if not, determining that the request information does not meet the entry condition of the gray level lane;
if yes, determining that the request information meets the entry condition of the gray level lanes.
4. The gray scale distribution method according to claim 3, wherein after the step of determining that the request information satisfies the entry condition of the gray scale lane, further comprising:
and adding a gray scale mark to the request head of the request information to obtain request information carrying the gray scale mark, wherein the request information carrying the gray scale mark enters one or more of a gray scale version instance defined by the gray scale lane and an original version instance outside the gray scale lane according to a corresponding request link.
5. The gray scale distribution method of claim 3, wherein the step of determining whether the traffic type corresponding to the request information is a gray scale version traffic based on the preset gray scale traffic control rule comprises:
based on a preset first type gray scale flow control rule, analyzing flow proportion information of the gray scale inlet, and determining whether the flow type corresponding to the request information is gray scale version flow.
6. The gray scale distribution method of claim 3, wherein the step of determining whether the traffic type corresponding to the request information is a gray scale version traffic based on the preset gray scale traffic control rule comprises:
and analyzing the request content of the request information based on a preset second type gray scale flow control rule, and determining whether the flow type corresponding to the request information is gray scale version flow.
7. The gradation release method according to claim 1, wherein the gradation release method further comprises:
and displaying the gray-scale published process information based on at least one view form in the trend graph and the topological graph.
8. A gradation release device, characterized by comprising:
the receiving module is used for receiving the request information of the client through the gray portal;
and the flow control module is used for determining whether the request information meets the entry condition of a gray level lane based on a preset gray level flow control rule, wherein the gray level lane is used for defining a gray level version example.
9. A terminal device comprising a memory, a processor and a grey scale distribution program stored on the memory and executable on the processor, the grey scale distribution program when executed by the processor implementing the steps of the grey scale distribution method according to any of claims 1-7.
10. A computer-readable storage medium, on which a gradation release program is stored, which when executed by a processor, implements the steps of the gradation release method according to any one of claims 1 to 7.
CN202310335070.1A 2023-03-29 2023-03-29 Gray release method, device, terminal equipment and storage medium Pending CN116414441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310335070.1A CN116414441A (en) 2023-03-29 2023-03-29 Gray release method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310335070.1A CN116414441A (en) 2023-03-29 2023-03-29 Gray release method, device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116414441A true CN116414441A (en) 2023-07-11

Family

ID=87059115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310335070.1A Pending CN116414441A (en) 2023-03-29 2023-03-29 Gray release method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116414441A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578335A (en) * 2023-07-13 2023-08-11 建信金融科技有限责任公司 Gray release system, method, equipment, medium and product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578335A (en) * 2023-07-13 2023-08-11 建信金融科技有限责任公司 Gray release system, method, equipment, medium and product
CN116578335B (en) * 2023-07-13 2023-10-03 建信金融科技有限责任公司 Gray release system, method, equipment, medium and product

Similar Documents

Publication Publication Date Title
CN105408919B (en) Inquiry response equipment
CN110310034A (en) A kind of service orchestration applied to SaaS, business flow processing method and apparatus
CN111954173B (en) Method, device, server and computer readable storage medium for sending short message
CN108541314A (en) The sequence-dependent operation processing of packet-based data-message transmission
CN109597607A (en) Task interactive system and its implementation, device and electronic equipment
CN101271558A (en) Multi-policy commercial product recommending system based on context information
CN110471671A (en) Using dispositions method, device, system, equipment and computer readable storage medium
CN106485336A (en) A kind of online order application method and system
CN116414441A (en) Gray release method, device, terminal equipment and storage medium
CN101286212A (en) Business flow path execution method, business flow path engines and its deployment method
CN107391736A (en) A kind of page display method and device
US20230045979A1 (en) Controlling delivery via unmanned delivery service through allocated network resources
CN111611351A (en) Control method and device for online customer service session and electronic equipment
CN104995899A (en) Server load management
CN102255867A (en) Service request processing method, device and system
CN112861494A (en) Road network data-based visual report generation method, equipment and storage medium
CN109784506A (en) A kind of vehicular rescue service system control method, equipment and readable storage medium storing program for executing
CN107852422A (en) Connected from the server interface with different API to obtain ad data
CN110098959A (en) Modeling method, device, system and the storage medium of industry control protocol interaction behavior
CN111639741B (en) Automatic service combination agent system for multi-objective QoS optimization
CN105592446A (en) Information interaction method and platform
CN112637793B (en) Scene charging method, system, electronic equipment and storage medium based on 5G
KR20130094593A (en) System and method for producing in-application advertisement for mobile, and apparatus applied to the same
CN107787592A (en) Use equipment, computer-readable medium and the method for the change service of high-level data capacity gauge
CN110555201A (en) Knowledge document generation method and device, electronic equipment and storage medium

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