A combination rule generation method and device, electronic equipment and storage medium
By generating association rules and performing iterative tracing, the rule generation process is optimized, solving the problems of low coverage and accuracy in existing technologies, and achieving efficient and accurate rule generation.
Patent Information
- Application Number
- CN202311224274.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2026-06-26
- Estimated Expiration
- 2043-09-21
AI Technical Summary
Existing rule generation methods suffer from problems such as high coverage but low accuracy or high accuracy but low coverage, especially when the number of sample features is large, resulting in high manpower costs and time consumption.
By determining multiple original rules, association rules are generated based on unidentified target training samples. During the iteration process, source tracing is performed to generate target combination rules. The rule generation process is optimized by combining rule fitting algorithms and bundle search strategies.
It improves the coverage and accuracy of rule generation, reduces human intervention, lowers computational complexity, and increases efficiency.
Smart Images

Figure CN117251732B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a method, apparatus, electronic device, and storage medium for generating combination rules. Background Technology
[0002] In various business scenarios such as e-commerce, data processing, and finance, there is often a need to filter target samples from a large number of samples, such as customer segmentation and multimedia data retrieval. Rule generation methods have emerged to address this need.
[0003] Rule generation methods refer to methods for mining rules based on given historical samples (including target historical samples and non-target historical samples). These rules can accurately identify target historical samples from the historical samples, enabling the rules to be used for screening subsequent samples. Existing rule generation methods are generally divided into two types: one uses statistical indicators to divide historical samples into quantiles, and then constructs rules based on samples located around the quantiles; the other uses rule fitting algorithms to generate rules.
[0004] However, the first method mentioned above requires manual implementation and is only applicable to numerical sample features. When the number of sample features is large, each sample feature needs to be divided into quantiles, which consumes a lot of manpower and time. While the second method can generate rules quickly, it is prone to problems such as high rule coverage but low accuracy, or high accuracy but low coverage. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for generating combined rules, in order to solve the technical problem that rules generated by current rule generation methods have high coverage but low accuracy, or high accuracy but low coverage.
[0006] According to one aspect of the present invention, a method for generating combination rules is provided, comprising:
[0007] Based on the training set of the current business, several original rules are determined; wherein, the training set includes several non-target training samples and several target training samples;
[0008] For each of the original rules, based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rules, the association rule corresponding to the original rule is determined;
[0009] The target association rule is determined from the association rules corresponding to the multiple original rules;
[0010] If the iteration termination condition is not met, the target association rule is taken as a new original rule, and the process returns to the step of "for each original rule, based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule, determine the association rule corresponding to the original rule".
[0011] If the iteration termination condition is met, then the source is traced for each of the target association rules to determine the target combination rule.
[0012] According to another aspect of the present invention, a combination rule generation apparatus is provided, comprising:
[0013] The first determining module is used to determine multiple original rules based on the training set of the current business; wherein the training set includes several non-target training samples and several target training samples.
[0014] The second determining module is used to determine the association rule corresponding to each original rule based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule.
[0015] The third determining module is used to determine the target association rule from the association rules corresponding to the multiple original rules;
[0016] The execution module is used to return to the second determination module to execute the steps if the iteration termination condition is not met. The target association rule is then used as the new original rule.
[0017] The fourth determination module is used to trace the source of each target association rule and determine the target combination rule if the iteration termination condition is met.
[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0019] At least one processor; and
[0020] A memory that is communicatively connected to at least one processor; wherein,
[0021] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the combination rule generation method of any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the combination rule generation method of any embodiment of the present invention.
[0023] The technical solution of this invention includes: determining multiple original rules based on the training set of the current business, wherein the training set includes several non-target training samples and several target training samples; for each original rule, determining the association rule corresponding to the original rule based on the target training samples among the several non-target training samples and the several target training samples that were not identified by the original rule; determining the target association rule from the association rules corresponding to the multiple original rules; if the iteration termination condition is not met, then taking the target association rule as a new original rule and returning to execute the second step; if the iteration termination condition is met, then tracing the source for each target association rule to determine the target combination rule. It has the following technical effects: Firstly, the solution provided in this embodiment does not require manual rule determination, thus improving the efficiency of determining combined rules. Secondly, in this embodiment, for each original rule or new original rule, the associated rule corresponding to the rule can be determined based on non-target training samples and target training samples that have not been identified by the rule, and it can be iterated continuously in the future, thus improving the coverage and accuracy of the finally determined target combined rules. Thirdly, in this embodiment, the target associated rule can be determined from the associated rules corresponding to multiple original rules for subsequent iterations, which can save implementation complexity compared to using all associated rules for the next iteration. Fourthly, this embodiment can trace the source of each target associated rule to determine the target combined rule, further improving the coverage and accuracy of the determined target combined rule.
[0024] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0026] Figure 1 This is a flowchart illustrating a method for generating combination rules according to an embodiment of the present invention;
[0027] Figure 2 This is a schematic diagram of the operation flow of a rule fitting algorithm provided in an embodiment of the present invention;
[0028] Figure 3 This is a schematic diagram of the original rules generated by a rule fitting algorithm according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of the iterative process of a combination rule generation method provided in an embodiment of the present invention;
[0030] Figure 5 This is a schematic diagram illustrating the process of tracing the source of target association rules to obtain target combination rules in a combination rule generation method provided by an embodiment of the present invention;
[0031] Figure 6 This is a flowchart illustrating a method for generating combination rules according to another embodiment of the present invention;
[0032] Figure 7 This is a schematic diagram illustrating the process of tracing the source of associated rules to obtain intermediate combined rules in a method for generating combined rules according to an embodiment of the present invention.
[0033] Figure 8 This is a schematic diagram of the structure of a combination rule generation device provided in an embodiment of the present invention;
[0034] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0035] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first," "second," "original," "intermediate," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0037] Furthermore, the steps involved in collecting, storing, using, and processing user information in this invention all comply with relevant national laws and regulations.
[0038] Figure 1 This is a flowchart illustrating a method for generating combined rules according to an embodiment of the present invention. This embodiment is applicable to situations where combined rules are generated based on a training set. The method can be executed by a combined rule generation device, which can be implemented in hardware and / or software and can be configured in an electronic device (such as a computer or server). Figure 1 As shown, the method includes the following steps.
[0039] Step 101: Determine multiple original rules based on the training set of the current business.
[0040] The training set includes several non-target training samples and several target training samples.
[0041] In this embodiment, the current business is typically determined by the current business scenario, with different business scenarios corresponding to different businesses. The combined rule generation method provided by this invention is applicable to various business scenarios such as e-commerce, data processing, and finance.
[0042] The training set for the current business includes several training samples. Optionally, the training samples can be determined based on the dimensions of the current business. Different businesses have different dimensions; therefore, the training samples determined based on the dimensions will be different for different businesses, and the training set will also be different. The dimension of the current business can be understood as the smallest unit involved in the current business. For example, when the current business is a financial business, the dimension could be "user." When the current business is a data processing business, such as filtering documents, the dimension could be "document."
[0043] The training set in this embodiment includes several non-target training samples and several target training samples. In this embodiment, target training samples refer to training samples that share certain common features or attributes. Optionally, the target training samples in the training set are determined based on expert experience. The purpose of the combination rule generation method provided in this embodiment is to extract target combination rules that can filter out several target training samples from the training set using several non-target training samples and several target training samples in the training set.
[0044] Optionally, to successfully determine the target combination rule, each training sample may include identification information indicating whether it is a target training sample. Additionally, each training sample includes feature information corresponding to at least one feature. For the same training set, the features of each training sample are the same, but the feature information corresponding to the same feature in different training samples may be the same or different. The number of features in a training sample is at least one. The more features, the more complex the final target rule, and the more accurate the screening result when applying the target rule to the application set; the fewer features, the faster the target rule is determined. In practical applications, the number of features in a training sample can be set according to the actual situation, and this embodiment of the invention does not impose specific limitations on this.
[0045] For example, taking e-commerce or financial business scenarios, the current business may be to target a specific customer group (such as a customer group with a tendency to purchase a certain product, a customer group with financial risk, etc.). The dimension of the current business is the customer, and the training samples are the customer's user information. Assume that training set 1 includes three training samples: user information 1, user information 2, and user information 3. User information 1 includes: identifier 0, user age 25, location Shanghai; user information 2 includes: identifier 0, user age 30, location Beijing; and user information 3 includes: identifier 1, user age 28, location Beijing. Identifier 0 indicates that the training sample is not the target training sample, and identifier 1 indicates that the training sample is the target training sample. Therefore, it can be seen that user information 3 in training set 1 is the target training sample, while user information 1 and 2 are not. Each training sample in this training set has two features: user age and location. The feature information corresponding to each feature of each training sample may be the same or different. For example, the user age in user information 1 is 25 years old, and the user age in user information 2 is 30 years old.
[0046] For example, taking a data processing business scenario, the current business might be to filter certain data files (such as multimedia files). The dimension of the current business is database / folder, and the training samples are files in the database / folder. Assume that training set 2 includes four training samples: file 1, file 2, file 3, and file 4. File 1 includes: identifier 0, file format txt, file size 100 kilobytes (kB), creation time September 10, 2023; file 2 includes: identifier 1, file format txt, file size 200kB, creation time September 10, 2023; file 3 includes: identifier 1, file format doc, file size 1 megabyte (mB), creation time August 10, 2023; and file 4 includes: identifier 0, file format mp4, file size 20mB, creation time August 1, 2023. Here, identifier 0 indicates that the training sample is not the target training sample, and identifier 1 indicates that the training sample is the target training sample. Therefore, it can be seen that files 2 and 3 in training set 2 are target training samples, while files 1 and 4 are not. Each training sample in this training set has three features: file format, file size, and creation time. The feature information corresponding to each feature of each training sample may be the same or different.
[0047] Optionally, in step 101, the training set can be trained using a rule fitting algorithm to obtain multiple original rules.
[0048] The rule-fitting algorithm in this embodiment can be the RuleFit algorithm. Figure 2 This is a schematic diagram illustrating the operation flow of a rule-fitting algorithm provided in an embodiment of the present invention. For example... Figure 2 As shown, the process of training the training set using the rule fitting algorithm mainly consists of the following three steps.
[0049] The first step is to generate M base classifiers (usually random forests or gradient boosting decision trees (GBDTs)) based on the training set, where M is a positive integer. The M base classifiers can be randomly generated based on the training set, and the number of M can be set according to actual needs.
[0050] The second step is to train M base classifiers to generate several rules.
[0051] The third step is to perform linear fitting on the generated rules with a penalty term, ultimately obtaining multiple rules. Assume that step d2 generated j rules, denoted as r1(x), r2(x), ..., r j (x), where j is a fixed value. Among them, t mis the number of leaf nodes of the m-th base classifier. Each rule is treated as a new variable for fitting, and the weight of each rule is linearly fitted by adding a penalty term to the loss function. Finally, w rules are retained and included as the final output rules, where w is a positive integer.
[0052] In one implementation, the rules output by the rule fitting algorithm can all be used as multiple original rules in step 101.
[0053] In another implementation, multiple rules can be filtered based on the evaluation parameters of the rules output by the rule fitting algorithm (e.g., rule importance, rule recall, rule precision, or rule cost-effectiveness value, at least one of these). The filtered specifications can then be used as multiple original rules. Rules can be sorted according to the evaluation parameters, and the rules with the highest evaluation parameters (R, where R is a positive integer) can be selected as the original rules; alternatively, rules with evaluation parameters greater than a preset evaluation parameter threshold can be selected as the original rules.
[0054] This implementation method can reduce the number of original rules, thereby reducing computational complexity.
[0055] In this embodiment, a higher evaluation parameter indicates a higher accuracy and coverage of the rule; a lower evaluation parameter indicates a lower accuracy and coverage of the rule.
[0056] In this embodiment, the original rule corresponds to one or more features in the training samples.
[0057] Figure 3 This is a schematic diagram of the original rules generated by a rule fitting algorithm provided in an embodiment of the present invention. For example... Figure 3 As shown, the original rules generated by the rule fitting algorithm can be three: original rule 1 is x2<3&x5<7, original rule 2 is x2<3&x5>=7, and original rule 3 is x2>=3.
[0058] Step 102: For each original rule, determine the association rule corresponding to the original rule based on several non-target training samples and several target training samples that were not identified by the original rule.
[0059] In this embodiment, the target training sample that fails to be recognized by the original rule refers to the target training sample that cannot be matched with the original rule.
[0060] Optionally, the training samples in this embodiment include feature information corresponding to at least one feature. Before step 102, the combined rule generation method provided in this embodiment may further include the following steps: for each original rule, target training samples whose corresponding feature information does not conform to the original rule are identified as target training samples that cannot be recognized by the original rule. For example, suppose the target training samples include: User 1, age: 28, location: Beijing; User 2, age: 20, location: Beijing; User 3, age: 29, location: Beijing. Suppose that an original rule is that the user is older than 25 and the location is Beijing, then the target training sample that cannot be recognized by the original rule is User 2. The target training samples that can be recognized by the original rule are User 1 and User 2, which can also be said to mean that the original rule matches User 1 and User 2.
[0061] Assume there are K original rules, where K is a positive integer. Assume there are several target training samples Y, and the target training samples identified by the K original rules are: Y1, Y2, ..., Y... k Then, the target training samples that failed to be identified by the K original rules among a number of target training samples are: Y-Y1, Y-Y2, ..., YY k .
[0062] Optionally, in step 102, for each original rule, several non-target training samples and several target training samples from the training set that were not identified by the original rule are input into a rule fitting algorithm to obtain the association rule corresponding to the original rule. The specific generation process can be described with... Figure 2 The process is similar. And... Figure 2 The difference lies in the training samples in the training set. The training set in step 102 is a part of the training set in step 101. That is, the training set in step 102 includes: several non-target training samples from the training set in step 101, and target training samples from the thousands of target training samples in the training set in step 101 that were not identified by the original rule. In the rule generation process in step 102, the rules are based on the non-target samples in the training set and the target samples from the target samples that were not identified by a certain original rule. Therefore, for ease of description in this embodiment, the generated rule is referred to as the association rule corresponding to the original rule.
[0063] In step 102, the associated rules corresponding to each original rule can be determined.
[0064] Step 103: Determine the target association rule from the association rules corresponding to multiple original rules.
[0065] In this embodiment, in order to reduce implementation complexity and improve the coverage of the determined target combination rules, a cluster search strategy is applied to determine the target association rules from the association rules corresponding to multiple original rules.
[0066] In one implementation, the target association rule can be randomly determined from the association rules corresponding to multiple original rules.
[0067] In another implementation, the target association rule can be determined based on the evaluation parameters of the association rules corresponding to multiple original rules. For example, the association rules with the highest evaluation parameters (ranked in the top N) can be identified as the target association rule, where N is an integer greater than 0.
[0068] In another implementation, the association rule can be traced back to obtain the original rule corresponding to the association rule. The association rule and its corresponding original rule are then used as intermediate combination rules for the association rule. Based on the evaluation parameters of the intermediate combination rules, the target association rule is determined. This implementation will be described in detail in subsequent embodiments.
[0069] Step 104: If the iteration termination condition is not met, the target association rule is used as the new original rule, and the process returns to step 102.
[0070] Step 105: If the iteration termination condition is met, trace the source for each target association rule to determine the target combination rule.
[0071] In one implementation, the iteration termination condition in this embodiment can be reaching a preset training duration.
[0072] In another implementation, the iteration termination condition in this embodiment can be reaching a preset number of iterations.
[0073] In another implementation, the iteration termination condition in this embodiment can be that the difference between the evaluation parameters of the target association rules in the last two iterations is less than a preset difference threshold.
[0074] In another implementation, the iteration termination condition in this embodiment can be that the difference in the evaluation parameters of the intermediate combined rules corresponding to the target association rules in the last two iterations is less than a preset difference threshold. This implementation will be described in detail in subsequent embodiments.
[0075] In another implementation, the iteration termination condition in this embodiment can be that the number of times the difference between the evaluation parameters of the intermediate combination rules corresponding to the target association rules in two consecutive iterations is less than a preset difference threshold is greater than a preset threshold.
[0076] In step 104, if the iteration termination condition is not met, the target association rule is used as the new original rule, and the process returns to step 102. That is, for each new original rule, based on several non-target training samples and several target training samples that were not identified by the new original rule, the corresponding association rule is determined.
[0077] In step 105, if the iteration termination condition is met, the source is traced for each target association rule to determine the target combination rule.
[0078] One possible implementation is to trace the source of each target association rule to obtain the new original rule corresponding to the target association rule and the original rule corresponding to the target association rule; and to determine the target association rule, the new original rule corresponding to the target association rule, and the original rule corresponding to the target association rule as the target combination rule.
[0079] It is understandable that the number of target combination rules determined in the end is the same as the number of target association rules.
[0080] Figure 4 This is a schematic diagram illustrating the iterative process of a combination rule generation method provided in an embodiment of the present invention. For example... Figure 4 As shown, assume there are 3 original rules: original rule 1 is x2<3&x5<7, original rule 2 is x2<3&x5>=7, and original rule 3 is x2>=3.
[0081] In the first iteration, for each original rule, based on several non-target training samples and several target training samples that were not identified by the original rule, the corresponding association rule is determined. Assume that three association rules are generated based on original rule 1, named Association Rule 1.1, Association Rule 1.2, and Association Rule 1.3. Three rules are generated based on original rule 2, named Association Rule 2.1, Association Rule 2.2, and Association Rule 2.3. Three rules are generated based on original rule 3, named Association Rule 3.1, Association Rule 3.2, and Association Rule 3.3. It can be understood that Association Rules 1.1, 1.2, and 1.3 can all identify a portion of the target training samples that were not identified by original rule 1.
[0082] Next, the target association rules are determined from these 9 association rules. Let's assume the target association rules are: Association Rule 1.2, Association Rule 2.2, and Association Rule 3.2.
[0083] If the iteration termination condition is not met, then association rule 1.2, association rule 2.2, and association rule 3.2 will be used as new original rules, and the process will return to step 102.
[0084] In the second iteration, for each new original rule, based on several non-target training samples and several target training samples that were not identified by the new original rule, the corresponding association rule is determined. Assume that three association rules are generated based on association rule 1.2, named: Association Rule 1.2.1, Association Rule 1.2.2, and Association Rule 1.2.3. Assume that three rules are generated based on association rule 2.2, named: Association Rule 2.2.1, Association Rule 2.2.2, and Association Rule 2.2.3. Assume that three rules are generated based on association rule 3.2, named: Association Rule 3.2.1, Association Rule 3.2.2, and Association Rule 3.2.3. It can be understood that association rules 1.2.1, 1.2.2, and 1.2.3 can identify a portion of the target training samples that association rule 1.2 failed to identify.
[0085] Next, the target association rules are determined from these 9 association rules. Let's assume the target association rules are: Association Rule 1.2.3, Association Rule 2.2.3, and Association Rule 3.2.3.
[0086] Assuming the iteration conditions are met at this point, the final target association rules are: target association rule 1.2.3, target association rule 2.2.3, and target association rule 3.2.3.
[0087] By tracing the source of each target association rule, the target combination rule can be obtained.
[0088] Figure 5 This is a schematic diagram illustrating the process of tracing the source of target association rules to obtain target combination rules in a combination rule generation method provided by an embodiment of the present invention. For example... Figure 5 As shown, tracing the source of target association rule 1.2.3 yields its corresponding new original rule: association rule 1.2, and its corresponding original rule: original rule 1. Original rule 1, association rule 1.2, and association rule 1.2.3 are then determined as the target combination rule. Tracing the source of target association rule 2.2.3 yields its corresponding new original rule: association rule 2.2, and its corresponding original rule: original rule 2. Original rule 2, association rule 2.2, and association rule 2.2.3 are then determined as the target combination rule. Tracing the source of target association rule 3.2.3 yields its corresponding new original rule: association rule 3.2, and its corresponding original rule: original rule 3. Original rule 3, association rule 3.2, and association rule 3.2.3 are then determined as the target combination rule.
[0089] It can be seen that, Figure 5 Three target combination rules were identified in the example.
[0090] Optionally, based on the above embodiments, after step 105, the following steps may be included: obtaining the application set of the current service, wherein the application set includes several application samples; determining the target application sample in the application set according to the target combination rule and the application set.
[0091] The current business application set includes several application samples. Since the application samples are determined based on the dimensions of the current business, and different businesses have different dimensions, the application samples determined according to their dimensions are different for different businesses, and the application set is also different.
[0092] Furthermore, since both the training set and the application set are determined based on the dimensions of the current business, they are similar. The difference between the training set and the application set is that the training set exists to generate the target combination rule, so it is necessary to know whether each training sample in the training set is a target training sample; that is, the training sample needs to include identification information to indicate whether the training sample is a target sample. On the other hand, the application set is the set in which the target combination rule is actually applied, so the application samples in the application set do not need to include identification information.
[0093] Based on the target combination rules and application set, the target application samples within the application set can be determined. Depending on the current business needs, the target application samples can serve different purposes. For example, if the current business aims to segment customers with a tendency to purchase a certain product, then the target application samples are the customer groups likely to buy that product; therefore, promotional notifications / product recommendations can be sent to this customer group. As another example, if the current business aims to segment customers with financial risk, then the target application samples are the customer groups with financial risk; therefore, risk monitoring can be conducted on this customer group. Yet another example is if the current business is to filter certain text files; then the target application samples are those text files, and further operations can be performed on them.
[0094] Furthermore, when determining the target application samples in the application set based on the target combination rules and the application set, the specific steps may include: determining the target application combination rules within the target combination rules based on the evaluation parameters of the target combination rules; and determining the target application samples in the application set based on the target application combination rules and the application set. That is, in this implementation, a predetermined number of target application combination rules with the highest evaluation parameters can be selected from the target combination rules first. Then, the target application samples in the application set are determined based on the target application combination rules and the application set. This implementation method can reduce implementation complexity.
[0095] The method for generating combined rules provided in this embodiment includes: determining multiple original rules based on the training set of the current business, wherein the training set includes several non-target training samples and several target training samples; for each original rule, determining the associated rule corresponding to the original rule based on the several non-target training samples and the target training samples among the several target training samples that were not identified by the original rule; determining the target associated rule from the associated rules corresponding to the multiple original rules; if the iteration termination condition is not met, the target associated rule is taken as a new original rule and the second step is returned to be executed; if the iteration termination condition is met, the source is traced for each target associated rule to determine the target combined rule. It has the following technical effects: Firstly, the solution provided in this embodiment does not require manual rule determination, thus improving the efficiency of determining combined rules. Secondly, in this embodiment, for each original rule or new original rule, the associated rule corresponding to the rule can be determined based on non-target training samples and target training samples that have not been identified by the rule, and it can be iterated continuously in the future, thus improving the coverage and accuracy of the finally determined target combined rules. Thirdly, in this embodiment, the target associated rule can be determined from the associated rules corresponding to multiple original rules for subsequent iterations, which can save implementation complexity compared to using all associated rules for the next iteration. Fourthly, this embodiment can trace the source of each target associated rule to determine the target combined rule, further improving the coverage and accuracy of the determined target combined rule.
[0096] Figure 6 This is a flowchart illustrating a method for generating combination rules according to another embodiment of the present invention. This embodiment... Figure 1 Based on various optional implementation schemes, this paper provides a detailed explanation of how to determine the implementation method of the target association rule. For example... Figure 6 As shown, the combination rule generation method provided in this embodiment includes the following steps.
[0097] Step 601: Determine multiple original rules based on the training set of the current business.
[0098] The training set includes several non-target training samples and several target training samples.
[0099] The implementation process and technical principles of step 601 are similar to those of step 101, and will not be repeated here.
[0100] Step 602: For each original rule, based on several non-target training samples and several target training samples that were not identified by the original rule, determine the association rule corresponding to the original rule.
[0101] The implementation process and technical principles of step 602 are similar to those of step 102, and will not be repeated here.
[0102] Step 603: Trace the source of each association rule to obtain the new original rule and the original rule corresponding to the association rule, and use the association rule, the new original rule and the original rule corresponding to the association rule as the intermediate combination rule corresponding to the association rule.
[0103] In step 603, after obtaining the association rule in each iteration, the source of each association rule is traced. The new original rule corresponding to the association rule and the original rule are obtained, and these rules and the association rule are used as the intermediate combination rules corresponding to the association rule.
[0104] Figure 7 This is a schematic diagram illustrating the process of tracing the source of association rules to obtain intermediate combined rules in a combined rule generation method provided by an embodiment of the present invention. For example... Figure 7 As shown, in the first iteration, the intermediate combination rule corresponding to association rule 1.1 is: (original rule 1, association rule 1.1). The intermediate combination rule corresponding to association rule 1.2 is: (original rule 1, association rule 1.2). The intermediate combination rule corresponding to association rule 1.3 is: (original rule 1, association rule 1.3).
[0105] The intermediate combination rule corresponding to association rule 2.1 is: (original rule 2, association rule 2.1).
[0106] The intermediate combination rule corresponding to association rule 2.2 is: (original rule 2, association rule 2.2).
[0107] The intermediate combination rule corresponding to association rule 2.3 is: (original rule 2, association rule 2.3).
[0108] The intermediate combination rule corresponding to association rule 3.1 is: (original rule 3, association rule 3.1). The intermediate combination rule corresponding to association rule 3.2 is: (original rule 3, association rule 3.2).
[0109] The intermediate combination rule corresponding to association rule 3.3 is: (original rule 3, association rule 3.3).
[0110] In the second iteration, the intermediate combination rules corresponding to association rule 1.2.1 are: (original rule 1, association rule 1.2, association rule 1.2.1). The intermediate combination rules corresponding to association rule 1.2.2 are: (original rule 1, association rule 1.2, association rule 1.2.2). The intermediate combination rules corresponding to association rule 1.2.3 are: (original rule 1, association rule 1.2, association rule 1.2.3). The intermediate combination rules corresponding to association rule 2.2.1 are: (original rule 2, association rule 2.2, association rule 2.2.1). The intermediate combination rules corresponding to association rule 2.2.2 are: (original rule 2, association rule 2.2, association rule 2.2.2). The intermediate combination rules corresponding to association rule 2.2.3 are: (original rule 2, association rule 2.2, association rule 2.2.3). The intermediate combination rules corresponding to association rule 3.2.1 are: (original rule 3, association rule 3.2, association rule 3.2.1). The intermediate combination rule corresponding to association rule 3.2.2 is: (original rule 3, association rule 3.2, association rule 3.2.2). The intermediate combination rule corresponding to association rule 3.2.3 is: (original rule 3, association rule 3.2, association rule 3.2.3).
[0111] Step 604: For each intermediate combination rule, match the intermediate combination rule as a constraint with the training set of the current business to determine the evaluation parameters of the intermediate combination rule.
[0112] In this embodiment, matching the intermediate combination rule as a constraint with the training set of the current business means determining the training samples in the training set of the current business that conform to the intermediate combination rule.
[0113] In this embodiment, the evaluation parameters of the intermediate combination rule include at least one of the following: the recall rate of the intermediate combination rule, the precision rate of the intermediate combination rule, and the cost-effectiveness value of the intermediate combination rule.
[0114] Step 605: Determine the target association rule from the association rules corresponding to the multiple original rules based on the evaluation parameters of the intermediate combination rules corresponding to the multiple association rules.
[0115] Among them, the target association rule is the association rule whose evaluation parameter is located in the first preset number of intermediate combination rules.
[0116] Example a1: When the evaluation parameter of the intermediate combination rule includes the recall rate of the intermediate combination rule, firstly, the number of recalled samples of the intermediate combination rule is determined based on the feature information of several target training samples. Here, the number of recalled samples of the intermediate combination rule is the number of target training samples whose feature information matches the intermediate combination rule. Then, the recall rate of the intermediate combination rule is determined based on the number of recalled samples of the intermediate combination rule and the number of target training samples in the training set. Optionally, the ratio of the number of recalled samples of the intermediate combination rule to the number of target training samples in the training set is determined as the recall rate of the intermediate combination rule, i.e., the recall rate of the intermediate combination rule = the number of recalled samples of the intermediate combination rule / the number of target training samples in the training set.
[0117] Based on this example, the association rules corresponding to intermediate combination rules with recall rates within the top preset number can be determined as target association rules. Alternatively, the association rules corresponding to intermediate combination rules with recall rates greater than a preset recall rate threshold can be determined as target association rules.
[0118] Example a2: When the evaluation parameter of the intermediate combination rule includes the accuracy of the intermediate combination rule, firstly, the number of recalled samples of the intermediate combination rule is determined based on the feature information of several target training samples. The number of recalled samples is the number of target training samples whose feature information matches the intermediate combination rule. Then, the number of rule-recognized samples of the intermediate combination rule is determined based on the feature information of the training samples. The number of rule-recognized samples is the number of training samples whose feature information matches the intermediate combination rule. Finally, the accuracy of the intermediate combination rule is determined based on the number of recalled samples and the number of rule-recognized samples. Optionally, the ratio of the number of recalled samples to the number of rule-recognized samples is determined as the accuracy of the intermediate combination rule, i.e., accuracy of the intermediate combination rule = number of recalled samples / number of rule-recognized samples.
[0119] Based on this example, the association rules corresponding to intermediate combination rules with accuracy within the first preset number can be identified as target association rules. Alternatively, the association rules corresponding to intermediate combination rules with accuracy greater than a preset accuracy threshold can be identified as target association rules.
[0120] Example a3: When the evaluation parameters of the intermediate combination rule include the cost-effectiveness value of the intermediate combination rule, firstly, based on the feature information of several target training samples, the number of recalled samples of the intermediate combination rule is determined. Here, the number of recalled samples of the intermediate combination rule is the number of target training samples whose feature information matches the intermediate combination rule. Then, based on the feature information of the training samples, the number of rule-recognized samples of the intermediate combination rule is determined. Here, the number of rule-recognized samples of the intermediate combination rule is the number of training samples whose feature information matches the intermediate combination rule. Next, based on the number of recalled samples of the intermediate combination rule, the number of rule-recognized samples of the intermediate combination rule, and the number of target training samples in the training set, the cost-effectiveness value of the intermediate combination rule is determined. Optionally, the ratio of the number of recalled samples of the intermediate combination rule and the sum of the number of rule-recognized samples of the intermediate combination rule and the number of target training samples in the training set is determined as the cost-effectiveness value of the intermediate combination rule, i.e.,
[0121] Based on this example, the association rules corresponding to intermediate combination rules whose cost-effectiveness values are among the first preset number can be determined as the target association rules. Alternatively, the association rules corresponding to intermediate combination rules whose cost-effectiveness values are greater than a preset cost-effectiveness value threshold can be determined as the target association rules.
[0122] Example a4: When the evaluation parameters of the intermediate combination rule include the recall and precision of the intermediate combination rule, the method for determining the recall of the intermediate combination rule can refer to Example a1 above, and the method for determining the precision of the intermediate combination rule can refer to Example a2 above.
[0123] Based on this example, the association rules corresponding to intermediate combination rules with recall rates within the top preset number can be determined as target association rules. Alternatively, the association rules corresponding to intermediate combination rules with recall rates greater than a preset recall rate threshold can be determined as target association rules. Furthermore, the association rules corresponding to intermediate combination rules with precision rates within the top preset number can also be determined as target association rules. Alternatively, the association rules corresponding to intermediate combination rules with precision rates greater than a preset precision rate threshold can be determined as target association rules.
[0124] The evaluation parameters of the intermediate combination rules in this example include a wide range of content, which can increase the diversity of the currently determined association rules, and thus improve the accuracy and coverage of the target combination rules.
[0125] For example a5, when the evaluation parameters of the intermediate combination rule include the recall and cost-effectiveness of the intermediate combination rule, the implementation methods of examples a1, a3 and a4 above can be referred to, and will not be repeated here.
[0126] For example a6, when the evaluation parameters of the intermediate combination rule include the accuracy and cost-effectiveness of the intermediate combination rule, the implementation methods of examples a2, a3 and a4 above can be referred to, and will not be repeated here.
[0127] Example a7: When the evaluation parameters of the intermediate combination rule include the recall rate, accuracy, and cost-effectiveness of the intermediate combination rule, the implementation process of step 604 is as follows: Based on the feature information of several target training samples, determine the number of recalled samples of the intermediate combination rule, where the number of recalled samples of the intermediate combination rule is the number of target training samples whose feature information matches the intermediate combination rule; Based on the feature information of the training samples, determine the number of rule recognition samples of the intermediate combination rule, where the number of rule recognition samples of the intermediate combination rule is the number of training samples whose feature information matches the intermediate combination rule; Based on the number of recalled samples of the intermediate combination rule and the number of target training samples in the training set, determine the recall rate of the intermediate combination rule; Based on the number of recalled samples of the intermediate combination rule and the number of rule recognition samples of the intermediate combination rule, determine the accuracy of the intermediate combination rule; Based on the number of recalled samples of the intermediate combination rule, the number of rule recognition samples of the intermediate combination rule, and the number of target training samples in the training set, determine the cost-effectiveness of the intermediate combination rule.
[0128] Furthermore, the ratio of the number of recalled samples to the number of target training samples in the training set is determined as the recall rate of the intermediate combination rule. The ratio of the number of recalled samples to the number of rule-identified samples of the intermediate combination rule is determined as the accuracy of the intermediate combination rule. The ratio of the number of recalled samples to the sum of the number of rule-identified samples and the number of target training samples in the training set is determined as the cost-effectiveness value of the intermediate combination rule.
[0129] Based on this example, the implementation process of step 605 is as follows: First association rule is determined based on the recall rate of the intermediate combined rules corresponding to multiple association rules, wherein the first association rule is an association rule whose recall rate for the corresponding intermediate combined rule ranks among the top preset number; second association rule is determined based on the precision rate of the intermediate combined rules corresponding to multiple association rules, wherein the second association rule is an association rule whose precision for the corresponding intermediate combined rule ranks among the top preset number; third association rule is determined based on the cost-effectiveness value of the intermediate combined rules corresponding to multiple association rules, wherein the third association rule is an association rule whose cost-effectiveness value for the corresponding intermediate combined rule ranks among the top preset number; the first association rule, the second association rule, and the third association rule are determined as target association rules.
[0130] The following concrete example illustrates how the evaluation parameters are determined. Assume there are 100 training samples in the training set. Of these, 10 are target training samples and 90 are non-target training samples. A certain intermediate combination rule matches 15 training samples, of which 8 are target training samples. Then the recall rate of this intermediate combination rule is... Accuracy rate Cost-performance ratio
[0131] It is understandable that the more content included in the evaluation parameters, the more accurate the final result of the target combination rule. However, considering actual computational efficiency and / or screening objectives, the specific content included in the evaluation parameters can be set according to actual needs. For example, if the goal is high cost-effectiveness, then the evaluation parameters can be designed to include only the cost-effectiveness value. This embodiment of the invention does not impose specific limitations in this regard.
[0132] Step 606: If the iteration termination condition is not met, the target association rule is used as the new original rule, and the process returns to step 602.
[0133] Step 607: If the iteration termination condition is met, trace the source for each target association rule to determine the target combination rule.
[0134] In this embodiment, before steps 606 and 607, the following steps may be included: determining the first evaluation parameter of the intermediate combined rule corresponding to the target association rule; determining the second evaluation parameter of the intermediate combined rule corresponding to the target association rule in the previous iteration; if the difference between the first evaluation parameter and the second evaluation parameter is less than a preset difference threshold, then the iteration termination condition is satisfied; if the difference between the first evaluation parameter and the second evaluation parameter is greater than or equal to the preset difference threshold, then the iteration termination condition is not satisfied. That is, the iteration termination condition in this embodiment is that the difference between the evaluation parameters of the intermediate combined rule corresponding to the target association rule in the last two iterations is less than the preset difference threshold. This iteration termination condition can ensure that the accuracy and coverage of the determined target combined rule are high.
[0135] It can be understood that the difference between the target combination rule and the intermediate combination rule in this embodiment is that the intermediate combination rule corresponding to the target association rule determined in the last iteration is the target combination rule.
[0136] Step 608: Obtain the application set for the current business.
[0137] The application set includes several application samples.
[0138] Step 609: Determine the target application combination rule in the target combination rule based on the evaluation parameters of the target combination rule.
[0139] In step 609, the evaluation parameters of the target combination rule may include at least one of the following: the recall rate of the target combination rule, the precision rate of the target combination rule, and the cost-effectiveness value of the target combination rule.
[0140] Optionally, based on the feature information of several target training samples, the number of recalled samples for the target combination rule is determined, where the number of recalled samples for the target combination rule is the number of target training samples whose feature information matches the target combination rule; based on the feature information of the training samples, the number of rule recognition samples for the target combination rule is determined, where the number of rule recognition samples for the target combination rule is the number of training samples whose feature information matches the target combination rule; based on the number of recalled samples for the target combination rule and the number of target training samples in the training set, the recall rate of the target combination rule is determined; based on the number of recalled samples for the target combination rule and the number of rule recognition samples for the target combination rule, the accuracy of the target combination rule is determined; based on the number of recalled samples for the target combination rule, the number of rule recognition samples for the target combination rule, and the number of target training samples in the training set, the cost-effectiveness value of the target combination rule is determined. The specific determination method can refer to the implementation methods in steps 604 and 605 above, and will not be repeated here.
[0141] When the evaluation parameters of a target combination rule include at least two of the following parameters: recall, precision, and cost-effectiveness, one implementation is to determine the target combination rules that fall within the top preset number based on each of the at least two parameters, and then use all of them as target application combination rules. Another implementation is to perform calculations on the at least two parameters, such as taking the average or the maximum value, and then use the target combination rules whose calculated values fall within the top preset number, or whose calculated values are greater than a preset threshold, as target application combination rules.
[0142] Step 610: Determine the target application samples in the application set based on the target application combination rules and the application set.
[0143] Step 610 and Figure 1 The process of determining the target application sample in the illustrated embodiment is similar and will not be described again here.
[0144] It should be noted that the preset quantities in this embodiment may be the same, partially the same, or completely different.
[0145] The technical solution provided in this embodiment determines the target association rules based on the evaluation parameters of the intermediate combination rules corresponding to each target association rule, which can further improve the accuracy and coverage of the determined target combination rules.
[0146] Figure 8 This is a schematic diagram of a combination rule generation device provided in an embodiment of the present invention. Figure 8 As shown, the combination rule generation device provided in this embodiment includes the following modules: a first determination module 81, a second determination module 82, a third determination module 83, a return execution module 84, and a fourth determination module 85.
[0147] The first determining module 81 is used to determine multiple original rules based on the training set of the current business.
[0148] The training set includes several non-target training samples and several target training samples.
[0149] The second determining module 82 is used to determine the association rule corresponding to each original rule based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule.
[0150] The third determining module 83 is used to determine the target association rule from the association rules corresponding to the multiple original rules.
[0151] Return to execution module 84, which is used to take the target association rule as a new original rule and return to the execution of the steps executed by the second determination module 82 if the iteration termination condition is not met.
[0152] The fourth determining module 85 is used to trace the source of each target association rule and determine the target combination rule if the iteration termination condition is met.
[0153] In one embodiment, the fourth determining module 85 is specifically used to: trace the source for each target association rule to obtain the new original rule corresponding to the target association rule and the original rule corresponding to the target association rule; and determine the target association rule, the new original rule corresponding to the target association rule, and the original rule corresponding to the target association rule as the target combination rule.
[0154] In one embodiment, the second determining module 82 is specifically used to: input the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule into a rule fitting algorithm to obtain the association rule corresponding to the original rule.
[0155] In one embodiment, the device further includes a fifth determining module, a sixth determining module, and a seventh determining module.
[0156] The fifth determining module is used to trace the source of each association rule to obtain the new original rule corresponding to the association rule and the original rule, and to use the association rule, the new original rule corresponding to the association rule, and the original rule as the intermediate combination rule corresponding to the association rule.
[0157] The sixth determining module is used to match the intermediate combination rule as a constraint with the training set of the current service for each intermediate combination rule, and determine the evaluation parameters of the intermediate combination rule.
[0158] The seventh determining module is used to determine the target association rule from the association rules corresponding to the multiple original rules based on the evaluation parameters of the intermediate combination rules corresponding to the multiple association rules.
[0159] The target association rule is the association rule whose evaluation parameter is located in the first preset number of intermediate combination rules.
[0160] In one embodiment, the evaluation parameters of the intermediate combination rule include at least one of the following: the recall rate of the intermediate combination rule, the precision rate of the intermediate combination rule, and the cost-effectiveness value of the intermediate combination rule.
[0161] In one embodiment, each training sample includes: feature information corresponding to at least one feature;
[0162] When the evaluation parameters of the intermediate combination rule include the recall rate, accuracy, and cost-effectiveness of the intermediate combination rule, the sixth determining module is specifically used to: determine the number of recalled samples of the intermediate combination rule based on the feature information of the plurality of target training samples, wherein the number of recalled samples of the intermediate combination rule is the number of target training samples whose feature information matches the intermediate combination rule; determine the number of rule recognition samples of the intermediate combination rule based on the feature information of the training samples, wherein the number of rule recognition samples of the intermediate combination rule is the number of training samples whose feature information matches the intermediate combination rule; determine the recall rate of the intermediate combination rule based on the number of recalled samples of the intermediate combination rule and the number of target training samples in the training set; determine the accuracy of the intermediate combination rule based on the number of recalled samples of the intermediate combination rule and the number of rule recognition samples of the intermediate combination rule; and determine the cost-effectiveness of the intermediate combination rule based on the number of recalled samples of the intermediate combination rule, the number of rule recognition samples of the intermediate combination rule, and the number of target training samples in the training set.
[0163] In one embodiment, regarding the determination of the recall rate of the intermediate combination rule based on the number of recalled samples of the intermediate combination rule and the number of target training samples in the training set, the sixth determining module is specifically configured to: determine the ratio of the number of recalled samples of the intermediate combination rule to the number of target training samples in the training set as the recall rate of the intermediate combination rule. Regarding the determination of the accuracy of the intermediate combination rule based on the number of recalled samples of the intermediate combination rule and the number of rule-identified samples of the intermediate combination rule, the sixth determining module is specifically configured to: determine the ratio of the number of recalled samples of the intermediate combination rule to the number of rule-identified samples of the intermediate combination rule as the accuracy of the intermediate combination rule. Regarding the determination of the cost-effectiveness value of the intermediate combination rule based on the number of recalled samples of the intermediate combination rule, the number of rule-identified samples of the intermediate combination rule, and the number of target training samples in the training set, the sixth determining module is specifically configured to: determine the cost-effectiveness value of the intermediate combination rule as the ratio of the sum of the number of recalled samples of the intermediate combination rule and the number of rule-identified samples of the intermediate combination rule to the number of target training samples in the training set.
[0164] In one embodiment, the seventh determining module is specifically configured to: determine a first association rule based on the recall rate of the intermediate combination rules corresponding to the plurality of association rules, wherein the first association rule is an association rule whose recall rate for the corresponding intermediate combination rule is among the top preset number; determine a second association rule based on the accuracy rate of the intermediate combination rules corresponding to the plurality of association rules, wherein the second association rule is an association rule whose accuracy for the corresponding intermediate combination rule is among the top preset number; determine a third association rule based on the cost-effectiveness value of the intermediate combination rules corresponding to the plurality of association rules, wherein the third association rule is an association rule whose cost-effectiveness value for the corresponding intermediate combination rule is among the top preset number; and determine the first association rule, the second association rule, and the third association rule as the target association rule.
[0165] In one embodiment, each training sample includes feature information corresponding to at least one feature. The apparatus further includes an eighth determining module, configured to, for each original rule, determine target training samples whose corresponding feature information does not conform to the original rule as target training samples that have failed to be recognized by the original rule.
[0166] In one embodiment, the device further includes a ninth determining module, configured to: determine a first evaluation parameter of the intermediate combination rule corresponding to the target association rule; determine a second evaluation parameter of the intermediate combination rule corresponding to the target association rule in the previous iteration process; if the difference between the first evaluation parameter and the second evaluation parameter is less than a preset difference threshold, then determine that the iteration termination condition is met; if the difference between the first evaluation parameter and the second evaluation parameter is greater than or equal to the preset difference threshold, then determine that the iteration termination condition is not met.
[0167] In one embodiment, the device further includes an acquisition module and a tenth determination module.
[0168] The acquisition module is used to acquire the application set of the current service, wherein the application set includes several application samples.
[0169] The tenth determining module is used to determine the target application samples in the application set according to the target combination rules and the application set.
[0170] Optionally, the tenth determining module is specifically used for: determining the target application combination rule in the target combination rule according to the evaluation parameters of the target combination rule; and determining the target application sample in the application set according to the target application combination rule and the application set.
[0171] The combination rule generation device provided in the embodiments of the present invention can execute the combination rule generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0172] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0173] like Figure 9As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0174] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0175] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as combined rule generation methods.
[0176] In some embodiments, the rule generation method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the rule generation method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the rule generation method by any other suitable means (e.g., by means of firmware).
[0177] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0178] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0179] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0180] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0181] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0182] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0183] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0184] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating combination rules, characterized in that, include: Based on the training set of the current business and the rule fitting algorithm, multiple original rules are determined; wherein, the training set includes several non-target training samples and several target training samples, each training sample includes: feature information corresponding to at least one feature, the current business is a business of filtering a certain data file in a data processing scenario, the training sample is a multimedia file, or the current business is a business of defining a certain customer group in an e-commerce scenario or a financial business scenario, the training sample is customer user information; For each of the original rules, based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rules, the association rule corresponding to the original rule is determined; Determining a target association rule from the association rules corresponding to the plurality of original rules includes: tracing the source of each association rule to obtain a new original rule corresponding to the association rule and the original rule, and using the association rule, the new original rule corresponding to the association rule, and the original rule as intermediate combination rules corresponding to the association rule; for each intermediate combination rule, matching the intermediate combination rule as a constraint condition with the training set of the current business to determine the evaluation parameters of the intermediate combination rule; and determining the target association rule from the association rules corresponding to the plurality of original rules based on the evaluation parameters of the intermediate combination rules corresponding to the plurality of association rules; wherein, the target association rule is an association rule whose evaluation parameters of the corresponding intermediate combination rule are among the top preset number of association rules, and the evaluation parameters of the intermediate combination rule include at least one of the following: the recall rate of the intermediate combination rule, the accuracy rate of the intermediate combination rule, and the cost-effectiveness value of the intermediate combination rule; If the iteration termination condition is not met, the target association rule is taken as a new original rule, and the process returns to the step of "for each original rule, based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule, determine the association rule corresponding to the original rule". If the iteration termination condition is met, then the source is traced for each of the target association rules to determine the target combination rule.
2. The method according to claim 1, characterized in that, The step of tracing the source of each of the target association rules to determine the target combination rules includes: For each target association rule, trace its source to obtain the new original rule corresponding to the target association rule and the original rule corresponding to the target association rule. The target association rule, the new original rule corresponding to the target association rule, and the original rule corresponding to the target association rule are determined as the target combination rule.
3. The method according to claim 1, characterized in that, The step of determining the association rule corresponding to the original rule based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule includes: The non-target training samples and the target training samples that were not identified by the original rule are input into the rule fitting algorithm to obtain the association rule corresponding to the original rule.
4. The method according to claim 1, characterized in that, When the evaluation parameters of the intermediate combination rule include the recall rate, precision, and cost-effectiveness of the intermediate combination rule, the step of matching the intermediate combination rule as a constraint with the training set of the current business to determine the evaluation parameters of the intermediate combination rule includes: Based on the feature information of the plurality of target training samples, the number of recalled samples of the intermediate combination rule is determined; wherein, the number of recalled samples of the intermediate combination rule is the number of target training samples whose feature information matches the intermediate combination rule; Based on the feature information of the training samples, the number of rule recognition samples for the intermediate combination rule is determined; wherein, the number of rule recognition samples for the intermediate combination rule is the number of training samples whose feature information matches the intermediate combination rule; The recall rate of the intermediate combination rule is determined based on the number of recalled samples of the intermediate combination rule and the number of target training samples in the training set. The accuracy of the intermediate combination rule is determined based on the number of recalled samples and the number of rule-identified samples of the intermediate combination rule. The cost-effectiveness value of the intermediate combination rule is determined based on the number of recalled samples, the number of rule-identified samples, and the number of target training samples in the training set.
5. The method according to claim 4, characterized in that, Determining the recall rate of the intermediate combination rule based on the number of recalled samples of the intermediate combination rule and the number of target training samples in the training set includes: The recall rate of the intermediate combination rule is determined by the ratio of the number of recalled samples to the number of target training samples in the training set. The step of determining the accuracy of the intermediate combination rule based on the number of recalled samples and the number of rule-identified samples of the intermediate combination rule includes: The ratio of the number of recalled samples to the number of rule-identified samples of the intermediate combination rule is determined as the accuracy of the intermediate combination rule. The step of determining the cost-effectiveness value of the intermediate combination rule based on the number of recalled samples, the number of rule-identified samples, and the number of target training samples in the training set includes: The cost-effectiveness value of the intermediate combination rule is determined by the ratio of the number of recalled samples of the intermediate combination rule and the sum of the number of rule-identified samples of the intermediate combination rule and the number of target training samples in the training set.
6. The method according to claim 4, characterized in that, The step of determining the target association rule from the association rules corresponding to the multiple original rules based on the evaluation parameters of the intermediate combination rules corresponding to the multiple association rules includes: A first association rule is determined based on the recall rate of the intermediate combination rules corresponding to the multiple association rules; wherein, the first association rule is an association rule whose recall rate of the corresponding intermediate combination rule is among the top preset number. A second association rule is determined based on the accuracy of the intermediate combination rules corresponding to the multiple association rules; wherein, the second association rule is an association rule whose accuracy of the corresponding intermediate combination rule ranks among the top preset number. A third association rule is determined based on the cost-effectiveness value of the intermediate combination rules corresponding to the multiple association rules; wherein, the third association rule is the association rule whose cost-effectiveness value of the corresponding intermediate combination rule is among the first preset number of association rules; The first association rule, the second association rule, and the third association rule are determined as the target association rule.
7. The method according to claim 1, characterized in that, Before determining the association rule corresponding to each original rule based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule, the method further includes: For each of the original rules, target training samples whose feature information does not conform to the original rules among the plurality of target training samples are determined as target training samples that have failed to be recognized by the original rules.
8. The method according to claim 1, characterized in that, After determining the target association rule from the association rules corresponding to the plurality of original rules, the method further includes: Determine the first evaluation parameter of the intermediate combination rule corresponding to the target association rule; Determine the second evaluation parameter of the intermediate combination rule corresponding to the target association rule in the previous iteration process; If the difference between the first evaluation parameter and the second evaluation parameter is less than the preset difference threshold, then the iteration termination condition is determined to be met. If the difference between the first evaluation parameter and the second evaluation parameter is greater than or equal to the preset difference threshold, then it is determined that the iteration termination condition is not met.
9. The method according to claim 1, characterized in that, If the iteration termination condition is met, then for each target association rule, tracing is performed to determine the target combination rule, and the method further includes: Obtain the application set of the current service; wherein, the application set includes several application samples; Based on the target combination rules and the application set, the target application samples in the application set are determined.
10. The method according to claim 9, characterized in that, The step of determining the target application samples in the application set according to the target combination rule and the application set includes: Based on the evaluation parameters of the target combination rule, determine the target application combination rule in the target combination rule; Based on the target application combination rules and the application set, a sample of target applications is determined in the application set.
11. A combination rule generation device, characterized in that, include: The first determining module is used to determine multiple original rules based on the training set of the current business and the rule fitting algorithm; wherein, the training set includes several non-target training samples and several target training samples, each training sample includes: feature information corresponding to at least one feature, the current business is a business of filtering a certain data file in a data processing scenario, the training sample is a multimedia file, or the current business is a business of identifying a certain customer group in an e-commerce scenario or a financial business scenario, the training sample is the customer's user information; The second determining module is used to determine the association rule corresponding to each original rule based on the plurality of non-target training samples and the target training samples among the plurality of target training samples that were not identified by the original rule. The third determining module is used to determine a target association rule from the association rules corresponding to the plurality of original rules; wherein, the third determining module is specifically used to: trace the source of each association rule to obtain the new original rule corresponding to the association rule and the original rule, and use the association rule, the new original rule corresponding to the association rule, and the original rule as intermediate combination rules corresponding to the association rule; for each intermediate combination rule, match the intermediate combination rule as a constraint condition with the training set of the current business to determine the evaluation parameters of the intermediate combination rule; determine the target association rule from the association rules corresponding to the plurality of original rules according to the evaluation parameters of the intermediate combination rules corresponding to the plurality of association rules; the target association rule is the association rule whose evaluation parameters of the corresponding intermediate combination rule are among the top preset number of association rules, and the evaluation parameters of the intermediate combination rule include at least one of the following: the recall rate of the intermediate combination rule, the accuracy rate of the intermediate combination rule, and the cost-effectiveness value of the intermediate combination rule; The execution module is used to return to the second determination module to execute the steps if the iteration termination condition is not met. The target association rule is then used as the new original rule. The fourth determination module is used to trace the source of each target association rule and determine the target combination rule if the iteration termination condition is met.
12. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the combination rule generation method according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the combination rule generation method according to any one of claims 1-10.
Citation Information
Patent Citations
Rule strategy group generation method and system and electronic equipment
CN113240259A
Data processing method and device and storage medium
CN116451153A