Monitoring method, device, electronic device and storage medium

Through technical means such as staged monitoring and α consumption function, the standard statistics of A/B testing are calculated. If the threshold is exceeded, the testing is stopped, which solves the problem of risk control in A/B testing and improves user experience and monitoring flexibility.

CN112905471BActive Publication Date: 2024-10-22GUANGZHOU HUYA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110215222.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-25
Publication Date
2024-10-22
Estimated Expiration
2041-02-25

AI Technical Summary

Technical Problem

During the A/B testing process, online testing may have a negative impact on the user experience. Existing monitoring technology is difficult to detect and control risks in a timely manner, resulting in damage to the user experience.

Method used

Adopt a phased monitoring method to collect data from the experimental group and the control group. After each analysis, standard statistics are calculated. If the threshold is exceeded, an alarm is triggered and the test is stopped. Interim analysis is performed through the alpha consumption function and the delta method to ensure that the risk is within the tolerance range. .

Benefits of technology

It effectively avoids the negative impact of online testing on users, ensures that A/B testing risks are within control, improves user experience, and eliminates the need to specify the number of analyzes and samples in advance, and supports custom monitoring indicators and detection levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112905471B_ABST
    Figure CN112905471B_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to the technical field of software testing, and provide a monitoring method, device, electronic device, and storage medium. When an A / B test is performed on an indicator, experimental group data and control group data of the indicator are collected in stages, and each stage is tested once. Taking the kth test as an example, after the data collection is completed, a mid-term analysis is performed on the accumulated experimental group data to obtain a statistical threshold. At the same time, a standard statistic is calculated based on the accumulated experimental group data and the accumulated control group data. Once it is found that the standard statistic exceeds the statistical threshold, that is, a risk exceeding the tolerance range occurs in the experiment, an alarm is immediately triggered and the A / B test is stopped, thereby ensuring that the risk is within the tolerance range and avoiding the negative impact of online testing on users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of software testing technology, and more specifically, to a monitoring method, device, electronic device, and storage medium. Background Art

[0002] In Internet analysis, A / B testing (bucket testing or diversion testing) is a random experiment, usually with two variants A and B. The data of A and B are compared under the premise of maintaining a single variable using the control variable method to draw experimental conclusions.

[0003] However, online testing involves a large number of users, and variables may have negative effects, greatly affecting the user experience. Therefore, how to ensure that the risk is within the acceptable range through monitoring during the A / B test is a problem that needs to be solved. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a monitoring method, device, electronic device and storage medium, which are used to ensure that the risk is within the acceptable range through phased monitoring during the A / B test process.

[0005] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a monitoring method, the method comprising:

[0007] Collect experimental group data and control group data of target indicators in A / B testing in stages;

[0008] After the kth collection, the accumulated experimental group data is analyzed interimly to obtain the statistical threshold of the kth interim analysis;

[0009] Calculate the standard statistic of the kth interim analysis based on the cumulative experimental group data and the cumulative control group data;

[0010] If the standard statistic exceeds the statistic threshold, an alarm is triggered and the A / B test is stopped.

[0011] In a second aspect, an embodiment of the present application further provides a monitoring device, the device comprising:

[0012] The data collection module is used to collect experimental group data and control group data of target indicators in A / B testing in stages;

[0013] The first analysis module is used to perform an interim analysis on the accumulated experimental group data after the k-th collection to obtain a statistical threshold value of the k-th interim analysis;

[0014] A second analysis module, used for calculating the standard statistic of the kth interim analysis based on the accumulated experimental group data and the accumulated control group data;

[0015] The execution module is used to trigger an alarm and stop the A / B test if the standard statistic exceeds the statistic threshold.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned monitoring method.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the above-mentioned monitoring method when executed by a processor.

[0018] Compared with the prior art, the monitoring method, device, electronic device and storage medium provided in the embodiments of the present application, when performing an A / B test on an indicator, collects the experimental group data and the control group data of the indicator in stages, and performs an inspection once in each stage. Taking the kth inspection as an example, after the data collection is completed, a mid-term analysis is performed on the cumulative experimental group data to obtain a statistical threshold, and at the same time, a standard statistic is calculated based on the cumulative experimental group data and the cumulative control group data. If the standard statistic exceeds the statistical threshold, it means that a risk exceeding the tolerance range has occurred in the A / B test. At this time, an alarm is triggered and the A / B test is stopped, thereby ensuring that the risk is within the tolerance range through monitoring and avoiding the negative impact of online testing on users. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flow chart of a monitoring method provided in an embodiment of the present application is shown.

[0020] Figure 2 Another flow chart of the monitoring method provided in the embodiment of the present application is shown.

[0021] Figure 3 Another flow chart of the monitoring method provided in the embodiment of the present application is shown.

[0022] Figure 4 for Figure 3 Schematic diagram of the flow of sub-step S1021 in the monitoring method shown.

[0023] Figure 5 for Figure 1 FIG. 1 is a flow chart of step S103 in the monitoring method shown.

[0024] Figure 6An example graph of a normal distribution curve for relative caliber.

[0025] Figure 7 A block diagram of a monitoring device provided in an embodiment of the present application is shown.

[0026] Figure 8 A block diagram of an electronic device provided in an embodiment of the present application is shown.

[0027] Icons: 10 - electronic device; 11 - processor; 12 - memory; 13 - bus; 100 - monitoring device; 110 - data acquisition module; 120 - first analysis module; 130 - second analysis module; 140 - execution module. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application.

[0029] A / B testing, also known as randomized experiments or controlled experiments, is a commonly used method in Internet analysis. Simply put, A / B testing is an experiment conducted on two variants to find the one with better performance based on given indicators.

[0030] In software development, A / B testing is often used to evaluate the causal relationship between new features and user behavior. By extracting some samples from the population and performing data statistics, an evaluation of the overall parameters is obtained, ensuring that the business conclusions obtained during the A / B test will remain unchanged with a high probability when they are officially pushed to all users. For example, A / B testing provides different business versions for the same optimization goal, counts the business data generated by each business version during operation, uses the business data to evaluate the pros and cons of each business version, and finally makes a decision.

[0031] However, A / B testing is an experiment that involves a large number of users, and there may be negative effects during the experiment that will affect the user experience. Therefore, A / B testing needs to be monitored to control the risks brought about by the experiment.

[0032] Based on this, the commonly used monitoring technologies currently include: rule-based subjective monitoring, sequential analysis-based monitoring, Bayesian-based monitoring, etc. However, rule-based subjective monitoring and Bayesian-based monitoring cannot be performed during the experiment and cannot detect risks in a timely manner. Monitoring based on sequential analysis requires that the impact of variables on users be obtained quickly, and continuous monitoring is required throughout the experiment, which is inconvenient for practical application.

[0033] In order to solve the above problems, the embodiments of the present application provide a monitoring method, device, electronic device and storage medium. During the A / B test process, the negative impact of the variables is monitored in stages. After the data is collected in each stage, an analysis is performed. Once the standard statistic exceeds the statistic threshold, that is, the risk exceeds the tolerance range in the experiment, an alarm is immediately triggered and the A / B test is stopped, thereby ensuring that the risk is within the tolerance range and avoiding the negative impact of online testing on users. The following is a detailed introduction.

[0034] Please refer to Figure 1 , Figure 1 The following is a flow chart of a monitoring method provided by an embodiment of the present application. The monitoring method may include the following steps:

[0035] S101, collect experimental group data and control group data of target indicators in A / B testing in stages.

[0036] During the A / B test, the negative impact of variables can be monitored in stages, and samples need to be collected and analyzed at each stage. Therefore, the number of staged monitoring and the number of samples collected each time can be given in advance, that is, two variables can be specified in the experimental design stage: one is the number of significance tests planned, that is, the number of analyses N; the other is the number of samples for each analysis. It is also possible not to specify the number of analyses N and the number of samples for each analysis in advance, but to flexibly adjust these two parameters according to the actual situation during the experiment.

[0037] It should be pointed out that the sample in this embodiment refers to the experimental group data or the control group data, that is, both the experimental group data and the control group data are called samples.

[0038] The target indicator refers to any indicator that needs to be A / B tested, such as the number of conversions of a banner advertisement displayed on a website, etc. The target indicator can be various types of indicators, such as Bernoulli type, continuous type, ratio type, etc. This embodiment can monitor various types of indicators.

[0039] Taking the business version as an example, there are at least two business versions in the A / B test: one is the original version, which serves as the control version; the other is the optimized version, which serves as the experimental version. The purpose of the experiment is to test whether the optimized version can bring a better user experience compared to the original version. Alternatively, the business version in the A / B test can also be two optimized versions, which serve as the experimental version and the control version. The purpose of the experiment is to find a version with a better user experience. Therefore, the experimental group data is the business data of the experimental version during operation, and the control group data is the data of the control version during operation.

[0040] For example, for a live broadcast APP, the target indicator is the number of conversions of the advertisement displayed on the homepage. The goal of optimizing the live broadcast APP is to increase the number of conversions of the advertisement. The planned method is to add pictures, so it is necessary to test whether adding pictures will increase the number of conversions. Therefore, it is necessary to conduct an A / B test on the version with added pictures (experimental version) and the original version (control version). The experimental group data is the number of conversions of the experimental version of the advertisement, and the control group data is the number of conversions of the control version of the advertisement. The experimental group mean can be the conversion rate of the experimental version of the advertisement, and the control group mean can be the conversion rate of the control version of the advertisement.

[0041] S102, after the k-th collection, perform an interim analysis on the accumulated experimental group data to obtain a statistical threshold of the k-th interim analysis.

[0042] Cumulative experimental group data refers to the experimental group data accumulated and collected so far in the A / B test. For example, after the kth collection, the cumulative experimental group data is: all experimental group data accumulated and collected after the kth collection. The kth time can be any time, that is, k = 1, 2, ... n.

[0043] Mid-term analysis means that in A / B testing, an analysis is performed every time data is collected, and the impact of the experimental group and the control group on users is tested in segments. Once there is a difference in the impact of the experimental group and the control group on users, an alarm is triggered immediately and the A / B test is stopped, thereby ensuring that the risk is within the acceptable range and avoiding the negative impact of online testing on users.

[0044] The main methods of interim analysis are group sequential analysis and alpha spending function interim analysis. In the group sequential analysis, two variables must be specified in the experimental design stage: one is how many significance tests are planned, that is, the number of interim analyses; the other is the number of samples in each interim analysis.

[0045] The basic principle of the α consumption function interim analysis method is: specify a random information part t k (t k ∈[0,I]) increasing consumption function α * , and satisfy the conditions: α * (0) = 0, α * (1) = α, through this function, the total type I error α is regarded as the information content proportion t * The continuous function is consumed, that is, each interim analysis consumes a part of the total type I error α. Therefore, the α consumption function interim analysis method only needs to specify a consumption function, and can perform interim analysis when the information part is unequal, without specifying the number of interim analyses and the number of samples in each interim analysis in advance.

[0046] S103, calculating the standard statistic of the kth interim analysis based on the accumulated experimental group data and the accumulated control group data.

[0047] The cumulative control group data refers to the control group data that has been accumulated and collected so far in the A / B test. For example, after the k-th collection, the cumulative control group data is: all the control group data that has been accumulated and collected since the k-th collection.

[0048] In this embodiment, the corresponding experimental group mean (for example, y) and control group mean (for example, x) can be obtained according to the cumulative experimental group data and the cumulative control group data. The experimental group mean and the control group mean conform to the bivariate normal distribution. Then, the experimental group mean is divided by the control group mean and converted into a relative caliber (for example, in the form of y / x) by the Delta method. The relative caliber conforms to the univariate normal distribution. The expectation and variance of the relative caliber are calculated, and a normal distribution curve of the relative caliber is generated. Then, according to the normal distribution curve and variance of the relative caliber, the standard statistic of the kth interim analysis can be calculated. For details, see the detailed introduction to step S103 below.

[0049] S104: If the standard statistic exceeds the statistic threshold, an alarm is triggered and the A / B test is stopped.

[0050] During the kth interim analysis, after calculating the statistical threshold and standard statistics, it is necessary to check whether the standard statistics exceeds the statistical threshold. Once the standard statistics exceeds the statistical threshold, it means that the risk in the A / B test exceeds the tolerance range. At this time, an alarm is triggered and the A / B test is stopped to ensure that the risk is within the tolerance range.

[0051] In a possible scenario, there may not be any risk that exceeds the tolerance range during the entire A / B test. Therefore, please refer to Figure 2 Before step S104, the monitoring method further includes step S110. Meanwhile, after step S104, the monitoring method further includes steps S120 to S130.

[0052] S110, determining whether the standard statistic exceeds a statistic threshold.

[0053] If the standard statistic exceeds the statistic threshold, it means that the risk in the A / B test exceeds the tolerance range, and an alarm needs to be triggered and the A / B test is stopped, that is, step S104 is executed. If the standard statistic does not exceed the statistic threshold, it means that the risk in the A / B test is within the tolerance range, and it is necessary to determine whether the accumulated sample size has reached the preset total sample size, that is, step S120 is executed.

[0054] S120, determining whether the accumulated experimental group data volume has reached a preset total sample volume.

[0055] The preset total sample size refers to the total sample size that needs to be collected in the A / B test. If the cumulative experimental group data reaches the preset total sample size, it means that the A / B test has been completed, and step S130 is executed. If the cumulative experimental group data does not reach the preset total sample size, it means that the A / B test is not completed, and it is necessary to return to step S101 until the cumulative experimental group data reaches the preset total sample size and the A / B test is stopped. This can be understood as: after returning to step S101, steps S102 to S104 will continue to be executed until the cumulative experimental group data reaches the preset total sample size, and the A / B test is stopped.

[0056] It should be noted that the cumulative experimental group data volume in step S120 can also be replaced by the cumulative control group sample volume, that is, whether to stop the A / B test can also be determined by judging whether the cumulative control group data volume reaches the preset total sample volume.

[0057] S130, stop the A / B test.

[0058] In a possible implementation, an alpha consumption function may be used to perform interim analysis. Therefore, the alpha consumption function interim analysis method is taken as an example to introduce step S102 in detail.

[0059] Please refer to Figure 3 , step S102 may include sub-step S1021.

[0060] S1021, after the kth collection, the statistical threshold is calculated using the alpha consumption function interim analysis method based on the accumulated experimental group data.

[0061] The basic idea of ​​α consumption function is:

[0062] Each interim analysis loses a portion of the total type I error α. Assume that the time corresponding to the A / B test is [0, T], and the sample size collected during this period is [0, I]; the time of each interim analysis is: 0, t1, t2, t3...T, the cumulative sample size corresponding to each interim analysis is 0, i1, i2, i3...I, and the information content of each interim analysis accounts for t * for:

[0063] Before performing the interim analysis of the α consumption function, it is necessary to specify a random information part t k (t k ∈[0,I]) increasing consumption function α * , and satisfy the conditions: α * (0) = 0, α * (1) = α; the type I error of each interim analysis loss is: According to the above definition, And ∑α* =α.

[0064] In this embodiment, when the α consumption function mid-term analysis method is used to calculate the statistical threshold, after the kth collection, the information volume ratio of the kth mid-term analysis is first calculated. According to the proportion of information and a pre-specified consumption function α * , calculate the Type I error of the kth interim analysis loss Then, based on the kth interim analysis, the type I error of the loss Calculate the boundary corresponding to the kth interim analysis, that is, the statistical threshold

[0065] The calculation process of sub-step S1021 is described in detail below. Figure 4 , sub-step S1021 may include:

[0066] S10211, calculate the ratio of the cumulative experimental group data volume to the preset total sample volume, and obtain the information volume ratio of the kth interim analysis.

[0067] The proportion of information in the kth interim analysis Mid-term, k is the amount of experimental group data obtained after the kth collection, and I is the preset total sample size.

[0068] S10212, according to the information ratio and the set α consumption function, obtain the type I error of the k-th interim analysis loss.

[0069] In each mid-term analysis, according to the proportion of information * and a pre-specified loss function α * , the Type I error for attrition in each interim analysis can be calculated.

[0070] Taking the kth mid-term analysis as an example, the information content ratio of the kth mid-term analysis is obtained Afterwards, according to the proportion of information Substitute the pre-specified loss function α * Ways to obtain the Type I error of the k-th interim analysis loss may include:

[0071] First, obtain the Type I error for the first k-1 interim analysis losses.

[0072] The Type I error of the first k-1 interim analyses, that is, the Type I error of the k-1 interim analyses, is expressed as In A / B testing, time is constantly moving forward, and mid-term analysis is done in stages. Therefore, by the time of the kth mid-term analysis, the k-1th mid-term analysis must have been completed. It is calculated during the k-1th interim analysis, so it can be directly obtained

[0073] Then, the information ratio is substituted into the α consumption function to obtain the Type I error of the first k interim analysis losses.

[0074] The type I error of the first k interim analysis losses is the type I error of the kth interim analysis losses, expressed as There are five commonly used α consumption functions:

[0075] 1. Where, φ represents the standard normal distribution function;

[0076] 2. Alpha * (t i )=αln{1+(e-1)t i} [0,1];

[0077] 3. Alpha * (t i )=αt i [0,1];

[0078] 4. [0,1];

[0079] 5. [0,1].

[0080] In the A / B test, one of the five alpha consumption functions can be pre-specified for mid-term analysis of the alpha consumption function according to the actual situation.

[0081] Finally, the difference between the Type I error of the first k interim analysis losses and the Type I error of the first k-1 interim analysis losses is calculated to obtain the Type I error of the kth interim analysis loss.

[0082] The Type I error of the k-th interim analysis loss can be indicates that, and

[0083] S10213, calculating a statistical threshold based on the type I error of the k-th interim analysis loss.

[0084] Calculate the Type I error for the kth interim analysis loss Afterwards, the Type I error of the loss can be analyzed based on the kth interim period Use Ito integral or Monte Carlo simulation to iteratively solve and obtain the statistical threshold of the kth interim analysis

[0085] When calculating the statistical threshold When k = 1, that is, when the first interim analysis is performed, the solution can be obtained according to the following formula: Among them, φ -1 Represents the inverse of the standard normal distribution function.

[0086] As the A / B test progresses, that is, k>1, if the sample size collected each time is relatively large, the mean and sum of the newly collected samples obey the normal distribution, and the change process of the cumulative value obeys the Brownian motion. Then, the statistical threshold can be obtained by iterative solution through Ito integral or Monte Carlo simulation. Taking Monte Carlo simulation as an example, the iterative solution process can include:

[0087] First, randomly obtain N samples, each sample has M individuals sampled from a standard normal distribution, and both M and N are extremely large;

[0088] Then, according to the formula Directly obtain And for each sample The Z value of each individual is calculated, and the samples that do not meet the conditions are marked and eliminated, that is, the value less than The sample labels are eliminated;

[0089] Next, calculate the Type I error for the second interim analysis loss For the samples that have not been eliminated The Z value of the individuals is calculated and the Z value of the corresponding quantile is taken after sorting. It will also be less than The sample labels are eliminated;

[0090] Finally, repeat the above process until the statistical threshold of the kth interim analysis is calculated.

[0091] According to the above calculation process, the statistical threshold of each mid-term analysis can be calculated.

[0092] In this embodiment, the standard statistic of the kth interim analysis can be calculated based on the cumulative experimental group data and the cumulative control group data by the Delta method. Figure 5 , step S103 may include the following sub-steps:

[0093] S1031, obtaining the corresponding experimental group mean and control group mean according to the accumulated experimental group data and the accumulated control group data, wherein the experimental group mean and the control group mean conform to the bivariate normal distribution.

[0094] The mean of the control group can be expressed as X n Indicates that the mean of the experimental group can be expressed as Y n It means that (X n ,Yn ) obeys a bivariate normal distribution, that is, (X n ,Y n )~N((μ x ,μ y ),∑), where (μ x ,μ y ) represents the mean, and ∑ represents the variance.

[0095] S1032, the Delta method is used to convert the mean of the experimental group and the mean of the control group into relative caliber, and the expectation and variance of the relative caliber are obtained. The relative caliber conforms to the univariate normal distribution.

[0096] The Delta method refers to the probability that a random variable still tends to be normally distributed after a differentiable function change when it obeys a normal distribution. In this embodiment, the Delta method can be used to use the mean of the experimental group and the mean of the control group to make point estimates of the mean and variance.

[0097] In this embodiment, the mean of the experimental group and the mean of the control group are converted into relative calibers, that is, n and Y n According to the function h((x,y))=y / x, the relative aperture is The relative caliber conforms to the univariate normal distribution. According to the Delta method, the expectation and variance of the relative caliber can be calculated using the following formula:

[0098]

[0099] in, represents the expectation of relative caliber, E[X n ] represents the expected mean of the control group, E[Y n ] represents the expected mean of the experimental group; Δh((X n ,Y n )) T *∑*Δh((X n ,Y n )) represents the variance of relative caliber, σ(X n ) 2 represents the variance of the control group mean, σ(Y n ) 2 represents the variance of the experimental group mean.

[0100] S1033, based on the normal distribution curve of relative caliber, obtain the standard statistic according to the type I error of the k-th mid-term analysis loss, wherein, in the normal distribution curve, the distance between the edge of the area representing the k-th mid-term analysis loss and the center of the curve is the standard statistic standard deviation.

[0101] After obtaining the function expression of relative caliber, as well as the expectation and variance of relative caliber, the normal distribution curve of relative caliber can be generated. For example, the normal distribution curve of relative caliber is as follows: Figure 6 As shown, the black area is the type I error of the k-th interim analysis loss The value in the figure is 4.95%, the center of the normal distribution curve is 0, and the distance from the right edge of the black area to the center is 1.65 standard deviations, that is, Z = -1.65 in the figure. Z describes how many standard deviations there are from the right edge of the black area to the center, that is, the standard statistic. The standard statistic of the k-th interim analysis can be expressed as Z k express.

[0102] The above monitoring method is introduced through an example below.

[0103] Assume that there is an important positive indicator X, and the A / B test cannot cause X to decrease. Monitoring is performed in stages by day, and the monitoring is set to an accuracy rate of (1-α) 95%. A total of 100,000 samples are collected, that is, the total type I error α = 0.05, and the total sample size is preset to 100,000. Then, according to the monitoring method introduced above, as the experiment progresses, data is collected every day and mid-term analysis is performed.

[0104] Assuming that 4 weeks of samples are collected on the first day, that is, 4 weeks of data for the experimental group and 4 weeks of data for the control group, the statistical threshold of the first interim analysis is calculated based on the accumulated 4 weeks of experimental group data, the preset total sample size of 100,000, and the pre-specified α consumption function. At the same time, the standard statistic Z1 of the first interim analysis is calculated based on the cumulative experimental group data of 4 weeks and the cumulative control group data of 4 weeks by the Delta method; Compare with Z1 to determine whether Z1 exceeds If yes, an alarm is triggered and the A / B test is stopped. If no, since the cumulative sample size of 4w does not reach the preset total sample size of 10w, monitoring will continue;

[0105] Assuming that 2w samples are collected on the second day, that is, 2w of data for the experimental group and 2w for the control group, the statistical threshold for the second interim analysis is calculated based on the accumulated experimental group data of 6w, the preset total sample size of 10w, and the pre-specified α consumption function. At the same time, the standard statistic Z2 of the second interim analysis is calculated based on the cumulative experimental group data of 6 weeks and the cumulative control group data of 6 weeks by the Delta method; Compare with Z2 to determine whether Z2 exceeds If yes, an alarm is triggered and the A / B test is stopped. If no, since the cumulative sample size of 6w does not reach the preset total sample size of 10w, monitoring will continue;

[0106] Assuming that 4 weeks of samples are collected on the third day, that is, 4 weeks of data for the experimental group and 4 weeks for the control group, the statistical threshold of the third interim analysis is calculated based on the accumulated experimental group data of 10 weeks, the preset total sample size of 10 weeks, and the pre-specified α consumption function. At the same time, the standard statistic Z3 of the third interim analysis is calculated based on the cumulative experimental group data of 10w and the cumulative control group data of 10w by the Delta method; Compare with Z3 to determine whether Z3 exceeds If yes, an alarm is triggered and the A / B test is stopped; if no, since the cumulative sample size 10w has reached the preset total sample size 10w, the A / B test is stopped and the monitoring ends.

[0107] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0108] First, the negative impact of variables is monitored in stages. After collecting data in each stage, an analysis is performed. Once the standard statistic exceeds the statistical threshold, that is, the risk exceeds the tolerance range in the experiment, an alarm is triggered immediately and the A / B test is stopped to ensure that the risk is within the tolerance range and avoid the negative impact of online testing on users.

[0109] Second, the α consumption function performs interim analysis. It only needs to specify a consumption function, and can perform interim analysis when the information parts are not equal. It is not necessary to specify the number of interim analyses and the number of samples in each interim analysis in advance.

[0110] Third, through the Delta method, the mean of the experimental group and the mean of the control group can be converted into a relative caliber that conforms to the univariate normal distribution, and then the standard statistics can be obtained through the relative caliber, thereby supporting any user-defined monitoring indicators and detection levels.

[0111] Please refer to Figure 7 , Figure 7 The block diagram of the monitoring device 100 provided in the embodiment of the present application is shown. The monitoring device 100 includes a data acquisition module 110, a first analysis module 120, a second analysis module 130 and an execution module 140.

[0112] The data collection module 110 is used to collect experimental group data and control group data of the target indicator in the A / B test in stages.

[0113] The first analysis module 120 is used to perform an interim analysis on the accumulated experimental group data after the k-th collection to obtain a statistical threshold of the k-th interim analysis.

[0114] The second analysis module 130 is used to calculate the standard statistic of the kth interim analysis based on the accumulated experimental group data and the accumulated control group data.

[0115] The execution module 140 is used to trigger an alarm and stop the A / B test if the standard statistic exceeds the statistic threshold.

[0116] Optionally, the execution module 140 is further configured to:

[0117] Determine whether the standard statistic exceeds the statistic threshold;

[0118] If the standard statistic does not exceed the statistic threshold, it is determined whether the cumulative experimental group data volume reaches the preset total sample size;

[0119] If not, return to the step of collecting experimental group data and control group data of the target indicator in the A / B test in stages until the accumulated experimental group data volume reaches the preset total sample volume, and then stop the A / B test;

[0120] If yes, stop the A / B test.

[0121] Optionally, the first analysis module 120 is specifically configured to: after the kth acquisition, calculate the statistical threshold value by using an alpha consumption function interim analysis method according to the accumulated experimental group data.

[0122] Optionally, the first analysis module 120 calculates the statistical threshold value by using the alpha consumption function interim analysis method according to the accumulated experimental group data, including:

[0123] Calculate the ratio of the cumulative experimental group data volume to the preset total sample volume to obtain the information volume ratio of the kth interim analysis;

[0124] According to the information proportion and the set α consumption function, the type I error of the k-th interim analysis loss is obtained;

[0125] Calculate the statistic threshold based on the Type I error of attrition for the kth interim analysis.

[0126] Optionally, the first analysis module 120 executes a method for obtaining a type I error of the k-th interim analysis loss according to the information content ratio and the set α consumption function, including:

[0127] Get the Type I error of the first k-1 interim analysis losses;

[0128] Substituting the information ratio into the α consumption function, we can get the Type I error of the first k interim analysis losses;

[0129] The difference between the Type I error of the first k interim analysis losses and the Type I error of the first k-1 interim analysis losses is calculated to obtain the Type I error of the kth interim analysis loss.

[0130] Optionally, the first analysis module 120 performs a method of calculating a statistical threshold value according to the type I error of the k-th interim analysis loss, including:

[0131] According to the type I error of the k-th interim analysis loss, the statistical threshold is obtained by iterative solution using Ito integration or Monte Carlo simulation.

[0132] Optionally, the second analysis module 130 is specifically used for:

[0133] According to the accumulated experimental group data and the accumulated control group data, the corresponding experimental group mean and control group mean are obtained, wherein the experimental group mean and the control group mean conform to the bivariate normal distribution;

[0134] The Delta method was used to convert the mean of the experimental group and the mean of the control group into relative caliber, and the mean and variance of the relative caliber were obtained. The relative caliber conformed to the univariate normal distribution;

[0135] Based on the normal distribution curve of relative caliber, the standard statistic is obtained according to the type I error of the k-th interim analysis loss, where in the normal distribution curve, the distance between the edge of the area representing the k-th interim analysis loss and the center of the curve is the standard statistic standard deviation.

[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the monitoring device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0137] Please refer to Figure 8 , Figure 8 The electronic device 10 provided in the embodiment of the present application is shown in a block diagram. The electronic device 10 includes a processor 11, a memory 12 and a bus 13, and the processor 11 and the memory 12 are connected via the bus 13.

[0138] The memory 12 is used to store programs, for example, Figure 7 In the monitoring device 100 shown, after receiving the execution instruction, the processor 11 executes the program to implement the monitoring method disclosed in the above embodiment of the invention.

[0139] The electronic device 10 may be a general-purpose computer or a special-purpose computer, both of which may be used to implement the monitoring method of the embodiment of the present application, that is, the execution subject of the monitoring method may be the same computer or different computers. Although only one computer is shown in the embodiment of the present application, for convenience, the functions described in the embodiment of the present application may be implemented in a distributed manner on multiple similar platforms to balance the processing load.

[0140] The memory 12 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0141] The processor 11 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 11 or instructions in the form of software. The above processor 11 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.

[0142] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 11, the monitoring method disclosed in the above embodiment is implemented.

[0143] In summary, the monitoring method, device, electronic device and storage medium provided by the embodiments of the present application, when performing an A / B test on an indicator, collects the experimental group data and the control group data of the indicator in stages, and performs an inspection once in each stage. Taking the kth inspection as an example, after the data collection is completed, a mid-term analysis is performed on the cumulative experimental group data to obtain a statistical threshold. At the same time, a standard statistic is calculated based on the cumulative experimental group data and the cumulative control group data. Once it is found that the standard statistic exceeds the statistical threshold, that is, there is a risk that exceeds the tolerance range in the experiment, an alarm is immediately triggered and the A / B test is stopped, thereby ensuring that the risk is within the tolerance range and avoiding the negative impact of online testing on users.

[0144] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A monitoring method, characterized in that: The method comprises: Collect experimental group data and control group data of target indicators in A / B testing in stages. A / B testing is used to evaluate the causal relationship between the impact of new features on user behavior. After the k-th collection, the accumulated experimental group data is analyzed interimly to obtain the statistical threshold of the k-th interim analysis, wherein the accumulated experimental group data refers to the experimental group data accumulated and collected after the A / B test is performed for the k-th time; Calculate the standard statistic of the kth interim analysis based on the accumulated experimental group data and the accumulated control group data, wherein the accumulated control group data refers to the control group data accumulated and collected after the A / B test is conducted for the kth time; If the standard statistic exceeds the statistic threshold, it indicates that a risk exceeding the tolerance range occurs in the A / B test, an alarm is triggered, and the A / B test is stopped.

2. The method according to claim 1, characterized in that The step of performing interim analysis on the accumulated experimental group data to obtain the statistical threshold of the kth interim analysis includes: The statistic threshold is calculated based on the accumulated experimental group data using an alpha consumption function method.

3. The method according to claim 2, characterized in that The step of calculating the statistical threshold using the alpha consumption function method according to the accumulated experimental group data comprises: Calculate the ratio of the cumulative experimental group data volume to the preset total sample volume to obtain the information volume ratio of the kth interim analysis; According to the information proportion and the set α consumption function, the type I error of the k-th interim analysis loss is obtained; The statistical threshold is calculated based on the Type I error of the k-th interim analysis loss.

4. The method according to claim 3, characterized in that The step of obtaining the type I error of the k-th interim analysis loss according to the information ratio and the set α consumption function includes: Get the Type I error of the first k-1 interim analysis losses; Substituting the information ratio into the α consumption function, the type I error of the first k interim analysis losses is obtained; The difference between the type I error of the first k interim analysis losses and the type I error of the first k-1 interim analysis losses is calculated to obtain the type I error of the kth interim analysis loss.

5. The method according to claim 3, characterized in that The step of calculating the statistical threshold according to the type I error of the k-th interim analysis loss comprises: According to the type I error of the k-th interim analysis loss, the statistical threshold is obtained by iteratively solving using Ito integration or Monte Carlo simulation.

6. The method according to claim 3, characterized in that The step of calculating the standard statistic of the kth interim analysis based on the accumulated experimental group data and the accumulated control group data comprises: According to the accumulated experimental group data and the accumulated control group data, a corresponding experimental group mean and a control group mean are obtained, wherein the experimental group mean and the control group mean conform to a bivariate normal distribution; The mean of the experimental group was divided by the mean of the control group using the Delta method to convert it into a relative caliber, and the expectation and variance of the relative caliber were obtained. The relative caliber conformed to a univariate normal distribution. Based on the normal distribution curve of the relative caliber, the standard statistic is obtained according to the Type I error of the k-th mid-term analysis loss, wherein, in the normal distribution curve, the distance between the edge of the area representing the k-th mid-term analysis loss and the center of the curve is the standard deviation of the standard statistic.

7. The method according to claim 1, characterized in that The method further comprises: Determining whether the standard statistic exceeds the statistic threshold; If the standard statistic does not exceed the statistic threshold, then determine whether the cumulative experimental group data volume reaches the preset total sample volume; If not, return to the step of collecting the experimental group data and the control group data of the target indicator in the A / B test in stages until the accumulated experimental group data volume reaches the preset total sample volume, and then stop the A / B test; If yes, the A / B test is stopped.

8. A monitoring device, characterized in that: The device comprises: The data collection module is used to collect experimental group data and control group data of the target indicators in A / B testing in stages. A / B testing is used to evaluate the causal relationship between the impact of new functions on user behavior; The first analysis module is used to perform an interim analysis on the accumulated experimental group data after the k-th collection to obtain a statistical threshold of the k-th interim analysis, wherein the accumulated experimental group data refers to the experimental group data accumulated and collected after the A / B test is performed for the k-th time; A second analysis module is used to calculate the standard statistic of the kth interim analysis based on the accumulated experimental group data and the accumulated control group data, wherein the accumulated control group data refers to the control group data accumulated and collected after the A / B test is conducted for the kth time; The execution module is used to indicate that a risk exceeding a tolerance range has occurred in the A / B test if the standard statistic exceeds the statistic threshold, trigger an alarm and stop the A / B test.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the monitoring method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the monitoring method according to any one of claims 1 to 7 is implemented.