Gray release-based engineering deployment method for metering large model inference service
By constructing a closed-loop feedback control mechanism based on the proportion of gray-scale traffic in the large-scale econometric model inference service, the proportion of gray-scale traffic is adaptively adjusted, which solves the problem that gray-scale release cannot be adaptively adjusted in the existing technology, and realizes service availability and risk control under high concurrency conditions.
Patent Information
- Application Number
- CN202611480621.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies for canary releases of large-scale model inference services, the proportion of canary traffic is treated as a fixed step preset by humans and cannot be adaptively adjusted. This leads to quality degradation or increased latency of the new version under high concurrency conditions, making it difficult to balance release risk control and service availability.
By using the proportion of gray-scale traffic as a controlled variable subject to feedback control of online quality and latency indicators, a closed-loop feedback control mechanism is constructed to adaptively adjust the proportion of gray-scale traffic. Based on the deviation of the comprehensive quality-latency indicator, the system will either increase or decrease the volume of traffic. Combined with default risk budgeting and elastic scaling, availability assurance under the constraints of the service level agreement is achieved.
It enables adaptive rollout of new versions and loss mitigation during canary releases, improving service availability, reducing resource consumption, shortening release cycles, and avoiding delays and resource waste caused by manual intervention.
Smart Images

Figure CN123185099A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of econometric large model inference service deployment technology, specifically to an engineered deployment method for econometric large model inference services based on canary release. Background Technology
[0002] As electricity metering services evolve towards intelligence, large-scale metering models for data analysis, alarm attribution, quantity-price analysis, and user interaction are deployed as online inference services to continuously handle high-concurrency requests from metering automation systems, marketing systems, and maintenance personnel. These inference services have stringent requirements for high concurrency, low latency, and high availability: each inference attempt must return results within a limited latency period; the service must not refuse service due to overload during peak traffic periods; and during version iterations, there must be no widespread interruption of metering services due to defects in new versions. To meet these requirements, engineering practices typically encapsulate large-scale metering models as inference services supporting Hypertext Transfer Protocol (HTTP) and Remote Procedure Call (RPC) protocols. Container orchestration platforms enable elastic scaling, coupled with load balancing, failover, circuit breaking, rate limiting, and inference performance optimization techniques based on integer quantization, continuous batch processing, and inference caching. Simultaneously, end-to-end performance monitoring is performed on metrics such as request volume, response time, success rate, GPU utilization, and memory usage.
[0003] In the context of frequent iterations of large-scale econometric models, new version deployments commonly employ canary releases: initially directing a small percentage of traffic to the new version, observing for a period, and then gradually increasing the percentage until a full switch is implemented, in order to reduce the impact of defects in the new version. Chinese invention patent application CN116954663A discloses a Kubernetes-based canary release method for cloud containers. This method dynamically modifies routing rules through an upgrade center, version control center, and traffic control center, switching traffic between the old and new service clusters in percentage terms. For example, initially importing 10% to the new version, then importing 20%, gradually importing users to the new version, and switching traffic back to the old version when problems occur. However, the rollout percentage in this scheme is manually set by operations personnel according to preset tiers, relying on manual observation of online conditions to decide when to enter the next rollout tier and whether to switch back, without incorporating the online quality and latency metrics of the new version into automatic feedback control of the rollout percentage.
[0004] Applying the canary release method, exemplified by manual tiered rollout, directly to the measurand model inference service exposes a problem not fully recognized by existing technologies. The online performance of the measurand model inference service is highly load- and version-sensitive: the quality score, tail percentile latency, and success rate of a new version under real traffic often only become apparent after a certain proportion of traffic has been handled, and these metrics change non-linearly with concurrency pressure. Under these conditions, manually set fixed rollout tiers face a dilemma: if rollout is too rapid, once the new version experiences quality degradation or latency increases under high concurrency, a large proportion of traffic will encounter service quality degradation before operations personnel notice and manually switch back, causing widespread service level agreement violations; if rollout is too slow, the release cycle is prolonged, and the coexistence of the old and new versions consumes significantly more GPU and VRAM resources, and the response speed of manual monitoring is limited by the timeliness of monitoring, making it difficult to stop losses immediately when metrics deteriorate.
[0005] The reason why existing technologies struggle to overcome the aforementioned problems lies in the prevailing perception that the canary release ratio is a fixed, pre-set sequence, and online monitoring metrics are merely used for manual monitoring and alerts. Furthermore, the decision to increase or roll back deployments is considered part of operations management and unrelated to automated control. Consequently, canary release schemes do not treat the canary release ratio as a controllable variable that can be adjusted by online metrics, nor do they treat quality and latency metrics as feedback signals to form a closed loop. Therefore, the core technical bottleneck restricting the engineering deployment of large-scale metering model inference services lies in how to adaptively accelerate or roll back the canary release of services under the constraints of service level agreements, based on the online quality and latency metrics of new versions, thereby controlling release risks while ensuring service availability. Summary of the Invention
[0006] To address the core bottleneck of existing technologies for canary deployment of large-scale econometric model inference services, where the canary traffic ratio is treated as a manually preset fixed step, making it impossible to adaptively increase volume and stop losses based on online metrics, and thus making it difficult to balance deployment risk control and service availability during the deployment process, this invention provides an engineered deployment method for large-scale econometric model inference services based on canary deployment. By reversing the canary traffic ratio into a controlled variable controlled by feedback from online quality and latency metrics, under the constraints of the service level agreement, this method achieves adaptive accelerated volume increase when metrics meet the target and automatic flow reduction and rollback when metrics deteriorate, thereby controlling deployment risk while ensuring the availability of the inference service.
[0007] The technical solution of this invention is: an engineering deployment method for a large-scale econometric model inference service based on canary release, comprising the following steps: encapsulating the current version and the version to be released of the large-scale econometric model into containerized inference services and deploying them on a container orchestration cluster, resulting in a current version inference service handling the mainstream traffic and a version to be released inference service handling canary traffic; the service gateway weights and segments inference requests according to the canary traffic ratio; within a sliding time window, online operating metrics such as the tail quantile of the response time, request success rate, and inference quality score of the two inference services are collected respectively, and the online operating metrics of the version to be released inference service are aggregated into a comprehensive quality-latency metric; and the calculation is performed on the inference service. The overall quality-latency metric is the deviation of the service level agreement (SLA) threshold from the current version baseline metric. When the deviation is higher than the upper limit of the dead zone, the gray traffic ratio is increased by an increment positively correlated with the deviation and not exceeding the upper limit of the ramp rate determined by the default risk budget. When the deviation is within the dead zone, it remains unchanged; when it is lower than the lower limit of the dead zone, the gray traffic ratio is decreased. When the overall quality-latency metric is lower than the SLA threshold for a continuous set number of sliding time windows, the gray traffic ratio is set to zero and rolled back. The updated gray traffic ratio controls the service gateway to perform weighted segmentation and enter the next window, forming a closed-loop feedback control. This invention further provides an online aggregation method for inference quality scores, a normalized aggregation method for overall quality-latency metrics, a proportional feedback control law with a dead zone, an update method for the upper limit of ramp rate and budget consumption based on the default risk budget, a rollback method for continuous over-limit judgment and isolation cooling, and an elastic scaling method based on the gray traffic ratio.
[0008] The beneficial effects of this invention are as follows: First, by using the proportion of gray-scale traffic as a controlled variable and the deviation of the overall quality-latency index relative to the service level agreement threshold and the current version baseline as a feedback signal to form a closed loop, the rate of volume expansion is adaptively adjusted according to the online performance of the new version. The mechanism is that the deviation of the online index precisely measures all the information needed to make the decision on whether it is safe to expand the volume, thus transforming the open-loop, manually fixed-step volume expansion into a closed-loop, index-driven adaptive volume expansion. Compared with the manually preset step volume expansion, this invention expands the volume faster when the new version performs well and stops losses earlier when the new version deteriorates. Second, by introducing an upper bound for the volume expansion rate determined by the default risk budget, the incremental volume of a single step is limited by the constraint that even if the new version suddenly deteriorates in the next window, the default caused by the affected traffic will not exceed the budget. The mechanism is that the availability constraint of the service level agreement is explicitly translated into an upper bound for the volume expansion rate, thus maintaining the availability baseline while pursuing the speed of volume expansion, avoiding the overreach of pure proportional volume expansion when the index is temporarily good. Third, by using a proportional control law with a dead zone and a continuous limit-crossing judgment, the gray-scale traffic ratio remains stable when the indicator is within the allowable range, and only triggers rollback when the indicator continuously exceeds the limit. The mechanism is that the dead zone and the continuous judgment together filter out the inter-window jitter of the indicator, avoiding frequent volume surges and rollback oscillations caused by single-window noise. The above effect is not a simple summation of the effects of various technical features: the gray-scale traffic ratio, a controlled variable, is not only the control quantity of the service gateway's weighted traffic switching, but also the multiplier of the default risk budget consumption rate, and the input of the number of replicas for elastic scaling. A controlled variable runs through the three stages of traffic switching, risk measurement, and resource scheduling, and is corrected for the next window value by the feedback from the end online indicators and the remaining budget, forming a closed-loop collaborative gain chain of indicator collection → comprehensive evaluation → volume surge or rollback → traffic switching and scaling → re-collection, producing a nonlinear collaborative effect that cannot be achieved by a single feature. Attached Figure Description
[0009] Figure 1 This is an overall flowchart of the engineering deployment method for the large-scale measurement model inference service based on gray-scale release of the present invention; Figure 2 This is a diagram of the engineering deployment architecture for the inference service of this invention; Figure 3 This is a flowchart of the indicator-driven adaptive grayscale sliding and rollback closed-loop control of the present invention. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention. This embodiment takes an online inference service for a large-scale metering model deployed by a provincial power metering center as an example. This service provides inference capabilities such as metering data analysis, alarm attribution, and user quantity-price Q&A. It handles a large number of concurrent requests daily from the metering automation system and the marketing business system. Its overall process is as follows: Figure 1 As shown, the process includes, in sequence, containerized dual-version deployment, inference performance optimization, version-based online metric collection, comprehensive quality-latency metric aggregation and metric deviation calculation, error budget update and upper bound determination of the scaling rate, adaptive canary traffic ratio feedback control with dead zones, continuous limit violation judgment and automatic rollback, service gateway weighted flow switching and load balancing failover circuit breaking rate limiting, and elastic scaling up and down according to the canary traffic ratio. For ease of description, the following text uses window numbers. Mark the first Each online operating metric and grayscale traffic ratio is updated window by window, with the window number as the index.
[0011] Step S1 involves containerizing and deploying both the current and upcoming versions of the large-scale econometric model. For example... Figure 2 As shown, the current version and the version to be released of the large-scale econometric model are encapsulated as containerized inference services. Each containerized inference service exposes both a Hypertext Transfer Protocol (HTTP) interface and a Remote Procedure Call (RPC) interface: the HTTP interface handles general requests from business systems, while the RPC interface handles more latency-sensitive internal calls. The container images of both versions are submitted to a container orchestration cluster, which then schedules them to run on compute nodes equipped with GPUs. The current version of the inference service is the stable, online version that handles the main traffic, while the version to be released is the new version to be deployed and handles the gray-scale traffic.
[0012] A service gateway is set up between the two inference services. This service gateway serves as the unified entry point for all inference requests, responsible for weighted distribution of inference requests between the current version of the inference service and the version to be released, based on the proportion of canary traffic, and performing load balancing within each version. (Note: The last sentence appears to be incomplete and possibly refers to a different topic.) The grayscale flow ratio of the window is Then in the first Within the window, the expected proportion of inference requests reaching the service gateway is [percentage missing]. The request was routed to the inference service of the release version, at a ratio of The request is routed to the current version of the inference service. In the formula, For the first The grayscale flow rate of the window is a dimensionless scalar, taking values within a closed interval. , This indicates that all requests are handled by the current version of the inference service. This indicates that all requests will be handled by the inference service of the version to be released, with its initial value... Choose a smaller positive number so that the new version can be tested on a small scale first; subscript This represents the sliding time window number, which is a non-negative integer. It should be noted that this invention does not require the grayscale flow rate ratio to follow a pre-set stepped value. The value of is determined online by the feedback control law in subsequent steps, which is the fundamental difference between this invention and manual step-by-step quantity release.
[0013] Step S2 involves inference performance optimization based on integer quantization, continuous batch processing, and inference caching. To ensure the inference service meets low latency and high concurrency requirements, inference performance optimization is performed on the large econometric model. Firstly, integer quantization is performed on the model weights, converting the weights represented as floating-point numbers to 8-bit or 4-bit integers. This significantly reduces memory usage and computational latency while relegating any potential changes in inference quality caused by quantization to subsequent gating steps for measurement. Secondly, continuous batch processing is adopted at the inference execution layer. Instead of waiting for a fixed batch size to accumulate, newly arriving requests are dynamically added to the current batch after each decoding step, while completed requests are removed. This improves the throughput utilization of the graphics processor and reduces queuing latency under high concurrency. Thirdly, an inference cache is set up to reuse computed intermediate or final results for identical or highly similar inference requests, reducing redundant computation. These three methods are known inference performance optimization techniques in the field. Their internal implementation is not detailed here; they are only used as the engineering foundation to ensure that the two versions of the inference service meet the throughput and latency baselines.
[0014] It should be noted that when the inference service of the version to be released adopts a different quantization bit width than the current version (for example, the current version uses an eight-bit integer while the version to be released uses a four-bit integer), the difference in quantization bit width may bring about changes in inference quality. This change will be perceived by the feedback control law through the subsequent comprehensive quality-latency index, so that the degree of quantization aggressiveness and the scaling decision are naturally coupled, without the need for manual prediction of whether quantization is acceptable.
[0015] Step S3: Collect end-to-end online performance metrics by version. After the service gateway switches traffic according to the gray-scale traffic ratio, the current version of the inference service and the version to be released each receive a portion of the real traffic. Within each sliding time window, collect the online performance metrics of the two inference services by version, including response time tail percentile, request success rate, inference quality score, and graphics processor utilization and video memory usage. Taking the version to be released inference service as an example, record its performance metrics in the [number]th [period]... The window's response time tail quantile is Request success rate Reasoning quality is divided into Graphics processor utilization rate Video memory usage rate In the formula, Inference services for the upcoming release version in the first... The 99th percentile of the response time for all inference requests within the window is a positive scalar in milliseconds, representing tail latency. This is the ratio of the number of successfully returned requests within this window to the total number of requests. It is a dimensionless scalar, and its value is taken from... ; The reasoning quality score for this window is a dimensionless scalar, taking values from... Its definition is shown in the following formula; This is the time average of the graphics processor utilization within this window, a dimensionless scalar, and its value is taken from... ; This is the time-averaged video memory usage within the specified window, a dimensionless scalar value, and its value is taken from... .in and It is not included in the quality-delay evaluation, but is consumed in the elastic scaling up and down process in step S9.
[0016] Online inference for large econometric models lacks real-time manually labeled truth values; therefore, the inference quality score must be constructed from online-available quality surrogate quantities. This embodiment processes each inference request handled by the inference service of the version to be released. Calculate its single-request quality proxy score: In the formula, For the first The single-request quality proxy score for each inference request is a dimensionless scalar, taking values from... The value of this formula is calculated to indicate that the higher the quality of the reasoning, the greater the value of the reasoning. Let be the normalized confidence level of the inference output, which is a dimensionless scalar and takes the value of . It is obtained by normalizing the average log probability of each word in the output; The format compliance of the output of this inference is represented by a dimensionless scalar, with a value of . The measurement output conforms to the field structure, numerical range and unit specifications required by the measurement business. If it is fully compliant, the value is 1; if it is not fully compliant, the value is 0. The degree of consistency between the output of this inference and the shadow output of the current version of the inference service for the same inference request is given by a dimensionless scalar value. This is obtained by simultaneously performing shadow reasoning on the current version of the reasoning service for the same request and comparing the semantic consistency of the outputs of the two versions; , , The weights for confidence level, format compliance, and consistency are respectively, all of which are positive dimensionless scalars and satisfy the following conditions: In this embodiment, , , All three proxy metrics mentioned above can be calculated online upon inference return without manual annotation. The inference quality score for that window is obtained by averaging the quality proxies for all single requests within the window. In the formula, Inference services for the upcoming release version in the first... The reasoning quality score for the window has the same meaning as before; For the first The total number of inference requests processed by the release version inference service within the window is a positive integer. This indicates the range from item 1 to item 2 in the window. The inference requests a summation; For single-request quality proxy scoring, the definition is the same as before. A window average is used here instead of taking a single-point extreme value because averaging is more robust to occasional anomalies in individual requests, preventing individual anomaly outputs from dominating the quality evaluation. The inference quality score for the current version of the inference service is collected in the exact same way and denoted as... This is used to construct the baseline in step S4.
[0017] Step S4: Aggregate overall quality-delay indicators and calculate indicator deviation. For example... Figure 3 As shown, to incorporate multiple online operational metrics with different dimensions and orientations into a unified, comparable evaluation, the tail quantile of response time is first normalized to a delay satisfaction rate. Since a smaller tail quantile is better, while a higher quality score and success rate are better, the tail quantile is normalized and truncated using the response time threshold specified in the service level agreement. In the formula, Inference services for the upcoming release version in the first... The window's delayed satisfaction is a dimensionless scalar, taking values from 1 to 1. The value calculated by this formula is equal to 1, which means that the tail quantile delay is within the service level agreement threshold. The smaller the value is than 1, the more the tail quantile delay exceeds the threshold. The response time threshold specified in the Service Level Agreement is a positive scalar value in milliseconds (ms). In this embodiment, it is taken as... ms; The response time tail quantile, in milliseconds, is defined in the same way as step S3; This indicates that the smaller of the two values is used to truncate the delayed satisfaction score to no more than 1. The overall quality-delay index is obtained by weighted summing of the reasoning quality score, request success rate, and delayed satisfaction score. In the formula, Inference services for the upcoming release version in the first... The window's overall quality-delay index is a dimensionless scalar, taking values from... Calculated by this formula, it is a single scalar characterization of the online performance of the new version. The larger the value, the better the overall performance of the new version in terms of quality and latency. , , The weights for reasoning quality score, request success rate, and delayed satisfaction are respectively, all of which are positive dimensionless scalars and satisfy the following conditions: In this embodiment, , , Their relative magnitudes reflect the degree of importance attached to quality, success rate, and latency. By aggregating the online operational metrics of the current version of the inference service using the exact same weights and aggregation methods, the baseline metrics for the current version of the inference service are obtained. Its dimensions and range of values are the same The evaluation of the overall quality-latency metric must align with two benchmarks: the absolute minimum stipulated in the service level agreement (SLA) and the real-time performance of the current version's inference service; that is, the new version should at least not be inferior to the older version currently in service. Therefore, the larger of the two is taken as the reference level, and the deviation is used to measure the margin of the new version relative to that level. In the formula, For the first The reference level of the window is a dimensionless scalar, and its value is taken from... The value is obtained by taking the larger of the Service Level Agreement threshold and the current version baseline metric from this formula. The Service Level Agreement (SLA) threshold for the Overall Quality-Delay Index is a dimensionless scalar, with values ranging from... This represents the absolute minimum requirement that the comprehensive indicator must not be lower than. In this embodiment, we take... ; The baseline metric for the current version is defined as before; This indicates taking the larger of the two options; For the first The window's performance deviation is a dimensionless scalar quantity, obtained by subtracting the reference level from the overall quality-delay index. A value greater than zero indicates that the new version performs better than the reference level, while a value less than zero indicates that the new version performs worse than the reference level. This is precisely the input deviation of the subsequent feedback control law. It should be noted that the larger of the service level agreement threshold and the current version baseline is taken here, so that the deviation is positive only when the new version is better than both the absolute bottom line and the old version in service. This prevents the situation where the new version meets the bottom line but is worse than the old version and is still released.
[0018] Step S5 updates the error budget and the upper bound of the ramp-up rate under the service level agreement (SLA) constraint. The risk of canary ramp-up stems from the possibility that the new version might suddenly degrade in the next window, causing traffic already switched to the new version to experience quality degradation. To explicitly translate the SLA availability constraint into a limit on the ramp-up rate, this invention introduces a default risk budget. The remaining default risk budget at the start of the window is It states that during the entire rollout process of this release, the remaining unconsumed portion of the maximum percentage of default requests caused by the inference service of the upcoming release version is still allowed. At the end of each window, the budget will be deducted based on the actual defaults that occurred in that window: In the formula, For the first The remaining default risk budget at the start of the window is a dimensionless scalar, which is calculated using this formula; For the first The remaining default risk budget at the start of the window is a dimensionless scalar, and its initial value is... This embodiment takes the total default budget allowed for this release. This means that during the entire rollout process, the number of default requests caused by the new version shall not exceed five per thousand of the total requests; Define the grayscale flow ratio as in step S1; Success rate of requests for inference services for the upcoming release version. Both of these are dimensionless quantities, representing the failure rate of their requests. For the first The proportion of default requests caused by the new version within a window represents the total number of requests, i.e., the budget consumption for that window. This formula indicates that the higher the proportion of gray-scale traffic and the higher the failure rate of the new version, the faster the budget is consumed, and the remaining budget... Consequently, it decreases. Under the constraint of the residual default risk budget, the first... Upper bound of window scaling rate: In the formula, For the first The upper bound of the window's scaling rate is a dimensionless scalar and non-negative, calculated by this formula, representing the upper limit that the single-step increment of the grayscale flow rate ratio of this window must not exceed. Let be the budget allocation coefficient, which is a dimensionless scalar and takes values of . This indicates the maximum percentage of the remaining budget used in each step; in this embodiment, we take... ; This means that when the remaining budget is negative, it is used in the calculation as zero, thus ensuring that the upper bound of the volume expansion rate is not negative; Let be the estimated default rate per unit grayscale flow under the worst-case scenario, and be a dimensionless scalar with a value of . This indicates the conservatively estimated value of the request failure rate if the new version deteriorates in the next window. In this embodiment, it is taken as... Dimensionally, and All of them are dimensionless quantities, therefore It is a dimensionless quantity. The mechanism of this formula is: to control the default caused by the next step's newly added grayscale traffic under the worst-case scenario within the budget share that is willing to be used in this step, that is... Therefore, even if the new version suddenly degrades after mass production, the defaults caused by the affected incremental traffic will not exceed the budget. It can be seen that as the budget is consumed... As the capacity is reduced, the upper bound of the expansion rate narrows until the expansion automatically stops when the budget is exhausted. This provides a natural brake on expansion driven by availability constraints.
[0019] Step S6, adaptive grayscale flow proportional feedback control law with dead zone. (For example...) Figure 3 As shown, the key to this invention lies in treating the grayscale flow ratio as a controlled variable and controlling the index deviation. This forms a closed-loop feedback control, acting as a feedback signal. The core insight here is that the grayscale flow ratio should not be a pre-set fixed step sequence, but rather a quantity that adaptively adjusts according to the deviation of online indicators—a positive and larger indicator deviation indicates a safer new version, and the flow should be increased more rapidly; a negative indicator deviation indicates that the new version is inferior to the reference level, and the flow should be reduced. To avoid frequent fluctuations in flow and current reduction caused by indicator jitter around the reference level, a dead zone is set: action is only taken when the indicator deviation exceeds the dead zone; if it falls within the dead zone, the grayscale flow ratio remains unchanged. Based on this, a proportional control law with a dead zone is given: , , In the formula, For the first The window's volume increment is a dimensionless scalar, calculated by this formula. A positive value indicates an increase in the grayscale flow ratio (volume increase), zero indicates no change, and a negative value indicates a decrease in the grayscale flow ratio (flow decrease). To control the gain, is a positive dimensionless scalar, representing the grayscale flow rate adjustment amount corresponding to each unit of dead zone deviation. In this embodiment, it is taken as... , The larger the value, the more aggressive the increase and decrease in volume; the smaller the value, the more gradual the increase and decrease. Let be the dead zone half-width, and be a positive dimensionless scalar. In this embodiment, we take . , For the volume range, Dead zone interval This is the area of decreasing flow. For the indicator deviation, define the same step S4; Define the upper bound of the volume expansion rate as in step S5; This indicates taking the smaller value, used to cut off the volume increase within the upper limit of the volume rate. For the first The grayscale ratio of the window, For the first The grayscale flow ratio of the window; Indicates to Cut off in closed interval That is, take This control law is used to ensure that the grayscale flow ratio remains at a legal value. It has clear physical and engineering implications: In the expansion range, the expansion increment is proportional to the portion of the index deviation exceeding the dead zone; the better the index, the faster the expansion, while being constrained by the upper limit of the expansion rate to avoid overreaching. In the dead zone, the grayscale flow ratio remains constant, filtering out inter-window jitter in the index. In the reduction range, the expansion increment takes a negative value; if the index deteriorates, the flow is immediately reduced, and the reduction direction is a safe direction, not restricted by the upper limit of the expansion rate, allowing for a faster recovery. It should be noted that expansion is achieved here using proportional control with a dead zone rather than continuous control without a dead zone because the online index itself contains sampling noise. Control without a dead zone would cause the grayscale flow ratio to oscillate slightly around the reference level, which is unnecessary and increases flow switching overhead. The introduction of the dead zone ensures that control only activates when the index clearly improves or deteriorates, balancing response speed and stability.
[0020] Step S7: Continuous Limit Exceedance Detection and Automatic Rollback. The proportional control law with a dead zone handles the gradual change of the indicator. However, for situations where a serious defect in a new version causes a rapid deterioration of the indicator, a fast stop-loss mechanism independent of the gradual change control is needed, i.e., rollback. To avoid erroneous rollbacks caused by occasional noise in a single window, this invention employs continuous limit exceeding judgment. First, the limit exceeding indicator is calculated for each window: , In the formula, For the first The window's out-of-limit indicator takes a value from A dimensionless quantity, where 1 indicates that the window has exceeded the limit and 0 indicates that it has not exceeded the limit; As a comprehensive quality-delay index, For its service level agreement threshold, This indicates that the overall performance of the new version has fallen below the absolute bottom line; Budgeting for remaining default risk, This indicates that the default budget has been exhausted; the over-limit indication is true if either of the following two conditions is met. A rollback is then triggered continuously for consecutive windows: In the formula, Indicates the first Window to the first The window's out-of-limit indicator sums up, i.e., the nearest... The number of consecutive windows in which the out-of-limit indicator is true; The number of continuously determined windows is a positive integer; in this embodiment, it is taken as... When recently If the out-of-limit indicators of all consecutive windows are true, and their sum equals 1 / 2, then the total number of windows is equal to 1 / 2. If a continuous violation of limits is detected, the grayscale flow ratio of the next window will be adjusted. The value is immediately set to zero, and the service gateway switches all inference requests back to the current version of the inference service, completing the rollback. After the rollback, the inference service for the version to be released is marked as isolated, and the inference service for the version to be released in isolation will no longer accept canary traffic. The number of continuous determination windows is then determined. The introduction of this feature ensures that rollback is both sensitive enough and not falsely triggered by noise in a single window: occasional degradation of metrics in a single window will not trigger a rollback; only when multiple consecutive windows continuously exceed the limit will it be determined that the new version has a substantial defect. Thus, gradual changes are handled by flow reduction with a dead-zone proportional control law, and sudden changes are handled by rollback based on continuous limit exceedances. Together, these two constitute a tiered stop-loss mechanism.
[0021] Step S8 involves the service gateway performing weighted traffic switching and load balancing, failover, and circuit breaker rate limiting. The service gateway uses the updated canary traffic ratio given in step S6 or S7. Perform weighted flow switching: For each arriving inference request, apply a probability-based approach. Routing to the inference service of the release version, based on probability Routing to the current version of the inference service, thus statistically making the proportion of canary traffic equal to... Within each version, the service gateway performs load balancing across multiple replicas of that version, distributing requests evenly across all replicas to avoid overloading a single replica. Simultaneously, the service gateway configures circuit breaking and rate limiting for both versions: when the request failure rate or queuing latency of a version exceeds the circuit breaking threshold, a circuit breaker is triggered for that version, suspending request forwarding and causing rapid failures to prevent the fault from propagating; when the request rate exceeds the rate limiting threshold, the excess requests are rate-limited to protect the backend inference service from being overwhelmed by sudden surges. Specifically, the circuit breaking for the inference service of the version to be released is independent of the current version's inference service: when the inference service of the version to be released is circuit broken due to a serious defect, its effect is equivalent to temporarily switching gray-scale traffic back to the current version's inference service, forming another layer of protection besides rollback. Furthermore, the service gateway is configured for failover: when a replica of a version becomes unreachable, requests that should have been sent to that replica are forwarded to other healthy replicas of the same version; when a version is entirely unavailable, its traffic is forwarded to another version to ensure service continuity. The aforementioned load balancing, failover, and circuit breaker current limiting are known techniques in the field. This invention incorporates them into the execution layer of flow switching based on grayscale flow ratio, and works in conjunction with the aforementioned feedback control.
[0022] Step S9 involves elastic scaling up and down with the proportion of gray-scale traffic and coordinated scheduling of graphics processor resources. Increased traffic volume itself alters the traffic handled by the inference service of the version to be released: if the proportion of gray-scale traffic increases while the number of replicas remains unchanged, the inference service of the version to be released will experience increased latency and decreased success rate due to overload. This degradation will then be fed back through steps S3 to S6 as a rate reduction or even triggering a rollback, forming a vicious coupling where increased traffic volume leads to self-degradation. To break this coupling, this invention allows the number of replicas of the inference service of the version to be released to elastically scale up and down with the proportion of gray-scale traffic. Let the total inference request rate be... The inference service for the version to be released is in the... The required grayscale flow rate for the window is Based on this, the number of copies is determined: In the formula, Inference services for the upcoming release version in the first... The number of window replicas is a positive integer, calculated using this formula; Define the updated grayscale traffic ratio as in step S6; For the first The total rate of inference requests reaching the service gateway within the window is a positive scalar, measured in req / s (requests per second). The rate of gray-scale traffic that the inference service for the upcoming version needs to handle, in req / s; This represents the single-replica inference throughput, a positive scalar, and is measured in req / s, indicating the number of requests a single replica can process per second while meeting latency requirements. Let be the target utilization rate, and be a dimensionless scalar with a value of . This indicates that the copy reserves a certain margin and does not operate at full capacity. In this embodiment, we take... ; This represents the effective throughput of a single replica at the target utilization rate, in req / s. This indicates rounding up to the nearest integer, ensuring that the number of replicas is an integer and sufficient to handle grayscale traffic. The maximum number of replicas is a positive integer, determined by the number of inference service instances that can be accommodated by the memory of a single graphics processor in the container orchestration cluster and the number of available graphics processors. It is used to constrain the number of replicas within the range allowed by the graphics processor's memory. This indicates that the smaller value is taken. According to this formula, when the proportion of grayscale traffic increases, the number of replicas increases accordingly; when the proportion of grayscale traffic decreases or is rolled back to zero, the number of replicas decreases accordingly or is even released. This ensures that the inference service of the version to be released always handles grayscale traffic at a state close to the target utilization rate, avoiding both overload after increasing volume and resource idleness after reducing volume. The graphics processor utilization rate collected in step S3... With video memory usage Consumed here: Utilization rate is used to verify whether the target utilization rate has been reached after scaling up or down. Memory usage rate is used to determine the upper limit of the number of replicas. .
[0023] The various steps of this invention form a closed-loop data flow with sequential coupling and end-feedback, such as... Figure 3 As shown. Step S1 is performed by the service gateway according to the grayscale traffic ratio. Traffic is cut off, generating versioned traffic; step S3 collects online operation metrics on this traffic in versioned form. , , , , Step S4 aggregates the metrics for the version to be released into a comprehensive quality-delay metric. and in conjunction with the current version baseline Calculate the deviation of the index Step S5 is based on the success rate. Grayscale flow ratio Update remaining default risk budget And based on this, determine the upper limit of the volume expansion rate. Step S6 uses the index deviation With the upper bound of the volume expansion rate The grayscale flow ratio is updated by the dead zone proportional control law. Step S7 uses the comprehensive quality-delay index. With remaining budget The continuous over-limit determination determines whether to Set to zero and rollback; step S8 Drive service network concern flow; step S9 with Drives elastic scaling. Updated Return to step S1 and proceed to the next window for acquisition and update, thereby closing the feedback loop of cut-through → acquisition → evaluation → volume increase or rollback → cut-through.
[0024] As can be seen, the grayscale flow ratio It is a pivotal variable throughout the entire process: it is both the control variable for the weighted flow switching of the service gateway in step S1 and the rate of consumption of the default risk budget in step S5. The multiplier, or the number of replicas in step S9 with elastic scaling. The input is a controlled variable that is reused in the three stages of flow switching, risk measurement, and resource scheduling, and its value is determined by the end-point online indicators. With remaining budget The feedback loop correction creates synergistic gains, rather than a simple summation of the effects of each step. In terms of data flow, each metric introduced in step S3 is consumed by subsequent steps: Delayed satisfaction is incorporated into the comprehensive index. This information is incorporated into the overall indicators and used for budgetary expenditures. Entering the comprehensive indicators, and Used for elastic scaling; there are no data objects that are introduced but not consumed.
[0025] Consistency of single-request quality agent scoring in step S3 The implementation of shadow inference is as follows: For inference requests routed to the inference service of the version to be released, a copy is simultaneously sent to the current version's inference service for shadow inference at a certain sampling ratio. The results of shadow inference are not returned to the business side; they are only used for quality comparison, thus not affecting business latency. For the outputs of the two versions, key fields (such as judgment conclusions, alarm categories, and price / quantity ranges) are extracted according to the semantics of the metering business, and the consistency is obtained by comparing each field. To control the additional computational overhead of shadow inference, the sampling ratio can be appropriately reduced as the proportion of gray-scale traffic increases. This is because when the proportion of gray-scale traffic is large, the number of requests participating in the statistics is sufficient, and it is unnecessary to perform shadow inference for every request. It is important to emphasize that shadow inference is only used to obtain quality proxy quantities under conditions without manual annotation. It does not participate in business decisions and therefore does not constitute interference with business operations.
[0026] After step S7 triggers the rollback, the inference service of the version to be released enters an isolated state. This embodiment further records the online operating metrics and their corresponding windows when the trigger limit indication is true, serving as a degradation attribution record for the inference service of the version to be released, allowing developers to locate defects. For example, if the rollback is triggered by the overall quality-latency metric falling below the threshold, and this fall is mainly due to a decrease in latency satisfaction, the attribution record points to a latency rollback in the new version; if it is mainly due to a decrease in inference quality score, the attribution record points to a quality rollback in the new version. Simultaneously, an isolation cooling-off period is set. During this period, the proportion of gray-scale traffic for the inference service of the version to be released remains zero, avoiding repeated deployment of the same defective image. Only after the cooling-off period expires and the image of the inference service of the version to be released has been repaired and updated is the gray-scale traffic proportion allowed to restart from zero, re-entering the closed-loop feedback control. Therefore, rollback is not simply a matter of switching back to the old version, but rather constitutes a complete release risk closed loop with attribution, cooling-off, and redeployment.
[0027] In step S1, each containerized inference service exposes both Hypertext Transfer Protocol (HTTP) and Remote Procedure Call (RPC) interfaces. For batch analysis requests from the metering automation system, the HTTP interface is used to facilitate integration with existing business systems; for latency-sensitive real-time alarm attribution, the RPC interface is used to reduce protocol overhead. The service gateway switches traffic to both protocols at the same gray-scale traffic ratio, making the protocol differences transparent to gray-scale releases. Requests from both interfaces are uniformly executed via continuous batch processing after entering the inference service; therefore, protocol differences do not affect the inference performance optimization effect.
[0028] Example 1: Adaptive acceleration of volume increase when the new version performs well.
[0029] Taking a typical iteration of a large-scale econometric model as an example, the version to be released has passed basic functional verification in offline evaluation. According to this invention, the initial grayscale traffic ratio is processed as follows: A threshold of 0.05 is used initially, meaning a trial run with 5% traffic is initiated. The service gateway switches traffic at 0.05, and elastic scaling allocates the corresponding number of replicas to the inference service of the upcoming release version based on this threshold. The first window collects the tail quantile of the response time, success rate, and inference quality score of the upcoming release version, aggregating them to obtain the overall quality-latency metric. Current version baseline The reference level is taken as the larger of the two values and the service level agreement threshold of 0.85, which is 0.90. The index deviation... The value is 0.02 above the dead zone half-width, falling into the volume expansion range; at this point, the remaining budget is sufficient, the upper bound of the volume expansion rate does not constitute a constraint, and the volume increase... The grayscale traffic ratio has been updated to If the new version continues to perform well and the metric deviation remains positive, the gray-scale traffic ratio will adaptively increase window by window according to the control law. Furthermore, as the gray-scale traffic ratio increases and the number of requests participating in the statistics per window increases, the estimation of quality and latency metrics becomes more stable, accelerating the rollout until the gray-scale traffic ratio approaches 1, completing the full rollout. Compared to the method of manual rollout by operations personnel according to preset tiers and manually observing and deciding when to enter the next tier, this invention can adaptively accelerate rollout without manual intervention when the new version performs well, shortening the release cycle and reducing the resource consumption caused by the long-term coexistence of old and new versions.
[0030] Example 2: Automatic flow reduction and rollback when the new version degrades under high concurrency.
[0031] Taking another version iteration as an example, the version to be released adopted a more aggressive four-bit integer quantization, which passed offline evaluation, but the inference quality regressed under real high concurrency. According to this invention: when the volume is increased to a grayscale traffic ratio of 0.3, the inference quality score decreases due to quantization regression. Simultaneously, under high concurrency, the tail quantile latency increases, and the latency satisfaction decreases, resulting in a comprehensive quality-latency index. The value dropped to 0.88, which, while still above the Service Level Agreement threshold of 0.85, is below the current version baseline. The reference level is 0.91, and the index deviation is... Below the lower limit of the dead zone If the traffic volume falls into the reduction range, the incremental increase is negative, and the proportion of gray-scale traffic is automatically reduced, stopping further increases. If the metrics still do not improve after the reduction, and the overall quality-latency metric further falls below the service level agreement threshold of 0.85, then the over-limit indicator is true. When the over-limit indicator is true for three consecutive windows, it is determined to be a continuous over-limit, the proportion of gray-scale traffic is directly set to zero, all traffic is switched back to the current version of the inference service, and the rollback is completed. The inference service of the upcoming version enters an isolation state and records the quality regression caused by the degradation attribution to quantitative analysis. The entire traffic reduction and rollback process does not require manual monitoring. The latency from metric degradation to stop-loss rollback is determined by the window length and the number of continuous judgment windows, which is much faster than the rollback relying on manual observation. In contrast, due to the lack of an automatic traffic reduction and rollback mechanism based on online metrics, it is necessary to rely on operations personnel to manually switch back after noticing anomalies, and the stop-loss latency is limited by the speed of manual response.
[0032] On a release test set containing normal iteration samples and manually injected defective samples, this invention was compared with a gray-scale release method involving manual incremental release in preset steps followed by manual rollback. The results show that for normal iteration samples, this invention adaptively accelerates incremental release due to good performance metrics, achieving a significantly shorter time to full rollback compared to manual fixed-step incremental release. For injected defective samples, this invention automatically reduces traffic and rolls back due to deteriorating performance metrics, resulting in a significantly shorter delay from defect manifestation to traffic switching back to the old version compared to manual rollback, and a significantly lower percentage of cumulative traffic experiencing quality degradation before rollback. These comparisons validate the advantages of this invention in balancing incremental release speed and release risk control.
[0033] To further verify the contribution of each technical feature, this embodiment also conducted ablation comparison. When the upper bound of the ramp rate determined by the default risk budget was removed from the complete method, and only the proportional control law with dead zone was retained, an aggressive ramp occurred during the window of brief improvement in the indicators. Subsequently, the new version deteriorated under higher traffic, leading to an increase in the cumulative defaults before the rollback, indicating that the upper bound of the ramp rate is indispensable for maintaining the availability baseline. When the upper bound of the ramp rate was retained but the dead zone was removed, degenerating into continuous control without dead zone, the grayscale traffic ratio showed frequent small ramp and current reduction oscillations near the reference level. The shunting overhead increased without bringing any ramp rate gains, indicating that the dead zone... The role of the zone in suppressing inter-window jitter is irreplaceable. When the continuous over-limit judgment is removed and replaced with single-window over-limit rollback, occasional index noise in individual windows causes erroneous rollbacks, unnecessarily interrupting versions that could have been released normally. This indicates that the continuous judgment is indispensable to avoid erroneous rollbacks. When the elastic scaling based on the grayscale traffic ratio is removed and the fixed replica count is increased, the version to be released becomes delayed due to overload after the scaling reaches a high ratio, which in turn triggers a rate reduction, preventing the scaling from proceeding. This indicates that the elastic scaling is indispensable to cutting off the coupling that causes the scaling to degrade itself. The four sets of ablation results collectively show that the upper bound of the scaling rate, the dead zone, the continuous over-limit judgment, and the elastic scaling are mutually supportive and indispensable around the controlled variable of the grayscale traffic ratio. This further confirms that the synergistic gain of this invention is not a simple summation of the effects of each feature.
[0034] Control gain Determining the aggressiveness of increasing and decreasing volume: This method can achieve indicator-driven adaptive volume increase within a relatively wide range of values, only when... Only when the value is extremely large will the grayscale flow ratio overshoot due to excessive single-step adjustment. Dead zone half-width Determine the tolerance level for indicator fluctuations: moderately increase It can more effectively suppress jitter, but an excessively large value will make the control less responsive to actual improvements or deteriorations in the indicators. Therefore, this embodiment selects a compromise value based on the performance on the released exercise set. Budget allocation coefficient Compared with the estimated default rate Together they determine the tightness or looseness of the upper limit of the volume increase rate: The smaller The larger the window size, the more conservative the rollout and the more guaranteed the availability, but the slower the rollout. A trade-off must be struck between release risk and release speed. Continuously determine the number of windows. Determines the sensitivity and noise immunity of rollback: A larger window size increases noise resistance but slows down loss control; this embodiment strikes a balance between the two by setting a value of 3. The sliding window length determines the time resolution of the feedback: a window that is too short results in insufficient samples per window and high noise in the metric estimation; a window that is too long leads to lag in feedback. This embodiment selects a window length that ensures each window has a sufficient number of requests, taking into account the traffic volume. The wide adjustable range of the above parameters indicates that this method is insensitive to hyperparameters and has good engineering robustness.
[0035] This invention addresses the specific technical problem of release risk control and service availability assurance during the version release process of large-scale econometric model inference services, rather than abstract management rules. Its technical approach involves using quantified online operational metrics (response time tail quantiles in milliseconds, request success rate, inference quality score, graphics processor utilization, and video memory usage) as feedback signals. An automatically executed feedback control law calculates the proportion of gray-scale traffic, and this proportion automatically drives the weighted traffic switching of the service gateway and the elastic scaling of the container orchestration cluster. Furthermore, it automatically triggers rollback when metrics consistently exceed limits. The entire process is completed automatically by the system, without relying on manual judgment or operation. It operates on specific technical units such as the service gateway, containerized inference service, and graphics processor, producing an inference service with guaranteed availability. Therefore, it is a technical solution to a technical problem.
[0036] The mechanism disclosed in this invention, which reverses the gray-scale traffic ratio into a controlled variable governed by online metric feedback, is not limited to a single econometric model, nor is it limited to the three types of online metrics listed in this embodiment. For inference services with more observables, more metrics such as first-word latency, batch processing queue length, and cache hit rate can be incorporated into the comprehensive quality-latency metric. For scenarios involving the simultaneous release of multiple candidate versions, a separate gray-scale traffic ratio can be maintained for each candidate version, forming a closed loop, allowing multiple candidate versions to compete for volume release under metric-driven conditions. For scenarios involving cross-regional multi-cluster deployments, a closed loop can be formed in each cluster, and budgets can be coordinated between clusters. Therefore, this invention provides a general framework for controlling the gray-scale traffic ratio using online metric feedback, exhibiting good scalability.
[0037] It should be noted that the values of sliding time window length, initial grayscale traffic ratio, various weights, service level agreement threshold, dead zone half-width, control gain, default budget, budget allocation coefficient, estimated default rate, continuous decision window number, and target utilization rate in the above embodiments are all examples. Those skilled in the art can adjust them within a reasonable range according to the actual inference service scale and business requirements without departing from the protection scope of this invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the protection scope of this invention.
Claims
1. An engineering deployment method for large-scale econometric model inference services based on gray-scale release, characterized in that, The method includes: The current version and the version to be released of the large-scale econometric model are encapsulated as containerized inference services and deployed on a container orchestration cluster to obtain the current version inference service that handles the mainstream traffic and the version to be released inference service that handles the gray traffic. The service gateway then weights and splits the inference requests between the current version inference service and the version to be released inference service according to the proportion of gray traffic. Within a sliding time window, online operation metrics of the current version of the inference service and the version to be released inference service are collected respectively. The online operation metrics include response time tail quantile, request success rate and inference quality score. The online operation metrics of the version to be released inference service are aggregated into a comprehensive quality-latency metric. Calculate the deviation of the overall quality-latency metric relative to the service level agreement threshold and the baseline metric of the current version of the inference service; When the indicator deviation is higher than the upper limit of the dead zone, the gray-scale traffic ratio is increased by the volume increase increment that is positively correlated with the indicator deviation, and the volume increase increment does not exceed the upper limit of the volume increase rate determined by the default risk budget of the service level agreement; when the indicator deviation is within the dead zone, the gray-scale traffic ratio is kept unchanged; when the indicator deviation is lower than the lower limit of the dead zone, the gray-scale traffic ratio is reduced. When the overall quality-latency index is lower than the service level agreement threshold for a continuous set number of sliding time windows, the gray-scale traffic ratio is set to zero, and the service gateway switches all inference requests back to the current version of the inference service. The updated gray-scale traffic ratio controls the weighted segmentation of the service gateway, and the online operation index collection and gray-scale traffic ratio update in the next sliding time window form a closed-loop feedback control of the gray-scale traffic ratio.
2. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 1, characterized in that, The collection of online operational metrics for the current version of the inference service and the version of the inference service to be released includes: For each inference request processed by the version to be released inference service, the single request quality proxy score of the inference request is obtained by weighting the normalized confidence, format compliance and consistency with the shadow output of the current version inference service for the same inference request. The inference quality score is obtained by averaging all single request quality proxy scores within the sliding time window. The utilization rate of the graphics processor and the video memory usage rate of the inference service of the version to be released are collected, and the utilization rate and the video memory usage rate are used as inputs for flexible scaling.
3. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 2, characterized in that, The aggregation of online operational metrics of the inference service for the version to be released into a comprehensive quality-latency metric includes: The dimensionless delay satisfaction is obtained by dividing the response time threshold of the service level agreement by the tail quantile of the response time and truncating it to no more than one. The inference quality score, the request success rate, and the delay satisfaction are weighted and summed with their respective non-negative weights to obtain the comprehensive quality-delay index with a value between zero and one, wherein the sum of the weights of the inference quality score, the request success rate, and the delay satisfaction is one.
4. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 3, characterized in that, The calculation of the deviation between the overall quality-latency metric and the service level agreement threshold and the baseline metric of the current version of the inference service includes: The baseline metrics of the current version of the inference service are obtained by using the online operation metrics of the current version of the inference service in the same aggregation method as the inference service to be released; The maximum value between the Service Level Agreement threshold and the baseline metric is taken as the reference level. The metric deviation is obtained by subtracting the reference level from the overall quality-latency metric of the inference service of the version to be released. The upper and lower bounds of the dead zone interval are determined by a set dead zone half-width, wherein the upper bound of the dead zone interval is the dead zone half-width and the lower bound of the dead zone interval is the opposite of the dead zone half-width.
5. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 4, characterized in that, The step of increasing the grayscale flow rate by a volume increment positively correlated with the deviation of the indicator includes: When the index deviation is higher than the upper limit of the dead zone interval, the control gain is multiplied by the difference between the index deviation and the upper limit of the dead zone interval to obtain the candidate volume increment. The minimum value between the candidate volume increment and the upper limit of the volume rate is taken as the volume increment. The grayscale flow ratio is updated with the sum of the grayscale flow ratio and the volume increment. When the index deviation is lower than the lower bound of the dead zone, the control gain is multiplied by the difference between the index deviation and the lower bound of the dead zone to obtain the negative value of the volume increase, so as to reduce the grayscale flow ratio and cut off the updated grayscale flow ratio between zero and one.
6. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 5, characterized in that, The upper bound of the scaling rate is determined by the default risk budget of the service level agreement, including: The upper bound of the scaling rate is obtained by multiplying the current remaining default risk budget by the budget allocation coefficient and then dividing by the estimated default rate of the unit gray volume in the worst case. At the end of each sliding time window, the budget consumption for that sliding time window is obtained by multiplying the grayscale traffic ratio by the request failure rate of the inference service of the version to be released within that sliding time window. The budget consumption is then deducted from the remaining default risk budget to obtain the remaining default risk budget for the next sliding time window.
7. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 1, characterized in that, Setting the grayscale flow rate ratio to zero includes: In each sliding time window, it is determined whether the overall quality-latency index is lower than the service level agreement threshold or whether the remaining default risk budget is less than zero. If either of these conditions is met, the limit-out indication for that sliding time window is recorded as true. When the over-limit indication is true for a set number of consecutive sliding time windows, the grayscale traffic ratio is set to zero, and the release version inference service is marked as isolated, so that the release version inference service in the isolated state no longer accepts grayscale traffic.
8. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 7, characterized in that, After marking the release version inference service as isolated, the process further includes: Record the online operating metrics that trigger the over-limit indication to be true and their corresponding sliding time windows, as the degradation attribution record of the inference service of the version to be released; Set an isolation cooling period during which the grayscale traffic ratio of the inference service to be released remains at zero. After the isolation cooling period expires and the image of the inference service to be released is updated, the grayscale traffic ratio is restarted from zero and enters the closed-loop feedback control.
9. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 1, characterized in that, The method also includes elastically scaling up and down the inference service of the version to be released according to the gray-scale traffic ratio: Multiply the gray-scale traffic ratio by the total inference request rate to obtain the gray-scale traffic rate. Divide the gray-scale traffic rate by the product of the single-replica inference throughput and the target utilization rate, and round up to obtain the number of replicas of the inference service to be released. The upper limit of the number of replicas is determined by the number of inference service instances that can be accommodated by the video memory of a single graphics processor in the container orchestration cluster. The number of replicas is truncated within the upper limit of the number of replicas, so that the replicas after elastic scaling can take over the updated grayscale traffic under the constraints of the graphics processor's video memory.
10. The engineering deployment method for large-scale econometric model inference service based on gray-scale release according to claim 1, characterized in that, The process of encapsulating the current version and the release version of the large econometric model into containerized inference services includes: Integer quantization is performed on the weights of the large econometric model to obtain a quantized inference service in which the weights are represented by eight-bit or four-bit integers, and inference requests are executed using continuous batch processing and inference caching. When the quantized inference service is used as the inference service for the version to be released, the inference quality score of the quantized inference service is included in the comprehensive quality-latency index, so that the inference quality change caused by quantization participates in the update of the gray traffic ratio through the index deviation.
Citation Information
Patent Citations
Cloud container gray release method based on Kubernetes
CN116954663A
