Grayscale release method, device, terminal device and computer storage medium
By loading the grayscale rule database in the message middleware system, adapting and forwarding grayscale requests, the problem that grayscale requests cannot be accurately located is solved, the service success rate is improved, and the cost of grayscale publishing is reduced.
Patent Information
- Application Number
- CN202011553046.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-12-24
AI Technical Summary
The existing message middleware system cannot accurately locate and forward grayscale requests to the logical grouping monitored by grayscale instances during grayscale publishing, resulting in a low service success rate for grayscale requests.
By loading the rules in the preset grayscale rule database, extract the request parameters of the received grayscale request, adapt the target grayscale rules according to the request parameters, perform grayscale balanced sampling, and forward the target grayscale request to the preset grayscale instance. The monitored logical groups are processed, and the grayscale percentage value is adjusted according to the processing results to improve the service success rate.
It achieves precise positioning and forwarding of grayscale requests, improves service success rate, reduces the overall cost of grayscale publishing by adjusting grayscale rules, and avoids modification of application client code logic.
Smart Images

Figure CN112685060B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial technology (Fintech), and in particular to a grayscale publishing method, device, terminal equipment and computer storage medium. Background Art
[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology.
[0003] When the application system needs to be upgraded, the existing service providers adopt a single consumer instance to gradually grayscale. That is, after the business request reaches the topic of the message middleware system server, the corresponding service instance is selected according to the load balancing strategy to distribute the business request load balanced to the logical grouping under the topic. However, the message middleware systems in the current grayscale technology all forward requests to the logical grouping under the topic monitored by the grayscale service provider instance (referred to as grayscale instance) in a unified and balanced manner according to the grayscale rules configured by the coding. Therefore, the message middleware system cannot accurately locate and forward the grayscale request to the logical grouping monitored by the grayscale instance, resulting in a low service success rate of the grayscale request. Summary of the invention
[0004] The main purpose of the present invention is to provide a grayscale publishing method, apparatus, terminal device and computer storage medium, aiming to solve the technical problem that the message middleware system in the existing grayscale technology cannot accurately locate and forward grayscale requests to the logical grouping monitored by the grayscale instance, resulting in a low service success rate of grayscale requests.
[0005] To achieve the above object, the present invention provides a grayscale publishing method, which is applied to a message middleware system and includes:
[0006] Load each grayscale rule in the preset grayscale rule database;
[0007] Extracting request parameters of the received grayscale request, and adapting the target grayscale rule in each of the grayscale rules according to the request parameters;
[0008] Perform grayscale balanced sampling according to the grayscale request and the target grayscale rule to obtain a target grayscale request;
[0009] The target grayscale request is forwarded to the logical group under the preset grayscale instance listening topic for processing to return the grayscale request processing result.
[0010] Optionally, the grayscale release method further includes:
[0011] Configuring each grayscale rule in a preset grayscale rule database, and adjusting each grayscale rule in the preset grayscale rule database;
[0012] The step of loading each grayscale rule in the preset grayscale rule database comprises:
[0013] All the grayscale rules in the preset grayscale rule database are fully loaded according to a preset time period.
[0014] Optionally, the step of performing grayscale balanced sampling according to the grayscale request and the target grayscale rule to obtain a target grayscale request includes:
[0015] Obtaining real-time statistics of the system throughput of the grayscale request, and obtaining the grayscale percentage value of the target grayscale rule;
[0016] A preset traffic sampling strategy is called to perform grayscale balanced sampling according to the system throughput and the grayscale percentage value to obtain a target grayscale request from the grayscale requests in a balanced manner.
[0017] Optionally, the preset traffic sampling strategy is a traffic balancing sampling strategy, and the step of calling the preset traffic sampling strategy to perform grayscale balancing sampling according to the system throughput and the grayscale percentage value to obtain a target grayscale request from the grayscale request in a balanced manner includes:
[0018] Using the grayscale percentage value as a sampling ratio for flow balancing sampling;
[0019] The traffic balancing sampling strategy is called to determine the amount of extracted data in all the grayscale requests of the system throughput size according to the sampling ratio and the system throughput size, so as to extract the target grayscale request.
[0020] Optionally, the grayscale request processing result includes request processing failure and request processing success.
[0021] After the step of forwarding the target grayscale request to a logical group under a preset grayscale instance monitoring topic for processing to return a grayscale request processing result, the method further includes:
[0022] If the grayscale request processing result is a request processing failure, forwarding the target grayscale request to a logical group under a preset non-grayscale instance monitoring topic for processing; and,
[0023] If the grayscale request processing result is that the request processing is successful, the grayscale request processing success rate is counted, and the grayscale percentage value of the target grayscale rule is adjusted according to the processing success rate.
[0024] Optionally, the step of adjusting the grayscale percentage value of the target grayscale rule according to the processing success rate includes:
[0025] Detecting whether the processing success rate is greater than or equal to a preset grayscale success rate;
[0026] If yes, then the grayscale percentage value of the target grayscale rule is increased according to the grayscale percentage value step size of the target grayscale rule;
[0027] If not, the grayscale percentage value is reduced to terminate the target grayscale rule.
[0028] Optionally, the grayscale release method further includes:
[0029] outputting a grayscale upgrade prompt of the preset grayscale instance when detecting that the grayscale percentage value reaches a preset maximum grayscale percentage value; or,
[0030] When it is detected that the grayscale percentage value reaches the preset maximum grayscale percentage value, grayscale upgrade is performed on other grayscale instances associated with the preset grayscale instance according to the target grayscale rule.
[0031] Optionally, after the step of forwarding the target grayscale request to a logical group under a preset non-grayscale instance monitoring topic for processing, the method further includes:
[0032] The request parameters of the target grayscale request are recorded for use in analyzing the cause of grayscale request processing failure.
[0033] In addition, to achieve the above-mentioned purpose, the present invention further provides a grayscale publishing device, which is applied to a message middleware system, and comprises:
[0034] A rule loading module, used to load each grayscale rule in a preset grayscale rule database;
[0035] An adaptation module, used for extracting request parameters of the received grayscale request, and adapting a target grayscale rule in each of the grayscale rules according to the request parameters;
[0036] A balanced sampling module, used for performing grayscale balanced sampling according to the grayscale request and the target grayscale rule to obtain a target grayscale request;
[0037] The forwarding processing module is used to forward the target grayscale request to the logical group under the preset grayscale instance monitoring topic for processing to return the grayscale request processing result.
[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes: a memory, a processor, and a grayscale release program stored in the memory and executable on the processor, and the grayscale release program implements the steps of the grayscale release method described above when executed by the processor.
[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer storage medium, on which a grayscale publishing program is stored, and when the grayscale publishing program is executed by a processor, the steps of the grayscale publishing method described above are implemented.
[0040] The present invention provides a grayscale publishing method, device, terminal equipment and computer storage medium, which load various grayscale rules in a preset grayscale rule database based on a message middleware system; extract request parameters of a received grayscale request, and adapt a target grayscale rule in each grayscale rule according to the request parameters; perform grayscale balanced sampling according to the grayscale request and the target grayscale rule to obtain a target grayscale request; forward the target grayscale request to a logical group under a preset grayscale instance monitoring topic for processing to return a grayscale request processing result.
[0041] The present invention utilizes a message middleware system in a production-consumption model to load various grayscale rules configured in a preset grayscale rule database, and then, after receiving a grayscale request, extracts the request parameters of the grayscale request to adapt the currently applicable target grayscale rules among the loaded grayscale rules according to the request parameters, and then, performs a grayscale balanced sampling operation according to the grayscale request and the adapted target grayscale rule, thereby evenly extracting the target grayscale request processed by the preset grayscale instance in the grayscale request, and finally, forwards the extracted target grayscale request to the logical grouping under the topic monitored by the preset grayscale instance for processing, and receives the grayscale request processing result of the target grayscale request returned by the logical grouping.
[0042] Compared with the traditional message middleware system server selecting the corresponding service instance to process the grayscale request according to the load balancing strategy, the present invention can accurately locate and forward the grayscale request to the logical group monitored by the grayscale instance for processing according to the configured grayscale rules, thereby improving the service success rate of the grayscale request. In addition, the present invention performs the grayscale request service by loading the grayscale rules configured in the database. In this way, when the grayscale scheme changes, it is only necessary to adapt and adjust the grayscale rules in the database, without modifying the code logic of the application client as in the traditional way, thereby greatly reducing the overall cost of grayscale publishing. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;
[0044] Figure 2 This is a flow chart of the first embodiment of the grayscale publishing method of the present invention;
[0045] Figure 3 A schematic diagram of an application scenario of grayscale publishing involved in an embodiment of a grayscale publishing method of the present invention;
[0046] Figure 4 A schematic diagram of another application scenario of the grayscale publishing method according to an embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of the functional modules of an embodiment of a grayscale publishing device of the present invention.
[0048] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0050] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0051] The terminal device in the embodiment of the present invention may be a device that acts as a message middleware system in a production and consumption model, and the device may be a PC (Personal Computer), a tablet computer, a portable computer, and the like.
[0052] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0054] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a grayscale publishing program.
[0055] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to the client and communicate data with the client; and the processor 1001 can be used to call the grayscale publishing program stored in the memory 1005 and perform the following operations:
[0056] Load each grayscale rule in the preset grayscale rule database;
[0057] Extracting request parameters of the received grayscale request, and adapting the target grayscale rule in each of the grayscale rules according to the request parameters;
[0058] Perform grayscale balanced sampling according to the grayscale request and the target grayscale rule to obtain a target grayscale request;
[0059] The target grayscale request is forwarded to the logical group under the preset grayscale instance listening topic for processing to return the grayscale request processing result.
[0060] Further, the processor 1001 may call the grayscale publishing program stored in the memory 1005, and further perform the following operations:
[0061] Configuring each grayscale rule in a preset grayscale rule database, and adjusting each grayscale rule in the preset grayscale rule database;
[0062] The processor 1001 may call the grayscale publishing program stored in the memory 1005, and further perform the following operations:
[0063] All the grayscale rules in the preset grayscale rule database are fully loaded according to a preset time period.
[0064] Further, the processor 1001 may call the grayscale publishing program stored in the memory 1005, and further perform the following operations:
[0065] Obtaining real-time statistics of the system throughput of the grayscale request, and obtaining the grayscale percentage value of the target grayscale rule;
[0066] A preset traffic sampling strategy is called to perform grayscale balanced sampling according to the system throughput and the grayscale percentage value to obtain a target grayscale request from the grayscale requests in a balanced manner.
[0067] Furthermore, the preset traffic sampling strategy is a traffic balancing sampling strategy, and the processor 1001 can call the grayscale publishing program stored in the memory 1005, and further perform the following operations:
[0068] Using the grayscale percentage value as a sampling ratio for flow balancing sampling;
[0069] The traffic balancing sampling strategy is called to determine the amount of extracted data in all the grayscale requests of the system throughput size according to the sampling ratio and the system throughput size, so as to extract the target grayscale request.
[0070] Further, the grayscale request processing result includes request processing failure and request processing success. The processor 1001 can call the grayscale publishing program stored in the memory 1005, and after forwarding the target grayscale request to the logical group under the preset grayscale instance listening topic for processing to return the grayscale request processing result, further perform the following operations:
[0071] If the grayscale request processing result is a request processing failure, forwarding the target grayscale request to a logical group under a preset non-grayscale instance monitoring topic for processing; and,
[0072] If the grayscale request processing result is that the request processing is successful, the grayscale request processing success rate is counted, and the grayscale percentage value of the target grayscale rule is adjusted according to the processing success rate.
[0073] Further, the processor 1001 may call the grayscale publishing program stored in the memory 1005, and further perform the following operations:
[0074] Detecting whether the processing success rate is greater than or equal to a preset grayscale success rate;
[0075] If yes, then the grayscale percentage value of the target grayscale rule is increased according to the grayscale percentage value step size of the target grayscale rule;
[0076] If not, the grayscale percentage value is reduced to terminate the target grayscale rule.
[0077] Further, the preset source environment is a source environment in a preset backup configuration, and the processor 1001 may call a grayscale publishing program stored in the memory 1005, and further perform the following operations:
[0078] outputting a grayscale upgrade prompt of the preset grayscale instance when detecting that the grayscale percentage value reaches a preset maximum grayscale percentage value; or,
[0079] When it is detected that the grayscale percentage value reaches the preset maximum grayscale percentage value, grayscale upgrade is performed on other grayscale instances associated with the preset grayscale instance according to the target grayscale rule.
[0080] Further, the processor 1001 may call the grayscale publishing program stored in the memory 1005, and after forwarding the target grayscale request to the logical group under the preset non-grayscale instance monitoring topic for processing, further perform the following operations:
[0081] The request parameters of the target grayscale request are recorded for use in analyzing the cause of grayscale request processing failure.
[0082] Based on the above hardware structure, various embodiments of the grayscale publishing method of the present invention are proposed.
[0083] It should be noted that when the application system needs to be upgraded, the existing service providers all adopt a single consumer instance to gradually grayscale. That is, after the business request reaches the topic of the message middleware system server, the corresponding service instance is selected according to the load balancing strategy to distribute the business request load balancing to the logical grouping under the topic. However, the message middleware systems in the current grayscale technology are all based on the following Figure 3 The same application process is shown, and the requests are forwarded uniformly and evenly to the logical groups under the listening topics of the grayscale service instance (referred to as the grayscale instance). Therefore, the message middleware system cannot accurately locate and forward the grayscale request to the logical grouping monitored by the grayscale instance.
[0084] In summary, the message middleware system in the existing grayscale technology cannot accurately locate and forward grayscale requests to the logical grouping monitored by the grayscale service instance, resulting in a low service success rate of grayscale requests.
[0085] In view of the above phenomenon, the present invention provides a grayscale release method. Figure 2 , Figure 2 It is a flowchart of the first embodiment of the grayscale publishing method of the present invention.
[0086] In this embodiment, the grayscale release method includes:
[0087] Step S10, loading each grayscale rule in the preset grayscale rule database;
[0088] When the terminal device is started, all grayscale rules that have been pre-configured in the preset grayscale rule database are fully loaded.
[0089] It should be noted that, in this embodiment, the preset grayscale rule database is a storage space built into or connected to the terminal device, which is specially used for terminal device staff to input configuration operations based on grayscale publishing to generate and store grayscale rule data. It should be understood that based on different design needs of actual applications, the terminal device can separate a dedicated storage space from the built-in solid-state storage device or running memory to configure and store grayscale rules, or the terminal device can also be specially connected to an external cloud storage platform to configure and store grayscale rules. The grayscale publishing method of the present invention does not specifically limit the specific type of the preset grayscale rule database and the storage form of the grayscale rule data configured by the terminal device.
[0090] In addition, in this embodiment, the grayscale rules include but are not limited to: a request grayscale identifier, a grayscale percentage value and a target service responder instance identifier, wherein the request grayscale identifier includes but is not limited to: the requester IP (Internet Protocol) address, the request header identifier, and the requesting user; the target service responder instance identifier includes but is not limited to: the service responder IP address, the service responder process number, and a certain identifier of the service responder instance.
[0091] Furthermore, in a feasible embodiment, the grayscale release method of the present invention may further include:
[0092] Step A, configuring each grayscale rule in a preset grayscale rule database, and adjusting each grayscale rule in the preset grayscale rule database;
[0093] The terminal device can pre-configure and generate various grayscale rules in a connected or built-in preset grayscale rule database by receiving configuration operations input by grayscale publishing staff, and, by receiving adjustment operations input by the staff, perform adjustment operations on modifying or deleting various grayscale rules that have been configured and generated in the preset grayscale rule database.
[0094] Specifically, for example, the terminal device can generate, based on the configuration operation for grayscale rule 1 input by the grayscale publishing staff, a configuration in the pre-connected cloud storage platform including: a request grayscale identifier consisting of the requester IP address and the request header identifier, a grayscale percentage value, and a target service responder instance identifier consisting of the service responder IP address and the service responder process number: Grayscale rule 1:
[0095]
[0096] Similarly, the terminal device can configure and generate other grayscale rules in the cloud storage platform based on other configuration operations input by the staff, and store grayscale rule 1 together with other grayscale rules in the cloud storage platform for subsequent loading and use by the terminal device.
[0097] In addition, when the grayscale release staff initiates an adjustment operation to modify the grayscale rule 1 in the cloud storage platform based on the needs of grayscale release (such as a change in the grayscale scheme), the terminal device can receive the adjustment operation, then locate the grayscale rule 1 and modify the grayscale rule 1 according to the specific content of the adjustment operation to form a new grayscale rule 1 for storage for subsequent loading and use by the terminal device.
[0098] Furthermore, in a feasible embodiment, the above step S10, loading each grayscale rule in the preset grayscale rule database, may include:
[0099] Step S101, fully loading all the grayscale rules in the preset grayscale rule database according to a preset time period.
[0100] It should be noted that, in this embodiment, the preset time period is a time period for the terminal device to periodically load each grayscale rule in the preset grayscale rule database, so that each grayscale rule configured in the preset grayscale rule database can take effect in real time. Specifically, in this embodiment, the preset time period can be set to 5 seconds. It should be understood that based on the different design needs of actual applications, in other feasible implementations, the terminal device can of course also set the preset time period to other times shorter or longer than 5 seconds based on its own performance, and the grayscale publishing method of the present invention does not limit the specific size of the preset time period.
[0101] After the terminal device configures and stores each grayscale rule in the preset grayscale rule database, it can load all the grayscale rules in a preset time period cycle to perform corresponding forwarding processing on the subsequently received grayscale requests.
[0102] Specifically, for example, after the terminal device configures grayscale rule 1 and other grayscale rules in the cloud storage platform that serves as the preset grayscale rule database, the grayscale rule 1 and other grayscale rules are fully loaded every 5 seconds, so that when a grayscale request is subsequently received, corresponding rule adaptation and rule-based forwarding processing operations can be performed. Alternatively, the terminal device can also complete the modification and adjustment operation on grayscale rule 1 within the current 5-second time period to form a new grayscale rule 1, and then load the new grayscale rule 1 at the beginning of the next 5-second period, so that when a grayscale request is subsequently received, corresponding rule adaptation and rule-based forwarding processing operations can be performed.
[0103] Step S20, extracting request parameters of the received grayscale request, and adapting the target grayscale rule in each of the grayscale rules according to the request parameters;
[0104] After the terminal device starts and fully loads all the grayscale rules configured in the preset grayscale rule database, the terminal device extracts the request parameters for the grayscale request received in real time, and then uses the extracted request parameters to adapt the loaded grayscale rules, thereby adapting the target grayscale rules to be applied to process the grayscale request.
[0105] It should be noted that, in this embodiment, the request parameters of the grayscale request correspond to the data contained in the grayscale rule, so as to match a unique target grayscale rule from the configured grayscale rules according to the request parameters. Specifically, the request parameters extracted by the terminal device from the received grayscale request include but are not limited to: requester IP address, request header identifier, requesting user and other information.
[0106] Specifically, for example, after receiving a grayscale request, the terminal device immediately obtains the request parameters of the grayscale request - requester IP address: IP address 1, request header identifier: identifier 1 and requested user: user 1. Then, the terminal device traverses the loaded grayscale rules to detect whether the "request grayscale identifier" - requester IP address, request header identifier and requested user contained in each grayscale rule corresponds to the request parameters - requester IP address: IP address 1, request header identifier: identifier 1 and requested user: user 1. When it is detected that the "request grayscale identifier" - requester IP address: IP address 1, request header identifier: identifier 1 and requested user: user 1 contained in grayscale rule 6 among the grayscale rules is the same as the request parameter, it is determined that grayscale rule 6 is the target grayscale rule to be applied for processing the current grayscale request.
[0107] Step S30, performing grayscale balanced sampling according to the grayscale request and the target grayscale rule to obtain a target grayscale request;
[0108] After the terminal device receives the grayscale request and adapts the target grayscale rule from the loaded grayscale rules according to the extracted request parameters of the grayscale request, the terminal device performs a grayscale balanced sampling operation on the grayscale request based on the traffic balancing sampling strategy, according to the grayscale request and the target grayscale rule, so as to obtain the target grayscale request that needs to be served by the grayscale instance from the grayscale request with equal probability.
[0109] Furthermore, in another feasible embodiment, in order to ensure the success rate of service processing for requests, if the terminal device fails to adapt the target grayscale rule from the loaded grayscale rules based on the request parameters of the received grayscale request, the terminal device will directly forward the grayscale request to the preset non-grayscale instance for processing.
[0110] In this embodiment, the preset non-grayscale instance is any original consumption instance of the application to be upgraded in the grayscale release scheme. Since the core of the grayscale release scheme is to gradually perform an overall upgrade in a grayscale manner, the terminal device as a message middleware system will simultaneously configure the original consumption instance of the connection application and the grayscale instance to be upgraded to divert and process the received service requests. Therefore, when the terminal device detects that there is no target grayscale rule that matches the currently received grayscale request among the configured grayscale rules, it will directly forward the grayscale request to the original consumption instance for processing, thereby ensuring the success rate of service request processing.
[0111] Furthermore, in a feasible embodiment, the above step S30 may include:
[0112] Step S301, obtaining real-time statistics of the system throughput of the grayscale request, and obtaining the grayscale percentage value of the target grayscale rule;
[0113] After the terminal device adapts the target grayscale rule according to the request parameters of the received grayscale request, it first obtains the system throughput obtained by real-time statistics at the moment of receiving the grayscale request, and then the terminal device further obtains the grayscale percentage value in the target grayscale rule for subsequent grayscale balance sampling.
[0114] Specifically, for example, after receiving a grayscale request and adapting the grayscale rule 6 among the grayscale rules according to the request parameters of the grayscale request - the requesting party IP address: IP address 1, the request header identifier: identifier 1 and the requesting user: user 1, the terminal device obtains the TPS (system throughput) flow rate: m, which is obtained by real-time statistics at the moment of receiving the grayscale request, and further obtains the grayscale percentage value: n, contained in the grayscale rule 6.
[0115] It should be noted that, in this embodiment, the terminal device can use any existing mature method to count the TPS flow of the received grayscale requests in real time.
[0116] Step S302, calling a preset traffic sampling strategy to perform grayscale balanced sampling according to the system throughput and the grayscale percentage value to obtain a target grayscale request from the grayscale requests in a balanced manner.
[0117] It should be noted that, in this embodiment, the preset traffic sampling strategy is a sampling strategy for the terminal device to perform balanced sampling to obtain the target grayscale request while ensuring the same sampling probability for the received grayscale request. It should be understood that based on the different design requirements of actual applications, the terminal device can adopt any existing mature traffic balanced sampling strategy to perform grayscale balanced sampling operations for grayscale requests, and the grayscale publishing method of the present invention does not specifically limit the traffic balanced sampling strategy adopted by the terminal device when performing grayscale balanced sampling operations.
[0118] After obtaining the system throughput that is counted in real time at the moment of receiving the grayscale request, as well as the grayscale percentage value of the target grayscale rule, the terminal device directly calls the preset traffic sampling strategy that performs traffic balanced sampling for the grayscale request while ensuring the same sampling probability, and performs balanced sampling operations based on the system throughput and grayscale percentage value, thereby obtaining the target grayscale request that needs to be served by the grayscale instance from the grayscale request with an equal probability of sampling.
[0119] Specifically, for example, a preset traffic sampling strategy is obtained, and then based on the TPS traffic obtained by real-time statistics of the terminal device at the moment of receiving the grayscale request: m, and the grayscale percentage value: n contained in the grayscale rule 6 as the target grayscale rule, a balanced sampling operation of the grayscale traffic is performed on the grayscale request to obtain the part of the target grayscale request in the grayscale request that is currently to be transferred to the grayscale instance for processing.
[0120] Furthermore, in a feasible embodiment, the preset traffic sampling strategy may be a traffic balancing sampling strategy, and the above step S302 may include:
[0121] Step S3021, using the grayscale percentage value as a sampling ratio for flow balancing sampling;
[0122] Specifically, for example, the terminal device determines the grayscale percentage value n of the target grayscale rule currently adapted, grayscale rule 6, as the sampling ratio value n% of the traffic balancing sampling operation performed every second.
[0123] Step S3022, calling the traffic balancing sampling strategy to determine the amount of extracted data in all the grayscale requests of the system throughput size according to the sampling ratio and the system throughput size, so as to extract the target grayscale request.
[0124] It should be noted that in this embodiment, it should be understood that based on the different design requirements of actual applications, in other feasible implementations, the terminal device can of course also call other types of traffic sampling strategies currently on the market. The grayscale release method of the present invention is not limited to the specific type of the traffic balancing sampling strategy.
[0125] Specifically, the terminal device sets the system throughput - TPS traffic obtained by real-time statistics to m, and every second, it evenly samples the grayscale requests with a data volume of m at a determined sampling ratio of n% to obtain grayscale requests with a data volume of m*n%, thereby using the m*n% grayscale requests as the target grayscale requests to be transferred to the grayscale instance for processing.
[0126] It should be noted that in this embodiment, when the terminal device uses the traffic balancing sampling strategy to extract the target grayscale request from the grayscale request, the sampling probability for each request data in the TPS traffic is the same. That is, when the terminal device currently receives only one grayscale request data, the probability of the request data being obtained is 1, and when the terminal device currently receives a total of two grayscale request data, the probability of each request data being extracted is 1 / 2. In this way, when the terminal device currently receives a total of n grayscale request data, the probability of each request data being extracted from the n grayscale request data is: 1*1 / 2*2 / 3*3 / 4...(n-1) / n=1 / n, thereby ensuring that the probability of each request data being obtained is equal.
[0127] Step S40: forward the target grayscale request to a logical group under a preset grayscale instance monitoring topic for processing to return a grayscale request processing result.
[0128] It should be noted that, in this embodiment, the preset grayscale instance is a grayscale target service response instance in the grayscale publishing scheme, which performs service processing for grayscale requests initiated by users. The grayscale target service response instances each listen to one or more MessageQueues (logical groupings), and the multiple MessageQueues belong to one or more Topics (topics). The terminal device takes the modulus on the multiple MessageQueues listened to by the grayscale target service response instance, thereby polling and receiving the target grayscale request for processing.
[0129] After the terminal device extracts the target grayscale request from the received grayscale requests according to the preset traffic balancing sampling strategy, the terminal device can forward the target grayscale request together with the target grayscale rule to the logical grouping under the topic monitored by the grayscale target service response instance. After the target grayscale request is received and processed by the grayscale target service response instance, the grayscale target service response instance returns the processing result of whether the grayscale request is processed successfully or failed.
[0130] The embodiment of the present invention provides a grayscale publishing method, which is to fully load all grayscale rules that have been pre-configured in a preset grayscale rule database when a terminal device serving as a message middleware system is started; after the terminal device is started and fully loads all grayscale rules configured in the preset grayscale rule database, the terminal device extracts request parameters for the grayscale request received in real time, and then the terminal device uses the extracted request parameters to adapt the loaded grayscale rules, so as to adapt to obtain the target grayscale rule to be applied currently for processing the grayscale request; the terminal device receives the grayscale request and adapts the target grayscale rule from the loaded grayscale rules according to the extracted request parameters of the grayscale request. Afterwards, the terminal device performs a grayscale balanced sampling operation on the grayscale request based on the traffic balancing sampling strategy, the grayscale request and the target grayscale rule, so as to obtain the target grayscale request that needs to be served by the grayscale instance from the grayscale request with equal probability; after the terminal device extracts the target grayscale request from the received grayscale requests according to the preset traffic balancing sampling strategy, the terminal device can forward the target grayscale request together with the target grayscale rule to the logical grouping under the topic monitored by the grayscale target service response instance. After the target grayscale request is received and processed by the grayscale target service response instance, the grayscale target service response instance returns the processing result of whether the grayscale request is successfully or failed.
[0131] Compared with the traditional message middleware system server selecting the corresponding service instance to process the grayscale request according to the load balancing strategy, the present invention can accurately locate and forward the grayscale request to the logical group monitored by the grayscale instance for processing according to the configured grayscale rules, thereby improving the service success rate of the grayscale request. In addition, the present invention performs the grayscale request service by loading the grayscale rules configured in the database. In this way, when the grayscale scheme changes, it is only necessary to adapt and adjust the grayscale rules in the database, without modifying the code logic of the application client as in the traditional way, thereby greatly reducing the overall cost of grayscale publishing.
[0132] Further, based on the above first embodiment, a second embodiment of the grayscale publishing method of the present invention is proposed. In this embodiment, the grayscale request processing result returned by the preset grayscale instance after receiving the target grayscale request for processing includes request processing failure and request processing success. In the above step S40, after forwarding the target grayscale request to the logical group under the preset grayscale instance listening topic for processing to return the grayscale request processing result, the grayscale publishing method of the present invention may also include:
[0133] Step S50: if the grayscale request processing result is request processing failure, forwarding the target grayscale request to the logical group under the preset non-grayscale instance monitoring topic for processing;
[0134] It should be noted that, in this embodiment, the preset non-grayscale instance is any original consumption instance of the application to be upgraded in the grayscale release solution.
[0135] The terminal device forwards the target grayscale request extracted through the traffic balancing sampling operation together with the target grayscale rule to the logical grouping under the topic monitored by the grayscale target service response instance. The target grayscale request is received and processed by the grayscale target service response instance and then returns the grayscale request processing result. After receiving the grayscale request processing result, if the terminal device detects that the grayscale request processing result indicates that the request processing of the grayscale target service response instance has failed, then in order to ensure the success rate of service processing for the grayscale request, the terminal device forwards the target grayscale request to the original consumer instance for processing again, thereby ensuring the success rate of service request processing.
[0136] Further, in another feasible embodiment, after the above step S50, "forwarding the target grayscale request to a logical group under a preset non-grayscale instance monitoring topic for processing", the grayscale publishing method of the present invention may further include:
[0137] Step B: collecting the request parameters of the target grayscale request for use in analyzing the cause of grayscale request processing failure.
[0138] After the terminal device detects that the grayscale request processing result indicates that the request processing of the grayscale target service response instance has failed, and in order to ensure the success rate of service processing for the grayscale request, the terminal device forwards the target grayscale request to the original consumer instance for processing again, the terminal device will further collect the request parameters of the target grayscale request for subsequent automatic or grayscale release staff to use the request parameters to analyze the reasons for the failure of the grayscale request processing.
[0139] It should be noted that in this embodiment, the terminal device can adopt any mature request processing analysis method currently available to use the request parameters of the included grayscale request to analyze the cause of the failure of grayscale request processing. The grayscale publishing method of the present invention is not limited to the specific analysis operations for analyzing the cause of the failure of grayscale request processing.
[0140] Furthermore, in another feasible embodiment, the grayscale publishing method of the present invention may further include:
[0141] Step S60: If the grayscale request processing result is that the request processing is successful, the grayscale request processing success rate is counted, and the grayscale percentage value of the target grayscale rule is adjusted according to the processing success rate.
[0142] The terminal device forwards the target grayscale request extracted through the traffic balancing sampling operation together with the target grayscale rule to the logical grouping under the topic monitored by the grayscale target service response instance. The target grayscale request is received and processed by the grayscale target service response instance and then returns the grayscale request processing result. After receiving the grayscale request processing result, if the terminal device detects that the grayscale request processing result indicates that the request processing of the grayscale target service response instance is successful, the terminal device can adjust the grayscale percentage value of the currently applied target grayscale rule based on the real-time statistics of the grayscale request processing success rate.
[0143] It should be noted that, in the present embodiment, the terminal device obtains the processing success rate of the grayscale requests by recording in real time the data of the grayscale instance service processing the grayscale requests. For example, the terminal device records the total number of grayscale requests received and the number of successful grayscale requests processed by the grayscale instance, and then calculates the processing success rate of the grayscale instance processing the grayscale requests based on the total number of requests and the number of successes: number of successes / total number of requests = processing success rate.
[0144] Further, in a feasible embodiment, in the above step S60, the step of "adjusting the grayscale percentage value of the target grayscale rule according to the processing success rate" may include:
[0145] Step S601, detecting whether the processing success rate is greater than or equal to a preset grayscale success rate;
[0146] After obtaining the processing success rate of the grayscale instance service processing the grayscale request, the terminal device compares the processing success rate with the preset grayscale success rate to determine whether the processing success rate is greater than or equal to the preset grayscale success rate.
[0147] It should be noted that, in the present embodiment, the preset grayscale success rate is based on the specific application needs of the grayscale release, and is generated by custom configuration of the grayscale release staff. It should be understood that based on the different needs of actual applications, in different feasible implementations, the size of the preset grayscale success rate may certainly be different. The grayscale release method of the present invention does not limit the specific size of the preset grayscale success rate.
[0148] Step S602: If yes, then the grayscale percentage value of the target grayscale rule is increased according to the grayscale percentage value step length of the target grayscale rule;
[0149] When the terminal device compares the processing success rate of the grayscale instance service in processing grayscale requests with the preset grayscale success rate, if the comparison shows that the processing success rate is greater than or equal to the preset grayscale success rate, the terminal device gradually increases the grayscale percentage value of the target grayscale rule according to the pre-configured grayscale percentage value step of the target grayscale rule.
[0150] It should be noted that, in the present embodiment, the percentage value step is the amplitude by which the grayscale percentage value step of the applied target grayscale rule needs to be increased when the terminal device determines that the current grayscale instance processes the grayscale request successfully. It should be understood that based on the different design requirements of actual applications, in different feasible implementations, the specific size of the grayscale percentage value step may naturally be different. The grayscale publishing method of the present invention does not limit the specific size of the grayscale percentage value step.
[0151] Specifically, for example, please refer to Figure 4 In the application scenario shown, the processing success rate obtained by real-time statistics of the terminal device (the device shown in the figure) when the grayscale instance service processes the target grayscale request 1 successfully is R, and the preset grayscale success rate generated by the terminal device based on the configuration of the grayscale release staff is R2, and the grayscale percentage value step size of the grayscale rule 6 preset by the terminal device is 5%. Then, when the terminal device determines that R is greater than or equal to R2, it immediately increases the grayscale percentage value of the grayscale rule 6 at the current moment by 5%, and then, if the grayscale rule 6 is still applied as the target grayscale rule to service other grayscale requests next time and the processing is successful, the terminal device will increase the grayscale percentage value of the grayscale rule 6 by 5% again, and repeat this cycle until the grayscale percentage value of the grayscale rule 6 increases to the preset maximum grayscale percentage value: 50%.
[0152] Step S603: if not, then reduce the grayscale percentage value to terminate the target grayscale rule.
[0153] When the terminal device compares the processing success rate of the grayscale instance service in processing grayscale requests with the preset grayscale success rate, if the comparison shows that the processing success rate is less than the preset grayscale success rate, the terminal device directly reduces the grayscale percentage value step of the target grayscale rule to zero so that the terminal device will stop using the target grayscale rule after receiving a subsequent grayscale request.
[0154] Specifically, for example, the processing success rate obtained by real-time statistics when the grayscale instance service successfully processes the target grayscale request 1 is R, and the preset grayscale success rate generated by the terminal device based on the configuration of the grayscale release staff is R2, and the grayscale percentage value step size of the grayscale rule 6 preset by the terminal device is 5%. Then, when the terminal device determines that R is less than R2 after comparison, it immediately reduces the grayscale percentage value of the grayscale rule 6 at the current moment to 0, thereby terminating the grayscale rule 6.
[0155] In this embodiment, the preset grayscale instance receives the target grayscale request and processes it, and the grayscale request processing result returned includes request processing failure and request processing success. Therefore, the terminal device forwards the target grayscale request extracted through the traffic balancing sampling operation together with the target grayscale rule to the logical grouping under the topic monitored by the grayscale target service response instance. The target grayscale request is received and processed by the grayscale target service response instance and then returns the grayscale request processing result. After receiving the grayscale request processing result, if the terminal device detects that the grayscale request processing result indicates that the request processing of the grayscale target service response instance has failed, then in order to ensure the success rate of service processing for the grayscale request, the terminal device forwards the target grayscale request to the original consumer instance for processing again, thereby ensuring the processing success rate of the service request; or, if the terminal device detects that the grayscale request processing result indicates that the request processing of the grayscale target service response instance has been successful, then the terminal device can adjust the grayscale percentage value of the currently applied target grayscale rule based on the real-time statistics of the processing success rate of the grayscale request.
[0156] Furthermore, based on the above-mentioned first and second embodiments, a third embodiment of the grayscale publishing method of the present invention is proposed. In this embodiment, the grayscale publishing method of the present invention may further include:
[0157] Step S70, outputting a grayscale upgrade prompt of the preset grayscale instance when it is detected that the grayscale percentage value reaches a preset maximum grayscale percentage value;
[0158] It should be noted that, in this embodiment, the preset maximum grayscale percentage value is a grayscale percentage preset value defined and generated by the grayscale publishing staff based on the performance of the terminal device itself. Specifically, the processing capacity of a single grayscale instance is limited. Therefore, the preset maximum grayscale percentage value can be specifically set to 50%. It should be understood that based on different design requirements of actual applications, in different feasible implementations, the performance parameters of the terminal device itself can be different. In this way, the preset maximum grayscale percentage value can naturally be different. The grayscale publishing method of the present invention does not limit the specific size of the preset maximum grayscale percentage value.
[0159] After the terminal device increases the grayscale percentage value of the target grayscale rule by the step size of the grayscale percentage value of the target grayscale rule each time, the terminal device detects whether the grayscale percentage value of the target grayscale rule is equal to or greater than the preset maximum grayscale percentage value, and determines that the grayscale for the preset grayscale instance is completed when it is detected that it is, thereby outputting the grayscale upgrade prompt of the preset grayscale instance to the grayscale publishing staff.
[0160] Specifically, for example, when the terminal device determines in real time that the grayscale instance service successfully processes the target grayscale request 1 during the current comparison that the processing success rate R is greater than or equal to the preset grayscale success rate R2, the grayscale percentage value of the target grayscale rule currently applied, grayscale rule 6, is increased by 5%, and it is detected that the grayscale percentage value of the grayscale rule 6 has increased to 50%, that is, it is equal to the preset maximum grayscale percentage value of 50%. Thus, the terminal device determines that the grayscale instance currently executing the service for the target grayscale request 1 has been completed in grayscale. Furthermore, the terminal device can output the grayscale upgrade prompt of the grayscale instance to the staff of the current grayscale release through message notification channels such as email and text messages according to the pre-configuration. In this way, the staff can perform the grayscale upgrade of the grayscale instance and other grayscale instances that are the same as the grayscale instance in the current grayscale release based on the prompt.
[0161] Furthermore, in another feasible embodiment, the grayscale publishing method of the present invention may further include:
[0162] Step S80: When it is detected that the grayscale percentage value reaches a preset maximum grayscale percentage value, grayscale upgrade is performed on other grayscale instances associated with the preset grayscale instance according to the target grayscale rule.
[0163] The terminal device detects whether the grayscale percentage value of the target grayscale rule is equal to or greater than the preset maximum grayscale percentage value, and determines that the grayscale for the preset grayscale instance is completed when it is detected that it is. Then, the terminal automatically performs grayscale upgrades for each other grayscale instance associated with the preset grayscale instance in the current grayscale release according to the target grayscale rule.
[0164] Specifically, for example, when the terminal device determines in the current comparison that the grayscale instance service successfully processes the target grayscale request 1, the real-time statistically obtained processing success rate R is greater than or equal to the preset grayscale success rate R2, and the grayscale percentage value of the target grayscale rule currently applied - grayscale rule 6 is increased by 5%, it is detected that the grayscale percentage value of the grayscale rule 6 has increased to 50%, that is, it is equal to the preset maximum grayscale percentage value of 50%. Therefore, the terminal device determines that the grayscale instance currently performing the service for the target grayscale request 1 has been completed in grayscale. Furthermore, after receiving a new grayscale request in the future, the terminal device can automatically forward the new grayscale request to other grayscale instances in the current grayscale release that are the same as the grayscale instance according to the grayscale rule 6 for grayscale operations, thereby automatically completing the grayscale upgrade operations of each other grayscale instance.
[0165] In this embodiment, after the terminal device increments the grayscale percentage value of the target grayscale rule each time according to the grayscale percentage value step length of the target grayscale rule, it detects whether the grayscale percentage value of the target grayscale rule is equal to or greater than the preset maximum grayscale percentage value, and determines that the grayscale for the preset grayscale instance is completed when it is detected that it is, thereby outputting the grayscale upgrade prompt of the preset grayscale instance to the grayscale release staff, or automatically performing grayscale upgrades for each other grayscale instance associated with the preset grayscale instance in the current grayscale release. In this way, while improving the success rate of grayscale request services and reducing the cost of grayscale release, the operation of the staff is further simplified, and the upgrade efficiency of the grayscale instance in the grayscale release is improved.
[0166] Furthermore, the present invention also provides a grayscale publishing device, which is applied to a message middleware system. Figure 5 , Figure 5 Schematic diagram of functional modules of an embodiment of a grayscale publishing device of the present invention. Figure 5 As shown, the grayscale publishing device of the present invention includes:
[0167] A rule loading module 10 is used to load each grayscale rule in a preset grayscale rule database;
[0168] The adaptation module 20 is used to extract the request parameters of the received grayscale request, and adapt the target grayscale rule in each of the grayscale rules according to the request parameters;
[0169] A balanced sampling module 30, configured to perform grayscale balanced sampling according to the grayscale request and the target grayscale rule to obtain a target grayscale request;
[0170] The forwarding processing module 40 is used to forward the target grayscale request to the logical group under the preset grayscale instance monitoring topic for processing to return the grayscale request processing result.
[0171] Furthermore, the grayscale publishing device of the present invention further includes:
[0172] A rule configuration module, used to configure each grayscale rule in a preset grayscale rule database, and to adjust each grayscale rule in the preset grayscale rule database;
[0173] The rule loading module 10 is further used to load all the grayscale rules in the preset grayscale rule database in a preset time period.
[0174] Furthermore, the balanced sampling module 30 includes:
[0175] An acquisition unit, used for acquiring real-time statistics of the system throughput of the grayscale request and acquiring the grayscale percentage value of the target grayscale rule;
[0176] The traffic balancing sampling unit is used to call a preset traffic sampling strategy to perform grayscale balancing sampling according to the system throughput and the grayscale percentage value so as to obtain a target grayscale request from the grayscale requests in a balanced manner.
[0177] Furthermore, the preset traffic sampling strategy is a traffic balancing sampling strategy, and the traffic balancing sampling unit includes:
[0178] A determination subunit is used to use the grayscale percentage value as a sampling ratio for flow balancing sampling;
[0179] The sampling subunit is used to call the traffic balancing sampling strategy to determine the amount of extracted data in all the grayscale requests of the system throughput size according to the sampling ratio and the system throughput size, so as to extract the target grayscale request.
[0180] Furthermore, the grayscale request processing result includes request processing failure and request processing success. The grayscale publishing device of the present invention further includes:
[0181] A request forwarding module, configured to forward the target grayscale request to a logical group under a preset non-grayscale instance monitoring topic for processing if the grayscale request processing result is a request processing failure; and
[0182] The rule percentage adjustment module is used to count the processing success rate of the grayscale request if the grayscale request processing result is that the request processing is successful, and adjust the grayscale percentage value of the target grayscale rule according to the processing success rate.
[0183] Furthermore, the rule percentage adjustment module includes:
[0184] A detection unit, used to detect whether the processing success rate is greater than or equal to a preset grayscale success rate;
[0185] A ratio increasing unit, if yes, then increasing the grayscale percentage value of the target grayscale rule according to the grayscale percentage value step size of the target grayscale rule;
[0186] A termination unit is used for reducing the grayscale percentage value to terminate the target grayscale rule if no.
[0187] Furthermore, the grayscale publishing device of the present invention further includes:
[0188] An upgrade prompt module, configured to output a grayscale upgrade prompt of the preset grayscale instance when detecting that the grayscale percentage value reaches a preset maximum grayscale percentage value;
[0189] The automatic upgrade module is used to perform grayscale upgrade on each other grayscale instance associated with the preset grayscale instance according to the target grayscale rule when it is detected that the grayscale percentage value reaches the preset maximum grayscale percentage value.
[0190] Furthermore, the grayscale publishing device of the present invention further includes:
[0191] The collection module is used to collect the request parameters of the target grayscale request for use in analyzing the cause of the grayscale request processing failure.
[0192] Among them, the functional implementation of each module in the above-mentioned grayscale publishing device corresponds to the various steps in the above-mentioned grayscale publishing method embodiment, and its functions and implementation processes will not be repeated here one by one.
[0193] The present invention also provides a computer storage medium on which a grayscale publishing program is stored. When the grayscale publishing program is executed by a processor, the steps of the grayscale publishing method described in any of the above embodiments are implemented.
[0194] The specific embodiments of the computer storage medium of the present invention are basically the same as the embodiments of the grayscale publishing method described above, and will not be described in detail here.
[0195] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0196] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0197] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0198] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A grayscale release method, characterized in that: The grayscale publishing method is applied to a message middleware system, and the grayscale publishing method includes: Load each grayscale rule in the preset grayscale rule database, the grayscale rule includes but is not limited to: request grayscale identifier, grayscale percentage value and target service responder instance identifier, the request grayscale identifier includes but is not limited to: requester IP address, request header identifier, requesting user; Extracting request parameters of the received grayscale request, and adapting target grayscale rules in each of the grayscale rules according to the request parameters; Obtaining real-time statistics of the system throughput of the grayscale request, and obtaining the grayscale percentage value of the target grayscale rule; Using the grayscale percentage value as a sampling ratio for flow balancing sampling; Invoke the traffic balancing sampling strategy to determine the amount of extracted data in all the grayscale requests of the system throughput size according to the sampling ratio and the system throughput size, so as to extract the target grayscale request; The target grayscale request is forwarded to the logical group under the preset grayscale instance listening topic for processing to return the grayscale request processing result.
2. The grayscale release method according to claim 1, characterized in that: The grayscale release method further includes: Configuring each grayscale rule in a preset grayscale rule database, and adjusting each grayscale rule in the preset grayscale rule database; The step of loading each grayscale rule in the preset grayscale rule database comprises: All the grayscale rules in the preset grayscale rule database are fully loaded according to a preset time period.
3. The grayscale release method according to claim 1, characterized in that: The grayscale request processing result includes request processing failure and request processing success. After the step of forwarding the target grayscale request to a logical group under a preset grayscale instance monitoring topic for processing to return a grayscale request processing result, the method further includes: If the grayscale request processing result is a request processing failure, forwarding the target grayscale request to a logical group under a preset non-grayscale instance monitoring topic for processing; and, If the grayscale request processing result is that the request processing is successful, the grayscale request processing success rate is counted, and the grayscale percentage value of the target grayscale rule is adjusted according to the processing success rate.
4. The grayscale release method according to claim 3, characterized in that: The step of adjusting the grayscale percentage value of the target grayscale rule according to the processing success rate comprises: Detecting whether the processing success rate is greater than or equal to a preset grayscale success rate; If yes, then the grayscale percentage value of the target grayscale rule is increased according to the grayscale percentage value step size of the target grayscale rule; If not, the grayscale percentage value is reduced to terminate the target grayscale rule.
5. The grayscale release method according to claim 3 or 4, characterized in that: The grayscale release method further includes: outputting a grayscale upgrade prompt of the preset grayscale instance when detecting that the grayscale percentage value reaches a preset maximum grayscale percentage value; or, When it is detected that the grayscale percentage value reaches the preset maximum grayscale percentage value, grayscale upgrade is performed on other grayscale instances associated with the preset grayscale instance according to the target grayscale rule.
6. A grayscale publishing device, characterized in that: The grayscale publishing device is applied to a message middleware system, and the grayscale publishing device includes: A rule loading module is used to load each grayscale rule in a preset grayscale rule database, wherein the grayscale rule includes but is not limited to: a grayscale request identifier, a grayscale percentage value, and a target service responder instance identifier, wherein the grayscale request identifier includes but is not limited to: a requester IP address, a request header identifier, and a requesting user; An adaptation module, used for extracting request parameters of the received grayscale request, and adapting a target grayscale rule in each of the grayscale rules according to the request parameters; An acquisition unit, used for acquiring real-time statistics of the system throughput of the grayscale request and acquiring the grayscale percentage value of the target grayscale rule; A determination subunit is used to use the grayscale percentage value as a sampling ratio for flow balancing sampling; A sampling subunit, configured to call a traffic balancing sampling strategy to determine the amount of extracted data in all the grayscale requests of the system throughput size according to the sampling ratio and the system throughput size, so as to extract a target grayscale request; The forwarding processing module is used to forward the target grayscale request to the logical group under the preset grayscale instance monitoring topic for processing to return the grayscale request processing result.
7. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a grayscale publishing program stored in the memory and executable on the processor, wherein the grayscale publishing program implements the steps of the grayscale publishing method as described in any one of claims 1 to 5 when executed by the processor.
8. A computer storage medium, characterized in that: The computer storage medium stores a grayscale publishing program, and when the grayscale publishing program is executed by the processor, the steps of the grayscale publishing method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Gray level publishing method and system, rule engine, terminal and storage medium
CN108595207A
Application gray publishing method and device and computer readable storage medium
CN108768875A
Micro-service gray release method and device, computer equipment and storage medium
CN109739552A
Microservice grayscale publishing method, device, computer device and storage medium
WO2020140663A1
Grayscale release management method, system and device, and storage medium
WO2020181684A1
