Gray release method and device, equipment, storage medium and product

By determining the target application based on request parameters and policies in grayscale release, and adopting a joint switching strategy for service type and percentage, the problem of forwarding business requests to multiple application centers in the prior art is solved, and the efficiency and data consistency of grayscale release are improved.

CN120335853APending Publication Date: 2025-07-18中移信息技术有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510315769.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing grayscale publishing method may cause the same business request to be forwarded to multiple application centers, resulting in data conflicts and dirty data problems.

Method used

By obtaining the current grayscale publishing policy and request parameters in the business request, the target application is determined, and the service request is forwarded to the target application, the business type and percentage joint switching strategy is adopted to avoid the forwarding of duplicate requests.

Benefits of technology

Improves the efficiency of grayscale publishing, avoids repeated requests forwarding to multiple application centers, and reduces the risk of data conflicts and dirty data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335853A_ABST
    Figure CN120335853A_ABST
Patent Text Reader

Abstract

The invention discloses a gray release method and device, equipment, a storage medium and a product, and relates to the technical field of computers, and the gray release method comprises the steps: obtaining a current gray release strategy in response to a triggered service request; determining a target application based on the gray release strategy and a request parameter in the service request; and forwarding the service request to the target application. As the target application corresponding to the gray release is determined based on the current gray release strategy and the request parameter in the service request, compared with the existing mode of determining the target application corresponding to the service request by adopting a polling mode, the mode of the application can avoid forwarding the repeated request of the user to different application centers; and the gray release efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a gray release method, apparatus, device, storage medium and product. Background Art

[0002] Gray release refers to the way of gradually replacing the old version of the application in the information system with the new version, rather than replacing the old version of the application as a whole with the new version. Because in the case of the overall replacement and online method, there will be a situation where the external service of the system is interrupted. For example, if there are abnormalities in the application itself or configuration abnormalities, and abnormal troubleshooting or version rollback will cause an uncertain extension of the external service interruption time of the system. The main process of gray release is to start the new version of the application while the old version of the application is still providing services, and then use the upstream load balancer to first divert a small part of the traffic, such as 1%, to the new version of the application, and check whether the services flowing through the new version of the application are normal. If normal, increase the diversion ratio, such as 10%, 50%, 100%, and finally switch all the traffic to the new version of the application. The existing gray release method is to use the load balancing strategy of the load balancer based on the weights of the backend service members, and add the new version of the application to the original old version application service group with a smaller weight. In this way, the total weight of the new version of the application accounts for a relatively small proportion of the total weight of the entire service group, which is used for initial small traffic verification, and then increase the weight of the new version of the application for large traffic verification. Finally, kick out the old version of the application from the load balancer service group, leaving only the new version of the application to complete the gray release process. However, due to reasons such as the user's repeated submission and resending mechanism, when performing gray release, the same transaction or business request may be sent to multiple central applications almost simultaneously. In this case, the database synchronization has not been completed in time, and successful storage in multiple centers has caused data conflicts and dirty data that need to be processed. Summary of the Invention

[0003] The main purpose of this application is to provide a gray release method, apparatus, device, storage medium and product, aiming to solve the technical problem that the existing gray release forwards the same business request to multiple application centers.

[0004] To achieve the above object, this application proposes a gray release method, and the gray release method includes:

[0005] In response to a triggered business request, obtain the current gray release policy;

[0006] Determine a target application based on the gray release policy and the request parameters in the business request;

[0007] Forward the business request to the target application.

[0008] Optionally, the gray release policy includes a combined switching policy of service type and percentage. The step of determining the target application based on the gray release policy and the request parameters in the service request includes:

[0009] When the gray release policy is the combined switching policy of service type and percentage, determine the request parameters according to the service request;

[0010] When the category label in the request parameters meets the preset category condition, determine the real-time gray value according to the request parameters;

[0011] Determine the target application based on the real-time gray value.

[0012] Optionally, the step of determining the real-time gray value according to the request parameters includes:

[0013] Determine the target attribute value according to the request parameters;

[0014] Encrypt the target attribute value through a preset hash function to obtain an encryption result;

[0015] Determine the real-time gray value based on the encryption result.

[0016] Optionally, the step of determining the target application based on the real-time gray value includes:

[0017] Obtain a preset gray threshold from the memory cache corresponding to the service request;

[0018] Determine the gray release critical value based on the preset gray threshold;

[0019] Determine the target application according to the gray release critical value and the real-time gray value.

[0020] Optionally, the gray release policy includes a service type switching policy. The step of determining the target application based on the gray release policy and the request parameters in the service request includes:

[0021] When the gray release policy is the service type switching policy, determine the category label according to the service request;

[0022] Obtain a preset gray release type label list;

[0023] Determine the target application based on the preset gray release type label list and the category label.

[0024] Optionally, after the step of forwarding the service request to the target application, further includes:

[0025] When the target application is a new version application, obtain the response result of the new version application to the service request;

[0026] When the response result is a response failure, forward the service request to the old version application.

[0027] In addition, to achieve the above object, the present application also provides a gray release device, which includes:

[0028] A response module, configured to obtain the current gray release policy in response to a triggered service request;

[0029] A target application determination module, configured to determine a target application based on the gray release policy and the request parameters in the service request;

[0030] A forwarding module, configured to forward the service request to the target application.

[0031] In addition, to achieve the above object, the present application also provides a gray release device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the gray release method as described above.

[0032] In addition, to achieve the above object, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the gray release method as described above.

[0033] In addition, to achieve the above object, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the gray release method as described above.

[0034] In response to a triggered service request, the present application obtains the current gray release policy; determines a target application based on the gray release policy and the request parameters in the service request; and forwards the service request to the target application. Since the present application determines the target application corresponding to the gray release based on the current gray release policy and the request parameters in the service request, compared with the existing method of determining the target application corresponding to the service request by polling, the above method of the present application can avoid forwarding repeated requests of users to different application centers and improve the efficiency of gray release. Description of the Drawings

[0035] The drawings here are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0036] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0037] Figure 1 It is a schematic flowchart provided for the first embodiment of the gray release method of the present application;

[0038] Figure 2 It is a dual-center deployment architecture diagram provided for the first embodiment of the gray release method of the present application;

[0039] Figure 3 It is an architecture diagram provided for the first embodiment of the gray release method of the present application;

[0040] Figure 4 It is a schematic diagram of the web page layout provided for the first embodiment of the gray release method of the present application;

[0041] Figure 5 It is a schematic flowchart provided for the second embodiment of the gray release method of the present application;

[0042] Figure 6 It is a schematic flowchart of the combined switching strategy of service types and percentages provided for the second embodiment of the gray release method of the present application;

[0043] Figure 7 It is a schematic diagram of the module structure of the gray release device in the embodiment of the present application;

[0044] Figure 8 It is a schematic diagram of the device structure of the hardware operating environment involved in the gray release method in the embodiment of the present application.

[0045] The realization of the purpose, functional features and advantages of the present application will be further described with reference to the embodiments and the drawings. Detailed implementation manners

[0046] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0047] To better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings of the specification and the specific implementation manners.

[0048] The main solution of the embodiment of the present application is: in response to a triggered service request, obtain the current gray release policy; determine the target application based on the gray release policy and the request parameters in the service request; forward the service request to the target application. Since the present application determines the target application corresponding to the gray release based on the current gray release policy and the request parameters in the service request, compared with the existing method of determining the target application corresponding to the service request by polling, the above method of the present application can avoid forwarding repeated requests of users to different application centers and improve the efficiency of gray release.

[0049] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a gray release device, etc. that can implement the above functions. Hereinafter, the gray release device will be taken as an example to illustrate this embodiment and the following embodiments.

[0050] Based on this, the embodiment of the present application provides a gray release method, referring to Figure 1 , Figure 1 which is a schematic flowchart provided for the first embodiment of the gray release method of the present application.

[0051] In this embodiment, the gray release method includes the following steps:

[0052] Step S10, in response to a triggered service request, obtain the current gray release policy;

[0053] It should be noted that the service request may be a data transaction or data processing request triggered by a user. In this embodiment, the applications that can process the service request include at least one new version of the application and at least one old version of the application. When this embodiment is a dual-center architecture system, the main center and the backup center of the dual-center architecture system correspond to the new version of the application and the old version of the application respectively. The gray release policy may include a service type switching policy and a gray percentage policy. The service type switching policy may be to forward the service request to the corresponding application according to the service type corresponding to the service request. The gray percentage policy may be to forward the service request to the corresponding application according to the gray percentage parameter in the service request.

[0054] Step S20, determine the target application based on the gray release policy and the request parameters in the service request;

[0055] It should be noted that the target application determined based on the gray release policy and the request parameters in the service request may be the request parameters that need to be relied on when determining gray release according to the gray release policy, and which application center the service request is forwarded to is determined according to the request parameters. For example, when the gray release policy is a service type switching policy, according to the service type corresponding to the service request, a preset service type list is queried to determine the application corresponding to the service request, and the corresponding relationship between the service type and the application is maintained in the service type list. When the gray release policy is a gray percentage policy, the gray percentage parameter value in the service request is determined, and the gray percentage parameter value is compared with a preset gray percentage threshold, and the application corresponding to the service request is determined according to the comparison result. For example, if the gray percentage parameter value is greater than the preset gray percentage threshold, the target application is the new version application; otherwise, the target application is the old version application.

[0056] Further, in order to improve the efficiency of gray release and avoid forwarding duplicate requests to multiple applications, the gray release policy includes a service type switching policy. Step S20 may include: in the case where the gray release policy is the service type switching policy, determining a category label according to the service request;

[0057] Obtaining a preset gray release type label list;

[0058] Determining a target application based on the preset gray release type label list and the category label.

[0059] It should be noted that the preset gray release type label list may include the category labels of services responded to by the new version application or the old version application set in advance. Determining the target application based on the preset gray release type label list and the category label may be that when the category labels of services responded to by the old version application are included in the preset gray release type label list, if the category label corresponding to the service request hits the preset gray release type label list, the service request is forwarded to the old version application; otherwise, the service request is forwarded to the new version application.

[0060] Step S30, forwarding the service request to the target application.

[0061] In specific implementation, reference may be made to Figure 2 , Figure 2This is the dual - center deployment architecture diagram provided for the first embodiment of the gray - scale release method of this application. In this embodiment, a dual - active online transaction business system with off - site synchronization in the database is taken as an example for illustration. A gateway layer for off - site traffic distribution is added under the main - center entrance hard load balancer. This gateway layer is composed of one or more soft load balancers such as proxy servers (Nginx), load - balancing software (HAProxy), etc. The gateway switches the gray - scale release service traffic between the main center and the standby center, as shown in Figure 2 below. Regarding the applications in the main center and the standby center as the old and new version applications during gray - scale release respectively, when performing gray - scale release, first switch all the traffic of the standby center back to the main center at the gateway layer. Wait for the long - connection to be disconnected. After no requests enter the standby center, replace all the old - version applications in the standby center with new - version applications. Then, at the gateway layer, filter out a small part of the traffic: 0.1% or 1% of the total traffic, or the traffic that meets the specific business - category tags, and switch it to the standby center. Check whether there are any abnormalities in the business processes flowing through the new - version applications in the standby center. If no abnormalities are found, increase the switched - over traffic by 10% or the business - category tags of 10% to the off - site standby center, and check again whether all the business processes are normal. If normal, increase the switched - over traffic by 50% or half of the business - category tags to the off - site standby center to check whether all the business processes are normal. If everything is normal, switch all the traffic to the standby center. After observing for a period of time, if no abnormalities are found, the gray - scale release of the standby - center application is completed. Once an abnormal business process is found during the verification process, quickly switch all the traffic back to the main center and then troubleshoot and repair the problem to reduce business losses. After the standby - center application goes online, the main - center application is put online in the same gray - scale manner.

[0062] Further, in order to avoid abnormalities in the new - version applications, after step S30, it further includes: in the case where the target application is a new - version application, obtaining the response result of the new - version application to the service request;

[0063] In the case where the response result is a response failure, forwarding the service request to the old - version application.

[0064] It should be noted that the response result includes the business - process processing failure result or the processing success result of the new - version application to the service request. In the case where the response result is a response failure, forward the service request to the old - version application, and then troubleshoot and repair the problem to reduce business losses.

[0065] Further, in order to enable users to centrally and simply control the off - site gray - scale release and disaster - recovery switching of multiple business systems, effectively reducing the workload and access time of system transformation and development brought by system addition and system migration. This embodiment also provides the gray - scale release of multiple business systems and the gray - scale release environment configuration for adding a single business system. Specifically, it can be referred to Figure 3, Figure 3 This is the architecture diagram provided for the first embodiment of the gray release method of this application. Taking the dual-center system as an example, the off-site traffic distribution gateway layer of the main center of the business system consists of two or more gateways with custom extension modules and a memory cache cluster in high-availability mode, such as Redis. As Figure 3 The left half shows the function architecture diagram of the gateway layer in this embodiment. Each gateway in the gateway layer distributes each service request according to the cached gray category label value list of the standby center of the business system and the gray percentage value sRatio. To ensure the traffic distribution performance of the gateway and reduce the gateway time consumption, at least one set of memory cache is configured in each data center, and the gateway of each business system only accesses the cache in the same data center as the gateway. Each gateway in the gateway layer of the same business system has the same configuration and distribution policy except for its own startup IP+PORT and different main center members. Referring to Figure 3 , in this embodiment, a gray query module with a web page and a gray switch module can be used to perform operations on the display of the gray distribution status of the traffic accessing the business system and the change of traffic switching. The query and change of the business category label lists and percentage values (i.e., gray percentages) of the main and standby data centers of the cache are completed in a program automation manner. This embodiment mainly consists of a gray query module, a gray switch module, and a configuration module. The windows of the gray query and gray switch modules are on the web page for gray query and switching, and can be composed of two regions - the main center region and the standby center region, as Figure 4 shown, Figure 4 This is the schematic diagram of the web page layout provided for the first embodiment of the gray release method of this application. There are 0 to multiple label buttons representing a type of business arranged in alignment in each region. A button identified by a business category label only exists in one of the two regions. If the label is in the left main center, it means that this type of business is all in the main center. On the contrary, if the label is in the standby center, it means that a certain proportion of this type of business is distributed to the standby center, and this proportion is determined by the percentage value at the lower part of the right region, or it can be specified by the user which business types are in the main center region or the standby center region.

[0066] In specific implementation, before traffic switching for the gray release of a business system, it is necessary to know the current business traffic distribution status. The gray query module can quickly and accurately display the current traffic status. Specifically: 1. Read the backup center service category label list S and the backup center percentage value R from the cache (it can be that each category label corresponds to a percentage value, or the backup center shares a percentage value); 2. Arrange each element in S in the form of a label in the backup center area of the page; 3. Display R at a preset position in the backup center area; 4. Read the full service category list A from the database; 5. Arrange each element in A - S, that is, each element in A except S, in the form of a label in the main center area of the page.

[0067] In specific implementation, the operation process of the gray switching module for cache change can be as follows: When the user selects a business system from the list of business systems that have been connected to the gray release and enters the corresponding cache access credentials (permission verification), 1. Click on the service category label in an area on the gray release web page. One click means selection (it can be set with a dotted border and dark color); 2. Click on the same label again to return to the normal unselected state (it can be set with a solid border and light color), and multiple labels can be selected in sequence by clicking; 3. Then click on the right shift >> or left shift << button between the two areas, and the one or more labels just selected will move to the other area (still with a dotted border and highlighted display to distinguish from the original labels in the other area); 4. Then click on the gray percentage value setting button in the right area, and a percentage can be selected from the pop - up drop - down list box (a general percentage can be set, or it can be set separately for each label); 5. After checking that the service category labels and the percentage are correct again, click the 'Gray Switch' button, and the system will perform the operation of changing the two variables of the backup center gray category label list and the percentage value of this business system in the cache; 6. After the change is completed, it will jump to the switch result page, which will display the detailed information of the execution result; 7. Then you can return to the traffic status query page to check whether the real - time business traffic gray status is consistent with the expected one.

[0068] In the face of the gray release of a dual - center system in this embodiment, more than 2 soft load gateways can be added under the main center entrance or the backup center entrance hard load balancer for off - site traffic switching between the main and backup centers. The soft load gateway can be a soft load balancer such as Nginx or HAProxy. The 7 - layer load functions such as finding, classifying, and calculating the gray flags of business requests, which consume a relatively large amount of storage and computing resources, can be offloaded to the soft load gateway that can be horizontally extended almost infinitely, avoiding problems such as large operation workload, low gray release efficiency, and data conflicts.

[0069] Based on the first embodiment of this application, in the second embodiment of this application, for the same or similar content as in the above-mentioned Embodiment 1, reference can be made to the above introduction and will not be elaborated hereinafter. On this basis, please refer to Figure 5 , Figure 5 which is a schematic flowchart provided for the second embodiment of the gray release method of this application. The gray release policy described in this embodiment includes a combined switching policy of service type and percentage. The step S20 further includes the following steps:

[0070] Step S201: When the gray release policy is the combined switching policy of service type and percentage, determine request parameters according to the service request;

[0071] It should be noted that the request parameters may include parameters such as category labels and / or real-time gray values. The category label may be the category identifier of the service corresponding to the service request. The real-time gray value may be the parameter value carried in the service request for gray release.

[0072] Step S202: When the category label in the request parameters meets the preset category condition, determine the real-time gray value according to the request parameters;

[0073] It should be noted that determining whether the category label in the request parameters meets the preset category condition may be to match the category label in the request parameters with a preset gray release type label list set in advance. The preset gray release type label list includes type labels of service requests that can be responded to by the new version application added in advance. If the match is successful, it is determined that the preset category condition is met. If the match fails, it can be determined that the target application corresponding to the service request is an old version application. In specific implementation, it can be set according to business requirements, or it can be set that the type labels included in the preset gray release type label list are type labels of service requests responded to by the old version application. To avoid too much traffic being forwarded to the new version application, in this embodiment, when the category label in the request parameters meets the preset category condition, the real-time gray value is determined according to the request parameters.

[0074] Further, to improve the efficiency of gray release, the step of determining the real-time gray value according to the request parameters includes:

[0075] Determine the target attribute value according to the request parameters;

[0076] Encrypt the target attribute value through a preset hash function to obtain an encryption result;

[0077] Determine the real-time gray value based on the encryption result.

[0078] It should be noted that the target attribute value can be the value ratioAttrValue of the gray percentage attribute in the service request. Encrypting the target attribute value through a preset hash function, the encryption result can be taking the 32-bit MD5 hash value of ratioAttrValue to obtain the encryption result. Determining the real-time gray value based on the encryption result can be intercepting the last three hexadecimal digits of the encryption result, calculating its decimal number (the maximum value of a 3-digit hexadecimal number is 4096), and setting it as the real-time gray value timeGrayValue.

[0079] Step S203: Determine the target application based on the real-time gray value.

[0080] It should be noted that determining the target application based on the real-time gray value can be comparing the real-time gray value with a preset gray threshold, and determining the target application corresponding to the service request according to the comparison result. Specifically, if the real-time gray value is greater than the preset gray threshold, the target application corresponding to the service request is the new version application; if the real-time gray value is not greater than the preset gray threshold, the target application corresponding to the service request is the old version application. In specific implementation, it can also be the opposite setting, that is, if the real-time gray value is not greater than the preset gray threshold, the target application corresponding to the service request is the new version application. Both the old version application and the new version application in this embodiment can be application clusters.

[0081] Furthermore, in order to improve the efficiency of gray release, step S203 may include:

[0082] Obtain the preset gray threshold from the memory cache corresponding to the service request;

[0083] Determine the gray release critical value based on the preset gray threshold;

[0084] Determine the target application according to the gray release critical value and the real-time gray value.

[0085] It should be noted that the preset gray threshold can be a pre-set gray threshold, which can be a percentage value sRatio, and its value range is 0, 0.1, 1, 10, 20…90, 99, 99.9, 100 and other values. Determining the gray release critical value based on the preset gray threshold can be multiplying sRatio by 40.96 and taking the integer, and setting it as the gray release critical value critGrayValue. Determining the target application according to the gray release critical value and the real-time gray value can be to judge whether the real-time gray value timeGrayVal ue is less than the gray release critical value critGrayValue. If it is less, the target application is the new version application; otherwise, the target application is the old version application. It can also be that if it is less, the target application is the old version application, and this embodiment does not limit it here.

[0086] In specific implementation, reference can be made to Figure 6 , Figure 6 which is a schematic flowchart of the service type and percentage combined switching strategy provided in the second embodiment of the gray release method of this application; Figure 6The corresponding one is a dual - center system, where the standby center is the newly launched new - version application, and the primary center is the old - version application. For each arriving request: 1. Read the source address / header / body string of the request (the source address, header, or body contains values that can be used as the grayscale percentage attribute and the business category label); 2. Read the preset business grayscale category label key list from the cache, as well as the value starting offset and value digit list corresponding to each grayscale category label list (the value starting offset and value digit list are used to determine the starting offset and the number of digits for taking values when obtaining the value of the grayscale category label key and the value of the grayscale percentage attribute from the business request. For example, if the value starting offset is 2 and the value digit is 5, then for 36382762738, the obtained result is 38276); 3. According to the category label key list and the value digit list, search for the value busiTypeValue of the grayscale category label key and the value ratioAttrValue of the grayscale percentage attribute from the header or body; 4. Read the list sBusiTypeList of standby - center business grayscale category label values from the cache; 5. Search for the grayscale label value busiTypeValue filtered out from the previous request message in the sBusiTypeList list; 6. If found, take the 32 - bit MD5 hash value of the percentage attribute value ratioAttrValue, then intercept the last three - digit hexadecimal number and calculate its decimal number (the maximum value of a 3 - digit hexadecimal number is 4096), and set it as the real - time grayscale value timeGrayValue; 7. Query the percentage value sRatio of the standby - center business category label of this business system in the cache, and the value range is 0, 0.1, 1, 10, 20…90, 99, 99.9, 100; 8. Multiply sRatio by 40.96 and take the integer, and set it as the grayscale release critical value critGrayValue; 9. Judge whether the real - time grayscale value timeGrayValue of the message is less than the grayscale release critical value critGrayValue; 10. If so, distribute the request message to the standby center, otherwise distribute it to the local primary center. The grayscale release strategy that switches only according to the business type or only according to the grayscale percentage is the above steps excluding the parts related to the other category. This embodiment will not be repeated here.

[0087] This embodiment has the advantage of switching according to both the service category label and the gray scale percentage, which has stronger service directivity and finer granularity. It enables the operators during gray scale rollout to better verify specific types of services, and can effectively reduce the failure of business processing flows caused by application defects and incorrect environment configurations. When the gateway distributes traffic in this embodiment, it first extracts the gray scale type attribute value of each request, checks whether it belongs to the member of the service category label of the standby center, then extracts the value of its percentage attribute, and compares it with the percentage weighted critical value in the cache after hash operation. This greatly reduces the probability that the same transaction is distributed to both the primary center and the standby center due to random polling based on the weights of background members in the conventional method.

[0088] In this embodiment, users can perform gray scale release in three ways: solely by service category label, solely by gray scale percentage, and combined switching of service category and percentage (i.e., combined switching of service type and percentage). When releasing solely by service category, that is, when distributing traffic from the gateway layer of the primary center, only the traffic of the selected category in the standby center service label list in the cache is distributed. For example, by service type, affiliated province, service channel, etc., users only need to change the service category label, that is, change the value of the standby center gray scale category label list in the cache. When releasing solely by gray scale percentage, all the traffic of the system is distributed to the standby center according to the specified percentage (i.e., the preset gray scale threshold), and users need to set the value of the standby center traffic percentage in the cache, that is, the preset gray scale threshold. Combined switching of service category and percentage can achieve finer-grained gray scale release, and users need to select parameters in two dimensions: service category label and percentage value.

[0089] In this embodiment, when the gray scale release policy is the combined switching policy of service type and percentage, request parameters are determined according to the service request; when the category label in the request parameters meets the preset category condition, a real-time gray scale value is determined according to the request parameters; and a target application is determined based on the real-time gray scale value. Based on the combined switching policy of service type and percentage, this embodiment meets the gray scale release control requirements related to service type, avoids the risk of duplicate requests caused by the existing percentage traffic distribution method based on weighted polling, and has better idempotency.

[0090] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the gray scale release method of this application. Any simple transformations in more forms based on this technical concept are within the protection scope of this application.

[0091] This application also provides a gray scale release device. Please refer to Figure 7 The gray scale release device includes:

[0092] A response module 10, configured to obtain the current gray scale release policy in response to a triggered service request;

[0093] A target application determination module 20, configured to determine a target application based on the gray release policy and request parameters in the service request;

[0094] A forwarding module 30, configured to forward the service request to the target application.

[0095] In this embodiment, in response to a triggered service request, the current gray release policy is obtained; a target application is determined based on the gray release policy and request parameters in the service request; and the service request is forwarded to the target application. Since this embodiment determines the target application corresponding to the gray release based on the current gray release policy and request parameters in the service request, compared with the existing method of using polling to determine the target application corresponding to the service request, the above method in this embodiment can avoid forwarding repeated requests of users to different application centers and improve the efficiency of gray release.

[0096] The gray release device provided in this application adopts the gray release method in the above embodiment, and can solve the technical problem that the existing gray release has the problem of forwarding the same service request to multiple application centers. Compared with the prior art, the beneficial effects of the gray release device provided in this application are the same as those of the gray release method provided in the above embodiment, and other technical features in the gray release device are the same as those disclosed in the above embodiment method, which will not be elaborated here.

[0097] This application provides a gray release device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the gray release method in the first embodiment above.

[0098] Next, refer to Figure 8 , which shows a schematic structural diagram of a gray release device suitable for implementing the embodiments of this application. The gray release device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The gray release device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.

[0099] As shown Figure 8 in the figure, the gray release device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the gray release device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the gray release device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a gray release device having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be alternatively implemented or had.

[0100] Specifically, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart may be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.

[0101] The gray release device provided in the present application adopts the gray release method in the above embodiments, and can solve the technical problem that the existing gray release forwards the same service request to multiple application centers. Compared with the prior art, the beneficial effects of the gray release device provided in the present application are the same as those of the gray release method provided in the above embodiments, and other technical features in the gray release device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.

[0102] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0103] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0104] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the gray release method in the above embodiments.

[0105] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0106] The above computer-readable storage medium can be included in the gray release device; it can also exist separately without being assembled into the gray release device.

[0107] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0108] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0109] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.

[0110] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned gray release method, and can solve the technical problem that the existing gray release forwards the same service request to multiple application centers. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the gray release method provided in the above embodiments, and will not be elaborated here.

[0111] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the grayscale release method as described above.

[0112] The computer program product provided by the present application can solve the technical problem that the existing grayscale release forwards the same service request to multiple application centers. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the grayscale release method provided in the above embodiments, and will not be elaborated herein.

[0113] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.

Claims

1. A gray release method, characterized in that, The gray release method includes the following steps: In response to a triggered service request, obtain the current gray release policy; Determine the target application based on the gray release policy and the request parameters in the service request; Forward the service request to the target application.

2. The gray release method according to claim 1, wherein The gray release policy includes a service type and percentage combined switching policy. The step of determining the target application based on the gray release policy and the request parameters in the service request includes: When the gray release policy is the service type and percentage combined switching policy, determine the request parameters according to the service request; When the category label in the request parameters meets the preset category condition, determine the real-time gray value according to the request parameters; Determine the target application based on the real-time gray value.

3. The gray release method according to claim 2, characterized in that, The step of determining the real-time gray value according to the request parameters includes: Determine the target attribute value according to the request parameters; Encrypt the target attribute value through a preset hash function to obtain an encryption result; Determine the real-time gray value based on the encryption result.

4. The gray release method according to claim 2, wherein The step of determining the target application based on the real-time gray value includes: Obtain a preset gray threshold from the memory cache corresponding to the service request; Determine the gray release critical value based on the preset gray threshold; Determine the target application according to the gray release critical value and the real-time gray value.

5. The gray release method according to any one of claims 1 to 4, characterized in that The gray release policy includes a service type switching policy. The step of determining the target application based on the gray release policy and the request parameters in the service request includes: When the gray release policy is the service type switching policy, determine the category label according to the service request; Obtain a preset gray release type label list; Determine the target application based on the preset gray release type label list and the category label.

6. The gray release method according to any one of claims 1-4, characterized in that After the step of forwarding the service request to the target application, it further includes: When the target application is a new version application, obtain the response result of the new version application to the service request; When the response result is a response failure, forward the service request to the old version application.

7. A gray release device, characterized in that, The gray release device includes: A response module, configured to obtain the current gray release policy in response to a triggered service request; A target application determination module, configured to determine the target application based on the gray release policy and the request parameters in the service request; A forwarding module, configured to forward the service request to the target application.

8. A gray release device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the gray release method according to any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the gray release method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program. When the computer program is executed by a processor, it implements the steps of the gray release method according to any one of claims 1 to 6.