Rule mining method, device, equipment and product

CN122905017APending Publication Date: 2026-10-13BANK OF COMMUNICATIONS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610882025.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

当结构化数据中的特征数量较多、可选条件较多时,人工构建和调整规则的效率较低

Benefits of technology

[0017]本申请提供的规则挖掘方法、装置、设备及产品中,通过对结构化数据集进行预处理,生成原子条件,并基于规则评价目标对原子条件进行筛选;基于筛选得到的原子条件集合,在规则结构参数限定的规则空间内确定原子条件之间的组合关系,以获得初始规则;再基于规则评价目标和优化算法对初始规则进行规则优化处理,得到目标规则。由于原子条件在规则组合前已经经过筛选,且规则组合过程受到规则结构参数的限定,可以减少低价值原子条件和无效规则组合的搜索;同时,通过在初始规则基础上进行优化,无需重新遍历全部规则组合。因此,本申请能够减少规则生成过程中的搜索开销,提高从结构化数据集中生成满足评价要求的目标规则的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905017A_ABST
    Figure CN122905017A_ABST
Patent Text Reader

Abstract

The application relates to a rule mining method, device, equipment and product. The method comprises the following steps: firstly, acquiring structured data and rule mining parameters, pre-processing the data to form candidate atomic conditions, and screening in combination with an evaluation target; secondly, under the constraint of a rule structure, determining the combination relationship of the atomic conditions by using a search algorithm to generate initial rules; and finally, further optimizing the initial rules according to the evaluation target by using an optimization algorithm to obtain target rules. The scheme can improve the efficiency of generating target rules meeting the evaluation requirements from the structured data set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a rule mining method, apparatus, device, and product. Background Technology

[0002] Rule-based models can be formed by combining multiple atomic conditions according to logical relationships, and are used to predict or classify samples in structured datasets. Because rule-based models can intuitively reflect the judgment criteria, they can be applied to scenarios where interpretability of results is required, such as financial risk control, medical auxiliary judgment, and industrial anomaly identification.

[0003] In related technologies, rule-based models typically require manual selection of features, setting of conditions, and combination of these features from structured data based on business experience to form rules. When the number of features and available conditions in the structured data is large, the efficiency of manually constructing and adjusting rules is low. Even when rules are generated programmatically, it is necessary to search through a large number of atomic conditions and their combinations, and to repeatedly evaluate and optimize the generated rules, resulting in a large amount of processing required to obtain rules that meet the rule evaluation objectives, and low efficiency.

[0004] Therefore, related technologies suffer from the problem of low efficiency in generating rules that meet evaluation requirements from structured datasets. Summary of the Invention

[0005] This application provides a rule mining method, apparatus, device, and product to improve the efficiency of rule mining.

[0006] In a first aspect, embodiments of this application provide a rule mining method, the method comprising: acquiring a structured dataset and rule mining parameters, the rule mining parameters including rule structure parameters and rule evaluation objectives; preprocessing the structured dataset to generate atomic conditions, and filtering the atomic conditions based on the rule evaluation objectives to obtain a set of atomic conditions; obtaining initial rules based on the set of atomic conditions and through a search algorithm; wherein the search algorithm is used to determine the combination relationship between atomic conditions within a rule space defined by the rule structure parameters; and performing rule optimization processing on the initial rules based on the rule evaluation objectives and an optimization algorithm to obtain target rules.

[0007] In one possible embodiment, preprocessing the structured dataset to generate atomic conditions includes: excluding training irrelevant columns from the structured dataset to obtain a dataset to be screened; performing feature importance screening on the features in the dataset to be screened to obtain a screened feature set; performing feature direction significance testing on the features in the screened feature set; determining the condition comparison direction corresponding to the feature based on the significance test result; and generating atomic conditions based on the condition comparison direction.

[0008] In one possible embodiment, the step of performing a feature direction significance test on the features in the filtered feature set, determining the condition comparison direction corresponding to the feature based on the significance test result, and generating the atomic condition based on the condition comparison direction includes: for each filtered feature, performing a significance test on the feature and the corresponding target field; if the significance test result indicates that there is a significant positive correlation between the feature and the target field, then the feature is determined to be a positive feature, and a non-negative atomic condition is generated; if the significance test result indicates that there is a significant negative correlation between the feature and the target field, then the feature is determined to be a negative feature, and a non-positive atomic condition is generated; if the significance test result indicates that there is no significant directional correlation between the feature and the target field, then the feature is determined to be a bidirectional feature, and non-negative and non-positive atomic conditions are generated.

[0009] In one possible embodiment, the rule mining parameters further include quantile granularity; generating the atomic conditions based on the condition comparison direction includes: determining multiple quantile identifiers according to the quantile granularity; calculating the candidate quantiles corresponding to the filtered features under each quantile identifier; and generating atomic conditions in quantile form based on the features, the condition comparison direction, and the quantile identifiers.

[0010] In one possible embodiment, the search algorithm includes a genetic programming algorithm; based on an atomic condition set, and through the search algorithm, initial rules are obtained, including: selecting atomic conditions from the atomic condition set according to rule structure parameters, and combining the selected atomic conditions according to logical relationships to obtain multiple rule individuals; multiple rule individuals constitute a rule population; determining the fitness of each rule individual in the rule population based on a fitness function, and selecting parent rules from the rule population based on the fitness of the rules; wherein, the fitness function includes an evaluation term corresponding to the deviation of the predicted positive sample size and an evaluation term corresponding to the rule structure complexity; performing crossover and / or mutation operations on the parent rules to obtain offspring rules, and updating the rule population based on the offspring rules; evaluating the rule individuals in the updated rule population based on the rule evaluation target, and determining the rule individuals that meet the preset evaluation conditions as initial rules.

[0011] In one possible embodiment, the initial rules are optimized based on the rule evaluation objective and the optimization algorithm to obtain the target rule, including: evaluating the prediction performance, deviation of the predicted positive sample size, and / or rule complexity of the initial rules based on the rule evaluation objective to obtain an initial evaluation result; post-processing the initial rules based on the initial evaluation result and evaluating the post-processed rules to obtain the rule to be optimized; and optimizing the rule parameters of the rule to be optimized using the optimization algorithm to obtain the target rule.

[0012] In one possible embodiment, the optimization algorithm includes a Monte Carlo tree search algorithm; the optimization algorithm optimizes the rule parameters of the rule to be optimized, including: parsing the rule to be optimized into a rule state, and generating parameter adjustment actions based on the rule state, wherein the parameter adjustment actions include actions to increase and / or decrease the threshold of the atomic conditions in the rule to be optimized; expanding the search tree based on the parameter adjustment actions, and evaluating the expanded rule state according to the rule evaluation target; and obtaining the target rule based on the evaluation results.

[0013] Secondly, embodiments of this application provide a rule mining apparatus, comprising: an acquisition module for acquiring a structured dataset and rule mining parameters, the rule mining parameters including rule structure parameters and rule evaluation objectives; a condition generation module for preprocessing the structured dataset to generate atomic conditions, and filtering the atomic conditions based on the rule evaluation objectives to obtain a set of atomic conditions; a rule generation module for obtaining initial rules based on the set of atomic conditions and through a search algorithm; wherein the search algorithm is used to determine the combination relationship between atomic conditions within a rule space defined by the rule structure parameters; and a rule optimization module for performing rule optimization processing on the initial rules based on the rule evaluation objectives and the optimization algorithm to obtain target rules.

[0014] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the method provided above.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided above.

[0016] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described above.

[0017] The rule mining method, apparatus, device, and product provided in this application preprocess a structured dataset to generate atomic conditions, and then filters these atomic conditions based on rule evaluation objectives. Based on the filtered set of atomic conditions, the combination relationships between the atomic conditions are determined within a rule space defined by rule structure parameters to obtain initial rules. Finally, the initial rules are optimized based on the rule evaluation objectives and an optimization algorithm to obtain target rules. Since the atomic conditions have been filtered before rule combination, and the rule combination process is limited by rule structure parameters, the search for low-value atomic conditions and invalid rule combinations can be reduced. Furthermore, by optimizing based on the initial rules, it is unnecessary to re-traverse all rule combinations. Therefore, this application can reduce the search overhead in the rule generation process and improve the efficiency of generating target rules that meet evaluation requirements from structured datasets. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] Figure 1 A schematic diagram illustrating an application scenario provided in an embodiment of this application;

[0020] Figure 2 A flowchart illustrating a rule mining method provided in an embodiment of this application;

[0021] Figure 3 A flowchart illustrating another rule mining method provided in an embodiment of this application;

[0022] Figure 4 This is a schematic diagram of the structure of a rule mining device provided in an embodiment of this application;

[0023] Figure 5 The diagram above illustrates the structure of an electronic device.

[0024] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0026] Figure 1 This is a schematic diagram of a credit approval business scenario. Figure 1 As shown, in the credit approval process, financial institutions can obtain structured data such as the applicant's basic information, credit information, and transaction information, and determine whether the credit application is approved or needs to be transferred to manual review based on the above information.

[0027] In this scenario, to make the approval process understandable and traceable, rules are typically used to express the relationship between applicant information and the approval result. For example, when an applicant's historical delinquency, debt situation, or transaction history meets certain conditions, they can be identified as a high-risk applicant; conversely, when an applicant's credit status and solvency meet certain conditions, they can be determined to meet the approval requirements. Thus, rules are used to combine multiple judgment conditions from structured data and output corresponding approval results based on the combination.

[0028] In existing technologies, the aforementioned rules can be manually set by business personnel based on experience, or they can be mined and generated based on historical business data. However, as the dimensions of applicant information increase, the conditions that can be used to form rules and the combinations of different conditions also increase significantly, resulting in a large workload for manually setting and adjusting rules. Furthermore, generating rules through a program also requires searching within a large rule space.

[0029] Therefore, existing rule generation methods suffer from low efficiency in generating rules that meet approval requirements from structured data.

[0030] To address the aforementioned issues, this application proposes a rule mining method. After obtaining a structured dataset, it further acquires rule mining parameters, including rule structure parameters and rule evaluation objectives. The structured dataset is preprocessed to generate atomic conditions suitable for rule combination. These atomic conditions are then filtered based on the rule evaluation objectives to form a set of atomic conditions. Subsequently, based on this set, a search algorithm is used to determine the combination relationships between atomic conditions within the rule space defined by the rule structure parameters, generating initial rules. Finally, the initial rules are optimized using the rule evaluation objectives and an optimization algorithm to obtain the target rules.

[0031] By employing the above method, this application does not directly search for rules without constraints among all feature conditions and their combinations. Instead, it first converts structured data into atomic conditions, and then selects atomic conditions more suitable for rule generation based on the rule evaluation objective. Initial rules are then generated within the rule space defined by the rule structure parameters, thereby reducing the participation of low-value conditions and invalid rule combinations in the search. Furthermore, this application optimizes the initial rules, obtaining target rules that better meet the rule evaluation objective without re-traversing all rule combinations. Therefore, this application can reduce the search overhead in the rule generation process and improve the efficiency of generating rules that meet evaluation requirements from structured datasets.

[0032] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0033] Example 1

[0034] The execution entity of the rule mining method provided in this application embodiment can be a rule mining device. This device can be deployed on a server, cloud platform, edge computing device, or local computing device, or integrated into a business system for processing structured data. The rule mining device can acquire structured datasets and rule mining parameters, and perform preprocessing, atomic condition generation and filtering, rule generation, and rule optimization on the structured datasets to obtain target rules. In some embodiments, the rule mining device can also invoke parallel computing devices to perform some computational tasks in the rule evaluation, rule search, or rule optimization process. Parallel computing devices can include graphics processing units (GPUs), neural network processing units (NPUs), tensor processing units (TPUs), or other computing units suitable for parallel bitwise operations.

[0035] like Figure 2 The diagram shows a flowchart of a rule mining method provided in this application. The method includes:

[0036] S201: Obtain the structured dataset and rule mining parameters, including rule structure parameters and rule evaluation objectives.

[0037] In this embodiment, the structured dataset serves as the data foundation for rule mining and may include multiple sample records. Each sample record includes multiple feature fields and a target field corresponding to the rule mining task. The feature fields describe different attributes of the sample, and the target field characterizes the classification or judgment result corresponding to the sample.

[0038] For example, in a credit approval scenario, a structured dataset may include feature fields such as the applicant's monthly income, debt ratio, number of historical delinquencies, and transaction history, as well as target fields such as whether the applicant is a high-risk user or whether the credit application has been approved. In subsequent processing, atomic conditions for rule combination can be generated based on the aforementioned feature fields, and the applicability of the rules to the credit approval task can be evaluated based on the target fields.

[0039] Rule mining parameters are used to constrain and guide the rule generation process, including rule structure parameters and rule evaluation objectives. The rule structure parameters limit the rule search scope, while the rule evaluation objectives evaluate whether the atomic conditions and rules meet the requirements of the current rule mining task. By simultaneously acquiring the rule structure parameters and rule evaluation objectives, subsequent atomic condition selection, rule generation, and rule optimization can all be performed around the predetermined rule form and evaluation requirements.

[0040] In one possible embodiment, the rule structure parameters include at least one of the following: the number of atomic conditions allowed in the rule, the allowed logical relationships between atomic conditions, and the maximum level of the rule; the rule evaluation objective includes at least one of the following: a prediction performance objective, a predicted positive sample size requirement, and a rule complexity requirement. The prediction performance objective may include precision, recall, F1 score, or boosting; the predicted positive sample size requirement can be used to limit the deviation between the number of positive samples predicted by the rule and the target number of positive samples; the rule complexity requirement can be used to limit the number of atomic conditions, the logical combination level, or the length of the rule expression in the rule.

[0041] In some embodiments, rule mining parameters may also include parameters such as quantile granularity, number of atomic condition filters, parallel evaluation batch size, optimization search rounds, and threshold adjustment step size. These parameters can be configured by the user or automatically determined based on the data volume, number of features, or business scenario of the structured dataset.

[0042] For example, if the structured dataset corresponding to the credit approval task includes fields such as "monthly income," "debt ratio," "historical number of overdue payments," and "whether the user is at risk," the rule structure parameters can be set as follows: each rule can include a maximum of three atomic conditions, and the atomic conditions can be combined using logical AND and / or logical OR. The rule evaluation target can be set as follows: the rule's accuracy in identifying risky users reaches 90%, and its recall rate reaches 70%. In scenarios with constraints on the positive sample size for prediction, the rule evaluation target can also be set as follows: the deviation between the number of risky users predicted by the rule and the target number of risky users is less than a preset deviation threshold.

[0043] Under the aforementioned parameter constraints, subsequent steps can generate atomic conditions and search for combinations of atomic conditions within the rule space. If the predictive performance of this rule is insufficient, subsequent rule optimization can further adjust the rule around the established rule evaluation objective to obtain a target rule that more closely approximates the evaluation requirements.

[0044] Therefore, this step provides a data foundation for subsequent rule mining by acquiring a structured dataset; it generates a limited rule space for subsequent rules by acquiring rule structure parameters; and it provides an evaluation basis for subsequent atomic condition screening and rule optimization by acquiring rule evaluation objectives, thereby providing a foundation for reducing invalid rule searches and improving the efficiency of target rule generation.

[0045] S202: Preprocess the structured dataset to generate atomic conditions, and filter the atomic conditions based on the rule evaluation objective to obtain a set of atomic conditions.

[0046] In this embodiment, an atomic condition is the smallest judgment unit that can directly participate in rule combination. It can be used to describe whether a certain feature of a sample meets the corresponding judgment condition. For example, in a credit approval scenario, an atomic condition can be "debt ratio greater than the 30th percentile", "historical number of overdue payments greater than the 50th percentile", "monthly income lower than the 50th percentile", or "occupational category belongs to a preset category set", etc. That is, for continuous variables, the atomic condition is a composite pattern of "variable + comparison operator + variable quantile". Multiple atomic conditions can be combined according to logical relationships in subsequent steps to form rules for approval judgment.

[0047] Atomic condition sets are sets of conditions generated from and filtered from structured datasets, used as the basis for subsequent rule searches. Since the original structured data may include fields irrelevant to the rule mining task, or features with complex value formats, numerous candidate decision boundaries, or low correlation with the target result, directly generating and combining rules based on all original fields can easily lead to a large number of conditions that can participate in the combination, increasing the processing load of subsequent rule searches. Therefore, before generating initial rules, the structured dataset can be preprocessed to generate atomic conditions, and then the atomic conditions can be filtered based on the rule evaluation objective.

[0048] In one possible example, preprocessing a structured dataset to generate atomic conditions may include: excluding training irrelevant columns from the structured dataset to obtain a dataset to be filtered; performing feature importance filtering on the features in the dataset to be filtered to obtain a filtered feature set; performing feature direction significance testing on the features in the filtered feature set, determining the condition comparison direction corresponding to the feature based on the significance test results, and generating atomic conditions based on the condition comparison direction. Specifically, training irrelevant columns can be fields that have no direct judgment relationship with the target result or are unsuitable as rule conditions. For example, in a credit approval scenario, a structured dataset may include fields such as applicant number, application time, monthly income, debt ratio, number of historical overdue payments, occupation category, recent transaction information, and whether the applicant is a high-risk user. Among these, the applicant number is mainly used to distinguish different applicants and usually does not reflect the applicant's credit risk, so it can be excluded as a training irrelevant column; fields such as monthly income, debt ratio, number of historical overdue payments, occupation category, and recent transaction information can reflect the applicant's repayment ability or risk status and can be retained for subsequent atomic condition generation. Fields that result write-back, fields that leak target information, and fields with a missing proportion exceeding a preset threshold can also be excluded as training irrelevant columns.

[0049] For example, after excluding training-irrelevant columns, feature importance can be filtered based on the dataset to be filtered. If necessary, the dataset to be filtered can also be divided into different subsets for atomic condition generation, rule evaluation, and rule effectiveness verification, respectively.

[0050] Feature filtering is used to reduce the number of features with low relevance to the target result, severe missing features, or redundant expressions that are included in the atomic condition generation process. In one implementation, feature filtering can be achieved through feature importance filtering, which can employ tree model importance, information gain, mutual information, correlation coefficient, chi-square test, univariate predictive power indicators, coverage indicators, missing rate indicators, or a combination of these methods. By using feature importance filtering, features with a high degree of relevance to the target field can be preferentially retained, reducing the generation of a large number of invalid atomic conditions by low-contribution features.

[0051] For example, in a credit approval scenario, if there is a strong correlation between historical delinquency counts, debt ratio, and recent abnormal transaction indicators and risk user tags, while fields such as applicant number and document entry number do not have a valid correlation with risk user tags, then features such as historical delinquency counts, debt ratio, and recent abnormal transaction indicators can be retained, and atomic conditions should no longer be generated based on fields such as applicant number and document entry number. Through this feature filtering, the number of invalid features generating conditions can be reduced before atomic conditions are formed.

[0052] Furthermore, for each selected feature, a significance test can be performed between the feature and the corresponding target field. If the significance test result indicates a significant positive correlation between the feature and the target field, the feature is determined to be a positive feature, and non-negative atomic conditions are generated, such as "greater than the threshold," "not lower than the threshold," or "belongs to the high-risk range." If the significance test result indicates a significant negative correlation between the feature and the target field, the feature is determined to be a negative feature, and non-positive atomic conditions are generated, such as "less than the threshold," "not higher than the threshold," or "belongs to the low-risk range." If the significance test result indicates no significant directional correlation between the feature and the target field, the feature is determined to be a bidirectional feature, and non-negative and non-positive atomic conditions are generated.

[0053] For example, in a credit approval scenario, if the "debt ratio" is significantly positively correlated with the risk user label, positive atomic conditions such as "debt ratio greater than the 30th percentile" can be generated; if "monthly income" is significantly negatively correlated with the risk user label, negative atomic conditions such as "monthly income less than the 50th percentile" can be generated; if "number of transactions" may correspond to risk in both high and low value ranges, two types of atomic conditions, "number of transactions greater than a preset threshold" and "number of transactions less than a preset threshold," can be generated respectively. By performing feature directional significance testing, it is possible to avoid generating a large number of candidate conditions in the opposite direction to business experience for unidirectional features, thereby reducing the number of invalid atomic conditions and improving business interpretability.

[0054] For the selected continuous features, candidate atomic conditions can be generated based on the condition comparison direction. In one possible embodiment, the rule mining parameters also include quantile granularity; when generating atomic conditions based on the condition comparison direction, multiple quantile identifiers can be determined based on the quantile granularity, and the candidate quantile points corresponding to the selected features under each quantile identifier can be calculated respectively. Atomic conditions expressed in quantile form can then be generated based on the features, condition comparison direction, and quantile identifiers.

[0055] For example, the quantile granularity can be 10%, 20%, 25%, or other preset granularities. When the quantile granularity is 25%, quantile markers such as 0%, 25%, 50%, 75%, and 100% can be determined, and corresponding candidate quantiles can be calculated. For the positive feature "debt ratio," atomic conditions such as "debt ratio is greater than the 75th quantile" can be generated; for the negative feature "monthly income," atomic conditions such as "monthly income is less than the 25th quantile" can be generated. Thus, atomic conditions do not depend on fixed business thresholds but are adaptively generated based on data distribution, which is beneficial for improving the applicability of rule mining on different datasets.

[0056] In other optional methods, for continuous features, candidate atomic conditions can be generated by combining bucket boundaries or business thresholds; for categorical features, atomic conditions can be generated by combining category values ​​or category sets; for Boolean features or state features, atomic conditions can be generated directly based on their values; for fields whose missing states themselves have business meaning, "field is empty" or "field has missing values" can also be used as atomic conditions.

[0057] For example, suppose the structured dataset includes fields such as monthly income, debt ratio, historical overdue payment count, occupation category, recent transaction anomaly indicators, and whether the user is a high-risk user. After feature filtering, the debt ratio, historical overdue payment count, monthly income, and recent transaction anomaly indicators are determined to be used for generating atomic conditions. After binning the debt ratio, atomic conditions for the debt ratio expressed as quantiles are obtained, such as "debt ratio greater than the 30th quantile"; similarly, binning the historical overdue payment count can generate the atomic condition "historical overdue payment count greater than the 50th quantile"; binning the monthly income can generate the atomic condition "monthly income less than the 50th quantile"; and for recent transaction anomaly indicators, "recent transaction status is abnormal" can be directly generated. The above atomic conditions can be used individually to determine whether a sample may be a high-risk user, or they can be combined in subsequent steps to form rules such as "debt ratio greater than the 30th quantile and historical overdue payment count greater than the 50th quantile".

[0058] After generating atomic conditions, each atomic condition can be evaluated and screened based on the rule evaluation objective. The rule evaluation objective can correspond to the expected predictive performance, positive sample size requirement, and / or rule complexity requirement of the target rule. In this step, the suitability of an atomic condition for subsequent rule search can be determined based on its performance on the validation set. Specifically, the precision, recall, positive sample size, coverage, boost, or stability metrics corresponding to the atomic condition can be calculated, and the evaluation result of the atomic condition can be determined based on at least one of these metrics. Among them, the positive sample size can be used to characterize the sample size hit by the atomic condition, and the stability metric can be used to characterize whether the evaluation result of the atomic condition is stable in different data subsets or different time windows.

[0059] For example, in a credit approval scenario, suppose the rule evaluation objective focuses on improving the accuracy of identifying high-risk users and requires the generated rules to have a certain coverage of high-risk users. If the F1 (harmonic mean of precision and recall) corresponding to the atomic condition "debt ratio greater than the 75th percentile" is 60%, the F1 corresponding to the atomic condition "number of historical delinquencies greater than the 25th percentile" is 50%, and the F1 corresponding to the atomic condition "monthly income lower than the 30th percentile" is 50%, then atomic conditions that are more closely matched to the high-risk user identification objective, such as "debt ratio greater than the 75th percentile" and "number of historical delinquencies greater than the 25th percentile," can be prioritized for inclusion in the atomic condition set. This would reduce the participation of atomic conditions with lower evaluation results in subsequent rule combinations.

[0060] In one possible implementation, atomic conditions can be sorted based on their evaluation results, and the size of the atomic condition set can be controlled. For example, the top K atomic conditions with higher evaluation results can be used as the main atomic conditions participating in rule search, while the atomic conditions ranked lower can be used as backup atomic conditions for subsequent rule adjustments. Furthermore, atomic conditions whose evaluation results exceed a preset threshold can be marked as seed conditions, allowing the search algorithm to prioritize these types of atomic conditions when forming individual rules, thereby improving the initial quality of rule generation.

[0061] Furthermore, if multiple atomic conditions originate from the same feature and have similar judgment boundaries, or if the sample coverage corresponding to multiple atomic conditions highly overlaps, the atomic conditions can be merged or deduplicated. For example, if the samples hit by "debt ratio greater than the 75th percentile" and "debt ratio greater than the 70th percentile" are essentially the same, and the evaluation result of "debt ratio greater than the 75th percentile" is better, then "debt ratio greater than the 75th percentile" can be retained as a condition to enter the atomic condition set. This can reduce the duplicate searches caused by atomic conditions with similar meanings participating in subsequent combinations.

[0062] Based on the above analysis, this step first excludes training-irrelevant columns from the structured dataset and partitions the dataset. Then, it filters features, performs feature direction significance testing, encodes features, and / or bins them to generate atomic conditions that can directly participate in logical combination. Next, the atomic conditions are evaluated and filtered based on the rule evaluation objective, resulting in a set of atomic conditions for subsequent rule search. Through this process, atomic conditions with low relevance to the target result or those with repetitive expressions can be reduced before rule combination. This prevents subsequent search algorithms from performing rule searches based on all original features and all possible conditions, thereby reducing invalid rule combinations and improving the efficiency of target rule generation.

[0063] S203: Based on the set of atomic conditions, initial rules are obtained through a search algorithm; wherein, the search algorithm is used to determine the combination relationship between atomic conditions within the rule space defined by the rule structure parameters.

[0064] In this embodiment, the atomic condition set includes multiple atomic conditions that have been filtered and can be used to form rules. A single atomic condition can only reflect the judgment relationship corresponding to one feature. However, in actual business judgment, multiple atomic conditions usually need to be combined according to certain logical relationships to form a rule with complete judgment capabilities. For example, in a credit approval scenario, the single condition "debt ratio greater than 60%" can only reflect part of the applicant's risk situation. However, by combining "debt ratio greater than 60%" with "historical overdue number greater than 2 times" through logical AND relationship, an instantiated rule can be formed to identify higher-risk applicants.

[0065] The search algorithm is used to determine the atomic conditions for rule generation from the set of atomic conditions and to determine the combination relationships between these atomic conditions to obtain initial rules. These initial rules are the result of the search algorithm and are used for subsequent rule optimization. Rule structure parameters are used to limit the rule space that the search algorithm can search. For example, they can limit the number of atomic conditions a rule can contain, the allowed logical relationships, the maximum level of the rule, and the number of rule branches. Limiting the rule space through rule structure parameters avoids the search algorithm from performing unbounded combinations of atomic conditions, keeping the rule search process within a controllable range.

[0066] For example, suppose the following atomic conditions are obtained after processing by S202: A1 is "debt ratio greater than 60%", A2 is "historical overdue number greater than the 30th percentile", A3 is "monthly income lower than the 50th percentile", and A4 is "recent transaction status abnormal". The rule structure parameters can be set to include a maximum of 3 atomic conditions per rule, allowing the use of logical AND and logical OR relations, with a maximum rule level of 2. Within this rule space, rules such as "A1 and A2", "A1 and A4", "A2 or A4", and "A1 and (A2 or A4)" can be generated, instead of generating complex combinations that exceed the limits of the number of atomic conditions or the rule level.

[0067] In one possible embodiment, such as Figure 3 As shown, the search algorithm includes the genetic programming algorithm; S203 may include:

[0068] S2031. Based on the rule structure parameters, select atomic conditions from the atomic condition set, and combine the selected atomic conditions according to logical relationships to obtain multiple rule individuals; multiple rule individuals constitute a rule population.

[0069] S2032. Determine the fitness of each rule individual in the rule population based on the fitness function, and select parent rules from the rule population according to the fitness; wherein, the fitness function includes evaluation terms corresponding to the deviation of the predicted positive sample size and evaluation terms corresponding to the rule structure complexity; S2033. Perform crossover and / or mutation operations on the parent rules to obtain offspring rules, and update the rule population based on the offspring rules; S2034. Evaluate the rule individuals in the updated rule population based on the rule evaluation target, and determine the rule individuals that meet the preset evaluation conditions as the initial rules.

[0070] Specifically, when using the genetic programming algorithm, each rule can be represented as an expression structure consisting of atomic conditions and logical relations. Atomic conditions serve as decision nodes in the rule expression, and logical relations such as AND and OR connect different atomic conditions. The genetic programming algorithm first selects atomic conditions from the set of atomic conditions based on the rule structure parameters, forming multiple rule individuals. These multiple rule individuals constitute a rule population. The rule population provides multiple rule combinations for comparison and evolution, enabling the search algorithm to select and adjust among multiple rule structures.

[0071] Taking the credit approval scenario as an example, the initially formed rule set can include:

[0072] Rule Individual R1: A1 and A2, that is, "debt ratio greater than the 30th percentile and historical number of overdue payments greater than the 50th percentile";

[0073] Rule Individual R2: A1 and A4, that is, "debt ratio greater than the 30th percentile and recent transaction status is abnormal";

[0074] Rule Individual R3: A2 or A4, which means "the number of historical overdue payments is greater than the 50th percentile or the recent transaction status is abnormal";

[0075] Rule Entity R4: A1 and (A2 or A4), that is, "the debt ratio is greater than the 30th percentile, and the number of historical overdue payments is greater than the 50th percentile or the recent transaction status is abnormal".

[0076] For each rule in the rule population, its fitness can be determined based on the rule evaluation objective. Fitness represents the degree of match between an individual rule and the rule evaluation objective, and can be determined based on the rule's predictive performance, the degree of deviation in the number of positive predicted samples, and / or the rule complexity. For example, if the rule evaluation objective includes a risk user identification precision of no less than 90% and a recall of no less than 70%, and requires that the number of atomic conditions contained in the rule does not exceed 3, then precision, recall, and the number of rule conditions can be calculated separately for each individual rule, and fitness can be determined based on the calculation results.

[0077] In one implementation, the fitness function may include a prediction performance evaluation term, a prediction positive sample size deviation evaluation term, and a rule structure complexity evaluation term. The prediction performance evaluation term characterizes the rule's precision, recall, or F1 score; the prediction positive sample size deviation evaluation term characterizes the difference between the number of positive samples predicted by the rule and the target number of positive samples set in the rule evaluation objective; and the rule structure complexity evaluation term characterizes the number of atomic conditions, logical combination levels, or rule expression length contained in the rule. This avoids the search algorithm from solely pursuing prediction performance and generating rules with a significantly deviated number of positive samples from business requirements or overly complex structures.

[0078] When determining the fitness of each rule individual in a rule population, parallel computing devices can be used to evaluate multiple rule individuals in parallel. Specifically, the hit results of each atomic condition in a structured dataset can be converted into bit vectors, and the logical AND, logical OR, and other combinational relationships in the rule individuals can be converted into corresponding bit operations. Then, using parallel computing devices, such as GPUs, NPUs, or TPUs, parallel bit operations can be performed on multiple rule individuals based on the bit vectors to obtain the sample hit results for each rule individual. Finally, based on the sample hit results, the prediction performance, the deviation of the predicted positive sample size, and the rule structure complexity can be calculated to determine the fitness of each rule individual.

[0079] For example, if atomic condition A1 is "debt ratio greater than the 30% quantile", then whether each sample in the structured dataset satisfies A1 can be represented as a bit in a bit vector. If the rule individual is "A1 and A2", then a bitwise AND operation can be performed on the bit vectors corresponding to A1 and A2 to obtain the set of samples matched by that rule individual. If the rule individual is "A1 or A2", then a bitwise OR operation can be performed on the bit vectors corresponding to A1 and A2 to obtain the set of samples matched by that rule individual. In this way, the rule evaluation process can be transformed into bitwise operations suitable for parallel computing devices, thereby improving the evaluation efficiency under large-scale rule populations and large-scale sample data.

[0080] In some embodiments, the bit vectors corresponding to each atomic condition can also be cached. When multiple rule instances reuse the same atomic condition, the cached bit vectors can be read directly without recalculating the hit results of the atomic condition in the sample data. Furthermore, the bit operation results corresponding to some sub-rules can also be cached; when the same sub-rule reappears during the genetic programming iteration, the corresponding bit operation results can be directly called to reduce redundant calculations.

[0081] For example, if R1 has a precision of 92% and a recall of 68%, R2 has a precision of 86% and a recall of 75%, R3 has a precision of 78% and a recall of 88%, and R4 has a precision of 91% and a recall of 73%, then R4, while satisfying the rule structure parameter constraints, is closer to the rule evaluation targets corresponding to precision and recall. Therefore, it can increase the probability that R4 is selected as a parent rule or retained in subsequent search processes.

[0082] After selecting a parent rule, crossover and / or mutation operations can be performed on it. Crossover operations can exchange some atomic conditions or logical structures between two individual rules to obtain new rule combinations. For example, swapping A2 in R1 with A4 in R2 yields descendant rules of "A1 and A4" or "A1 and A2". Mutation operations can adjust the atomic conditions or combination relationships within a single rule. For instance, replacing A2 with A4 in "A1 and A2" yields "A1 and A4"; or, if the rule structure parameters allow, adjusting "A1 and A2" to "A1 and (A2 or A4)".

[0083] By performing crossover and / or mutation operations on parent rules, multiple descendant rules can be generated. These descendant rules are then added to the rule population or replace rule individuals with lower evaluation results in the rule population to complete the rule population update. Subsequently, rule individuals in the updated rule population can be evaluated based on the rule evaluation objectives, and rule individuals that meet the preset evaluation conditions are identified as the initial rules.

[0084] In one example, if the preset evaluation criteria are a precision of no less than 90% and a recall of no less than 70%, and the number of atomic conditions contained in the rule does not exceed three, then the aforementioned R4 can be determined as the initial rule. It should be noted that the initial rule is not the final output target rule, but rather a better rule obtained by the search algorithm within the rule space limited by the rule structure parameters, used as the basis for subsequent rule optimization processing.

[0085] During the search process, multiple rules that meet preset evaluation criteria can be saved, instead of just retaining a single initial rule. For example, besides R4, if a rule has a recall rate slightly lower than the preset target, but its structure is relatively simple or has room for further optimization, it can also be saved for use in subsequent post-processing. By saving rules with a certain evaluation basis during the search process, subsequent optimization can avoid focusing solely on a single rule, thereby increasing the likelihood of obtaining better rules.

[0086] Therefore, this step uses a search algorithm to search for the combinational relationships between atomic conditions within the rule space defined by the rule structure parameters, transforming scattered atomic conditions into initial rules with complete judgment capabilities. Since the search range is limited by the rule structure parameters, and better rules are retained during the search process based on the rule evaluation objective, the processing overhead caused by invalid combinations of atomic conditions can be reduced, improving the efficiency of initial rule generation. Furthermore, by converting the rule evaluation process into parallel bitwise operations based on bit vectors, the evaluation efficiency of multiple individual rules in the rule population can be improved, reducing the computational time of rule search on large-scale structured datasets.

[0087] S204: Based on the rule evaluation objective and optimization algorithm, the initial rules are optimized to obtain the target rules.

[0088] In this embodiment, the initial rule is the rule result obtained by the search algorithm within the rule space defined by the rule structure parameters. Since the search algorithm needs to quickly determine a better combination of atomic conditions within a certain search range, the obtained initial rule may still have some condition redundancy, unsuitable local conditions, or inaccurate threshold boundaries. Therefore, after obtaining the initial rule, it can be further optimized based on the rule evaluation objective and the optimization algorithm to obtain a target rule that better meets the rule evaluation objective.

[0089] In one possible embodiment, the initial rules are optimized based on the rule evaluation objective and the optimization algorithm to obtain the target rule, including: evaluating the prediction performance, deviation of the predicted positive sample size, and / or rule complexity of the initial rules based on the rule evaluation objective to obtain an initial evaluation result; post-processing the initial rules based on the initial evaluation result and evaluating the post-processed rules to obtain the rule to be optimized; and optimizing the rule parameters of the rule to be optimized using the optimization algorithm to obtain the target rule.

[0090] Specifically, prediction performance can be used to represent how well a rule judges a target sample, and may include metrics such as precision, recall, or F1 score. Deviation in the number of predicted positive samples can be used to represent the difference between the number of positive samples predicted by the rule and the target number set in the rule evaluation objective. Rule complexity can be used to represent the number of atomic conditions, logical combination levels, or rule length contained in the rule.

[0091] For example, in a credit approval scenario, suppose the initial rule is "A1 and (A2 or A4)," meaning "the debt ratio is greater than the 30th percentile, and the number of historical overdue payments is greater than the 50th percentile or the recent transaction status is abnormal." If the precision of this initial rule is 91%, the recall is 73%, and the number of predicted risky users is higher than the number of target risky users, then the initial evaluation results can reflect that although the rule meets some predictive performance requirements, further adjustments to the condition range or judgment threshold are still needed to reduce the deviation of the predicted positive sample size.

[0092] After obtaining the initial evaluation results, the initial rules can be post-processed. Post-processing is mainly used to remove redundant conditions or replace unsuitable conditions from the existing rules, so that the rules entering the subsequent parameter optimization process have a better structural foundation.

[0093] In one possible embodiment, post-processing is performed on the initial rules based on the initial evaluation results, and the post-processed rules are evaluated to obtain rules to be optimized. This includes: saving the rules that meet preset evaluation conditions during the execution of the search algorithm; determining the rules to be post-processed from the saved rules and / or the initial rules based on the initial evaluation results; performing pruning and / or condition replacement processing on the rules to be post-processed to obtain post-processed rules; evaluating the post-processed rules based on the rule evaluation target, and determining the rules to be optimized based on the evaluation results. The post-processing may further include redundant condition removal and / or rule deduplication.

[0094] Specifically, during the execution of the search algorithm, rules that meet certain evaluation requirements can be saved. For example, rules with precision reaching a preset threshold, recall reaching a preset threshold, or rule complexity below a preset upper limit can be saved. The saved rules can include the finalized initial rules, or other rules that have an advantage in a certain evaluation metric but have not yet fully met the rule evaluation objectives.

[0095] For example, the following rules can be saved during the search process:

[0096] Rule R4: A1 and (A2 or A4), precision is 91%, recall is 73%;

[0097] Rule R5: A1, A2, and A4, with a precision of 94% and a recall of 66%;

[0098] Rule R6: A2 or A4, with a precision of 80% and a recall of 86%.

[0099] If the rule evaluation objective requires a precision of at least 90% and a recall of at least 70%, then R4 can be used as the initial rule. Meanwhile, since R5 has a higher precision, it can be saved as a rule with further optimization value. In the post-processing stage, rules to be post-processed can be determined from R4 and R5 based on the initial evaluation results.

[0100] Pruning is used to remove atomic conditions that contribute little to the rule evaluation result or increase the rule complexity. For example, for rule R5 "A1 and A2 and A4", if removing A4 results in "A1 and A2", and the precision changes little while the recall increases, then A4 can be considered a removable atomic condition to obtain a more concise post-processing rule.

[0101] Condition substitution processing is used to replace a specific atomic condition in a rule with another atomic condition from the set of atomic conditions that better meets the rule's evaluation objective. For example, if a rule includes "debt ratio greater than the 30th percentile," and evaluation shows that "debt ratio greater than the 35th percentile" can improve recall without significantly reducing precision, then "debt ratio greater than the 35th percentile" can be used to replace the corresponding atomic condition in the original rule to obtain a new post-processing rule.

[0102] Redundant condition removal can be used to delete atomic conditions that highly overlap with other atomic conditions or contribute little to the evaluation results; rule deduplication can be used to delete rules that have the same or highly similar sets of hit samples.

[0103] After completing the pruning and / or condition replacement processes, the post-processed rules can be evaluated based on the rule evaluation objectives, and the rules to be optimized can be determined according to the evaluation results. For example, if pruning R5 yields the rule "A1 and A2" with a precision of 92% and a recall of 71%, this rule can be identified as a rule to be optimized and proceed to the subsequent rule parameter optimization stage.

[0104] After determining the rule to be optimized, the adjustable parameters in the rule can be further optimized using an optimization algorithm. In one possible implementation, the optimization algorithm can employ a Monte Carlo tree search algorithm, which searches for more suitable atomic condition thresholds based on the current rule structure to obtain the target rule.

[0105] In one possible embodiment, the optimization algorithm includes a Monte Carlo tree search algorithm; the optimization algorithm optimizes the rule parameters of the rule to be optimized, including: parsing the rule to be optimized into a rule state, and generating parameter adjustment actions based on the rule state, wherein the parameter adjustment actions include actions to increase and / or decrease the threshold of the atomic conditions in the rule to be optimized; expanding the search tree based on the parameter adjustment actions, and evaluating the expanded rule state according to the rule evaluation target; and obtaining the target rule based on the evaluation results.

[0106] Specifically, the rule state can be used to represent the atomic conditions currently included in the rule to be optimized, the thresholds corresponding to each atomic condition, and the logical relationships between the atomic conditions. Taking the rule to be optimized "A1 and A2" as an example, if A1 is "debt ratio greater than the 30th percentile" and A2 is "historical overdue number greater than the 50th percentile", and the 30th percentile of the debt ratio and the 50th percentile of the historical overdue number are calculated on the training set respectively, then the rule state corresponding to the rule to be optimized can be represented as "debt ratio threshold is 60%, historical overdue number threshold is 2 times, and the two atomic conditions are logically ANDed".

[0107] Based on this rule state, multiple parameter adjustment actions can be generated. For example, for "debt ratio greater than 60%", actions such as "lowering the debt ratio threshold to 58%" or "raising the debt ratio threshold to 62%" can be generated; for "more than 2 historical overdue payments", an action such as "raising the historical overdue payment threshold to 3" can be generated. Each parameter adjustment action corresponds to a different expansion branch in the search tree, and different expansion rule states can be obtained after executing different parameter adjustment actions.

[0108] For example, based on the rule to be optimized, "A1 and A2", we can extend it to:

[0109] Rule status S1: "Debt ratio greater than 58% and number of historical overdue payments greater than 2";

[0110] Rule status S2: "Debt ratio greater than 62% and number of historical overdue payments greater than 2";

[0111] Rule status S3: "Debt ratio greater than 60% and number of historical overdue payments greater than 3 times".

[0112] Each of the above extended rule states can be evaluated based on the rule evaluation objective. If S1 has a precision of 90% and a recall of 75%, S2 has a precision of 94% and a recall of 65%, and S3 has a precision of 96% and a recall of 58%, and the rule evaluation objective requires a precision of no less than 90% and a recall of no less than 70%, then S1 better meets the rule evaluation objective compared to the other extended rule states. Therefore, based on the evaluation results, the search can continue to expand around S1, or the rule corresponding to S1 can be determined as the target rule.

[0113] In some embodiments, during the Monte Carlo tree search process, multiple expanded rule states can be evaluated in parallel based on bit vectors and parallel computing devices. Specifically, the atomic conditional hit results corresponding to the expanded rule states can be represented as bit vectors, and parallel bit operations can be performed using GPUs, NPUs, TPUs, or other parallel computing devices to obtain the sample hit results corresponding to each expanded rule state, and the evaluation results of each expanded rule state can be calculated accordingly. This improves the speed of node expansion and node evaluation during the Monte Carlo tree search process.

[0114] During Monte Carlo tree search, the decision to stop the search can be based on the number of search rounds, the improvement in evaluation results, or whether the target rule meets the evaluation objective. For example, when the number of search rounds reaches a preset number, or when the evaluation result no longer improves after multiple consecutive search rounds, the search can be stopped, and the rule corresponding to the optimal evaluation result can be output as the target rule.

[0115] Through the post-processing and parameter optimization processes described above, the optimization algorithm does not re-search for the target rule from all combinations of atomic conditions. Instead, based on the initial rules already obtained by the search algorithm and the saved better rules, it first obtains a rule with a more suitable structure for optimization through pruning and / or condition substitution. Then, it further searches for the threshold in the rule to be optimized through parameter adjustment. This reduces the repeated search process and improves the efficiency of obtaining the target rule from the initial rules.

[0116] In some embodiments, the rule mining device may also output the evaluation index, number of hit samples, number of predicted positive samples, rule complexity, and rule explanation information corresponding to the target rule, so that users can understand and review the target rule.

[0117] Based on the above analysis, the embodiments of this application preprocess the structured dataset to generate atomic conditions, and then filter them based on the rule evaluation objective to obtain a set of atomic conditions. Next, a search algorithm determines the combination relationships between atomic conditions within the rule space defined by the rule structure parameters to obtain initial rules. Finally, the initial rules are post-processed and their parameters optimized based on the rule evaluation objective and an optimization algorithm to obtain the target rules. Since the atomic conditions have already been filtered before entering the rule search, the rule combination process is limited by the rule structure parameters, and the target rules are further optimized based on existing initial rules, the processing overhead caused by invalid atomic condition combinations and repeated rule searches can be reduced, thus improving the efficiency of generating target rules that meet the evaluation requirements from the structured dataset.

[0118] Furthermore, embodiments of this application can reduce invalid direction conditions through feature direction saliency testing, generate adaptive candidate thresholds for data through quantile granularity, and evaluate rules based on bit vectors through parallel computing devices such as GPUs, NPUs, and TPUs, thereby further reducing the computation time of rule mining under large-scale structured datasets and improving the efficiency of target rule generation.

[0119] Example 2

[0120] Figure 4 This is a schematic diagram of a rule-mining device provided in an embodiment of this application. Figure 4 As shown, the rule mining device 40 includes an acquisition module 41, a condition generation module 42, a rule generation module 43, and a rule optimization module 44.

[0121] The acquisition module 41 is used to acquire structured datasets and rule mining parameters, including rule structure parameters and rule evaluation objectives.

[0122] The condition generation module 42 is used to preprocess the structured dataset, generate atomic conditions, and filter the atomic conditions based on the rule evaluation objective to obtain a set of atomic conditions.

[0123] The rule generation module 43 is used to obtain initial rules based on the set of atomic conditions and through a search algorithm; wherein the search algorithm is used to determine the combination relationship between atomic conditions within the rule space defined by the rule structure parameters.

[0124] The rule optimization module 44 is used to optimize the initial rules based on the rule evaluation objective and the optimization algorithm to obtain the target rules.

[0125] In this embodiment, the rule mining device 40 is used to generate target rules that meet evaluation requirements from a structured dataset. The structured dataset may include multiple sample records, each sample record including multiple feature fields and target fields. The feature fields are used to generate atomic conditions, and the target fields are used to evaluate the processing results of the atomic conditions and rules. The rule structure parameters are used to limit the rule space that can be searched during the rule generation process, and the rule evaluation target is used to evaluate whether the atomic conditions, initial rules, and target rules meet the requirements of the rule mining task.

[0126] The acquisition module 41 is used to acquire structured datasets and rule mining parameters, providing a data and constraint basis for subsequent atomic condition generation, initial rule generation, and target rule optimization.

[0127] The condition generation module 42 is used to preprocess the structured dataset, convert the feature fields into atomic conditions that can directly participate in rule combination, and filter the generated atomic conditions based on the rule evaluation target to obtain a set of atomic conditions.

[0128] In one possible implementation, the condition generation module 42 is specifically used to exclude training irrelevant columns from the structured dataset to obtain a dataset to be screened; to perform feature importance screening on the features in the dataset to be screened to obtain a filtered feature set; to perform feature direction significance testing on the features in the filtered feature set, to determine the condition comparison direction corresponding to the feature based on the significance test result, and to generate atomic conditions based on the condition comparison direction.

[0129] Specifically, if the significance test result indicates a significant positive correlation between the feature and the target field, the condition generation module 42 determines the feature as a positive feature and generates non-negative atomic conditions; if the significance test result indicates a significant negative correlation between the feature and the target field, the condition generation module 42 determines the feature as a negative feature and generates non-positive atomic conditions; if the significance test result indicates no significant directional correlation between the feature and the target field, the condition generation module 42 determines the feature as a bidirectional feature and generates non-negative atomic conditions and non-positive atomic conditions.

[0130] In one possible implementation, the rule mining parameters also include quantile granularity. The condition generation module 42 is further configured to determine multiple quantile identifiers based on the quantile granularity, calculate the candidate quantile points corresponding to the filtered features under each quantile identifier, and generate atomic conditions in quantile form based on the features, condition comparison direction, and quantile identifiers.

[0131] After generating atomic conditions, the condition generation module 42 evaluates and filters the atomic conditions based on the rule evaluation objective, resulting in a set of atomic conditions. This reduces the number of atomic conditions with low contribution or mismatched directions entering the subsequent rule search process.

[0132] The rule generation module 43 is used to determine the combination relationship between atomic conditions within the rule space defined by the rule structure parameters based on the set of atomic conditions and through a search algorithm to obtain the initial rules.

[0133] In one possible implementation, the search algorithm includes a genetic programming algorithm. The rule generation module 43 is specifically used to: select atomic conditions from the atomic condition set according to the rule structure parameters; combine the selected atomic conditions according to logical relationships to obtain multiple rule individuals, which constitute a rule population; determine the fitness of each rule individual in the rule population based on a fitness function; select parent rules from the rule population based on the fitness; perform crossover and / or mutation operations on the parent rules to obtain offspring rules; update the rule population based on the offspring rules; evaluate the rule individuals in the updated rule population based on the rule evaluation objective; and determine the rule individuals that meet the preset evaluation conditions as the initial rules.

[0134] The fitness function includes evaluation terms corresponding to the deviation of the predicted positive sample size and evaluation terms corresponding to the complexity of the rule structure. In this way, the rule generation module 43 can search for better rules within the rule space defined by the rule structure parameters, and reduce the search overhead caused by unconstrained rule combinations.

[0135] The rule optimization module 44 is used to optimize the initial rules based on the rule evaluation objective and the optimization algorithm to obtain the target rules.

[0136] In one possible implementation, the rule optimization module 44 is specifically used to evaluate the prediction performance, deviation of the predicted positive sample size, and / or rule complexity of the initial rule based on the rule evaluation objective, and obtain the initial evaluation result; to perform post-processing on the initial rule based on the initial evaluation result, and to evaluate the post-processed rule to obtain the rule to be optimized; and to optimize the rule parameters of the rule to be optimized using an optimization algorithm to obtain the target rule.

[0137] In one possible implementation, the optimization algorithm includes a Monte Carlo tree search algorithm. The rule optimization module 44 is specifically used to parse the rule to be optimized into a rule state, and generate parameter adjustment actions based on the rule state. These parameter adjustment actions include actions to increase and / or decrease the threshold of atomic conditions in the rule to be optimized; expand the search tree based on the parameter adjustment actions; evaluate the expanded rule state according to the rule evaluation target; and obtain the target rule based on the evaluation results.

[0138] Therefore, the rule mining device 40 generates and filters atomic conditions through the condition generation module 42, obtains initial rules within the rule space defined by the rule structure parameters through the rule generation module 43, and further optimizes the initial rules through the rule optimization module 44, which can improve the efficiency of generating target rules that meet the evaluation requirements from the structured dataset.

[0139] The rule mining device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0140] Example 3

[0141] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0142] In the specific implementation process, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to execute the above-mentioned rule mining method.

[0143] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0144] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0145] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0146] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0147] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the rule mining method described above.

[0148] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the aforementioned rule mining method.

[0149] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0150] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0151] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units 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, devices, or units, and may be electrical, mechanical, or other forms.

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

[0153] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0154] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0155] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0156] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A rule mining method, characterized in that, The method includes: Obtain a structured dataset and rule mining parameters, wherein the rule mining parameters include rule structure parameters and rule evaluation objectives; The structured dataset is preprocessed to generate atomic conditions, and the atomic conditions are filtered based on the rule evaluation objective to obtain a set of atomic conditions; Based on the set of atomic conditions, an initial rule is obtained through a search algorithm; wherein, the search algorithm is used to determine the combination relationship between atomic conditions within the rule space defined by the rule structure parameters; Based on the rule evaluation objective and optimization algorithm, the initial rules are optimized to obtain the target rules.

2. The method according to claim 1, characterized in that, The preprocessing of the structured dataset to generate atomic conditions includes: The training-irrelevant columns are excluded from the structured dataset to obtain the dataset to be screened; The features in the dataset to be filtered are filtered by feature importance to obtain the filtered feature set; The features in the filtered feature set are subjected to a feature direction significance test. Based on the significance test results, the condition comparison direction corresponding to the feature is determined, and the atomic condition is generated based on the condition comparison direction.

3. The method according to claim 2, characterized in that, The step of performing a feature direction significance test on the features in the filtered feature set, determining the condition comparison direction corresponding to the feature based on the significance test result, and generating the atomic condition based on the condition comparison direction includes: For each of the filtered features, a significance test is performed on the feature and the corresponding target field; If the significance test result indicates that there is a significant positive correlation between the feature and the target field, then the feature is determined to be a positive feature, and a non-negative atomic condition is generated; If the significance test result indicates that there is a significant negative correlation between the feature and the target field, then the feature is determined to be a negative feature, and a non-positive atomic condition is generated; If the significance test result indicates that there is no significant directional correlation between the feature and the target field, then the feature is determined to be a bidirectional feature, and non-negative atomic conditions and non-positive atomic conditions are generated.

4. The method according to claim 2, characterized in that, The rule mining parameters also include quantile granularity; the generation of the atomic conditions based on the condition comparison direction includes: Multiple quantile identifiers are determined based on the quantile granularity; Calculate the candidate quantiles corresponding to the filtered features under each quantile identifier; Atomic conditions are generated in quantile form based on the features, the condition comparison direction, and the quantile identifier.

5. The method according to claim 1, characterized in that, The search algorithm includes a genetic programming algorithm; the process of obtaining initial rules based on the atomic condition set and through the search algorithm includes: Based on the rule structure parameters, atomic conditions are selected from the set of atomic conditions, and the selected atomic conditions are combined according to logical relationships to obtain multiple rule individuals; the multiple rule individuals constitute a rule population. The fitness of each rule individual in the rule population is determined based on the fitness function, and parent rules are selected from the rule population according to the fitness; wherein, the fitness function includes an evaluation term corresponding to the deviation of the predicted positive sample size and an evaluation term corresponding to the rule structure complexity; Perform crossover and / or mutation operations on the parent rules to obtain offspring rules, and update the rule population based on the offspring rules; The rule individuals in the updated rule population are evaluated based on the rule evaluation objective, and the rule individuals that meet the preset evaluation conditions are determined as the initial rules.

6. The method according to claim 1, characterized in that, The step of optimizing the initial rules based on the rule evaluation objective and optimization algorithm to obtain the target rules includes: Based on the rule evaluation objective, the prediction performance, deviation of the predicted positive sample size, and / or rule complexity of the initial rule are evaluated to obtain the initial evaluation result; The initial rules are post-processed based on the initial evaluation results, and the post-processed rules are evaluated to obtain the rules to be optimized. The optimization algorithm is used to optimize the rule parameters of the rule to be optimized, thereby obtaining the target rule.

7. The method according to claim 6, characterized in that, The optimization algorithm includes the Monte Carlo tree search algorithm; the optimization of the rule parameters of the rule to be optimized using the optimization algorithm includes: The rule to be optimized is parsed into a rule state, and a parameter adjustment action is generated based on the rule state. The parameter adjustment action includes actions to increase and / or decrease the threshold of the atomic conditions in the rule to be optimized. The search tree is expanded by adjusting the actions based on the parameters, and the expanded rule status is evaluated according to the rule evaluation target. The target rules are obtained based on the evaluation results.

8. A regular excavation device, characterized in that, The device includes: The acquisition module is used to acquire structured datasets and rule mining parameters, including rule structure parameters and rule evaluation objectives. The condition generation module is used to preprocess the structured dataset, generate atomic conditions, and filter the atomic conditions based on the rule evaluation objective to obtain a set of atomic conditions. The rule generation module is used to obtain initial rules based on the set of atomic conditions and through a search algorithm; wherein the search algorithm is used to determine the combination relationship between atomic conditions within the rule space defined by the rule structure parameters; The rule optimization module is used to optimize the initial rules based on the rule evaluation target and the optimization algorithm to obtain the target rules.

9. An electronic device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.