Grayscale release method, system, device, storage medium and program product
By obtaining canary release demand information and traffic characteristic information from the microservice system, and selecting and routing canary users, the problem of inaccurate canary traffic control is solved, and the user experience is improved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2026-03-05
AI Technical Summary
During the canary release process of a microservice system, existing technologies struggle to accurately control the percentage of canary traffic and the routing of fixed canary traffic, leading to uneven load on canary service nodes and a reduced user experience.
By acquiring the application system's canary release requirements, collecting the traffic characteristics of candidate users, and selecting canary users from the candidate users based on specified user attributes and canary traffic ratios, canary releases are achieved by routing their service requests to canary service nodes.
It enables more accurate control of the percentage of gray-scale traffic during canary releases, fixes the routing of gray-scale traffic, and improves the user experience.
Smart Images

Figure CN2025103279_05032026_PF_FP_ABST
Abstract
Description
Gray-scale release methods, systems, devices, storage media, and program products
[0001] This disclosure claims priority to Chinese Patent Application No. 202411214990.9, filed with the China Patent Office on August 30, 2024, entitled “Grayscale Publishing Method, System, Device, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of cloud computing technology, and in particular to a canary release method, system, device, storage medium, and program product. Background Technology
[0003] Microservices are a software architecture pattern that divides a complex application into a set of small, self-managed services. These services can be deployed independently and are loosely coupled. In practice, microservice systems can be upgraded to provide better service performance and security.
[0004] When upgrading microservices, canary releases can be used to minimize the impact on the entire microservice system. A canary release is a software deployment method that uses a gradual, incremental approach to test a new version (or gray version) in a production environment. Once tested and approved, it is released as the official version.
[0005] In order to minimize the impact of a canary release, the number of canary service nodes (i.e., service nodes running canary versions) is usually controlled, for example, not exceeding 20% of the number of official service nodes. Then, user traffic is divided into canary traffic and official traffic, with canary traffic routed to canary service nodes and official traffic routed to official service nodes.
[0006] However, in a real production environment, if traffic is differentiated according to region or user identifier, it may be difficult to strictly control the size of gray-scale traffic, resulting in gray-scale service nodes being overloaded or underloaded. If a certain number of service requests are routed to gray-scale service nodes as gray-scale traffic according to a fixed percentage of gray-scale traffic, the routing of traffic for the same user will be inconsistent, reducing the user experience. Summary of the Invention
[0007] This disclosure provides a method, system, device, storage medium, and program product for canary deployment, which can accurately control the percentage of canary traffic during canary deployment, while fixing the routing of canary traffic to improve user experience.
[0008] This disclosure provides a canary deployment method, comprising: obtaining canary deployment requirement information of an application system, the canary deployment requirement information including specified user attributes and canary traffic ratio; obtaining traffic characteristic information of multiple candidate users from non-canary service nodes in the application system, the candidate users being users with the specified user attributes; selecting canary users from the multiple candidate users according to the traffic characteristic information of the multiple candidate users and the canary traffic ratio; and routing the service requests of the canary users to the canary service nodes in the application system to perform canary deployment of the application system.
[0009] This disclosure also provides a control device, including: a storage unit and a processing unit, wherein the storage unit is used to store a computer program, and the processing unit is coupled to the storage unit and is used to execute the computer program for: implementing the steps in the grayscale release method.
[0010] This disclosure also provides a canary release system, including: a non-canary service node, a canary service node, and the control device.
[0011] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the grayscale release method.
[0012] This disclosure also provides a computer program product, including a computer program / instruction, which, when executed by a processor, performs the steps in the grayscale release method.
[0013] In this embodiment, the canary release requirement information of the application system can be obtained. This canary release requirement information includes specified user attributes and canary traffic ratios. Traffic characteristic information of multiple candidate users (users with specified user attributes) is collected from non-canary service nodes in the application system. Canary users are selected from the multiple candidate users based on their traffic characteristic information and canary traffic ratios. Service requests from canary users are routed to the canary service nodes in the application system to perform canary releases. This method allows for more accurate control of the percentage of canary traffic during canary releases, while also fixing the routing of canary traffic, thus improving user experience. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0015] Figures 1a and 1b are schematic diagrams of the architecture of a grayscale release system provided in an exemplary embodiment of this disclosure;
[0016] Figure 2 is a flowchart illustrating a grayscale release method provided in an exemplary embodiment of this disclosure;
[0017] Figure 3a is a schematic flowchart of a grayscale user selection process provided in an exemplary embodiment of this disclosure;
[0018] Figure 3b is a schematic diagram of the process for reselecting grayscale users provided in an exemplary embodiment of this disclosure;
[0019] Figure 4 is a schematic diagram of the structure of a grayscale publishing device provided in an exemplary embodiment of this disclosure;
[0020] Figure 5 is a schematic diagram of the structure of a control device provided in an exemplary embodiment of this disclosure. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0022] It should be noted that, in the cases involving user information in the embodiments of this disclosure, 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 the embodiments of this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this disclosure (including but not limited to language models or large models) comply with relevant laws and standards.
[0023] When conducting canary releases, the number of canary service nodes is typically controlled, and user traffic is distinguished into canary traffic and official traffic. Canary traffic is routed to canary service nodes, and official traffic is routed to official service nodes. If traffic is distinguished according to region or user identifier, it may be difficult to strictly control the size of canary traffic, resulting in canary service nodes being overloaded or underloaded. If a fixed percentage of service requests are routed as canary traffic to canary service nodes, the routing of traffic from the same user will be inconsistent, reducing the user experience.
[0024] To address the aforementioned technical problems, this disclosure provides a solution that allows specifying user attributes and gray-scale traffic ratios to collect traffic characteristic information for users with specified user attributes. Then, based on the preset gray-scale traffic ratio and traffic characteristic information, gray-scale users are selected from the users with the specified user attributes, and their service requests are routed to gray-scale service nodes in the application system. On one hand, since the selection process for gray-scale users is constrained by a preset gray-scale traffic ratio, the selected gray-scale users meet this ratio, thus allowing for more accurate control of the percentage of gray-scale traffic. On the other hand, traffic characteristic information can be collected at the user level, and traffic with the same user attribute can be routed to fixed service nodes, such as gray-scale service nodes or non-gray-scale service nodes, thereby fixing the routing of gray-scale traffic and improving user experience.
[0025] Figures 1a and 1b are schematic diagrams of the architecture of a canary release system provided in an exemplary embodiment of this disclosure. The canary release system includes an application system and a management and control device 11. The canary release process refers to the process of releasing a new version of a service process or thread in the application system. The canary release process can be executed by the management and control device 11, which can be any terminal device such as a mobile phone, tablet computer, or computer, or any type of server. This embodiment does not impose any restrictions.
[0026] As shown in Figure 1a, the application system 12 can communicate with the management and control device 11 and may include gray-scale service nodes and non-gray-scale service nodes. Gray-scale service nodes refer to service nodes in the application system 12 responsible for running gray-scale versions of service programs or processes; non-gray-scale service nodes refer to service nodes in the application system 12 responsible for running official versions of service programs or processes. Non-gray-scale service nodes can also be called official service nodes. Compared to the official version, the gray-scale version of the service program differs in terms of functionality, performance, or security, such as increased, upgraded, or reduced functionality, and improved performance and security, but is not limited thereto. It should be noted that Figures 1a and 1b are illustrative and do not constitute a limitation on the number of users, non-gray-scale service nodes, or gray-scale server nodes in this embodiment of the disclosure.
[0027] Referring to steps ①-② of Figures 1a and 1b, the application administrator can send the application system's gray-scale release request information to the management device 11. This gray-scale release request information includes specified user attributes and gray-scale traffic ratios. The management device 11 receives the gray-scale release request information from the application administrator and parses out the specified user attributes and gray-scale traffic ratios. It should be noted that the application administrator sending the gray-scale release request information to the management device 11 is only one example; the management device 11 can also obtain gray-scale release request information in other ways. For example, the management device 11 can read the gray-scale release request information from a specified storage location, which can be local memory or local persistent storage media (such as a disk), or a remote database or cloud storage system. Specified user attributes describe the attribute information of users participating in the gray-scale release, used for filtering and distinguishing user traffic. These attributes may include, but are not limited to, user ID, the user's region, or the user's terminal type. The gray-scale traffic ratio describes the expected proportion of traffic participating in the gray-scale release, which can be the proportion of traffic participating in the gray-scale release to the total traffic.
[0028] After acquiring gray-scale release demand information and parsing out specified user attributes and gray-scale traffic ratios, the control device 11 can collect traffic characteristic information of multiple candidate users from non-gray-scale service nodes in the application system 12; wherein, candidate users refer to users with specified user attributes. In this embodiment, "traffic" refers to service requests initiated by users. Traffic characteristic information refers to various characteristic information reflecting the traffic situation of candidate users, such as including but not limited to: access frequency, response time, success rate, etc. In this embodiment, the method by which the control device 11 collects the traffic characteristic information of candidate users from non-gray-scale service nodes is not limited.
[0029] For example, the control device 11 can send a notification message to the non-grayscale service nodes to notify them to report the service requests they receive to the control device 11; the control device 11 selects service requests from candidate users from the service requests reported by the non-grayscale service nodes according to the specified user attributes.
[0030] For example, as shown in Figures 1a and 1b, a data collection component is deployed on the non-grayscale service nodes. This component can be used to collect traffic characteristic information of the user groups diverted to the non-grayscale service nodes. For instance, before the grayscale release, traffic characteristic information can be collected from the user group shown in Figure 1a, including users 1 to N. Optionally, a data collection component can also be deployed on the grayscale service nodes to collect traffic characteristic information of the user groups diverted to the grayscale service nodes after the grayscale release is completed. Based on this, the control node distributes the specified user attributes to each non-grayscale service node. Referring to step ③ in Figures 1a and 1b, the data collection components on non-grayscale service nodes N1 to N4 can filter out candidate users who meet the specified user attributes from the N users from users 1 to N, such as users 1 to 5, and collect the traffic characteristic information of each candidate user and report it to the control device 11.
[0031] Referring to step ④ in Figures 1a and 1b, the control device 11 selects grayscale users from users 1-5 based on the traffic characteristics of users 1-5 and the grayscale traffic ratio issued by the application administrator. For example, the grayscale users are users 4 and 5. Grayscale users refer to users selected to participate in grayscale deployment, that is, users selected to send service requests to the grayscale service nodes. When grayscale users are selected, the control device 11 routes the service requests from the grayscale users to the grayscale service nodes in the application system 12 to perform grayscale deployment of the service programs or processes in the application system 12. The method by which the control device 11 routes the service requests from the grayscale users to the grayscale service nodes may vary depending on the implementation architecture of the application system 12.
[0032] As shown in Figure 1a, in this system architecture, each user's client node communicates directly with the service node. In this case, referring to step ⑤ of Figure 1a, the management device 11 can send notification messages to the grayscale users. Referring to step ⑥ in the upper and lower figures of Figure 1a, the notification message can be used to adjust the routes of users 4 and 5, so that users 4 and 5 can directly send service requests to the grayscale service node. The notification message may include the identification information of the grayscale service node, such as its IP address, name, or ID. In Figure 1a, solid lines represent links routed to non-grayscale service nodes, and dashed lines represent links routed to grayscale service nodes to distinguish between the two.
[0033] As shown in Figure 1b, the application system 12 may also include a traffic ingress node K1, which has a traffic aggregation function and can be a load balancer or gateway node, etc. Service requests from various users are aggregated at the traffic ingress node K1, and then the traffic ingress node K1 distributes the service requests from each user to different service nodes. Based on this, referring to step ⑤ in Figure 1b, the management device 11 can send information about grayscale users to the traffic ingress node K1. Referring to step ⑥ in the upper and lower figures of Figure 1b, the traffic ingress node K1 can perform routing adjustments, that is, according to the information of grayscale users, it distributes service requests from grayscale users to grayscale service nodes and service requests from non-grayscale users to non-grayscale service nodes, in order to perform grayscale deployment of the application system 12. In Figure 1b, solid lines represent links routed to non-grayscale service nodes, and dashed lines represent links routed to grayscale service nodes to distinguish between the two.
[0034] The basic process of the embodiments of this disclosure has been described above with reference to the system architecture shown in Figures 1a-1b. The technical solutions provided by the embodiments of this disclosure will be described in detail below with reference to Figure 2.
[0035] Figure 2 is a flowchart illustrating a canary release method provided in an exemplary embodiment of this disclosure. This method is primarily described from the perspective of device management. As shown in Figure 2, the method may include the following steps:
[0036] Step 21: Obtain the canary release requirement information of the application system. The canary release requirement information includes the specified user attributes and the canary traffic ratio.
[0037] Step 22: Obtain traffic characteristic information of multiple candidate users from the non-grayscale service nodes in the application system. Candidate users are users with specified user attributes.
[0038] Step 23: Select grayscale users from multiple candidate users based on the traffic characteristics and grayscale traffic ratio of multiple candidate users.
[0039] Step 24: Route the service requests of gray-scale users to the gray-scale service nodes in the application system to perform gray-scale deployment of the application system.
[0040] In this embodiment, the gray-scale release requirement information is used to describe the allocation rules of gray-scale traffic in the current gray-scale release task, and may include: specifying user attributes and gray-scale traffic ratio. The specified user attributes are used to filter multiple users within the user group. This embodiment does not limit the specific implementation of the specified user attributes; the specified user attributes can be different under different dimensions. For example, each user may have their own UID (user identifier), and the specified user attribute can be a specified UID attribute, such as a UID starting with 0 or ending with 1, etc.; each user may be in different regions and use different mobile phone models, and the specified user attribute can be a specified region attribute or a specified mobile phone model attribute; this embodiment does not impose any restrictions. The gray-scale traffic ratio is used to describe the expected ratio of gray-scale traffic to formal traffic, and can be set to any value according to actual needs, such as 70%, 60%, or 50%, etc.; this embodiment does not impose any restrictions.
[0041] This disclosure does not limit the specific method for obtaining gray-scale release request information. In some optional embodiments, the control device may provide a gray-scale service interface to relevant personnel. The gray-scale service interface may include multiple configuration items for relevant personnel to submit gray-scale release request information. Relevant personnel can input information for at least one of the multiple configuration items, and the control device can respond to the input operation of relevant personnel and obtain the input gray-scale release request information. In other optional embodiments, relevant personnel can upload a request document to the control device through the gray-scale service interface provided by the control device, so that the control device can parse the request document to obtain the gray-scale release request information. In some optional embodiments, relevant personnel can also send the request document to the control device via email or other means, so that the control device can parse the request document to obtain the gray-scale release request information.
[0042] After obtaining the canary release requirement information, traffic characteristic information of multiple candidate users can be obtained from the non-canary service nodes in the application system. This traffic characteristic information of multiple candidate users can be collected by the non-canary service nodes in the application system, and thus, the traffic characteristic information of multiple candidate users can be obtained from the non-canary service nodes. Candidate users are users with specified user attributes, which can be selected from multiple users by the non-canary service nodes based on the specified user attributes. The application system can be a microservice system, but is not limited to this. For example, in some application scenarios, to facilitate disaster recovery or handle more user traffic, multiple servers can be deployed, each running the same server-side program. These server-side programs can be upgraded in a canary manner, and can be used for beautification, payment, video processing, etc. This implementation does not impose any restrictions.
[0043] The traffic characteristic information of any candidate user is used to describe the traffic characteristics exhibited by that candidate user when sending service requests to non-grayscale service nodes, including but not limited to at least one of the following: service request access frequency, queries per second (QPS), average response time, and request success rate. A non-grayscale service node may collect traffic characteristic information from one candidate user or from multiple candidate users; this embodiment does not impose any limitation. It should be noted that this embodiment does not restrict the order in which grayscale release demand information is obtained and traffic characteristic information is collected. In other words, traffic characteristic information can be collected by the non-grayscale service node at any time before grayscale release, or it can be collected by the non-grayscale service node after obtaining the grayscale release demand information; this embodiment does not impose any limitation.
[0044] Based on the above steps, grayscale users can be selected from multiple candidate users according to their traffic characteristic information and grayscale traffic ratio. In other words, a subset of candidate users can be selected from multiple candidate users based on their traffic characteristic information, ensuring that the sum of the expected grayscale traffic generated by these candidate users matches the grayscale traffic ratio. Therefore, these candidate users can be used as grayscale users.
[0045] After selecting gray-scale users, their service requests can be routed to gray-scale service nodes in the application system for gray-scale deployment. Specifically, the routing address of gray-scale user service requests can be adjusted from the original non-gray-scale service node's routing address to the gray-scale service node's routing address, thus directing the gray-scale user service requests to the gray-scale service node.
[0046] In this embodiment, user attributes and gray-scale traffic ratios can be specified to collect traffic characteristic information for users with specified user attributes. Then, based on the preset gray-scale traffic ratio and traffic characteristic information, gray-scale users can be selected from the users with specified user attributes, and their service requests can be routed to gray-scale service nodes in the application system. On the one hand, since the selection process for gray-scale users is constrained by the preset gray-scale traffic ratio, the selected gray-scale users can meet this ratio, thus allowing for relatively accurate control of the percentage of gray-scale traffic. On the other hand, traffic characteristic information can be collected at the user level, and traffic with the same user attribute can be routed to fixed service nodes, such as gray-scale service nodes or non-gray-scale service nodes, thereby fixing the routing of gray-scale traffic and improving user experience.
[0047] This disclosure does not limit the specific implementation method of obtaining traffic characteristic information of multiple candidate users from non-grayscale service nodes. In some optional embodiments, a collection component may be deployed on the non-grayscale service node. The collection component may be implemented as a functional module on the non-grayscale service node, or it may be implemented as an application running in the operating system of the non-grayscale service node. This embodiment does not limit the specific implementation method of the collection component.
[0048] Based on the collection component deployed on the non-grayscale service nodes, the management and control device can send specified user attributes to the collection component. The collection component can then collect feature information from the service requests received from the non-grayscale service nodes, summarizing the characteristics of service requests from candidate users and reporting this information to the management and control device. The management and control device can then use the feature information of service requests from candidate users as the traffic feature information of the candidate users.
[0049] The data collection component can select candidate users with specified user attributes from multiple users in a user group based on specified user attributes, and collect feature information of service requests from any candidate user from multiple user service requests received from non-grayscale service nodes. The feature information is used to describe the traffic characteristics when service requests are sent to non-grayscale service nodes, and may include: service request access frequency, average response time, and request success rate.
[0050] In this way, traffic characteristic information of multiple candidate users can be collected relatively accurately and efficiently from non-grayscale service nodes in the application system.
[0051] This disclosure does not limit the specific implementation of selecting grayscale users from multiple candidate users. In some optional embodiments, it can be implemented based on the following steps 231-232:
[0052] Step 231: Determine the target traffic ratio for multiple candidate users based on their traffic characteristic information.
[0053] Step 232: Select gray users from multiple candidate users based on the target traffic ratio and gray traffic ratio of multiple candidate users.
[0054] This embodiment does not limit the specific implementation of step 231. In some optional embodiments, it can be implemented based on any of the following implementation methods. The calculation results of any of the following implementation methods are more accurate and have the advantages of being simple to implement and efficient:
[0055] Implementation Method 1: Based on the traffic characteristic information of multiple candidate users, determine the traffic value generated by multiple candidate users within a target time period. The target time period is the period for collecting traffic characteristic information, i.e., the period for collecting traffic characteristic information of multiple candidate users. This embodiment does not limit the specific implementation method for determining the traffic value generated by multiple candidate users within the target time period. Optionally, the traffic characteristic information may include at least one type of traffic sub-characteristic information, and different functional relationships may exist between different types of sub-traffic characteristic information and traffic. The functional relationship between each type of traffic characteristic sub-information and traffic can be learned in advance by performing regression analysis or data fitting on various types of historical traffic characteristic sub-information and their corresponding historical traffic. For example, traffic and average response time data can be collected in advance in various network environments, and the functional relationship between traffic and average response time can be learned using regression analysis or data fitting. Alternatively, query rate per second data at different times can be collected in advance in various network environments, and the functional relationship between query rate per second and time can be learned using regression analysis or data fitting. Furthermore, at least one initial traffic value for a candidate user can be calculated based on the functional relationship between at least one traffic characteristic sub-information of the candidate user and traffic. The calculation method for the initial traffic value will vary depending on the type of traffic characteristic sub-information. For example, when the traffic feature sub-information is the query rate per second, the query rate per second of the candidate user can be directly used as the initial traffic value of the candidate user; when the traffic feature sub-information is the average response time, the initial traffic value corresponding to the average response time of the candidate user can be determined based on the average response time of the candidate user and the functional relationship between the average response time and traffic; when the traffic feature sub-information is the request success rate, the initial traffic value corresponding to the request success rate of the candidate user can be determined based on the request success rate of the candidate user and the functional relationship between the request success rate and traffic. After calculating at least one initial traffic value, the traffic value generated by the candidate user within the target time period can be determined based on at least one initial traffic value. This embodiment does not limit the specific implementation method. In some optional embodiments, if the initial traffic value of the candidate user is one, the initial traffic value can be used as the traffic value generated by the candidate user in the target time period; various numerical calculations can also be performed based on the initial traffic value to obtain the traffic value generated by the candidate user in the target time period. For example, the initial traffic value can be corrected using a preset correction coefficient to obtain the traffic value generated by the candidate user in the target time period, or a preset correction value can be obtained, along with the weights of the correction value and the initial traffic value. Based on their respective weights and the preset correction value, the initial traffic value and the correction value can be weighted and summed to obtain the traffic value generated by the candidate user in the target time period.When multiple initial traffic values are obtained, the weights of various types of traffic feature sub-information can be acquired, and the multiple initial traffic values corresponding to the various types of traffic feature sub-information can be weighted and summed to obtain the traffic value generated by the candidate user in the target time period; alternatively, multiple initial traffic values can be directly added together to obtain the traffic value; alternatively, the maximum value can be selected from multiple initial traffic values, and the maximum value can be corrected using a preset correction coefficient to obtain the traffic value generated by the candidate user in the target time period. This embodiment does not impose any restrictions.
[0056] After determining the traffic values generated by multiple candidate users within the target time period based on the above process, the target traffic ratio of the candidate users can be calculated based on the traffic values generated by each candidate user within the target time period and the sum of the traffic values generated by multiple candidate users within the target time period. The target traffic ratio describes the proportion of traffic generated by the candidate user within the target time period. This embodiment does not limit the specific calculation method of the target traffic ratio. In some optional embodiments, the traffic value generated by each candidate user within the target time period can be divided by the sum of the traffic values generated by multiple candidate users within the target time period to obtain the ratio, which can be used as the target traffic ratio of the candidate user. Alternatively, this ratio can be calculated first, and then corrected using a preset correction coefficient to obtain the target traffic ratio of the candidate user. The first correction coefficient can be set to any value according to actual design requirements, such as 0.9 or 0.8, etc., and this embodiment does not impose any restrictions. Alternatively, the traffic value generated by the candidate user in the target time period can be corrected by a preset second correction coefficient, and the corrected traffic value can be divided by the sum of the traffic values generated by multiple candidate users in the target time period to obtain the target traffic ratio of the candidate user. The second correction coefficient can be set to any value according to actual design requirements, such as 0.9 or 0.8, etc., and this embodiment does not impose any restrictions.
[0057] Implementation method two, specifically based on steps R1-R4:
[0058] Step R1: Divide the target time period into multiple sub-time periods. Based on the traffic characteristic information of multiple candidate users, determine the traffic value generated by each candidate user in each sub-time period. This embodiment does not limit the method of dividing the target time period; it can be divided into any positive number of sub-time periods, such as 10, 20, 50, or 80, etc. The traffic characteristic information has a time attribute. Taking any candidate user as an example, based on the time attribute of the candidate user's traffic characteristic information, the traffic characteristic information can be divided into traffic characteristic information corresponding to each sub-time period, and the traffic value generated by the candidate user in each sub-time period can be calculated based on the traffic characteristic information corresponding to each sub-time period. For example, based on the time attribute of the candidate user's traffic characteristic information, the traffic characteristic information can be divided into traffic characteristic information for 10-11 o'clock, traffic characteristic information for 11-12 o'clock, and traffic characteristic information for 12-13 o'clock. The specific calculation method for calculating the traffic value generated by a candidate user in a sub-period based on the traffic characteristic information corresponding to any sub-period has been explained in detail in the relevant content of the aforementioned Implementation Method 1, "Determining the traffic value generated by multiple candidate users in a target period based on the traffic characteristic information of multiple candidate users," and will not be repeated here.
[0059] Step R2: Calculate the traffic ratio of each candidate user within a sub-time period based on the traffic values generated by multiple candidate users within each sub-time period and the sum of their traffic values. This embodiment does not limit the specific calculation method. In some optional embodiments, the traffic values generated by multiple candidate users within a sub-time period can be divided by the sum of their traffic values to obtain the ratio, which can be used as the traffic ratio of the candidate user within the sub-time period. Alternatively, the traffic values generated by multiple candidate users within a sub-time period can be divided by the sum of their traffic values to obtain the ratio, and then corrected using a preset third correction coefficient to obtain the traffic ratio of the candidate user within the sub-time period. The third correction coefficient can be set to any value according to actual design requirements, such as 0.9 or 0.8, etc., and this embodiment does not impose any restrictions.
[0060] Step R3: Determine the functional relationship between the traffic proportion of candidate users and time based on the traffic proportion of candidate users across multiple sub-time periods. This can be achieved by performing regression analysis or data fitting on the traffic proportion of candidate users across multiple sub-time periods and the corresponding time intervals, thereby learning the functional relationship between the traffic proportion of candidate users and time. This embodiment does not limit the specific implementation of the regression analysis or data fitting. In some exemplary embodiments, local weighted regression or a piecewise function can be used to perform regression analysis to obtain an initial function image, and spline interpolation can be used to further increase the fitting degree of each point on the initial function image to obtain a target function image. This target function image can characterize the functional relationship between the traffic proportion of candidate users and time.
[0061] Step R4: Based on the functional relationship between the traffic ratio of the candidate user and time, calculate the traffic ratio of the candidate user at the time of gray-scale release as its target traffic ratio. In this functional relationship, each time point can be mapped to a traffic ratio. Based on this, the traffic ratio corresponding to the gray-scale release time can be determined as the target traffic ratio, according to the mapping relationship between the traffic ratio of the candidate user and time, and the gray-scale release time.
[0062] Based on the above implementation methods one and two, the target traffic ratio of multiple candidate users can be generated relatively accurately and efficiently according to the traffic characteristic information of multiple candidate users.
[0063] Following the previous embodiments, this embodiment does not limit the specific implementation of step 232, "selecting gray users from multiple candidate users based on the target traffic ratio and gray traffic ratio of multiple candidate users." In some optional embodiments, it can be implemented in the following ways:
[0064] The target traffic proportions of multiple candidate users are divided into multiple unit sets. That is, the target traffic proportion of a candidate user can only appear in one unit set. Each unit set corresponds to a base traffic proportion, and a base traffic proportion can correspond to one or more unit sets; this embodiment does not impose any restrictions. The base traffic proportion can be set to any value according to actual needs, such as 1%, 5%, 10%, or 30%, etc., this embodiment does not impose any restrictions. The error between the sum of the target traffic proportions in a unit set and the base traffic proportion corresponding to that unit set is within a first preset range. This first preset range can be set to any range according to actual needs, such as 0-1%, 0-6%, or 1%-4%, etc., this embodiment does not impose any restrictions. In other words, the sum of the target traffic proportions in a unit set can be the same as or close to the base traffic proportion corresponding to that unit set; ideally, they should be the same.
[0065] For example, there are n unit sets U1-Un with percentages of 1%, 1%, 5%, 5%, 10%, ..., 50%, respectively, and a first set range of 0-1%. Based on this, the target traffic percentage of candidate user H1 (-0.5%), the target traffic percentage of candidate user H2 (0.1%), and the target traffic percentage of candidate user H3 (0.4%) can be assigned to unit set U1 (corresponding to a base traffic percentage of 1%), and 0.5% + 0.1% + 0.4% is the same as that of unit set U1 (corresponding to a base traffic percentage of 1%). Similarly, the target traffic percentages of candidate user H10 (2.5%), candidate user H11 (3%), and candidate user H12 (4%) can be assigned to unit set U5 (corresponding to a base traffic percentage of 10%), and the error between 2.5% + 3% + 4% and that of unit set U5 (corresponding to a base traffic percentage of 10%) is within the first set range of 0-1%.
[0066] In this embodiment, the specific implementation method for dividing the target traffic ratios of multiple candidate users into multiple unit sets is not limited. In an exemplary embodiment, the number of basic traffic ratios and the specific value of each basic traffic ratio can be preset, thereby dividing the target traffic ratios of multiple candidate users into multiple unit sets corresponding to the basic traffic ratios based on the number of basic traffic ratios and the specific value of each basic traffic ratio. In an exemplary embodiment, the target number of basic traffic ratios, the initial value of the basic traffic ratios, and the step size can also be preset. The step size and the initial value can be set to any value according to actual design requirements, and this embodiment does not impose any restrictions. Furthermore, the step size can be continuously added based on the initial value of the basic traffic ratios. Each addition of a step size yields a basic traffic ratio, until the number of basic traffic ratios reaches the target number and the addition stops. In this way, multiple basic traffic ratios can be obtained, and then the target traffic ratios of multiple candidate users can be divided into multiple unit sets corresponding to the basic traffic ratios.
[0067] In some optional embodiments, at least one basic traffic ratio and a threshold number of unit sets corresponding to each basic traffic ratio can be determined first. The threshold number of unit sets corresponding to any basic traffic ratio refers to the maximum number of unit sets corresponding to that basic traffic ratio. For example, if the threshold number of unit sets corresponding to basic traffic ratio G1 is 2 and the threshold number of unit sets corresponding to basic traffic ratio G2 is 3, this means that basic traffic ratio G1 can correspond to at most two unit sets, and basic traffic ratio G2 can correspond to at most three unit sets. In other words, this embodiment only limits the specific value of the basic traffic ratio and the threshold number of unit sets corresponding to the basic traffic ratio, and is not limited by the total number of basic traffic ratios.
[0068] Then, the target traffic ratios of multiple candidate users can be accumulated step by step, following the order of traffic ratio from smallest to largest and the requirement that the target traffic ratio of the same candidate user participates in only one accumulation operation. In other words, the target traffic ratios of multiple candidate users can be sorted in ascending order of traffic ratio, and each candidate user's target traffic ratio can only participate in one accumulation operation.
[0069] Based on this, if the error between the sum of the target traffic proportions participating in the accumulation and any basic traffic proportion is within a first set range, and the number of unit sets corresponding to any basic traffic proportion has not yet reached the quantity threshold, the target traffic proportions participating in the accumulation can be divided into a unit set corresponding to any basic traffic proportion.
[0070] For example, suppose the threshold number of unit sets corresponding to the basic traffic ratio G1 (1%) is 2, and the threshold number of unit sets corresponding to the basic traffic ratio G2 (2%) is 3; the first set range is 0-1%; the target traffic ratios of multiple candidate users, from smallest to largest, are 0.4%, 0.5%, 0.6%, 2%, 2.8%, 4%, 8%, 9%, ..., 20% and 22%. Based on this, starting from 0.4%, 0.4%, 0.5%, and 0.6% can be added together to obtain 1.5%. The error between this and the basic traffic ratio G1 (1%) is within the first set range of 0-1%, and the number of unit sets corresponding to the basic traffic ratio G1 (1%) is currently only 1, which does not exceed the threshold number 2. Therefore, the 0.4% and 0.5% involved in the accumulation can be divided into one unit set corresponding to the basic traffic ratio G1 (1%). Subsequently, since the error between 0.6% and the basic flow ratio G1 (1%) is within the first set range of 0-1%, it is possible to consider classifying 0.6% into a separate unit set corresponding to the basic flow ratio G1 (1%). However, this would cause the number of unit sets corresponding to the basic flow ratio G1 to exceed the quantity threshold. Therefore, 0.6% and 2% can be classified into a single unit set corresponding to the basic flow ratio G2 (2%). The subsequent overlay operations will not be elaborated upon here.
[0071] By statistically analyzing the unit sets corresponding to each basic traffic ratio, and selecting unit sets according to the specified gray-scale traffic ratio and the basic traffic ratio of each unit set, the purpose of selecting gray-scale users can be achieved. This selection method is simpler and more accurate. In addition, it can support dynamic changes in the gray-scale traffic ratio. When the gray-scale traffic ratio changes, the unit sets can be selected again according to the basic traffic ratio of each unit set without repeating the aforementioned calculation process, which helps to save resources and improve the selection efficiency of gray-scale users.
[0072] Optionally, when the number of currently divided unit sets reaches a first number, and there are still target traffic ratios of candidate users not yet included in the accumulation, the sum of the basic traffic ratios corresponding to each currently divided unit set is calculated as the first traffic ratio. The first number can be set to any value, such as 7, 8, or 9; this embodiment does not impose any restrictions. For example, if the first number is 7, and there are currently 7 divided unit sets, the basic traffic ratios corresponding to these seven unit sets can be summed to obtain the first traffic ratio. The traffic ratio threshold can be flexibly set according to application requirements, for example, it can be 50%, 60%, etc. If the first traffic ratio is greater than the set traffic ratio threshold, the target traffic ratios of candidate users not yet included in the accumulation can continue to be accumulated, so that the target traffic ratios of candidate users not yet included in the accumulation are divided into no more than a second number of unit sets. The traffic ratio threshold and the second number can both be set to any value according to actual design requirements; this embodiment does not impose any restrictions. For example, the target traffic proportions of candidate users not yet included in the accumulation are 18%, 20%, 22%, and 25%, respectively. The second quantity is 2. The threshold for the number of unit sets corresponding to the basic traffic proportions G6-40% and G7-50% is 1. Therefore, 19.5% and 20% can be assigned to a new unit set corresponding to the basic traffic proportion G6-40%, and 24% and 25% can be assigned to a new unit set corresponding to the basic traffic proportion G7-50%. This optional approach can effectively avoid an excessive number of unit sets in the final partitioning, achieving rapid convergence in the unit set partitioning process.
[0073] Based on the above, after accurately dividing the target traffic ratios of multiple candidate users into multiple unit sets, at least one target unit set can be selected from the multiple unit sets according to the grayscale traffic ratio, and the candidate users corresponding to the target traffic ratios in the at least one target unit set can be regarded as grayscale users. The error between the sum of the basic traffic ratios corresponding to the at least one target unit set and the grayscale traffic ratio is within a second preset range. This second preset range can be set to any range according to actual design requirements, such as 0-1.5%, 0-6.5%, or 0.5%-4%, etc., and this embodiment does not impose any limitations. For example, referring to Figure 3a, the grayscale traffic ratio is 30%, the second setting range is 0-3%, and the basic traffic ratios of unit sets U1 to U8 are 1%, 1%, 5%, 5%, 10%, 10%, 30%, and 50%, respectively. Then, unit sets U1 (corresponding to a basic traffic ratio of 1%), U2 (corresponding to a basic traffic ratio of 1%), U3 (corresponding to a basic traffic ratio of 5%), U4 (corresponding to a basic traffic ratio of 5%), U5 (corresponding to a basic traffic ratio of 10%), and U6 (corresponding to a basic traffic ratio of 10%) can be selected from the basic traffic ratios of unit sets U1 to U8 as target unit sets, and the candidate users corresponding to each target unit set are taken as grayscale users. Referring to Figure 3a, in each target unit set: unit set U1 corresponds to candidate users 1-3, unit set U2 corresponds to candidate users 4-5, unit set U3 corresponds to candidate users 6-10, unit set U4 corresponds to candidate users 11-18, unit set U5 corresponds to candidate users 19-28, and unit set U6 corresponds to candidate users 29-39. These candidate users are the grayscale users.
[0074] In this way, gray-scale users can be selected more accurately from multiple candidate users based on the target traffic ratio and gray-scale traffic ratio of multiple candidate users.
[0075] Following the above embodiments, after routing the service requests of grayscale users to the grayscale service nodes in the application system, the unit set can be updated or grayscale users can be reselected based on the following implementation methods. Implementation methods three and four below can be executed individually or in combination; this embodiment does not impose any restrictions.
[0076] Implementation Method 3: Collect traffic characteristic information of non-grayscale users from non-grayscale service nodes; update multiple unit sets based on the traffic characteristic information of non-grayscale users and the grayscale traffic ratio to update grayscale users. In other words, after routing service requests from grayscale users to grayscale service nodes in the application system, traffic characteristic information of non-grayscale users can continue to be collected. This allows for dynamic updates to the previous unit sets based on the traffic characteristic information of non-grayscale users and the grayscale traffic ratio, ensuring the accuracy of the unit sets and enabling more accurate grayscale user updates.
[0077] Implementation Method 4: Collect traffic characteristic information of multiple candidate users from both gray-scale and non-gray-scale service nodes; update multiple unit sets based on the traffic characteristic information of multiple candidate users and the gray-scale traffic ratio to update gray-scale users. In other words, after routing service requests from gray-scale users to gray-scale service nodes in the application system, full collection of traffic characteristic information can be performed on both gray-scale and non-gray-scale users. This allows for dynamic updates to the previous unit sets based on the traffic characteristic information of both gray-scale and non-gray-scale users and the gray-scale traffic ratio, ensuring the accuracy of the unit sets and enabling more accurate gray-scale user updates.
[0078] Implementation Method 5: Referring to step ⑦ in Figure 3b, traffic characteristic information of grayscale users can be collected from the grayscale service node. Referring to step ⑧ in Figure 3b, if it is determined that the traffic fluctuation amplitude of the grayscale user is greater than a set fluctuation amplitude threshold based on the traffic characteristic information of the grayscale user, the grayscale user is reselected from multiple unit sets. The set fluctuation amplitude threshold can be any value, and this embodiment does not impose any restrictions. Referring to step ⑨ in Figure 3b, a notification message can be sent to the reselected grayscale user, such as sending a notification message to candidate user 2 and candidate user 3.
[0079] Specifically, the traffic fluctuation range of gray-scale users can be determined based on their traffic characteristic information and their traffic characteristic information when they are candidate users. This embodiment does not limit the specific implementation method for determining the traffic fluctuation range of gray-scale users. In one exemplary embodiment, a first traffic value can be calculated based on the traffic characteristic information of gray-scale users, and then a second traffic value can be calculated based on their traffic characteristic information when they are candidate users. Alternatively, the previously calculated result can be directly used as the second traffic value. Then, the difference between the first and second traffic values can be calculated as the traffic fluctuation range of the gray-scale users. The specific implementation method for calculating the traffic value based on traffic characteristic information has been described in detail above and will not be repeated here. In another exemplary embodiment, the information weights corresponding to the traffic characteristic information of gray-scale users and their traffic characteristic information when they are candidate users can be used to perform a weighted calculation on the first and second traffic values to obtain the traffic fluctuation range of the gray-scale users. Then, if the traffic fluctuation range exceeds a set fluctuation range threshold, gray-scale users can be reselected from multiple unit sets.
[0080] It should be noted that, due to the real-time and dynamic nature of traffic, the traffic of gray-scale users may fluctuate significantly over a period of time, such as a sharp increase or decrease, which may cause the traffic destined for the gray-scale nodes to gradually deviate from the expected gray-scale traffic ratio. However, through the above implementation method, after routing the service requests of gray-scale users to the gray-scale service nodes in the application system, the gray-scale user list can be dynamically updated, thereby effectively ensuring that the traffic destined for the gray-scale nodes meets the expected gray-scale traffic ratio.
[0081] In some optional embodiments, service requests from gray-scale users are routed to gray-scale service nodes in the application system for gray-scale deployment of the application system. This may include the following two scenarios:
[0082] Referring to Figure 1a, when the application system does not include a traffic ingress node, a notification message is sent to grayscale users. This notification message includes the identification information of the grayscale service node, enabling grayscale users to directly send service requests to the grayscale service node. The traffic ingress node is used for traffic control and can be a gateway, load balancer, etc., without limitation in this embodiment. The load balancer node refers to the device in the application system responsible for load balancing processing and forwarding load balancing-related requests, such as a physical server, virtual server, or load balancer.
[0083] Referring to Figure 1b, when the application system includes a traffic entry node for distributing service requests to non-grayscale nodes and grayscale nodes, the information of grayscale users is sent to the traffic entry node so that the traffic entry node can distribute the service requests from grayscale users to grayscale service nodes to perform grayscale release of the application system.
[0084] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 21 to 24 can be device A; or the execution subject of steps 21 and 22 can be device A, and the execution subject of steps 23-24 can be device B; and so on.
[0085] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 22, 23, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0086] Figure 4 is a schematic diagram of a canary deployment device provided in another exemplary embodiment of this disclosure. As shown in Figure 4, the device includes: a demand information acquisition module 401, used to: acquire canary deployment demand information of an application system, the canary deployment demand information including specified user attributes and canary traffic ratio; a feature information acquisition module 402, used to: acquire traffic feature information of multiple candidate users from non-canary service nodes in the application system, the candidate users being users with the specified user attributes; a selection module 403, used to: select canary users from the multiple candidate users according to the traffic feature information of the multiple candidate users and the canary traffic ratio; and a routing module 404, used to: route the service requests of the canary users to the canary service nodes in the application system to perform canary deployment of the application system.
[0087] Optionally, a collection component is deployed on the non-grayscale service node. The feature information acquisition module 402, when acquiring traffic feature information of multiple candidate users from the non-grayscale service node in the application system, is specifically used to: send the specified user attributes to the collection component so that the collection component can count the feature information of service requests from candidate users from the service requests received from the non-grayscale service node; and receive the feature information of service requests from candidate users that the collection component has counted, as the traffic feature information of the candidate users.
[0088] Optionally, when the selection module 403 selects a grayscale user from the multiple candidate users based on the traffic characteristic information of the multiple candidate users and the grayscale traffic ratio, it is specifically used to: determine the target traffic ratio of the multiple candidate users based on the traffic characteristic information of the multiple candidate users; and select the grayscale user from the multiple candidate users based on the target traffic ratio of the multiple candidate users and the grayscale traffic ratio.
[0089] Optionally, when the selection module 403 determines the target traffic ratio of the multiple candidate users based on the traffic characteristic information of the multiple candidate users, it is specifically used to: determine the traffic value generated by the multiple candidate users in a target time period based on the traffic characteristic information of the multiple candidate users, wherein the target time period is the time when the traffic characteristic information of the multiple candidate users is collected; and calculate the target traffic ratio of the candidate users based on the traffic value generated by the candidate users in the target time period and the sum of the traffic values generated by the multiple candidate users in the target time period.
[0090] Optionally, the traffic feature information includes at least one traffic sub-feature information, and different types of traffic sub-feature information have different functional relationships with traffic; when the selection module 403 determines the traffic value generated by the multiple candidate users in the target time period based on the traffic feature information of the multiple candidate users, it is specifically used to: calculate at least one initial traffic value of the candidate user based on the functional relationship between at least one traffic feature sub-feature information of the candidate user and traffic; and determine the traffic value generated by the candidate user in the target time period based on the at least one initial traffic value of the candidate user.
[0091] Optionally, when the selection module 403 determines the target traffic ratio of the multiple candidate users based on their traffic characteristic information, it is specifically used to: divide the target time period into multiple sub-time periods; determine the traffic value generated by the multiple candidate users in each sub-time period based on their traffic characteristic information; the target time period is the time period for collecting the traffic characteristic information of the multiple candidate users; calculate the traffic ratio of any candidate user in the sub-time period based on the traffic value generated by the multiple candidate users in the sub-time period and the sum of the traffic values generated by the multiple candidate users in the sub-time period; determine the relationship between the traffic ratio of the candidate user and time based on the traffic ratio of the candidate user in the multiple sub-time periods; and calculate the traffic ratio of the candidate user at the grayscale release time as its target traffic ratio based on the relationship between the traffic ratio of the candidate user and time.
[0092] Optionally, when the selection module 403 selects the grayscale user from the multiple candidate users based on the target traffic ratio of the multiple candidate users and the grayscale traffic ratio, it is specifically configured to: divide the target traffic ratio of the multiple candidate users into multiple unit sets; wherein, one unit set corresponds to one basic traffic ratio, one basic traffic ratio corresponds to one or more unit sets, and the error between the sum of the target traffic ratios in a unit set and the basic traffic ratio corresponding to that unit set is within a first preset range; select at least one target unit set from the multiple unit sets based on the grayscale traffic ratio, and take the candidate users corresponding to the target traffic ratios in the at least one target unit set as the grayscale user; wherein, the error between the sum of the basic traffic ratios corresponding to the at least one target unit set and the grayscale traffic ratio is within a second preset range.
[0093] Optionally, when the selection module 403 divides the target traffic ratios of the multiple candidate users into multiple unit sets, it is specifically used to: determine at least one basic traffic ratio and a threshold number of unit sets corresponding to each basic traffic ratio; gradually accumulate the target traffic ratios of the multiple candidate users according to the order of traffic ratios from smallest to largest and the requirement that the target traffic ratio of the same candidate user participates in one accumulation operation; when the error between the sum of the accumulated target traffic ratios and any basic traffic ratio is within the first set range, and the number of unit sets corresponding to any basic traffic ratio has not yet reached the threshold number, divide the accumulated target traffic ratios into one unit set corresponding to any basic traffic ratio.
[0094] Optionally, the selection module 403 is further configured to: when the number of currently divided unit sets reaches a first number, and there are still target traffic ratios of candidate users that have not participated in the accumulation, calculate the sum of the basic traffic ratios corresponding to each currently divided unit set as the first traffic ratio; when the first traffic ratio is greater than a set traffic ratio threshold, continue to accumulate the target traffic ratios of candidate users that have not yet participated in the accumulation, so as to divide the target traffic ratios of the candidate users that have not yet participated in the accumulation into no more than a second number of unit sets.
[0095] Optionally, after routing the service request of the grayscale user to the grayscale service node in the application system, the routing module 404 is further configured to: collect traffic characteristic information of non-grayscale users from the non-grayscale service node; update the plurality of unit sets according to the traffic characteristic information of the non-grayscale users and the grayscale traffic ratio, so as to update the grayscale users; and / or, collect traffic characteristic information of the plurality of candidate users from the grayscale service node and the non-grayscale service node; update the plurality of unit sets according to the traffic characteristic information of the plurality of candidate users and the grayscale traffic ratio, so as to update the grayscale users; and / or, collect traffic characteristic information of the grayscale user from the grayscale service node; and, if it is determined from the traffic characteristic information of the grayscale user that the traffic fluctuation amplitude of the grayscale user is greater than a set fluctuation amplitude threshold, reselect the grayscale user from the plurality of unit sets.
[0096] Optionally, when the routing module 404 routes the service requests of the grayscale users to grayscale service nodes in the application system for grayscale deployment of the application system, it is specifically used for: when the application system includes a traffic ingress node for distributing service requests to the non-grayscale nodes and the grayscale nodes, sending the information of the grayscale users to the traffic ingress node, so that the traffic ingress node can distribute the service requests from the grayscale users to the grayscale service nodes for grayscale deployment of the application system; when the application system does not include the traffic ingress node, sending a notification message to the grayscale users, the notification message including the identification information of the grayscale service nodes, so that the grayscale users can directly send service requests to the grayscale service nodes.
[0097] The internal functions and structure of the grayscale release device have been described above, as shown in Figure 5. In practice, the grayscale release device can be implemented as a control device, including: memory 501, processor 502 and communication component 503.
[0098] Memory 501 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.
[0099] The memory 501 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0100] Processor 502, coupled to memory 501, is used to execute a computer program in memory 501 for: acquiring gray-scale release requirement information of an application system, the gray-scale release requirement information including specified user attributes and gray-scale traffic ratio; acquiring traffic characteristic information of multiple candidate users from non-gray-scale service nodes in the application system, the candidate users being users with the specified user attributes; selecting gray-scale users from the multiple candidate users according to the traffic characteristic information of the multiple candidate users and the gray-scale traffic ratio; and routing the service requests of the gray-scale users to the gray-scale service nodes in the application system to perform gray-scale release of the application system.
[0101] Optionally, the non-grayscale service node is equipped with a collection component, processor 502, which, when collecting traffic feature information of multiple candidate users from the non-grayscale service node in the application system, specifically performs the following: sending the specified user attributes to the collection component so that the collection component can statistically analyze the feature information of service requests from candidate users from the service requests received from the non-grayscale service node; and receiving the feature information of service requests from candidate users statistically analyzed by the collection component as the traffic feature information of the candidate users.
[0102] Optionally, when the processor 502 selects a grayscale user from the plurality of candidate users based on the traffic characteristic information of the plurality of candidate users and the grayscale traffic ratio, it is specifically configured to: determine the target traffic ratio of the plurality of candidate users based on the traffic characteristic information of the plurality of candidate users; and select the grayscale user from the plurality of candidate users based on the target traffic ratio of the plurality of candidate users and the grayscale traffic ratio.
[0103] Optionally, when the processor 502 determines the target traffic ratio of the multiple candidate users based on the traffic characteristic information of the multiple candidate users, it is specifically used to: determine the traffic value generated by the multiple candidate users within a target time period based on the traffic characteristic information of the multiple candidate users, wherein the target time period is the time when the traffic characteristic information of the multiple candidate users is collected; and calculate the target traffic ratio of the candidate users based on the traffic value generated by the candidate users within the target time period and the sum of the traffic values generated by the multiple candidate users within the target time period.
[0104] Optionally, the traffic feature information includes at least one traffic sub-feature information, and different types of traffic sub-feature information have different functional relationships with traffic; when the processor 502 determines the traffic value generated by the multiple candidate users in the target time period based on the traffic feature information of the multiple candidate users, it is specifically used to: calculate at least one initial traffic value of the candidate user based on the functional relationship between at least one traffic feature sub-feature information of the candidate user and traffic; and determine the traffic value generated by the candidate user in the target time period based on the at least one initial traffic value of the candidate user.
[0105] Optionally, when the processor 502 determines the target traffic ratio of the multiple candidate users based on their traffic characteristic information, it specifically performs the following steps: dividing the target time period into multiple sub-time periods; determining the traffic values generated by the multiple candidate users in each sub-time period based on their traffic characteristic information; the target time period being the period for collecting the traffic characteristic information of the multiple candidate users; calculating the traffic ratio of the candidate users in each sub-time period based on the traffic values generated by the multiple candidate users in each sub-time period and the sum of the traffic values generated by the multiple candidate users in each sub-time period; determining the relationship between the traffic ratio of the candidate users and time based on their traffic ratio in each sub-time period; and calculating the traffic ratio of the candidate users at the grayscale release time as their target traffic ratio based on the relationship between the traffic ratio of the candidate users and time.
[0106] Optionally, when the processor 502 selects the grayscale user from the plurality of candidate users based on the target traffic ratio of the plurality of candidate users and the grayscale traffic ratio, it specifically performs the following steps: dividing the target traffic ratio of the plurality of candidate users into a plurality of unit sets; wherein, one unit set corresponds to one base traffic ratio, one base traffic ratio corresponds to one or more unit sets, and the error between the sum of the target traffic ratios in a unit set and the base traffic ratio corresponding to that unit set is within a first predetermined range; selecting at least one target unit set from the plurality of unit sets based on the grayscale traffic ratio, and taking the candidate users corresponding to the target traffic ratios in the at least one target unit set as the grayscale user; wherein, the error between the sum of the base traffic ratios corresponding to the at least one target unit set and the grayscale traffic ratio is within a second predetermined range.
[0107] Optionally, when the processor 502 divides the target traffic ratios of the multiple candidate users into multiple unit sets, it is specifically used to: determine at least one basic traffic ratio and a threshold number of unit sets corresponding to each basic traffic ratio; gradually accumulate the target traffic ratios of the multiple candidate users according to the order of traffic ratios from smallest to largest and the requirement that the target traffic ratio of the same candidate user participates in one accumulation operation; when the error between the sum of the accumulated target traffic ratios and any basic traffic ratio is within the first set range, and the number of unit sets corresponding to any basic traffic ratio has not yet reached the threshold number, divide the accumulated target traffic ratios into a unit set corresponding to any basic traffic ratio.
[0108] Optionally, the processor 502 is further configured to: when the number of currently divided unit sets reaches a first number and there are still target traffic ratios of candidate users that have not participated in the accumulation, calculate the sum of the basic traffic ratios corresponding to each currently divided unit set as a first traffic ratio; when the first traffic ratio is greater than a set traffic ratio threshold, continue to accumulate the target traffic ratios of candidate users that have not yet participated in the accumulation, so as to divide the target traffic ratios of the candidate users that have not yet participated in the accumulation into no more than a second number of unit sets.
[0109] Optionally, after routing the service request of the grayscale user to the grayscale service node in the application system, the processor 502 is further configured to: collect traffic characteristic information of non-grayscale users from the non-grayscale service node; update the plurality of unit sets according to the traffic characteristic information of the non-grayscale users and the grayscale traffic ratio, so as to update the grayscale users; and / or, collect traffic characteristic information of the plurality of candidate users from the grayscale service node and the non-grayscale service node; update the plurality of unit sets according to the traffic characteristic information of the plurality of candidate users and the grayscale traffic ratio, so as to update the grayscale users; and / or, collect traffic characteristic information of the grayscale user from the grayscale service node; and, if it is determined from the traffic characteristic information of the grayscale user that the traffic fluctuation amplitude of the grayscale user is greater than a set fluctuation amplitude threshold, reselect the grayscale user from the plurality of unit sets.
[0110] Optionally, when the processor 502 routes the service requests of the grayscale users to grayscale service nodes in the application system for grayscale deployment of the application system, it specifically performs the following: when the application system includes a traffic ingress node for distributing service requests to the non-grayscale nodes and the grayscale nodes, it sends the information of the grayscale users to the traffic ingress node, so that the traffic ingress node can distribute the service requests from the grayscale users to the grayscale service nodes for grayscale deployment of the application system; when the application system does not include the traffic ingress node, it sends a notification message to the grayscale users, the notification message including the identification information of the grayscale service nodes, so that the grayscale users can directly send service requests to the grayscale service nodes.
[0111] Furthermore, as shown in Figure 5, the control device also includes other components such as a display 504, a power supply component 505, and an audio component 506. Figure 5 only schematically shows some components and does not imply that the control device only includes the components shown in Figure 5. Additionally, the components within the dashed boxes in Figure 5 are optional, not mandatory, and their specific inclusion depends on the product form of the working node. The working node in this embodiment can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the working node in this embodiment is a terminal device such as a desktop computer, laptop computer, or smartphone, it may include the components within the dashed boxes in Figure 5; if the working node in this embodiment is a server-side device such as a conventional server, cloud server, or server array, it may not include the components within the dashed boxes in Figure 5.
[0112] In this embodiment, canary release requirement information can be obtained, including specified user attributes and canary traffic ratios. Traffic characteristic information of multiple candidate users (users with specified user attributes) is obtained from non-canary service nodes in the application system. Canary users are selected from the multiple candidate users based on their traffic characteristic information and canary traffic ratios. Service requests from canary users are routed to the canary service nodes in the application system for canary release. This method allows for more accurate control of the percentage of canary traffic during canary releases, while also fixing the routing of canary traffic, thus improving user experience.
[0113] This disclosure also provides a canary deployment system, including: a non-canary service node, a canary service node, and the control device. For a detailed description of the architecture and working principle of the canary deployment system, please refer to the foregoing embodiments, which will not be repeated here.
[0114] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the grayscale release method.
[0115] This disclosure also provides a computer program product, including a computer program / instruction, which, when executed by a processor, performs the steps in the grayscale release method.
[0116] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0117] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0118] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0119] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0120] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0121] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.
[0122] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0123] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0124] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0125] In a typical configuration, a computing device includes one or more processors (Central Processing Units, CPUs), input / output interfaces, network interfaces, and memory.
[0126] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0127] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0128] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0129] The above are merely embodiments of this disclosure and are not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
Claims
1. A method for canary deployment, wherein, include: Obtain the gray-scale release requirement information of the application system, wherein the gray-scale release requirement information includes specified user attributes and gray-scale traffic ratio; Traffic characteristic information of multiple candidate users is obtained from non-grayscale service nodes in the application system, wherein the candidate users are users with the specified user attributes; Based on the traffic characteristic information of the multiple candidate users and the grayscale traffic ratio, grayscale users are selected from the multiple candidate users; The service requests of the gray-scale users are routed to the gray-scale service nodes in the application system to perform gray-scale deployment of the application system.
2. The method according to claim 1, wherein, If a data collection component is deployed on the non-grayscale service node, then traffic characteristic information of multiple candidate users is obtained from the non-grayscale service node in the application system, including: The specified user attributes are sent to the collection component so that the collection component can collect feature information of service requests from the candidate user from the service requests received by the non-grayscale service node. The feature information of service requests from the candidate users reported by the collection component is used as the traffic feature information of the candidate users.
3. The method according to claim 1 or 2, wherein, Based on the traffic characteristic information of the multiple candidate users and the grayscale traffic ratio, grayscale users are selected from the multiple candidate users, including: Based on the traffic characteristic information of the multiple candidate users, determine the target traffic ratio of the multiple candidate users; The grayscale user is selected from the multiple candidate users based on the target traffic ratio of the multiple candidate users and the grayscale traffic ratio.
4. The method according to claim 3, wherein, Based on the traffic characteristic information of the multiple candidate users, determine the target traffic ratio of the multiple candidate users, including: Based on the traffic characteristic information of the multiple candidate users, the traffic value generated by the multiple candidate users within the target time period is determined, where the target time period is the period during which the traffic characteristic information of the multiple candidate users is collected; The target traffic ratio of the candidate user is calculated based on the traffic value generated by the candidate user during the target time period and the sum of the traffic values generated by the multiple candidate users during the target time period.
5. The method according to claim 4, wherein, The traffic characteristic information includes at least one type of traffic sub-characteristic information, and different types of traffic sub-characteristic information have different functional relationships with traffic. Based on the traffic characteristic information of the multiple candidate users, determine the traffic values generated by the multiple candidate users within the target time period, including: Calculate at least one initial traffic value for the candidate user based on the functional relationship between at least one traffic sub-feature information of the candidate user and the traffic; Based on at least one initial traffic value of the candidate user, determine the traffic value generated by the candidate user during the target time period.
6. The method according to claim 3, wherein, Based on the traffic characteristic information of the multiple candidate users, determine the target traffic ratio of the multiple candidate users, including: The target time period is divided into multiple sub-time periods. Based on the traffic characteristic information of the multiple candidate users, the traffic value generated by the multiple candidate users in each sub-time period is determined. The target time period is the time period in which the traffic characteristic information of the multiple candidate users is collected. The traffic ratio of the candidate user in the sub-period is calculated based on the traffic value generated by the multiple candidate users in the sub-period and the sum of the traffic values generated by the multiple candidate users in the sub-period. Based on the traffic proportion of the candidate users in the multiple sub-time periods, determine the relationship between the traffic proportion of the candidate users and the time function; Based on the functional relationship between the traffic ratio of the candidate user and time, the traffic ratio of the candidate user at the time of gray-scale release is calculated as its target traffic ratio.
7. The method according to any one of claims 3-6, wherein, Based on the target traffic ratio of the multiple candidate users and the gray-scale traffic ratio, the gray-scale user is selected from the multiple candidate users, including: The target traffic ratios of the multiple candidate users are divided into multiple unit sets; wherein, one unit set corresponds to one basic traffic ratio, one basic traffic ratio corresponds to one or more unit sets, and the error between the sum of the target traffic ratios in a unit set and the basic traffic ratio corresponding to that unit set is within a first set range. Based on the grayscale traffic ratio, at least one target unit set is selected from the plurality of unit sets, and the candidate users corresponding to the target traffic ratio in the at least one target unit set are taken as the grayscale users; wherein, the error between the sum of the basic traffic ratios corresponding to the at least one target unit set and the grayscale traffic ratio is within a second set range.
8. The method according to claim 7, wherein, The target traffic proportions of the multiple candidate users are divided into multiple unit sets, including: Determine at least one basic traffic ratio and a threshold number of unit sets corresponding to each basic traffic ratio; The target traffic ratios of the multiple candidate users are gradually accumulated in order of increasing traffic ratio and according to the requirement that the target traffic ratio of the same candidate user participates in one accumulation operation. If the error between the sum of the target traffic proportions participating in the accumulation and any basic traffic proportion is within the first set range, and the number of unit sets corresponding to any basic traffic proportion has not yet reached the number threshold, the target traffic proportions participating in the accumulation are divided into a unit set corresponding to any basic traffic proportion.
9. The method according to claim 8, wherein, Also includes: If the number of currently divided unit sets has reached the first number, and there are still candidate users whose target traffic ratio has not been included in the accumulation, the sum of the basic traffic ratios corresponding to each currently divided unit set is calculated as the first traffic ratio. If the first traffic ratio is greater than the set traffic ratio threshold, the target traffic ratio of the candidate users who have not yet participated in the accumulation will continue to be accumulated, so as to divide the target traffic ratio of the candidate users who have not yet participated in the accumulation into a set of no more than a second number of units.
10. The method according to any one of claims 7-9, wherein, After routing the service requests of the grayscale users to the grayscale service nodes in the application system, the method further includes: Traffic characteristic information of non-grayscale users is collected from the non-grayscale service nodes; the multiple unit sets are updated according to the traffic characteristic information of non-grayscale users and the grayscale traffic ratio, so as to update the grayscale users; And / or, Traffic characteristic information of the multiple candidate users is collected from the gray-scale service nodes and the non-gray-scale service nodes; the multiple unit sets are updated according to the traffic characteristic information of the multiple candidate users and the gray-scale traffic ratio, so as to update the gray-scale users; and / or Traffic characteristic information of gray users is collected from the gray service nodes; if the traffic fluctuation of gray users is determined to be greater than a set fluctuation threshold based on the traffic characteristic information of gray users, gray users are reselected from the multiple unit sets.
11. A control device, wherein, include: A storage unit and a processing unit, wherein the storage unit is used to store a computer program, and the processing unit is coupled to the storage unit and is used to execute the computer program for: implementing the steps of the method according to any one of claims 1-10.
12. A canary release system, wherein, include: Non-grayscale service nodes, grayscale service nodes, and the control device as described in claim 11.
13. A computer-readable storage medium storing a computer program, wherein, When the computer program is executed by a processor, it causes the processor to perform the steps of the method according to any one of claims 1-10.
14. A computer program product, wherein, Includes a computer program / instruction that, when executed by a processor, performs the steps of the method described in any one of claims 1-10.
Citation Information
Patent Citations
Request distribution method and device, access gateway and storage medium
CN108156038A
Gray release method and device, storage medium and electronic equipment
CN110286941A
Information system gray release user selection method and system based on micro-service architecture
CN113535595A
Gray release method, device and equipment, and storage medium
CN114039866A
Gray release method and device, electronic equipment and storage medium
CN114422440A