Data processing method and related equipment

By utilizing covariate data and prediction models from observation units before intervention, the system automatically and efficiently matches observation units, solving the problem of time-consuming and labor-intensive matching in existing technologies, and achieving improved accuracy in covariate balance and causal effect inference.

CN121880948APending Publication Date: 2026-04-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-10-17
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, the process of matching observation units is time-consuming and labor-intensive, making it difficult to efficiently achieve balance on covariates.

Method used

By acquiring covariate data of observation units before intervention, predictive models are used to predict indicator results after intervention, and matching is performed based on the predicted indicator results to achieve automatic and efficient matching between observation units.

Benefits of technology

It improves the accuracy and efficiency of observation unit matching, enables better balance on covariates, and enhances the accuracy of causal effect inference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880948A_ABST
    Figure CN121880948A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and related equipment. The method comprises the following steps: acquiring a covariable of each first observation unit in a first unit group and a covariable of each second observation unit in a second unit group; the first observation unit is an observation unit which is subjected to intervention operation, and the second observation unit is an observation unit which is not subjected to intervention operation; the covariable comprises observation index data of the observation unit before intervention operation; performing prediction according to the observation index data of each first observation unit before intervention operation to obtain a prediction index result of each first observation unit; performing prediction according to the observation index data of each second observation unit before intervention operation to obtain a prediction index result of each second observation unit; according to the prediction index result of the first observation unit and the prediction index result of the second observation unit, the first observation unit and the second observation unit are matched, and matching between the observation units can be efficiently carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, specifically to a data processing method and related equipment. Background Technology

[0002] Matching is a common observational data analysis method. Its main purpose is to identify two sets of observational units that are similar in key covariates. Covariates refer to quantities of an observational unit that are unaffected by interventions. By identifying two sets of observational units that are similar in key covariates, the impact of interventions on the observational units can be better analyzed. For example, in a scenario where we need to analyze the impact of an intervention on a server's data retrieval performance, the observational unit is the server, the intervention could be changing the location of data storage on the server, and the key covariates could be things like server runtime. Matching can identify two sets of servers that are similar in runtime.

[0003] However, currently, the matching process mainly involves manually matching two groups of observation units that are similar in key covariates, which is time-consuming and labor-intensive. Summary of the Invention

[0004] This application provides a data processing method and related equipment that can efficiently match observation units to achieve balance on covariates.

[0005] On one hand, embodiments of this application provide a data processing method, the method comprising:

[0006] Obtain the covariates for each first observation unit in the first unit group, and obtain the covariates for each second observation unit in the second unit group; the first observation unit refers to the observation unit that has undergone intervention, and the second observation unit refers to the observation unit that has not undergone intervention; the covariates include the observation index data of the observation unit before the intervention.

[0007] Based on the observation index data of each first observation unit before the intervention operation, the predicted index results of each first observation unit after the intervention operation are obtained.

[0008] Based on the observation index data of each second observation unit before the intervention operation, the predicted index results of each second observation unit after the intervention operation of the first unit group are obtained.

[0009] Based on the prediction index results of each first observation unit and each second observation unit, the first observation units in the first unit group and the second observation units in the second unit group are matched to obtain the matching results.

[0010] On one hand, embodiments of this application provide a data processing apparatus, the apparatus comprising:

[0011] The acquisition unit is used to acquire the covariates of each first observation unit in the first unit group and the covariates of each second observation unit in the second unit group; the first observation unit refers to the observation unit that has undergone intervention, and the second observation unit refers to the observation unit that has not undergone intervention; the covariates include the observation index data of the observation unit before the intervention.

[0012] The processing unit is used to make predictions based on the observation index data of each first observation unit before the intervention operation, and to obtain the predicted index results of each first observation unit after the intervention operation.

[0013] The processing unit is also used to make predictions based on the observation index data of each second observation unit before the intervention operation, and to obtain the predicted index results of each second observation unit after the intervention operation of the first unit group.

[0014] The processing unit is also used to match the first observation unit in the first unit group and the second observation unit in the second unit group according to the prediction index results of each first observation unit and the prediction index results of each second observation unit, so as to obtain the matching result.

[0015] Specifically, when the processing unit makes predictions based on the observation index data of each first observation unit before the intervention operation, and obtains the predicted index results of each first observation unit after the intervention operation, it can be used for:

[0016] Input the observation index data of the first observation unit of the target before any intervention operation into the prediction model; the first observation unit of the target can be any one of the first unit groups;

[0017] Based on the linear parameters in the prediction model and the observation index data of the first observation unit before the intervention, the prediction of the first observation unit is performed, and the prediction index results of the first observation unit after the intervention are obtained.

[0018] Wherein, the number of first observation units in the first unit group is N, where N is a positive integer; when the processing unit matches the first observation units in the first unit group and the second observation units in the second unit group based on the prediction index results of each first observation unit and the prediction index results of each second observation unit, and obtains the matching results, it can be specifically used for:

[0019] Based on the prediction index results of the i-th first observation unit and the prediction index results of each second observation unit, determine the distance between the i-th first observation unit and each second observation unit; i is a positive integer, and i is less than or equal to N;

[0020] Based on the distance between the i-th first observation unit and each second observation unit, determine the matching second observation unit that matches the i-th first observation unit from the second unit group;

[0021] The matching results are obtained based on the matching second observation units that are matched with each first observation unit.

[0022] Specifically, when the processing unit determines the matching second observation unit from the second unit group that matches the i-th first observation unit based on the distance between the i-th first observation unit and each second observation unit, it can be used for:

[0023] Based on the distance between the i-th first observation unit and each second observation unit, select the second observation units from the second unit group whose distance is less than or equal to the distance threshold as candidate second observation units that match the i-th first observation unit;

[0024] Based on the candidate second observation units that match the i-th first observation unit, determine the matching second observation unit that matches the i-th first observation unit.

[0025] The number of candidate second observation units can be one or more. When the processing unit determines the matching second observation unit that matches the i-th first observation unit based on the candidate second observation units that match the i-th first observation unit, it can specifically be used for:

[0026] Randomly select one candidate second observation unit from the candidate second observation units that match the i-th first observation unit, and use it as the matching second observation unit that matches the i-th first observation unit; or,

[0027] Determine the minimum distance from the distances between the i-th first observation unit and each candidate second observation unit, and use the candidate second observation unit corresponding to the minimum distance as the matching second observation unit that matches the i-th first observation unit.

[0028] The acquisition unit is further used to: acquire a sample set, which includes: multiple sample observation units, sample covariates and sample labels for each sample observation unit; a sample observation unit refers to an observation unit that has not undergone intervention; sample covariates include the sample observation indicator data of the corresponding sample observation unit before intervention; sample labels include: the label indicator results of the corresponding sample observation unit after intervention in the first observation unit, and intervention prompt information, which is used to indicate whether intervention has been performed on the corresponding sample observation unit;

[0029] The processing unit is also used to train the initial prediction model based on the sample set to obtain the prediction model.

[0030] Specifically, when the processing unit trains the initial prediction model based on the sample set to obtain the prediction model, it can be used for:

[0031] The initial prediction model is invoked, and predictions are made for each sample observation unit based on the sample observation index data before the intervention operation, so as to obtain the predicted sample index data for each sample observation unit.

[0032] Based on the predicted sample index data and the label index results of each sample observation unit, the linear parameters in the initial prediction model are adjusted to obtain the prediction model.

[0033] The processing unit is also used for:

[0034] Causal effect analysis was conducted based on the index results corresponding to each first observation unit and the index results corresponding to the matching second observation units that matched each first observation unit to obtain the causal effect of the intervention operation on each first observation unit.

[0035] The indicator results corresponding to each first observation unit refer to the indicator results of each first observation unit after the intervention operation; the indicator results corresponding to the matching second observation unit refer to the indicator results of the matching second observation unit after the intervention operation was performed in the first unit group.

[0036] On one hand, embodiments of this application provide a computer device, the computer device comprising:

[0037] A processor is used to execute computer programs;

[0038] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the data processing method described above.

[0039] On one hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is loaded by a processor and executed as described above in the data processing method.

[0040] On one hand, embodiments of this application provide a computer program product, which includes a computer program or computer instructions, and the computer program or computer instructions implement the above-described data processing method when executed by a processor.

[0041] In this embodiment, covariates of each first observation unit in the first unit group and covariates of each second observation unit in the second unit group are obtained. The first observation unit refers to the observation unit that underwent intervention, and the second observation unit refers to the observation unit that did not undergo intervention. Covariates include observation index data of the observation unit before intervention. Predictions are made based on the observation index data of each first observation unit before intervention to obtain the predicted index results of each first observation unit after intervention. Predictions are also made based on the observation index data of each second observation unit before intervention to obtain the predicted index results of each second observation unit after intervention in the first unit group. Based on the predicted index results of each first observation unit and each second observation unit, the first observation units in the first unit group and the second observation units in the second unit group are matched to obtain matching results. It is evident that, for the first observation unit, the predicted indicator results after the intervention can be predicted based on the observation indicator data before the intervention. Similarly, for the second observation unit, the predicted indicator results after the intervention in the first unit group can be predicted based on the observation indicator data before the intervention. Furthermore, the predicted indicator results of the first and second observation units can be used to match the first and second observation units automatically and efficiently, thereby achieving a balance between the two matched observation units on covariates that have strong predictive significance for the indicator results. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 An architecture diagram of a data processing system provided in this application embodiment;

[0044] Figure 2 This application provides a schematic diagram of a data processing flow as an embodiment of the present application.

[0045] Figure 3 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0046] Figure 4 A schematic diagram of linear correlation provided for an embodiment of this application;

[0047] Figure 5A flowchart illustrating a data processing method provided in an embodiment of this application;

[0048] Figure 6 This is a comparative schematic diagram of a matching method provided in an embodiment of this application;

[0049] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0050] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0052] First, the technical terms involved in the embodiments of this application will be introduced.

[0053] I. Observation Unit

[0054] An observation unit refers to an individual for which data is to be collected. Such an observation unit can be an object (e.g., a user), a company, a system, a device, an application, etc. This application does not limit this in any way.

[0055] II. Intervention Group and Control Group

[0056] The intervention group can be the set of observation units that received the intervention; that is, the observation units in the intervention group are those that underwent the intervention. The control group can be the set of observation units that did not receive the intervention or maintained the original intervention. The intervention can be a product change, algorithm change, or other modification made to the observation units. Taking a company as an example, the intervention could be a modification to a certain product of the company. In this case, the intervention group is the set of companies that made the product modification, while the control group is the set of companies that did not make the product modification.

[0057] It should be understood that, in the embodiments of this application, the observation units in the intervention group can be used for causal effect analysis, and the intervention group is hereinafter referred to as the first unit group, and the observation units in the intervention group can be referred to as the first observation units; while the observation units in the control group can be divided into two groups, one group of observation units is used for model training, and this group of observation units is hereinafter referred to as the sample observation units; the other group of observation units is used for subsequent causal effect analysis, and this group of observation units is referred to as the second observation units, and this group of observation units constitutes the second unit group.

[0058] III. Covariates

[0059] Covariates refer to quantities of the observed unit that are unaffected by intervention operations, such as indicator data or performance of the observed unit that are unaffected by intervention operations. For example, if the observed unit is a server, and the intervention could be modifying the server's storage module, then the covariates could be the server's location, server model, server runtime, etc.

[0060] In the embodiments of this application, covariates include, but are not limited to, important covariates and high-dimensional covariates. Important covariates refer to the observation index data before any intervention, while high-dimensional covariates refer to the attributes of other observation units that are not affected by the intervention. For example, to study the storage performance of a server's storage module, the important covariate refers to the server's storage performance before any changes were made to the storage module, while high-dimensional covariates refer to the server's model, capacity, brand, network environment, etc.

[0061] IV. Observational Indicator Data and Forecast Indicator Results

[0062] Indicator data is used to quantify the behavior of observation units. Observation indicator data refers to the indicator performance obtained by pre-observing and quantifying the behavior of observation units before any intervention is carried out. For example, observation indicator data can be the storage performance of a server obtained by pre-observing and quantifying the server before any intervention is carried out.

[0063] Predictive index results refer to the prediction of the index performance of each observation unit under control conditions based on a certain model. In other words, predictive index results are obtained by using a model to predict the index performance of the observation unit. However, it should be noted that the predictive index results obtained by using a model to predict the index performance of the observation unit here mean that the predicted index performance of the observation unit is assumed to be without intervention, but in fact, the observation unit has undergone intervention.

[0064] In this embodiment, the predicted index results can also be referred to as estimated scores. For each observation unit, there is a strong linear correlation between the observation index data before the intervention and the index results after the intervention. Therefore, the observation index data before the intervention has a good predictive effect on the index results after the intervention. By utilizing this characteristic, the differences of important covariates in the intervention group and the control group can be captured better, thereby achieving better matching between observation units.

[0065] V. Matching

[0066] Matching refers to a data processing method that pairs observation units in the intervention and control groups. The goal is to obtain two groups of observation units with consistent distributions on covariates and high comparability. Consistent distributions on covariates mean that the two groups of observation units show similar or identical results for the covariates.

[0067] In this embodiment, the first observation unit in the first unit group can be matched with the second observation unit in the second unit group to obtain two sets of observation units that are consistent and comparable in distribution on covariates. For example, if the predicted index result of the first observation unit 1 in the first unit group is similar to or the same as the predicted index result of the second observation unit A in the second unit group, then it can be determined that the first observation unit 1 and the second observation unit A are matched. By matching, the two sets of observation units can be better matched and balanced on covariates that have a strong predictive significance for the result index, thereby achieving a better balance.

[0068] VI. Causal Effect Inference

[0069] Causal effect inference refers to the process of inferring the changes in indicator data brought about by intervention on two groups of observation units after they have been matched and balanced on covariates that have a strong predictive significance for the outcome indicators.

[0070] This application provides a data processing scheme that leverages the predictive power of observational indicator data from observational units before intervention to forecast post-intervention results. It uses observational indicator data from units before intervention as covariates to predict post-intervention results (i.e., predicted scores). These predicted results are then used as a matching criterion to match two groups of observational units that exhibit consistent distributions and high comparability across key covariates. This efficient matching of observational units and the ability to achieve a good balance between the two groups across key covariates allow for more accurate causal effect assessments through analysis of the matched groups.

[0071] Specifically, this application provides a first unit group and a second unit group. The first observation unit in the first unit group refers to an observation unit that underwent intervention, and the second observation unit in the second unit group refers to an observation unit that did not undergo intervention. For each first observation unit, based on its observation index data before intervention, a prediction is made for the first observation unit to obtain a predicted index result after intervention. For each second observation unit, based on its observation index data before intervention, a prediction is made for the second observation unit to obtain a predicted index result after intervention in the first unit group. Then, based on the predicted index results of each first and second observation unit, each first observation unit in the first unit group and each second observation unit in the second unit group are matched to obtain a matching result. The matching result may include second observation units matched with each first observation unit. Further, causal effect inference analysis can be performed based on the matching result. It should be understood that the predictive index results of the first observation unit and the predictive index results of the second observation unit are "counterfactual" predictive index results. The so-called "counterfactual" refers to the index performance under the assumption that no intervention operation was carried out.

[0072] As can be seen, the data processing scheme provided in this application embodiment can use the observation index data of the observation unit before the intervention operation as a covariate, and predict the observation unit based on the observation index data before the intervention operation, thereby obtaining the predicted index result of the observation unit. In this way, the predicted index result of the first observation unit can be predicted based on the observation index data before the intervention operation, and the predicted index result of the first observation unit after the intervention operation can be predicted based on the observation index data before the intervention operation. In this way, by comparing the predicted index result of the first observation unit and the predicted index result of the second observation unit, the balance of the two matched observation units on the covariate can be better achieved, the matching accuracy between the observation units can be improved, and thus a more accurate causal effect inference analysis can be obtained.

[0073] It should be understood that the data processing scheme provided in this application embodiment can be applied to various data platform products, and can also be used as a data preprocessing method in many data analyses in industry, academia, etc. For example, in the operation and management scenario in industry, supply chain management can be intervened to conduct causal effect inference analysis. Intervention, such as reducing supply chain nodes, can be used. In this case, the first observation unit in the first unit group can be the supply chain that has reduced supply chain nodes, and the second observation unit in the second unit group can be the supply chain that has not reduced supply chain nodes. The covariate can be the execution completion time (observation index data) before the operation of reducing supply chain nodes. The data processing scheme provided in this application embodiment can use the execution completion time of the first observation unit before the operation of reducing supply chain nodes to predict the first observation unit and obtain the predicted execution completion time (prediction index result) of the first observation unit. Similarly, it can use the execution completion time of the second observation unit before the operation of reducing supply chain nodes to predict the second observation unit and obtain the predicted execution completion time of the second observation unit. In this way, the first observation unit and the second observation unit matched by the predicted execution completion time of the first observation unit and the predicted execution completion time of the second observation unit can achieve a balance in terms of the execution completion time before the operation of reducing supply chain nodes. Furthermore, based on the matched first and second observation units, we can analyze the changes that reducing supply chain nodes brings to the supply chain.

[0074] The data processing system provided in the embodiments of this application will be described in detail below.

[0075] Please see Figure 1 This is an architecture diagram of a data processing system provided in an embodiment of this application. The data processing system may include: a terminal device 101 and a server 102; this application does not limit the number of terminal devices, and of course, the number of servers can also be multiple. The terminal device 101 and the server 102 in the data processing system can be directly or indirectly connected via wired or wireless communication. Wherein:

[0076] Terminal device 101 can be a device used by the object of analysis, which refers to users, companies, etc., who want to infer causal effects. In this embodiment, terminal device 101 can provide an input interface for causal effect inference, in which the object of analysis can input the observation unit to be observed, as well as the intervention operations to be performed on the observation unit, etc. Terminal device 101 may include, but is not limited to, smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, in-vehicle terminals, smart wearable devices, etc.

[0077] Server 102 can provide various data processing services to terminal device 101, such as intervening in the observation unit. Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0078] In one embodiment, the data processing flow provided by this application embodiment is explained in conjunction with the interaction between terminal device 101 and server 102. Please refer to [link to relevant documentation]. Figure 2 The data processing flow mainly includes the following steps:

[0079] (1) Model Training

[0080] ① Terminal device 101 can obtain a sample set from server 102. In this embodiment, the observation units can be divided into two groups: an intervention group and a control group. Server 102 can obtain a sample set from the observation units in the control group and return it to terminal device 101. The sample set includes: multiple sample observation units, sample covariates and sample labels for each sample observation unit; a sample observation unit refers to an observation unit that has not undergone intervention; sample covariates include the sample observation index data of the corresponding sample observation unit before intervention; sample labels include: intervention prompt information and the label index results of the corresponding sample observation unit after intervention in the first observation unit in the first unit group. The intervention prompt information is used to indicate whether the corresponding sample observation unit has undergone intervention. Schematic, the intervention prompt information can be represented by 0 or 1. When the intervention prompt information is 0, it indicates that the corresponding sample observation unit has not undergone intervention; when the intervention prompt information is 1, it indicates that the corresponding sample observation unit has undergone intervention.

[0081] ② The terminal device 101 inputs the sample set into an initial prediction model, trains the initial prediction model, and obtains a prediction model. The prediction model can be a linear model, or it can be implemented in other complex forms, such as random forests, Lasso regression, Ridge regression, neural networks, etc. This application embodiment does not impose any limitations on this.

[0082] (2) Prediction

[0083] ① Terminal device 101 can obtain observation units from the intervention group to form a first unit group, and obtain the covariates of each first observation unit in the first unit group; similarly, it can obtain observation units from the control group to form a second unit group, and obtain the covariates of each second observation unit in the second unit group. The covariates include the observation index data of the observation units before the intervention operation.

[0084] ② The terminal device 101 calls the prediction model obtained from training, and based on the observation index data of the first observation unit in the first unit group before the intervention operation, predicts the first observation unit in the first unit group to obtain the predicted index result of the first observation unit after the intervention operation; and calls the prediction model obtained from training, and based on the observation index data of the second observation unit in the second unit group before the intervention operation, predicts the second observation unit in the second unit group to obtain the predicted index result of the second observation unit after the intervention operation in the second unit group.

[0085] (3) Matching

[0086] Terminal device 101, based on the prediction index results of each first observation unit and each second observation unit, uses a matching engineering process to find first and second observation units that are approximately similar in terms of the prediction index results. The found first and second observation units are the matched observation units. The matching engineering process defines matching rules, which are used to find first and second observation units that are approximately similar in terms of the prediction index results.

[0087] (4) Analysis

[0088] Based on the index results of the matched first and second observation units, the terminal device 101 performs causal effect inference analysis to obtain the causal effect inference results of the intervention on the observation units.

[0089] It should be noted that in step (2), the predicted index results of the first observation unit and the predicted index results of the second observation unit are the performance of the index results under the assumption that no intervention operation was performed. That is to say, for the first observation unit, a "counterfactual" predicted index result needs to be constructed, that is, what the index of the first observation unit would be if no intervention operation existed. The index result in step (4) is the actual index performance after the intervention operation, which is the actual index result. By constructing a "counterfactual" predicted index result in step (2), a balance can be achieved on the covariates when matching observation units, that is, the distribution of index performance on the covariates can be effectively guaranteed to be consistent. Then, step (4) can analyze the impact of the intervention on the index changes of the observation units based on the index results, thereby improving the accuracy of causal effect inference.

[0090] In summary, this application embodiment predicts the first observation unit in the first unit group using the observation index data of the first observation unit before intervention, thus obtaining the predicted index result of the first observation unit after intervention. Similarly, it predicts the second observation unit in the second unit group using the observation index data of the second observation unit before intervention, thus obtaining the predicted index result of the second observation unit after intervention in the first unit group. This allows for a balance on important covariates based on the predicted index result of the first observation unit and the index result of the second observation unit, improving the accuracy of matching between observation units.

[0091] It should be noted that the above data processing interaction process is for illustrative purposes only and does not limit the specific execution process of the terminal device and the server. Optionally, the server 102 can train a prediction model, and the terminal device 101 can call the prediction model trained by the server 102 to predict the first observation unit and the second observation unit, thereby matching the first observation unit and the second observation unit. Optionally, the server 102 can also train a prediction model and perform observation unit matching.

[0092] It is understood that the system architecture diagrams described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0093] Please see Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The data processing method can be executed by a computer device, which can be a terminal device or a server in the aforementioned system. The data processing method may include the following steps S301-S304:

[0094] S301. Obtain the covariates of each first observation unit in the first unit group and obtain the covariates of each second observation unit in the second unit group; the first observation unit refers to the observation unit that has undergone intervention, and the second observation unit refers to the observation unit that has not undergone intervention; the covariates include the observation index data of the observation unit before the intervention.

[0095] The first unit group can include multiple first observation units, and the second unit group can include multiple second observation units. Covariates can include important (or critical) covariates and high-dimensional covariates. Important covariates include the observation indicator data of the observation units before any intervention. For example, the observation unit is a device, and the intervention could be an operation that changes the location of data storage within the device. The first observation unit refers to the device whose data storage location was changed, and the second observation unit refers to the device whose data storage location was not changed. The observation indicator data could be data read speed, server runtime, etc.

[0096] In one implementation, the control group and intervention group provided in this application embodiment are as follows: the observation units in the control group have not undergone intervention operations, while the observation units in the intervention group have undergone intervention operations. The first unit group and the second unit group are obtained as follows: the first unit group can be constructed by obtaining observation units from the intervention group, and the second unit group can be constructed by obtaining observation units from the control group.

[0097] S302. Based on the observation index data of each first observation unit before the intervention operation, make predictions to obtain the predicted index results of each first observation unit after the intervention operation.

[0098] It should be understood that, for each first observation unit, the indicator results after the intervention can be predicted based on the observation indicator data of that first observation unit before the intervention. The predicted indicator results refer to the indicator performance assuming no intervention. For ease of description, the target first observation unit in the first unit group will be used as an example. The target first observation unit is any first observation unit in the first unit group; that is, any observation unit in the first unit group can refer to the target first observation unit to obtain the predicted indicator results after the intervention.

[0099] In one implementation, there is a strong linear correlation between the observation index data of the observation unit before the intervention and the index results after the intervention. Therefore, the specific implementation of step S302 may include: obtaining the linear parameter between the observation index data before the intervention and the index results after the intervention; predicting the target first observation unit based on the linear parameter and the observation index data of the target first observation unit before the intervention; and obtaining the predicted index results of the target first observation unit after the intervention.

[0100] In another implementation, a prediction model can be pre-trained. The specific implementation of step S302 may include: inputting the observation index data of the first observation unit before the intervention operation into the prediction model; calling the prediction model, and making a prediction on the first observation unit based on the observation index data of the first observation unit before the intervention operation, to obtain the prediction index result of the first observation unit after the intervention operation.

[0101] In real-world scenarios, covariates often show little difference between the intervention and control groups. However, there is a strong linear correlation between the performance indicators before and after the intervention. In other words, there is a strong linear correlation between the observed indicator data before and after the intervention. The linear correlation coefficient is defined as follows: The linear correlation coefficient measures the linear correlation between two variables (i.e., the observed index data before the intervention and the predicted index results after the intervention in this application). The linear correlation coefficient is calculated by dividing the covariance (Cov(P,Q)) of the two variables by the product of their respective standard deviations (SD(P) and SD(Q)). The closer the absolute value of this coefficient is to 1, the stronger the linear correlation. Figure 4 In the graph, the horizontal axis represents the absolute linear correlation coefficient between each covariate of the observation unit and the predicted indicator results after the intervention, which is a number between 0 and 1. The vertical axis represents the absolute standardized differences of each covariate of the observation unit, revealing a strong linear correlation between the indicator performance of the observation unit before and after the intervention.

[0102] Therefore, this application can use the pre-intervention performance of the observation unit as a covariate to predict the post-intervention performance of the observation unit. This post-intervention performance can then be used as a basis for matching between observation units, effectively capturing the differences in the most important covariates between the intervention group (i.e., the first unit group) and the control group (i.e., the second unit group). Based on this, the prediction model in this application can be a linear model (such as a linear regression model). A linear model can better summarize the pre-intervention and post-intervention performance of the observation unit, and using a simple linear model requires only one calculation step to obtain the result, thus reducing computational costs to some extent. In this case, calling the prediction model and predicting the post-intervention performance of the target first observation unit based on its pre-intervention observation data can include: predicting the target first observation unit based on the linear parameters in the prediction model and its pre-intervention observation data to obtain the post-intervention performance of the target first observation unit. The predicted index result of any first observation unit after the intervention operation can be expressed as:

[0103]

[0104] Among them, s i X represents the predicted index result of the i-th first observation unit after the intervention operation. i Let X represent the covariate of the i-th first observation unit. i ∈R d It is a d-dimensional covariate, which includes the observation index data of the first observation unit before any intervention. Represents the predictive model; where, For linear parameters in the prediction model, It is the covariate matrix of the sample set; that is, the covariate matrix is ​​composed of the covariates of multiple sample observation units in the sample set. It is the vector of sample index results after the sample set has undergone intervention operations in the first observation unit.

[0105] Alternatively, the prediction model can also be implemented in other complex forms, such as random forest, Lasso regression, Ridge regression, neural network, etc.

[0106] S303. Based on the observation index data of each second observation unit before the intervention operation, make predictions to obtain the predicted index results of each second observation unit after the intervention operation of the first unit group.

[0107] It should be understood that, for each second observation unit, the indicator results after the intervention can be predicted based on the observation indicator data of that second observation unit before the intervention. The predicted indicator results refer to the indicator performance assuming no intervention. For ease of description, the target second observation unit in the second unit group will be used as an example. The target second observation unit is any second observation unit in the second unit group; that is, any second observation unit in the second unit group can refer to the target second observation unit to obtain the predicted indicator results of the first unit group after the intervention.

[0108] In one implementation, step S303 may include: obtaining the linear parameter between the observation index data before the intervention and the index results after the intervention; predicting the target second observation unit based on the linear parameter and the observation index data of the target second observation unit before the intervention; and obtaining the predicted index results of the target second observation unit after the intervention in the first unit group.

[0109] In another implementation, step S303 may include: inputting the observation index data of the target second observation unit before intervention into the prediction model; then calling the prediction model to predict the target second observation unit based on the observation index data before intervention, thereby obtaining the predicted index results of the target second observation unit after intervention in the first unit group. Specifically, prediction can be made based on the linear parameters in the prediction model and the observation index data of the target second observation unit before intervention, thereby obtaining the predicted index results of the target second observation unit after intervention in the first unit group.

[0110] It should be understood that, in addition to using the performance of indicators before intervention as important covariates in the prediction model, the embodiments of this application can also use other indicators as high-dimensional covariates to reduce dimensionality. This ensures that the predicted indicator results of the first observation unit and the second observation unit are a one-dimensional balance, allowing subsequent matched observation units to achieve a balance between important and high-dimensional covariates. In other words, in the embodiments of this application, the covariates of the first observation unit (i.e., important and high-dimensional covariates) can be input into the prediction model to predict the first observation unit, and the covariates of the second observation unit can be input into the prediction model to predict the second observation unit. This ensures that, based on the predicted indicator results of the first and second observation units, the matched first and second observation units can achieve a balance in both important and high-dimensional covariates.

[0111] S304. Based on the prediction index results of each first observation unit and the prediction index results of each second observation unit, match the first observation units in the first unit group and the second observation units in the second unit group to obtain the matching results.

[0112] In this embodiment, a matching engineering process can be used to find approximately or identical first and second observation units based on the prediction index results of the first observation unit and the prediction index results of each second observation unit. In one implementation, the matching engineering process defines matching rules that are direct comparisons. Therefore, the prediction index results of the first observation unit can be directly compared with the prediction index results of each second observation unit. If there are first and second observation units with identical prediction index results, then it can be determined that the first and second observation units with identical prediction index results are matched.

[0113] In another implementation, the matching rule defines nearest neighbor matching. Nearest neighbor matching is a technique for finding the point in a dataset that is most similar to the query point (in this application, the first observation unit). Specifically, for each first observation unit, it is necessary to select second observation units from the second observation units that match the first observation unit. Let N be the number of first observation units in the first unit group, where N is a positive integer. The specific implementation of step S304 may include the following steps 1-3:

[0114] Step 1: Based on the prediction index results of the i-th first observation unit and the prediction index results of each second observation unit, determine the distance between the i-th first observation unit and each second observation unit; i is a positive integer, and i is less than or equal to N.

[0115] In one implementation, the predicted index result of the i-th first observation unit and the predicted index result of each second observation unit are subtracted to obtain the index difference between the i-th first observation unit and each second observation unit. The absolute value of the index difference between the i-th first observation unit and each second observation unit is then taken to obtain the distance between the i-th first observation unit and each second observation unit.

[0116] The distance between the i-th first observation unit and the i-th second observation unit can be expressed as: This represents the prediction index result of the i-th second observation unit in the second unit group. If the number of second observation units in the second unit group is M, then i is less than or equal to M, where M is a positive integer. represents the prediction index result of the i-th first observation unit; || represents taking the absolute value. It should be understood that M and N can be the same or different, and M and N can be set according to requirements. This application embodiment does not impose any limitations on this.

[0117] Step 2: Based on the distance between the i-th first observation unit and each second observation unit, determine the matching second observation unit from the second unit group that matches the i-th first observation unit.

[0118] In this embodiment, a distance threshold c can be predefined according to requirements. This distance threshold is used to select second observation units from the second unit group that are similar to or close to the pre-index results of the i-th first observation unit as the second observation unit i matched with the i-th first observation unit. c In other words, the selected second observation unit can make the matching second observation unit i c Element that is no more than c in distance from the i-th first observation unit, that is, a unit whose distance from the first observation unit is not more than c. Specifically, step 2 may include: ① Based on the distance between the i-th first observation unit and each second observation unit, selecting second observation units from the second unit group whose distance is less than or equal to a distance threshold as candidate second observation units matching the i-th first observation unit. Specifically, it can be determined whether the distance between the i-th first observation unit and each second observation unit is less than or equal to the distance threshold. If the distance between the i-th first observation unit and a certain second observation unit is less than or equal to the distance threshold, it indicates that the i-th first observation unit is similar to or close to a certain second observation unit, and this second observation unit can be used as a candidate second observation unit matching the i-th first observation unit. The number of candidate second observation units can be one or more. If the distance between the i-th first observation unit and a certain second observation unit is greater than the distance threshold, it indicates that the i-th first observation unit is dissimilar to or different from a certain second observation unit. ② Based on the candidate second observation units matching the i-th first observation unit, determine the matching second observation units matching the i-th first observation unit.

[0119] The determination of the matching second observation unit that matches the i-th first observation unit, based on the candidate second observation unit that matches the i-th first observation unit, can include the following methods:

[0120] Method 1: Directly determine the candidate second observation unit that matches the i-th first observation unit as the matching second observation unit that matches the i-th first observation unit.

[0121] Method 2: The number of candidate second observation units is one or more. A candidate second observation unit can be randomly selected from one or more candidate second observation units as the matching second observation unit that matches the i-th first observation unit.

[0122] Method 3: Determine the minimum distance among the distances between the i-th first observation unit and each candidate second observation unit, and use the candidate second observation unit corresponding to the minimum distance as the matching second observation unit that matches the i-th first observation unit. For example, if the distance between the i-th first observation unit and candidate second observation unit 1 is greater than the distance between the i-th first observation unit and candidate second observation unit 2, then candidate second observation unit 2 can be determined as the matching second observation unit that matches the i-th first observation unit.

[0123] Step 3: Obtain the matching result based on the matching second observation units that are matched with each first observation unit.

[0124] Optionally, after obtaining the matching results, a causal effect analysis can be performed based on the indicator results corresponding to each first observation unit and the indicator results corresponding to the matched second observation units that are matched with each first observation unit to obtain the causal effect of the intervention on each first observation unit. Here, the indicator results corresponding to each first observation unit refer to the indicator results of each first observation unit after the intervention, that is, the indicator performance brought to the first observation unit after the actual intervention. The indicator results corresponding to the matched second observation units refer to the indicator results of the matched second observation units after the intervention in the first unit group, that is, the indicator performance of the matched second observation units after the actual intervention in the first unit group.

[0125] In this embodiment, covariates of each first observation unit in the first unit group and covariates of each second observation unit in the second unit group are obtained. The first observation unit refers to the observation unit that underwent intervention, and the second observation unit refers to the observation unit that did not undergo intervention. Covariates include observation index data of the observation unit before intervention. Based on the observation index data of the target first observation unit in the first unit group before intervention, predictions are made for the target first observation unit to obtain the predicted index results of the target first observation unit after intervention. The target first observation unit is any first observation unit in the first unit group. Based on the observation index data of the target second observation unit in the second unit group before intervention, predictions are made for the target second observation unit to obtain the predicted index results of the target second observation unit after intervention in the first unit group. The target second observation unit is any second observation unit in the second unit group. Based on the predicted index results of each first observation unit and each second observation unit, each first observation unit in the first unit group and each second observation unit in the second unit group are matched to obtain a matching result. As can be seen, in this embodiment, for the first observation unit, the predicted indicator result of the first observation unit after the intervention operation can be predicted based on the observation indicator data before the intervention operation. For the second observation unit, the predicted indicator result of the second observation unit after the intervention operation in the first unit group can be predicted based on the observation indicator data before the intervention operation. Then, the predicted indicator results of the first observation unit and the second observation unit are matched by the predicted indicator results of the second observation unit. This can automatically and efficiently match the observation units and better achieve the balance of the two matched observation units on the covariates that have strong predictive significance for the indicator results, thereby improving the matching accuracy between the observation units.

[0126] Please see Figure 5This is a flowchart illustrating a model training method provided in an embodiment of this application. The model training method can be executed by a computer device, which can be a terminal device or a server. The data processing method may include the following steps S501-S502:

[0127] S501. Obtain a sample set, which includes: multiple sample observation units, sample covariates and sample labels for each sample observation unit; a sample observation unit refers to an observation unit that has not undergone intervention.

[0128] In this embodiment, for each sample observation unit, data related to that sample observation unit can be obtained, including the sample covariates and sample labels for each sample observation unit. The sample covariates can be d-dimensional covariates, and let Z represent the sample covariates of the i-th sample observation unit. i Z i ∈R d The sample covariates include the sample observation index data of the corresponding sample observation unit before the intervention operation; the sample labels include: the label index results of the corresponding sample observation unit after the intervention operation of the first observation unit in the first unit group, and the intervention prompt information, which is used to indicate whether the corresponding sample observation unit has performed the intervention operation. The label index result of the i-th sample observation unit after the intervention operation of the first observation unit in the first unit group can be represented as Y. i Y i ∈R; the intervention prompt information of the i-th sample observation unit can be represented as T i T i ∈{0,1}; if T i If T is 1, it means that the i-th sample observation unit has undergone an intervention operation; if T i If the value is 0, it means that no intervention operation was performed on the i-th sample observation unit.

[0129] S502. Based on the sample set, train the initial prediction model to obtain the prediction model.

[0130] Specifically, the sample set can be input into the initial prediction model for model training, using f:R d →R represents the initial prediction model, and f represents the initial prediction model. That is, in this embodiment, the sample covariates of each sample observation unit in the sample set are used as the input to the initial prediction model, and the prediction index results of the sample observation units are used as the output, to train a prediction model. In one implementation, step S402 can be implemented by: calling the initial prediction model, predicting each sample observation unit based on the sample observation index data of each sample observation unit before the intervention operation, and obtaining the predicted sample index data of each sample observation unit; then adjusting the initial prediction model according to the predicted sample index data of each sample observation unit and the label index results of each sample observation unit to obtain the prediction model.

[0131] When the prediction model is a linear model, the initial prediction model is also a linear model. Based on the predicted sample index data and label index results of each sample observation unit, the initial prediction model is adjusted to obtain the following prediction model: The linear parameters in the initial prediction model are adjusted based on the predicted sample index data and label index results of each sample observation unit. This initial prediction model can be expressed as f(Z) = βZ; where... This represents the index result vector of the sample set after the intervention operation in the first unit group, where the initial prediction model is the model itself. β is the linear parameter in the initial prediction model. It is a covariate matrix composed of the covariates of each observation unit in the sample set. When the prediction model is trained, the linear parameters in the prediction model can be... Among them, Z T In this context, T represents transpose.

[0132] In this embodiment, a sample set is obtained, which includes: multiple sample observation units, sample covariates for each sample observation unit, and sample labels. A sample observation unit refers to an observation unit that has not undergone intervention. Sample covariates include the sample observation index data of the corresponding sample observation unit before intervention. Sample labels include: the label index results of the corresponding sample observation unit after intervention in the first observation unit within the first unit group, and intervention prompt information, which indicates whether intervention has been performed on the corresponding sample observation unit. Based on the sample set, an initial prediction model is trained to obtain the prediction model. As can be seen, this embodiment utilizes the covariates of the sample observation units to train the initial prediction model. This enables the trained prediction model to predict the index changes of the observation units under the assumption of no intervention, thus facilitating better capture of the differences in index results between the first and second unit groups on the most important covariates.

[0133] It should be understood that in a real-world scenario where the impact of intervention on the indicator results of the observation unit is known, propensity score matching and the data processing method provided in the embodiments of this application were used for matching. For example... Figure 6This is a comparative schematic diagram of a matching method provided in an embodiment of this application. Figure 6 The diagram illustrates the distribution of two matching methods (estimated causal statistic after matching - true causal effect) / (standard error). The thin solid line represents the propensity score matching result, the thick solid line represents the matching result obtained using the data processing method provided in this application, and the black dashed line represents the standard normal distribution. A distribution closer to the standard normal distribution indicates a smaller error and more accurate variance estimation when using the two matched observation units for causal analysis, thus ensuring the accuracy of causal effect inference to a certain extent. The data processing method provided in this application can estimate the causal effect without bias, but the propensity score matching will severely underestimate the policy effect.

[0134] In summary, in real-world scenarios, if the distributions of important covariates are relatively similar in the intervention and control groups, it is more effective to use the observation data before the intervention as important covariates to construct a predictive model, and then use the predicted index results from the predictive model to match and infer causal effects.

[0135] The text processing apparatus provided in the embodiments of this application will be described in detail below.

[0136] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. The data processing device can be a computer program within a computer device, such as application software within the computer device; the data processing device can be used to execute... Figure 3 or Figure 5 Some or all of the steps in the method embodiments shown. Please refer to [link / reference]. Figure 7 The data processing device includes the following units:

[0137] Acquisition unit 701 is used to acquire the covariates of each first observation unit in the first unit group and the covariates of each second observation unit in the second unit group; the first observation unit refers to the observation unit that has undergone intervention, and the second observation unit refers to the observation unit that has not undergone intervention; the covariates include the observation index data of the observation unit before the intervention.

[0138] Processing unit 702 is used to make predictions based on the observation index data of each first observation unit before the intervention operation, and to obtain the predicted index results of each first observation unit after the intervention operation.

[0139] The processing unit 702 is also used to make predictions based on the observation index data of each second observation unit before the intervention operation, and to obtain the predicted index results of each second observation unit after the intervention operation of the first unit group.

[0140] The processing unit 702 is further configured to match the first observation unit in the first unit group and the second observation unit in the second unit group based on the prediction index results of each first observation unit and the prediction index results of each second observation unit, and obtain a matching result.

[0141] Specifically, when processing unit 702 makes predictions based on the observation index data of each first observation unit before the intervention operation, and obtains the predicted index results of each first observation unit after the intervention operation, it can be used for:

[0142] Input the observation index data of the first observation unit of the target before any intervention operation into the prediction model; the first observation unit of the target can be any one of the first unit groups;

[0143] Based on the linear parameters in the prediction model and the observation index data of the first observation unit before the intervention, the prediction of the first observation unit is performed, and the prediction index results of the first observation unit after the intervention are obtained.

[0144] Wherein, the number of first observation units in the first unit group is N, where N is a positive integer; when processing unit 702 matches the first observation units in the first unit group and the second observation units in the second unit group according to the prediction index results of each first observation unit and the prediction index results of each second observation unit, it can be specifically used for:

[0145] Based on the prediction index results of the i-th first observation unit and the prediction index results of each second observation unit, determine the distance between the i-th first observation unit and each second observation unit; i is a positive integer, and i is less than or equal to N;

[0146] Based on the distance between the i-th first observation unit and each second observation unit, determine the matching second observation unit that matches the i-th first observation unit from the second unit group;

[0147] The matching results are obtained based on the matching second observation units that are matched with each first observation unit.

[0148] Specifically, when processing unit 702 determines the matching second observation unit from the second unit group that matches the i-th first observation unit based on the distance between the i-th first observation unit and each second observation unit, it can be used to:

[0149] Based on the distance between the i-th first observation unit and each second observation unit, select the second observation units from the second unit group whose distance is less than or equal to the distance threshold as candidate second observation units that match the i-th first observation unit;

[0150] Based on the candidate second observation units that match the i-th first observation unit, determine the matching second observation unit that matches the i-th first observation unit.

[0151] Wherein, the number of candidate second observation units is one or more, and when the processing unit 702 determines the matching second observation unit that matches the i-th first observation unit based on the candidate second observation units that match the i-th first observation unit, it can be specifically used for:

[0152] Randomly select one candidate second observation unit from the candidate second observation units that match the i-th first observation unit, and use it as the matching second observation unit that matches the i-th first observation unit; or,

[0153] Determine the minimum distance from the distances between the i-th first observation unit and each candidate second observation unit, and use the candidate second observation unit corresponding to the minimum distance as the matching second observation unit that matches the i-th first observation unit.

[0154] The acquisition unit 701 is further configured to: acquire a sample set, which includes: multiple sample observation units, sample covariates and sample labels for each sample observation unit; a sample observation unit refers to an observation unit that has not undergone intervention; the sample covariates include the sample observation indicator data of the corresponding sample observation unit before intervention; the sample labels include: the label indicator results of the corresponding sample observation unit after intervention in the first observation unit, and intervention prompt information, which is used to indicate whether intervention has been performed on the corresponding sample observation unit;

[0155] The processing unit 702 is also used to train the initial prediction model based on the sample set to obtain the prediction model.

[0156] Specifically, when processing unit 702 trains the initial prediction model based on the sample set to obtain the prediction model, it can be used for:

[0157] The initial prediction model is invoked, and predictions are made for each sample observation unit based on the sample observation index data before the intervention operation, so as to obtain the predicted sample index data for each sample observation unit.

[0158] Based on the predicted sample index data and the label index results of each sample observation unit, the linear parameters in the initial prediction model are adjusted to obtain the prediction model.

[0159] The processing unit 702 is further configured to:

[0160] Causal effect analysis was conducted based on the index results corresponding to each first observation unit and the index results corresponding to the matching second observation units that matched each first observation unit to obtain the causal effect of the intervention operation on each first observation unit.

[0161] The indicator results corresponding to each first observation unit refer to the indicator results of each first observation unit after the intervention operation; the indicator results corresponding to the matching second observation unit refer to the indicator results of the matching second observation unit after the intervention operation was performed in the first unit group.

[0162] In this embodiment, covariates of each first observation unit in the first unit group and covariates of each second observation unit in the second unit group are obtained. The first observation unit refers to the observation unit that underwent intervention, and the second observation unit refers to the observation unit that did not undergo intervention. Covariates include observation index data of the observation unit before intervention. Predictions are made based on the observation index data of each first observation unit before intervention to obtain the predicted index results of each first observation unit after intervention. Predictions are also made based on the observation index data of each second observation unit before intervention to obtain the predicted index results of each second observation unit after intervention in the first unit group. Based on the predicted index results of each first observation unit and each second observation unit, the first observation units in the first unit group and the second observation units in the second unit group are matched to obtain matching results. It is evident that, for the first observation unit, the predicted indicator results after the intervention can be predicted based on the observation indicator data before the intervention. Similarly, for the second observation unit, the predicted indicator results after the intervention in the first unit group can be predicted based on the observation indicator data before the intervention. Furthermore, the predicted indicator results of the first and second observation units can be used to match the first and second observation units automatically and efficiently, thereby achieving a balance between the two matched observation units on covariates that have strong predictive significance for the indicator results.

[0163] The computer device provided in the embodiments of this application will be described in detail below.

[0164] Furthermore, this application also provides a schematic diagram of the structure of a computer device, which can be found in [reference needed]. Figure 8The computer device may include a processor 801, an input device 802, an output device 803, and a memory 804. The processor 801, input device 802, output device 803, and memory 804 are connected via a bus. The memory 804 stores computer programs, which include program instructions. The processor 801 executes the program instructions stored in the memory 804. By running the program instructions stored in the memory 804, the processor 801 performs the following operations:

[0165] Obtain the covariates for each first observation unit in the first unit group, and obtain the covariates for each second observation unit in the second unit group; the first observation unit refers to the observation unit that has undergone intervention, and the second observation unit refers to the observation unit that has not undergone intervention; the covariates include the observation index data of the observation unit before the intervention.

[0166] Based on the observation index data of each first observation unit before the intervention operation, the predicted index results of each first observation unit after the intervention operation are obtained.

[0167] Based on the observation index data of each second observation unit before the intervention operation, the predicted index results of each second observation unit after the intervention operation of the first unit group are obtained.

[0168] Based on the prediction index results of each first observation unit and each second observation unit, the first observation units in the first unit group and the second observation units in the second unit group are matched to obtain the matching results.

[0169] Specifically, when the processor 801 makes predictions based on the observation index data of each first observation unit before the intervention operation, and obtains the predicted index results of each first observation unit after the intervention operation, it can perform the following operations:

[0170] Input the observation index data of the first observation unit of the target before any intervention operation into the prediction model; the first observation unit of the target can be any one of the first unit groups;

[0171] Based on the linear parameters in the prediction model and the observation index data of the first observation unit before the intervention, the prediction of the first observation unit is performed, and the prediction index results of the first observation unit after the intervention are obtained.

[0172] Wherein, the number of first observation units in the first unit group is N, where N is a positive integer; when the processor 801 matches the first observation units in the first unit group and the second observation units in the second unit group according to the prediction index results of each first observation unit and the prediction index results of each second observation unit, and obtains the matching results, it can specifically perform the following operations:

[0173] Based on the prediction index results of the i-th first observation unit and the prediction index results of each second observation unit, determine the distance between the i-th first observation unit and each second observation unit; i is a positive integer, and i is less than or equal to N;

[0174] Based on the distance between the i-th first observation unit and each second observation unit, determine the matching second observation unit that matches the i-th first observation unit from the second unit group;

[0175] The matching results are obtained based on the matching second observation units that are matched with each first observation unit.

[0176] Specifically, when the processor 801 determines the matching second observation unit from the second unit group that matches the i-th first observation unit based on the distance between the i-th first observation unit and each second observation unit, it can perform the following operations:

[0177] Based on the distance between the i-th first observation unit and each second observation unit, select the second observation units from the second unit group whose distance is less than or equal to the distance threshold as candidate second observation units that match the i-th first observation unit;

[0178] Based on the candidate second observation units that match the i-th first observation unit, determine the matching second observation unit that matches the i-th first observation unit.

[0179] The number of candidate second observation units can be one or more. When the processor 801 determines the matching second observation unit that matches the i-th first observation unit based on the candidate second observation units that match the i-th first observation unit, it can specifically perform the following operations:

[0180] Randomly select one candidate second observation unit from the candidate second observation units that match the i-th first observation unit, and use it as the matching second observation unit that matches the i-th first observation unit; or,

[0181] Determine the minimum distance from the distances between the i-th first observation unit and each candidate second observation unit, and use the candidate second observation unit corresponding to the minimum distance as the matching second observation unit that matches the i-th first observation unit.

[0182] The processor 801 can also perform the following operations:

[0183] Obtain a sample set, which includes: multiple sample observation units, sample covariates and sample labels for each sample observation unit; a sample observation unit refers to an observation unit that has not undergone intervention; sample covariates include the sample observation indicator data of the corresponding sample observation unit before intervention; sample labels include: the label indicator results of the corresponding sample observation unit after intervention in the first observation unit, and intervention prompt information, which is used to indicate whether intervention has been performed on the corresponding sample observation unit.

[0184] Based on the sample set, the initial prediction model is trained to obtain the prediction model.

[0185] When the processor 801 trains the initial prediction model based on the sample set to obtain the prediction model, it can specifically perform the following operations:

[0186] The initial prediction model is invoked, and predictions are made for each sample observation unit based on the sample observation index data before the intervention operation, so as to obtain the predicted sample index data for each sample observation unit.

[0187] Based on the predicted sample index data and the label index results of each sample observation unit, the linear parameters in the initial prediction model are adjusted to obtain the prediction model.

[0188] The processor 801 can also perform the following operations:

[0189] Causal effect analysis was conducted based on the index results corresponding to each first observation unit and the index results corresponding to the matching second observation units that matched each first observation unit to obtain the causal effect of the intervention operation on each first observation unit.

[0190] The indicator results corresponding to each first observation unit refer to the indicator results of each first observation unit after the intervention operation; the indicator results corresponding to the matching second observation unit refer to the indicator results of the matching second observation unit after the intervention operation was performed in the first unit group.

[0191] In this embodiment, covariates of each first observation unit in the first unit group and covariates of each second observation unit in the second unit group are obtained. The first observation unit refers to the observation unit that underwent intervention, and the second observation unit refers to the observation unit that did not undergo intervention. Covariates include observation index data of the observation unit before intervention. Predictions are made based on the observation index data of each first observation unit before intervention to obtain the predicted index results of each first observation unit after intervention. Predictions are also made based on the observation index data of each second observation unit before intervention to obtain the predicted index results of each second observation unit after intervention in the first unit group. Based on the predicted index results of each first observation unit and each second observation unit, the first observation units in the first unit group and the second observation units in the second unit group are matched to obtain matching results. It is evident that, for the first observation unit, the predicted indicator results after the intervention can be predicted based on the observation indicator data before the intervention. Similarly, for the second observation unit, the predicted indicator results after the intervention in the first unit group can be predicted based on the observation indicator data before the intervention. Furthermore, the predicted indicator results of the first and second observation units can be used to match the first and second observation units automatically and efficiently, thereby achieving a balance between the two matched observation units on covariates that have strong predictive significance for the indicator results.

[0192] In this application, the term "unit" refers to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more units. Furthermore, each unit can be part of an overall unit that includes the functionality of that unit.

[0193] Furthermore, it should be noted that this application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When a processor executes these program instructions, it can execute the aforementioned... Figure 3 or Figure 5The methods described in the corresponding embodiments are therefore not repeated here. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application. As an example, program instructions may be deployed on a computer device, executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network.

[0194] According to one aspect of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and executes the computer program, enabling the computer device to perform the aforementioned... Figure 3 or Figure 5 The methods described in the corresponding embodiments are therefore not repeated here.

[0195] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0196] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A data processing method, characterized in that, include: Obtain the covariates of each first observation unit in the first unit group, and obtain the covariates of each second observation unit in the second unit group; The first observation unit refers to the observation unit that has undergone the intervention operation, and the second observation unit refers to the observation unit that has not undergone the intervention operation; the covariate includes the observation index data of the observation unit before the intervention operation. Based on the observation index data of each first observation unit before the intervention operation, the predicted index results of each first observation unit after the intervention operation are obtained. Based on the observation index data of each second observation unit before the intervention operation, the predicted index results of each second observation unit after the intervention operation was performed in the first unit group are obtained. Based on the prediction index results of each first observation unit and the prediction index results of each second observation unit, the first observation unit in the first unit group and the second observation unit in the second unit group are matched to obtain the matching result.

2. The method as described in claim 1, characterized in that, The step of predicting the predicted indicators of each first observation unit after the intervention operation based on the observation indicator data of each first observation unit before the intervention operation includes: The observation index data of the first observation unit of the target before the intervention operation is performed are input into the prediction model; the first observation unit of the target is any one of the first unit group; Based on the linear parameters in the prediction model and the observation index data of the first target observation unit before the intervention operation, the prediction of the first target observation unit is performed to obtain the prediction index results of the first target observation unit after the intervention operation.

3. The method as described in claim 1, characterized in that, The number of first observation units in the first unit group is N, where N is a positive integer; the matching of the first observation units in the first unit group and the second observation units in the second unit group based on the prediction index results of each first observation unit and the prediction index results of each second observation unit to obtain matching results includes: Based on the prediction index results of the i-th first observation unit and the prediction index results of each second observation unit, the distance between the i-th first observation unit and each second observation unit is determined; i is a positive integer, and i is less than or equal to N; Based on the distance between the i-th first observation unit and each of the second observation units, a matching second observation unit that matches the i-th first observation unit is determined from the second unit group; The matching results are obtained based on the matching second observation units that are matched with each first observation unit.

4. The method as described in claim 3, characterized in that, The step of determining a matching second observation unit from the second unit group that matches the i-th first observation unit based on the distance between the i-th first observation unit and each second observation unit includes: Based on the distance between the i-th first observation unit and each second observation unit, select the second observation units from the second unit group whose distance is less than or equal to the distance threshold as candidate second observation units that match the i-th first observation unit; Based on the candidate second observation units that match the i-th first observation unit, determine the matching second observation unit that matches the i-th first observation unit.

5. The method as described in claim 4, characterized in that, The number of candidate second observation units can be one or more, and the step of determining the matching second observation unit that matches the i-th first observation unit based on the candidate second observation units that match the i-th first observation unit includes: Randomly select one candidate second observation unit from the candidate second observation units that match the i-th first observation unit, as the matching second observation unit that matches the i-th first observation unit; or, The minimum distance is determined from the distances between the i-th first observation unit and each candidate second observation unit, and the candidate second observation unit corresponding to the minimum distance is taken as the matching second observation unit that matches the i-th first observation unit.

6. The method as described in claim 2, characterized in that, The method further includes: A sample set is obtained, comprising: multiple sample observation units, sample covariates for each sample observation unit, and sample labels; the sample observation unit refers to an observation unit that has not undergone the intervention operation; the sample covariates include the sample observation indicator data of the corresponding sample observation unit before the intervention operation; the sample labels include: the label indicator results of the corresponding sample observation unit after the intervention operation was performed in the first observation unit, and intervention prompt information, which is used to indicate whether the corresponding sample observation unit has undergone the intervention operation; Based on the sample set, the initial prediction model is trained to obtain the prediction model.

7. The method as described in claim 6, characterized in that, The step of training the initial prediction model based on the sample set to obtain the prediction model includes: The initial prediction model is invoked, and predictions are made for each sample observation unit based on the sample observation index data before any intervention operation, to obtain the predicted sample index data for each sample observation unit. Based on the predicted sample index data and the label index results of each sample observation unit, the linear parameters in the initial prediction model are adjusted to obtain the prediction model.

8. The method according to any one of claims 3-5, characterized in that, The method further includes: A causal effect analysis is performed based on the index results corresponding to each first observation unit and the index results corresponding to the matching second observation units that match each first observation unit to obtain the causal effect of the intervention operation on each first observation unit. Wherein, the indicator result corresponding to each first observation unit refers to the indicator result of each first observation unit after the intervention operation is performed; the indicator result corresponding to the matching second observation unit refers to the indicator result of the matching second observation unit after the intervention operation is performed in the first unit group.

9. A data processing apparatus, characterized in that, include: The acquisition unit is used to acquire the covariates of each first observation unit in the first unit group and the covariates of each second observation unit in the second unit group; The first observation unit refers to the observation unit that has undergone the intervention operation, and the second observation unit refers to the observation unit that has not undergone the intervention operation; the covariate includes the observation index data of the observation unit before the intervention operation. The processing unit is used to make predictions based on the observation index data of each first observation unit before the intervention operation, and to obtain the predicted index results of each first observation unit after the intervention operation. The processing unit is further configured to make predictions based on the observation index data of each second observation unit before the intervention operation, and obtain the predicted index results of each second observation unit after the intervention operation is performed in the first unit group. The processing unit is further configured to match the first observation unit in the first unit group and the second observation unit in the second unit group based on the prediction index results of each first observation unit and the prediction index results of each second observation unit, and obtain a matching result.

10. A computer device, characterized in that, include: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the data processing method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, performs the data processing method according to any one of claims 1-8.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the data processing method according to any one of claims 1-8.