Automatic testing method and device based on product value distribution in system gray release

By automatically selecting and dynamically calculating the value distribution range, and by parallel calculating and sharpening the difference rate, the problem of frequent manual adjustment of the range and incomparability of sub-product differences in gray-scale release is solved, thus achieving efficient and accurate risk identification.

CN120994570AActive Publication Date: 2025-11-21BEIJING YULORE INNOVATION TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511518225.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2025-11-21
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Existing technologies require extensive manual configuration of return value ranges during canary releases. These ranges need frequent adjustments, and the differences between sub-products lack comparability, impacting the efficiency of automated testing and risk identification capabilities.

Method used

By automatically selecting sub-products that meet the configuration conditions, dynamically calculating the value distribution range, calculating the percentage difference rate of interval values ​​in parallel, sharpening the difference rate, identifying the value range and sub-product with the largest difference, and providing risk warnings.

Benefits of technology

It reduces the workload of manual configuration, ensures that the analysis samples are statistically significant, improves processing efficiency and the accuracy of risk identification, and can quickly process a large amount of sub-product data to comprehensively capture potential risk points during the gray-scale period.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994570A_ABST
    Figure CN120994570A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic testing method and device based on product value distribution in system gray release. The method comprises the following steps: screening sub-products meeting conditions to form a to-be-tested sub-product list; performing value interval division based on the API call return value, the ratio of the target call amount of the central interval and the number of the target intervals; a first calling amount ratio of each value interval of the target sub-product in the first N days and a second calling amount ratio of each value interval in a gray scale period are calculated through multi-thread parallel calculation, and the difference rate of the calling amount ratios of each value interval in the two time periods is calculated; performing calling amount sharpening processing on the original difference rate data, and performing proportion value sharpening processing based on the difference rate data after calling amount sharpening and the first calling amount proportion value of each target sub-product to obtain sharpened difference rate data; and identifying high-risk sub-products based on the sharpening difference rate data and generating a risk prompt report. According to the method, the capabilities of finding problems and identifying online risks in an automatic test in a gray release process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of software testing, in particular to a product value distribution-based automatic testing method and device in system gray release, which is used for automatically identifying potential problems and risks in the process of software system gray release. BACKGROUND

[0002] In the field of modern software development, gray release is a commonly used software iteration online strategy, which aims to reduce system change risk by gradually pushing new versions to part of the users. In the process of gray release, the automatic testing system plays a crucial role, which can monitor the system running state and discover potential problems in time.

[0003] The current automatic testing technology mainly identifies risks by comparing the differences of various indicators between the gray system and the original system. Especially for product systems with enumerable API return values, the return value enumeration interval is usually set, and the difference between the return value proportion of each interval in the gray period and the previous period is calculated to determine whether the system has abnormalities. For example, a cloud service platform will configure return value intervals for each API service, and monitor the changes of these intervals to determine whether the new version has problems.

[0004] A more typical method in the prior art is to manually pre-configure the return value enumeration and enumeration interval of each sub-product, and the automatic testing system calculates the return value proportion of each interval in the previous N days before gray release, and then calculates the return value proportion of each interval in the gray period, and then calculates the difference between the two, and identifies the sub-products with the largest difference as potential risk points.

[0005] However, this method has obvious limitations. First, when the number of sub-products is large, a large amount of manual work is needed to configure the return value interval; second, as time goes by and the production environment changes, the configured return value interval may no longer be applicable and needs to be adjusted frequently; third, the difference in the return value proportion of each interval of each sub-product calculated by the automatic system still needs manual judgment to determine whether there is an actual problem, and the differences between different sub-products lack effective comparability. Therefore, these problems seriously affect the efficiency, problem discovery and risk identification ability of automatic testing in the process of gray release. SUMMARY

[0006] The purpose of the present application is to provide a product value distribution-based automatic testing method and device in system gray release, which aims to solve the problem that the efficiency, problem discovery and risk identification ability of automatic testing in the process of gray release are seriously affected due to the need for a large amount of manual configuration of return value intervals, frequent adjustment of interval configuration and lack of comparability between sub-products.

[0007] To achieve the above object, in a first aspect, the application provides an automatic testing method based on product value distribution in system gray release, comprising: Based on the obtained preset calling quantity threshold, the first calling quantity data and the second calling quantity data of each sub-product in the previous N days and during the gray period are queried, and the sub-products whose first calling quantity data and second calling quantity data both exceed the corresponding calling quantity threshold are screened out to form a list of sub-products to be tested, wherein the calling quantity threshold includes a calling quantity threshold in the previous N days and a calling quantity threshold during the gray period, ; Based on the API calling return value of each target sub-product in the list of sub-products to be tested in the previous N days, value interval division is performed according to the API calling return value, a preset central interval target calling quantity proportion value and a target interval number execution value interval, and the value interval of each target sub-product is generated; The first calling quantity proportion value and the second calling quantity proportion value are calculated by multi-thread parallel computing, and the difference rate of the calling quantity proportion value of each value interval in the two time periods is calculated based on the first calling quantity proportion value and the second calling quantity proportion value as original difference rate data, wherein the first calling quantity proportion value is used to indicate that the calling quantity of the target sub-product in each value interval accounts for a percentage of the total calling quantity of the target sub-product, and the second calling quantity proportion value is used to indicate that the calling quantity of the target sub-product in each value interval accounts for a percentage of the total calling quantity; Based on the gray period calling quantity of each target sub-product in each value interval during the gray period, the original difference rate data is subjected to calling quantity sharpening processing to obtain calling quantity sharpened difference rate data, and the calling quantity sharpened difference rate data and the first calling quantity proportion value are subjected to proportion value sharpening processing to obtain sharpened difference rate data; Based on the sharpened difference rate data, the group average sharpened difference rate of each target sub-product is calculated, the a target sub-products with the highest group average sharpened difference rate are identified, and the b value intervals with the highest sharpened difference rate data are screened out, and the identified target sub-products and the target sub-products corresponding to the screened value intervals are merged and de-duplicated to generate a high-risk sub-product list and a corresponding risk prompt report, wherein the group average sharpened difference rate is used to indicate the average value of the sharpened difference rate data of all value intervals of a single sub-product, , .

[0008] In some embodiments, based on the API calling return value of each target sub-product in the list of sub-products to be tested in the previous N days, value interval division is performed according to the API calling return value, a preset central interval target calling quantity proportion value and a target interval number execution value interval, and the value interval of each target sub-product is generated, comprising: Query the API call return value of each target sub-product in the to-be-tested sub-product list in the previous N days, and sort the API call return value in ascending order to form a return value array; Filter the possible intervals that meet the target call quantity proportion value of the center interval from the return value array, and select the possible interval that minimizes the return value range as the center interval; According to the target call quantity proportion value of the center interval and the target interval number, determine the target proportion value of each interval; According to the target proportion value, expand to the left and right sides based on the center interval to determine other intervals, until the number of intervals reaches the target interval number, and obtain the value interval of each target sub-product.

[0009] In some embodiments, the first call quantity proportion value and the second call quantity proportion value are calculated by multi-thread parallel computing, and the difference rate of the value interval call quantity proportion value in the two time periods is calculated based on the first call quantity proportion value and the second call quantity proportion value as the original difference rate data, including: Create a thread pool according to the available resources of the system, and allocate an independent computing thread for each target sub-product in the thread pool; In the computing thread of each target sub-product, query the historical call quantity of each value interval of the target sub-product in the previous N days, and calculate the proportion of the historical call quantity of each value interval to the total call quantity as the first call quantity proportion value; In the computing thread, query the gray period call quantity of each value interval of the target sub-product during the gray period, and calculate the proportion of the gray period call quantity of each value interval to the total call quantity as the second call quantity proportion value; For each value interval of each target sub-product, calculate the difference rate of the interval call quantity proportion value between the gray period and the previous N days according to the first call quantity proportion value and the second call quantity proportion value, and obtain the original difference rate data by aggregating the calculation results of each computing thread.

[0010] In some embodiments, the original difference rate data is processed by call quantity sharpening based on the gray period call quantity of each value interval of each target sub-product during the gray period, and the call quantity sharpened difference rate data is obtained, including: Sort all target sub-product gray period call quantities from small to large, and select the gray period call quantity in the middle of the sorting as the reference call quantity; If the gray period calling quantity of the target sub-product is greater than the reference calling quantity, a first sharpening parameter calculation model is used to calculate the gray period calling quantity and the reference calling quantity to obtain a first sharpening parameter; otherwise, a second sharpening parameter calculation model is used to calculate the gray period calling quantity and the reference calling quantity to obtain a second sharpening parameter; wherein the second sharpening parameter is the inverse of the first sharpening parameter, and the sharpening parameter is one of the first sharpening parameter and the second sharpening parameter; According to the sharpening parameter, the original difference rate data is subjected to calling quantity sharpening processing to obtain calling quantity sharpened difference rate data.

[0011] In some embodiments, the calling quantity sharpened difference rate data and the first calling quantity proportion value are subjected to proportion value sharpening processing to obtain sharpened difference rate data, including: The first calling quantity proportion values of all value intervals of all target sub-products are sorted from small to large, and the first calling quantity proportion value ranked in the middle is taken as a reference proportion value; For each value interval of each target sub-product, the ratio between the first calling quantity proportion value and the reference proportion value is calculated, and a sharpening coefficient is calculated according to a configured proportion value sharpening percentage; For the value interval of the target sub-product whose first calling quantity proportion value is greater than the reference proportion value, a first sharpening coefficient calculation model is used to calculate the ratio and a preset proportion value sharpening percentage to obtain a first sharpening coefficient; For the value interval of the target sub-product whose first calling quantity proportion value is not greater than the reference proportion value, a second sharpening coefficient calculation model is used to calculate the ratio and a preset proportion value sharpening percentage to obtain a second sharpening coefficient, wherein the sharpening coefficient is one of the first sharpening coefficient and the second sharpening coefficient; According to the sharpening coefficient, the calling quantity sharpened difference rate data is subjected to proportion value sharpening processing to obtain the sharpened difference rate data.

[0012] In some embodiments, based on the API calling return value of each target sub-product in the target sub-product list in the previous N days, value interval division is performed according to the API calling return value, a preset central interval target calling quantity proportion value, and a target interval number to generate a value interval of each target sub-product, and the method further includes: The API calling return value of the target sub-product in the previous N days is constructed into a streaming data graph, wherein each vertex in the streaming data graph represents an API calling return value, and the weight of an edge in the streaming data graph represents the frequency difference between two adjacent API calling return values; The return value frequency information of the API call return value is compressed and stored by using a count sketch data structure to optimize the streaming data graph, so that the space complexity of the optimized streaming data graph is reduced from a linear level to a logarithmic level. In a single data stream scan, a preset approximation factor is used to construct a path, where the path represents a natural clustering interval of the API call return value, and the length of the path is determined by the approximation factor and the length of the longest path in the optimized streaming data graph. From the constructed multiple paths, paths that meet the path requirements related to the target call volume proportion value of the center interval are selected, and the selected paths are divided according to the number of target intervals according to a preset segmentation strategy, which is used to indicate the selection of segmentation points that minimize the total difference of each interval from the target proportion value. The interval boundaries after segmentation are fine-tuned so that the actual proportion value of each interval after segmentation is less than a preset difference threshold from the preset target proportion value distribution, and the value interval of each target sub-product is obtained.

[0013] In some embodiments, the first call volume proportion value and the second call volume proportion value are calculated by multi-thread parallel computing, and the difference rate of the value interval call volume proportion value in each time period is calculated based on the first call volume proportion value and the second call volume proportion value as the original difference rate data, which further includes: Based on the first call volume proportion value of each target sub-product, a first graph structure is constructed, where the nodes in the first graph structure represent a value interval, and the edges in the first graph structure represent the relationship between the first call volume proportion values corresponding to adjacent value intervals. Based on the second call volume proportion value of each target sub-product, a second graph structure is constructed, where the nodes in the second graph structure represent a value interval, and the edges in the second graph structure represent the relationship between the second call volume proportion values corresponding to adjacent value intervals. All target sub-product corresponding first graph structure and second graph structure are processed in parallel by using a preset semi-streaming strategy, so as to find a target path with the largest difference between the first graph structure and the second graph structure, and the semi-streaming strategy is used to indicate that only key intermediate results are saved. Based on the target path, the interval proportion value difference rate is calculated, the target path is mapped to the overall change of the interval sequence, and the interval distribution change pattern is identified. The path difference analysis result composed of the interval proportion value difference rate and the interval distribution change pattern is summarized to obtain the original difference rate data.

[0014] In some embodiments, the call volume sharpening processing of the original difference rate data based on the call volume of each value interval during the grayscale period of each target sub-product, to obtain the call volume sharpened difference rate data, further comprises: establishing a Gaussian process regression model for each target sub-product, wherein the input of the Gaussian process regression model comprises the call volume during the grayscale period and the first call volume proportion value, and the target variable of the Gaussian process regression model is the original difference rate data; determining a multi-objective optimization function, wherein the multi-objective optimization function comprises a difference rate detection model and a false positive rate model composed of a sharpening parameter vector, the sharpening parameter vector comprises the sharpening coefficient and the sharpening coefficient, and the multi-objective optimization function is used to indicate that the difference rate detection model is maximized and the false positive rate model is minimized; determining a trust region constraint for limiting the variation range of parameters in each optimization iteration; using a preset Bayesian optimization algorithm, iteratively optimizing the sharpening parameter vector under the condition of the trust region constraint based on the Gaussian process regression model and the multi-objective optimization function, until convergence or a preset number of iterations is reached; performing data enhancement on the sharpening parameter vector and the original difference rate data after iteration to optimize the call volume sharpened difference rate data.

[0015] In some embodiments, the method further comprises: identifying implicit confounding factors in the grayscale environment, the implicit confounding factors including user access mode changes, network environment fluctuations, and dependent service performance changes; using a preset two-stage least squares algorithm to establish a causal inference model, wherein the first stage of the causal inference model is used to indicate that the grayscale state is predicted using quasi-instrumental variables related to the implicit confounding factors, and the second stage of the causal inference model is used to indicate that the true causal effect on the return value distribution is estimated using the predicted value of the grayscale state; calculating the confounding sensitivity index of each target sub-product based on the original difference rate data and difference rate adjustment data, wherein the difference rate adjustment data is obtained by adjusting the original difference rate data using the causal inference model; calculating a causal weight based on the confounding sensitivity index; performing causal enhancement sharpening processing on the causal weight and the sharpened difference rate data to form a causal enhancement risk assessment result; based on the causal enhancement risk assessment result, dividing the identified risk points into high confidence causal risks, possible causal risks, and correlation risks, and generating the high-risk sub-product list and the corresponding risk prompt report.

[0016] In a second aspect, the present application also provides a system and a method for automatic testing of product value distribution in gray release, comprising: The sub-product screening module is configured to query first calling quantity data of each sub-product in the previous N days and second calling quantity data of each sub-product during the gray release period based on the obtained preset calling quantity threshold, and screen out sub-products whose first calling quantity data and second calling quantity data both exceed the corresponding calling quantity threshold to form a list of sub-products to be tested, wherein the calling quantity threshold includes a calling quantity threshold for the previous N days and a calling quantity threshold for the gray release period. The value interval division module is configured to perform value interval division based on API calling return values of each target sub-product in the previous N days in the list of sub-products to be tested, according to the API calling return values, a preset central interval target calling quantity proportion value, and a target interval number, to generate value intervals of each target sub-product. The difference calculation module is configured to calculate a first calling quantity proportion value and a second calling quantity proportion value through multi-thread parallel calculation, and calculate a difference rate of calling quantity proportion values of each value interval in two time periods based on the first calling quantity proportion value and the second calling quantity proportion value, as original difference rate data, wherein the first calling quantity proportion value is used to indicate a percentage of calling quantity of each value interval of the target sub-product in total calling quantity of the target sub-product in the previous N days, and the second calling quantity proportion value is used to indicate a percentage of calling quantity of each value interval of the target sub-product in the total calling quantity during the gray release period. The sharpening processing module is configured to perform calling quantity sharpening processing on the original difference rate data based on calling quantity of each value interval of each target sub-product during the gray release period to obtain calling quantity sharpened difference rate data, and perform proportion value sharpening processing based on the calling quantity sharpened difference rate data and the first calling quantity proportion value to obtain sharpened difference rate data. The risk identification module is configured to calculate a group average sharpened difference rate of each target sub-product based on the sharpened difference rate data, identify a first a target sub-product in a sequence of the group average sharpened difference rates, and screen out a first b value interval in a sequence of the sharpened difference rate data, and merge and remove duplicates of the identified target sub-product and the target sub-product corresponding to the screened value interval to generate a high-risk sub-product list and a corresponding risk prompt report, wherein the group average sharpened difference rate is used to indicate an average value of sharpened difference rate data of all value intervals of a single sub-product.

[0017] ​​​The application provides a system gray release based on product value distribution automatic testing method and device, which automatically selects sub-products meeting configuration conditions for analysis, reduces manual screening workload, ensures that the analysis sample has statistical significance, dynamically calculates the value distribution interval for each sub-product, avoids the cumbersome process of manual pre-configuration interval, ensures that the value interval division is more in line with the current data distribution characteristics, improves the processing efficiency by using multi-thread parallel calculation, can quickly process a large amount of sub-product data, and then calls the sharpening and proportion value sharpening processing, so that the difference rate between different sub-products and different intervals is comparable, the accuracy of risk identification is improved, and the risk identification results of the combined group sharpening difference rate and single interval sharpening difference rate are combined to comprehensively capture possible risk points during the gray period. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 A flowchart of the system gray release based on product value distribution automatic testing method provided by the embodiment of the application is provided. Figure 2 A detailed flowchart of the value interval division performed in the embodiment of the application is provided. Figure 3 A detailed flowchart of the calculation of the original difference rate data in the embodiment of the application is provided. Figure 4 A structure diagram of the system gray release based on product value distribution automatic testing device provided by the embodiment of the application is provided. DETAILED DESCRIPTION

[0019] The application aims to provide a system gray release based on product value distribution automatic testing method and device, which automatically selects sub-products meeting conditions, dynamically calculates value distribution intervals, performs parallel calculation on interval value proportion value difference rate, sharpens the difference rate, selects the value interval and sub-product with the largest difference from the sharpened difference rate data for risk prompt, and solves the technical problems in the prior art, such as the need for a large amount of manual return value interval configuration, frequent interval configuration adjustment, and lack of comparability between sub-products.

[0020] The system gray release based on product value distribution automatic testing method provided by the embodiment of the application mainly includes: automatically selecting sub-products meeting configuration conditions for analysis, dynamically calculating the value distribution interval for each sub-product, performing parallel calculation on the interval value proportion value and difference rate of each sub-product, sharpening the difference rate according to the call volume and interval value proportion value of each sub-product, and selecting the value interval and sub-product with the largest difference from the sharpened difference rate data for risk prompt. Figure 1 As shown in the figure, the system gray release based on product value distribution automatic testing method includes the following steps S1 to S5.

[0021] S1. Based on the obtained preset call volume threshold, query the first call volume data of each sub-product in the previous N days and the second call volume data during the gray period, and filter out the sub-products whose first call volume data and second call volume data both exceed the corresponding call volume threshold, to form a list of sub-products to be tested, wherein the call volume threshold includes a call volume threshold in the previous N days and a call volume threshold during the gray period, .

[0022] It should be noted that the automatic testing method proposed in the present application first needs to establish an analysis basis by pre-setting two key thresholds: a call volume threshold in the previous N days and a call volume threshold during the gray period. These thresholds ensure that only statistically significant sub-product data is analyzed. When started, the call volume of each sub-product in the previous N days before gray (first call volume data) and the call volume during the gray period (second call volume data) are queried and filtered, and only sub-products whose call volume in the two time periods exceeds the respective threshold are retained. Among them, sub-products with too little call volume have little significance in statistical analysis, and a small amount of returned value change can cause a huge fluctuation in the difference rate, thereby producing misleading results. Here, N is a configurable parameter, usually taking a value greater than or equal to 1, representing the number of days before gray whose data is used as a benchmark for comparison.

[0023] S2. Based on the API call return value of each target sub-product in the list of sub-products to be tested, performing value interval division according to the API call return value, a preset central interval target call volume proportion value and a target interval number, to generate a value interval for each target sub-product.

[0024] In the present application, after screening, a value interval distribution is dynamically calculated for each target sub-product. That is, the API return value range of each sub-product is divided into several meaningful intervals, rather than using fixed or pre-configured intervals. All API call return value data of the target sub-product in the previous N days are analyzed, and a preset central interval target call volume proportion value (such as 20% or 50%) and a target interval number (such as 9 intervals) are combined to perform an adaptive value interval division algorithm. Specifically, the present application first determines the central interval, and then expands to both sides to ensure that the divided intervals both conform to the natural distribution of the return value and meet the target proportion value requirement. After the value interval division is completed, each sub-product has a customized value interval, and the boundaries of these intervals are completely based on the historical return value distribution characteristics, without the need for manual intervention.

[0025] S3. Calculate the first call volume proportion value and the second call volume proportion value in parallel through multi-threading, and calculate the difference rate of the call volume proportion value of each value interval in the two time periods based on the first call volume proportion value and the second call volume proportion value as the original difference rate data, wherein the first call volume proportion value is used to indicate the percentage of the call volume of the target sub-product in each value interval in the previous N days in the total call volume of the target sub-product, and the second call volume proportion value is used to indicate the percentage of the call volume of the target sub-product in each value interval during the gray period in the total call volume.

[0026] In the present application, after obtaining the value interval, the data analysis tasks of multiple sub-products are processed simultaneously by using a multi-thread parallel computing architecture. For each sub-product, the call volume proportion value in each value interval in the previous N days (the first call volume proportion value) and the call volume proportion value in each value interval during the gray period (the second call volume proportion value) are calculated. Then, by comparing the difference of the proportion values in the two time periods, the difference rate of the call volume proportion value of each interval is calculated to form the original difference rate data. The present application significantly improves the computing efficiency by using multi-thread technology, especially when a large number of sub-products need to be analyzed, the multi-core processing capability of modern computers can be fully utilized.

[0027] S4. Based on the call volume of each target sub-product in each value interval during the gray period, perform call volume sharpening processing on the original difference rate data to obtain call volume sharpened difference rate data, and perform proportion value sharpening processing based on the call volume sharpened difference rate data and the first call volume proportion value to obtain sharpened difference rate data.

[0028] In the present application, although the original difference rate data intuitively reflects the changes, the difference rates between different sub-products lack comparability, because the call volume levels and interval distributions of different sub-products may differ greatly. To solve this problem, the present application introduces an innovative double sharpening processing mechanism. First, call volume sharpening processing is performed to make the difference rates of sub-products with different call volume levels comparable by calculating the ratio to the median call volume and applying logarithmic transformation. Then, proportion value sharpening processing is performed to calculate the sharpening coefficient according to the ratio of the call volume proportion value in the previous N days to the baseline proportion value in each interval, and apply it to the difference rate. Through the two steps of sharpening processing, the present application adjusts the difference rates of different sub-products and different intervals to a fair baseline for comparison, eliminating the interference caused by different call volume and proportion value distributions.

[0029] S5. Based on the sharpened difference rate data, calculate the group average sharpened difference rate of each target sub-product, identify the top a target sub-products in the order of the group average sharpened difference rate, and filter out the top b value intervals in the order of the sharpened difference rate data, merge and remove the identified target sub-products and the target sub-products corresponding to the filtered value intervals, and generate a high-risk sub-product list and a corresponding risk prompt report, wherein the group average sharpened difference rate is used to indicate the average value of the sharpened difference rate data of all value intervals of a single sub-product, , .

[0030] In this application, based on the sharpened difference rate data, potential risks are identified from two dimensions. On the one hand, the group average sharpened difference rate of all value intervals of each sub-product is calculated, and the top a sub-products with the highest average difference rate are identified. On the other hand, the top b value intervals with the highest sharpened difference rate and their corresponding sub-products are directly filtered out. Then, the results of the two dimensions are merged and removed to form a final high-risk sub-product list and generate a detailed risk prompt report. Through double-dimensional risk identification, this application can not only find sub-products with significant overall changes, but also capture situations with dramatic local interval changes, and comprehensively cover potential risk points. The detailed information contained in the report, such as sub-product identification, name, high-risk interval range, original difference rate, and sharpened difference rate, provides a comprehensive risk assessment basis for system administrators.

[0031] Therefore, this application can completely eliminate the need for manual configuration of return value intervals, and through adaptive value interval division and difference rate sharpening, the risk assessment results between different sub-products are comparable, greatly improving the accuracy and efficiency of risk identification in gray release. The parameters a and b are both configurable, usually taking values greater than or equal to 1, and control the risk identification range based on the sub-product level and the interval level, respectively, which can be adjusted according to the system size and risk tolerance.

[0032] Exemplarily, in another embodiment, the above steps specifically include: Step 1: Automatically select sub-products that meet the configured conditions for analysis: When the call volume is too small, a small change in the API return value may cause a large difference, and such samples have little significance in statistics and cannot determine whether there is a risk. Therefore, this step first configures a sub-product filtering threshold, including a call volume threshold MinCallCountPre in the previous N days and a call volume threshold MinCallCountGray during the gray period, where N is greater than or equal to 1.

[0033] Specifically, this step includes: Configure sub-product screening threshold, set the previous N-day call volume threshold MinCallCountPre and the call volume threshold during the gray period MinCallCountGray.

[0034] Query the call volume data of all sub-products in the previous N days and during the gray period in the system database, form a sub-product call volume mapping table ProductCallMap, which contains each sub-product ID, sub-product name, previous N-day call volume PreCallCount and gray period call volume GrayCallCount.

[0035] Traverse each sub-product in the sub-product call volume mapping table ProductCallMap, judge whether the previous N-day call volume and the call volume during the gray period exceed the corresponding threshold at the same time, filter out the sub-products that meet the condition PreCallCount> MinCallCountPre and GrayCallCount> MinCallCountGray, form a list of valid sub-products ValidProductList that can be analyzed and tested.

[0036] Step 2: Dynamically calculate the value distribution interval for each sub-product: When the API return value is sufficient, the return value call volume generally presents a normal distribution, the return value call volume near the middle part is relatively large, and the maximum return value and the minimum return value call volume are usually small. This step dynamically divides the interval for the return value range of each sub-product by using this feature.

[0037] This step specifically includes: Configure value interval division parameters, set the center interval target call volume proportion value CenterRangeRatio (such as 20%, 50%, etc.) and the target interval number RangeCount (such as 9), and calculate the target proportion value of each interval according to the principle of geometric progression, form a target proportion value array TargetRatioArray.

[0038] For each sub-product in the list of valid sub-products ValidProductList that can be analyzed and tested, query all API call return values in the previous N days, form a return value array ValueArray and sort it in ascending order.

[0039] Find all possible intervals (interval left and right endpoints in the position of the return value array ValueArray) that meet the center interval target call volume proportion value CenterRangeRatio from the sorted return value array ValueArray, select the interval with the smallest return value range as the center interval CenterRange.

[0040] With the center interval CenterRange as the reference, the target interval is determined by expanding to the left and right sides according to the target ratio value in the target ratio value array TargetRatioArray. The interval closest to the target ratio value and with the smallest return value range is selected until the target number of intervals RangeCount is divided or the boundary of the return value array ValueArray is reached.

[0041] When the left and right value interval division is unbalanced, the divided interval is moved as a whole to the side with less calling quantity to ensure more reasonable interval distribution. Finally, a set of continuous value intervals RangeList is generated for each sub-product, and each interval contains upper and lower bound values and corresponding calling quantity ratio values.

[0042] For example, for a certain sub-product, the following value interval division result may be obtained by the above method: Table 1

[0043] Step 3: Calculate the value interval ratio and difference rate of each sub-product in parallel: According to the available resources of the system, create a thread pool ThreadPool and allocate an independent calculation thread for each sub-product to improve calculation efficiency.

[0044] In each sub-product calculation thread, according to the value interval RangeList generated in step S2, calculate the calling quantity PreRangeCallCount and the proportion of total calling quantity PreRangeRatio of each interval in the previous N days.

[0045] Similarly, in each calculation thread, query the calling quantity GrayRangeCallCount of each interval of the sub-product during the gray period, and calculate the proportion GrayRangeRatio of the total calling quantity.

[0046] For each interval of each sub-product, calculate the interval value calling quantity ratio difference rate DiffRatio = | GrayRangeRatio - PreRangeRatio | / PreRangeRatio during the gray period and the previous N days to obtain the original difference rate data OriginalDiffRatioMap.

[0047] After waiting for all calculation threads to complete, summarize the interval ratio and difference rate data of each sub-product to form a complete original difference rate data set AllOriginalDiffRatio.

[0048] Step 4: sharpening the difference rate according to the call amount of each sub-product and the interval value proportion value: The purpose of data sharpening is to process the difference rate of the gray scale of each sub-product and the interval value call amount proportion value of the previous N days, so that it is more comparable and easier to identify the sub-product with the greatest risk. Data sharpening is divided into two parts: call amount sharpening and proportion value sharpening.

[0049] Call amount sharpening processing: the purpose of call amount sharpening is to process the difference of the call amount of each sub-product during the gray scale period, so that the difference rate comparison is as equal as possible. The specific processing method is: Sort all sub-product gray scale period call amounts ProductCallCount from small to large, and select the median as the reference call amount MedianCallCount.

[0050] For each sub-product, when its call amount is greater than the reference call amount MedianCallCount, calculate the sharpening parameter CallSharpParam = log3(ProductCallCount / MedianCallCount); when the call amount is less than the reference call amount MedianCallCount, calculate the sharpening parameter CallSharpParam = 1 / log3(MedianCallCount / ProductCallCount).

[0051] For each interval value proportion value difference rate of each sub-product, call amount sharpening processing is performed: when the sharpening parameter CallSharpParam > 1, the call amount sharpened difference rate data SharpedDiffRatio1 = original difference rate data OriginalDiffRatio * CallSharpParam; when CallSharpParam < 1, the call amount sharpened difference rate data SharpedDiffRatio1 = original difference rate data OriginalDiffRatio / (1 / CallSharpParam).

[0052] Proportion value sharpening processing: the purpose of proportion value sharpening is to eliminate the difference of the interval value proportion value of each sub-product in the previous N days, so that the interval gray scale period and the interval call amount proportion value difference rate of the previous N days can be compared as closely as possible. The specific processing method is: Configure the proportion value sharpening parameter, set the maximum multiple / quotient upper limit MaxMultiple and the proportion value sharpening percentage SharpPercent.

[0053] Sort all sub-products all intervals' top N days call volume proportion values from small to large, take the median as the benchmark proportion value MedianRatio.

[0054] For each interval of each sub-product, calculate the ratio of its top N days interval call volume proportion value RangeRatio to the benchmark proportion value MedianRatio, Multiple; for RangeRatio>MedianRatio, sharpening coefficient RatioSharpCoef = (Multiple - 1) SharpPercent + 1; for RangeRatio<MedianRatio, sharpening coefficient RatioSharpCoef = 1 / ((1 / Multiple - 1) SharpPercent + 1).

[0055] Sharpen the obtained call volume sharpened difference rate data SharpedDiffRatio1: when the sharpening coefficient RatioSharpCoef>1, sharpened difference rate data FinalSharpedDiffRatio =SharpedDiffRatio1 * RatioSharpCoef; when the sharpening coefficient RatioSharpCoef<1, sharpened difference rate data FinalSharpedDiffRatio = SharpedDiffRatio1 / (1 / RatioSharpCoef).

[0056] Step 5: Select the value interval and sub-product with the largest difference from the sharpened difference rate data (i.e. sharpened difference rate data) for risk prompt: For each sub-product, calculate the average value AvgSharpedDiffRatio of all intervals' sharpened difference rate, form the sub-product group average sharpened difference rate mapping table ProductAvgDiffMap.

[0057] Sort the sub-product group average sharpened difference rate mapping table ProductAvgDiffMap by difference rate from large to small, select the top a sub-products with the largest average sharpened difference rate, form the high-risk sub-product list TopProductList, where a is greater than or equal to 1, for example a=3.

[0058] Sort all sub-products all intervals by sharpened difference rate from large to small, select the top b intervals with the largest sharpened difference rate and their corresponding sub-products, form the high-risk interval list TopRangeList, where b is greater than or equal to 1, for example b=5.

[0059] Merge and de-duplicate the sub-products in the high-risk sub-product list TopProductList and the high-risk range list TopRangeList to form the final high-risk sub-product list FinalRiskProductList; at the same time, the high-risk range information FinalRiskRangeList corresponding to these sub-products is retained.

[0060] Based on the final high-risk sub-product list FinalRiskProductList and the high-risk range information FinalRiskRangeList, generate a detailed risk prompt report RiskReport containing sub-product ID, name, high-risk range, original difference rate, sharpened difference rate, etc. information for system administrators to assess the risk of gray online.

[0061] According to the configured difference rate threshold DiffRatioThreshold, it is judged whether the identified high-risk sub-products exceed the threshold. If there are sub-products with sharpened difference rate greater than the threshold, an explicit online risk warning is issued.

[0062] In some embodiments, as shown in FIG. 2, step S2 includes steps S2.1 to S2.4. Figure 2

[0063] S2.1: Query the API call return value of each target sub-product in the to-be-tested sub-product list in the previous N days, and sort the API call return value in ascending order to form a return value array.

[0064] In the dynamic value interval division process, first, the API call return value of each target sub-product is preprocessed and statistically analyzed. After obtaining all the API call return values of the target sub-product in the previous N days, data cleaning is performed to remove abnormal values and noise data, ensuring the accuracy of subsequent value interval division. In the process of sorting the return value in ascending order to form the return value array, the frequency of occurrence of each return value is recorded at the same time, which will be an important basis for the subsequent value interval division algorithm.

[0065] S2.2: From the return value array, filter out the possible interval that meets the target call volume proportion value of the center interval, and select the possible interval that minimizes the return value range as the center interval.

[0066] ​In this embodiment, the determination process of the center interval adopts an optimized search algorithm, which traverses all possible interval combinations and calculates the cumulative call quantity proportion value of the return value in each interval. In order to select the possible interval that minimizes the return value range as the center interval, an interval compactness evaluation index is introduced, which comprehensively considers the distribution density of the return value in the interval and the rationality of the interval boundary. When there are multiple candidate intervals that meet the target call quantity proportion value of the center interval, the interval with the smallest return value variance is preferentially selected to ensure that the center interval has good statistical properties.

[0067] In this embodiment, the determination process of the center interval adopts an optimized search algorithm based on a sliding window, which significantly improves the search efficiency through an intelligent traversal strategy. Specifically, first, the return value array is preprocessed to establish a cumulative frequency mapping table, which associates each return value position with its corresponding cumulative call quantity. In the traversal process, a double-pointer technique is used to enumerate all possible interval combinations through the coordinated movement of the left and right boundary pointers.

[0068] In the specific implementation process, a dynamic candidate interval pool is maintained, which is empty in the initial state. The search algorithm starts from the starting position of the return value array and generates candidate intervals by gradually expanding the right boundary. For each candidate interval, the pre-constructed cumulative frequency mapping table is used to quickly calculate the cumulative call quantity proportion value of the return value in the interval, avoiding repeated statistical calculations. When the cumulative call quantity proportion value of a certain interval is close to or reaches the preset target call quantity proportion value of the center interval, the interval is added to the candidate pool and its specific proportion value deviation and interval range are recorded.

[0069] To optimize the search performance, an intelligent pruning mechanism is implemented. When the cumulative call quantity proportion value of the current interval has significantly exceeded the target value, the algorithm will stop further expansion at this starting position and directly jump to the next starting position. At the same time, this embodiment also adopts a heuristic search strategy, which preferentially explores areas with higher return value density, as these areas are more likely to contain the required center interval. During the search process, the current optimal solution, i.e., the candidate interval with the smallest deviation from the target proportion value and the most compact interval range, is dynamically maintained. After the traversal is completed, the interval with the highest comprehensive score is selected from the candidate pool as the final center interval.

[0070] S2.3: Determine the target proportion value of each interval according to the center interval target call quantity proportion value and the target number of intervals.

[0071] S2.4: Based on the center interval, expand to the left and right sides according to the target proportion value to determine other intervals, until the number of intervals obtained reaches the target number of intervals, to obtain the value interval of each target sub-product.

[0072] In the process of determining the target proportion value of each interval, the principle of geometric progression is adopted to ensure that the importance of each interval gradually decreases when expanding from the center interval to both sides. This design conforms to the natural distribution law of API return value, that is, most of the call volume is concentrated in the central area of the numerical range. According to the target call volume proportion value of the center interval and the target interval number, the complete target proportion value sequence is automatically calculated, and the boundary position is dynamically adjusted during the interval expansion process to maximize the matching degree of the actual proportion value and the target proportion value.

[0073] In the embodiment, the principle of geometric progression is adopted to determine the target proportion value distribution of each interval, which fully reflects the natural characteristics and statistical rules of API return value distribution. In the specific implementation, first, the common ratio parameter of the geometric progression is calculated according to the target call volume proportion value of the center interval and the target interval number. Assuming that the target proportion value of the center interval is a preset value, the decreasing law of the proportion value of each interval when expanding from the center to both sides needs to be determined.

[0074] It should be noted that the implementation process of the geometric progression considers the symmetry and continuity requirements of interval distribution. The remaining interval number after subtracting the target interval number from the center interval is evenly distributed to the left and right sides of the center interval. For each side of the interval, the target proportion value is allocated in a geometrically decreasing manner to ensure that the farther the interval is from the center interval, the smaller the target proportion value it obtains. The allocation method provided in the embodiment conforms to the characteristics of most API return values that are normally distributed, that is, the call volume is most concentrated in the central region, and the call volume is relatively sparse in the edge region.

[0075] When calculating the common ratio of the geometric progression, it needs to satisfy the constraint condition that the sum of all interval target proportion values is equal to 100%. The optimal common ratio is solved by numerical iteration, so that the calculated target proportion values of each interval not only satisfy the geometrically decreasing rule, but also completely cover the entire call volume distribution. In order to ensure numerical stability, the value range of the common ratio is limited to avoid the problem that the target proportion value of some interval is too small to have statistical significance.

[0076] In the specific implementation process of interval expansion, the expansion is alternately performed to the left and right sides from the center interval. Each time the expansion is performed, the target proportion value calculated according to the geometric progression is used to find the interval boundary that best meets the proportion value requirement in the current remaining return value range. A greedy strategy is adopted to preferentially select the boundary position that minimizes the deviation between the actual proportion value and the target proportion value. When the return value range on one side has been exhausted while the other side still has remaining, the expansion strategy is automatically adjusted to allocate all the remaining target intervals to the side that still has space, and the target proportion values of these intervals are adjusted accordingly to maintain the rationality of the overall distribution.

[0077] Based on the above embodiments, in some embodiments, such as Figure 3As shown, step S3 can include the following steps S3.1 to S3.4.

[0078] S3.1: Create a thread pool according to the available resources of the system, and allocate an independent computing thread for each target sub-product in the thread pool.

[0079] In the parallel computing architecture, the creation and management of the thread pool adopts an adaptive strategy to dynamically determine the optimal number of threads according to the current available CPU core number and memory capacity. In order to avoid resource competition and data conflict between threads, each target sub-product computing thread has an independent data cache area and computing context. This embodiment also implements an intelligent load balancing mechanism. When the data volume of some sub-products is significantly greater than that of other sub-products, the computing task will be automatically further split into multiple threads for execution.

[0080] S3.2: In each target sub-product computing thread, query the historical call volume of each value interval of the target sub-product in the past N days, and calculate the proportion of the historical call volume of each value interval to the total call volume as the first call volume proportion value.

[0081] In the process of calculating the first call volume proportion value, not only the absolute call volume of each value interval is counted, but also metadata information such as call time distribution and call source is recorded, which is helpful for subsequent difference rate analysis and anomaly detection. In order to improve the calculation accuracy, high-precision floating-point operations are used, and cumulative error correction is performed during the proportion value calculation process to ensure that the sum of all interval proportion values is strictly equal to 100%.

[0082] S3.3: In the computing thread, query the call volume of each value interval of the target sub-product during the gray period, and calculate the proportion of the call volume of each value interval during the gray period to the total call volume as the second call volume proportion value.

[0083] The difference rate calculation link introduces multiple difference measurement methods. In addition to the basic absolute difference rate, this embodiment also calculates relative difference rate, standardized difference rate and other indicators. This multi-dimensional difference rate calculation method can more comprehensively reflect the changes between the gray period and the benchmark period. In order to handle the problem of division by zero error and numerical overflow, this embodiment implements a perfect exception handling mechanism. When the call volume of a certain interval is zero in the benchmark period, Laplace smoothing and other techniques are used for processing.

[0084] In this embodiment, the multi-dimensional measurement method of the difference rate calculation link embodies the system's pursuit of precision in risk identification accuracy. Based on the basic absolute difference rate calculation, relative difference rate and standardized difference rate are also implemented, forming a complete difference evaluation system.

[0085] It should be noted that the calculation process of the relative difference rate fully considers the influence weight of the proportion of the call amount during the benchmark period. By dividing the difference between the proportion of the call amount during the gray period and the proportion of the call amount in the previous N days by the proportion of the call amount in the previous N days, a quantitative indicator of the relative change amplitude is obtained. This calculation method can effectively distinguish the change significance at different base levels. For example, although the absolute difference is the same, the relative difference rate can accurately reflect the higher risk of the former change when the proportion of the call amount changes from 2% to 4% and the proportion of the call amount changes from 50% to 52%. In this embodiment, a smoothing processing technique is used when calculating the relative difference rate. When the benchmark proportion of the call amount is close to zero, a small smoothing factor is added to avoid division by zero errors and ensure the numerical stability of the calculation results.

[0086] The implementation of the standardized difference rate is more complex and needs to consider the distribution characteristics of the entire sub-product group. In the specific implementation process, first, the mean and standard deviation of the difference rate of all target sub-products in all intervals are calculated to establish a global difference rate distribution benchmark. Then, the difference rate of each specific interval is standardized and converted into a standardized score relative to the global distribution. This standardization eliminates the comparison difficulties caused by the absolute numerical differences of the difference rates from different sub-products, so that the risk assessment results from different sub-products have a unified evaluation standard.

[0087] Optionally, the embodiment also implements auxiliary measurement methods such as quantile difference rate and dynamic weighted difference rate. The quantile difference rate identifies significant changes in relative ranking by comparing the changes in the quantile positions of the proportion of the call amount in the gray period and the benchmark period in the global distribution. The dynamic weighted difference rate assigns different importance weights to different intervals according to historical stability. Lower weights are given to intervals with larger historical fluctuations, and higher weights are given to intervals with stable historical performance. These multi-dimensional difference measurement results are weighted and fused to form a comprehensive difference score, providing a more rich and accurate data basis for subsequent sharpening processing.

[0088] S3.4: For each value interval of the target sub-product, a difference rate of the interval call amount proportion of the gray period and the previous N days is calculated according to the first call amount proportion and the second call amount proportion, and the calculation results of each calculation thread are summarized to obtain the original difference rate data.

[0089] In this embodiment, the result summarization process of each calculation thread uses a lock-free concurrent programming technique to ensure data consistency through atomic operations and memory barriers. This embodiment also implements a real-time monitoring and quality checking mechanism for the calculation results, which can timely discover and handle abnormal situations in the calculation process, and ensure that the final output of the original difference rate data has high reliability and accuracy.

[0090] In some embodiments, the original difference rate data is subjected to call quantity sharpening processing based on the call quantity of each value interval during the grayscale period of each target sub-product in step S4, to obtain call quantity sharpened difference rate data, which can be further refined as steps S4.1.1 to S4.1.3.

[0091] S4.1.1: Sort the call quantity of all target sub-products during the grayscale period from small to large, and select the call quantity during the grayscale period in the middle of the sorting as the reference call quantity.

[0092] In the present embodiment, through call quantity sharpening processing, in the process of determining the reference call quantity, not only the median of the call quantity during the grayscale period of all target sub-products is calculated, but also the skewness and kurtosis of the call quantity distribution and other statistical characteristics are analyzed. When the call quantity distribution presents obvious skewness characteristics, the adjusted median or truncated mean is used as the reference call quantity to improve the stability and representativeness of the sharpening processing.

[0093] It should be noted that the call quantity sharpening processing solves the fundamental problem of difference rate comparability between sub-products of different call quantity levels. By way of example, a specific numerical case is used to show the significant difference before and after sharpening processing. Considering two representative sub-product cases, sub-product A has a call quantity of ten thousand times during the grayscale period, and the proportion of a certain interval changes from twenty percent during the reference period to twenty-five percent during the grayscale period, with an absolute difference rate of twenty-five percent. Sub-product B has a call quantity of only one thousand times during the grayscale period, and the proportion of the corresponding interval changes from twenty percent to twenty-five percent, with the same absolute difference rate of twenty-five percent. The traditional method considers that the risk levels of the two sub-products are the same, but this obviously ignores the statistical significance difference caused by the call quantity difference.

[0094] In the present embodiment, the call quantity sharpening processing is improved by introducing a standardization mechanism based on the median of the call quantity, that is, assuming that the median of the call quantity of all target sub-products is five thousand times, then the call quantity sharpening parameter of sub-product A is calculated by logarithmic transformation, and since its call quantity is higher than the median, the weight of its difference rate is correspondingly increased. On the contrary, the call quantity of sub-product B is lower than the median, and its difference rate weight is appropriately reduced. This processing method embodies the basic principle of the influence of sample size on the reliability of results in statistics. Changes in large samples have more statistical significance and should be given more attention.

[0095] In addition, the logarithmic transformation is sharpened by selecting a logarithmic function with base 3, which is based on the optimization results of a large amount of empirical data. The logarithmic transformation can effectively control the excessive influence of extreme call volume on the difference rate, and avoid that the sub-products with ultra-high call volume completely dominate the risk ranking. At the same time, the continuity and monotonicity of the logarithmic function ensure the smoothness of the sharpening parameter with the change of the call volume, and avoid unreasonable jump phenomenon near some critical points.

[0096] After the call volume sharpening processing, the originally same absolute difference rate presents reasonable differentiation after considering the call volume factor. The difference rate of the sub-products with high call volume is moderately amplified, reflecting the high credibility of its change; the difference rate of the sub-products with low call volume is appropriately suppressed, avoiding that the random fluctuations of small samples are misjudged as high risk. This sharpening mechanism makes the risk identification result more scientific and reasonable, and significantly improves the accuracy and practicality of the gray release risk assessment. In practical application, the call volume sharpening processing can reduce the false positive rate by about thirty percent, while maintaining high sensitivity to real risks, fully proving the effectiveness of this innovative method.

[0097] S4.1.2: If the call volume of the target sub-product during the gray period is greater than the reference call volume, a preset first sharpening parameter calculation model is used to calculate the call volume during the gray period and the reference call volume to obtain a first sharpening parameter; otherwise, a preset second sharpening parameter calculation model is used to calculate the call volume during the gray period and the reference call volume to obtain a second sharpening parameter; wherein the second sharpening parameter is the inverse of the first sharpening parameter, and the sharpening parameter is one of the first sharpening parameter and the second sharpening parameter.

[0098] In this embodiment, the design of the first sharpening parameter calculation model fully considers the difference amplification effect under different call volume levels. When the call volume of the target sub-product during the gray period is significantly greater than the reference call volume, a logarithmic transformation is used to control the sharpening amplitude, to prevent the difference rate of the sub-products with high call volume from being excessively amplified. Specifically, the first sharpening parameter calculation model is:

[0099] Wherein, the selection of the logarithm with base 3 is based on the optimization results of a large amount of experimental data, and the base number can avoid numerical instability problems while maintaining the sharpening effect.

[0100] Optionally, the second sharpening parameter calculation model is used to process the sharpening demand of the sub-products with low call volume. For the sub-products with call volume during the gray period less than the reference call volume, first calculate the inverse of the call volume ratio, then apply the same logarithmic transformation as the first sharpening parameter, and finally take the inverse to obtain the second sharpening parameter. This design ensures the symmetry and continuity of the sharpening parameter on both sides of the call volume reference line, avoiding numerical jumps near the reference point.

[0101] It should be noted that the application process of the sharpening parameter adopts an adaptive adjustment strategy, that is, the sharpening parameter is fine-tuned according to the historical stability and business importance of each sub-product. For sub-products with stable historical performance and regular calling mode, the sharpening strength is appropriately reduced; and for newly online or historically volatile sub-products, the sharpening sensitivity is correspondingly increased. This personalized sharpening processing method can better adapt to the characteristics of different types of sub-products.

[0102] S4.1.3: According to the sharpening parameter, the call volume sharpening processing is performed on the original difference rate data to obtain call volume sharpened difference rate data.

[0103] In the specific execution process of the call volume sharpening processing, the embodiment also implements a numerical stability guarantee mechanism. When the sharpening parameter is too large or too small, boundary limitation is automatically performed to prevent abnormal values of the sharpened difference rate. At the same time, the detailed parameters and intermediate results of each sharpening processing are recorded to provide data support for subsequent algorithm optimization and problem diagnosis. After the sharpening processing is completed, the results are subjected to quality inspection to ensure that the sharpened difference rate data still maintains reasonable distribution characteristics and statistical properties.

[0104] In some embodiments, the proportion value sharpening processing based on the call volume sharpened difference rate data and the first call volume proportion value in step S4 to obtain the sharpened difference rate data can be further refined as steps S4.2.1 to S4.2.5.

[0105] S4.2.1: Sort the first call volume proportion values of all target sub-products in all value intervals from small to large, and take the first call volume proportion value ranked in the middle as the reference proportion value.

[0106] In the initial stage of the proportion value sharpening processing, a global proportion value reference point needs to be established. In this embodiment, the reference proportion value determination process adopts a robust statistical method. First, the first call volume proportion value data of all target sub-products in all value intervals is collected to form a large data set containing thousands of proportion values. In order to ensure the representativeness and stability of the reference proportion value, the proportion value data is preprocessed to eliminate obvious outliers and extreme values. In the sorting process, an efficient quick selection algorithm is used to locate the median, avoiding the computational overhead caused by complete sorting. When the data set size is even, the geometric mean of the two middle values is taken as the reference proportion value. This method is more suitable for handling the multiplicative characteristics of proportion data than the arithmetic mean.

[0107] S4.2.2: For each value interval of each target sub-product, the ratio between the first call volume proportion value and the reference proportion value is calculated, and the sharpening coefficient is calculated according to the configured proportion value sharpening percentage.

[0108] In this embodiment, the ratio calculation process adopts a sharpening algorithm. For each value interval of each target sub-product, the ratio of the first call volume ratio to the benchmark ratio is calculated. This ratio reflects the relative position of the interval in the overall ratio distribution. When the ratio is greater than 1, it indicates that the ratio of the interval is higher than the global median level; when the ratio is less than 1, it indicates that the ratio is lower than the median level. The ratio sharpening percentage (SharpPercent) is a key adjustment parameter, usually set between 10% and 50%, which controls the size of the sharpening intensity. A larger ratio sharpening percentage SharpPercent value will produce a stronger sharpening effect, making the differences between different ratio intervals more significant; a smaller value will produce a more moderate adjustment effect.

[0109] S4.2.3: For the value interval of the first call volume ratio of the target sub-product greater than the benchmark ratio, a preset first sharpening coefficient calculation model is used to calculate the ratio and a preset ratio sharpening percentage to obtain a first sharpening coefficient.

[0110] In this embodiment, the first sharpening coefficient calculation model is used to handle the sharpening needs of high ratio intervals. For the value interval with a first call volume ratio greater than the benchmark ratio, the first sharpening coefficient calculation formula is: RatioSharpCoef = (Multiple - 1) × SharpPercent + 1 By the above calculation method, the first sharpening coefficient is determined, which considers the linear controllability of the sharpening effect. When the ratio is close to 1, the sharpening coefficient is close to 1, and almost no sharpening effect is produced; when the ratio is significantly greater than 1, the sharpening coefficient will increase accordingly, but the growth rate is controlled by the ratio sharpening percentage SharpPercent. This design avoids the problem of numerical instability caused by excessive sharpening, while ensuring that the sharpening effect is positively related to the difference from the original ratio.

[0111] S4.2.4: For the value interval of the first call volume ratio of the target sub-product not greater than the benchmark ratio, a preset second sharpening coefficient calculation model is used to calculate the ratio and a preset ratio sharpening percentage to obtain a second sharpening coefficient, wherein the sharpening coefficient is one of the first sharpening coefficient and the second sharpening coefficient.

[0112] In this embodiment, the second sharpening coefficient calculation model adopts a symmetrical mathematical design to ensure consistency on both sides of the benchmark ratio. For the value interval with a first call volume ratio not greater than the benchmark ratio, first calculate the reciprocal ratio 1 / Multiple, and then apply a similar formula to the first sharpening coefficient: RatioSharpCoef = 1 / ((1 / Multiple - 1) × SharpPercent + 1) wherein the second sharpening coefficient is determined by the above calculation method, ensuring the continuity and symmetry of the sharpening coefficient near the reference point. For example, if the proportion value of a certain interval is half of the reference proportion value, and the proportion value of another interval is twice the reference proportion value, their sharpening coefficients will present a symmetrical inverse relationship.

[0113] S4.2.5: proportion value sharpening processing is performed on the difference rate data after the call quantity is sharpened according to the sharpening coefficient, to obtain the sharpened difference rate data.

[0114] In this embodiment, the proportion value sharpening application process combines the results of the previous call quantity sharpening. According to the type of the sharpening coefficient of each interval, the corresponding mathematical operation is used to adjust the difference rate data after the call quantity is sharpened. When the sharpening coefficient is greater than 1, it indicates that the proportion value of the interval is relatively high, and its difference rate is amplified through multiplication operation; when the sharpening coefficient is less than 1, it indicates that the proportion value is relatively low, and its difference rate is reduced through division operation. This two-way adjustment mechanism ensures that the final sharpened difference rate data can fairly reflect the relative importance of different proportion value intervals.

[0115] In this embodiment, step S2 can further include the following steps S2.A.1 to S2.A.5.

[0116] S2.A.1: the API call return values of the target sub-product in the previous N days are constructed into a stream data graph, wherein each vertex in the stream data graph represents an API call return value, and the weight of the edge in the stream data graph represents the frequency difference between two adjacent API call return values.

[0117] In this embodiment, the stream data graph construction process uses advanced graph theory algorithms to process large-scale API return value data. First, statistical analysis is performed on all API call return values of the target sub-product in the previous N days to identify the occurrence frequency and time distribution pattern of different return values. When constructing the stream data graph, each unique API return value is mapped to a vertex in the graph, and the attributes of the vertex include the return value itself, the occurrence frequency, the first occurrence time, and other metadata. The construction of edges in the graph follows the adjacency principle, that is, the return values with similar values will establish edges. The weight calculation formula of the edge is: |freq(vi) - freq(vj)| / max(freq(vi), freq(vj)) where freq(vi) and freq(vj) represent the frequency of occurrence of two adjacent return values, respectively. By calculating the weight of the edge, the gradient information of the return value frequency change can be effectively captured.

[0118] S2.A.2: The return value frequency information of the API call return value is compressed and stored by using the count sketch data structure to optimize the streaming data graph, so that the space complexity of the optimized streaming data graph is reduced from linear level to logarithmic level.

[0119] In this embodiment, the count sketch data structure optimization can help to realize sub-linear space complexity. The traditional frequency statistics method needs to maintain a counter for each different return value, which will consume a lot of memory when the number of return values is large. The count sketch algorithm maps the return value to a fixed size count array through multiple independent hash functions, which realizes a significant improvement in space efficiency. Using the Count-Min Sketch variant, d hash functions and w counters are used, and the total space complexity is O(dw), which is usually much smaller than the O(n) space required for direct statistics. In order to ensure the estimation accuracy, the number of hash functions and the width of the counter are adjusted adaptively according to the data size, so that the relative error of frequency estimation is controlled within an acceptable range.

[0120] where the core of the count sketch algorithm is to compress the frequency information by using the randomness and independence of the hash function, so as to realize the fundamental change from linear space complexity to logarithmic space complexity. First, a plurality of independent hash function families are constructed, each of which can map any API return value to an integer position within a fixed range. The design of these hash functions uses the theoretical basis of the universal hash family, which ensures that the probability of different return values being mapped to the same position is uniformly distributed in theory.

[0121] In the specific implementation process, a two-dimensional count matrix is maintained, the number of rows of the matrix corresponds to the number of hash functions, and the number of columns corresponds to the output range of each hash function. When a certain API return value is encountered, all hash functions are used to map the return value, and the count is increased at the corresponding matrix position. Since different return values may be mapped to the same position, this mapping will cause a count conflict, but through the parallel use of multiple independent hash functions, the real frequency value can be estimated by statistical methods.

[0122] It should be noted that the frequency query process adopts a minimum value estimation strategy. When the frequency of a return value needs to be queried, all hash functions are used to map the return value to obtain the count values of multiple count matrix positions, and then the minimum value of the count values is taken as the frequency estimation result. The theoretical basis of this minimum value strategy is that although hash collisions can cause count values to be overestimated, at least one function in multiple independent hash functions has a high probability of producing fewer collisions, so the minimum value can provide a relatively accurate lower bound estimate of the frequency.

[0123] To further improve the estimation accuracy, the embodiment also implements a dynamic adjustment mechanism. By monitoring the collision rate and estimation bias of different hash functions, the dimension parameters of the count matrix are dynamically adjusted. When the estimation accuracy is detected to be insufficient, the number of hash functions is appropriately increased or the output range of each hash function is expanded. At the same time, the embodiment also uses a hierarchical sampling technique, and different processing strategies are used for high-frequency return values and low-frequency return values to maximize the overall estimation accuracy in limited storage space.

[0124] S2.A.3: In a single data stream scan, a preset approximation factor is used to construct a path, wherein the path represents a natural clustering interval of the API call return value, and the length of the path is determined by the approximation factor and the length of the longest path in the optimized stream data graph.

[0125] In this embodiment, the single data stream path construction algorithm embodies the efficiency of stream processing. The preset approximation factor a is usually set between 0.6 and 0.9, which controls the balance between the quality and efficiency of path construction. A dynamic path set is maintained during the single scan process. Whenever a new return value vertex is encountered, a greedy strategy is used to decide whether to add it to the existing path or start a new path. The determination of the path length combines the approximation factor and the topological properties of the graph, and the specific calculation formula combines heuristic algorithms. This path construction method can discover the main clustering patterns in the data in a single scan, providing high-quality candidate solutions for subsequent value interval division.

[0126] In addition, the path decision process of the greedy strategy embodies the intelligent selection ability of the system in real-time stream processing. When a new return value vertex is encountered, the compatibility and potential contribution of the vertex with all existing paths are first evaluated. Compatibility evaluation mainly considers the numerical proximity and frequency similarity between the new vertex and the endpoints of the existing paths. The numerical distance between the return value of the new vertex and the nearest endpoint of each existing path is calculated, and their frequency characteristics are compared. If the distance is within a preset threshold range and the frequency characteristics are similar, it is considered that the vertex has good compatibility with the path.

[0127] The evaluation of potential contribution is more complex, which needs to predict the impact on the overall path quality after adding a new vertex to the existing path. The quality evaluation indicators include the continuity of the path, the uniformity of the density, and the matching degree with the target proportion value distribution. The simulation calculates the changes of various quality indicators of the path after adding a new vertex. If the addition operation can significantly improve the path quality, the path will obtain a higher contribution score. At the same time, the embodiment also considers the balance of the path length to avoid some paths growing too much while other paths being too small.

[0128] The decision to start a new path is based on multiple judgment criteria. When the compatibility of the new vertex with all existing paths is poor, starting a new path is preferred. In addition, even if there is a compatible existing path, if the new vertex shows unique frequency characteristics or numerical characteristics, the embodiment may choose to start a new path to maintain the diversity of the path set. The decision to start a new path also considers the control of the global path number. When the number of existing paths has approached the upper limit set by the system, the threshold for starting a new path is increased, and the new vertex is more inclined to be added to the existing path.

[0129] The implementation of the greedy strategy also includes a forward-looking evaluation mechanism. The embodiment not only considers the processing decision of the current vertex, but also predicts the characteristics of the vertices that may appear later based on historical data patterns, so as to make more globally optimized decisions. This forward-looking mechanism is realized by maintaining statistical characteristics in a sliding window, analyzing the sequence of recently processed vertices, identifying patterns and trends therein, and adjusting the parameter settings of the greedy strategy accordingly.

[0130] S2.A.4: From the constructed multiple paths, paths that meet the path requirements related to the target call volume proportion value of the center interval are selected, and the selected paths are divided according to the target interval number according to a preset segmentation strategy. The segmentation strategy is used to indicate the selection of a segmentation point that minimizes the total difference between each interval and the target proportion value.

[0131] In this embodiment, the path selection and segmentation process uses a multi-objective optimization method. Specifically, first, the candidate paths with the highest matching degree with the target call volume proportion value of the center interval are selected from the constructed multiple paths. The matching degree evaluation considers multiple factors such as the return value range covered by the path, the uniformity of the frequency distribution, and the fitting degree with the target proportion value. The preset segmentation strategy is based on a dynamic programming algorithm, and the objective function is to minimize the weighted squared error of the actual proportion value of each interval and the target proportion value. The selection of the segmentation point not only considers the proportion value matching degree, but also evaluates the rationality of the interval boundary to avoid segmentation at positions with sharp frequency changes.

[0132] It should be noted that the implementation of the dynamic programming segmentation strategy is based on the classical theory of optimal substructure and overlapping subproblems. First, the state space is defined, wherein each state represents an optimal segmentation scheme from the starting point of the path to a certain specific location. The design of the state transition equation comprehensively considers the two core objectives of the proportion value matching degree and the boundary rationality. The proportion value matching degree is quantified by calculating the weighted squared error between the actual call proportion value of each candidate interval and the target proportion value. The weight coefficient is dynamically adjusted according to the size of the target proportion value, ensuring that important intervals have higher matching accuracy requirements.

[0133] In addition, the evaluation of boundary rationality adopts a multi-dimensional quantitative index system. The frequency change gradient near the candidate segmentation point is analyzed, and the local frequency variance and the frequency difference between adjacent points are calculated. When the frequency change gradient at a certain location is too large, a penalty term is applied to the segmentation at that location, guiding the algorithm to select locations with relatively flat frequency changes as interval boundaries. Therefore, the final divided intervals have internal consistency and clear boundaries, avoiding the forced grouping of return values with large frequency feature differences into the same interval.

[0134] Furthermore, the state transition process of dynamic programming adopts a multi-stage decision model. At each decision stage, the optimal position of the next segmentation point needs to be determined. The algorithm enumerates all possible candidate positions for the segmentation point, and calculates the cost function value of transitioning from the current state to the new state for each candidate position. The cost function integrates multiple components such as proportion value matching error, boundary rationality penalty, and path continuity reward. By maintaining a dynamic programming table to record the optimal values and optimal decision paths of each state, the traceability of the global optimal solution is ensured.

[0135] Optionally, to handle the computational complexity problem caused by large-scale data, the embodiment implements state space compression and pruning optimization techniques. State space compression reduces storage requirements by identifying equivalent states, and when multiple states have the same optimal value and similar characteristics, they are merged into a single representative state. Pruning optimization excludes obviously suboptimal search branches in advance by maintaining the bounds of the current optimal solution, significantly reducing the algorithm's computation time. At the same time, the embodiment also adopts a divide-and-conquer strategy to divide the large-scale segmentation problem into multiple relatively independent subproblems, and then merges the results after parallel solving.

[0136] S2.A.5: Fine-tune the boundaries of the segmented intervals so that the difference between the actual proportion value of each segmented interval and the pre-set target proportion value distribution is less than the pre-set difference threshold, obtaining the value interval of each target sub-product.

[0137] In this embodiment, the interval boundary fine-tuning process employs an iterative optimization algorithm. The initial segmentation result is refined through local search methods, and each iteration attempts to slightly move the interval boundaries to improve the matching degree of the proportion value. The preset difference threshold is usually set to 5% to 10% of the target proportion value, and when the difference between the actual proportion value of all intervals and the target proportion value is less than the threshold, the optimization process is terminated. In order to avoid overfitting and high computational complexity, this embodiment sets a maximum number of iterations limit and adopts an early stopping strategy to terminate the optimization process when there is no significant improvement in continuous iterations. The final output value interval not only meets the proportion value requirement, but also has good statistical properties and business interpretation.

[0138] It should be noted that the iterative optimization algorithm of interval boundary fine-tuning adopts a hybrid strategy combining gradient descent and local search. The initialization stage of the algorithm is based on the output results of the dynamic programming segmentation strategy, and the boundary positions of each interval are taken as the initial values of the optimization variables. This embodiment defines a multi-objective optimization function, and the main objectives include minimizing the deviation of the actual proportion value of each interval from the target proportion value, maximizing the uniformity of the frequency distribution within the interval, and smoothing the transition between adjacent intervals. The optimization function adopts the form of weighted sum, and the weights of each target are dynamically adjusted according to business requirements and historical optimization experience.

[0139] The gradient calculation process takes into account the impact of boundary position changes on multiple target functions. Since small movements of the interval boundaries will affect the proportion values and statistical characteristics of the adjacent two intervals, the gradient of the composite function needs to be calculated. Gradient calculation uses numerical differentiation method, which estimates the rate of change of the target function by making small perturbations near each boundary position. In order to improve the accuracy of gradient estimation, this embodiment adopts the central difference format and adaptive step size adjustment mechanism, which dynamically adjusts the perturbation amplitude according to the smoothness of the local function.

[0140] The implementation of the local search strategy is based on the definition of neighborhood structure and the design of search rules. This embodiment defines multiple types of neighborhood structures for each boundary position, including fixed step neighborhood, proportional step neighborhood, and intelligent neighborhood. Fixed step neighborhood searches for better solutions within a fixed range near the boundary position, suitable for fine adjustment of local optimization. Proportional step neighborhood dynamically adjusts the search range according to the size of the current interval, ensuring that the search amplitude matches the interval size. Intelligent neighborhood adaptively determines the search direction and range based on historical optimization trajectories and function characteristics.

[0141] The convergence judgment of the iteration process adopts a comprehensive evaluation mechanism of multiple criteria. This embodiment monitors multiple indicators such as the change amplitude of the objective function value, the change amplitude of the boundary position, and the modulus of the gradient vector. When the changes of these indicators in consecutive iterations are all less than the preset threshold, the algorithm is determined to be converged and the iteration is terminated. In order to avoid falling into a local optimal solution, this embodiment also implements a random restart mechanism and a multi-start parallel search strategy. When the algorithm converges at a starting point, a new optimization process is started from a different initial position, and the optimal solutions obtained from different starting points are compared, and the global optimal result is selected as the final output. In addition, this embodiment also sets a maximum iteration number limit and a calculation time limit to ensure that the algorithm completes the optimization process within a reasonable time.

[0142] Based on the above embodiments, in some embodiments, step S3 can further include S3.A.1 to S3.A.5.

[0143] S3.A.1: Based on the first call volume proportion value of each target sub-product, a first graph structure is constructed, and the nodes in the first graph structure represent a value interval, and the edges in the first graph structure represent the relationship between the first call volume proportion values corresponding to adjacent value intervals.

[0144] In this embodiment, the first graph structure construction process adopts a graph theory modeling method based on proportion value relationship. This embodiment creates a special graph structure for each target sub-product, where each node represents a value interval obtained by dynamic division in the previous step. The attributes of the node not only include the upper and lower boundary values of the interval, but also include rich statistical information such as the first call volume proportion value, the number of calls, and the average response time of the interval in the previous N days. The construction of edges in the graph follows the interval adjacency principle, that is, an edge is established between intervals that are adjacent in value. The weight of the edge takes into account the smoothness of the proportion value change, and the calculation formula is:

[0145] where weight represents the weight of the edge, and respectively represent the first call volume proportion values of adjacent intervals. By setting the weight of the edge, it is ensured that intervals with similar proportion values have stronger connection strength, reflecting the continuity feature of the running state.

[0146] S3.A.2: Based on the second call volume proportion value of each target sub-product, a second graph structure is constructed, and the nodes in the second graph structure represent a value interval, and the edges in the second graph structure represent the relationship between the second call volume proportion values corresponding to adjacent value intervals.

[0147] In this embodiment, the second graph structure adopts the same topology structure as the first graph structure, but the node attributes and edge weights reflect the running state during the gray period. The nodes in the second graph structure contain the second call volume proportion value and related statistical indicators of the same interval during the gray period. In order to facilitate subsequent graph matching and difference analysis, it is ensured that the first graph structure and the second graph structure have completely consistent node identifiers and edge connection relationships. The calculation of the edge weight is also based on the proportion value data during the gray period. This symmetrical graph structure design lays the foundation for subsequent parallel difference analysis. This embodiment also calculates the proportion value change gradient for each edge, which is used to describe the continuity and directionality of the proportion value change between adjacent intervals.

[0148] S3.A.3: Adopt a preset semi-streaming strategy to perform parallel processing on all target sub-product corresponding first graph structures and second graph structures, so as to find a target path with the largest difference between the first graph structure and the second graph structure, wherein the semi-streaming strategy is used to indicate that only key intermediate results are saved.

[0149] In this embodiment, the semi-streaming strategy is a key technology for efficient processing of large-scale graph data. Unlike the traditional full graph loading method, the semi-streaming strategy uses a block processing and incremental calculation method to significantly reduce memory occupancy. This embodiment maintains a fixed-size working buffer that only saves the graph nodes currently being processed and key intermediate results. When finding the target path with the largest difference, an improved shortest path algorithm variant is used, and the objective function is changed from distance minimization to difference maximization. During the path search process, the corresponding path states in the first graph structure and the second graph structure are maintained, and the proportion value difference cumulative value of each node on the path is calculated in real time. The core advantage of semi-streaming processing is that it can process graph data far exceeding the memory capacity within a limited memory space while ensuring the accuracy of difference identification.

[0150] It should be noted that the core of the semi-streaming strategy is to break through the memory limit of the traditional full graph loading method through intelligent memory management and data flow control. This embodiment realizes a hierarchical cache architecture, which divides the graph data into multiple levels according to access frequency and importance. The highest layer cache saves the active nodes and key path information currently being processed, the middle layer cache maintains the adjacency relationship of the recently accessed nodes, and the bottom layer cache stores the complete graph structure index. When a node not in the current cache needs to be accessed, the subsequent access probability of the node is judged according to the prediction algorithm to decide whether to load it into the cache and which cache level to place it in.

[0151] The data flow control mechanism adopts a priority-based scheduling strategy. In this embodiment, different types of graph operations are assigned different priority weights. The difference calculation operation has the highest priority, the path construction operation has the second highest priority, and the statistical information update operation has the lowest priority. When the system resources are tight, low-priority operations will be temporarily suspended to ensure that critical difference identification tasks can be completed in a timely manner. At the same time, this embodiment also implements an incremental processing mechanism, which only recalculates the changed graph regions, avoiding the computational overhead caused by full graph reprocessing.

[0152] It should be noted that the improved shortest path algorithm variant converts the traditional distance minimization objective function into a difference maximization objective function, which requires redefining edge weights and path evaluation criteria. In the new algorithm framework, edge weights no longer represent the distance cost between two nodes, but represent the contribution of the difference between the occupancy values of two adjacent intervals. In this embodiment, the edge weight is determined by calculating the synergistic effect of the occupancy value changes of adjacent intervals in two time periods. When the occupancy value changes of two adjacent intervals are in the same direction and have a large amplitude, the corresponding edge weight will be set to a higher value.

[0153] In addition, the redesign of the path evaluation criteria takes into account two key factors: difference accumulation effect and path continuity. The difference accumulation effect is calculated by weighted sum of all edge weights in the path, and the weight coefficient is adjusted according to the position of the edge in the path. The edges in the center of the path get higher weights, reflecting their important role in the overall difference pattern. Path continuity is quantified by evaluating the smoothness of the change in adjacent edge weights in the path. Excessive jumps in weight changes will result in a continuity penalty, guiding the algorithm to find more stable and interpretable difference patterns.

[0154] In this embodiment, the search strategy of the algorithm adopts a heuristic-guided breadth-first search variant. Traditional breadth-first search expands nodes in order of increasing distance, while the improved algorithm expands in order of decreasing difference contribution. This embodiment maintains a priority queue, and the elements in the queue are sorted according to the cumulative difference value of the current path. Each time the path with the highest cumulative difference value is selected for extension, and the newly generated path is reinserted into the priority queue. To avoid search space explosion, a path length limit and a cumulative difference threshold are set. When the path length exceeds the limit or the cumulative difference is below the threshold, the corresponding search branch will be terminated early.

[0155] S3.A.4: Calculate the interval occupancy value difference rate based on the target path, map the target path to the overall change of the interval sequence, and identify the interval distribution change pattern.

[0156] In this embodiment, the target path difference rate calculation process integrates path-level and node-level analysis methods. Specifically, the target path is first mapped into an ordered interval sequence, and then the proportion value difference of each interval in the sequence is calculated in two time periods. The path-level difference rate calculation considers the overall characteristics of the path, including path length, average proportion value change, maximum single-point difference, and other indicators. The identification of interval distribution change patterns uses time series analysis techniques to detect whether there are significant trend changes, periodic patterns, or abrupt points in the path. This multi-level analysis method can identify structural change patterns that are difficult to find by traditional single-point comparison methods, such as systematic bias in a continuous interval range or redistribution of proportion values of specific patterns.

[0157] It should be noted that the core of the target path difference rate calculation process is to convert complex graph structure information into quantifiable difference indicators. First, the path mapping operation is performed to rearrange the node sequence in the target path according to the numerical order of the return value, forming a continuous interval sequence. This mapping process needs to handle the non-continuous jumps that may exist in the path. When the path contains non-adjacent intervals, the missing intervals are filled by interpolation methods to ensure the integrity and continuity of the sequence.

[0158] The node-level difference analysis uses a combination of point-by-point comparison and statistical testing methods. For each interval node in the sequence, the call volume proportion value in the previous N days and the gray period is calculated, and various difference measurement methods are applied for quantification. In addition to the basic absolute difference and relative difference, this embodiment also calculates advanced indicators such as standardized difference and quantile difference. The standardized difference compares the proportion value change of the interval with the standard deviation of the historical fluctuation of the interval, identifying abnormal changes that exceed the normal fluctuation range. The quantile difference compares the ranking change of the interval proportion value in the global distribution, discovering significant adjustments in relative position.

[0159] The path-level difference rate calculation considers the multi-dimensional characteristic attributes of the path. The path length feature is quantified by calculating the number of intervals contained in the path and the range of return values covered. Longer paths usually represent a wider range of system impact. The average proportion value change is calculated by weighted averaging the proportion value differences of all intervals in the path, with the weights determined according to the call volume and historical stability of each interval. The maximum single-point difference identifies the interval with the most dramatic change in proportion value in the path and analyzes its contribution to the overall path difference.

[0160] The application of time series analysis techniques provides a powerful analysis tool for interval distribution change pattern recognition. This embodiment constructs a time series model for each interval, using historical proportion data as training samples to predict the expected proportion under normal circumstances during the gray period. Trend change detection identifies systematic change patterns by comparing the deviation of the actual proportion from the trend prediction value. The Mann-Kendall trend test is used to statistically verify the significance of the trend change, and when the test result shows a significant upward or downward trend, this embodiment marks it as an important change pattern.

[0161] Periodic pattern recognition uses a frequency domain analysis method to convert time series to the frequency domain through fast Fourier transform, identifying periodic components in proportion change. When a significant periodic pattern is detected, this embodiment further analyzes whether the pattern has changed during the gray period, including adjustments in cycle length, changes in amplitude, and phase shifts. Abrupt change detection is based on change point analysis theory, using CUSUM test and Bayesian change point detection to identify structural breakpoints in proportion sequences, which usually correspond to sudden changes in system operation status.

[0162] S3.A.5: Aggregate the path difference analysis results composed of the interval proportion difference rate and the interval distribution change pattern to obtain the original difference rate data.

[0163] In this embodiment, the path difference analysis result aggregation process uses a weighted fusion strategy. This embodiment takes the interval proportion difference rate and the interval distribution change pattern as two independent feature dimensions, and calculates a comprehensive difference score using multivariate statistical methods. During the aggregation process, the difference results of different paths are standardized to ensure that the difference scores from different sub-products and different path lengths are comparable. The final original difference rate data not only contains traditional point-to-point difference information, but also incorporates path-level structural difference features, providing richer and more accurate input data for subsequent sharpening.

[0164] The weighted fusion strategy of path difference analysis result aggregation reflects the complexity and accuracy requirements of multi-dimensional information integration. This embodiment first standardizes the interval proportion difference rate and the interval distribution change pattern, which are two core feature dimensions. The standardization of the interval proportion difference rate uses the Z-score method to convert all path difference rate values into a standard normal distribution, eliminating the differences in numerical scales between different paths. The standardization of the interval distribution change pattern is more complex, as this feature includes trend, periodicity, and abrupt change sub-dimensions, each of which needs to be standardized separately.

[0165] The weight determination mechanism adopts an adaptive learning method, which optimizes the weight configuration of each feature dimension by analyzing the risk identification effect of historical gray release. A machine learning model is used to establish the mapping relationship between feature weight and risk identification accuracy. The training data of the model includes feature values, weight configuration, and the final risk identification result in historical gray release. The embodiment also implements an online learning mechanism to dynamically adjust the weight parameters according to the real-time feedback of the current gray release, ensuring that the fusion strategy can adapt to the changing system environment and business characteristics.

[0166] The application of multivariate statistical methods provides a theoretical basis for the calculation of comprehensive difference scores. Principal component analysis is used to identify the main variation direction in the feature space. In this embodiment, the importance weight of each feature dimension is determined by calculating its projection on the principal component. Discriminant analysis is used to optimize the classification effect of feature combination, and the optimal feature weight configuration is determined by maximizing the difference between classes and minimizing the difference within classes. This embodiment also uses the idea of ensemble learning, which independently calculates the comprehensive score using multiple different statistical methods, and then obtains the final result through voting or weighted averaging.

[0167] The quality control mechanism of the fusion process ensures the reliability and stability of the results. This embodiment implements a cross-validation framework by dividing historical data into training and test sets to verify the generalization ability of the fusion strategy. Confidence interval estimation calculates the uncertainty range of the comprehensive difference score through bootstrap resampling. When the confidence interval is too wide, this embodiment increases the feature sampling density or adjusts the fusion parameters to improve the estimation accuracy. The anomaly detection mechanism identifies fusion results that deviate significantly from the normal pattern based on statistical distance and clustering analysis. These abnormal results are marked and manually reviewed.

[0168] The explainability analysis of the fusion results provides system administrators with a tool for in-depth understanding of the risk assessment process. This embodiment generates a feature contribution decomposition report, which details the specific contribution of each feature dimension to the final comprehensive score. Sensitivity analysis assesses the stability of the fusion results by perturbing the input feature values, identifying feature combinations that are highly sensitive to small changes. The visualization display module converts complex multi-dimensional feature relationships into intuitive charts, including feature importance bar charts, correlation heat maps, and time series evolution trajectories, helping users quickly understand and verify the rationality of risk assessment.

[0169] Based on the above embodiments, in this embodiment, step S4.1 can further include steps S4.A.1 to S4.A.5.

[0170] S4.A.1: Establish a Gaussian Process Regression model for each target sub-product, wherein the input of the Gaussian Process Regression model includes the gray period calling volume and the first calling volume proportion value, and the target variable of the Gaussian Process Regression model is the original difference rate data.

[0171] In this embodiment, the Gaussian Process Regression model embodies the application of Bayesian machine learning in parameter optimization. This embodiment independently establishes a GPR model for each target sub-product, and the input feature matrix contains two dimensions of gray period calling volume and first calling volume proportion value. These features are standardized to ensure numerical stability. The kernel function of the Gaussian process selects a combination of RBF kernel and Matérn kernel, which can effectively capture the non-linear relationship between the input features and the target variables. The hyperparameters of the model are automatically determined by the maximum likelihood estimation method, including the length scale of the kernel function, the signal variance and the noise variance. The GPR model can not only predict the expected value of the target variable, but also quantify the uncertainty of the prediction, which provides important confidence information for the subsequent optimization algorithm.

[0172] The construction process of the Gaussian Process Regression model embodies the unique advantages of the Bayesian framework in handling uncertainty and small sample learning. The design of independently establishing a GPR model for each target sub-product in this embodiment takes into account the heterogeneity characteristics between different sub-products, avoiding the generalization bias that may be produced by a global model. Each independent model can fully learn the specific patterns and rules of the corresponding sub-product, including its seasonal characteristics of calling volume changes, stability patterns of proportion value distribution, and sensitivity to external interference, etc.

[0173] The construction process of the input feature matrix adopts a carefully designed feature engineering strategy. The gray period calling volume feature is processed by logarithmic transformation and quantile standardization to ensure that extreme values do not have an excessive impact on model training. The first calling volume proportion value feature is mapped to an unbounded space through a logical transformation, avoiding the limitations of the model learning caused by the boundary constraints of the probability value. The standardization process uses a robust standardization method that uses the median and interquartile range instead of the mean and standard deviation, improving the resistance to outliers. This embodiment also monitors the skewness and kurtosis of the feature distribution. When the distribution deviates significantly from normality, Box-Cox transformation or Yeo-Johnson transformation is automatically applied for distribution correction.

[0174] The combination design of the kernel function makes full use of the complementary characteristics of different kernel functions. The RBF kernel has the smoothness of infinite differentiability, which can capture the local similarity pattern in the input space, and is suitable for modeling continuous and smooth function relationships. The kernel family provides more expressive power by adjusting the smoothness parameter, especially and The kernel allows the function to have finite order derivatives while keeping reasonable smoothness, which is more consistent with the non-perfectly smooth characteristics that may exist in real-world systems. The kernel function combination adopts the form of weighted summation, and the weight coefficients are automatically learned by maximizing the marginal likelihood. In this embodiment, the relative importance of each kernel function is adaptively adjusted during the model training process.

[0175] The hyperparameter optimization process adopts a hierarchical Bayesian method to introduce domain knowledge and regularization constraints by setting appropriate prior distributions for hyperparameters. The prior distribution of the length scale parameter is set based on the typical scale of the feature space, and the prior of the signal variance parameter is determined according to the empirical variance of the target variable. The noise variance parameter adopts an inverse gamma prior, which reflects the preference for low-noise solutions. This embodiment performs posterior inference through Markov Chain Monte Carlo method or variational inference technique to obtain the complete posterior distribution of hyperparameters rather than just point estimates, providing more abundant information for the quantification of prediction uncertainty.

[0176] The model validation and diagnosis mechanism ensures the quality and reliability of the GPR model. This embodiment calculates the predictive log-likelihood and root mean square error of the model through leave-one-out cross-validation to evaluate the fitting quality and generalization ability of the model. Residual analysis identifies systematic bias and heteroscedasticity problems in the model by examining the distribution characteristics of the prediction residuals. When the model is detected to be insufficient, this embodiment automatically adjusts the kernel function type, increases the feature dimension, or modifies the data preprocessing strategy.

[0177] S4.A.2: determining a multi-objective optimization function, wherein the multi-objective optimization function includes a difference rate detection model and a false alarm rate model composed of a sharpening parameter vector, the sharpening parameter vector including the sharpening coefficient and the sharpening coefficient, the multi-objective optimization function being used to indicate maximizing the difference rate detection model and minimizing the false alarm rate model.

[0178] In this embodiment, the multi-objective optimization function design balances the two conflicting goals of detection ability and false alarm control. The objective function of the difference rate detection model is defined as where TP represents the true positive rate, and the sharpening parameter vector. The objective function of the false alarm rate model is defined as where FP represents the false positive rate. The sharpening parameter vector contains the call volume sharpening coefficient and the proportion value sharpening coefficient, as well as their corresponding boundary parameters and weight factors. The challenge of multi-objective optimization lies in the trade-off between the two objectives, as improving detection ability often increases the risk of false alarms. The system uses the concept of Pareto frontier to handle this trade-off, seeking a solution set that cannot be further improved on both objectives.

[0179] The application of the Pareto frontier concept provides a theoretically rigorous and practically effective solution to multi-objective optimization problems. This embodiment first establishes a mathematical framework for multi-objective optimization, taking the difference rate detection model and the false alarm rate model as two mutually competitive objective functions. The goal of the difference rate detection model is to maximize the identification rate of true risk, which is quantified by calculating the proportion of high-risk intervals that can be correctly identified after sharpening. The goal of the false alarm rate model is to minimize the frequency of false alarms, which is evaluated by counting the proportion of normal intervals that are incorrectly labeled as high-risk.

[0180] The determination of the Pareto dominance relationship uses a strict mathematical definition and an efficient calculation algorithm. For any two solutions in the solution space, this embodiment compares their performance on all objective functions. Only when one solution is strictly superior to the other in at least one objective and not inferior to the other in all other objectives is a dominance relationship considered to exist. The identification of non-dominant solutions is achieved through a fast non-dominant sorting algorithm, which can identify all Pareto optimal solutions in the current solution set at a lower computational complexity.

[0181] The maintenance and update of the Pareto frontier use dynamic data structures and incremental calculation techniques. This embodiment maintains a set of Pareto frontier solutions. When a new candidate solution is generated, it is compared with existing frontier solutions for dominance. If the new solution is dominated by existing solutions, it is discarded directly. If the new solution dominates some existing solutions, the dominated solutions are removed from the frontier, and the new solution is added to the frontier. If the new solution is not dominated by or dominates existing solutions, it is added to the frontier directly. To control the number and diversity of frontier solutions, this embodiment also implements a crowded distance calculation and an elite preservation strategy.

[0182] The selection of solutions and decision support mechanisms provide operational guidance for practical applications. When the Pareto frontier contains multiple non-dominant solutions, this embodiment needs to make a final selection based on business needs and risk preferences. The weight method converts the multi-objective problem into a single-objective problem for solving by assigning importance weights to different objectives. The ideal point method calculates the distance between each frontier solution and the ideal point, and selects the solution closest to the ideal point as the compromise solution. The interactive decision support system allows users to visually observe the trade-off relationship between different solutions through a graphical interface and make subjective choices based on actual needs.

[0183] The evaluation and improvement of frontier quality provide performance guarantees for the optimization process. This embodiment evaluates the quality of the frontier by calculating indicators such as coverage, uniformity, and convergence of the frontier. Coverage measures the distribution range of frontier solutions in the objective space, uniformity assesses whether the distribution density between frontier solutions is uniform, and convergence checks whether the frontier is close to the true Pareto frontier. When the quality of the frontier does not meet the requirements, this embodiment adjusts the search strategy, increases computational resources, or modifies the definition of the objective function to improve the optimization effect.

[0184] S4.A.3: determining a trust region constraint, the trust region constraint being used to limit the variation range of the parameters in each optimization iteration.

[0185] In this embodiment, the trust region constraint design ensures the stability and convergence of the optimization process. The radius of the trust region adopts an adaptive adjustment strategy, and the initial radius is determined based on the characteristic scale of the parameter space. The radius adjustment rule is based on the comparison of model prediction accuracy and actual improvement effect: when the actual improvement effect is close to or exceeds the model prediction, the trust region is expanded; when the actual effect is significantly lower than the prediction, the trust region is reduced. This adaptive mechanism can accelerate the convergence process while ensuring the stability of the optimization.

[0186] S4.A.4: using a preset Bayesian optimization algorithm, based on the Gaussian process regression model and the multi-objective optimization function, iteratively optimizing the sharpening parameter vector under the condition of the trust region constraint until convergence or reaching a preset number of iterations.

[0187] In this embodiment, the Bayesian optimization algorithm uses an improved expected improvement (EI) acquisition function. The core idea of the algorithm is to use the prediction mean and variance information of the Gaussian process model to balance between exploring unknown regions and utilizing known optimal regions. In each iteration, the parameter point that maximizes the acquisition function value is searched within the trust region constraint, and then the real objective function value is evaluated at this point and the Gaussian process model is updated. Multi-objective optimization is handled by the scalarization method, which dynamically adjusts the weight coefficients of each objective to explore different regions of the Pareto front. Convergence is judged based on the amplitude of parameter change and the degree of improvement of the objective function between consecutive iterations. When the change amplitude is less than a preset threshold and there is no significant improvement for a certain number of consecutive iterations, the optimization process is terminated.

[0188] The improved design of the expected improvement acquisition function fully considers the complex requirements of multi-objective optimization and constraint handling. The traditional expected improvement function only considers the improvement degree of a single objective, while the improved version needs to handle both the false positive rate control and the difference rate detection. This embodiment constructs a composite expected improvement function by weighted linear combination, and the weight coefficients are dynamically adjusted according to the distribution characteristics of the current Pareto front. When there are fewer solutions on the current front in a certain objective direction, the weight of the corresponding objective is increased to guide the search process to explore the under-sampled region.

[0189] The acquisition function's computation leverages the probabilistic nature of the Gaussian process model. For any candidate parameter point, the Gaussian process model can provide a predictive distribution of the objective function's value, including a predictive mean and a predictive variance. The expected improvement's computation is based on a comparison between the current optimum and the predictive distribution, by integrating the probability and the expected improvement magnitude beyond the current optimum. The improved acquisition function also introduces an uncertainty bonus mechanism, giving extra exploration incentive to regions with larger predictive variance, balancing the trade-off between exploiting known excellent regions and exploring unknown regions.

[0190] The handling of trust region constraints adopts classical methods of constrained optimization. This embodiment converts the trust region constraints into a quadratic constrained optimization problem, which is solved by the Lagrange multiplier method or the sequential quadratic programming algorithm. The handling of constraints not only considers the geometric constraints of the parameter space, but also considers soft constraints based on the model's confidence. When the Gaussian process model's prediction in some regions has too high uncertainty, this embodiment limits the search intensity in these regions through soft constraints, avoiding making wrong decisions based on unreliable predictions.

[0191] The global optimization of the search process adopts a multi-start parallel strategy and intelligent initialization technology. This embodiment generates multiple initial search points within the trust region, and the selection of these points is based on space-filling design and historical search experience. Latin hypercube sampling ensures the uniform distribution of initial points in the parameter space, while heuristic initialization based on gradient information will bias the search starting point to the direction with the largest expected improvement in the current trust region. Multiple search processes are executed in parallel, and the progress of each search thread is monitored in real time. When a thread finds a significantly better solution, other threads will adjust their search strategies accordingly.

[0192] The model updating and adaptive learning mechanism ensures the continuous improvement of the optimization process. After evaluating the objective function at a new parameter point each time, this embodiment adds the new observation data to the training set and updates the posterior distribution of the Gaussian process model. The incremental learning algorithm avoids the computational overhead of retraining the model from scratch, and efficiently integrates new information through recursive updating. This embodiment also regularly re-evaluates the model's hyperparameter settings. When there is enough new data accumulated, it will trigger the re-optimization of hyperparameters, ensuring that the model always maintains the best prediction performance.

[0193] S4.A.5: Data augmentation is performed on the sharpened parameter vector and the original difference rate data after iteration to optimize the difference rate data after sharpening of the call volume.

[0194] In this embodiment, the data augmentation process adopts an intelligent sampling strategy based on model confidence. This embodiment utilizes the optimized sharpening parameter vector and the uncertainty information of the Gaussian process model to generate additional training samples based on the original difference rate data. The focus of data augmentation is on areas with high model prediction uncertainty, and the model's generalization ability is improved by increasing the sample density in these areas. The augmentation process uses conditional variational autoencoder (Conditional VAE) technology, which can generate synthetic samples consistent with the original data distribution. The final call volume sharpening difference rate data not only contains the original calculation results, but also incorporates the improvement effect of the optimized parameters and the additional information generated by data augmentation, significantly improving the accuracy and robustness of subsequent risk identification.

[0195] The application of conditional variational autoencoder technology provides strong generative modeling capability for data augmentation. The architecture design of CVAE includes three core components: encoder, decoder, and conditional input. The encoder network maps the original difference rate data to a low-dimensional latent representation space, learning the internal structure and patterns of the data through multiple layers of neural networks. The decoder network performs inverse mapping to reconstruct the original data from the latent representation and conditional information. The conditional input contains meta-feature information of the target sub-product, such as call volume level, historical stability indicators, business type, etc., ensuring that the generated synthetic samples have statistical characteristics matching the specific sub-product.

[0196] The design of the latent space adopts the theoretical framework of variational inference, introducing regularization terms to ensure that the learned representation has good generative properties. The encoder outputs the mean and variance parameters of the latent variable, defining the posterior distribution of the latent variable. The KL divergence regularization term constrains the posterior distribution to be close to the standard normal prior distribution, ensuring the continuity and interpolability of the latent space. The reparameterization trick moves the random sampling process outside the network, allowing the entire model to be trained end-to-end through backpropagation.

[0197] The encoding and integration of conditional information use multi-modal fusion technology. Different types of conditional features are processed through specialized encoding networks, numerical features are encoded through fully connected layers, and categorical features are converted to dense vector representations through embedding layers. The fusion of multiple conditional features uses an attention mechanism, which automatically learns the importance weights of different conditional features and adjusts the fusion strategy according to the specific needs of the generation task. Conditional information is injected at multiple levels of the decoder, ensuring that the generation process can fully utilize the conditional constraints.

[0198] The quality control mechanism of the generation process ensures the authenticity and diversity of the synthetic samples. This embodiment introduces a discriminator network through the idea of adversarial training, whose task is to distinguish between real samples and generated samples, while the generator (decoder of CVAE) aims to generate samples realistic enough to deceive the discriminator. This adversarial training process improves the quality of generated samples, making them closer to the distribution characteristics of real data. Diversity is guaranteed by structured sampling in the latent space, and this embodiment samples different regions of the latent space to ensure that the generated samples cover various modes of the data distribution.

[0199] The optimization strategy for model training adopts the idea of phased training and curriculum learning. In the initial stage, this embodiment focuses on reconstruction quality by minimizing reconstruction error to learn the basic patterns of data. In the intermediate stage, a regularization term is introduced to balance the reconstruction quality and the regularity of the latent representation. In the final stage, conditional constraints and quality evaluation are added to ensure that the generated samples meet specific condition requirements. The learning rate scheduling adopts the cosine annealing strategy to dynamically adjust the learning rate during training to achieve better convergence effect.

[0200] The verification and screening mechanism of the generated samples ensures the effectiveness of data augmentation. This embodiment verifies the distribution consistency of the generated samples with the original data through various statistical test methods, including Kolmogorov-Smirnov test, Anderson-Darling test, etc. The quality score of the generated samples is based on the comprehensive evaluation of reconstruction error, condition consistency and distribution matching degree. Only samples that pass the quality threshold will be used for subsequent model training. This embodiment also monitors the impact of generated samples on the final model performance, and verifies the actual effect of data augmentation through A / B testing.

[0201] In some embodiments, the present application can also include the following steps S6.1 to S6.6.

[0202] S6.1: Identify implicit confounding factors in the gray environment, including changes in user access patterns, fluctuations in network environment, and changes in dependent service performance.

[0203] In the process of identifying implicit confounding factors in the grayscale environment, the embodiment adopts a method combining multi-dimensional monitoring and statistical testing. The identification of changes in user access patterns is achieved by analyzing user behavior logs and monitoring key indicators such as user session duration distribution, page access path changes, and user device type distribution. The embodiment establishes a user behavior baseline model, and when it detects that the access pattern deviates from the historical baseline by more than a preset threshold, it automatically marks it as a potential confounding factor. The monitoring of network environment fluctuations covers multiple aspects, including network delay distribution, packet loss rate changes, and bandwidth utilization fluctuations. The embodiment integrates with the network monitoring platform through an interface to obtain network quality data in real time and uses a sliding window statistical method to identify abnormal network environment changes.

[0204] The identification mechanism that relies on service performance changes is more complex, and the embodiment needs to monitor the health status of all upstream and downstream services. This includes database response time changes, cache hit rate fluctuations, and changes in the availability of third-party API services. The embodiment establishes a service dependency graph and uses a graph traversal algorithm to identify all dependent services that may affect the target sub-product. When it detects significant changes in the performance indicators of dependent services, it calculates the potential impact on the target sub-product and marks changes with an impact degree exceeding a threshold as confounding factors.

[0205] In addition to predefined confounding factor categories, the embodiment also implements an adaptive confounding factor discovery mechanism. Through principal component analysis and anomaly detection algorithms, the embodiment can automatically identify potential implicit confounding factors that have not been explicitly defined. This mechanism is particularly suitable for complex microservice architecture environments where interactions between systems can produce unexpected confounding effects.

[0206] S6.2: A preset two-stage least squares algorithm is used to establish a causal inference model, wherein the first stage of the causal inference model is used to indicate the use of quasi-instrumental variables related to the implicit confounding factors to predict the grayscale state, and the second stage of the causal inference model is used to indicate the use of the predicted value of the grayscale state to estimate the true causal effect on the return value distribution.

[0207] It should be noted that the implementation of the two-stage least squares (2SLS) algorithm fully considers the special nature of the grayscale release environment. In the first stage, the embodiment needs to identify and construct effective quasi-instrumental variables. The selection of quasi-instrumental variables follows three basic criteria: correlation (strong correlation with the grayscale state), exogeneity (does not directly affect the return value distribution), and exclusivity (only affects the result through the grayscale state). Common quasi-instrumental variables include the random seed of the grayscale shunting algorithm, the routing weight configuration of the load balancer, and the historical release timestamp unrelated to the current grayscale.

[0208] The specific form of the first-stage regression model is:

[0209] where GrayStatus represents the gray status (0 or 1), InstrumentalVar represents the instrumental variable vector, and ControlVars represents the observable control variables such as request time, user type, etc. are the calculation parameters of the first-stage regression model. The system uses a robust standard error estimation method to handle possible heteroscedasticity and serial correlation problems.

[0210] The second-stage regression uses the predicted values of the first stage to estimate the true causal effect of the gray status on the return value distribution. The model form is:

[0211] where PredictedGrayStatus is the gray status prediction value obtained by the first-stage regression, the coefficient represents the pure causal effect of the gray release on the return value distribution, excluding the interference of confounding factors, are the calculation parameters of the corresponding model.

[0212] In addition, the embodiment also implements a variety of robustness test methods, including weak instrumental variable test, over-identification test, etc., to ensure the reliability of the causal inference result. When detecting insufficient strength of the instrumental variable or over-identification problem, the model setting is automatically adjusted or a more suitable instrumental variable is found.

[0213] S6.3: Based on the original difference rate data and the difference rate adjustment data obtained by adjusting the original difference rate data by the causal inference model, calculate the confounding sensitivity index (CSI) of each target sub-product.

[0214] where the calculation process of the confounding sensitivity index (CSI) reflects the value of causal inference in risk assessment. The embodiment first obtains the original difference rate data (without confounding adjustment) and the difference rate adjustment data (adjusted by the causal inference model) through the foregoing steps. In the generation process of the difference rate adjustment data, the pure effect estimated by the causal inference model is used to correct the original difference rate, eliminating the influence of confounding factors.

[0215] The calculation formula of CSI is:

[0216] where RawDiffRatio represents the raw difference ratio, AdjustedDiffRatio represents the adjusted difference ratio, and threshold is a minimum threshold set to avoid division by zero error. The larger the CSI value, the more susceptible the difference ratio of the sub-product interval to confounding factors, and the lower the reliability of the risk assessment result.

[0217] Optionally, the embodiment also calculates the confidence interval of CSI, estimates the distribution characteristics of CSI through Bootstrap resampling. This statistical method can quantify the uncertainty of CSI estimation, and provide more reliable basis for subsequent risk classification. When the confidence interval of CSI is wide, it indicates that the estimation of confounding sensitivity has a large uncertainty, and the corresponding warning information is given in the risk report.

[0218] S6.4: Based on the confounding sensitivity index, calculate the causal weight.

[0219] In this embodiment, the calculation of causal weight considers multiple dimensions such as the strength of causal effect, statistical significance and confounding sensitivity. The basic causal weight calculation formula is:

[0220] where CausalWeight represents the causal weight, CausalEffect represents the causal effect size estimated by the causal inference model, represents the statistical significance level of the causal effect, CSI is the confounding sensitivity index mentioned above, and ReliabilityFactor is the reliability adjustment factor based on the strength of instrumental variables and model diagnosis results. This multi-dimensional weight design ensures that the causal weight can accurately reflect the strength and reliability of the causal relationship in each sub-product interval.

[0221] Optionally, the embodiment also realizes a dynamic weight adjustment mechanism, which adjusts the current weight calculation according to the accuracy of historical causal inference. By maintaining a historical record of causal inference accuracy, it can identify better weight calculation strategies under certain conditions and perform corresponding parameter optimization.

[0222] S6.5: Perform causal enhancement sharpening processing on the causal weight and the sharpened difference ratio data to form a causal enhancement risk assessment result.

[0223] In this embodiment, causal enhancement sharpening processing combines traditional statistical sharpening methods with causal inference results to form a more reliable risk assessment framework. The core formula of enhanced sharpening is:

[0224] Wherein, CausalEnhancedRatio represents the causal enhanced risk assessment result, StandardSharpedRatio represents the preset standard sharped ratio, ConfidenceMultiplier represents an adjustment factor based on the confidence of causal inference, which is close to 1 when the confidence interval of the causal effect is narrow and the statistical significance is high; when there is great uncertainty in the causal inference result, the factor will be correspondingly reduced, so as to give a lower weight in the final risk assessment.

[0225] In addition, the causal enhancement sharpening process also includes time series consistency test. The embodiment compares the current causal inference result with the causal pattern of the historical same type of gray release, and identifies the abnormal change of the causal relationship. When a significant change in the causal pattern is detected, an additional verification process is triggered to ensure the accuracy of the risk assessment.

[0226] S6.6: Based on the causal enhanced risk assessment result, the identified risk points are divided into high confidence causal risk, possible causal risk and correlation risk, and the high risk sub-product list and the corresponding risk prompt report are generated.

[0227] In the embodiment, the risk stratification based on the causal enhanced risk assessment result adopts a multi-level classification standard. The determination standard of the high confidence causal risk includes: statistical significance of causal effect (p<0.01), causal weight exceeding the preset threshold (usually 0.7), low confounding sensitivity index (CSI<0.3), and sufficient strength of instrumental variable. The risk points meeting these conditions are considered as high confidence risks directly caused by gray release.

[0228] The determination standard of the possible causal risk is relatively loose, including the marginal significant of the causal effect (0.01<p<0.1) or the causal weight in the medium level (0.3<CausalWeight<0.7). This kind of risk point may have real causal relationship, but the evidence strength is not enough to reach the high confidence standard.

[0229] The correlation risk refers to the risk point which only has statistical correlation but lacks sufficient causal evidence. The causal weight of these risk points is usually low (CausalWeight<0.3), or the confounding sensitivity index is high (CSI>0.7), indicating that the observed difference may be mainly caused by confounding factors.

[0230] The risk warning report is generated using interpretable AI technology, providing not only risk classification results but also detailed explanations of the basis for the classification and the causal inference process. The report includes causal path diagrams, counterfactual analysis results, and assessments of the impact of confounding factors, helping engineers gain a deeper understanding of the nature and mechanisms of risk. This embodiment also proposes specific solutions and preventative measures based on causal relationship analysis.

[0231] like Figure 4 As shown, the present invention also provides an automated testing device based on product value distribution in system canary releases. The automated testing device 400 based on product value distribution in system canary releases includes: The sub-product screening module 401 is used to query the first call volume data and the second call volume data of each sub-product in the previous N days and the gray-scale period based on the obtained preset call volume threshold, and to filter out sub-products whose first call volume data and second call volume data both exceed the corresponding call volume threshold, so as to form a list of sub-products to be tested. The call volume threshold includes the call volume threshold of the previous N days and the call volume threshold of the gray-scale period. ; The value interval division module 402 is used to perform value interval division based on the API call return value of each target sub-product in the list of sub-products to be tested for the previous N days, according to the API call return value, the preset central interval target call volume ratio value and the number of target intervals, and generate the value interval of each target sub-product. The difference calculation module 403 is used to calculate the first call volume percentage value and the second call volume percentage value in parallel through multi-threading, and calculate the difference rate of the call volume percentage values ​​of each value interval in the two time periods based on the first call volume percentage value and the second call volume percentage value, as the original difference rate data. The first call volume percentage value is used to indicate the percentage of the call volume of the target sub-product in each value interval in the first N days to the total call volume of the target sub-product, and the second call volume percentage value is used to indicate the percentage of the call volume of the target sub-product in each value interval during the gray period to the total call volume. The sharpening module 404 is used to perform call volume sharpening processing on the original difference rate data based on the call volume of each target sub-product in each value range during the gray period, to obtain call volume sharpened difference rate data, and to perform proportion value sharpening processing on the call volume sharpened difference rate data and the first call volume proportion value to obtain sharpened difference rate data. The risk identification module 405 is configured to calculate a group average sharpening difference rate of each target sub-product based on the sharpening difference rate data, identify a first a target sub-product in a sequence of the group average sharpening difference rate, and filter a first b value interval in a sequence of the sharpening difference rate data, combine and remove duplicates of the identified target sub-product and a target sub-product corresponding to the filtered value interval, and generate a high-risk sub-product list and a corresponding risk prompt report, wherein the group average sharpening difference rate is used to indicate an average value of sharpening difference rate data of all value intervals of a single sub-product, , .

[0232] The above description is only a preferred embodiment of the present application, and is not a limitation on the form and essence of the present application. Those skilled in the art can make various changes and improvements to the technical solutions of the embodiment without departing from the concept and principle of the present application. The formed new technical solutions are within the protection scope of the present application.

Claims

1. A method for automated testing based on product value distribution in system gray release, characterized in that, The method comprises the following steps: Based on the obtained preset calling quantity threshold, the first calling quantity data of each sub-product in the previous N days and the second calling quantity data during the gray period are queried, and the sub-products whose first calling quantity data and second calling quantity data both exceed the corresponding calling quantity threshold are screened out to form a list of sub-products to be tested, wherein the calling quantity threshold includes a calling quantity threshold in the previous N days and a calling quantity threshold during the gray period, ; Based on the API call return value of each target sub-product in the list of sub-products to be tested in the past N days, value interval division is performed according to the API call return value, a preset central interval target call quantity proportion value and a target interval number execution value, and the value interval of each target sub-product is generated. The first call quantity proportion value and the second call quantity proportion value are calculated in parallel through multi-threading, and the difference rate of the call quantity proportion value of each value interval in the two time periods is calculated based on the first call quantity proportion value and the second call quantity proportion value as the original difference rate data, wherein the first call quantity proportion value is used to indicate the percentage of the call quantity of the target sub-product in each value interval to the total call quantity of the target sub-product, and the second call quantity proportion value is used to indicate the percentage of the call quantity of the target sub-product in each value interval during the gray period to the total call quantity. Based on the gray period call quantity of each target sub-product in each value interval during the gray period, call quantity sharpening processing is performed on the original difference rate data to obtain call quantity sharpened difference rate data, and proportion value sharpening processing is performed based on the call quantity sharpened difference rate data and the first call quantity proportion value to obtain sharpened difference rate data. Based on the sharpening difference rate data, a group average sharpening difference rate of each target sub-product is calculated, a top a target sub-product in the group average sharpening difference rate is identified, and a top b value interval in the sharpening difference rate data is screened out, the identified target sub-product and the target sub-product corresponding to the screened value interval are combined and de-duplicated to generate a high-risk sub-product list and a corresponding risk prompt report, wherein the group average sharpening difference rate is used to indicate the average value of the sharpening difference rate data of all value intervals of a single sub-product, , .

2. The method of claim 1, wherein, The value interval of each target sub-product is generated based on the API call return value of each target sub-product in the list of sub-products to be tested in the past N days, value interval division is performed according to the API call return value, a preset central interval target call quantity proportion value and a target interval number execution value, and the value interval of each target sub-product is generated. The API call return value of each target sub-product in the list of sub-products to be tested in the past N days is queried, and the API call return value is arranged in ascending order to form a return value array; From the return value array, the possible interval satisfying the central interval target call quantity proportion value is selected, and the possible interval minimizing the return value range is selected as the central interval; According to the target proportion value and the target interval number, the target proportion value of each interval is determined; Taking the central interval as a reference, other intervals are determined according to the target proportion value to the left and right sides in turn, until the number of intervals reaches the target interval number, and the value interval of each target sub-product is obtained.

3. The method of claim 2, wherein, The first call quantity proportion value and the second call quantity proportion value are calculated in parallel through multi-threading, and the difference rate of the call quantity proportion value of each value interval in the two time periods is calculated based on the first call quantity proportion value and the second call quantity proportion value as the original difference rate data, wherein the first call quantity proportion value is used to indicate the percentage of the call quantity of the target sub-product in each value interval to the total call quantity of the target sub-product, and the second call quantity proportion value is used to indicate the percentage of the call quantity of the target sub-product in each value interval during the gray period to the total call quantity. A thread pool is created according to the available system resources, and an independent calculation thread is allocated to each target sub-product in the thread pool; In the calculation thread of each target sub-product, the historical call quantity of each value interval of the target sub-product in the past N days is queried, and the proportion of the historical call quantity of each value interval to the total call quantity is calculated as the first call quantity proportion value; In the calculation thread, the gray period call quantity of each value interval of the target sub-product during the gray period is queried, and the proportion of the gray period call quantity of each value interval to the total call quantity is calculated as the second call quantity proportion value; For each value interval of each target sub-product, a difference rate of interval call volume proportion values of the gray period and the previous N days is calculated according to the first call volume proportion value and the second call volume proportion value, and the original difference rate data is obtained by aggregating the calculation results of each calculation thread.

4. The method of claim 3, wherein, The original difference rate data is subjected to call volume sharpening processing based on the gray period call volume of each target sub-product in each value interval of the gray period, to obtain difference rate data after call volume sharpening, including: The gray period call volumes of all target sub-products are sorted in ascending order, and the gray period call volume at the median of the sorting is selected as a reference call volume; If the gray period call volume of the target sub-product is greater than the reference call volume, a first sharpening parameter calculation model is used to calculate the gray period call volume and the reference call volume, to obtain a first sharpening parameter; otherwise, a second sharpening parameter calculation model is used to calculate the gray period call volume and the reference call volume, to obtain a second sharpening parameter; wherein the second sharpening parameter is the inverse of the first sharpening parameter, and the sharpening parameter is one of the first sharpening parameter and the second sharpening parameter; The original difference rate data is subjected to call volume sharpening processing according to the sharpening parameter, to obtain difference rate data after call volume sharpening.

5. The method of claim 4, wherein, The first call volume proportion values of all value intervals of all target sub-products are sorted in ascending order, and the first call volume proportion value at the median of the sorting is taken as a reference proportion value; For each value interval of each target sub-product, the ratio between the first call volume proportion value and the reference proportion value is calculated, and a sharpening coefficient is calculated according to a configured proportion value sharpening percentage; For the value interval of the target sub-product whose first call volume proportion value is greater than the reference proportion value, a first sharpening coefficient calculation model is used to calculate the ratio and a preset proportion value sharpening percentage, to obtain a first sharpening coefficient; For the value interval of the target sub-product whose first call volume proportion value is not greater than the reference proportion value, a second sharpening coefficient calculation model is used to calculate the ratio and a preset proportion value sharpening percentage, to obtain a second sharpening coefficient, wherein the sharpening coefficient is one of the first sharpening coefficient and the second sharpening coefficient; The difference rate data after call volume sharpening is subjected to proportion value sharpening processing according to the sharpening coefficient, to obtain the sharpened difference rate data. The value intervals of each target sub-product in the list of sub-products to be tested are generated by performing value interval division according to the API call return value, a preset central interval target call volume proportion value, and a target interval number, in addition to the above-mentioned steps.

6. The method of claim 5, wherein, ​ constructing the API call return values of the target sub-products in the past N days as a stream data graph, wherein each vertex in the stream data graph represents an API call return value, and the weight of an edge in the stream data graph represents a frequency difference between two adjacent API call return values; compressing and storing return value frequency information of the API call return values by using a counting sketch data structure to optimize the stream data graph, so that the spatial complexity of the optimized stream data graph is reduced from a linear level to a logarithmic level; constructing a path in a single data stream scan using a preset approximation factor, wherein the path represents a natural clustering interval of the API call return values, and the length of the path is determined by the approximation factor and the length of the longest path in the optimized stream data graph; from the constructed multiple paths, filtering out paths that meet the path requirements related to the target call volume proportion value of the center interval, and splitting the filtered paths according to the target interval quantity according to a preset splitting strategy, wherein the splitting strategy is used to indicate selecting a splitting point that minimizes the total difference between each interval and the target proportion value; fine-tuning the interval boundaries after splitting, so that the actual proportion value of each interval after splitting is less than a preset difference threshold from the preset target proportion value distribution, to obtain the value interval of each target sub-product.

7. The method of claim 6, wherein, The first call volume proportion value and the second call volume proportion value are calculated by multi-thread parallel computing, and the difference rate of the value interval call volume proportion values in the two time periods is calculated based on the first call volume proportion value and the second call volume proportion value as the original difference rate data, and the method further comprises: constructing a first graph structure based on the first call volume proportion value of each target sub-product, wherein a node in the first graph structure represents a value interval, and an edge in the first graph structure represents a relationship between first call volume proportion values corresponding to adjacent value intervals; constructing a second graph structure based on the second call volume proportion value of each target sub-product, wherein a node in the second graph structure represents a value interval, and an edge in the second graph structure represents a relationship between second call volume proportion values corresponding to adjacent value intervals; performing parallel processing on the first graph structure and the second graph structure corresponding to all target sub-products by using a preset semi-stream strategy, so as to find a target path with the largest difference between the first graph structure and the second graph structure, wherein the semi-stream strategy is used to indicate saving only key intermediate results; calculating an interval proportion value difference rate based on the target path, mapping the target path as a whole change of an interval sequence to identify an interval distribution change pattern; summarizing a path difference analysis result composed of the interval proportion value difference rate and the interval distribution change pattern to obtain the original difference rate data.

8. The method of claim 7, wherein, The call volume sharpening processing is performed on the original difference rate data based on the call volume of each value interval during the gray period of each target sub-product to obtain the difference rate data after call volume sharpening, and the method further comprises: establish a Gaussian process regression model for each target sub-product, wherein the input of the Gaussian process regression model comprises the gray period invocation quantity and the first invocation quantity proportion value, and the target variable of the Gaussian process regression model is the original difference rate data; determine a multi-objective optimization function, wherein the multi-objective optimization function comprises a difference rate detection model and a false positive rate model composed of a sharpening parameter vector, the sharpening parameter vector comprises the sharpening coefficient and the sharpening coefficient, and the multi-objective optimization function is used to indicate that the difference rate detection model is maximized and the false positive rate model is minimized; determine a trust region constraint for limiting the variation range of the parameters in each optimization iteration; using a preset Bayesian optimization algorithm, iteratively optimize the sharpening parameter vector under the condition of the trust region constraint based on the Gaussian process regression model and the multi-objective optimization function until convergence or a preset number of iterations is reached; perform data enhancement on the sharpening parameter vector and the original difference rate data after iteration to optimize the difference rate data after invocation sharpening.

9. The method of claim 8, wherein, The method further comprises: identify implicit confounding factors in the gray environment, including user access mode changes, network environment fluctuations, and dependent service performance changes; adopt a preset two-stage least squares algorithm to establish a causal inference model, wherein the first stage of the causal inference model is used to indicate that the gray state is predicted using quasi instrumental variables related to the implicit confounding factors, and the second stage of the causal inference model is used to indicate that the true causal effect on the return value distribution is estimated using the predicted value of the gray state; based on the original difference rate data and the difference rate adjustment data, calculate the confounding sensitivity index of each target sub-product, wherein the difference rate adjustment data is obtained by adjusting the original difference rate data using the causal inference model; based on the confounding sensitivity index, calculate the causal weight; perform causal enhancement sharpening processing on the causal weight and the sharpened difference rate data to form a causal enhancement risk assessment result; based on the causal enhancement risk assessment result, divide the identified risk points into high confidence causal risks, possible causal risks, and correlation risks, and generate the high-risk sub-product list and the corresponding risk prompt report.

10. A system for automated testing based on product value distribution in gray release, characterized in that, It includes: The to-be-tested sub-product screening module is configured to query first calling quantity data of each sub-product in the previous N days and second calling quantity data of each sub-product during the gray period based on the obtained preset calling quantity threshold, screen out sub-products whose first calling quantity data and second calling quantity data both exceed the corresponding calling quantity threshold, and form a to-be-tested sub-product list, wherein the calling quantity threshold includes a previous N-day calling quantity threshold and a gray-period calling quantity threshold. ; a value interval division module for performing value interval division based on the API call return value of each target sub-product in the to-be-tested sub-product list in the previous N days, according to the API call return value, a preset central interval target invocation quantity proportion value, and a target interval number, to generate a value interval for each target sub-product; The difference calculation module is configured to calculate the first call amount proportion value and the second call amount proportion value in parallel through multi-threading, and calculate a difference rate of the call amount proportion value of each value interval in the two time periods based on the first call amount proportion value and the second call amount proportion value as original difference rate data, wherein the first call amount proportion value is used to indicate a percentage of the call amount of each value interval of the target sub-product in the total call amount of the target sub-product in the previous N days, and the second call amount proportion value is used to indicate a percentage of the call amount of each value interval of the target sub-product in the total call amount during the gray period; The sharpening processing module is configured to perform call amount sharpening processing on the original difference rate data based on the call amount of each value interval of each target sub-product during the gray period to obtain call amount sharpened difference rate data, and perform proportion value sharpening processing based on the call amount sharpened difference rate data and the first call amount proportion value to obtain sharpened difference rate data. The risk identification module is configured to calculate a group average sharpening difference rate of each target sub-product based on the sharpening difference rate data, identify a first a target sub-product with a highest group average sharpening difference rate, and filter a first b value interval with a highest value in the sharpening difference rate data, and combine and remove duplicates of the identified target sub-product and a target sub-product corresponding to the filtered value interval to generate a high-risk sub-product list and a corresponding risk prompt report. ​​

Citation Information

Patent Citations

  • Application gray release method and device, computer equipment and storage medium

    CN114968336A

  • Application code diagnosis method, device and system

    CN115185806A

  • Gray release error rate calculation method

    CN116679980A

  • Information system gray release migration method and system

    CN119336550A

  • Micro-service full-link gray flow management system and method based on PaaS (Platform as Service)

    CN119906701A