A method, device and electronic device for processing sample data
By detecting the behavioral trend consistency of the test account group in the network application product, the problem of inaccurate test results caused by double differential processing is solved and the accuracy of the test results is ensured.
Patent Information
- Application Number
- CN201910849745.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-09
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-09-09
AI Technical Summary
In the functional testing of network application products, the test results caused by the double differential processing method are inaccurate, mainly because the behavioral data of the first test account group and the second test account group are very different within the preset test duration and lack comparability.
By detecting whether the account behaviors of the first test account group and the second test account group within the preset test period have parallel trends, only when there are parallel trends, double difference algorithm processing is performed to generate test result information.
The accuracy of the test results is ensured, and results are only generated when the behavior trends of the two test account groups are consistent, thus avoiding inaccurate test results.
Smart Images

Figure CN112463577B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device and electronic device for processing sample data. Background Art
[0002] Currently, many network application products conduct comparative tests before the new functions of the products are officially launched, and obtain behavioral difference information between account behaviors in the first test account group and account behaviors in the second test account group as test result information of the functions to be launched of the network application products.
[0003] Specifically, two test account groups are usually set up, one is the first test account group, in which each first account in the group uses the specified network application product that does not include the function to be launched; the other is the second test account group, in which each second account in the group uses the specified network application product that includes the function to be launched. The behavior data of each first account in the first test account group and the behavior data of each second account in the second test account group are obtained respectively, and the behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group is calculated and obtained as the test result information of the function to be launched of the network application product.
[0004] At present, double difference is usually used to process the behavior data of the first test account group and the behavior data of the second test account group to obtain the behavior difference information between the account behaviors. Double difference processing is to directly process the behavior data of the two test account groups, obtain the behavior difference information between the account behaviors in the first test account group and the account behaviors in the second test account group, and then generate test result information. However, if in the first time period before the preset test time, the behavior data of the first test account group and the behavior data of the second test account group are very different during the use of the specified network application product that does not include the function to be launched, for example: if the behavior data of one test account group fluctuates greatly, while the behavior data of the other test account group has basically no fluctuation, that is, the development trends are very different, then the two groups of behavior data will not be comparable, resulting in inaccurate test result information. Summary of the invention
[0005] The present disclosure provides a method, device and electronic device for processing sample data to at least solve the problem of inaccurate test result information in the related art. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a method for processing sample data is provided, comprising:
[0007] Acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product;
[0008] Determining a first test account group and a second test account group from the plurality of sample data;
[0009] Respectively obtaining behavior data of each first account in the first test account group and behavior data of each second account in the second test account group within a preset test duration, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested;
[0010] Based on the first behavior data and the second behavior data, detecting whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period;
[0011] If there is a parallel trend, based on the first behavior data and the second behavior data, behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group is obtained, and test result information of the function to be tested of the specified application product is generated based on the behavior difference information.
[0012] In a specific embodiment, the step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period includes:
[0013] Based on the first behavior data, the reference behavior data, and the second behavior data, detecting whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test duration, wherein the reference behavior data is the behavior data generated during the use of the designated network application product that does not include the function to be launched in a first time period before the preset test duration;
[0014] If there is a parallel trend, the step of obtaining behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group based on the first behavior data and the second behavior data, and generating test result information of the to-be-tested function of the specified application product based on the behavior difference information includes:
[0015] If there is a parallel trend, a double difference algorithm is used based on the first behavior data, the reference behavior data and the second behavior data to calculate and obtain the behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and the test result information of the function to be tested of the specified application product is generated based on the behavior difference information.
[0016] In a specific embodiment, the step of detecting, based on the first behavior data, the reference behavior data, and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test duration includes:
[0017] Based on the first behavior data, the reference behavior data and the second behavior data, using the preset formula: y = α + β * Treatment + α -n *T -n +...+α -2 *T -2 +α0*T0+α1*T1+...+α n *T n +γ -n *D -n +...+γ -2 *D -2 +γ0*D0+...+γ n *D n , calculate γ n ;
[0018] Wherein, α is the behavior data of the first test account group at the benchmark time; α n is the difference between the behavior data of the first test account group on the nth day and the behavior data at the reference time; β is the difference between the behavior data of the second test account group at the reference time and the behavior data of the first test account group at the reference time; T n represents the nth day; γ n is the difference between the behavior data of the second test account group on the nth day and the behavior data at the reference time, and the difference between the behavior data of the first test account group on the nth day of the test and the behavior data at the reference time; D n T n *Treatment; Treatment=0 represents the first test account group, Treatment=1 represents the second test account group, y is the behavior data, and the reference time is the day before the use of the designated network application product containing the function to be launched;
[0019] If in the first time period before the preset test duration, γ nare both smaller than a preset threshold, then the account behaviors in the first test account group and the second test account group have a parallel trend within the preset test duration.
[0020] In a specific embodiment, the account sample includes account features and feature values of each account feature;
[0021] The step of determining the first test account group and the second test account group from the plurality of account samples comprises:
[0022] Determine a first account included in a first test account group from the multiple account samples, and use non-first accounts in the multiple account samples as pending accounts;
[0023] Based on the characteristic values of the account characteristics in the account samples, the tendency values of all the account samples are calculated, wherein the tendency value is a numerical value reflecting the account characteristics in the account samples; two account samples with the same tendency value have the same account characteristics;
[0024] The pending accounts that match the tendency values of the first accounts are obtained as second accounts to form a second test account group.
[0025] In a specific embodiment, before the step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time, the step further includes:
[0026] For each account feature of a first account in the first test account group and a second account in the second test account group, detecting whether a distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent;
[0027] If the distribution results corresponding to all account features of the first account in the first test account group and the second account in the second test account group are consistent, then executing the step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period;
[0028] If the distribution results corresponding to at least one account feature of the first account in the first test account group and the second account in the second test account group are inconsistent, the step of obtaining multiple account samples is returned to be executed.
[0029] In a specific embodiment, the step of detecting, for each account feature of the first account in the first test account group and the second account in the second test account group, whether the distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent includes:
[0030] For the account feature type of the first account in the first test account group and the second account in the second test account group being discrete, detecting whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent;
[0031] For the account feature type of the first account in the first test account group and the second account in the second test account group being continuous, it is detected whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent.
[0032] In a specific embodiment, before the step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time, the step further includes:
[0033] Using a preset sample balance detection algorithm for a first account in the first test account group and a second account in the second test account group, respectively detecting whether the number of samples of each account feature of the first account in the first test account group and the second account in the second test account group is balanced;
[0034] If the sample quantities of each account feature of the first account in the first test account group and the second account in the second test account group are balanced, the step of detecting, based on the first behavior data and the second behavior data, whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time is performed;
[0035] If the number of samples of at least one account characteristic between the first account in the first test account group and the second account in the second test account group is unbalanced, the step of obtaining multiple account samples is returned to be executed.
[0036] In a specific embodiment, the step of using a preset sample balance detection algorithm for the first account in the first test account group and the second account in the second test account group to respectively detect whether the number of samples of each account feature of the first account in the first test account group and the second account in the second test account group is balanced includes:
[0037] Calculate the standard mean difference of each account characteristic of a first account in the first test account group and a second account in the second test account group;
[0038] Determine whether the standard mean difference of the account characteristics is within a preset interval. If the standard mean difference of the account characteristics is within the preset interval, determine that the sample size of the account characteristics is balanced; if the standard mean difference of the account characteristics is not within the preset interval, determine that the sample size of the account characteristics is unbalanced.
[0039] According to a second aspect of an embodiment of the present disclosure, there is provided a device for processing sample data, comprising:
[0040] A sample acquisition unit, configured to acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product;
[0041] A test account group determination unit, configured to determine a first test account group and a second test account group;
[0042] The behavior data acquisition unit is configured to respectively acquire the behavior data of each first account in the first test account group and the behavior data of each second account in the second test account group within a preset test time, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested;
[0043] A detection unit is configured to detect, based on the first behavior data and the second behavior data, whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period;
[0044] The result information generating unit is configured to execute, when the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time, based on the first behavior data and the second behavior data, obtaining behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and generating test result information of the function to be tested of the specified application product based on the behavior difference information.
[0045] In a specific embodiment, the detection unit is configured to detect whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test duration based on the first behavior data, the reference behavior data and the second behavior data, wherein the reference behavior data is the behavior data generated during the use of the specified network application product that does not include the function to be launched in the first time period before the preset test duration;
[0046] The result information generating unit is configured to execute, when the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time, based on the first behavior data, the reference behavior data and the second behavior data, using a double difference algorithm to calculate and obtain behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and generate test result information of the function to be tested of the specified application product based on the behavior difference information.
[0047] In a specific embodiment, the detection unit is configured to perform:
[0048] Based on the first behavior data, the reference behavior data and the second behavior data, using the preset formula: y = α + β * Treatment + α -n *T -n +...+α -2 *T -2 +α0*T0+α1*T1+...+α n *T n +γ -n *D -n +...+γ -2 *D -2 +γ0*D0+...+γ n *D n , calculate γ n ;
[0049] Wherein, α is the behavior data of the first test account group at the benchmark time; α n is the difference between the behavior data of the first test account group on the nth day and the behavior data at the reference time; β is the difference between the behavior data of the second test account group at the reference time and the behavior data of the first test account group at the reference time; T n represents the nth day; γ n is the difference between the behavior data of the second test account group on the nth day and the behavior data at the reference time, and the difference between the behavior data of the first test account group on the nth day of the test and the behavior data at the reference time; D n T n*Treatment; Treatment=0 represents the first test account group, Treatment=1 represents the second test account group, y is the behavior data, and the reference time is the day before the use of the designated network application product containing the function to be launched;
[0050] If in the first time period before the preset test duration, γ n are both smaller than a preset threshold, then the account behaviors in the first test account group and the second test account group have a parallel trend within the preset test duration.
[0051] In a specific embodiment, the account sample includes account features and feature values of each account feature;
[0052] The test account group determination unit is configured to execute:
[0053] Determine a first account included in a first test account group from the multiple account samples, and use non-first accounts in the multiple account samples as pending accounts;
[0054] Based on the characteristic values of the account characteristics in the account samples, the tendency values of all the account samples are calculated, wherein the tendency value is a numerical value reflecting the account characteristics in the account samples; two account samples with the same tendency value have the same account characteristics;
[0055] The pending accounts that match the tendency values of the first accounts are obtained as second accounts to form a second test account group.
[0056] In a specific embodiment, the processing device for sample data further includes: a feature distribution detection unit;
[0057] The feature distribution detection unit is configured to perform:
[0058] The detection unit detects, based on the first behavior data and the second behavior data, whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period, and then detects, for each account feature of the first account in the first test account group and the second account in the second test account group, whether the distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent;
[0059] If the distribution results corresponding to all account characteristics of the first account in the first test account group and the second account in the second test account group are consistent, triggering the detection unit;
[0060] If the distribution results corresponding to at least one account feature of a first account in the first test account group and a second account in the second test account group are inconsistent, the sample acquisition unit is triggered.
[0061] In a specific embodiment, the feature distribution detection unit is configured to perform:
[0062] For the account feature type of the first account in the first test account group and the second account in the second test account group being discrete, detecting whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent;
[0063] For the account feature type of the first account in the first test account group and the second account in the second test account group being continuous, it is detected whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent.
[0064] In a specific embodiment, the processing device for sample data further includes: a sample balance detection unit;
[0065] The sample balance detection unit is configured to perform:
[0066] The detection unit detects, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period, and then uses a preset sample balance detection algorithm to detect whether the sample quantities of each account feature of the first account in the first test account group and the second account in the second test account group are balanced respectively;
[0067] If the number of samples of each account feature of the first account in the first test account group and the second account in the second test account group are balanced, triggering the detection unit;
[0068] If the number of samples of at least one account characteristic between a first account in the first test account group and a second account in the second test account group is unbalanced, the sample acquisition unit is triggered.
[0069] In a specific embodiment, the sample balance detection unit is configured to perform:
[0070] Calculate the standard mean difference of each account characteristic of a first account in the first test account group and a second account in the second test account group;
[0071] Determine whether the standard mean difference of the account characteristics is within a preset interval. If the standard mean difference of the account characteristics is within the preset interval, determine that the sample size of the account characteristics is balanced; if the standard mean difference of the account characteristics is not within the preset interval, determine that the sample size of the account characteristics is unbalanced.
[0072] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, characterized in that it includes:
[0073] processor;
[0074] a memory for storing instructions executable by the processor;
[0075] The processor is configured to perform the following steps:
[0076] Acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product;
[0077] Determining a first test account group and a second test account group from the plurality of sample data;
[0078] Respectively obtaining behavior data of each first account in the first test account group and behavior data of each second account in the second test account group within a preset test duration, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested;
[0079] Based on the first behavior data and the second behavior data, detecting whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period;
[0080] If there is a parallel trend, based on the first behavior data and the second behavior data, behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group is obtained, and test result information of the function to be tested of the specified application product is generated based on the behavior difference information.
[0081] According to a fourth aspect of an embodiment of the present disclosure, there is provided a method for enabling the electronic device to perform the following steps when the instructions in the storage medium are executed by a processor of the electronic device:
[0082] Acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product;
[0083] Determining a first test account group and a second test account group from the plurality of sample data;
[0084] Respectively obtaining behavior data of each first account in the first test account group and behavior data of each second account in the second test account group within a preset test duration, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested;
[0085] Based on the first behavior data and the second behavior data, detecting whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period;
[0086] If there is a parallel trend, based on the first behavior data and the second behavior data, behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group is obtained, and test result information of the function to be tested of the specified application product is generated based on the behavior difference information.
[0087] The technical solution provided by the embodiment of the present disclosure brings at least the following beneficial effects: since the technical solution provided by the embodiment of the present disclosure can verify whether the first test account group and the second test account group have a parallel trend during the process of processing sample data, the test result information is generated only when there is a parallel trend, that is, when the account behaviors of the two test account groups have a parallel development trend. Therefore, the accuracy of the test result information can be guaranteed.
[0088] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0090] Figure 1 The figure is a flowchart of a method for processing sample data according to an exemplary embodiment.
[0091] Figure 2 is a flowchart of another method for processing sample data according to an exemplary embodiment.
[0092] Figure 3aIt is a schematic diagram of the account sample distribution of the first test account group and the second test account group determined without using the propensity score matching method.
[0093] Figure 3b It is a schematic diagram of the account sample distribution of the first test account group and the second test account group determined by using the propensity score matching method.
[0094] Figure 4 It is a block diagram of a device for processing sample data according to an exemplary embodiment.
[0095] Figure 5 is a block diagram of another device for processing sample data according to an exemplary embodiment.
[0096] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0097] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0098] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0099] Figure 1 is a flowchart of a method for processing sample data according to an exemplary embodiment. Figure 1 As shown, the processing method for sample data is used in a server and includes the following steps.
[0100] In step S101 , a plurality of sample data are acquired, wherein the sample data are generated based on data of an account using a specified application product.
[0101] In step S102 , a first test account group and a second test account group are determined from a plurality of sample data.
[0102] In a specific embodiment, the account sample may include account features and feature values of each account feature; specifically, the first test account group and the second test account group may be determined from multiple account samples according to the following steps:
[0103] First, a first account included in a first test account group is determined from a plurality of account samples, and non-first accounts in the plurality of account samples are used as pending accounts;
[0104] Then, based on the characteristic values of the account characteristics in the account samples, the tendency values of all account samples are calculated, where the tendency value is a numerical value reflecting the account characteristics in the account samples; two account samples with the same tendency value have the same account characteristics;
[0105] Finally, each pending account that matches the tendency value of each first account is obtained as the second account to form a second test account group.
[0106] In step S103, the behavior data of each first account in the first test account group and the behavior data of each second account in the second test account group within the preset test duration are respectively obtained, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested.
[0107] Specifically, the behavior data of each first account in the first test account group may include: all first behavior data generated during the use of a designated network application product that does not include the function to be launched during the entire preset test duration; the behavior data of each second account in the second test account group may include two parts: one part is reference behavior data generated during the use of a designated network application product that does not include the function to be launched during a first time period before the preset test duration, and the other part is second behavior data generated during the use of a designated network application product that includes the function to be launched during a second time period after the first time period during the preset test duration; wherein the total duration of the first time period and the duration of the second time period is the preset test duration.
[0108] In step S104, based on the first behavior data and the second behavior data, it is detected whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time.
[0109] In a specific embodiment, specifically, based on the first behavior data, the reference behavior data and the second behavior data, it can be detected whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within the preset test duration, wherein the reference behavior data is the behavior data generated during the use of a specified network application product that does not include the function to be launched in the first time period before the preset test duration.
[0110] In step S105, if there is a parallel trend, based on the first behavior data and the second behavior data, behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group is obtained, and test result information of the function to be tested of the specified application product is generated based on the behavior difference information.
[0111] In some embodiments, if there is no parallel trend, it means that the two sets of test data are not comparable, and the sample data can be re-obtained for testing.
[0112] In a specific embodiment, specifically, if the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within the preset test time, then based on the first behavior data, the reference behavior data and the second behavior data, a double difference algorithm is used to calculate and obtain the behavior difference information between the account behaviors in the first test account group and the account behaviors in the second test account group as the test result information of the to-be-tested function of the specified application product. This test result information can be used as information for value evaluation.
[0113] Since the technical solution provided by the embodiment of the present disclosure can verify whether the first test account group and the second test account group have a parallel trend during the process of processing sample data, the test result information is generated only when there is a parallel trend, that is, when the account behaviors of the two test account groups have a parallel development trend. Therefore, the accuracy of the test result information can be guaranteed.
[0114] A specific embodiment is listed below to further illustrate the method for processing sample data provided by the embodiment of the present disclosure.
[0115] Figure 2 is a flowchart of another method for processing sample data according to an exemplary embodiment. Figure 2 As shown, the method for processing sample data includes the following steps:
[0116] In step S201 , a plurality of sample data are obtained, wherein the sample data are generated based on data of an account using a specified application product.
[0117] In practical applications, after obtaining the sample data, the sample data may be preprocessed, such as cleaning, to avoid dirty data in the sample data.
[0118] For example, if some samples in the acquired sample data are incomplete or missing, then these data are dirty data and need to be cleaned from the acquired sample data. Specifically, it can be detected whether each sample data in the acquired sample data contains the required account characteristics. If a sample data does not contain a required account characteristic, the sample data is deleted.
[0119] In step S202, a first test account group and a second test account group are determined from a plurality of sample data.
[0120] In a specific embodiment, the account sample may include account features and feature values of each account feature. The first account included in the first test account group may be determined from multiple account samples, and the non-first account in the multiple account samples may be used as the pending account; then the logistic regression model may be used to Calculate and obtain the tendency value of each account sample; then obtain each pending account that matches the tendency value of each first account as the second account to form a second test account group, where w T is the transpose of the weight matrix w, x is the account sample, and y is the propensity value corresponding to the account sample. The propensity value is a value that can reflect the account characteristics in the account sample; two account samples with the same propensity value have the same account characteristics, and x is a matrix.
[0121] In practical applications, it can be
[0122] Propensity score matching (PSM) model is used to perform propensity score matching to determine the second accounts included in the second test account group.
[0123] Figure 3a 3a is a schematic diagram of the distribution of account samples of the first test account group and the second test account group determined by the method of propensity score matching without using the method of propensity score matching, and 3b is a schematic diagram of the distribution of account samples of the first test account group and the second test account group determined by the method of propensity score matching, see Figure 3a , the distribution of account samples of the first test account group and the second test account group determined without using the propensity score matching method is not completely overlapping, indicating that the distribution of account samples of the first test account group (i.e., the control group in the figure) and the second test account group (i.e., the experimental group in the figure) are inconsistent. Figure 3b, the account sample distributions of the first test account group (the control group in the figure) and the second test account group (the experimental group in the figure) determined by the propensity score matching method basically overlap, indicating that the account sample distributions of the first test account group and the second test account group are consistent. Figure 3a and 3b It can be seen that determining the first test account group and the second test account group by using the propensity score matching method can obtain the first test account group and the second test account group with consistent account sample distribution, which is conducive to further improving the accuracy of the test result information.
[0124] In actual applications, the first test account group and the second test account group can be 1-to-K matches, that is, for the number of account samples corresponding to each propensity value in the first test account group, the second test account group must have K times the number of account samples with the same propensity value, where K is a natural number greater than or equal to 1. The value of K can be set manually by the designer according to actual needs. Generally speaking, considering the uncertainty of the amount of calculation, the number of accounts using the specified application product, and the impact of the function to be tested on the account using the specified application product, the designer usually does not set the K value too large, that is, the number of accounts contained in the first test account group and the second test account group is roughly equivalent, and will not differ by dozens or hundreds of times. For example, if the value of K is 5, there are 5 account samples with a propensity value of 0.5 in the first test account group, and the second test account group needs to have 5*5=25 account samples with a propensity value of 0.5.
[0125] In step S203, for each account feature of the first account in the first test account group and the second account in the second test account group, it is detected whether the distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent; if yes, execute step S204; if not, execute step S201.
[0126] In a specific embodiment, for the account feature type of the first account in the first test account group and the second account in the second test account group being discrete, a Chi-square test is used to detect whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent;
[0127] For the account feature types of the first account in the first test account group and the second account in the second test account group that are continuous, the Kolmogorov-Smirnov Test (KS Test) is used to detect whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent.
[0128] For example, account characteristics include age, gender, occupation, income, province and country of the account, among which age, gender, occupation, province and country are discrete characteristics, and income is a continuous characteristic. Then, for the discrete characteristics: age, gender, occupation, province and country, use the chi-square test to detect whether the distribution of age, gender, occupation, province and country of the first account in the first test account group and the second account in the second test account group is consistent; for the continuous characteristic: income, use the Kolmogorov-Smirnov test to detect whether the distribution of income of the first account in the first test account group and the second account in the second test account group is consistent.
[0129] Specifically, the formula for the chi-square test can be: Among them, χ 2 is the statistic, f ij is the element in the i-th row and j-th column of the matrix corresponding to the first account in the first test account group or the second account in the second test account group, e ij That is, total amount * (sum of row i / total amount) * (sum of column j / total amount). 2 The eij distribution table corresponding to the statistic is used to obtain the probability p, and then p is compared with the preset threshold. If the p value is greater than the preset threshold, it indicates that the distribution is consistent, otherwise, the distribution is inconsistent. For example: compare p with the preset threshold 0.05. If the p value is greater than 0.05, it indicates that the distribution is consistent, otherwise, the distribution is inconsistent.
[0130] Specifically, the formula for KS detection can be: Among them, sup is the supremum function, D n,m F 1,n (x) and F 2,m (x) The maximum value of the gap, F 1,n (x) is the cumulative frequency of the sample characteristics of the experimental group or control group, F 2,m (x) is the cumulative frequency of the preset sample feature. According to the calculation result, the distribution table corresponding to the D statistic is checked to obtain the probability p, and then p is compared with the preset threshold. If the p value is greater than the preset threshold, it indicates that the distribution is consistent, otherwise, the distribution is inconsistent. For example: compare p with the preset threshold 0.05. If the p value is greater than 0.05, it indicates that the distribution is consistent, otherwise, the distribution is inconsistent.
[0131] In step S204, a preset sample balance detection algorithm is used to detect whether the number of samples of each account feature of the first account in the first test account group and the second account in the second test account group are balanced; if so, execute step S205; if not, execute step S201.
[0132] In a specific embodiment, the standard mean difference (STD Mean Difference, SMD) of each account feature of the first account in the first test account group and the second account in the second test account group may be calculated; it may be determined whether the standard mean difference of the account feature is within a preset interval; if the standard mean difference of the account feature is within the preset interval, it may be determined that the sample quantity of the account feature is balanced; if the standard mean difference of the account feature is not within the preset interval, it may be determined that the sample quantity of the account feature is unbalanced.
[0133] For example, the preset interval range may be [-0.2, 0.2]. If the standard mean difference calculated for a certain account feature falls within [-0.2, 0.2], it is considered whether the sample size of the account feature is balanced.
[0134] In step S205, based on the first behavior data and the second behavior data, detect whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within the preset test time; if the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend, execute step S206; if the account behavior in the first test account group and the account behavior in the second test account group do not have a parallel trend, execute step S201.
[0135] In practical applications, the preset formula can be used based on the first behavior data, the reference behavior data and the second behavior data: y = α + β * Treatment + α -n *T -n +...+α -2 *T -2 +α0*T0+α1*T1+...+α n *T n +γ -n *D -n +...+γ -2 *D -2 +γ0*D0+...+γ n *D n , calculate γ n ;
[0136] Among them, α is the behavior data of the first test account group at the benchmark time; α n is the difference between the behavior data of the first test account group on the nth day and the behavior data at the reference time; β is the difference between the behavior data of the second test account group at the reference time and the behavior data of the first test account group at the reference time; T n represents the nth day; γ nis the difference between the behavior data of the second test account group on the nth day and the behavior data at the reference time, and the difference between the behavior data of the first test account group on the nth day of the test and the behavior data at the reference time; D n T n *Treatment; Treatment=0 represents the first test account group, Treatment=1 represents the second test account group, y is the behavior data, and the reference time is the day before the use of the specified network application product containing the function to be launched;
[0137] If in the first time period before the preset test duration, γ n If both are smaller than the preset threshold, the account behaviors in the first test account group and the second test account group have a parallel trend within the preset test time.
[0138] In step S206, based on the first behavior data and the second behavior data, behavior difference information between the account behaviors in the first test account group and the account behaviors in the second test account group is obtained, and test result information of the to-be-tested function of the specified application product is generated based on the behavior difference information.
[0139] For example, for a certain application APP, the test result information may be the difference in the access rate of the application APP. If the obtained test result information indicates that the access rate of the second test account group is higher than that of the first test account group, it may be explained that the function to be tested has a promoting effect on the access rate of the application APP, and the function to be tested may be added to the application APP; if the obtained test result information indicates that the access rate of the second test account group is higher than that of the first test account group, it may be explained that the function to be tested has an hindering effect on the access rate of the application APP, and it is not appropriate to add the function to be tested to the application APP.
[0140] In another specific embodiment, step S203 may be executed first and then step S204. In other embodiments, steps S203 and S204 may be executed simultaneously. The present disclosure does not limit the execution order of steps S203 and S204.
[0141] Depend on Figure 2It can be seen from the illustrated embodiment that the technical solution provided by the embodiment of the present disclosure can verify whether the first test account group and the second test account group have parallel trends during the processing of sample data. Only when there are parallel trends, that is, when the account behaviors of the two test account groups have parallel development trends, is the test result information generated. Thus, the accuracy of the test result information can be guaranteed. In addition, the technical solution provided by the embodiment of the present disclosure can also detect whether the distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent and / or detect whether the sample quantity of each account feature of the first account in the first test account group and the second account in the second test account group is balanced, thereby further ensuring the accuracy of the test result information.
[0142] In addition, in practical applications, the entire process of the technical solution provided by the embodiment of the present disclosure can be encapsulated into a program package, thereby realizing the integration of the process. Therefore, the problem of inconsistent parameters that may occur between multiple program packages can be avoided. The encapsulated program package can be used directly when processing sample data, and the developer does not need to write code every time the sample data is processed, thereby reducing the workload of the developer.
[0143] Figure 4 is a block diagram of a device for processing sample data according to an exemplary embodiment. Figure 4 The device may include a sample acquisition unit 401, a test account group determination unit 402, a behavior data acquisition unit 403, a detection unit 404 and a result information generation unit 405.
[0144] The sample acquisition unit 401 is configured to acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product;
[0145] The test account group determining unit 402 is configured to determine a first test account group and a second test account group;
[0146] The behavior data acquisition unit 403 is configured to execute the acquisition of the behavior data of each first account in the first test account group and the behavior data of each second account in the second test account group within a preset test time, wherein the behavior data of each first account in the first test account group includes: the first behavior data generated during the use of the application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: the second behavior data generated during the use of the application product that includes the function to be tested;
[0147] The detection unit 404 is configured to detect whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period based on the first behavior data and the second behavior data;
[0148] The result information generating unit 405 is configured to execute, when the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time, based on the first behavior data and the second behavior data, obtaining behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and generating test result information of the function to be tested of the specified application product based on the behavior difference information.
[0149] In a specific embodiment, the detection unit 404 may be configured to detect whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test duration based on the first behavior data, the reference behavior data, and the second behavior data, wherein the reference behavior data is the behavior data generated during the use of the specified network application product that does not include the function to be launched in the first time period before the preset test duration;
[0150] The result information generating unit 405 is configured to execute, when the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time, based on the first behavior data, the reference behavior data and the second behavior data, using a double difference algorithm to calculate and obtain the behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and generate the test result information of the to-be-tested function of the specified application product based on the behavior difference information.
[0151] In a specific embodiment, the detection unit 404 is configured to perform:
[0152] Based on the first behavior data, the reference behavior data and the second behavior data, using the preset formula: y = α + β * Treatment + α -n *T -n +...+α -2 *T -2 +α0*T0+α1*T1+...+α n *T n +γ -n *D -n +...+γ -2 *D -2 +γ0*D0+...+γ n *D n , calculate γ n ;
[0153] Among them, α is the behavior data of the first test account group at the benchmark time; α n is the difference between the behavior data of the first test account group on the nth day and the behavior data at the reference time; β is the difference between the behavior data of the second test account group at the reference time and the behavior data of the first test account group at the reference time; T n represents the nth day; γ n is the difference between the behavior data of the second test account group on the nth day and the behavior data at the reference time, and the difference between the behavior data of the first test account group on the nth day of the test and the behavior data at the reference time; D n T n *Treatment; Treatment=0 represents the first test account group, Treatment=1 represents the second test account group, y is the behavior data, and the reference time is the day before the use of the specified network application product containing the function to be launched;
[0154] If in the first time period before the preset test duration, γ n If both are smaller than the preset threshold, the account behaviors in the first test account group and the second test account group have a parallel trend within the preset test time.
[0155] In a specific embodiment, the account sample includes account features and feature values of each account feature;
[0156] The test account group determination unit 402 is configured to execute:
[0157] Determine a first account included in a first test account group from a plurality of account samples, and use non-first accounts in the plurality of account samples as pending accounts;
[0158] Based on the characteristic values of the account characteristics in the account samples, the tendency values of all account samples are calculated, where the tendency value is a numerical value reflecting the account characteristics in the account samples; two account samples with the same tendency value have the same account characteristics;
[0159] The pending accounts that match the tendency values of the first accounts are obtained as second accounts to form a second test account group.
[0160] See also Figure 5 , In a specific embodiment, the processing device for sample data may further include: a feature distribution detection unit 501;
[0161] The feature distribution detection unit 501 is configured to perform:
[0162] The detection unit detects, based on the first behavior data and the second behavior data, whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period, and then detects, for each account feature of the first account in the first test account group and the second account in the second test account group, whether the distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent;
[0163] If the distribution results corresponding to all account features of the first account in the first test account group and the second account in the second test account group are consistent, triggering the detection unit 404;
[0164] If the distribution results corresponding to at least one account feature of the first account in the first test account group and the second account in the second test account group are inconsistent, the sample acquisition unit 401 is triggered.
[0165] In a specific embodiment, the feature distribution detection unit 501 may be configured to perform:
[0166] For the account feature type of the first account in the first test account group and the second account in the second test account group being discrete, detecting whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent;
[0167] For the account feature type of the first account in the first test account group and the second account in the second test account group being continuous, it is detected whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent.
[0168] See also Figure 5 , In a specific embodiment, the processing device for sample data may further include: a sample balance detection unit 502;
[0169] The sample balance detection unit 502 may be configured to perform:
[0170] The detection unit detects, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period, and then uses a preset sample balance detection algorithm to detect whether the sample quantities of each account feature of the first account in the first test account group and the second account in the second test account group are balanced respectively;
[0171] If the sample quantities of each account feature of the first account in the first test account group and the second account in the second test account group are balanced, triggering the detection unit 404;
[0172] If the number of samples of at least one account characteristic between the first account in the first test account group and the second account in the second test account group is unbalanced, the sample acquisition unit 401 is triggered.
[0173] In a specific embodiment, the sample balance detection unit 502 may be configured to perform:
[0174] Calculate the standard mean difference of each account characteristic of the first account in the first test account group and the second account in the second test account group;
[0175] Determine whether the standard mean difference of the account characteristics is within the preset interval. If the standard mean difference of the account characteristics is within the preset interval, it is determined that the sample size of the account characteristics is balanced; if the standard mean difference of the account characteristics is not within the preset interval, it is determined that the sample size of the account characteristics is unbalanced.
[0176] Since the apparatus provided by the embodiments of the present disclosure can verify whether the first test account group and the second test account group have a parallel trend during the process of processing sample data, the test result information is generated only when there is a parallel trend, that is, when the account behaviors of the two test account groups have a parallel development trend. Therefore, the accuracy of the test result information can be guaranteed.
[0177] Figure 6 is a block diagram of an electronic device according to an exemplary embodiment. Figure 6 , the electronic device may include:
[0178] Processor 601, communication interface 602, memory 603 and communication bus 604, wherein processor 601, communication interface 602, memory 603 communicate with each other via communication bus 604.
[0179] Memory 603, used for storing computer programs;
[0180] The processor 601 is used to execute the program stored in the memory 603 to implement the following steps:
[0181] Acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product;
[0182] Determine a first test account group and a second test account group from the plurality of sample data;
[0183] Respectively obtaining the behavior data of each first account in the first test account group and the behavior data of each second account in the second test account group within the preset test duration, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested;
[0184] Based on the first behavior data and the second behavior data, detecting whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period;
[0185] If there is a parallel trend, based on the first behavior data and the second behavior data, behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group is obtained, and test result information of the function to be tested of the specified application product is generated based on the behavior difference information.
[0186] Since the electronic device provided by the embodiment of the present disclosure can verify whether the first test account group and the second test account group have a parallel trend during the process of processing sample data, the test result information is generated only when there is a parallel trend, that is, when the account behaviors of the two test account groups have a parallel development trend. Therefore, the accuracy of the test result information can be guaranteed.
[0187] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0188] The communication interface is used for communication between the above electronic device and other devices.
[0189] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0190] The above-mentioned processor 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 gate or transistor logic devices, discrete hardware components.
[0191] In another embodiment provided by the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for processing sample data are implemented.
[0192] In another embodiment provided by the present disclosure, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any one of the processing methods for sample data in the above embodiments.
[0193] It should be noted that the account information involved in this application is collected with the authorization of the user or account and subsequently processed and analyzed.
[0194] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0195] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing sample data, characterized in that: The method comprises: Acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product; Determining a first test account group and a second test account group from the plurality of sample data; Respectively obtaining behavior data of each first account in the first test account group and behavior data of each second account in the second test account group within a preset test duration, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested; Based on the first behavior data and the second behavior data, detecting whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period; If there is a parallel trend, obtaining behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group based on the first behavior data and the second behavior data, and generating test result information of the to-be-tested function of the specified application product based on the behavior difference information; The step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period includes: Based on the first behavior data, the reference behavior data, and the second behavior data, detecting whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test duration, wherein the reference behavior data is the behavior data generated during the use of the designated network application product that does not include the function to be launched in a first time period before the preset test duration; If there is a parallel trend, the step of obtaining behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group based on the first behavior data and the second behavior data, and generating test result information of the to-be-tested function of the specified application product based on the behavior difference information includes: If there is a parallel trend, a double difference algorithm is used based on the first behavior data, the reference behavior data and the second behavior data to calculate and obtain the behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and the test result information of the function to be tested of the specified application product is generated based on the behavior difference information.
2. The method for processing sample data according to claim 1, characterized in that: The step of detecting, based on the first behavior data, the reference behavior data, and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period includes: Based on the first behavior data, the reference behavior data and the second behavior data, using the preset formula: y = α + β * Treatment + α -n *T -n +...+α -2 *T -2 +α0*T0+α1*T1+...+α n *T n +γ -n *D -n +...+γ -2 *D -2 +γ0*D0+...+γ n *D n , calculate γ n ; Wherein, α is the behavior data of the first test account group at the benchmark time; α n is the difference between the behavior data of the first test account group on the nth day and the behavior data at the reference time; β is the difference between the behavior data of the second test account group at the reference time and the behavior data of the first test account group at the reference time; T n represents the nth day; γ n is the difference between the behavior data of the second test account group on the nth day and the behavior data at the reference time, and the difference between the behavior data of the first test account group on the nth day of the test and the behavior data at the reference time; D n T n *Treatment; Treatment=0 represents the first test account group, Treatment=1 represents the second test account group, y represents the behavior data, the reference time is the day before the use of the specified network application product containing the function to be launched; T0 represents the day when the specified network application product containing the function to be launched is used; T -n Indicates the nth day before the specified network application product containing the function to be launched is used, the T n Indicates the nth day after using the specified network application product containing the function to be launched; If in the first time period before the preset test duration, γ n are both smaller than a preset threshold, then the account behaviors in the first test account group and the second test account group have a parallel trend within the preset test duration.
3. The method for processing sample data according to claim 1, characterized in that: The sample data includes account features and feature values of each account feature; The step of determining the first test account group and the second test account group from the plurality of sample data comprises: Determine a first account included in a first test account group from the plurality of sample data, and use non-first accounts in the plurality of sample data as pending accounts; Based on the characteristic values of the account characteristics in the sample data, the tendency values of all the sample data are calculated, wherein the tendency value is a numerical value reflecting the account characteristics in the sample data; two sample data with the same tendency value have the same account characteristics; The pending accounts that match the tendency values of the first accounts are obtained as second accounts to form a second test account group.
4. The method for processing sample data according to claim 3, characterized in that: Before the step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time, the method further includes: For each account feature of a first account in the first test account group and a second account in the second test account group, detecting whether a distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent; If the distribution results corresponding to all account features of the first account in the first test account group and the second account in the second test account group are consistent, then executing the step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period; If the distribution results corresponding to at least one account feature of the first account in the first test account group and the second account in the second test account group are inconsistent, the step of obtaining multiple sample data is returned to be executed.
5. The method for processing sample data according to claim 4, characterized in that: The step of detecting, for each account feature of the first account in the first test account group and the second account in the second test account group, whether the distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent comprises: For the account feature type of the first account in the first test account group and the second account in the second test account group being discrete, detecting whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent; For the account feature type of the first account in the first test account group and the second account in the second test account group being continuous, it is detected whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent.
6. The method for processing sample data according to claim 3, characterized in that: Before the step of detecting, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time, the method further includes: Using a preset sample balance detection algorithm for a first account in the first test account group and a second account in the second test account group, respectively detecting whether the number of samples of each account feature of the first account in the first test account group and the second account in the second test account group is balanced; If the sample quantities of each account feature of the first account in the first test account group and the second account in the second test account group are balanced, the step of detecting, based on the first behavior data and the second behavior data, whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time is performed; If the number of samples of at least one account characteristic between the first account in the first test account group and the second account in the second test account group is unbalanced, the step of obtaining a plurality of sample data is returned to be executed.
7. The method for processing sample data according to claim 6, characterized in that: The step of using a preset sample balance detection algorithm to detect whether the number of samples of each account feature of the first account in the first test account group and the second account in the second test account group is balanced includes: Calculate the standard mean difference of each account characteristic of the first account in the first test account group and the second account in the second test account group; Determine whether the standard mean difference of the account characteristics is within a preset interval. If the standard mean difference of the account characteristics is within the preset interval, determine that the sample size of the account characteristics is balanced; if the standard mean difference of the account characteristics is not within the preset interval, determine that the sample size of the account characteristics is unbalanced.
8. A device for processing sample data, characterized in that: include: A sample acquisition unit, configured to acquire a plurality of sample data, wherein the sample data is generated based on data of an account using a specified application product; A test account group determination unit, configured to determine a first test account group and a second test account group; The behavior data acquisition unit is configured to respectively acquire the behavior data of each first account in the first test account group and the behavior data of each second account in the second test account group within a preset test time, wherein the behavior data of each first account in the first test account group includes: first behavior data generated during the use of an application product that does not include the function to be tested; the behavior data of each second account in the second test account group includes: second behavior data generated during the use of an application product that includes the function to be tested; A detection unit is configured to detect, based on the first behavior data and the second behavior data, whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period; A result information generating unit is configured to execute, when the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time, based on the first behavior data and the second behavior data, obtaining behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and generating test result information of the to-be-tested function of the specified application product based on the behavior difference information; The detection unit is configured to detect whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test duration based on the first behavior data, the reference behavior data, and the second behavior data, wherein the reference behavior data is behavior data generated during the use of the specified network application product that does not include the function to be launched in a first time period before the preset test duration; The result information generating unit is configured to execute, when the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time, based on the first behavior data, the reference behavior data and the second behavior data, using a double difference algorithm to calculate and obtain behavior difference information between the account behavior in the first test account group and the account behavior in the second test account group, and generate test result information of the function to be tested of the specified application product based on the behavior difference information.
9. The sample data processing device according to claim 8, characterized in that: The detection unit is configured to perform: Based on the first behavior data, the reference behavior data and the second behavior data, using the preset formula: y = α + β * Treatment + α -n *T -n +...+α -2 *T -2 +α0*T0+α1*T1+...+α n *T n +γ -n *D -n +...+γ -2 *D -2 +γ0*D0+...+γ n *D n , calculate γ n ; Wherein, α is the behavior data of the first test account group at the benchmark time; α n is the difference between the behavior data of the first test account group on the nth day and the behavior data at the reference time; β is the difference between the behavior data of the second test account group at the reference time and the behavior data of the first test account group at the reference time; T n represents the nth day; γ n is the difference between the behavior data of the second test account group on the nth day and the behavior data at the reference time, and the difference between the behavior data of the first test account group on the nth day of the test and the behavior data at the reference time; D n T n *Treatment; Treatment=0 represents the first test account group, Treatment=1 represents the second test account group, y represents the behavior data, the reference time is the day before the use of the specified network application product containing the function to be launched; T0 represents the day when the specified network application product containing the function to be launched is used; T -n Indicates the nth day before the specified network application product containing the function to be launched is used, the T n Indicates the nth day after using the specified network application product containing the function to be launched; If in the first time period before the preset test duration, γ n are both smaller than a preset threshold, then the account behaviors in the first test account group and the second test account group have a parallel trend within the preset test duration.
10. The sample data processing device according to claim 8, characterized in that: The sample data includes account features and feature values of each account feature; The test account group determination unit is configured to execute: Determine a first account included in a first test account group from the plurality of sample data, and use non-first accounts in the plurality of sample data as pending accounts; Based on the characteristic values of the account characteristics in the sample data, the tendency values of all the sample data are calculated, wherein the tendency value is a numerical value reflecting the account characteristics in the sample data; two sample data with the same tendency value have the same account characteristics; The pending accounts that match the tendency values of the first accounts are obtained as second accounts to form a second test account group.
11. The sample data processing device according to claim 10, characterized in that: The processing device for sample data further includes: a feature distribution detection unit; The feature distribution detection unit is configured to perform: The detection unit detects, based on the first behavior data and the second behavior data, whether the account behavior in the first test account group and the account behavior in the second test account group have a parallel trend within a preset test time period, and then detects, for each account feature of the first account in the first test account group and the second account in the second test account group, whether the distribution corresponding to each account feature of the first account in the first test account group and the second account in the second test account group is consistent; If the distribution results corresponding to all account characteristics of the first account in the first test account group and the second account in the second test account group are consistent, triggering the detection unit; If the distribution results corresponding to at least one account feature of a first account in the first test account group and a second account in the second test account group are inconsistent, the sample acquisition unit is triggered.
12. The sample data processing device according to claim 11, characterized in that: The feature distribution detection unit is configured to perform: For the account feature type of the first account in the first test account group and the second account in the second test account group being discrete, detecting whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent; For the account feature type of the first account in the first test account group and the second account in the second test account group being continuous, it is detected whether the distribution of the account features of the first account in the first test account group and the second account in the second test account group is consistent.
13. The sample data processing device according to claim 10, characterized in that: The processing device for sample data further includes: a sample balance detection unit; The sample balance detection unit is configured to perform: The detection unit detects, based on the first behavior data and the second behavior data, whether the account behaviors in the first test account group and the account behaviors in the second test account group have a parallel trend within a preset test time period, and then uses a preset sample balance detection algorithm to detect whether the sample quantities of each account feature of the first account in the first test account group and the second account in the second test account group are balanced respectively; If the number of samples of each account feature of the first account in the first test account group and the second account in the second test account group are balanced, triggering the detection unit; If the number of samples of at least one account characteristic between a first account in the first test account group and a second account in the second test account group is unbalanced, the sample acquisition unit is triggered.
14. The sample data processing device according to claim 13, characterized in that: The sample balance detection unit is configured to perform: Calculate the standard mean difference of each account characteristic of the first account in the first test account group and the second account in the second test account group; Determine whether the standard mean difference of the account characteristics is within a preset interval. If the standard mean difference of the account characteristics is within the preset interval, determine that the sample size of the account characteristics is balanced; if the standard mean difference of the account characteristics is not within the preset interval, determine that the sample size of the account characteristics is unbalanced.
15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for processing sample data as described in any one of claims 1 to 7. 16 . A storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for processing sample data as claimed in any one of claims 1 to 7.
