Service configuration method, apparatus, device, and storage medium

By combining causal discovery algorithms and counterfactual fairness loss terms, feature vectors are identified and encoded to construct a conditional generation model. This solves the problem that business configuration parameters in existing technologies cannot balance accuracy and fairness, and enables personalized and compliant business configuration.

CN122288293APending Publication Date: 2026-06-26PING AN HEALTH INSURANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PING AN HEALTH INSURANCE CO LTD
Filing Date
2026-04-22
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously achieve both accuracy and fairness in business configuration parameters in the health insurance and healthcare sectors, resulting in configuration results that do not meet the requirements for compliance and personalization.

Method used

A causal discovery algorithm is used to identify the set of modifiable features and the set of protected features that affect the target business indicators. These are then encoded into feature vectors, and a conditional generation model is constructed. A counterfactual fairness loss term is added to the loss function for training to ensure that the configuration parameters output by the model differ from the preset threshold under different protected features.

Benefits of technology

It achieves accuracy and fairness in business configuration parameters in the health insurance and healthcare fields, ensures that the configuration results comply with industry regulations and ethical requirements, and provides personalized and stable configuration results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122288293A_ABST
    Figure CN122288293A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of artificial intelligence and discloses a business configuration method, apparatus, device, and storage medium. The method includes: acquiring feature data of a known object; analyzing the feature data to identify an intrusive feature set and a protected feature set that affect target business indicators; using the intrusive feature vector encoded by the intrusive feature set and the protected feature vector encoded by the protected feature set as input to a conditional generation model, and using a multidimensional configuration parameter vector as the output of the conditional generation model to construct a conditional generation model; adding a counterfactual fairness loss term to the loss function of the conditional generation model to train the conditional generation model; and inputting the preset intrusive feature vector and protected feature vector of the target object into the conditional generation model to output the target multidimensional configuration parameter vector. This invention can be applied to business management systems in fintech, healthcare, and other fields, solving the technical problem of the inability to simultaneously ensure the accuracy and fairness of configuration parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology and is applied in the fields of financial technology and healthcare. In particular, it relates to a business configuration method, apparatus, device and storage medium. Background Technology

[0002] For fields that require personalized business configuration, such as health insurance and healthcare, the core need is to generate fair configuration parameters (such as health insurance premiums and chronic disease intervention programs) based on the characteristic data of the target object, which are both accurately adapted to the actual business needs and comply with industry regulations and ethical requirements. However, existing technologies have always been unable to solve the core pain point of the difficulty in balancing accuracy and fairness. A brief explanation is given below with specific examples from various fields.

[0003] In the health insurance sector, the core of business configuration is generating reasonable premiums based on the health risks of the target individuals. This requires ensuring that premiums accurately match actual risks and avoid discrimination based on protected characteristics such as gender or age. Current technologies, conventional configuration methods, rely solely on statistical correlation analysis to identify features related to loss ratios, then use a model to generate premium parameters. This approach fails to distinguish the true impact of features on loss ratios, easily misjudging irrelevant or protected characteristics as key influencing factors, leading to a mismatch between premiums and the actual health risks of the target individuals. Furthermore, it lacks effective fairness constraints; when two target individuals have the same actual health risks but different protected characteristics, the premiums output by the model often differ significantly, failing to comply with industry fairness regulations and hindering accurate pricing.

[0004] In the healthcare field, the core of business configuration is generating personalized intervention plans based on patients' disease characteristics. These plans must be highly targeted and fair to patients with different protected characteristics. Current technologies often rely on statistical correlation analysis to screen for disease-related characteristics, failing to accurately identify truly impactful and adjustable characteristics that affect disease control. This results in insufficient targeting and poor intervention outcomes. Furthermore, the lack of fairness constraints means that when two patients share the same key disease characteristics but differ in their protected characteristics, unreasonable differences in medication dosage, follow-up frequency, etc., can occur, violating medical ethics and hindering standardized disease management.

[0005] In summary, existing technologies, regardless of the conventional feature selection and model training methods used in the business configuration process of health insurance and medical health fields, cannot effectively balance the accuracy and fairness of configuration parameters. This results in configuration results that do not meet the core requirements of compliance and personalization in the field, which has become a core technical problem that needs to be solved in the long term. Summary of the Invention

[0006] This invention provides a service configuration method, apparatus, device, and storage medium, which can solve the technical problem in the prior art that it is impossible to simultaneously achieve the accuracy and fairness of configuration parameters when configuring services.

[0007] In a first aspect, the present invention provides a service configuration method, including: Obtain feature data of a known object; Based on the causal discovery algorithm, the feature data is analyzed to identify the set of modifiable features and the set of protected features that affect the target business indicators; The manipulateable feature set and the protected feature set are respectively encoded into an manipulateable feature vector and a protected feature vector; The conditional generation model is constructed by using the interventionable feature vector and the protected feature vector as inputs to the conditional generation model, and using the multi-dimensional configuration parameter vector for business configuration of the known object as the output of the conditional generation model. Add a counterfactual fairness loss term to the loss function of the conditional generation model and train the conditional generation model. For any training sample of the conditional generation model, the counterfactual fairness loss term is used to constrain the difference between the multidimensional configuration parameter vector generated by the model for the training sample and the counterfactual input to be less than a preset threshold under a specified metric when the protected feature vector of the training sample is modified by intervention to generate counterfactual input. The modifiable feature vector and the protected feature vector of the preset target object are input into the trained conditional generation model, and the target multidimensional configuration parameter vector for configuring the relevant services of the target object is output.

[0008] Secondly, the present invention provides a service configuration device, comprising: The data acquisition module is used to acquire feature data of known objects; The feature recognition module is used to analyze the feature data based on the causal discovery algorithm to identify the set of modifiable features and the set of protected features that affect the target business indicators. The feature encoding module is used to encode the operable feature set and the protected feature set into operable feature vectors and protected feature vectors, respectively; The model building module is used to construct the conditional generation model by taking the interventionable feature vector and the protected feature vector as inputs to the conditional generation model and the multi-dimensional configuration parameter vector for business configuration of the known object as outputs of the conditional generation model. The model training module is used to add a counterfactual fairness loss term to the loss function of the conditional generation model and train the conditional generation model. Specifically, for any training sample of the conditional generation model, the counterfactual fairness loss term is used to constrain the difference between the multidimensional configuration parameter vector generated by the model for the training sample and the counterfactual input to be less than a preset threshold under a specified metric when the protected feature vector of the training sample is modified by intervention to generate a counterfactual input. The parameter output module is used to input the pre-defined target object's interventionable feature vector and protected feature vector into the trained conditional generation model, and output a target multi-dimensional configuration parameter vector for configuring the relevant services of the target object.

[0009] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described business configuration method.

[0010] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described business configuration method.

[0011] Understandably, background technologies relying on correlation screening can introduce spurious correlations and misjudged protected features, leading the model to learn incorrect features and causing parameters to deviate from actual business requirements. This invention addresses this by using a causal discovery algorithm to analyze feature data and identify the sets of modifiable and protected features that influence target business metrics. The causal discovery algorithm eliminates spurious correlations, retaining only features that genuinely impact target business metrics and clearly distinguishing between modifiable features that can be adjusted and protected features that should not be used as decision-making criteria. This step ensures accurate feature identification from the data source, laying the foundation for generating precise configuration parameters.

[0012] In the background, features are used in a scattered manner, and the model structure is inconsistent, making it difficult to output stable, multi-dimensional, and personalized configuration results. The present invention encodes the intervened feature set and the protected feature set into feature vectors respectively; using these two types of feature vectors as input and a multi-dimensional configuration parameter vector as output, a conditional generation model is constructed. This model is encoded into vectors to achieve feature standardization. The conditional generation model establishes a precise mapping relationship between "individual features and business configurations," enabling it to output exclusive, multi-dimensional configuration parameters for each object, directly supporting personalized configuration needs.

[0013] The lack of a fairness constraint mechanism in the background technology leads to discriminatory parameters being obtained from objects with the same modifiable features but different protected features. This invention adds a counterfactual fairness loss term to the loss function; for any training sample, when the protected feature is modified to a counterfactual input, the model is constrained to output parameters with a difference of less than a preset threshold between the original sample and the counterfactual input. The counterfactual fairness loss term forces the model to output configuration parameters that are essentially consistent, even if the protected features differ, as long as the modifiable features are the same. This eliminates discrimination based on protected features from the model training mechanism, ensuring fair and compliant configuration results.

[0014] It should be noted that during the model training phase, samples from historical business data are used. Each sample contains: a known object's manipulable feature vector, a protected feature vector, and its corresponding real business configuration parameter vector (as supervision labels). Through the constraint of the counterfactual fairness loss term, the model learns that: given the same manipulable features, even if the protected features are different, the output configuration parameters should not show significant differences.

[0015] During the model inference (application) phase, for the current target object, its modifiable feature vector and protected feature vector are obtained and input into the already trained conditional generative model. Since the model has established a stable and fair mapping relationship from "individual features (causal features + protected features)" to "business configuration parameters", it can directly output the target multidimensional configuration parameter vector for the target object without relying on historical labels.

[0016] This process fully conforms to the standard machine learning paradigm: training the model with historical data and obtaining the output with current data. The trained model possesses two core capabilities: accuracy and fairness. Accuracy is achieved by using causal discovery algorithms to identify the truly influential and actionable features that impact business metrics, outputting configuration parameters that align with business needs. Fairness is ensured by a counterfactual fairness loss term, guaranteeing that only objects with different protected features receive consistent configuration parameters, thus eliminating discrimination.

[0017] In summary, this invention ensures accurate feature recognition (source) through a causal discovery algorithm, achieves personalized parameter mapping (path) through a conditional generation model, and forcibly eliminates discrimination caused by protected features (constraint) through a counterfactual fairness loss term. The combination of these three approaches fundamentally solves the core technical problem that existing technologies cannot simultaneously ensure both the accuracy and fairness of configuration parameters. Attached Figure Description

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

[0019] Figure 1 This is a flowchart illustrating a service configuration method in one embodiment of the present invention.

[0020] Figure 2 yes Figure 1 A flowchart of step S120.

[0021] Figure 3 yes Figure 1 A flowchart of step S150.

[0022] Figure 4 yes Figure 1 Another flowchart of step S150.

[0023] Figure 5 This is another flowchart illustrating the service configuration method in one embodiment of the present invention.

[0024] Figure 6 This is a schematic diagram of a service configuration device in one embodiment of the present invention.

[0025] Figure 7 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention.

[0026] Figure 8 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

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

[0028] Figure 1 A flowchart of the service configuration method provided in the embodiments of the present invention, such as... Figure 1 As shown, the service configuration method provided in this embodiment of the invention includes the following steps.

[0029] Step S110: Obtain the feature data of the known object.

[0030] Specifically, in this step, a business indicator quantitative modeling approach can be adopted to clarify the quantitative standards of core target business indicators (such as the accuracy of health insurance premium pricing being measured by "pricing error rate less than or equal to 5%", and the compliance rate of chronic disease intervention in the medical and health field being measured by "the proportion of hypertensive patients with daily average blood pressure less than 140 / 90 mmHg"). Based on the quantitative standards of indicators, the scope of feature data collection is defined, and a "Feature Collection Scope Comparison Table" is formed.

[0031] Specifically, in this step, target objects can be filtered through query statements based on the user tag system of the business system, and clear filtering conditions can be set (such as health insurance, requiring the age to be between 18 and 65 years old, no major past medical history tags, and the insurance intention tag to be "voluntary"; in the medical and health field, it is required to have a diagnosed hypertension / diabetes tag, no acute or critical illness tags, and the chronic disease management intention tag to be "yes").

[0032] More specifically, features can be labeled with attributes and preliminarily encoded; for example, numerical features can be labeled as "float64", categorical features as "object", and ordered features as "int64", generating a "Feature Labeling Instruction Manual" to clarify the type, meaning and encoding rules of each feature.

[0033] As a concrete example, in the health insurance field, a query can be used to filter for "Age BETWEEN 18 AND 65 AND Major Medical History tag = 0 AND..." Users with "Insurance Intention = 1" were filtered and deduplicated to obtain 10,000 known data entries. Further, an API interface can be used to connect to the internal insurance system to obtain insurance type preferences and past insurance records. An interface can also be used to connect to a top-tier hospital's health checkup center to obtain 12 health checkup indicators, including systolic blood pressure, diastolic blood pressure, and fasting blood glucose. Information such as user occupation and smoking / drinking history can be obtained through an encrypted form. Further, abnormal data with systolic blood pressure greater than 200 mmHg and fasting blood glucose greater than 15 mmol / L (a total of 230 entries were removed) can be eliminated. Missing blood routine indicators are filled with the average health checkup values ​​for the 30-40 age group (mean deviation 1.8%). Smoking history is coded as "0 = none, 1 = occasional, 2 = long-term". Numerical features (systolic blood pressure, fasting blood glucose, etc.) can be labeled as float64, categorical features (occupation, smoking history, etc.) as object, and ordered features (number of medical visits) as int64.

[0034] As another concrete example, in the healthcare field, users can be filtered using the query "chronic disease label IN ('hypertension', 'diabetes') AND acute and critical illness label = 0 AND chronic disease management intention = 1", resulting in 8,000 known data entries after deduplication. Furthermore, by connecting to community health service centers via API, users can obtain chronic disease diagnosis records, average daily blood pressure / blood sugar monitoring data for the past 6 months, and medication records (such as amlodipine dosage for hypertensive patients). By connecting to physical examination institutions via API, users can obtain basic health indicators such as height, weight, and BMI. Encrypted forms can be used to obtain user lifestyle information (such as "early to bed / early to rise / staying up late"), diet (such as "high salt / light diet"), exercise frequency (such as "more than 3 times per week / less than 1 time per week"), and health needs (such as "weight loss / blood pressure control"). Furthermore, abnormal data with daily average blood pressure greater than 180 / 110 mmHg for hypertensive patients can be removed (a total of 120 data points were removed). Missing blood glucose monitoring data can be filled with the mean of the same disease and age group (mean deviation 1.2%). Dietary types can be coded as "0 = bland, 1 = low salt, 2 = high salt". Numerical features (daily average blood pressure, fasting blood glucose, BMI, etc.) can be labeled as float64, categorical features (medication type, diet type, etc.) can be labeled as object, and ordered features (exercise frequency) can be labeled as int64. The data can be stored in CSV format for later use.

[0035] Step S120: Analyze the feature data based on the causal discovery algorithm to identify the set of modifiable features and the set of protected features that affect the target business indicators.

[0036] Specifically, in this step, an appropriate causal discovery algorithm can be used to accurately discover the causal relationship between features and target business indicators, eliminate redundant features (such as features with a correlation degree of less than 0.3), clearly identify the set of features that can be intervened and the set of features that are protected that affect business indicators, ensure that the feature recognition accuracy is high enough, provide a scientific and reliable core basis for subsequent feature coding and model building, and avoid interference from invalid features.

[0037] More specifically, in this step, based on the feature data type (a mixture of numerical and categorical), a fusion algorithm of "GES algorithm (adapted to continuous features) + PC algorithm (adapted to categorical features)" can be selected. More specifically, when configuring the algorithm parameters, the significance level can be set to 0.05, the maximum size of the condition set to 3, the number of iterations to 100, and the convergence threshold to 0.001, ensuring that the algorithm converges and the recognition accuracy is greater than or equal to 90%.

[0038] More specifically, when conducting conditional independence tests, discrete features (such as occupation and smoking history) can use the chi-square test, with a test statistic greater than or equal to 3.84 to determine independence; continuous features (such as blood pressure and blood sugar) can use the mutual information test, with a mutual information value greater than 0.1 to determine independence; mixed features can use the KS test, with a test statistic greater than 0.2 to determine independence. Furthermore, conditional independence tests can be performed in batches, with each pair of variables tested three times. The result with a confidence level greater than or equal to 95% is taken as the final determination. The test results are stored in matrix form, recording the independence / independence relationship and confidence level for each pair of variables.

[0039] More specifically, a DAG can be constructed based on the results of the conditional independence test, with feature variables as nodes and non-independent relationships between variables as directed edges. The direction of the edges is determined by the causal influence direction calculated by the algorithm (e.g., "systolic blood pressure - premium pricing" indicates that systolic blood pressure has a direct causal influence on premium pricing). The weight of the edges is quantified by mutual information values ​​(weight range 0-1, the larger the weight, the stronger the causal influence). After construction, acyclicity verification can be performed, and causal rationality verification can be performed in combination with business logic (e.g., "gender - premium pricing" does not conform to anti-discrimination logic, is judged as an unreasonable association, and is adjusted).

[0040] More specifically, when identifying the set of interventionable features, one can screen for causal parent nodes (direct causal features) that directly point to the target business indicators; further, one can formulate clear criteria for determining interventionability, such as feature values ​​that can be changed through business means, technical means, or user guidance, and the intervention behavior must be compliant and implementable (e.g., "systolic blood pressure can be intervened through health management, which meets compliance requirements and is therefore determined to be interventionable; age cannot be legally intervened and is therefore determined to be non-interventionable"); further, one can use the analysis of variance method to calculate the correlation between the initially screened features and the target business indicators, eliminate redundant features with a correlation of less than, for example, 0.3, and finally form an "Instructions for the Set of Interventionable Features", which clarifies the causal weight, intervention method, and correlation of each feature.

[0041] More specifically, when identifying the protected feature set, three main criteria can be defined: features explicitly prohibited from discrimination by laws and regulations, innate features that cannot be intervened through legal means (such as age and skin color), and features stipulated by industry anti-discrimination norms. Furthermore, within the DAG, features that are directly or indirectly related to the target business indicators and meet the above criteria can be screened. A Pearson correlation coefficient test (e.g., an absolute correlation coefficient greater than 0.1 indicates a correlation) is used to eliminate features without a correlation. Finally, in conjunction with legal and business departments, compliance verification is conducted on the selected protected features to ensure no omissions or errors, ultimately forming a "Protected Feature Set Description," which clarifies the basis for protection and the scope of prohibited intervention for each feature.

[0042] As a concrete example in the health insurance field, the GES+PC fusion causal discovery algorithm can be used. The algorithm parameters are configured as follows: significance level = 0.05, maximum condition set size = 3, number of iterations = 100, achieving an accuracy rate of 92%. A mutual information test is performed on "systolic blood pressure - premium pricing" (mutual information value = 0.42 > 0.1, not independent); a chi-square test is performed on "occupation - premium pricing" (test statistic = 4.5 > 3.84, not independent); and a chi-square test is performed on "gender - premium pricing" (test statistic = 3.2 < 3.84, independent but correlated). A DAG is then constructed. The study identified systolic blood pressure (causal weight 0.82), fasting blood glucose (0.76), insured occupation (0.63), and coverage requirement (0.58) as direct causal parent nodes. After interventionability assessment, all four characteristics met the intervention criteria, with ANOVA analysis showing a correlation coefficient > 0.3, thus forming an interventionable feature set {systolic blood pressure, fasting blood glucose, insured occupation, and coverage requirement}. Gender and ethnicity were selected as protected characteristics correlated with premium pricing (absolute correlation coefficients of 0.15 and 0.12, respectively). Compliance verification confirmed compliance, forming a protected feature set {gender, ethnicity}, ensuring adherence to anti-discrimination compliance requirements.

[0043] As another concrete example, in the healthcare field, a similar fusion causal discovery algorithm can be used, with parameter configurations consistent with those in the health insurance field. The algorithm's recognition accuracy is 93%. Mutual information tests are performed on "daily blood pressure - intervention target achievement rate" (mutual information value = 0.51 > 0.1, not independent), and mutual information tests are performed on "medication dosage - target achievement rate" (mutual information value = 0.48 > 0.1, not independent). A DAG is constructed to identify daily blood pressure (causal weight 0.85), medication dosage (0.79), diet type (0.67), and exercise frequency (0.62) as direct causal parent nodes. After interventionability determination, all four features can be intervened through medical means and health guidance, with correlation degrees all > 0.3, forming an interventionable feature set {daily blood pressure, medication dosage, diet type, exercise frequency}. Gender and age are selected as protected features (absolute correlation coefficient values ​​0.13 and 0.16, respectively), and after compliance verification, a protected feature set {gender, age} is formed.

[0044] In some embodiments of the present invention, such as Figure 2 As shown, step S120 includes the following steps.

[0045] Step S121: Perform conditional independence tests on each pair of variables in the feature data under the condition of different subsets of variables; Specifically, in this step, all variables in the feature data can be extracted first and categorized by type: continuous variables (such as blood pressure, blood sugar, age, and loss ratio) and categorical variables (such as gender, smoking history, and medication adherence). At the same time, target business indicators should be defined (such as the annual loss ratio for health insurance and the blood pressure control compliance rate in medical scenarios). Next, all unique variable pairs (i, j) (where i is not equal to j) are generated. For example, if there are 5 feature variables, 10 sets of variable pairs will be generated. Finally, Z-score standardization is performed on continuous variables to eliminate the influence of differences in numerical range; one-hot encoding is performed on categorical variables to convert them into numerical forms that the model can calculate, ensuring the objectivity of the test results.

[0046] More specifically, the mature PC algorithm condition subset strategy is adopted, starting from an "empty subset" and gradually expanding. Initially, the condition subset is empty, that is, no variables are controlled, and the "unconditional independence" of variable pairs is tested first. Then, the size of the condition subset is gradually increased from 0 to 1 / 3 of the total number of variables (to avoid excessive dimensionality leading to an explosion in computational load). The independence of variable pairs is retested after each expansion. When the condition subset contains the target business metric, the expansion stops to prevent the error of reversed causality.

[0047] Specifically, for different types of variable pairs, corresponding test methods and judgment rules can be selected. If both variables are continuous (such as systolic blood pressure and annual payout ratio), the Pearson partial correlation coefficient test is used. When the p-value obtained from the test is less than 0.05, the two variables are conditionally correlated under the current condition subset; otherwise, they are conditionally independent. If both variables are categorical (such as gender and medication adherence), the chi-square conditional independence test is used. When the p-value is less than 0.05, they are conditionally correlated; otherwise, they are conditionally independent. If one is continuous and the other is categorical (such as age and blood pressure target achievement rate), the mutual information conditional independence test is used. When the mutual information value is greater than 0.1, they are conditionally correlated; otherwise, they are conditionally independent.

[0048] More specifically, a structured test result record can be generated for each "variable pair + condition subset", including the name of the variable pair (e.g., "systolic blood pressure - annual payout ratio"), the current condition subset (e.g., "fasting blood glucose"), the test method used, the test statistics (e.g., partial correlation coefficient, chi-square value, mutual information value), the corresponding p-value or threshold, and the final determination result of whether the conditions are independent.

[0049] As a specific example, in the health insurance field, the target business indicator can be the annual loss ratio Y, and the characteristic variables include X1 (systolic blood pressure, continuous), X2 (fasting blood glucose, continuous), X3 (gender, category), X4 (age, continuous), and Y (annual loss ratio, continuous).

[0050] The core test results are as follows: For variable pairs X1-Y, when the condition subset is empty, the partial correlation coefficient test yields a statistic of 0.78, with a p-value less than 0.05, indicating conditional correlation. When the condition subset is {X2} (controlling fasting blood glucose), the partial correlation coefficient is 0.72, and the p-value is still less than 0.05, still indicating conditional correlation. For variable pairs X3-Y, when the condition subset is empty, the mutual information test yields a mutual information value of 0.25, indicating conditional correlation. When the condition subset is {X1,X2} (controlling systolic blood pressure and fasting blood glucose), the mutual information value drops to 0.08, indicating conditional independence.

[0051] As another concrete example, in the healthcare field, the target business indicator could be the blood pressure control achievement rate Y, with characteristic variables including X1 (daily average systolic blood pressure, continuous), X2 (medication adherence, categorized), X3 (age, continuous), X4 (gender, categorized), and Y (blood pressure control achievement rate, continuous). The core test results are as follows: for the variable pair X1-Y, when the conditional subset is empty, the partial correlation coefficient test statistic is 0.85, with a p-value less than 0.05, indicating conditional correlation; when the conditional subset is {X2} (medication adherence control), the statistic is 0.80, and the p-value is still less than 0.05, indicating conditional correlation; for the variable pair X3-Y, when the conditional subset is empty, the mutual information value is 0.30, indicating conditional correlation; when the conditional subset is {X1,X2}, the mutual information value drops to 0.06, indicating conditional independence.

[0052] Step S122: Based on the conditional independence test results, construct a causal directed acyclic graph corresponding to each variable in the feature data; Specifically, in this step, all feature variables and target business indicators can be used as nodes in the graph. If the test result of a pair of variables under any conditional subset is "not independent", an undirected edge is added between the nodes corresponding to these two variables. Then, redundant edges are deleted. If a pair of variables is only correlated under an empty subset, but becomes independent after controlling any other variable, it indicates that this correlation is false, and the corresponding undirected edge needs to be deleted.

[0053] More specifically, the causal direction of edges can be determined by combining the directional and temporal rules of the PC algorithm, with dual constraints. Following the V-structure rule, if node A is connected to node B, node B is connected to node C, but node A and node C are not connected, and node B appears in the conditional independence test subset of A and C, then the causal direction is determined to be AB, CB. Furthermore, the temporal rule can be followed, where variables that occur earlier point to variables that occur later. For example, changes in systolic blood pressure affect the subsequent "annual payout ratio," so the direction is systolic blood pressure - annual payout ratio, not the other way around. Finally, the causal hierarchy rule can be followed, where protected features (such as gender and age) can only serve as "upstream nodes" and cannot directly point to target business indicators, avoiding the judgment of protected features as direct causal factors of target indicators.

[0054] More specifically, traverse all paths in the graph. If a logical loop such as "ABCA" appears, retain the edge with the highest statistical significance (smallest p-value) and delete redundant edges. The final generated graph must meet the requirements of "no loops and unique causal direction of each edge".

[0055] As a concrete example in the health insurance field, the final causal directed acyclic graph logic is as follows: gender points to systolic blood pressure, gender points to fasting blood glucose; age points to systolic blood pressure, age points to fasting blood glucose; systolic blood pressure points to the annual loss ratio, and fasting blood glucose points to the annual loss ratio. The entire graph is acyclic, and gender and age only indirectly affect the loss ratio as upstream variables, not directly pointing to the target business indicators.

[0056] As another concrete example, in the healthcare field, the final causal directed acyclic graph logic is as follows: age points to average daily systolic blood pressure; age points to medication adherence; gender points to average daily systolic blood pressure; average daily systolic blood pressure points to blood pressure target achievement rate; medication adherence points to blood pressure target achievement rate. The entire graph is acyclic; age and gender only indirectly affect blood pressure target achievement rate through average daily systolic blood pressure and medication adherence, and do not directly point to the target business indicators.

[0057] Step S123: In the causal directed acyclic graph, identify the direct causal parent node pointing to the target business indicator as an operable feature. Specifically, in a causal directed acyclic graph, the direct causal parent node refers to the node that points directly to the target business metric through a directed edge and has no other nodes in between; that is, the direct upstream node of the target business metric.

[0058] Specifically, in this step, when determining the modifiable features, the causal relationship can be determined first, that is, the node of the modifiable feature is the direct causal parent node of the target business indicator, and there is a direct directed edge pointing to the target business indicator. Secondly, the operability of operable features can be determined, that is, the values ​​of operable features can be changed through human intervention. For example, systolic blood pressure can be adjusted through exercise, medication, and diet, and medication adherence can be intervened through follow-up reminders and smart pillboxes. Furthermore, the operability of the data for the modifiable features can be determined, that is, the value of the feature can be effectively collected and quantified, and can be flexibly adjusted during model training and application.

[0059] As a concrete example, in the health insurance field, the direct causal parent nodes of the target business indicator Y (annual loss ratio) are X1 (systolic blood pressure) and X2 (fasting blood glucose). Systolic blood pressure is the direct causal parent node of the annual loss ratio, which can be intervened through exercise, medication, diet, etc., and the data can be collected and quantified, and the intervention behavior is compliant, so it is included in the interveneable features. Fasting blood glucose is the direct causal parent node of the annual loss ratio, which can be intervened through diet control, medication, blood glucose monitoring, etc., meeting all the judgment criteria, so it is included in the interveneable features. The final list of interveneable features is: systolic blood pressure and fasting blood glucose.

[0060] As another concrete example, in the healthcare field, the direct causal parent nodes of the target business indicator Y (blood pressure target achievement rate) are X1 (daily average systolic blood pressure) and X2 (medication adherence). Daily average systolic blood pressure is the direct causal parent node of blood pressure target achievement rate, which can be intervened through medication adjustment, exercise, and salt intake control, meeting all the judgment criteria and included in the interventionable features. Medication adherence is the direct causal parent node of blood pressure target achievement rate, which can be intervened through follow-up reminders, smart pillboxes, health education, etc., meeting the judgment criteria and included in the interventionable features. The final list of interventionable features is: daily average systolic blood pressure and medication adherence.

[0061] Step S124: Identify protected nodes that are related to the target business metrics as protected features.

[0062] Specifically, in this step, when determining the protected feature, the correlation of the protected feature can be determined first. The variable is correlated with the target business indicator in the "unconditional independence test" (p value < 0.05 or mutual information value > 0.1), but it is not the direct causal parent node of the target business indicator. It only indirectly affects the target indicator through other variables. Secondly, the protective nature of the protected feature can be determined. This feature falls within the scope of explicit protection by laws and regulations or industry standards such as the Personal Information Protection Law, the Insurance Law, and the Medical Ethics Code, such as gender, age, ethnicity, religious belief, and disability status. Furthermore, the non-interventional nature of protected characteristics can be determined, meaning that the value of the characteristic cannot be changed through human intervention. For example, gender and age are innate or irreversible, and ethnicity cannot be changed at will. These types of characteristics are not subject to intervention.

[0063] For those under detention, the correlation of the candidate protected features is verified again through the "unconditional independence test": if the variable is "correlated" with the target business indicator in the unconditional test and is not the direct parent node of the target business indicator in the causal directed acyclic graph, it is included in the list of candidate protected features.

[0064] As a specific example, in the health insurance field, the candidate variables are X3 (gender) and X4 (age). Gender is correlated with the annual loss ratio in the unconditional test (p < 0.05), but is not a direct causal parent node of the annual loss ratio. It is protected by the clauses prohibiting gender discrimination in the Insurance Law, and gender cannot be changed through human intervention, so it is included as a protected feature. Age is correlated with the annual loss ratio in the unconditional test (p < 0.05), but is not a direct causal parent node. It is protected by the Personal Information Protection Law, and age is not subject to intervention, so it is included as a protected feature. The final list of protected features is: gender and age.

[0065] As another specific example, in the field of healthcare, the candidate variables are X3 (age) and X4 (gender). Age and blood pressure target achievement rate showed a correlation in the unconditional test (p < 0.05), which is not a direct causal parent node. It is protected by medical ethics norms, and age cannot be interfered with, so it is included as a protected feature. Gender and blood pressure target achievement rate showed a correlation in the unconditional test (p < 0.05), which is not a direct causal parent node. It is protected by the Personal Information Protection Law, and there is no possibility of intervention, so it is included as a protected feature. The final list of protected features is: age and gender.

[0066] It is understandable that the above embodiment refines step S120 (feature processing, segmentation of interveneable and protected features) into four steps based on causal inference, creatively overcoming the limitations of existing technologies that rely solely on statistical associations to segment features, and achieving "precise feature segmentation based on causal relationships." The first step effectively eliminates spurious associations between variables by performing conditional independence tests under different subsets of variables, retaining only the true associations. The second step constructs a causal directed acyclic graph (DAG) based on the test results, clarifying the causal flow between variables, avoiding causal inversion, and providing a reliable causal basis for feature segmentation. The third step identifies direct causal parent nodes pointing to the target business indicator as interveneable features, ensuring that all interveneable features have a direct impact on the target indicator and can generate actual business value through intervention. The fourth step identifies protected indirect nodes related to the target indicator as protected features, ensuring that protected features are not overlooked and avoiding misjudging protected features as direct influencing factors, ensuring the accuracy and rationality of feature segmentation, laying a core foundation for the subsequent fair training of the model, and solving the technical problems in existing technologies where feature segmentation is easily interfered with by spurious associations, inaccurate segmentation, and cannot adapt to the needs of fair modeling.

[0067] Step S130: Encode the operable feature set and the protected feature set into operable feature vector and protected feature vector, respectively.

[0068] Specifically, in this step, the interventionable feature set and protected feature set identified in step S120 are encoded into standardized feature vectors that adapt to the subsequent conditions for generating model input, eliminating the influence of dimensions, ensuring uniform vector dimensions (e.g., error less than or equal to 1%), and no outliers (e.g., NaN, infinity). After encoding, the features retain the original core information and can be directly used for model training and inference. The encoding accuracy is set to be greater than or equal to 99%.

[0069] More specifically, in this step, numerical features (such as blood pressure, blood sugar, and insurance premium requirements) can be coded using Z-Score normalization, categorical features (unordered, such as occupation and ethnicity) can be coded using one-hot encoding, and categorical features (ordered, such as exercise frequency and smoking history) can be coded using ordinal encoding, preserving the order relationship of features, with the encoding range being 0-n (n being the number of categories - 1).

[0070] More specifically, the feature data preprocessed in step S110 can be divided into a training set and a validation set in a 7:3 ratio. The encoding model can be trained using the training set data, and the encoding model parameters (such as mean, standard deviation, and encoding mapping relationship) can be saved. The encoding effect can be verified using the validation set data. The verification criteria are: no NaN or infinite values ​​in the encoded vector, dimensionality deviation less than or equal to 1%, and encoding accuracy greater than or equal to 99%. If the verification fails (such as dimensionality explosion in categorical feature encoding), the encoding method can be adjusted (by using target encoding) and the parameters can be recalibrated.

[0071] More specifically, all encoded features under the same feature set (interventional / protected) can be concatenated in the order preset in the "Interventional Feature Set Instructions" and "Protected Feature Set Instructions" to form a dense vector of fixed dimensions. The concatenation order can be numerical feature encoding results first, followed by categorical feature encoding results, to ensure that the vector order of all samples is consistent. Interventional feature vectors and protected feature vectors are obtained respectively, and the vector dimensions are recorded (e.g., the dimension of the interventional feature vector is 5, and the dimension of the protected feature vector is 4).

[0072] As a concrete example in the health insurance field, in the set of modifiable features, numerical features (systolic blood pressure, fasting blood glucose, and coverage requirements) are coded using Z-Score normalization; categorical features (insured occupations: office workers, construction workers, and medical personnel) can be coded using one-hot encoding; and the feature data can be divided into a training set (7000 entries) and a validation set (3000 entries) in a 7:3 ratio. The validation set has a coding accuracy of 99.5%, no outliers, and a dimensionality bias of 0.8%; furthermore, the coded results of the three normalized numerical features can be concatenated with the coded results of the two categorical features to obtain a modifiable feature vector with a dimension of 5 (e.g., [0.85, 0.62, 1.23, 1, 0]); the protected features (gender, ethnicity) are coded using one-hot encoding, and concatenated to obtain a protected feature vector with a dimension of 4.

[0073] As another concrete example, in the field of healthcare, in the set of modifiable features, numerical features (daily blood pressure, medication dosage) can be standardized using Z-Score encoding, the encoding model can be trained and the parameters can be saved; categorical features (diet type) can be encoded using ordinal numbers (0=light, 1=low salt, 2=high salt), and ordered features (exercise frequency) can be encoded using ordinal numbers (0=<1 time per week, 1=1-2 times, 2=>3 times); the feature data is divided into a training set (5600 entries) and a validation set (2400 entries) in a 7:3 ratio, with a validation set encoding accuracy of 99.7% and a dimensionality bias of 0.6%; after concatenation, a modifiable feature vector with a dimension of 4 is obtained (e.g., [0.78, 0.56, 1, 2]); protected features (gender, age) are encoded using one-hot encoding, and concatenation yields a protected feature vector with a dimension of 3.

[0074] Step S140: Using the interventionable feature vector and the protected feature vector as inputs to the conditional generation model, and using the multi-dimensional configuration parameter vector for business configuration of the target object as outputs of the conditional generation model, the conditional generation model is constructed.

[0075] Specifically, in this step, a conditional generation model is constructed with interventionist feature vectors and protected feature vectors as inputs and multidimensional configuration parameter vectors as outputs. This ensures that the model has good generation and generalization capabilities, and can output multidimensional configuration parameters that meet business needs, comply with regulations, and are reasonable, thus adapting to business scenarios in different fields.

[0076] Specifically, in this step, when defining the multidimensional configuration parameter vector, the dimensions, business meanings, and value ranges of the configuration parameters can be clearly defined based on the target business indicators. Each parameter corresponds to one dimension of the vector, and the parameters must be quantifiable and implementable. Combine business rules and industry standards to define the parameter boundaries and form the "Multidimensional Configuration Parameter Specification".

[0077] More specifically, when selecting and determining the framework of the conditional generation model, a conditional variational autoencoder can be prioritized based on the needs of the business scenario, taking into account both the diversity and rationality of the configuration parameters; if generation efficiency is the priority, a multilayer perceptron can be selected.

[0078] More specifically, in designing the model's network structure, the input layer can be designed with dual input branches, receiving both the manipulable feature vector and the protected feature vector, with the input dimension consistent with the feature vector dimension. Further, a concatenation layer is used to concatenate the two input branches, forming a fused input vector (fused dimension = manipulable feature vector dimension + protected feature vector dimension). The encoder can be designed with two hidden layers, with the number of neurons being 4 times and 2 times the fused input dimension, respectively (e.g., fused dimension 9, 64 neurons, 32 neurons). GELU is chosen as the activation function (to avoid gradient vanishing). The output layer outputs the mean and variance of the latent space, with the latent space dimension being 1.5 times the fused input dimension (e.g., fused dimension 9, latent space dimension 16). The reparameterization layer can employ reparameterization techniques, sampling latent variables from a Gaussian distribution in the latent space to ensure differentiability of the sampling process, facilitating backpropagation training. The decoder can be designed with two hidden layers, with the number of neurons symmetrical to the encoder (32, 64), and GELU is chosen as the activation function. The output layer dimension is consistent with the multidimensional configuration parameter vector dimension, and Linear is chosen as the activation function (adapting to continuous parameters).

[0079] More specifically, when initializing the model, the Xavier initialization method can be used to avoid excessive initial weight bias (weight range [-0.1, 0.1]); if there is a pre-trained model in the same domain, transfer learning can be used to load the pre-trained weights, and the fine-tuning learning rate can be set to 0.0001 to improve the model training efficiency and generalization ability; if there is no pre-trained model, training can start from scratch, and the rationality of the model weights can be verified after initialization (no outliers, uniform weight distribution).

[0080] More specifically, the input format of the input interface for the conditional generation model is Tensor(batch_size) (fusion dimension), input data range [0,1] (consistent with the normalization range of the feature vector); the output format of the conditional generation model's output interface is Tensor(batch_size). (Configuration parameter dimension), the output is an encoded value; the decoding rules of the condition generation model can clearly define the inverse decoding method of the output encoded value (corresponding to the encoding method in step S130), ensuring that the output encoded value can be restored to the actual business parameters; the interface response of the condition generation model can be that the model inference interface response time is less than or equal to 500ms, adapting to the real-time configuration requirements of the business.

[0081] As a concrete example in the health insurance field, a multidimensional configuration parameter vector can be defined with a dimension of 4, and the parameters and their value ranges as follows: [premium amount 500-5000 yuan, coverage period 1-30 years, annual deductible 0-20000 yuan, reimbursement ratio 60%-100%]; the conditional generation model can be a CVAE model; the input layer of the conditional generation model can be set with two branches (5-dimensional interventional feature vector, 4-dimensional protected feature vector), and the above two branches are concatenated to form a 9-dimensional fused input; the encoder of the conditional generation model has 2 hidden layers (64, 32 neurons), and the activation function of the conditional generation model can be set to the GELU activation function with a latent space dimension of 16; the decoder of the conditional generation model can be set with 2 hidden layers (32, 64 neurons), and the output layer is set with 4-dimensional Linear activation; and the weights are initialized using the Xavier initialization method, with no pre-trained model, and training starts from scratch; the input interface receives a Tensor (batch_size). 9) Output interface outputs Tensor (batch_size) 4) The encoded value is denormalized to restore parameters such as actual premium and coverage period. The interface response time is less than or equal to 450ms, which meets the real-time configuration requirements for premium pricing.

[0082] As another concrete example, in the field of healthcare, the multidimensional configuration parameter vector can be defined with a dimension of 4, and the parameters and their value ranges can be defined as [drug dosage 2.5-10mg, exercise duration 15-60 minutes / day, salt intake 3-6g / day, follow-up frequency 7-30 days / time]; the conditional generation model can be a CVAE model; the network structure of the conditional generation model can be set with a dual-branch input layer (4-dimensional interventional feature vector, 3-dimensional protected feature vector), which are concatenated to form a 7-dimensional fused input; the encoder of the conditional generation model can be set with 2 hidden layers (48, 2...). The conditional generative model (4 neurons) can have its activation function set to GELU and its latent space dimension set to 12. The decoder can have two hidden layers (24 or 48 neurons) and a 4-dimensional Linear activation for the output layer. The Xavier initialization method can be used, loading the weights of a pre-trained CVAE model for chronic disease management in the same domain, with a fine-tuned learning rate of 0.0001. The model's input / output interface adapts to feature vectors and configuration parameter vectors, allowing direct decoding of actual intervention parameters. The interface response time is less than or equal to 400ms, adapting to real-time configuration scenarios for chronic disease intervention.

[0083] Step S150: Add a counterfactual fairness loss term to the loss function of the conditional generation model, and train the conditional generation model.

[0084] Wherein, for any training sample of the conditional generation model, when the counterfactual fairness loss term is used to generate counterfactual input by intervening and modifying the protected feature vector of the training sample, the difference between the multidimensional configuration parameter vector generated by the model for the training sample and the counterfactual fairness loss term under a specified metric is less than a preset threshold.

[0085] Specifically, in this step, based on the conditional generation model constructed in step S140, counterfactual fairness constraints can be introduced. Through a standardized model training process, it can be ensured that the configuration parameters output by the model are not affected by the protected features (such as making the fairness score greater than or equal to 90%), while meeting the business generation accuracy requirements (generation accuracy greater than or equal to 95%), thus achieving a balance between fairness and accuracy. The model training process is reproducible and monitorable, and after training, it can be directly used for subsequent configuration parameter output.

[0086] Specifically, in this step, when generating counterfactual samples, counterfactual samples can be generated based on the feature data preprocessed in step S110 and the protected feature set determined in step S120. The core requirement for generating counterfactual samples is that the counterfactual samples differ from the original samples only in the protected features, while the other modifiable features are completely identical. Furthermore, an intervention strategy adapted to the type of protected feature can be adopted (deterministic intervention for categorical features and probabilistic intervention for continuous features) to generate counterfactual samples in batches. After generation, the consistency of the samples is verified (no difference in modifiable features), and the sample balance is adjusted using the SMOTE algorithm (e.g., the sample bias is set to be less than or equal to 10%). The samples are then stored in Tensor format for subsequent loss calculation.

[0087] More specifically, the original samples and corresponding counterfactual samples can be batch-input into the untrained model constructed in step S140, and training-related configurations such as model regularization and dropout can be turned off. Through model forward propagation, the configuration parameter vectors corresponding to the original samples and counterfactual samples can be obtained respectively. According to the type of configuration parameter vector (continuous / mixed), an appropriate difference value calculation method is selected (Euclidean distance is used for continuous type, and weighted Euclidean distance is used for mixed type) to batch calculate the difference value of each pair of samples. The difference value is standardized (normalized to [0,1]), the rationality of the difference value is verified (≥0, no outliers), and samples with abnormal difference values ​​are removed for use in the construction of the fairness loss term.

[0088] More specifically, when constructing the optimized loss function, a fusion optimized loss function of the original loss term and the counterfactual fairness loss term can be constructed. The original loss term can choose a loss method adapted to the configuration parameter vector type (e.g., MSE loss for continuous models, and a fusion loss of MSE and cross-entropy for mixed models), and add an L2 regularization term to avoid overfitting. The counterfactual fairness loss term is constructed based on standardized difference values, and introduces a fairness penalty coefficient (initial value set to 1.0) and a bias correction term (which can be set to 0.0001) to avoid gradient vanishing. The balancing weights (interval of [0.5, 0.8]) are calibrated using a grid search method to balance the model generation accuracy and fairness. The total loss function is differentiable and has no anomalies (e.g., loss value less than 10). After passing the verification, it is used for model training.

[0089] More specifically, when iteratively training the model, a standardized training environment can be configured, and training parameters can be set (e.g., batch_size=32, initial learning rate 0.001, epochs=200, gradient clipping threshold=1.0); the Adam optimizer can be selected (betas=(0.9,0.999), eps=1e-08), and the model parameters can be updated using gradient descent; the samples can be divided into training and validation sets in an 8:2 ratio, and the model training mode can be started. Every 10 iterations, the validation set loss value, generation accuracy, and fairness score can be checked; a learning rate decay strategy can be adopted (the learning rate decays to 0.5 every 50 epochs), and an early stopping strategy can be set (if the validation set loss value fluctuates less than or equal to 0.01 for 15 consecutive epochs, early stopping is triggered) to avoid overfitting.

[0090] More specifically, after the model is trained, its convergence, generation accuracy, and counterfactual fairness are verified. The convergence criterion can be that the loss values ​​of the training set and validation set tend to be stable (e.g., fluctuation less than or equal to 0.01), and the loss value of the validation set is less than or equal to the product of the loss value of the training set and 1.1. The generation accuracy criterion is greater than or equal to 95%; the fairness score criterion is greater than or equal to 90%. If the verification fails, the penalty coefficient, balancing weights, or training parameters are adjusted, and the model is retrained. After the verification is successful, the model weights, encoded model parameters, and standardized parameters are saved for reuse in subsequent inference.

[0091] As a concrete example in the health insurance field, based on protected characteristics (gender, ethnicity, categorical type), a deterministic intervention strategy can be used to generate counterfactual samples. The original sample consists of 7000 samples, generating 14000 counterfactual samples. The SMOTE algorithm is used to adjust the sample balance (bias 8%). The original and counterfactual samples are then input into an untrained CVAE model. Forward propagation yields the configuration parameter vector, and the difference is calculated using Euclidean distance. After standardization, this difference is used to calculate fairness loss. A fusion loss function is constructed: the original loss term is MSE loss + L. Regularization was applied, with a fairness loss term of 1.2 and a bias correction term of 0.0001. The balance weights were calibrated using a grid search to 0.75. The training environment and parameters were configured (batch_size=32, initial lr=0.001, epochs=200), using the Adam optimizer with a learning rate decay of 0.5 every 50 epochs. Early stopping was triggered after 120 iterations, and convergence was verified (loss fluctuation 0.008), resulting in a generation accuracy of 96.8% and a fairness score of 93.2%. The model weights and related parameters were saved for subsequent inference.

[0092] As another concrete example in the healthcare field, based on protected characteristics (gender-categorical, age-continuous), counterfactual samples were generated using deterministic and probabilistic interventions respectively. The original sample consisted of 5600 samples, resulting in 22400 counterfactual samples. The SMOTE algorithm was used to adjust the sample balance (9% bias). An untrained CVAE model was input, and the difference values ​​were calculated using Euclidean distance and standardized. A fusion loss function was constructed: original loss term MSE + L2 regularization, fairness loss term = 1.0, bias correction term = 0.0001, and balance weight = 0.7. With the same training environment and parameters, the pre-trained model weights were loaded and fine-tuned. After 100 iterations, early stopping was triggered, achieving convergence, generating an accuracy of 97.2% and a fairness score of 94.5%. The model weights and related parameters were saved, completing model training.

[0093] In some embodiments of the present invention, such as Figure 3 As shown, step S150 includes the following steps.

[0094] Step S1511: For each training sample in the training sample set of the conditional generation model, perform deterministic or probabilistic intervention on the protected feature value of the training sample to generate a counterfactual sample corresponding to the training sample. Specifically, in this step, the effective training sample set after preprocessing in step S110 (excluding abnormal and missing samples) can be selected; furthermore, the protected feature vectors in the samples can be encoded and verified to ensure that the encoding format is consistent with the encoding format in step S130 (adapted to the model input); the feature vectors can be intervened to perform consistency verification to ensure that there are no outliers and the dimensions are uniform. After passing the verification, it is used as the original sample set.

[0095] More specifically, deterministic interventions (adapting to categorical protected features, such as gender and ethnicity) can directly replace the values ​​of the protected features, with intervention values ​​covering all possible categories of the feature (e.g., gender "female" intervenes as "male", "male" intervenes as "female"; ethnicity "Han" intervenes as "minority", "minority" intervenes as "Han"). Intervention rules are written into a configuration file to ensure reproducibility. Probabilistic interventions (adapting to continuous protected features, such as age) can be based on the original distribution of the protected features, fitting a Gaussian distribution to obtain the distribution mean and standard deviation; a random seed (seed=42) is set, and new feature values ​​are randomly sampled from the Gaussian distribution as the intervention values. 3-5 intervention values ​​are sampled from each original sample to ensure that the intervention values ​​fit the original distribution and avoid unreasonable interventions.

[0096] More specifically, batch processing can be performed, traversing each sample in the original sample set, keeping the modifiable feature vector unchanged (locking the modifiable feature column through index and prohibiting modification), and only modifying the protected feature vector according to the preset intervention strategy; ① Categorical protected features: generate (number of categories - 1) counterfactual samples for each original sample (e.g., for gender with 2 categories, generate 1 counterfactual sample for each original sample); ② Continuous protected features: generate 3-5 counterfactual samples for each original sample (sample 3-5 intervention values); logs are kept during the generation process, recording the original sample ID, counterfactual sample ID, intervention feature, value before intervention, and value after intervention.

[0097] More specifically, it can be verified whether the modifiable feature vectors of the counterfactual samples and the corresponding original samples are completely consistent (difference value = 0). Inconsistent samples are directly removed, and the reason for removal is marked. Furthermore, it can be verified whether the protected feature encoding format of the counterfactual samples is consistent with the original samples and adapted to the model input. It can also remove samples that show outliers after the protected feature intervention (such as age less than 18 years old or greater than 100 years old after age intervention). After verification, a pairing set of "original sample - counterfactual sample" is formed.

[0098] More specifically, the number of original samples and counterfactual samples in the pairing set can be counted, and the sample bias can be calculated (bias = |count of counterfactual samples - number of original samples × preset multiple| / number of original samples × 100%). If the bias is greater than the preset bias value, such as 10%, the SMOTE algorithm can be used for oversampling (when there are too few counterfactual samples) or undersampling (when there are too many counterfactual samples). The balanced pairing set is stored in Tensor format and divided into training pairing set and validation pairing set in an 8:2 ratio for subsequent steps of difference value calculation and model training.

[0099] As a specific example in the health insurance field, the original sample set can be 7,000 valid samples after preprocessing in step S110, with the protected characteristics being categorical (gender: female / male; ethnicity: Han / minority). A deterministic intervention strategy is adopted. Each original sample is traversed, and the modifiable characteristics (systolic blood pressure, fasting blood glucose, etc.) are fixed. The gender intervention rule is "female-male, male-female", and the ethnicity intervention rule is "Han-minority, minority-Han". Two counterfactual samples are generated for each original sample (one for gender and one for ethnicity), resulting in a total of 14,000 counterfactual samples. The statistical sample bias is 8% (less than 10%), and no balancing is required. 7,000 pairs of "original sample-counterfactual sample" pairings are formed, which are divided into a training pairing set of 5,600 pairs and a validation pairing set of 1,400 pairs in an 8:2 ratio and stored in Tensor format for subsequent difference value calculation.

[0100] As another concrete example, in the healthcare field, the original sample set consisted of 5600 valid samples. The protected features were categorical (gender: female / male) and continuous (age: 35-75 years). Gender was subject to deterministic intervention (female-male, male-female), generating one gender counterfactual sample for each original sample. Age was subject to probabilistic intervention, fitted with a Gaussian distribution using SciPy (mean 55 years, standard deviation 10 years), with three intervention values ​​sampled for each original sample, generating three age counterfactual samples. A total of 5600 x 4 = 22400 counterfactual samples were generated. The consistency of the modifiable features was verified, and 80 inconsistent samples were removed, resulting in a verification pass rate of 99.8%. The sample bias was 9% (less than 10%), so no balancing was required. A pairing set of 5600 pairs was formed, divided into a training pairing set of 4480 pairs and a validation pairing set of 1120 pairs in an 8:2 ratio, and stored in Tensor format.

[0101] Step S1512: Calculate the difference value of the multidimensional configuration parameter vector output by the conditional generation model for the training sample and the counterfactual sample; Specifically, the "original sample - counterfactual sample" pairing set (training pairing set + validation pairing set) generated in step S1511 is input into the model in batches of 32. During input, the modifiable feature vectors and protected feature vectors of the original sample and counterfactual sample are concatenated into a fused input vector (adapted to the model structure in step S140). Through model forward propagation (input layer - encoder - reparameterization layer - decoder), the configuration parameter vector (x_origin) corresponding to the original sample and the configuration parameter vector (x_cf) corresponding to the counterfactual sample are obtained respectively. The output vector format is Tensor, and the dimension is consistent with the dimension of the multidimensional configuration parameter vector. The output vector of each pair of samples is recorded.

[0102] Specifically, it can be adapted according to the configuration parameter vector type. For example, continuous parameter vectors (such as health insurance premiums and medical drug dosages) can be calculated using Euclidean distance; mixed parameter vectors (including continuous and discrete types) can be calculated using weighted Euclidean distance, with the weight of discrete parameters set to 0.8 and the weight of continuous parameters set to 1.0, to avoid the interference of discrete parameters on the accuracy of difference values.

[0103] As a concrete example in the health insurance field, the untrained CVAE model constructed in step S140 can be loaded, with regularization and dropout disabled, and gradient calculation prohibited. The 5600 training pairs and 1400 validation pairs generated in S1511 are batch-input into the model at batch_size=32, and forward propagation is used to obtain the configuration parameter vector (4-dimensional) for each pair of samples. Since the parameters are all continuous, Euclidean distance is calculated to obtain the difference values ​​in batches. During the validation phase, 32 abnormal samples with d<0 and 48 extreme difference value samples are removed, and 10% (700 pairs) of samples are randomly selected for manual recalculation. The difference values ​​can also be normalized to [0,1] to obtain d_norm in the range of [0.02,0.86], and the standardized parameters (d_min=0.01, d_max=0.89) are saved.

[0104] As another concrete example, in the healthcare field, an untrained CVAE model can be loaded, configured identically to that in the health insurance field, with 4480 training pairs and 1120 validation pairs as input. Batch forward propagation outputs a 4-dimensional configuration parameter vector. Euclidean distance is used to calculate the difference value. During validation, 28 abnormal samples and 36 extreme difference value samples are removed, and 10% (560 pairs) of samples are randomly selected for recalculation. Furthermore, the difference value can be standardized to [0,1], with d_norm ranging from [0.01,0.82], and the standardized parameters (d_min=0.008, d_max=0.85) can be saved.

[0105] Step S1513: The difference value is used as an additional regularization penalty term and linearly or non-linearly combined with the loss function of the conditional generation model to form the optimized loss function of the conditional generation model. Specifically, in this step, "L2 loss based on standardized variance" can be selected as the core form of the counterfactual fairness loss term. Its core logic is that the smaller the standardized variance, the smaller the fairness loss and the better the model fairness. Selecting L2 loss can enhance the penalty for extreme biases, while ensuring that the loss term is differentiable, adapting to gradient descent optimization, and avoiding the failure of model training caused by selecting non-differentiable loss terms.

[0106] More specifically, when constructing the loss term formula, the single-sample fairness loss term in the basic formula is the square of L_cf_single=(d_norm) (d_norm is the standardized difference value obtained from S1512); the batch sample loss term in the basic formula is the fairness loss term for a batch of samples (batch_size) as L_cf_batch =(1 / batch_size). The square of the sum of (d_norm_i) values ​​(i=1 to batch_size, where d_norm_i is the standardized difference value of the i-th sample); specifically, when defining the parameters, a fairness penalty coefficient (initial value 1.0, adjustable range [0.5, 2.0]) can be introduced to adjust the weight of the fairness loss term. The larger the value of the fairness penalty coefficient, the stronger the penalty for fairness; a bias correction term of 0.0001 is introduced into the formula to avoid gradient vanishing when d_norm=0. The corrected formula is L_cf_batch=(1 / batch_size). (The square of the sum of (d_norm_i + deviation correction terms)) Fairness penalty coefficient.

[0107] Specifically, the fairness penalty coefficient can be calibrated using a grid search method, with the grid range set to [0.5, 0.8, 1.0, 1.2, 1.5, 2.0]. The calibration target can be "validation set fairness score greater than or equal to 90% and generation accuracy greater than or equal to 95%". For each fairness penalty coefficient value, a temporary fusion loss function (original loss term + fairness loss term corresponding to the current fairness penalty coefficient) is constructed. The model is trained for 50 rounds, and the validation set metrics are verified. The fairness penalty coefficient value that satisfies the target and has the fastest model convergence speed is selected as the final parameter. During the calibration process, the metric data corresponding to the fairness penalty coefficient value in each round is retained for subsequent review and adjustment.

[0108] As a concrete example in the health insurance field, the fairness loss term can be constructed using L2 loss based on standardized variance values. The basic formula is L_cf_single = the square of d_norm, with a bias correction term of 0.0001 added. The batch loss term is calculated based on the batch loss term formula. The fairness penalty coefficient is calibrated using a grid search method, with a grid range of [0.5, 0.8, 1.0, 1.2, 1.5, 2.0]. The model is trained for 50 epochs for each fairness penalty coefficient value. When the fairness penalty coefficient = 1.2, the validation set fairness score is 92.5% and the generation accuracy is 96.2%, both meeting the objectives and having the fastest convergence speed. The fairness penalty coefficient = 1.2 is determined as the final parameter. Further verification of differentiability shows a gradient range of [-0.85, 0.92] with no gradient anomalies. After fusing the original MSE loss term, the loss value range is [0.32, 8.65] with no anomalies.

[0109] Step S1514: Train the conditional generation model based on the optimized loss function.

[0110] Specifically, in this step, when constructing the optimized loss function, the original loss term can be selected based on the configuration parameter vector type, such as continuous parameters (health insurance premiums, medical drug dosages) using MSE loss, and an L2 regularization term can be added to avoid overfitting; the fusion loss function can introduce balancing weights (the balancing weights take values ​​of [0.5, 0.8], used to balance the original loss and the fairness loss), and the total loss function formula is L_total = balancing weights. L_orig_reg + (1 - balance weight) L_cf_batch; Furthermore, when calibrating the balancing weights, a grid search method can be used, with a grid range of [0.5, 0.6, 0.7, 0.75, 0.8]. The goal is to select the optimal balancing weight value with the objectives of "validation set generation accuracy ≥ 95%, fairness score ≥ 90%, and loss value tending to be stable". After calibration, the balancing weight value is saved.

[0111] More specifically, during model training, the training environment can be consistent with the model construction environment in step S140, configured with GPU acceleration to ensure training efficiency; the core training parameters are: batch_size=32 (consistent with the previous sample processing), initial learning rate lr=0.001, epochs=200, gradient clipping threshold=1.0 (to avoid gradient explosion); furthermore, when selecting the optimizer, the Adam optimizer can be selected, with parameters betas=(0.9, 0.999), eps=1e-08, a learning rate decay strategy (the learning rate decays to 0.5 every 50 epochs), and an early stopping strategy (if the validation set loss value fluctuates ≤0.01 for 15 consecutive epochs, early stopping is triggered) to avoid overfitting and ineffective iterations.

[0112] More specifically, during the iterative training process, data loading can begin by loading the "original sample - counterfactual sample" pairing set (training pairing set + validation pairing set) generated in step S1511, the standardized difference values ​​from step S1512, the fairness loss term function and core parameters constructed in step S1513, and the calibrated balance weights. The model weights initialized in step S140 can also be loaded. Furthermore, the model can be set to training mode, gradient calculation enabled, and the training pairing set iterated through. For each batch (32 pairs of samples), the following steps can be executed: input sample - model forward propagation output configuration parameter vector - calculation of the original loss term L_orig_ The process involves: calling the fairness loss term function to calculate L_cf_batch; calculating the total loss L_total; backpropagation to calculate gradients; gradient pruning; and the optimizer updating model parameters. Furthermore, every 10 iterations, the model performance is verified using a validation set, calculating the total validation set loss, generation accuracy, and fairness score, and recording the metrics for each round. Additionally, the training process can monitor the model's running status. If anomalies such as gradient explosion (absolute gradient value > 10), a sudden increase in loss value (single increase > 2.0), or NaN loss occur, training is immediately stopped, and issues with parameter configuration, loss term formula, or sample problems are investigated. After adjustments, training is re-established.

[0113] More specifically, after model training is complete (either early stopping is triggered or the maximum number of epochs is reached), check whether the loss values ​​of the training and validation sets tend to stabilize (e.g., the fluctuation is less than or equal to 0.01), and whether the loss value of the validation set is less than or equal to the loss value of the training set. 1.1 Ensure the model is not overfitting; further, during performance verification, the verification generation accuracy can be greater than or equal to 95% and the fairness score can be greater than or equal to 90%. If the standards are not met, adjust the values ​​of the relevant training parameters and retrain; further, after the verification meets the standards, the model weights, optimized loss function parameters, encoded model parameters, and standardized parameters can be saved, while the training logs and indicator curves can be saved. The model file naming conventions facilitate subsequent S160 inference calls.

[0114] As a concrete example in the health insurance field, when constructing the optimized loss function, the original loss term uses MSE+L2 regularization, combined with a fairness loss term, and the grid search calibration is set to 0.75. The training environment and parameters are configured (batch_size=32, lr=0.001, epochs=200, Adam optimizer, lr decay of 0.5 every 50 epochs, early stopping 15 epochs). 5600 training pairs, 1400 validation pairs, and related parameters are loaded, and iterative training is initiated. The metrics are validated every 10 epochs, and early stopping is triggered after 120 epochs, validating convergence (loss fluctuation 0.008). The validation set generation accuracy is 96.8%, and the fairness score is 93.2%, both meeting the targets. The model weights and parameters are saved, and training logs and TensorBoard curves are retained, completing the iterative training of the model.

[0115] As another concrete example, in the healthcare field, optimizing the loss function could involve making MSE+L2 regularized, incorporating a fairness loss term, and setting the network search calibration to 0.7. The same training environment and parameters would be configured, loading 4480 training pairs and 1120 validation pairs, and fine-tuning the pre-trained model weights. After 100 iterations, early stopping would be triggered, achieving convergence (loss fluctuation of 0.007). The validation set generation accuracy would be 97.2%, and the fairness score 94.5%, meeting the requirements. The model weights and parameters would be saved, along with training logs and metric curves. The model could then be directly used for subsequent S160 inference output.

[0116] It is understandable that the above embodiments, in designing the counterfactual fairness loss term for step S1512, construct a target object and a counterfactual sample (different only in protected features, consistent in manipulable features), calculate the difference in their configuration parameter vectors and convert it into a loss term, integrating it into the model training process. This creatively solves the problem in existing technologies that simply avoids protected features and cannot completely eliminate implicit discrimination. It ensures both accurate model fitting of manipulable features and enforces that protected features do not have a discriminatory impact on configuration parameters, achieving a balance between accuracy and fairness. Furthermore, the counterfactual fairness constraint is quantifiable and implementable, fully adaptable to business compliance requirements, and differs from conventional statistical fairness constraint methods.

[0117] In some embodiments of the present invention, the conditional generation model employs a conditional variational autoencoder; such as... Figure 4 As shown, step S150 includes the following steps.

[0118] Step S1521: Convert the predefined business rules into constraint functions about the multidimensional configuration parameter vector; Specifically, in this step, all inviolable hard rules in the current business scenario can be identified. Each rule corresponds to the value range / logical relationship of one or more dimensions in a multi-dimensional configuration parameter vector. Further, an input-output mapping relationship can be established for each rule. The input is the complete multi-dimensional configuration parameter vector output by the model, and the output is the quantified value of the violation degree of the current rule corresponding to that vector. Further, the quantified values ​​of the violation degree of all individual rules can be integrated into a total constraint function. The function outputs a unique value representing the total degree to which the current configuration parameter vector violates all business rules. The constraint function satisfies the condition that the output is 0 when the parameters are fully compliant; the more violated the parameter, the larger the output value, and the value is positively correlated with the severity of the violation.

[0119] As a concrete example, in the health insurance field, predefined hard business rules can be established, such as: premium amount must be between 500 and 5000 yuan; coverage period must be between 1 and 30 years; annual deductible must be between 0 and 20000 yuan; and medical reimbursement ratio must be between 60% and 100%. These four rules are transformed into a constraint function, taking a 4-dimensional premium configuration parameter vector as input. The function iterates through each dimension, calculates the violation deviation for each dimension, and finally outputs a total value representing the overall violation level of the parameter vector.

[0120] As another concrete example, in the healthcare field, predefined hard medical / business rules can be established, including: medication dosage must be between 2.5mg and 10mg; daily exercise duration must be between 15 minutes and 60 minutes; daily salt intake must be between 3g and 6g; and follow-up frequency must be between 7 and 30 days per visit. These four rules are then transformed into a constraint function, with the input being a 4-dimensional intervention configuration parameter vector. The function calculates the deviation from the violation in each dimension and outputs the overall degree of violation.

[0121] In some embodiments of the present invention, step S1521 includes the following steps.

[0122] Step S15211: For each predefined business rule, construct the rule determination function corresponding to the business rule using the multidimensional configuration parameter vector as the input of the rule determination function.

[0123] Specifically, when the multidimensional configuration parameter vector input to the rule determination function satisfies the business rule, the output value of the rule determination function is zero or a negative number; when the multidimensional configuration parameter vector violates the business rule, the output value of the rule determination function is a positive number, and the value of the positive number is proportional to the severity of the violation of the business rule.

[0124] Specifically, in this step, the complete multidimensional configuration parameter vector output by the model is used as the unique input of the function; more specifically, the dimension values ​​corresponding to the current rule in the parameter vector are extracted, and the values ​​are compared with the legal range specified by the rule. More specifically, when the function outputs, if the parameter meets the business rules, the output value is 0 or a negative number; if the parameter violates the business rules, the output value is a positive number, and the larger the deviation of the violation, the larger the positive number (proportional to the severity of the violation).

[0125] As a concrete example in the health insurance field, a judgment function is constructed for the rule of "premium amount 500-5000 yuan". The input is a 4-dimensional premium parameter vector, and the value of the premium dimension is extracted. If the premium is 2000 yuan (compliant), the corresponding output is 0; if the premium is 300 yuan (below the lower limit of 200 yuan), the corresponding output is 200; if the premium is 5500 yuan (exceeding the upper limit of 500 yuan), the corresponding output is 500.

[0126] As another concrete example, in the field of healthcare, a decision function can be constructed for the rule of "drug dosage 2.5-10mg". The input is a 4-dimensional intervention parameter vector, and the value of the drug dosage dimension is extracted. The output is 0 for dosage = 6mg (compliant); the output is 2 for dosage = 12mg (exceeding the upper limit of 2mg); and the output is 0.5 for dosage = 2mg (below the lower limit of 0.5mg).

[0127] Step S15212: During the training process of the conditional generation model, the multidimensional configuration parameter vector output by the conditional generation model is input into each of the rule determination functions. If the output value of the rule determination function is zero or negative, it is determined that the business rule corresponding to the rule determination function is satisfied, and the rule violation metric corresponding to the business rule is recorded as zero. If the output value of the rule determination function is positive, it is determined that the business rule corresponding to the rule determination function is violated, and the positive value output by the rule determination function is used as the violation metric value of the multidimensional configuration parameter vector for the business rule. Specifically, in this step, the multi-dimensional configuration parameter vector output by the condition generation model is synchronously input into all rule decision functions; more specifically, if the rule decision function outputs 0 / negative numbers, the corresponding rule is satisfied and the corresponding single rule violation metric value = 0; if the rule decision function outputs positive numbers, the corresponding rule is violated and the corresponding single rule violation metric value = the positive value output by the decision function.

[0128] As a specific example, in the field of health insurance, the model outputs a premium parameter vector [300, 15, 5000, 85%], and inputs four rule judgment functions. The premium rule outputs 200 (violation), with a corresponding violation metric of 200; the coverage period rule outputs 0 (compliance), with a corresponding violation metric of 0; the deductible rule outputs 0 (compliance), with a corresponding violation metric of 0; and the payout ratio rule outputs 0 (compliance), with a corresponding violation metric of 0.

[0129] As another concrete example, in the field of healthcare, the model outputs an intervention parameter vector [12,35,5,14] and inputs four rule judgment functions: the medication dosage rule outputs 2 (violation), with a corresponding violation metric of 2; the exercise duration rule outputs 0 (compliance), with a corresponding violation metric of 0; the salt intake rule outputs 0 (compliance), with a corresponding violation metric of 0; and the follow-up frequency rule outputs 0 (compliance), with a corresponding violation metric of 0.

[0130] Step S15213: The multidimensional configuration parameter vector is weighted and summed with the violation metric values ​​of all the business rules to obtain the total rule violation metric value corresponding to the multidimensional configuration parameter vector, which is used as the constraint function.

[0131] Specifically, in this step, each rule can be assigned a weight based on its importance to the business (core rules have a weight greater than or equal to 0.6, and secondary rules have a weight of 0.2-0.5). More specifically, the violation metric for each rule can be multiplied by its corresponding weight and then summed together to obtain the total rule violation metric. More specifically, the violation metric of this general rule, which is the final output value of the constraint function, fully satisfies the requirement that "compliance is 0 and the larger the violation, the larger the value".

[0132] As a specific example, in the field of health insurance, the rule weights are: premium rule 0.6, coverage period 0.2, deductible 0.1, and reimbursement ratio 0.1; correspondingly, the single rule violation metric is 200, 0, 0, 0; correspondingly, the total rule violation metric = 200 multiplied by 0.6 + 0 multiplied by 0.2 + 0 multiplied by 0.1 + 0 multiplied by 0.1 = 120; this 120 is the constraint function output value.

[0133] As another concrete example, in the field of healthcare, the rule weights are 0.6 for medication dosage, 0.2 for exercise duration, 0.1 for salt intake, and 0.1 for follow-up frequency; correspondingly, the individual violation metric values ​​are 2, 0, 0, and 0; the total rule violation metric value = 2 multiplied by 0.6 + 0 multiplied by 0.2 + 0 multiplied by 0.1 + 0 multiplied by 0.1 = 1.2; this 1.2 is the constraint function output value.

[0134] It is understandable that step S1521 (converting business rules into constraint functions) in the above embodiments is further refined by constructing a quantitative rule constraint system through a three-step method. This creatively solves the problem in existing technologies where business rules are difficult to accurately convert into model-identifiable and computable constraints. The rule judgment function constructed in the first step clearly distinguishes between compliance and violation output logic, and the violation output value is positively correlated with the severity of the violation, thereby quantifying the degree of violation of a single rule. The second step calculates the violation metric value of a single rule in real time, ensuring that violations are traceable and monitorable. The third step obtains the total violation metric value through weighted summation as a constraint function, which can allocate weights according to the importance of business rules, achieving strong constraints on core rules and reasonable constraints on secondary rules, making the constraints of business rules more targeted and flexible, and avoiding a "one-size-fits-all" constraint approach.

[0135] Step S1522: Based on the augmented Lagrange method, the constraint function is transformed into an additional penalty term, and the additional penalty term is added to the loss function.

[0136] Specifically, in this step, the output value of the constraint function can be combined with the preset penalty coefficient and Lagrange multiplier to transform it into a continuously differentiable penalty term, ensuring that the model can be optimized through backpropagation. Specifically, the penalty calculation rules can be as follows: if the configuration parameters are fully compliant (the constraint function output is 0), the penalty value is 0; if the configuration parameters are slightly non-compliant, the penalty value is a small positive number; if the configuration parameters are seriously non-compliant, the penalty value is a large positive number. More specifically, the penalty term of this rule can be directly added to the original model's generation accuracy loss and counterfactual fairness loss to form the final total loss function used for training.

[0137] As a concrete example, in the field of health insurance, the premium rule constraint function can be transformed into a penalty term using the augmented Lagrange method. If the model outputs a premium of 300 yuan (below the lower limit of 200 yuan, which is a serious violation), the penalty term output is 1.2; if the model outputs a premium of 2000 yuan (fully compliant), the penalty term output is 0. This penalty term is added to the original loss, and the total loss function simultaneously considers accuracy, fairness, and compliance.

[0138] As a concrete example, in the field of healthcare, the medical rule constraint function can be transformed into a penalty term. If the model outputs a drug dosage of 12mg (exceeding the upper limit of 2mg, which is a violation), the penalty term output is 0.9; if the output drug dosage is 6mg (compliant), the penalty term output is 0. The penalty term is added to the total loss, forcing the model to output intervention parameters that comply with medical regulations.

[0139] Step S1523: Input the training samples into the conditional variational autoencoder to map the training samples into latent space distribution parameters, sample latent variables from the latent space distribution, and reconstruct the latent variables into the multidimensional configuration parameter vector through the decoder of the conditional variational autoencoder. Specifically, in this step, the manipulable feature vector and the protected feature vector of the training samples can be concatenated as the total input of the conditional variational autoencoder. Further, the encoder receives the concatenated feature vector and, through a multi-layer network, calculates and outputs two core parameters of the latent space distribution: the latent space mean and the latent space variance. Further, based on the latent space mean and variance, a reparameterization technique can be used to sample latent variables of a fixed dimension from this normal distribution. Further, the decoder receives the sampled latent variables and, through a multi-layer network forward computation, reconstructs and outputs a multi-dimensional configuration parameter vector that matches the business requirements.

[0140] As a concrete example, in the field of health insurance, a 5-dimensional modifiable feature vector (systolic blood pressure, fasting blood glucose, etc.) and a 4-dimensional protected feature vector (gender, ethnicity) can be concatenated into a 9-dimensional input; the encoder further calculates the latent space mean and variance, and samples out 16-dimensional latent variables; the decoder further receives the latent variables and reconstructs the output 4-dimensional premium configuration parameter vector (premium, coverage period, deductible, reimbursement ratio).

[0141] As another concrete example, in the field of healthcare, a 4-dimensional interventional feature vector (daily blood pressure, medication dosage, etc.) and a 3-dimensional protected feature vector (gender, age) can be concatenated into a 7-dimensional input. Furthermore, the latent space mean and variance can be calculated by the encoder, and 12-dimensional latent variables can be sampled. The decoder then receives the latent variables and reconstructs the output 4-dimensional intervention configuration parameter vector (medication dosage, exercise duration, salt intake, follow-up frequency).

[0142] Step S1524: Based on the backpropagation algorithm, train the conditional variational autoencoder with the goal of minimizing the value of the loss function.

[0143] Specifically, in this step, the configuration parameter vector output by the S1523 model can be substituted into the total loss function to calculate the total loss value of the current batch of samples; further, the gradient value of the total loss with respect to each weight and bias in the model is calculated through the backpropagation algorithm; further, an adaptive optimizer is used to update all parameters of the model according to the gradient value, so that the total loss value gradually decreases; further, the forward propagation, loss calculation, backpropagation, and parameter update process is repeated until the total loss value stabilizes and no longer decreases, and the model training is completed.

[0144] As a concrete example in the health insurance field, for each batch of 32 training samples, the model outputs premium parameters through forward propagation and calculates the total loss (generation loss + fairness loss + rule penalty term); then it further backpropagates to calculate the gradient and updates the encoder and decoder parameters; after 120 iterations, the total loss stabilizes, and the model outputs premium parameters that are accurate, non-discriminatory, and fully compliant.

[0145] As another concrete example, in the field of healthcare, for each batch of 32 patient samples, the intervention parameters are output through forward propagation to calculate the total loss; the model parameters are then updated through backpropagation; after 100 iterations, the model converges, and the intervention parameters output by the model conform to medical standards, are free from age / gender discrimination, and are accurately adapted to the patient's condition.

[0146] It is understood that the above embodiments explicitly define the conditional generation model as a conditional variational autoencoder (CVAE) and refine the model training step S150 into four consecutive steps, creatively achieving "deep integration of business rule constraints and CVAE model training"; by transforming predefined business rules into constraint functions, and then transforming them into penalty terms based on the augmented Lagrange method and incorporating them into the loss function, the advantages of latent space sampling of the CVAE model are leveraged to ensure the randomness, generalization and accuracy of configuration parameter generation, while also constraining illegal parameters from the source of model training to avoid generating parameters that do not conform to business rules; at the same time, the forward reconstruction and backpropagation training process of CVAE ensures that business rule constraints do not affect the model convergence speed, solving the technical pain points of existing technologies where business rules are disconnected from model training and illegal parameters are difficult to avoid in advance.

[0147] Step S160: Input the pre-defined interventionable feature vector and the protected feature vector of the target object into the trained conditional generation model, and output the target multidimensional configuration parameter vector for configuring the relevant services of the target object.

[0148] Specifically, in this step, the modifiable and protected features of the target object can be encoded and standardized using the same methods as in the model training phase of step S130 (calling the encoding model, mean, and standard deviation parameters saved in the training phase) to ensure that the distribution of the input data is consistent with the training data. After preprocessing, the vector dimension is checked to ensure that there are no outliers (NaN, infinity). Only after passing the check can the data be input into the model. The preprocessing log is retained for easy traceability.

[0149] More specifically, in this step, when configuring the model inference, the conditional generation model can load the model weights and encoded model parameters that have been trained and saved in step S150, disable gradient calculation, and reduce inference time; it can set inference parameters: batch_size=32 (to adapt to business response speed), and enable inference logs (recording input vectors, output encoded values, inference time, and user ID) to facilitate troubleshooting and tracing.

[0150] More specifically, the validated interventionible feature vectors and protected feature vectors can be input into the model according to the input interface format defined in step S140; further, through the forward propagation of the model input layer, encoder, reparameterization layer and decoder, multi-dimensional configuration parameter encoding values ​​are output; during the inference process, the model running status is monitored (no memory overflow, no abnormal error), and the rationality of the output encoding values ​​is verified after each batch of inference is completed (no abnormal values), and an alarm mechanism is triggered in case of abnormality.

[0151] More specifically, the anti-decoding and anti-standardization methods corresponding to the encoding stage in step S130 can be used to restore the encoded values ​​output by the model to the actual business parameters; after anti-decoding, verify whether the parameter values ​​are within the range defined in the "Multidimensional Configuration Parameter Manual"; if there are parameters that violate the range, linear interpolation can be used to adjust them to the legal range, and the adjustment record should be kept in the log and the reason for the adjustment should be marked.

[0152] More specifically, the verified actual business parameters can be concatenated into a target multidimensional configuration parameter vector according to the dimension order preset in the "Multidimensional Configuration Parameter Manual"; the target vector is pushed to the corresponding business system through the interface (health insurance is pushed to the underwriting system, and medical and health care is pushed to the chronic disease management system), with an interface response time of less than or equal to 500ms; at the same time, the target vector is bound to the unique identifier of the target object, and a data retention period is set (in compliance with compliance requirements) to facilitate subsequent dynamic updates, queries and traceability.

[0153] As a concrete example, in the field of health insurance, the characteristic data of an insured applicant could be: systolic blood pressure 140 mmHg, fasting blood glucose 6.1 mmol / L, occupation: office worker, coverage requirement 200,000 (interventional characteristics), gender: female, ethnicity: Han (protected characteristics). Further, these characteristics can be preprocessed using an encoding model during the training phase to obtain a 5-dimensional interventional feature vector [0.85, 0.62, 1.23, 1, 0] and a 4-dimensional protected feature vector [1, 0, 1, 0], which pass the validation. The model can then be loaded and inference mode initiated. Set batch_size=32; output the encoded value [0.32,0.45,0.18,0.76] through forward propagation, and restore it to the actual business parameters through denormalization, namely, premium of 1800 yuan, coverage period of 15 years, annual deductible of 5000 yuan, and reimbursement ratio of 85%; verify that all parameters are within the preset range, and concatenate them into the target vector [1800,15,5000,85%]; push it to the underwriting system through the interface (response time 420ms), bind it with the user ID and store it in the database to complete the premium pricing configuration, which can be directly used for underwriting decisions.

[0154] As another concrete example, in the field of healthcare, a hypertensive patient's characteristic data are: daily average blood pressure 150 / 95 mmHg, medication dosage 5 mg, low-salt diet, exercise frequency 3 times per week (interventional features), male gender, and age 55 years (protected features). Preprocessing using the encoding model during the training phase yields a 4-dimensional interventional feature vector [0.78, 0.56, 1, 2] and a 3-dimensional protected feature vector [1, 0, 0.35], which pass verification. The model is loaded, and inference mode is activated, outputting the encoded value [0.42, 0.58, 0.65, 0.32]. This is then decoded into actual intervention parameters: medication dosage 6 mg, exercise duration 35 minutes / day, salt intake 5 g / day, and follow-up frequency 14 days / time. The parameters are verified to meet medical compliance requirements and concatenated into a target vector [6, 35, 5, 14]. This data is then pushed to the chronic disease management system (response time 380 ms), bound to the patient ID, and stored for subsequent intervention execution and tracking.

[0155] Understandably, background technologies relying on correlation screening can introduce spurious correlations and misjudged protected features, leading the model to learn incorrect features and causing parameters to deviate from actual business requirements. This invention addresses this by using a causal discovery algorithm to analyze feature data and identify the sets of modifiable and protected features that influence target business metrics. The causal discovery algorithm eliminates spurious correlations, retaining only features that genuinely impact target business metrics and clearly distinguishing between modifiable features that can be adjusted and protected features that should not be used as decision-making criteria. This step ensures accurate feature identification from the data source, laying the foundation for generating precise configuration parameters.

[0156] In the background, features are used in a scattered manner, and the model structure is inconsistent, making it difficult to output stable, multi-dimensional, and personalized configuration results. The present invention encodes the intervened feature set and the protected feature set into feature vectors respectively; using these two types of feature vectors as input and a multi-dimensional configuration parameter vector as output, a conditional generation model is constructed. This model is encoded into vectors to achieve feature standardization. The conditional generation model establishes a precise mapping relationship between "individual features and business configurations," enabling it to output exclusive, multi-dimensional configuration parameters for each target object, directly supporting personalized configuration needs.

[0157] The lack of a fairness constraint mechanism in the background technology leads to discriminatory parameters being obtained from objects with the same modifiable features but different protected features. This invention adds a counterfactual fairness loss term to the loss function; for any training sample, when the protected feature is modified to a counterfactual input, the model is constrained to output parameters with a difference of less than a preset threshold between the original sample and the counterfactual input. The counterfactual fairness loss term forces the model to output configuration parameters that are essentially consistent, even if the protected features differ, as long as the modifiable features are the same. This eliminates discrimination based on protected features from the model training mechanism, ensuring fair and compliant configuration results.

[0158] It should be noted that during the model training phase, samples from historical business data are used. Each sample contains: a known object's manipulable feature vector, a protected feature vector, and its corresponding real business configuration parameter vector (as supervision labels). Through the constraint of the counterfactual fairness loss term, the model learns that: given the same manipulable features, even if the protected features are different, the output configuration parameters should not show significant differences.

[0159] During the model inference (application) phase, for the current target object, its modifiable feature vector and protected feature vector are obtained and input into the already trained conditional generative model. Since the model has established a stable and fair mapping relationship from "individual features (causal features + protected features)" to "business configuration parameters", it can directly output the target multidimensional configuration parameter vector for the target object without relying on historical labels.

[0160] This process fully conforms to the standard machine learning paradigm: training the model with historical data and obtaining the output with current data. The trained model possesses two core capabilities: accuracy and fairness. Accuracy is achieved by using causal discovery algorithms to identify the truly influential and actionable features that impact business metrics, outputting configuration parameters that align with business needs. Fairness is ensured by a counterfactual fairness loss term, guaranteeing that only objects with different protected features receive consistent configuration parameters, thus eliminating discrimination.

[0161] In summary, this invention ensures accurate feature recognition (source) through a causal discovery algorithm, achieves personalized parameter mapping (path) through a conditional generation model, and forcibly eliminates discrimination caused by protected features (constraint) through a counterfactual fairness loss term. The combination of these three approaches fundamentally solves the core technical problem that existing technologies cannot simultaneously ensure both the accuracy and fairness of configuration parameters.

[0162] In some embodiments of the present invention, such as Figure 5 As shown, after step S160, the following steps are also included: Step S171: When a significant change is detected in the manipulable feature vector of the target object or a preset time period is reached, the current target multidimensional configuration parameter vector corresponding to the target object is regenerated. Specifically, in this step, the deviation rate between the current value of each dimension in the interventionable feature vector and the feature value when the parameters were generated last time can be calculated. The formula is: Deviation rate = |current value - historical value| / historical value multiplied by 100%. If the deviation rate of any feature dimension is >10% (engineering threshold, which can be adjusted according to business needs), or the average deviation rate of all feature dimensions is >5% (example, which can be adjusted according to actual needs), it is judged as "significant change".

[0163] More specifically, the cycle can be set according to the business scenario, such as 6 months for health insurance scenario and 3 months for medical and health (chronic disease intervention) scenario; furthermore, a parameter update cycle table can be established based on the target object ID, and a scheduled task can scan daily and automatically trigger when the cycle is reached.

[0164] More specifically, after the triggering conditions are met, the current intervened feature vector and protected feature vector of the target object are collected; and based on the conditional generative neural network model, the feature vector is input to regenerate the current target multidimensional configuration parameter vector; after generation, it is temporarily stored in a temporary table, without directly overwriting the actual parameters, and is updated synchronously after the interpretation is completed.

[0165] As a specific example, in the health insurance field, when the target individual's premium parameters were last generated, their systolic blood pressure was 135 mmHg. Six months later, their systolic blood pressure was detected to have changed to 150 mmHg, with a deviation rate of approximately 11.1% > 10%, triggering a "significant change". Further data was collected on the individual's current modifiable characteristics (systolic blood pressure 150 mmHg, fasting blood glucose 6.5 mmol / L, etc.) and protected characteristics (gender female, ethnicity Han). Furthermore, the CVAE model can be reused to regenerate the premium parameter vector: [2200 yuan (premium), 20 years (term), 8000 yuan (deductible), 85% (payout ratio)].

[0166] As another concrete example, in the field of healthcare, the target patient's average daily blood pressure one month ago was 145 / 95 mmHg, while the current measurement is 130 / 80 mmHg, with a systolic blood pressure deviation rate of approximately 10.3% > 10%, triggering a "significant change". Further, current interventionable characteristics (average daily blood pressure 130 / 80 mmHg, medication adherence 90%, etc.) and protected characteristics (male gender, age 55 years) can be collected. Further, the CVAE model can be reused to regenerate the intervention parameter vector: [5mg (drug dosage), 40 minutes (exercise duration), 5g (salt intake), 14 days (follow-up frequency)].

[0167] Step S172: For the current target multidimensional configuration parameter vector, identify the target interventionable feature dimension in the interventionable feature vector that has the greatest influence on the target multidimensional configuration parameter vector; Specifically, in this step, the influence of each feature dimension on the parameters can be quantified by calculating the "sensitivity of the parameter vector to the feature vector". More specifically, the higher the degree of influence, the more significant the change in the parameter vector will be due to a small change in the feature dimension. Finally, the top-N core feature dimensions are output (N is 1-2 by default to ensure concise interpretation), and the dimension names and the order of influence are labeled.

[0168] As a specific example, in the field of health insurance, for the regenerated premium parameter vector [2200 yuan, 20 years, 8000 yuan, 85%], the feature dimensions with the greatest impact were identified as "systolic blood pressure" (ranked 1) and "fasting blood glucose" (ranked 2).

[0169] As another concrete example, in the field of healthcare, the most influential feature dimensions for the regenerated intervention parameter vector [5mg, 40 minutes, 5g, 14 days] are identified as "daily average systolic blood pressure" (ranked 1) and "medication adherence" (ranked 2).

[0170] In some embodiments of the present invention, step S172 includes the following steps.

[0171] Step S1721: Calculate the gradient matrix of the current target multidimensional configuration parameter vector with respect to the intervened feature vector; Specifically, in this step, the current manipulable feature vector can be converted into a model-differentiable tensor; the protected feature vector and model parameters are fixed (not updated), and the derivative is calculated only with respect to the manipulable feature vector.

[0172] More specifically, the model is fed with the input of the modifiable feature vector, and forward propagation yields the target multidimensional configuration parameter vector. For each dimension of the parameter vector, its partial derivative with respect to each dimension of the modifiable feature vector is calculated. The gradient matrix has the following dimensions: M. K (M = number of parameter vector dimensions, K = number of manipulable feature vector dimensions), where each element in the matrix represents the gradient value of the i-th parameter dimension with respect to the j-th feature dimension.

[0173] More specifically, each element in the gradient matrix can be normalized (Min-Max normalization) to map the value to [0,1], eliminating the influence of dimensions (such as mmHg for blood pressure, mmol / L for blood glucose).

[0174] As a specific example, in the field of health insurance, the parameter vector dimension M=4 (premium, term, deductible, reimbursement ratio) and the feature vector dimension K=5 (systolic blood pressure, fasting blood glucose, BMI, smoking history, drinking history).

[0175] As another concrete example, in the field of healthcare, the parameter vector dimension M=4 (drug dosage, exercise duration, salt intake, follow-up frequency), and the feature vector dimension K=4 (daily average systolic blood pressure, medication adherence, exercise duration, salt intake).

[0176] Step S1722: Calculate the norm of the gradient matrix row by row to obtain the importance score of each dimension of the manipulable feature vector. Specifically, the L2 norm (Euclidean norm) is used, which is simple to calculate and can reflect the overall magnitude of the gradient; the L2 norm formula can be applied to the j-th feature dimension.

[0177] Furthermore, the importance scores of all feature dimensions can be normalized to [0, 100] for easier business understanding (the higher the score, the stronger the importance).

[0178] Furthermore, it can be checked whether the sum of all scores is 100 (optional, depending on business needs). If not, it can be renormalized to ensure the relative comparability of the scores.

[0179] As a concrete example, in the health insurance field, calculating the L2 norm column-wise, the arithmetic square root of systolic blood pressure (0.85² + 0.02² + 0.03² + 0.01²) is approximately 0.8504, with a normalized score of 85; the arithmetic square root of fasting blood glucose (0.42² + 0.01² + 0.02² + 0.01²) is approximately 0.4206, with a normalized score of 42; and the arithmetic square root of BMI (0.15² + 0.01² + 0.01² + 0.01²) is approximately 0.4206, with a normalized score of 42. The square root of the smoking history is approximately 0.1507, with a normalized score of 15; the square root of the smoking history (0.08²+0.005²+0.01²+0.005²) is 0.081, with a normalized score of 8; the square root of the drinking history (0.05²+0.005²+0.01²+0.005²) is 0.0515, with a normalized score of 5; the final importance scores are systolic blood pressure 85, fasting blood glucose 42, BMI 15, smoking history 8, and drinking history 5.

[0180] As another concrete example, in the healthcare field, calculating the L2 norm column-wise, the square root of daily average systolic blood pressure (0.90² + 0.05² + 0.03² + 0.85²) is approximately 1.239, with a normalized score of 90; the square root of medication adherence (0.35² + 0.03² + 0.02² + 0.30²) is approximately 0.462, with a normalized score of 35; exercise duration... The arithmetic square root of (0.10²+0.02²+0.01²+0.08²) is approximately 0.128, with a normalized score of 10; the arithmetic square root of salt intake is (0.05²+0.01²+0.01²+0.04²), with a normalized score of 5; the final importance scores are: daily average systolic blood pressure 90 points, medication adherence 35 points, exercise duration 10 points, and salt intake 5 points.

[0181] Step S1723: Sort the importance scores in descending order and select the top N feature dimensions as the target interventionable feature dimensions.

[0182] Specifically, in this step, the general rule can be N=1 (core feature) or N=2 (core feature + secondary feature); business customization is supported (e.g., health insurance N=2, medical and health N=1), which can be configured in the business rule table without modifying the code.

[0183] Specifically, when selecting the target dimension, the top N feature dimensions can be selected and labeled as "target intrusive feature dimensions"; furthermore, a dimension list can be generated and passed to step S173 for subsequent perturbation.

[0184] As a specific example, in the field of health insurance, the scores are ranked as follows: systolic blood pressure (85) > fasting blood glucose (42) > BMI (15) > smoking history (8) > drinking history (5); N=2, and the first two dimensions are selected: systolic blood pressure and fasting blood glucose (target modifiable feature dimensions).

[0185] As another specific example, in the field of healthcare, the scores are ranked as follows: daily average systolic blood pressure (90) > medication adherence (35) > exercise duration (10) > salt intake (5); N=1, and the first dimension is selected: daily average systolic blood pressure (target modifiable feature dimension).

[0186] It is understandable that the above embodiment further refines step S172 (identifying core manipulable features), creatively achieving precise quantification of the importance of manipulable features through a three-step method of gradient matrix calculation, norm solving, and sorting and filtering. The first step calculates the gradient matrix of the parameter vector relative to the manipulable feature vector, accurately capturing the sensitivity of each manipulable feature dimension to the influence of each parameter dimension. The second step calculates the norm row by row, integrating the dispersed influence of a single feature on multiple parameters into a single importance score, solving the problem of difficulty in quantifying feature importance under multiple parameter dimensions. The third step selects the top N features in descending order of scores as core dimensions, achieving precise focus on core features, avoiding redundancy in interpretation, and providing precise direction for subsequent counterfactual perturbations and natural language interpretation, solving the problems of ambiguous identification of core manipulable features, lack of quantitative basis, and lack of targeted interpretation in existing technologies.

[0187] Step S173: By perturbing the values ​​of the target's operable feature dimension, a modified operable feature vector is generated; Specifically, in this step, continuous features (such as blood pressure, blood sugar, and premium) can be perturbed by ±10% (within the reasonable business range); discrete features (such as medication adherence and exercise type) can be perturbed by "adjacent levels" (such as adherence 90% → 80% / 100%); after perturbing, it is necessary to verify whether the feature value conforms to the business logic (such as systolic blood pressure cannot be <90mmHg), and if it exceeds the range, the boundary value is taken.

[0188] Specifically, during perturbation, only the target identified in perturbation step S172 can be affected by the feature dimension, while the other feature dimensions remain unchanged; two sets of modified feature vectors are generated, namely "positive perturbation" (feature value optimization, such as blood pressure reduction) and "negative perturbation" (feature value deterioration, such as blood pressure increase), to ensure comprehensive interpretation.

[0189] More specifically, the original manipulable feature vector is copied, and the values ​​of the target dimension are replaced with the perturbed values ​​to form the modified manipulable feature vector; a comparison table of feature vectors before and after perturbation is saved, with the perturbation dimension, original value, and perturbation value labeled.

[0190] As a specific example, in the health insurance field, the target feature dimension is systolic blood pressure (original value 150 mmHg); the positive perturbation is 150 multiplied by (1-10%) = 135 mmHg (which is within the physiological range), generating a modified vector of [135 mmHg (systolic blood pressure), 6.5 mmol / L (fasting blood glucose), ...]; the negative perturbation is 150 multiplied by (1+10%) = 165 mmHg, generating a modified vector of [165 mmHg (systolic blood pressure), 6.5 mmol / L (fasting blood glucose), ...].

[0191] As a specific example, in the healthcare field, the target feature dimension is the average daily systolic blood pressure (original value 130 mmHg); the positive perturbation is 130 × (1-10%) = 117 mmHg (greater than 90 mmHg, compliant), generating the modified vector: [117 mmHg (systolic blood pressure), 90% (medication adherence), ...]; the negative perturbation is 130 × (1+10%) = 143 mmHg, generating the modified vector: [143 mmHg (systolic blood pressure), 90% (medication adherence), ...].

[0192] Step S174: Combine the modified interventionist feature vector with the original interventionist feature vector to form an interpretive counterfactual input; Specifically, in this step, the original vector and the modified vector can be encoded and normalized; each counterfactual input contains "feature vector type (original / positive perturbation / negative perturbation) + feature vector value + target dimension label".

[0193] Specifically, the interpretable reverse implementation input set combination rule is as follows: the basic structure is [original manipulable feature vector, positive perturbation manipulable feature vector, negative perturbation manipulable feature vector]; a unique identifier is added to each vector (such as ID_original, ID_positive, ID_negative) to facilitate subsequent parameter comparison and tracing; after combination, it is converted into a tensor format that the model can accept (such as shape=(3, D), where D is the feature dimension).

[0194] As a specific example, in the field of health insurance, the original vector can be [150mmHg, 6.5mmol / L,…] (ID_original); the positive perturbation vector can be [135mmHg, 6.5mmol / L,…] (ID_positive); the negative perturbation vector can be [165mmHg, 6.5mmol / L,…] (ID_negative); the combination is the explanatory counterfactual input as a tensor shape=(3,5) (5 is the number of dimensions of the modifiable features).

[0195] As another concrete example, in the field of healthcare, the original vector can be [130mmHg, 90%,…] (ID_original); the positive perturbation vector can be [117mmHg, 90%,…] (ID_original); the negative perturbation vector can be [143mmHg, 90%,…] (ID_original); the combination is an interpretive counterfactual input of tensor shape=(3, 4) (4 is the number of dimensions of the modifiable features).

[0196] Step S175: Input the explanatory counterfactual input into the conditional generative neural network model to obtain the contrastive multidimensional configuration parameter vector; Specifically, in this step, the three sets of feature vectors in the explanatory counterfactual input are concatenated with the protected feature vector of the target object (the protected features remain unchanged to ensure counterfactual fairness); the trained conditional generative neural network model is input in batches, with the batch size set to 3 to avoid output bias caused by batching.

[0197] More specifically, the model outputs three sets of comparative multidimensional configuration parameter vectors in sequence, corresponding to "original features", "positive perturbation features" and "negative perturbation features" respectively; after output, they are stored in a comparison table, labeled with the corresponding feature vector IDs, and a one-to-one mapping relationship is established.

[0198] As a concrete example, in the health insurance field, three sets of feature vectors (combining protection features) can be input into the CVAE model; the output comparison parameter vectors are: ID_ original is [2200 yuan, 20 years, 8000 yuan, 85%] (consistent with S171); ID_ positive is [1800 yuan, 20 years, 8000 yuan, 85%] (systolic blood pressure decreases, premium decreases); ID_ negative is [2600 yuan, 20 years, 8000 yuan, 85%] (systolic blood pressure increases, premium increases).

[0199] As another concrete example, in the field of healthcare, three sets of feature vectors (combining protective features) can be input into the CVAE model; the output comparison parameter vector is ID_original: [5mg, 40 minutes, 5g, 14 days] (consistent with S171), the output ID_positive is [4mg, 40 minutes, 5g, 21 days] (lower blood pressure, reduced medication, extended follow-up period); the output ID_negative is [6mg, 40 minutes, 5g, 7 days] (higher blood pressure, increased medication, shortened follow-up period).

[0200] Step S176: Generate a natural language explanation based on the difference between the multidimensional configuration parameter vector and the comparison multidimensional configuration parameter vector.

[0201] Specifically, in this step, the difference and difference rate between the "perturbed parameter and the original parameter" can be calculated for each parameter dimension; further focus on the core business parameter dimensions (such as health insurance premiums and medical medication dosages) and ignore secondary dimensions (such as coverage period and salt intake).

[0202] Specifically, templates can be preset according to business scenarios. The templates include "feature dimension + change direction + parameter change + business interpretation"; dynamic numerical values ​​are supported to adapt to the feature / parameter values ​​of different objects.

[0203] Specifically, the generation rules for natural language interpretations can be to prioritize the output of the impact explanations of core features, and then supplement secondary features; the explanations of positive and negative perturbations are presented separately, with clear logic; manual review is supported after generation (optional), and the data is pushed to the business system after the review is passed.

[0204] As a concrete example, in the health insurance field, when calculating the difference, a positive disturbance (systolic blood pressure 150-135 mmHg): premium 2200 → 1800 yuan, difference -400 yuan, difference rate -18.2%; a negative disturbance (systolic blood pressure 150-165 mmHg): premium 2200-2600 yuan, difference +400 yuan, difference rate +18.2%. A natural language explanation could be: "Your current health insurance premium is 2200 yuan / year, the core influencing factor being your systolic blood pressure (currently 150 mmHg). If you control your systolic blood pressure to 135 mmHg, the premium can be reduced to 1800 yuan / year (a decrease of 18.2%); if your systolic blood pressure rises to 165 mmHg, the premium will rise to 2600 yuan / year (an increase of 18.2%)." As another concrete example, in the healthcare field, when calculating differences, a positive perturbation (systolic blood pressure 130-117 mmHg) is calculated as a medication dosage of 5-4 mg, with a difference of -1 mg and a difference rate of -20%; the follow-up period is 14-21 days, and the difference is +7 days; a negative perturbation (systolic blood pressure 130-143 mmHg) is calculated as a medication dosage of 5-6 mg, with a difference of +1 mg and a difference rate of +20%; the follow-up period is 14-7 days, and the difference is -7 days. In natural language, this could be interpreted as: your current hypertension intervention plan involves a daily medication dose of 5 mg and follow-up every 14 days, with the core influencing factor being your average daily systolic blood pressure (currently 130 mmHg). If you control your systolic blood pressure to 117 mmHg, the medication dosage can be reduced to 4 mg / day, and the follow-up period extended to 21 days / time; if your systolic blood pressure rises to 143 mmHg, the medication dosage needs to be increased to 6 mg / day, and the follow-up period shortened to 7 days / time. It is understandable that the above embodiment adds 6 consecutive steps after step S160 (parameter implementation), creatively achieving a dual breakthrough of "dynamic updating of configuration parameters and interpretable generation logic". By detecting significant changes in interventionable features or preset time periods, parameters are triggered to regenerate, solving the problems of static parameters and inability to adapt to changes in target object features in the prior art, ensuring that parameters always fit the actual situation of the target object. At the same time, by identifying core interventionable features, generating counterfactual inputs through perturbation, and comparing parameter differences, a natural language explanation is finally generated, transforming the black-box parameter generation logic of the model into language that humans can understand. This solves the technical pain points of the prior art, such as uninterpretable configuration parameter generation logic, low user acceptance during business implementation, and difficulty in tracing the basis for parameter adjustment, while taking into account both the dynamic adaptability and interpretability of parameters.

[0205] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. Software tools or components not belonging to this company that appear in the embodiments of this application are merely illustrative examples and do not represent actual use.

[0206] In one embodiment, a service configuration device is provided, which corresponds one-to-one with the service configuration methods described in the above embodiments. For example... Figure 6 As shown, the service configuration device includes a data acquisition module 610, a feature recognition module 620, a feature encoding module 630, a model building module 640, a model training module 650, and a parameter output module 660. Detailed descriptions of each functional module are as follows: Data acquisition module 610 is used to acquire feature data of known objects; The feature recognition module 620 is used to analyze the feature data based on the causal discovery algorithm to identify the set of modifiable features and the set of protected features that affect the target business indicators. The feature encoding module 630 is used to encode the operable feature set and the protected feature set into an operable feature vector and a protected feature vector, respectively; The model building module 640 is used to construct the conditional generation model by taking the interventionable feature vector and the protected feature vector as inputs to the conditional generation model and the multi-dimensional configuration parameter vector for business configuration of the known object as outputs of the conditional generation model. The model training module 650 is used to add a counterfactual fairness loss term to the loss function of the conditional generation model and train the conditional generation model. For any training sample of the conditional generation model, the counterfactual fairness loss term is used to constrain the difference between the multidimensional configuration parameter vector generated by the model for the training sample and the counterfactual input to be less than a preset threshold under a specified metric when the protected feature vector of the training sample is modified by intervention to generate a counterfactual input. The parameter output module 660 is used to input the pre-set interferable feature vector and the protected feature vector of the target object into the trained conditional generation model, and output the target multi-dimensional configuration parameter vector for configuring the relevant services of the target object.

[0207] In one embodiment, the model training module 650 is specifically used for: For each training sample in the training sample set of the conditional generation model, deterministic or probabilistic intervention is performed on the protected feature value of the training sample to generate a counterfactual sample corresponding to the training sample. Calculate the difference between the multidimensional configuration parameter vectors output by the conditional generation model for the training samples and the counterfactual samples; The difference value is used as an additional regularization penalty term, which is linearly or non-linearly combined with the loss function of the conditional generation model to form the optimized loss function of the conditional generation model. The conditional generation model is trained based on the optimized loss function.

[0208] In one embodiment, the conditional generation model employs a conditional variational autoencoder; the model training module 650 is specifically used for: The predefined business rules are converted into constraint functions about the multidimensional configuration parameter vector; Based on the augmented Lagrange method, the constraint function is transformed into an additional penalty term, and the additional penalty term is added to the loss function; The training samples are input into the conditional variational autoencoder to map the training samples to latent space distribution parameters, latent variables are sampled from the latent space distribution, and the latent variables are reconstructed into the multidimensional configuration parameter vector by the decoder of the conditional variational autoencoder. The conditional variational autoencoder is trained based on the backpropagation algorithm with the goal of minimizing the value of the loss function.

[0209] In one embodiment, the model training module 650 is further configured to: For each predefined business rule, a rule determination function corresponding to the business rule is constructed using the multidimensional configuration parameter vector as the input of the rule determination function. When the multidimensional configuration parameter vector input to the rule determination function satisfies the business rule, the output value of the rule determination function is zero or a negative number. When the multidimensional configuration parameter vector violates the business rule, the output value of the rule determination function is a positive number, and the value of the positive number is proportional to the severity of the violation of the business rule. During the training process of the conditional generation model, the multidimensional configuration parameter vector output by the conditional generation model is input into each of the rule determination functions. If the output value of the rule determination function is zero or negative, it is determined that the business rule corresponding to the rule determination function is satisfied, and the rule violation metric corresponding to the business rule is recorded as zero. If the output value of the rule determination function is positive, it is determined that the business rule corresponding to the rule determination function is violated, and the positive value output by the rule determination function is used as the violation metric value of the multidimensional configuration parameter vector for the business rule. The multidimensional configuration parameter vector is weighted and summed with the violation metrics of all the business rules to obtain the total rule violation metric corresponding to the multidimensional configuration parameter vector, which is used as the constraint function.

[0210] In one embodiment, the parameter output module 660 is further configured to: When a significant change is detected in the operable feature vector of the target object or a preset time period is reached, the current target multidimensional configuration parameter vector corresponding to the target object is regenerated. For the current target multidimensional configuration parameter vector, identify the target interventionable feature dimension in the interventionable feature vector that has the greatest impact on the target multidimensional configuration parameter vector; By perturbing the values ​​of the target's operable feature dimensions, a modified operable feature vector is generated; The modified and unmodified interventionist feature vectors are combined to form an interpretive counterfactual input; The explanatory counterfactual input is fed into the conditional generative neural network model to obtain a comparative multidimensional configuration parameter vector; A natural language explanation is generated based on the differences between the multidimensional configuration parameter vector and the comparative multidimensional configuration parameter vector.

[0211] In one embodiment, the parameter output module 660 is further configured to: Calculate the gradient matrix of the current target multidimensional configuration parameter vector with respect to the interveneable feature vector; The row norm of the gradient matrix is ​​calculated to obtain the importance score of each dimension of the modifiable feature vector. The importance scores are sorted in descending order, and the top N feature dimensions are selected as the target interventionable feature dimensions.

[0212] In one embodiment, the feature recognition module 620 is specifically used for: For each pair of variables in the feature data, perform a conditional independence test under different subsets of variables; Based on the results of the conditional independence test, a causal directed acyclic graph corresponding to each variable in the feature data is constructed. In the causal directed acyclic graph, the direct causal parent node pointing to the target business indicator is identified as an operable feature; Identify protected nodes that are relevant to the target business metrics as protected features.

[0213] Understandably, background technologies relying on correlation screening can introduce spurious correlations and misjudged protected features, leading the model to learn incorrect features and causing parameters to deviate from actual business requirements. This invention addresses this by using a causal discovery algorithm to analyze feature data and identify the sets of modifiable and protected features that influence target business metrics. The causal discovery algorithm eliminates spurious correlations, retaining only features that genuinely impact target business metrics and clearly distinguishing between modifiable features that can be adjusted and protected features that should not be used as decision-making criteria. This step ensures accurate feature identification from the data source, laying the foundation for generating precise configuration parameters.

[0214] In the background, features are used in a scattered manner, and the model structure is inconsistent, making it difficult to output stable, multi-dimensional, and personalized configuration results. The present invention encodes the intervened feature set and the protected feature set into feature vectors respectively; using these two types of feature vectors as input and a multi-dimensional configuration parameter vector as output, a conditional generation model is constructed. This model is encoded into vectors to achieve feature standardization. The conditional generation model establishes a precise mapping relationship between "individual features and business configurations," enabling it to output exclusive, multi-dimensional configuration parameters for each target object, directly supporting personalized configuration needs.

[0215] The lack of a fairness constraint mechanism in the background technology leads to discriminatory parameters being obtained from objects with the same modifiable features but different protected features. This invention adds a counterfactual fairness loss term to the loss function; for any training sample, when the protected feature is modified to a counterfactual input, the model is constrained to output parameters with a difference of less than a preset threshold between the original sample and the counterfactual input. The counterfactual fairness loss term forces the model to output configuration parameters that are essentially consistent, even if the protected features differ, as long as the modifiable features are the same. This eliminates discrimination based on protected features from the model training mechanism, ensuring fair and compliant configuration results.

[0216] It should be noted that during the model training phase, samples from historical business data are used. Each sample contains: a known object's manipulable feature vector, a protected feature vector, and its corresponding real business configuration parameter vector (as supervision labels). Through the constraint of the counterfactual fairness loss term, the model learns that: given the same manipulable features, even if the protected features are different, the output configuration parameters should not show significant differences.

[0217] During the model inference (application) phase, for the current target object, its modifiable feature vector and protected feature vector are obtained and input into the already trained conditional generative model. Since the model has established a stable and fair mapping relationship from "individual features (causal features + protected features)" to "business configuration parameters", it can directly output the target multidimensional configuration parameter vector for the target object without relying on historical labels.

[0218] This process fully conforms to the standard machine learning paradigm: training the model with historical data and obtaining the output with current data. The trained model possesses two core capabilities: accuracy and fairness. Accuracy is achieved by using causal discovery algorithms to identify the truly influential and actionable features that impact business metrics, outputting configuration parameters that align with business needs. Fairness is ensured by a counterfactual fairness loss term, guaranteeing that only objects with different protected features receive consistent configuration parameters, thus eliminating discrimination.

[0219] In summary, this invention ensures accurate feature recognition (source) through a causal discovery algorithm, achieves personalized parameter mapping (path) through a conditional generation model, and forcibly eliminates discrimination caused by protected features (constraint) through a counterfactual fairness loss term. The combination of these three approaches fundamentally solves the core technical problem that existing technologies cannot simultaneously ensure both the accuracy and fairness of configuration parameters.

[0220] Based on the above business configuration methods, such as Figure 7As shown in the diagram, this embodiment of the invention also provides a schematic diagram of the structure of an apparatus for a service configuration method, the apparatus including a processor 71 and a memory 72 coupled to the processor 71. The memory 72 stores a computer program, which, when executed by the processor 71, causes the processor 71 to perform the steps of the service configuration method described in the above embodiment.

[0221] For further details regarding the implementation of the above technical solution by the processor 71 in the device for the above service configuration method steps, please refer to the description of the service configuration method provided in the above embodiments of the invention, which will not be repeated here.

[0222] The processor 71 can also be called a CPU (Central Processing Unit). The processor 71 may be an integrated circuit chip with signal processing capabilities. The processor 71 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or the processor 71 can be any conventional processor.

[0223] like Figure 8 As shown in the diagram, this embodiment of the invention also provides a schematic diagram of a computer-readable storage medium, on which a readable computer program 81 is stored. The computer program 81 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in various embodiments of the invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks or optical disks, ROM (Read-Only Memory), RAM (Random Access Memory), or terminal devices such as computers, servers, mobile phones, and tablets.

[0224] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or modules, and may be electrical, mechanical, or other forms.

[0225] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0226] Furthermore, the functional modules in the various embodiments of this invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0227] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0228] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., SSD (solid state disk)).

[0229] The technical solution provided by the present invention has been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of ​​the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

[0230] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.

[0231] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0232] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0233] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0234] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A service configuration method, characterized by, include: Obtain feature data of a known object; Based on the causal discovery algorithm, the feature data is analyzed to identify the set of modifiable features and the set of protected features that affect the target business indicators; The manipulateable feature set and the protected feature set are respectively encoded into an manipulateable feature vector and a protected feature vector; The conditional generation model is constructed by using the interventionable feature vector and the protected feature vector as inputs to the conditional generation model, and using the multi-dimensional configuration parameter vector for business configuration of the known object as the output of the conditional generation model. Add a counterfactual fairness loss term to the loss function of the conditional generation model, and train the conditional generation model. For any training sample of the conditional generation model, the counterfactual fairness loss term is used to constrain the difference between the multidimensional configuration parameter vector generated by the model for the training sample and the counterfactual fairness loss term under a specified metric when the protected feature vector of the training sample is modified by intervention to generate counterfactual input. The modifiable feature vector and the protected feature vector of the preset target object are input into the trained conditional generation model, and the target multidimensional configuration parameter vector for configuring the relevant services of the target object is output.

2. The service configuration method of claim 1, wherein, The step of adding a counterfactual fairness loss term to the loss function of the conditional generation model and training the conditional generation model includes: For each training sample in the training sample set of the conditional generation model, deterministic or probabilistic intervention is performed on the protected feature value of the training sample to generate a counterfactual sample corresponding to the training sample. Calculate the difference between the multidimensional configuration parameter vectors output by the conditional generation model for the training samples and the counterfactual samples; The difference value is used as an additional regularization penalty term, which is linearly or non-linearly combined with the loss function of the conditional generation model to form the optimized loss function of the conditional generation model. The conditional generation model is trained based on the optimized loss function.

3. The service configuration method of claim 1, wherein, The conditional generation model employs a conditional variational autoencoder. The step of adding a counterfactual fairness loss term to the loss function of the conditional generation model and training the conditional generation model includes: The predefined business rules are converted into constraint functions about the multidimensional configuration parameter vector; Based on the augmented Lagrange method, the constraint function is transformed into an additional penalty term, and the additional penalty term is added to the loss function; The training samples are input into the conditional variational autoencoder to map the training samples to latent space distribution parameters, latent variables are sampled from the latent space distribution, and the latent variables are reconstructed into the multidimensional configuration parameter vector by the decoder of the conditional variational autoencoder. The conditional variational autoencoder is trained based on the backpropagation algorithm with the goal of minimizing the value of the loss function.

4. The service configuration method of claim 3, wherein, The step of converting predefined business rules into constraint functions about the multidimensional configuration parameter vector includes: For each predefined business rule, a rule determination function corresponding to the business rule is constructed using the multidimensional configuration parameter vector as the input of the rule determination function. When the multidimensional configuration parameter vector input to the rule determination function satisfies the business rule, the output value of the rule determination function is zero or a negative number. When the multidimensional configuration parameter vector violates the business rule, the output value of the rule determination function is a positive number, and the value of the positive number is proportional to the severity of the violation of the business rule. During the training process of the conditional generation model, the multidimensional configuration parameter vector output by the conditional generation model is input into each of the rule determination functions. If the output value of the rule determination function is zero or negative, it is determined that the business rule corresponding to the rule determination function is satisfied, and the rule violation metric corresponding to the business rule is recorded as zero. If the output value of the rule determination function is positive, it is determined that the business rule corresponding to the rule determination function is violated, and the positive value output by the rule determination function is used as the violation metric value of the multidimensional configuration parameter vector for the business rule. The multidimensional configuration parameter vector is weighted and summed with the violation metrics of all the business rules to obtain the total rule violation metric corresponding to the multidimensional configuration parameter vector, which is used as the constraint function.

5. The service configuration method of claim 1, wherein, After inputting the modifiable feature vector and the protected feature vector of the preset target object into the trained conditional generation model and outputting the target multidimensional configuration parameter vector for configuring the relevant services of the target object, the method further includes: When a significant change is detected in the operable feature vector of the target object or a preset time period is reached, the current target multidimensional configuration parameter vector corresponding to the target object is regenerated. For the current target multidimensional configuration parameter vector, identify the target interventionable feature dimension in the interventionable feature vector that has the greatest impact on the target multidimensional configuration parameter vector; By perturbing the values ​​of the target's operable feature dimensions, a modified operable feature vector is generated; The modified and unmodified interventionist feature vectors are combined to form an interpretive counterfactual input; The explanatory counterfactual input is fed into the conditional generative neural network model to obtain a comparative multidimensional configuration parameter vector; A natural language explanation is generated based on the differences between the multidimensional configuration parameter vector and the comparative multidimensional configuration parameter vector.

6. The service configuration method of claim 5, wherein, The step of identifying the target interveneable feature dimension in the interveneable feature vector that has the greatest impact on the current target multidimensional configuration parameter vector includes: Calculate the gradient matrix of the current target multidimensional configuration parameter vector with respect to the interveneable feature vector; The row norm of the gradient matrix is ​​calculated to obtain the importance score of each dimension of the modifiable feature vector. The importance scores are sorted in descending order, and the top N feature dimensions are selected as the target interventionable feature dimensions.

7. The service configuration method according to claim 1, characterized in that, The feature data is analyzed based on a causal discovery algorithm to identify the set of modifiable features and the set of protected features that affect the target business indicators, including: For each pair of variables in the feature data, perform a conditional independence test under different subsets of variables; Based on the results of the conditional independence test, a causal directed acyclic graph corresponding to each variable in the feature data is constructed. In the causal directed acyclic graph, the direct causal parent node pointing to the target business indicator is identified as an operable feature; Identify protected nodes that are relevant to the target business metrics as protected features.

8. A service configuration device, characterized in that, include: The data acquisition module is used to acquire feature data of known objects; The feature recognition module is used to analyze the feature data based on the causal discovery algorithm to identify the set of modifiable features and the set of protected features that affect the target business indicators. The feature encoding module is used to encode the operable feature set and the protected feature set into operable feature vectors and protected feature vectors, respectively; The model building module is used to construct the conditional generation model by taking the interventionable feature vector and the protected feature vector as inputs to the conditional generation model and the multi-dimensional configuration parameter vector for business configuration of the known object as outputs of the conditional generation model. The model training module is used to add a counterfactual fairness loss term to the loss function of the conditional generation model and train the conditional generation model. Specifically, for any training sample of the conditional generation model, the counterfactual fairness loss term is used to constrain the difference between the multidimensional configuration parameter vector generated by the model for the training sample and the counterfactual fairness loss term under a specified metric to be less than a preset threshold when the protected feature vector of the training sample is modified by intervention to generate counterfactual input. The parameter output module is used to input the pre-defined target object's interventionable feature vector and protected feature vector into the trained conditional generation model, and output a target multi-dimensional configuration parameter vector for configuring the relevant services of the target object.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the service configuration method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the service configuration method as described in any one of claims 1 to 7.