Gray release method and device, equipment, storage medium and program product
By acquiring and applying the target grayscale rules of the configuration system, the automatic identification and forwarding of requested messages in the grayscale link is solved, and the problem of single grayscale distribution method and low flexibility in the existing technology is solved, and the grayscale is improved Flexibility and adaptability of release.
Patent Information
- Application Number
- CN202411374589.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-29
AI Technical Summary
The existing grayscale release method is relatively single, which cannot meet the diverse needs of actual scenarios, is not flexible, and cannot achieve link-level grayscale release.
By obtaining the target grayscale rules sent by the configuration system, receiving request messages, and sending request messages to the target grayscale node according to the grayscale tag and traffic allocation rules, realizing automatic identification and forwarding of the grayscale link.
It improves the flexibility of grayscale release, can meet the diverse needs of actual scenarios, and realizes automatic identification and forwarding of request messages in grayscale links.
Smart Images

Figure CN119182662A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of application publishing technology, and in particular to a grayscale publishing method, device, equipment, storage medium and program product. Background Art
[0002] With the continuous development of technologies such as computers and the Internet, digital online services are increasingly being used in various fields. In actual use, online services need to be dynamically updated due to changes in business requirements, functional upgrades, and other reasons. Grayscale release is a technology that gradually introduces new versions of systems or components into the production environment, which can ensure that the impact on the business is minimized while verifying the new version and software in the real environment.
[0003] In related technologies, upstream and downstream service nodes usually adopt unified publishing rules, and usually only perform grayscale publishing for a specific service. This grayscale publishing method is relatively simple and has low flexibility, and cannot meet the diverse needs of actual scenarios. Summary of the invention
[0004] The present application provides a grayscale publishing method, apparatus, equipment, storage medium and program product, which can realize automatic judgment and forwarding of grayscale links, improve the flexibility of grayscale publishing, and meet the diverse needs of actual scenarios.
[0005] In a first aspect, an embodiment of the present application provides a grayscale release method, including:
[0006] Obtaining the target grayscale rule sent by the configuration system and receiving a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to multiple service nodes respectively;
[0007] In a case where the request message includes the grayscale label, sending the request message to a target grayscale node according to the traffic distribution rule;
[0008] When the request message does not include the grayscale label and the configuration system has enabled the grayscale publishing configuration, the grayscale label is inserted into the request message, and the request message including the grayscale label is sent to the target grayscale node according to the traffic distribution rule.
[0009] In a possible implementation, sending the request message to a target grayscale node according to the traffic distribution rule includes:
[0010] Determine the target traffic distribution rules corresponding to the service node;
[0011] According to the target traffic distribution rule and the grayscale label, screening is performed in the downstream service nodes to obtain the target grayscale node.
[0012] In a possible implementation, the method further includes:
[0013] When the request message fails to be forwarded or the configuration system does not enable the grayscale release configuration, the request message is sent to a non-grayscale node.
[0014] In a possible implementation, the method further includes:
[0015] The log data is sent to the configuration system, so that the configuration system displays the path information corresponding to the request message according to the log data through a display module.
[0016] In a possible implementation, the method further includes:
[0017] In response to a configuration operation on the configuration system, a grayscale release configuration corresponding to the configuration operation and the target grayscale rule are obtained; the grayscale release configuration corresponds to at least one service node.
[0018] In a possible implementation, different service nodes correspond to different target grayscale rules.
[0019] In a second aspect, an embodiment of the present application provides a grayscale publishing device, including:
[0020] An acquisition module, used to acquire a target grayscale rule sent by a configuration system and receive a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to multiple service nodes respectively;
[0021] A first sending module, configured to send the request message to a target grayscale node according to the traffic distribution rule when the request message includes the grayscale label;
[0022] The second sending module is used to insert the grayscale label into the request message when the grayscale label is not included in the request message but the configuration system has turned on the grayscale release configuration, and send the request message including the grayscale label to the target grayscale node according to the traffic distribution rule.
[0023] In a possible implementation manner, the first sending module is specifically configured to:
[0024] Determine the target traffic distribution rules corresponding to the service node;
[0025] According to the target traffic distribution rule and the grayscale label, screening is performed in the downstream service nodes to obtain the target grayscale node.
[0026] In a possible implementation manner, the device is further used for:
[0027] When the request message fails to be forwarded or the configuration system does not enable the grayscale release configuration, the request message is sent to a non-grayscale node.
[0028] In a possible implementation manner, the device is further used for:
[0029] The log data is sent to the configuration system, so that the configuration system displays the path information corresponding to the request message according to the log data through a display module.
[0030] In a possible implementation manner, the device is further used for:
[0031] In response to a configuration operation on the configuration system, a grayscale release configuration corresponding to the configuration operation and the target grayscale rule are obtained; the grayscale release configuration corresponds to at least one service node.
[0032] In a possible implementation, different service nodes correspond to different target grayscale rules.
[0033] In a third aspect, an embodiment of the present application provides a grayscale publishing device, including: a processor and a memory;
[0034] The memory stores computer-executable instructions;
[0035] The processor executes the computer-executable instructions stored in the memory to implement the grayscale release method as described in any one of the first aspects.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which, when executed, are used to implement the grayscale release method described in any one of the first aspects.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed, implements the grayscale release method described in any one of the first aspects.
[0038] The grayscale publishing method, device, equipment, storage medium and program product provided in the embodiments of the present application obtain the target grayscale rules sent by the configuration system and receive the request message, wherein the target grayscale rules include grayscale labels and traffic allocation rules corresponding to multiple service nodes respectively; when the request message includes a grayscale label, the request message is sent to the target grayscale node according to the traffic allocation rule; when the request message does not include a grayscale label and the configuration system has turned on the grayscale publishing configuration, the grayscale label is inserted into the request message, and the request message including the grayscale label is sent to the target grayscale node according to the traffic allocation rule. In the present application, the service node obtains the target grayscale rule sent by the configuration system and receives the request message. The service node can perform the corresponding forwarding processing according to whether there is a grayscale label in the request message and the traffic allocation rule in the target grayscale rule, and forward the request message to the target grayscale node, which can realize the automatic identification and forwarding of the request message in the grayscale link, improve the flexibility of grayscale publishing, and meet the diverse needs of actual scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0040] Figure 2 A schematic diagram of a process for grayscale publishing provided in an embodiment of the present application;
[0041] Figure 3 A flowchart of another grayscale publishing method provided in an embodiment of the present application;
[0042] Figure 4 A logical schematic diagram of a target grayscale rule issued according to an embodiment of the present application;
[0043] Figure 5 A logical schematic diagram of a service node forwarding a request message provided in an embodiment of the present application;
[0044] Figure 6 A schematic diagram of the structure of a grayscale publishing device provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the structure of a grayscale publishing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments and drawings described herein are only used to explain the present application, and are not intended to limit the present application. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards, and provide corresponding operation portals for users to choose to authorize or refuse.
[0047] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of financial data or user data and other information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, models, etc. may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0048] Grayscale release is a technology that gradually introduces new versions of systems or components into the production environment. It can effectively avoid release risks and verify the new versions and software in the real environment while minimizing the impact on the business. In related technologies, grayscale release is usually only for a certain service, that is, multiple versions of grayscale release are implemented for a single service, and link-level grayscale release cannot be implemented; at the same time, upstream and downstream service nodes usually use the same grayscale rules. It can be seen that the grayscale release method in related technologies is relatively single and not very flexible, and cannot meet the diverse needs of actual scenarios.
[0049] In order to solve the above problems, the present application provides a grayscale publishing method, device, equipment, storage medium and program product, wherein the service node obtains the target grayscale rule sent by the configuration system and receives a request message, wherein the target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes respectively; when the request message includes a grayscale label, the request message is sent to the target grayscale node according to the traffic allocation rule; when the request message does not include a grayscale label and the configuration system has turned on the grayscale publishing configuration, the grayscale label is inserted into the request message, and the request message including the grayscale label is sent to the target grayscale node according to the traffic allocation rule. In this way, the service node can realize the automatic identification and forwarding of the request message in the grayscale link, improve the flexibility of grayscale publishing, and meet the diverse needs of actual scenarios.
[0050] Figure 1This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, in the related art, grayscale release is usually performed for a single service, and upstream and downstream nodes adopt a unified grayscale rule. This grayscale release is not flexible and cannot meet the diverse needs of actual scenarios.
[0051] In an embodiment of the present application, the service node obtains the target grayscale rule sent by the configuration system and receives a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to multiple service nodes respectively; then, according to the grayscale label and the traffic distribution rule, the request message is forwarded to the target grayscale node, thereby realizing request message forwarding based on automatic judgment and improving the flexibility of grayscale publishing.
[0052] The scheme shown in the present application is described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.
[0053] Figure 2 A flowchart of a grayscale release method provided in an embodiment of the present application. Figure 2 , the grayscale release method may include:
[0054] S201. Obtain a target grayscale rule sent by a configuration system and receive a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to a plurality of service nodes.
[0055] The execution subject of the embodiment of the present application may be an electronic device (such as a server, etc.), and may specifically refer to a grayscale publishing system in the electronic device, which may specifically include a configuration system and a service node, etc., and may of course also be a grayscale publishing device provided in the electronic device. The grayscale publishing device may be implemented by software, or by a combination of software and hardware. For ease of understanding, the following description will be given by taking the execution subject as a service node in the grayscale publishing system as an example.
[0056] In the embodiment of the present application, the configuration system may refer to a configuration platform in the grayscale publishing system of an electronic device, which may be used for grayscale link configuration and grayscale rule configuration, issuance, etc. The target grayscale rule may refer to configuration rules such as grayscale labels and traffic flow directions during the grayscale publishing process. The target grayscale rule may include grayscale labels and traffic distribution rules corresponding to multiple service nodes corresponding to multiple service nodes, wherein a grayscale label may refer to a keyword used for grayscale judgment, or may be referred to as a grayscale tag, specifically a blacklist, a whitelist, a user identifier (or user name), a geographic location, and other parameters, and of course may also refer to other parameters. The embodiment of the present application does not limit the specific content of the grayscale label. The traffic distribution rule may refer to the flow mode of the specific traffic of the request message in the grayscale link. For example, an application needs to go through three service nodes A, B, and C to process a certain type of service. During the grayscale release process, grayscale versions can be configured in B and C, so that service node A can include the official version A1, service node B can include the official version B1 and grayscale version B2, and service node C can include the official version C1 and grayscale version C2. The traffic distribution rules in the target grayscale rules can be A1-B2-C2, A1-B1-C2, and A1-B2-C1, etc. It should be noted that the grayscale labels and traffic distribution rules in the target grayscale rules can correspond to multiple service nodes, and the target grayscale rules of each service node can be the same or different, so that the grayscale release is no longer limited to a single service, and the grayscale release configuration is more flexible.
[0057] The request message may refer to the message corresponding to various service requests of the user. Specifically, in this step, when grayscale publishing is performed, the configuration system in the grayscale publishing system of the electronic device can respond to the configuration operation of the technician and determine the target grayscale rule configured by the technician. The target grayscale rule may include a grayscale label and a traffic distribution rule. After that, the configuration system can send the target grayscale rule to each service node. The specific sending method can be to send a global target grayscale rule to each service node, or to send a target grayscale rule related to the current service node to each service node. The service node can receive the target grayscale rule, can receive the user's request message, and can subsequently forward the request message based on the target grayscale rule.
[0058] S202: When the request message includes a grayscale label, the request message is sent to a target grayscale node according to a traffic distribution rule.
[0059] In an embodiment of the present application, the target grayscale node may refer to the grayscale node to which the request message needs to be forwarded. After receiving the request message, the service node in the grayscale publishing system may determine whether the request message includes a grayscale label. For example, character recognition matching may be used to determine whether the request message includes the keywords included in the grayscale label. If included, it is determined that the request message includes the grayscale label; if not, it is determined that the request message does not include the grayscale label. If the request message includes a grayscale label, the service node may screen the downstream grayscale nodes according to the traffic distribution rules and the grayscale label, determine the target grayscale node, and forward the request message to the target grayscale node, thereby realizing automatic identification and forwarding of the request message in the grayscale link.
[0060] S203. If the request message does not include a grayscale label and the configuration system has enabled the grayscale publishing configuration, insert a grayscale label into the request message and send the request message including the grayscale label to the target grayscale node according to the traffic distribution rule.
[0061] In an embodiment of the present application, the configuration system may include an identification field of the grayscale release configuration, and the identification value in the identification field may be used to characterize the enabled state of the grayscale release configuration. Exemplarily, when the identification value in the identification field is 1, the grayscale release configuration in the configuration system is in the enabled state (ON), and the normal version and the grayscale version may be enabled in the service node; when the identification value in the identification field is 0, the grayscale release configuration in the configuration system is in the disabled state (OFF), and only the normal version may be enabled in the service node.
[0062] In this step, when the request message does not include a grayscale label, the service node can further determine the status of the grayscale release configuration in the configuration system. If the grayscale release configuration in the configuration system is turned on, the service node can insert a grayscale label in the request message and forward the request message with the inserted grayscale label to the target grayscale node according to the traffic distribution rule, thereby realizing automatic identification and forwarding of request messages within the grayscale link. If the grayscale release configuration in the configuration system is turned off, the service node does not need to perform the grayscale label insertion operation and can forward the request message according to the normal link to ensure the normal implementation of user services.
[0063] The grayscale publishing method provided in the embodiment of the present application obtains the target grayscale rules sent by the configuration system and receives the request message, wherein the target grayscale rules include grayscale labels and traffic allocation rules corresponding to multiple service nodes respectively; when the request message includes a grayscale label, the request message is sent to the target grayscale node according to the traffic allocation rule; when the request message does not include a grayscale label and the configuration system has turned on the grayscale publishing configuration, the grayscale label is inserted into the request message, and the request message including the grayscale label is sent to the target grayscale node according to the traffic allocation rule. In the present application, the service node obtains the target grayscale rules sent by the configuration system and receives the request message. The service node can perform the corresponding forwarding processing according to whether there is a grayscale label in the request message and the traffic allocation rule in the target grayscale rule, and forward the request message to the target grayscale node, which can realize the automatic identification and forwarding of the request message in the grayscale link, improve the flexibility of grayscale publishing, and meet the diverse needs of actual scenarios.
[0064] Based on the above embodiments, Figure 3 A flowchart of another grayscale release method provided in an embodiment of the present application. Figure 3 , the grayscale release method may include:
[0065] S301. In response to a configuration operation on a configuration system, obtain a grayscale release configuration and a target grayscale rule corresponding to the configuration operation; the grayscale release configuration corresponds to at least one service node.
[0066] In an embodiment of the present application, a configuration operation may refer to an interactive operation in a configuration system when a technician needs to perform a grayscale release. The configuration operation may specifically refer to a click operation, a sliding operation, a text input operation, a voice input operation, etc. The embodiment of the present application does not limit the specific type of configuration operation.
[0067] In this step, when the technician needs to perform grayscale release of application services, he can perform the configuration operation of grayscale release in the configuration platform (i.e., configuration system) of the electronic device grayscale release system. For example, he can set the grayscale release configuration, and at the same time, he can set the grayscale label and traffic distribution rules, etc. The grayscale release configuration can refer to the switch state of the grayscale release and the service node that starts the grayscale version. In response to the configuration operation of the technician, the electronic device can determine the grayscale release configuration and the target grayscale rule corresponding to the configuration operation. The grayscale release configuration can correspond to one, two, three or more service nodes, and is not limited to grayscale release for only a single service node, which can improve the flexibility of grayscale release.
[0068] In a possible implementation, different service nodes correspond to different target grayscale rules.
[0069] In the embodiment of the present application, when the technician configures the target grayscale rules in the configuration system, different target grayscale rules can be configured for different service nodes, for example, different grayscale labels or different traffic distribution rules can be used. In this way, the grayscale release process is not limited to a single grayscale rule, and flexible settings of multiple target grayscale rules can be achieved. Appropriate target grayscale rules can be independently configured for each service node without having to be consistent with the upstream service node, which can further improve the flexibility of grayscale release and meet the actual needs of different scenarios and different application services.
[0070] S302, obtaining the target grayscale rule sent by the configuration system and receiving a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to multiple service nodes.
[0071] In the embodiment of the present application, after determining the target grayscale rule, the configuration system can send the target grayscale rule to each service node. Correspondingly, the service node can receive the target grayscale rule and the request message, and then forward the request message based on the target grayscale rule.
[0072] For example, Figure 4 A logic diagram of a target grayscale rule issued according to an embodiment of the present application. Figure 4 As shown, the grayscale release system includes a configuration system 401 and a service node 402. In response to the configuration operation of the technician, the configuration system 401 determines the grayscale release configuration and the target grayscale rule corresponding to the configuration operation, for example, which keywords can be specifically determined as grayscale tags, etc. Then, the configuration system 401 can determine the switch state of the grayscale release and the enabled state of the grayscale version of each service node based on the grayscale release configuration, and send the target grayscale rule to each service node.
[0073] Each service node is bound to an agent service, through which the service node can receive the target grayscale rules, determine the grayscale labels and traffic distribution rules for grayscale release, so that the agent service of each service node can determine the target grayscale rules for the service node itself and the downstream service nodes, and then forward the request message based on the target grayscale rules, which can improve the accuracy and flexibility of grayscale release. Figure 4As shown, the traffic distribution rules in the target grayscale rules may include service node A-service node B2-service node C2-service node D, service node A-service node B1-service node C1-service node D, service node A-service node B1-service node C3-service node D. In this way, the target grayscale rules may include multiple traffic distribution rules, and the target grayscale rules corresponding to different service nodes may also be different, which can improve the flexibility and scenario adaptability of grayscale release.
[0074] S303. When the request message includes a grayscale label, determine the target traffic distribution rule corresponding to the service node; and screen the downstream service nodes according to the target traffic distribution rule and the grayscale label to obtain the target grayscale node.
[0075] In the embodiment of the present application, the target traffic allocation rule may refer to the traffic allocation rule corresponding to the service node. If the request message includes a grayscale label, the service node can determine the target traffic allocation rule corresponding to itself, and then perform screening and processing in the downstream node according to the grayscale label in the request message, and finally forward the request message to the corresponding target grayscale node.
[0076] S304. If the request message does not include a grayscale label and the configuration system has enabled the grayscale publishing configuration, insert a grayscale label into the request message and send the request message including the grayscale label to the target grayscale node according to the traffic distribution rule.
[0077] In an embodiment of the present application, if the request message does not include a grayscale label, and the grayscale publishing configuration in the configuration system is in the on state, the service node can insert the grayscale label in the request message. The specific insertion method can be to insert an identifier corresponding to the keyword of the grayscale label in the request header of the request message, etc., which is not limited in the embodiment of the present application. Then, the service node can send the request message with the grayscale label inserted to the target grayscale node corresponding to the grayscale label according to the traffic distribution rule. In this way, the service node in the grayscale publishing system of the electronic device can perform the grayscale label injection operation for the grayscale label that does not include the grayscale label, which can improve the flexibility of traffic distribution in the grayscale publishing.
[0078] It should be noted that, in order to ensure the stability of the business during the grayscale release process, the grayscale release system usually processes the request messages of some users through the newly released grayscale version. Therefore, in this step, when the configuration system has turned on the grayscale release configuration, when performing the grayscale label insertion operation for the request message that does not include the grayscale label, the service node can select part of the request messages to perform the grayscale label insertion operation. For example, a preset proportion of request messages that do not include the grayscale label can be selected within a preset period to perform the grayscale label insertion operation, or the user information such as the user ID and geographic location can be screened, and the request message that does not include the grayscale label corresponding to the preset user ID and the preset geographic location can be selected to perform the grayscale label insertion operation. Of course, the service node can also use other methods to select the request message to perform the grayscale label insertion operation, and the embodiment of the present application does not limit this.
[0079] S305: When the request message forwarding fails or the configuration system does not enable the grayscale release configuration, the request message is sent to the non-grayscale node.
[0080] In the embodiment of the present application, the non-gray node may refer to a normal version service in a service node, or may be a normal link node. Since there is usually a certain degree of uncertainty in grayscale publishing, there is a situation where the request message forwarding fails during the grayscale publishing process. At this time, the service node can forward the request message to the non-grayscale node according to the original normal link to ensure the normal processing and response of the user request message and avoid negative impact on the user experience. In addition, if the grayscale publishing configuration is not enabled in the configuration system, the service node can also directly forward the request message to the non-grayscale node and process the request message according to the normal link of the original application service.
[0081] In the related art, the grayscale release process usually does not support service downgrade and retry, resulting in certain request failures in the grayscale release process, which cannot meet the user's usage needs. In the embodiment of the present application, when the service node fails to forward the request message, it can re-forward the request message to the non-grayscale node, and process the request message according to the original normal link of the application service, which can ensure the timely processing and response of the request message and ensure the normal use of the application service by the user.
[0082] S306: Send the log data to the configuration system, so that the configuration system displays the path information corresponding to the request message according to the log data through the display module.
[0083] In an embodiment of the present application, log data may refer to a transaction log specifically processed by a service node for a request message. A display module may refer to a data display module in a grayscale publishing system. Path information may refer to the path that a request message actually passes through. Specifically, each service node may report its own log data to the configuration system. After receiving the log data of each service node, the configuration system may parse the log data and display the path information corresponding to the request message through a display module. In this way, by reporting the log data, the service node can eventually display the actual path of the request message in the display module, which is convenient for technical personnel to trace and query.
[0084] For example, Figure 5 A logical diagram of a service node forwarding a request message provided in an embodiment of the present application. Figure 5 As shown, after receiving the target grayscale rule, the service node can receive the user request message. If the request message includes the grayscale label in the target grayscale rule, the service node can determine the target traffic allocation rule corresponding to itself, and then screen in the downstream node according to the grayscale label and the target traffic allocation rule, determine the target grayscale node corresponding to the grayscale label, and forward the message request to the target grayscale node.
[0085] If the request message does not include the grayscale label in the target grayscale rule, and the configuration system does not enable the grayscale release configuration at this time, the service node can forward the request message according to the original normal link and send the request message to the non-grayscale node. If the request message does not include the grayscale label in the target grayscale rule, and the configuration system has enabled the grayscale release configuration at this time, the service node can insert the grayscale label in the request message, and then forward the request message with the inserted grayscale label to the target grayscale node corresponding to the grayscale label according to the grayscale label and the target traffic distribution rule corresponding to the service node.
[0086] In the embodiment of the present application, the configuration system in the grayscale publishing system of the electronic device adopts the method of issuing the target grayscale rules, and each service node can clearly perceive the target grayscale rules; at the same time, the grayscale publishing configuration process is not limited to a single service, supports grayscale publishing for several services, and also supports grayscale publishing for the entire link; the target grayscale rules can specifically include multiple types, not limited to a single target grayscale rule, and each service node can independently configure suitable grayscale rules without having to keep consistent with the upstream, and the flexibility of grayscale publishing is higher. In the process of grayscale publishing, the grayscale publishing of each service node can be operated independently, decoupled from the upstream and downstream service nodes, and has higher flexibility; in addition, the grayscale label has higher flexibility and can adopt multiple parameters; when the request message fails at the grayscale node request, the service node can forward the request message to the non-grayscale node in the normal link, which can ensure the successful processing of the request message.
[0087] Figure 6 This is a schematic diagram of the structure of a grayscale publishing device provided in an embodiment of the present application. Figure 6 , the grayscale publishing device 60 may include:
[0088] An acquisition module 61 is used to acquire a target grayscale rule sent by a configuration system and receive a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to multiple service nodes respectively;
[0089] A first sending module 62, configured to send the request message to a target grayscale node according to a traffic distribution rule when the request message includes a grayscale label;
[0090] The second sending module 63 is used to insert a grayscale label into the request message when the request message does not include a grayscale label and the configuration system has enabled the grayscale publishing configuration, and send the request message including the grayscale label to the target grayscale node according to the traffic distribution rule.
[0091] In a possible implementation manner, the first sending module 62 is specifically configured to:
[0092] Determine the target traffic distribution rules corresponding to the service node;
[0093] According to the target traffic distribution rules and grayscale labels, the downstream service nodes are screened to obtain the target grayscale nodes.
[0094] In a possible implementation manner, the device 60 is further used for:
[0095] If the request message forwarding fails or the configuration system does not enable the grayscale release configuration, the request message will be sent to the non-grayscale node.
[0096] In a possible implementation manner, the device 60 is further used for:
[0097] Send log data to the configuration system so that the configuration system displays the path information corresponding to the request message according to the log data through the display module.
[0098] In a possible implementation manner, the device 60 is further used for:
[0099] In response to a configuration operation on a configuration system, a grayscale release configuration and a target grayscale rule corresponding to the configuration operation are obtained; the grayscale release configuration corresponds to at least one service node.
[0100] In a possible implementation, different service nodes correspond to different target grayscale rules.
[0101] The grayscale publishing device 60 provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0102] Figure 7 This is a schematic diagram of the structure of a grayscale publishing device provided in an embodiment of the present application. Figure 7 The grayscale publishing device 70 may include: a memory 71 and a processor 72. Exemplarily, the memory 71 and the processor 72 are interconnected via a bus 73.
[0103] The memory 71 is used to store program instructions;
[0104] The processor 72 is used to execute the program instructions stored in the memory to implement the grayscale publishing method shown in the above embodiment.
[0105] Figure 7 The grayscale publishing device 70 shown can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0106] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above-mentioned grayscale release method.
[0107] The embodiment of the present application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the above-mentioned grayscale release method.
[0108] It should be noted that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0109] It should be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DR RAM). It should be noted that when the processor is a general purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) is integrated in the processor. It should be noted that the memory described herein is intended to include but is not limited to these and any other suitable types of memory.
[0110] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0111] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0114] Regarding the various modules / units contained in the various devices and products described in the above embodiments, they may be software modules / units, or hardware modules / units, or they may be partially software modules / units and partially hardware modules / units. Each device and product may be applied to or integrated in a chip, a chip module or a terminal device. Exemplarily, for each device and product applied to or integrated in a chip, each module / chip contained therein may be implemented in the form of hardware such as circuits, or at least some modules / units may be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining modules / units may be implemented in the form of hardware such as circuits.
[0115] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.
[0116] The above are only some embodiments of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A grayscale release method, characterized in that: include: Obtaining the target grayscale rule sent by the configuration system and receiving a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to multiple service nodes respectively; In a case where the request message includes the grayscale label, sending the request message to a target grayscale node according to the traffic distribution rule; If the grayscale label is not included in the request message, but the configuration system has turned on the grayscale release configuration, the grayscale label is inserted into the request message, and the request message including the grayscale label is sent to the target grayscale node according to the traffic distribution rule.
2. The method according to claim 1, characterized in that: The step of sending the request message to a target grayscale node according to the traffic distribution rule includes: Determine the target traffic distribution rules corresponding to the service node; According to the target traffic distribution rule and the grayscale label, screening is performed in the downstream service nodes to obtain the target grayscale node.
3. The method according to claim 1, characterized in that The method further comprises: When the request message fails to be forwarded or the configuration system does not enable the grayscale release configuration, the request message is sent to a non-grayscale node.
4. The method according to claim 1, characterized in that: The method further comprises: The log data is sent to the configuration system, so that the configuration system displays the path information corresponding to the request message according to the log data through a display module.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In response to a configuration operation on the configuration system, a grayscale release configuration corresponding to the configuration operation and the target grayscale rule are obtained; the grayscale release configuration corresponds to at least one service node.
6. The method according to any one of claims 1 to 4, characterized in that: Different service nodes correspond to different target grayscale rules.
7. A grayscale publishing device, characterized in that: include: An acquisition module, used to acquire a target grayscale rule sent by a configuration system and receive a request message, wherein the target grayscale rule includes grayscale labels and traffic distribution rules corresponding to multiple service nodes respectively; A first sending module, configured to send the request message to a target grayscale node according to the traffic distribution rule when the request message includes the grayscale label; The second sending module is used to insert the grayscale label into the request message when the grayscale label is not included in the request message but the configuration system has turned on the grayscale release configuration, and send the request message including the grayscale label to the target grayscale node according to the traffic distribution rule.
8. A grayscale release device, characterized in that: include: Processor, memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the grayscale release method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed, are used to implement the grayscale release method according to any one of claims 1 to 6.
10. A computer program product, characterized in that It includes a computer program, which, when executed, implements the grayscale release method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Gray release method and system, electronic equipment and storage medium
CN110489133A
Gray release method, application server and gray release system
CN113014651A
Service gray level link control method and device, computer equipment and storage medium
CN113055492A
Gray release method and device
CN113342394A
Service access request flow distribution method and device
CN114924751A
Cited By
Grayscale release method, cloud-native gateway, electronic device, storage medium, and computer program product
WO2026149129A1
