Application gray scale method and device, computer equipment, storage medium and program product
By acquiring and comparing the grayscale user ID in the object identification and target policy information set, and determining the response node ID based on the grayscale policy, the problem of low grayscale efficiency in traditional applications is solved and efficient application grayscale is achieved.
Patent Information
- Application Number
- CN202510176940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-06
AI Technical Summary
In traditional grayscale technology, users participating in grayscale are selected by specifying users, resulting in low efficiency in application grayscale.
By obtaining the object identification and target policy information set of login grayscale applications, the grayscale user identification set corresponding to the object identification and the target policy information set is compared. If it does not exist, the response node identification corresponding to the object identification is determined based on the grayscale policy in the target policy information set, and the service request of the object identification is responded through the node.
The determination efficiency of response node identification is improved, and the application grayscale is realized, which improves the efficiency of application grayscale.
Smart Images

Figure CN120104178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an application grayscale method, apparatus, computer equipment, storage medium and program product. Background Art
[0002] With the development of computer technology, new versions of applications need to be grayed out before they are officially released. That is, before a new version of an application is officially released, a part of users are allowed to experience the new version of the application to observe the stability, performance, and user feedback of the new version of the application. After ensuring that there are no problems with the new version of the application, the scope is gradually expanded, and finally the new version replaces the old version.
[0003] In the traditional technology, users who participate in the application grayscale are selected by specifying users, which leads to low efficiency of the application grayscale. Summary of the invention
[0004] Based on this, it is necessary to provide an application grayscale method, device, computer equipment, computer-readable storage medium and program product that can improve the application grayscale efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides an application grayscale method. The method comprises:
[0006] Obtain the object identifier for logging into the grayscale application and the target policy information set corresponding to the grayscale application;
[0007] Compare the object identifier with the grayscale user identifier set corresponding to the target policy information set;
[0008] In the case that the object identifier does not exist in the grayscale user identifier set, determining the response node identifier corresponding to the object identifier based on the grayscale policy in the target policy information set;
[0009] In the case where the response node identifier is a grayscale node identifier in the target policy information set, the service request of the object identifier is responded to based on the grayscale node corresponding to the grayscale node identifier.
[0010] In one embodiment, based on the grayscale policy in the target policy information set, determining the response node identifier corresponding to the object identifier includes:
[0011] Determining the priority order of the target policy information set based on the priority identifier in the target policy information set;
[0012] Obtain the current policy information set from the target policy information set in order of priority from front to back;
[0013] Based on the grayscale strategy and grayscale threshold in the current strategy information set, determine the total number of grayscales and the comparison threshold;
[0014] If the total number of gray levels is less than the comparison threshold, the gray node identifier in the current policy information set is determined as the response node identifier corresponding to the object identifier;
[0015] If the total number of grayscales is equal to the comparison threshold, the step of obtaining the current policy information set from the target policy information set is repeated in order of priority from front to back until there is no current policy information set, and the preset node identifier is determined as the response node identifier corresponding to the object identifier.
[0016] In one embodiment, based on the grayscale policy and grayscale threshold in the current policy information set, determining the total number of grayscales and the comparison threshold includes:
[0017] When the grayscale strategy is non-even release, the total number of grayscale user identifiers in the grayscale user identifier set corresponding to the current policy information set is determined as the total grayscale number, and the grayscale threshold in the current policy information is determined as the comparison threshold; when the grayscale strategy is even release, the average value of the grayscale threshold in the current policy information set is determined as the comparison threshold, and the cumulative number of grayscale user identifiers in the current time period is determined as the total grayscale number.
[0018] In one embodiment, obtaining the object identifier of the grayscale application and the target policy information set corresponding to the grayscale application includes:
[0019] Obtain the object ID for logging into the grayscale application, and compare the object ID with the set of registered user IDs of the grayscale application;
[0020] When the object identifier exists in the registered user identifier set, obtaining a candidate policy information set corresponding to the grayscale application;
[0021] If the policy effective time in the candidate policy information set is earlier than or equal to the current time, and the policy expiration time in the candidate policy information set is later than the current time, the candidate policy information set is determined as the target policy information set corresponding to the grayscale application.
[0022] In one embodiment, responding to a service request of an object identifier based on a grayscale node corresponding to the grayscale node identifier includes:
[0023] Obtaining a service request corresponding to the object identifier; the service request includes a grayscale node identifier;
[0024] Send the service request to the grayscale node corresponding to the grayscale node identifier;
[0025] Determine the request result corresponding to the service request through the grayscale application corresponding to the grayscale application in the grayscale node;
[0026] The request result is sent to the object identifier through the grayscale node.
[0027] In one embodiment, the method includes:
[0028] In the case that the object identifier exists in the grayscale user identifier set, the grayscale node identifier in the target policy information set is determined as the response node identifier corresponding to the object identifier.
[0029] In a second aspect, the present application also provides a grayscale application device. The device includes:
[0030] An acquisition module, used to obtain the object identifier of the grayscale application and the target policy information set corresponding to the grayscale application;
[0031] A comparison module, used for comparing the object identifier with the grayscale user identifier set corresponding to the target policy information set;
[0032] A determination module, used to determine a response node identifier corresponding to the object identifier based on the grayscale policy in the target policy information set when the object identifier does not exist in the grayscale user identifier set;
[0033] The grayscale module is used to respond to the service request of the object identifier based on the grayscale node corresponding to the grayscale node identifier when the response node identifier is the grayscale node identifier in the target policy information set.
[0034] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods in the first aspect when executing the computer program.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods in the first aspect when the computer program is executed by a processor.
[0036] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which implements the steps of any one of the methods in the first aspect when executed by a processor.
[0037] The above-mentioned grayscale application method, device, computer equipment, storage medium and computer program product obtain the object identifier of the grayscale application logged in, and the target policy information set corresponding to the grayscale application; compare the object identifier with the grayscale user identifier set corresponding to the target policy information set; when the object identifier does not exist in the grayscale user identifier set, determine the response node identifier corresponding to the object identifier based on the grayscale policy in the target policy information set; when the response node identifier is the grayscale node identifier in the target policy information set, respond to the service request of the object identifier based on the grayscale node corresponding to the grayscale node identifier. By comparing the object identifier with the grayscale user identifier set corresponding to the target policy information set, it is determined whether the object identifier is a grayscale user identifier. If the object identifier does not exist in the grayscale user identifier set, it means that the object identifier is not a grayscale user identifier, then the response node identifier corresponding to the object identifier is determined according to the grayscale policy in the target policy information set, thereby improving the determination efficiency of the response node identifier. If the response node identifier is the grayscale node identifier in the target policy information set, the grayscale node corresponding to the grayscale node identifier is used to respond to the service request corresponding to the object identifier, thereby realizing the application of grayscale and improving the efficiency of the application of grayscale. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A diagram of an application environment in which a grayscale method is applied in one embodiment;
[0039] Figure 2 A schematic diagram of a process for applying a grayscale method in one embodiment;
[0040] Figure 3 A schematic diagram of a setting interface for a candidate policy information set in one embodiment;
[0041] Figure 4 A schematic diagram of a grayscale strategy list in an embodiment;
[0042] Figure 5 A schematic diagram of a setting interface for a candidate policy information set in another embodiment;
[0043] Figure 6 A schematic diagram of a grayscale user management interface in an embodiment;
[0044] Figure 7 A schematic diagram of a flow chart of a step of determining a response node identifier in an embodiment;
[0045] Figure 8 A schematic diagram of an architecture of a grayscale system applied in another embodiment;
[0046] Fig. 9 A schematic diagram of a process for determining a response node identifier corresponding to an object identifier in an embodiment;
[0047] Fig.10 is a structural block diagram of a grayscale device used in one embodiment;
[0048] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] The grayscale application method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Both the terminal and the server can be used alone to execute the application grayscale method provided in the embodiment of the present application. The terminal and the server can also be used in collaboration to execute the application grayscale method provided in the embodiment of the present application. For example, the terminal 102 obtains the object identifier of the grayscale application logged in, and the target policy information set corresponding to the grayscale application; compares the object identifier with the grayscale user identifier set corresponding to the target policy information set; in the case where the object identifier does not exist in the grayscale user identifier set, based on the grayscale policy in the target policy information set, determine the response node identifier corresponding to the object identifier; in the case where the response node identifier is the grayscale node identifier in the target policy information set, based on the grayscale node corresponding to the grayscale node identifier, respond to the service request of the object identifier. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0051] In one embodiment, Figure 2 As shown, a grayscale application method is provided. This embodiment is described by taking the application of the method to a computer device as an example, and includes steps 202 to 208.
[0052] Step 202: Obtain the object identifier for logging into the grayscale application and a target policy information set corresponding to the grayscale application.
[0053] Among them, grayscale application refers to an application that is grayscaled, which can be understood as grayscale application of a new version of an application. Object identifier refers to the identifier of a user who logs into a grayscale application. The object identifier can be the login account of the user who logs into the grayscale application, the user's mobile phone number, or the user's ID number, etc. Policy information set refers to a set of information related to grayscale. The operator can set at least one policy information set according to actual needs. The policy information set includes but is not limited to grayscale policy, grayscale threshold, policy effective time, policy expiration time, priority identifier, grayscale node identifier and remarks, etc. Target policy information refers to a policy information set corresponding to the grayscale application and within the effective time range. The number of target policy information sets is at least one, for example, the number of target policy information sets is 1, or the number of target policy information sets is 2.
[0054] Exemplarily, the computer device responds to a trigger operation of a logged-in user logging into a grayscale application, obtains the object identifier of the logged-in user who logged into the grayscale application, and when it is determined that the object identifier is a registered user identifier, obtains a candidate policy information set corresponding to the grayscale application, and selects a target policy information set from the candidate policy information set. The candidate policy information set refers to all policy information sets corresponding to the grayscale application.
[0055] In one embodiment, a schematic diagram of the setting interface of the candidate policy information set is as follows: Figure 3 As shown, in response to the operator's selection operation of the grayscale policy in the setting interface, the computer device obtains the grayscale policy corresponding to the grayscale application; in response to the operator's setting operation of the number of grayscale users in the setting interface, the computer device obtains the grayscale threshold corresponding to the grayscale application; in response to the operator's setting operation of the policy effective time in the setting interface, the computer device obtains the policy effective time corresponding to the grayscale application; in response to the operator's setting operation of the policy expiration time in the setting interface, the computer device obtains the policy expiration time corresponding to the grayscale application; in response to the operator's setting operation of the sorting identifier in the setting interface, the computer device obtains the priority identifier corresponding to the grayscale application; in response to the operator's setting operation of the node identifier in the setting interface, the computer device obtains the grayscale node identifier corresponding to the grayscale application; in response to the operator's confirmation control triggering operation in the setting interface, the computer device generates a candidate policy information set corresponding to the grayscale application based on the grayscale policy, grayscale threshold, policy effective time, policy expiration time, priority identifier and grayscale node identifier corresponding to the grayscale application. For example, a schematic diagram of the grayscale policy list is shown as follows: Figure 4 As shown, the grayscale strategy list includes three candidate strategy information sets, that is, each row of information constitutes a candidate strategy information set.
[0056] Step 204: compare the object identifier with the grayscale user identifier set corresponding to the target policy information set.
[0057] The grayscale user identification set refers to a set of grayscale user identifications, and the grayscale user identification set corresponds to the target policy information set, that is, one target policy information set corresponds to one grayscale user identification set. The total number of grayscale user identifications in the grayscale user identification set is less than or equal to the grayscale threshold in the target policy information set.
[0058] Exemplarily, the computer device obtains a grayscale user identification set corresponding to the target policy information set, and compares the object identification with the grayscale user identification in the grayscale user identification set.
[0059] Step 206: When the object identifier does not exist in the grayscale user identifier set, a response node identifier corresponding to the object identifier is determined based on the grayscale policy in the target policy information set.
[0060] Among them, the grayscale strategy refers to the strategy for grayscale applications. The grayscale strategy can be set according to actual needs. For example, the setting interface diagram of the candidate strategy information set is as follows: Figure 5 As shown, there are four grayscale strategies, namely continuous release, designated user release, random release of daily active users and average release.
[0061] Continuous volume expansion refers to the continuous application of grayscale, which only limits the total number of users participating in the application grayscale, and does not limit the number of users participating in the application grayscale in each time period. That is, it takes effect after a preset time after the candidate strategy information set corresponding to the continuous volume expansion is added. For example, if a user logs in to the grayscale application 3 minutes after the candidate strategy information set corresponding to the continuous volume expansion is added, steps 202 to 208 are executed.
[0062] Average release refers to a strategy that limits the number of users who can participate in the grayscale application in each time period. It limits both the total number of users who can participate in the grayscale application and the number of users who can participate in the grayscale application in each time period. It can be understood as a specified number of users in the grayscale application in each time period. For example, if one hour is a time period, a specified number of users can be grayscaled every hour. The time period can be set according to actual needs and is not limited here.
[0063] Designated user volume release refers to the strategy of selecting fixed users to participate in the application grayscale. The designated user volume release can be manually added by the operator to add the grayscale user ID. For example, the grayscale user management interface diagram is as follows: Figure 6 As shown, by entering the query conditions, you can select the grayscale user ID. When the selected grayscale user ID is equal to the grayscale threshold, click the batch add control to generate a grayscale user ID set.
[0064] Randomly extracting daily active users to release volume refers to the strategy of pre-selecting users with high activity to participate in the application grayscale. The response node identifier refers to the identifier that represents the response node. The response node refers to the server that responds to the service request of the object identifier. The response node can be a grayscale node of a grayscale application with grayscale applications, or a node of a formal application with grayscale applications. The response node can be an IDC (Internet Data Center) or kubernetes (cloud native), etc.
[0065] Exemplarily, if there is no grayscale user identifier identical to the object identifier in the grayscale user identifier set, the computer device determines the response node identifier corresponding to the object identifier according to the grayscale policy in the target policy information set.
[0066] In one embodiment, when there is only one target policy information set, the response node identifier corresponding to the object identifier is determined based on the grayscale policy in the target policy information set, including: when the grayscale policy is a first-class policy, the response node identifier corresponding to the object identifier is determined to be a preset node identifier; the first-class policy is a grayscale policy in which a grayscale user identifier set has been determined before grayscale is performed, and the total number of grayscale user identifiers in the grayscale user identifier set is equal to the grayscale threshold in the target policy information.
[0067] In one embodiment, when there is only one target policy information set, the response node identifier corresponding to the object identifier is determined based on the grayscale policy in the target policy information set, including: when the grayscale policy is a second-category policy, the response node identifier corresponding to the object identifier is determined based on the grayscale policy and grayscale threshold in the target policy information set; the second-category policy is a grayscale policy that determines a grayscale user identifier set during the grayscale process.
[0068] In one embodiment, when the grayscale strategy is a second-category strategy, the response node identifier corresponding to the object identifier is determined based on the grayscale strategy and grayscale threshold in the target policy information set, including: if the grayscale strategy is continuous release, the grayscale threshold in the target policy information set is compared with the total number of grayscale user identifiers in the grayscale user identifier set corresponding to the policy information set; if the total number is less than the grayscale threshold, the grayscale node identifier in the target policy information set is determined as the response node identifier corresponding to the object identifier; if the total number is equal to the grayscale threshold, the preset node identifier is determined as the response node identifier corresponding to the object identifier.
[0069] In one embodiment, when the grayscale strategy is a second-category strategy, the response node identifier corresponding to the object identifier is determined based on the grayscale strategy and grayscale threshold in the target policy information set, including: if the grayscale strategy is average release, the average value of the grayscale threshold in the target policy information set is compared with the cumulative number of grayscale user identifiers in the current time period; if the cumulative number is less than the average value, the grayscale node identifier in the target policy information set is determined as the response node identifier corresponding to the object identifier; if the cumulative number is equal to the average value, the preset node identifier is determined as the response node identifier corresponding to the object identifier.
[0070] Step 208, when the response node identifier is a gray node identifier in the target policy information set, respond to the service request of the object identifier based on the gray node corresponding to the gray node identifier.
[0071] Among them, the grayscale node identifier refers to the identifier that represents the grayscale node. The grayscale node refers to the server of the grayscale application program with the grayscale application. It can be understood that the grayscale node has an updated version of the grayscale application, and the updated version of the application is the grayscale application. The grayscale node can be an IDC or kubernetes, etc. The service request refers to the request sent by the client to the service of the grayscale application. The service request contains the response object identifier. For example, the request header in the service request includes the response object identifier.
[0072] Exemplarily, when the responding node identifier is a grayscale node identifier in the target policy information set, the computer device sends a service request of the object identifier to the grayscale node, and the grayscale node responds to the service request of the object identifier and sends the request result to the computer device.
[0073] In one embodiment, when the response node identifier is a grayscale node identifier in a target policy information set, the computer device sends a service request for the object identifier to the load balancer, and the load balancer sends the service request to the grayscale node corresponding to the response node identifier based on the response node identifier in the service request. The grayscale node responds to the service request of the object identifier, generates a response result for the service request, and sends the request result to the computer device.
[0074] In the above-mentioned grayscale application method, by comparing the object identifier with the grayscale user identifier set corresponding to the target policy information set, it is determined whether the object identifier is a grayscale user identifier. If the object identifier does not exist in the grayscale user identifier set, it means that the object identifier is not a grayscale user identifier. Then, the response node identifier corresponding to the object identifier is determined according to the grayscale policy in the target policy information set, thereby improving the efficiency of determining the response node identifier. If the response node identifier is a grayscale node identifier in the target policy information set, the grayscale node corresponding to the grayscale node identifier is used to respond to the service request corresponding to the object identifier, thereby realizing the application of grayscale and improving the efficiency of applying grayscale.
[0075] In one embodiment, Figure 7 As shown, based on the grayscale strategy in the target strategy information set, determining the response node identifier corresponding to the object identifier includes:
[0076] Step 702: Determine the priority order of the target policy information set based on the priority identifier in the target policy information set.
[0077] Among them, the priority identifier refers to the identifier that represents the priority of the grayscale method corresponding to the target policy information set. It can be understood that each target policy information set corresponds to a grayscale method, and the priority identifier represents the priority order of the grayscale methods corresponding to the target policy information set. The priority identifier can be set according to actual needs. For example, the priority identifier is 10, 20, and 30, etc. The smaller the priority identifier, the higher the priority. The priority order refers to the order of priorities.
[0078] Exemplarily, the computer device determines the priority order of the target policy information set according to the priority identifier in the target policy information set. For example, when there is only one target policy information set, the priority order of the target policy information set is determined to be the first, or, if there are a third target policy information set A, B and C, and the priority identifiers corresponding to A, B and C are 10, 30 and 20 respectively, then the priority order of A is the first, the priority order of B is the third, and the priority order of C is the second.
[0079] In one embodiment, when there are multiple target policy information sets and the priority identifiers in at least two target policy information sets are the same, the priority order of the target policy information sets is determined based on the priority order in the target policy information sets and the policy effective time in the target policy information sets or the generation time of the target policy information sets.
[0080] Step 704: Obtain the current policy information set from the target policy information set in order of priority from front to back.
[0081] Exemplarily, the computer device obtains the current policy information set from the target policy information set in order of priority from front to back.
[0082] Step 706: Determine the total number of grayscales and the comparison threshold based on the grayscale strategy and grayscale threshold in the current strategy information set.
[0083] Among them, the grayscale threshold refers to the maximum number of users who apply grayscale. The total number of grayscales refers to the total number of users who participate in applying grayscale. The total number of grayscales can be the total number of users who participate in applying grayscale from the policy effective time to the current moment, that is, the total number of grayscale user identifiers in the grayscale user identifier set; the total number of grayscales can also be the total number of users who participate in applying grayscale in the current time period. The comparison threshold refers to the threshold used for comparison with the total number of grayscales. When the total number of grayscales is the total number of users who participate in applying grayscale from the policy effective time to the current moment, the comparison threshold is the grayscale threshold in the current policy information set; when the total number of grayscales can also be the total number of users who participate in applying grayscale in the current time period, the comparison threshold is the average value determined based on the grayscale threshold in the current policy information set.
[0084] Exemplarily, the computer device determines the total number of grayscales and the comparison threshold based on the grayscale policy and grayscale threshold in the current policy information set.
[0085] Step 708: If the total number of gray levels is less than the comparison threshold, the gray node identifier in the current policy information set is determined as the response node identifier corresponding to the object identifier.
[0086] Exemplarily, the computer device compares the total number of grayscales with a comparison threshold, and if the total number of grayscales is less than the comparison threshold, the grayscale node identifier in the current policy information set is determined as the response node identifier corresponding to the object identifier.
[0087] Step 710, if the total number of grayscales is equal to the comparison threshold, then repeat the step of obtaining the current policy information set from the target policy information set in order of priority from front to back until there is no current policy information set, and determine the preset node identifier as the response node identifier corresponding to the object identifier.
[0088] The preset response node identifier is a preset response node identifier, and the node corresponding to the preset response node identifier has a formal application program of grayscale application.
[0089] Exemplarily, if the total number of gray levels is equal to the comparison threshold, steps 504 to 510 are repeatedly executed until there is no current policy information set, and the preset node identifier is determined as the response node identifier corresponding to the object identifier.
[0090] In this embodiment, the current policy information set is obtained from the target policy information set in order of priority from front to back, and the total number of grayscales and the comparison threshold are determined based on the grayscale policy and grayscale threshold in the current policy information set. If the total number of grayscales is less than the comparison threshold, it means that the user is still required to participate in applying the grayscale in the grayscale manner corresponding to the current policy information set, and the grayscale node identifier in the current policy information set is determined as the response node identifier corresponding to the object identifier; if the total number of grayscales is equal to the comparison threshold, it means that the user is not required to participate in applying the grayscale in the grayscale manner corresponding to the current policy information set. In this case, the response node identifier corresponding to the object identifier is not determined, and the above steps are repeated until the current policy information set does not exist, indicating that the user is not required to participate in applying the grayscale, and the preset node identifier is determined as the response node identifier corresponding to the object identifier, thereby improving the efficiency of determining the response node identifier.
[0091] In one embodiment, based on the grayscale policy and grayscale threshold in the current policy information set, determining the total number of grayscales and the comparison threshold includes:
[0092] When the grayscale strategy is non-even release, the total number of grayscale user identifiers in the grayscale user identifier set corresponding to the current policy information set is determined as the total grayscale number, and the grayscale threshold in the current policy information is determined as the comparison threshold; when the grayscale strategy is even release, the average value of the grayscale threshold in the current policy information set is determined as the comparison threshold, and the cumulative number of grayscale user identifiers in the current time period is determined as the total grayscale number.
[0093] Among them, non-average release refers to other grayscale strategies except average release. Non-average release can be one of continuous release, release for designated users, or release for randomly selected daily active users. Average value refers to the average value of the grayscale threshold in the current policy information. The current time period refers to the time period for the current application of grayscale. The time period refers to a period of time for the application of grayscale. The time between the policy effective time and the policy expiration time can be divided into multiple time periods. For example, 8:00 to 20:00 every day can be determined as a time period, or each day between the policy effective time and the policy expiration time can be divided into multiple time periods. For example, a day can be divided into 4 time periods, namely, 8:00 to 10:00, 12:00 to 14:00, 16:00 to 18:00, and 20:00 to 22:00.
[0094] Exemplarily, when the grayscale strategy is one of continuous release, designated user release, or random daily active user release, the computer device determines the total number of grayscale user identifiers in the grayscale user identifier set corresponding to the current policy information set as the total number of grayscales, and determines the grayscale threshold in the current policy information as the comparison threshold; when the grayscale strategy is average release, the total number of time periods is obtained, the grayscale threshold in the current policy information set is divided by the total number of time periods to obtain the comparison threshold, the cumulative number of grayscale user identifiers in the current time period is obtained, and the cumulative number of grayscale user identifiers in the current time period is determined as the total number of grayscales. The total number of time periods refers to the total number of time periods for applying grayscale between the policy effective time and the policy expiration time.
[0095] In this embodiment, the total grayscale number and the comparison threshold are determined according to the grayscale strategy in the current policy information set, that is, different grayscale strategies use different methods to determine the total grayscale number and the comparison threshold, thereby improving the accuracy of the total grayscale number and the comparison threshold, and providing accurate basic data for the subsequent determination of the response node identifier corresponding to the object identifier.
[0096] In one embodiment, obtaining the object identifier of the grayscale application and the target policy information set corresponding to the grayscale application includes:
[0097] Obtain the object identifier of the logged-in grayscale application, and compare the object identifier with the set of registered user identifiers of the grayscale application; if the object identifier exists in the set of registered user identifiers, obtain the candidate policy information set corresponding to the grayscale application; if the policy effective time in the candidate policy information set is earlier than or equal to the current time, and the policy expiration time in the candidate policy information set is later than the current time, then determine the candidate policy information set as the target policy information set corresponding to the grayscale application.
[0098] The registered user ID set refers to a set of registered user IDs of the grayscale application. The current time refers to the current time, and the current time can be the time when the user corresponding to the object ID logs into the grayscale application.
[0099] Exemplarily, a computer device obtains an object identifier of a logged-in grayscale application and a set of registered user identifiers of the grayscale application, compares the object identifier with a registered user identifier in the set of registered user identifiers of the grayscale application, and if there is a registered user identifier in the set of registered user identifiers that is identical to the object identifier, obtains a candidate policy information set corresponding to the grayscale application; for each candidate policy information set, compares the current time with the policy effective time and the policy expiration time in the candidate policy information set; if the policy effective time is earlier than or equal to the current time, and the policy expiration time in the candidate policy information set is later than the current time, the candidate policy information set is determined as the target policy information set corresponding to the grayscale application.
[0100] In one embodiment, if the registered user identifier that is identical to the object identifier does not exist in the registered user identifier set, the preset node identifier is determined as the response node identifier corresponding to the object identifier. That is, if the registered user identifier that is identical to the object identifier does not exist in the registered user identifier set, it means that the user corresponding to the object identifier is not a registered user of the grayscale application, and the preset node identifier of the node with the formal application program of the grayscale application is determined as the response node identifier corresponding to the object identifier, thereby improving the stability of the response to the service request corresponding to the object identifier.
[0101] In this embodiment, by comparing the object identifier with the set of registered user identifiers of the grayscale application, if there is a registered user identifier that is the same as the object identifier in the set of registered user identifiers, it means that the user corresponding to the object identifier is a registered user of the grayscale application. The user corresponding to the object identifier can then be determined as a candidate user participating in the grayscale application, and the candidate policy information set within the effective time range is determined as the target policy information, providing accurate basic data for the subsequent determination of the response node identifier of the object identifier.
[0102] In one embodiment, responding to a service request of an object identifier based on a grayscale node corresponding to the grayscale node identifier includes:
[0103] Obtain a service request corresponding to the object identifier; include a grayscale node identifier in the service request; send the service request to a grayscale node corresponding to the grayscale node identifier; determine a request result corresponding to the service request through a grayscale application corresponding to a grayscale application in the grayscale node; send the request result to the object identifier through the grayscale node.
[0104] The grayscale application refers to a new version of the grayscale application, which can be understood as an application that needs to be grayscaled. The request result refers to the result of the service request.
[0105] Exemplarily, after determining the response node identifier corresponding to the object identifier, and the response node identifier is the grayscale node identifier in the target policy information set, the computer device obtains the service request corresponding to the object identifier, and based on the grayscale node identifier included in the service request, sends the service request to the grayscale node corresponding to the grayscale node identifier, determines the request result corresponding to the service request through the grayscale application corresponding to the grayscale application in the grayscale node, and sends the request result to the object identifier through the grayscale node.
[0106] In one embodiment, after determining the response node identifier corresponding to the object identifier and the response node identifier is the grayscale node identifier in the target policy information set, the grayscale application of the computer device sends the service request corresponding to the object identifier to the load balancer. The load balancer sends the service request to the grayscale node corresponding to the response node identifier based on the grayscale node identifier in the service request. The grayscale node responds to the service request of the object identifier, generates a response result for the service request, and sends the request result to the computer device.
[0107] In this embodiment, when the response node identifier is a grayscale node identifier in the target policy information set, the service request is sent to the grayscale node corresponding to the grayscale node identifier, the request result corresponding to the service request is determined through the grayscale application corresponding to the grayscale application in the grayscale node, and the request result is sent to the object identifier through the grayscale node, thereby realizing application grayscale.
[0108] In one embodiment, applying the grayscale method further comprises:
[0109] In the case that the object identifier exists in the grayscale user identifier set, the grayscale node identifier in the target policy information set is determined as the response node identifier corresponding to the object identifier.
[0110] Exemplarily, after the computer device executes step 204, if there is a grayscale user identifier identical to the object identifier in the grayscale user identifier set, the computer device determines the grayscale node identifier in the target policy information set as the response node identifier corresponding to the object identifier.
[0111] In this embodiment, if there is a grayscale user identifier that is identical to the object identifier in the grayscale user identifier set, it means that the user corresponding to the user identifier is already a user participating in the grayscale application, then the grayscale node identifier in the target policy information set is determined as the response node identifier corresponding to the object identifier, thereby avoiding the subsequent process of determining the response node identifier corresponding to the object identifier, thereby improving the efficiency of determining the response node identifier.
[0112] In an exemplary embodiment, the architecture diagram of the grayscale system is as follows: Figure 8As shown, it includes a client, a load balancer cluster and a server cluster, where the client represents the user and is the tool used by the user to access the grayscale application; the load balancer cluster is a CLB (Cloud Load Balancer) provided by a cloud vendor or a self-built nginx (a high-performance web server) cluster; the server cluster can be a k8s (Kubernetes, container orchestration system) cluster, a k8s cluster includes multiple IDCs, multiple IDCs with grayscale application applications, some IDCs with formal applications of grayscale applications, at least one IDC with grayscale application, and an IDC with a grayscale application of a grayscale application is a grayscale IDC.
[0113] Before applying grayscale, you need to configure the load balancer cluster so that the load balancer cluster has the ability to read the response node identifier from the service request and send the service request to the response node corresponding to the response node identifier.
[0114] Computer, object identification corresponding to the response node identification determination process diagram as shown in Fig. 9 As shown, it includes: obtaining a set of registered user identifiers of the grayscale application, comparing the object identifier with the registered user identifiers in the registered user identifier set of the grayscale application, and if there is no registered user identifier identical to the object identifier in the registered user identifier set, determining the preset node identifier as the response node identifier corresponding to the object identifier.
[0115] If there is a registered user identifier that is the same as the object identifier in the registered user identifier set, then the candidate policy information set corresponding to the grayscale application is obtained, and the candidate policy information set corresponding to the grayscale application is placed in the cache; for each candidate policy information set, the current time is compared with the policy effective time and the policy expiration time in the candidate policy information set. If the policy effective time is earlier than or equal to the current time, and the policy expiration time in the candidate policy information set is later than the current time, then the candidate policy information set is determined as the target policy information set corresponding to the grayscale application.
[0116] In the case that there is no target policy information set, the preset node identifier is determined as the response node identifier corresponding to the object identifier.
[0117] When there is a target policy information set, obtain the grayscale user identification set corresponding to the target policy information set, and put the grayscale user identification set into the cache; compare the object identifier with the grayscale user identification in the grayscale user identification set, and if there is a grayscale user identification in the grayscale user identification set that is the same as the object identifier, then determine the grayscale node identifier in the target policy information set as the response node identifier corresponding to the object identifier.
[0118] If there is no grayscale user identifier identical to the object identifier in the grayscale user identifier set, determine the priority order of the target policy information set according to the priority identifier in the target policy information set, and obtain the current policy information set from the target policy information set in order from front to back in priority order. When the grayscale policy in the current policy information set is one of continuous release, designated user release, or random release of daily active users, the total number of grayscale user identifiers in the grayscale user identifier set corresponding to the current policy information set is determined as the total number of grayscales, and the grayscale threshold in the current policy information is determined as the comparison threshold. When the grayscale policy is average release, obtain the total number of time periods, divide the grayscale threshold in the current policy information set by the total number of time periods to obtain the comparison threshold, obtain the cumulative number of grayscale user identifiers in the current time period, and determine the cumulative number of grayscale user identifiers in the current time period as the total number of grayscales. Compare the total number of grayscales with the comparison threshold. If the total number of grayscales is less than the comparison threshold, the grayscale node identifier in the current policy information set is determined as the response node identifier corresponding to the object identifier; if the total number of grayscales is equal to the comparison threshold, repeat the above steps until the current policy information set does not exist, and the preset node identifier is determined as the response node identifier corresponding to the object identifier.
[0119] After determining the response node identifier corresponding to the object identifier, and the response node identifier is the grayscale node identifier in the target policy information set, the grayscale application of the computer device sends the service request corresponding to the object identifier to the load balancer. The load balancer sends the service request to the grayscale node corresponding to the response node identifier based on the grayscale node identifier in the service request. The grayscale node responds to the service request of the object identifier, generates a response result of the service request, and sends the request result to the computer device.
[0120] In the above-mentioned grayscale application method, by comparing the object identifier with the grayscale user identifier set corresponding to the target policy information set, it is determined whether the object identifier is a grayscale user identifier. If the object identifier does not exist in the grayscale user identifier set, it means that the object identifier is not a grayscale user identifier. Then, the response node identifier corresponding to the object identifier is determined according to the grayscale policy in the target policy information set, thereby improving the efficiency of determining the response node identifier. If the response node identifier is a grayscale node identifier in the target policy information set, the grayscale node corresponding to the grayscale node identifier is used to respond to the service request corresponding to the object identifier, thereby realizing the application of grayscale and improving the efficiency of applying grayscale.
[0121] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0122] Based on the same inventive concept, the embodiment of the present application also provides an application grayscale device for implementing the above-mentioned application grayscale method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more application grayscale device embodiments provided below can refer to the above-mentioned limitations on the application grayscale method, and will not be repeated here.
[0123] In one embodiment, Fig.10 As shown, a grayscale application device is provided, including: an acquisition module 1002, a comparison module 1004, a determination module 1006 and a grayscale module 1008, wherein:
[0124] The acquisition module 1002 is used to acquire the object identifier for logging into the grayscale application and the target policy information set corresponding to the grayscale application;
[0125] Comparison module 1004, used for comparing the object identifier with the grayscale user identifier set corresponding to the target policy information set;
[0126] A determination module 1006, configured to determine a response node identifier corresponding to the object identifier based on the grayscale policy in the target policy information set when the object identifier does not exist in the grayscale user identifier set;
[0127] The grayscale module 1008 is used to respond to the service request of the object identifier based on the grayscale node corresponding to the grayscale node identifier when the response node identifier is the grayscale node identifier in the target policy information set.
[0128] In one embodiment, the determination module 1006 is also used to: determine the priority order of the target policy information set based on the priority identifier in the target policy information set; obtain the current policy information set from the target policy information set in order from front to back in the priority order; determine the total number of grayscales and the comparison threshold based on the grayscale policy and grayscale threshold in the current policy information set; if the total number of grayscales is less than the comparison threshold, determine the grayscale node identifier in the current policy information set as the response node identifier corresponding to the object identifier; if the total number of grayscales is equal to the comparison threshold, repeat the step of obtaining the current policy information set from the target policy information set in order from front to back in the priority order until there is no current policy information set, and determine the preset node identifier as the response node identifier corresponding to the object identifier.
[0129] In one embodiment, the determination module 1006 is also used for: when the grayscale strategy is non-even release, the total number of grayscale user identifiers in the grayscale user identifier set corresponding to the current policy information set is determined as the total grayscale number, and the grayscale threshold in the current policy information is determined as the comparison threshold; when the grayscale strategy is even release, the average value of the grayscale thresholds in the current policy information set is determined as the comparison threshold, and the cumulative number of grayscale user identifiers in the current time period is determined as the total grayscale number.
[0130] In one embodiment, the acquisition module 1002 is also used to: obtain the object identifier of the logged-in grayscale application, and compare the object identifier with the registered user identifier set of the grayscale application; when the object identifier exists in the registered user identifier set, obtain the candidate policy information set corresponding to the grayscale application; if the policy effective time in the candidate policy information set is earlier than or equal to the current time, and the policy expiration time in the candidate policy information set is later than the current time, then the candidate policy information set is determined as the target policy information set corresponding to the grayscale application.
[0131] In one embodiment, the grayscale module 1002 is also used to: obtain a service request corresponding to an object identifier; the service request includes a grayscale node identifier; send the service request to a grayscale node corresponding to the grayscale node identifier; determine a request result corresponding to the service request through a grayscale application corresponding to the grayscale application in the grayscale node; and send the request result to the object identifier through the grayscale node.
[0132] In one embodiment, the determination module 1006 is further configured to: when there is an object identifier in the grayscale user identifier set, determine the grayscale node identifier in the target policy information set as the response node identifier corresponding to the object identifier.
[0133] Each module in the above-mentioned grayscale application device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0134] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a grayscale application method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0135] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0138] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0140] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0141] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0142] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An application grayscale method, characterized in that: The method comprises: Obtaining an object identifier for logging into a grayscale application and a target policy information set corresponding to the grayscale application; Comparing the object identifier with a grayscale user identifier set corresponding to the target policy information set; In the case that the object identifier does not exist in the grayscale user identifier set, determining a response node identifier corresponding to the object identifier based on the grayscale policy in the target policy information set; In the case where the response node identifier is a gray node identifier in the target policy information set, a service request of the object identifier is responded to based on the gray node corresponding to the gray node identifier.
2. The method according to claim 1, characterized in that The determining, based on the grayscale policy in the target policy information set, a response node identifier corresponding to the object identifier, includes: Determining the priority order of the target policy information set based on the priority identifier in the target policy information set; Acquire the current policy information set from the target policy information set in the order of the priority from front to back; Determine the total number of grayscales and the comparison threshold based on the grayscale strategy and grayscale threshold in the current strategy information set; If the total number of gray levels is less than the comparison threshold, determining the gray node identifier in the current policy information set as the response node identifier corresponding to the object identifier; If the total number of grayscales is equal to the comparison threshold, the step of obtaining the current policy information set from the target policy information set in the order from front to back according to the priority order is repeated until there is no current policy information set, and the preset node identifier is determined as the response node identifier corresponding to the object identifier.
3. The method according to claim 2, characterized in that The determining the total number of grayscales and the comparison threshold based on the grayscale strategy and grayscale threshold in the current strategy information set includes: In the case where the grayscale strategy is non-average volume expansion, the total number of grayscale user identifiers in the grayscale user identifier set corresponding to the current strategy information set is determined as the total number of grayscales, and the grayscale threshold in the current strategy information is determined as the comparison threshold; When the grayscale strategy is average volume expansion, the average value of the grayscale thresholds in the current strategy information set is determined as the comparison threshold, and the cumulative number of grayscale user identifiers in the current time period is determined as the total number of grayscales.
4. The method according to claim 1, characterized in that: The step of obtaining the object identifier for logging into the grayscale application and the target policy information set corresponding to the grayscale application includes: Obtain an object identifier for logging into the grayscale application, and compare the object identifier with a set of registered user identifiers of the grayscale application; In the case where the object identifier exists in the registered user identifier set, obtaining a candidate policy information set corresponding to the grayscale application; If the policy effective time in the candidate policy information set is earlier than or equal to the current time, and the policy expiration time in the candidate policy information set is later than the current time, the candidate policy information set is determined as the target policy information set corresponding to the grayscale application.
5. The method according to claim 1, characterized in that The grayscale node corresponding to the grayscale node identifier responds to the service request of the object identifier, including: Obtaining a service request corresponding to the object identifier; the service request includes a grayscale node identifier; Sending the service request to the gray node corresponding to the gray node identifier; Determining a request result corresponding to the service request through a grayscale application program corresponding to the grayscale application in the grayscale node; The request result is sent to the object identifier through the grayscale node.
6. The method according to claim 1, characterized in that The method further comprises: In the case that the object identifier exists in the grayscale user identifier set, the grayscale node identifier in the target policy information set is determined as the response node identifier corresponding to the object identifier.
7. A grayscale application device, characterized in that: The device comprises: An acquisition module, used to acquire an object identifier for logging into a grayscale application and a target policy information set corresponding to the grayscale application; A comparison module, used for comparing the object identifier with a grayscale user identifier set corresponding to the target policy information set; A determination module, configured to determine, when the object identifier does not exist in the grayscale user identifier set, a response node identifier corresponding to the object identifier based on the grayscale policy in the target policy information set; The grayscale module is used to respond to the service request of the object identifier based on the grayscale node corresponding to the grayscale node identifier when the response node identifier is the grayscale node identifier in the target policy information set.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.