Entity enhancement rule mining method and device, equipment and medium
By initializing and iteratively updating the rule set in rule mining, combining the screening of correlation and diversity metrics, the problem of inefficient rule mining in the existing technology is solved, and efficient rule discovery is achieved.
Patent Information
- Application Number
- CN202410938865.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-29
AI Technical Summary
Existing rule mining methods have problems with too many irrelevant rules, high costs and redundant rules in the industry, resulting in inefficiency in finding novel rules that meet your needs.
By initializing the initial mining rule set and the used predicate set as an empty set, candidate predicates are merged to construct candidate rules, and profit scores are performed based on preset correlation metrics and diversity metrics, filter candidate best rule subsets, and iteratively update rules Set until the preset number of characters or iterations are reached.
Reduce unnecessary interference, avoid rule redundant processing, improve rule discovery efficiency, and significantly reduce processing time.
Smart Images

Figure CN119047560A_ABST
Abstract
Description
Technical Field
[0001] The present application is applicable to the field of big data mining technology, and in particular, relates to a method, device, equipment and medium for mining entity enhancement rules. Background Art
[0002] Logical rules have been widely used in data cleaning, association analysis, knowledge discovery, online recommendation, drug discovery, and manufacturing. In order to use rules in practice, we must discover high-quality rules from real data. Many rule discovery methods have been studied. These methods usually take a dataset D as input and mine or learn rules from D so that the rules have support and confidence above a predefined threshold. Support measures the frequency with which a rule can be applied, and confidence evaluates the degree of association between the premise and the result. However, practitioners in the industry have raised the following questions about previous rule discovery methods:
[0003] (1) Too many irrelevant rules. Previous methods usually return the entire set of rules Σ that are satisfied on D. all , where the support and confidence of each rule are high enough and this set is usually quite large. For example, from a small data set with 27 attributes and 368 tuples, 128,726 functional dependency rules were found. Users are often overwhelmed by too many rules and have to spend a lot of time manually checking and selecting rules that meet their needs. Moreover, practitioners often have formed prior knowledge of their applications and even accumulated certain rules after years of practice. Therefore, practitioners want unknown / novel rules that meet their needs, rather than those that are already known or common sense.
[0004] (2) High cost. Mining the entire rule set from D is very expensive. Previous methods enumerate all candidate rules, and for each rule, their support and confidence are verified by applying it on the entire dataset. For example, even with 20 machines, it takes >3 hours on a dataset with 1.68 million tuples. In addition, applying a large number of mined rules to the full dataset is usually expensive.
[0005] (3) Redundant rules. To reduce the number of irrelevant rules and the cost of rule discovery, previous methods have studied top-k rule discovery, finding the top-ranked rules based on objective metrics (support and confidence) and subjective metrics (relevance to user needs). However, since the returned rules are often too "homogeneous" to each other, they are usually considered redundant.
[0006] Typical rule discovery algorithms are based on depth-first or breadth-first search and can be roughly divided into the following two steps: (1) Find all REE rules that meet the support / confidence threshold in the relational data Σall ; (2) From Σ all Select k rules from the set to form a rule subset Σ, so that the objective function F(Σ) is maximized.
[0007] Step 1: For each REE result e, these methods store two sets of predicates: P sel and P re . Among them, P sel What is stored is the predicate that has been selected to form the REE condition, and P re The predicates to be selected are stored. sel is an empty set, P re is the set of all possible predicates. Then the rule discovery algorithm traverses the search space in a depth-first or breadth-first manner and iteratively selects P re The predicate in P sel In essence, they are a process of enumerating all permutations and combinations of predicates on the data and verifying them one by one. For all possible predicates, any one or more of them can form a valid rule with the REE result e. Therefore, in order to perform rule discovery, existing methods need to try all permutations and combinations of predicates. In this way, all REE rules that meet the support / confidence threshold are obtained.
[0008] Step 2: Σ all After calculating, enumerate Σ again all For each subset of rules, we calculate their ranking score F(Σ) and finally return the k rules with the highest scores.
[0009] The main disadvantage of the top-k rule discovery method based on brute force enumeration is that its computational efficiency is very low. In order to obtain the rule subset with the highest k rules, the existing technology first needs to enumerate all possible rules that satisfy the data and calculate the corresponding support / confidence to obtain all the rules Σ all However, in practice, users are often only interested in the top-ranked rules and should not pay the cost of traversing all rules. all The scale is often in the millions. Secondly, in order to obtain Σ all The rule subset of the k rules with the highest scores in it, the existing technology needs to enumerate Σ again all The rule subsets of all k rules in it, and the ranking score F(Σ) is calculated for each rule subset. When the data scale is large, the efficiency of such brute force trial is undoubtedly very low. Even if Σ all There are only 100 rules, and choosing 10 of them requires 1.7*10 enumerations. 13Even if each subset takes only 1 millisecond to process, it will take 548 years to process all the subset combinations.
[0010] Therefore, how to reduce unnecessary interference in rule mining and thus improve the efficiency of rule discovery has become an urgent problem to be solved. Summary of the invention
[0011] In view of this, the embodiments of the present application provide a method, apparatus, device and medium for mining entity enhancement rules to solve the problem of how to reduce unnecessary interference in rule mining and thus improve the efficiency of rule discovery.
[0012] In a first aspect, an embodiment of the present application provides a method for mining entity enhancement rules, the mining method comprising:
[0013] Initializing the initial mining rule set and the used predicate set to empty sets, merging each candidate predicate in the candidate predicate set with the used predicate set to obtain the used predicate set corresponding to the candidate predicate, using all predicates in the used predicate set of each candidate predicate, combined with the rule target of the known rule, to construct the corresponding candidate rule;
[0014] According to the preset relevance metric and the preset diversity metric, each candidate rule and the rule obtained by its extension are scored for benefits, and the upper bound and the lower bound of the benefit score corresponding to each candidate rule are obtained;
[0015] Calculate the credibility of each candidate rule, determine the candidate best rule subset and the next round of iteration candidate rule subset according to the upper bound of the profit score, the lower bound of the profit score and the credibility of each candidate rule, and add each rule in the candidate best rule subset to the initial mining rule set to obtain the updated rule set corresponding to each rule;
[0016] Calculate the profit improvement of each updated rule set compared to the initial mining rule set, determine the rule corresponding to the updated rule set with the highest profit improvement as the best rule for this round of iteration, add the best rule to the initial mining rule set to obtain an updated mining rule set, add the rules in the candidate best rule subset except the best rule to the candidate rule subset for the next round of iteration to obtain an updated candidate rule subset for the next round of iteration;
[0017] In the next round of iteration, the updated candidate rule subset for the next round of iteration is used for extended search to obtain extended rules, which are used as candidate rules, and the updated mining rule set is used as the initial mining rule set. The process returns to calculate the credibility of each candidate rule until the number of rules in the updated mining rule set reaches a preset number or a preset number of iterations, thereby obtaining an updated mining rule set.
[0018] In a second aspect, an embodiment of the present application provides a mining device for entity enhancement rules, the mining device comprising:
[0019] A candidate rule construction module is used to initialize the initial mining rule set and the used predicate set to empty sets, merge each candidate predicate in the candidate predicate set with the used predicate set to obtain the used predicate set corresponding to the candidate predicate, and use all predicates in the used predicate set of each candidate predicate, combined with the rule target of the known rule, to construct the corresponding candidate rule;
[0020] The upper and lower bound calculation module is used to score the benefits of each candidate rule and the rules obtained by its extension according to the preset correlation measurement and the preset diversity measurement, and obtain the upper bound and lower bound of the benefit score corresponding to each candidate rule;
[0021] A rule screening module is used to calculate the credibility of each candidate rule, determine the candidate best rule subset and the next round of iteration candidate rule subset according to the upper bound of the profit score, the lower bound of the profit score and the credibility of each candidate rule, and add each rule in the candidate best rule subset to the initial mining rule set to obtain an updated rule set corresponding to each rule;
[0022] A rule mining update module is used to calculate the benefit improvement of each updated rule set compared to the initial mining rule set, determine the rule corresponding to the updated rule set with the highest benefit improvement as the best rule for this round of iteration, add the best rule to the initial mining rule set to obtain an updated mining rule set, and add the rules in the candidate best rule subset except the best rule to the candidate rule subset for the next round of iteration to obtain an updated candidate rule subset for the next round of iteration;
[0023] The loop iteration module is used to perform an extended search with the updated next-round iteration candidate rule subset in the next iteration to obtain extended rules, use the extended rules as the candidate rules, and use the updated mining rule set as the initial mining rule set, and return to execute the calculation of the credibility of each candidate rule until the number of rules in the updated mining rule set reaches a preset number or a preset number of iterations, thereby obtaining an updated mining rule set.
[0024] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the mining method described in the first aspect when executing the computer program.
[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the mining method as described in the first aspect is implemented.
[0026] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the present application initializes the initial mining rule set and the used predicate set as empty sets, merges each candidate predicate in the candidate predicate set with the used predicate set respectively, obtains the used predicate set of the corresponding candidate predicate, uses all predicates in the used predicate set of each candidate predicate, and combines the rule objectives of the known rules to construct the corresponding candidate rules; performs benefit scoring on each candidate rule and the rules obtained by its extension according to a preset relevance metric and a preset diversity metric, and obtains the corresponding benefit score upper bound and benefit score lower bound of each candidate rule; calculates the credibility of each candidate rule, determines the candidate best rule subset and the candidate rule subset for the next round of iteration according to the benefit score upper bound, benefit score lower bound and credibility of each candidate rule, and adds each rule in the candidate best rule subset to the initial mining rule set respectively, and obtains each rule corresponding updated rule set; calculating the benefit improvement of each updated rule set compared with the initial mining rule set, determining the rule corresponding to the updated rule set with the highest benefit improvement as the best rule for this round of iteration, adding the best rule to the initial mining rule set to obtain an updated mining rule set, adding the rules other than the best rule in the candidate best rule subset to the candidate rule subset for the next round of iteration to obtain an updated candidate rule subset for the next round of iteration; in the next round of iteration, performing an extended search with the updated candidate rule subset for the next round of iteration to obtain an extended rule, taking the extended rule as the candidate rule, and taking the updated mining rule set as the initial mining rule set, returning to execute the calculation of the credibility of each candidate rule until the number of rules in the updated mining rule set reaches a preset number or reaches a preset number of iterations, to obtain an updated mining rule set.
[0027] By setting the upper and lower bounds of the benefit score and the credibility, the candidate rules are screened, the effective rules are judged by the benefit improvement method, and the rules that have been processed and cannot achieve the best in future expansion are excluded. The rules for the next round of iterations are limited, unnecessary interference is reduced, and redundant processing of rules in multiple iterations is avoided. The processing efficiency is effectively improved due to the reduction in the amount of rule processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0029] Figure 1 This is a schematic diagram of an application environment of a method for mining entity enhancement rules provided in the first embodiment of the present application;
[0030] Figure 2 It is a flowchart of a method for mining entity enhancement rules provided in the second embodiment of the present application;
[0031] Figure 3 It is a flowchart of a method for mining entity enhancement rules provided in Example 3 of the present application;
[0032] Figure 4 It is a flowchart of a method for mining entity enhancement rules provided in the fourth embodiment of the present application;
[0033] Figure 5 It is a flowchart of a method for mining entity enhancement rules provided in Example 5 of the present application;
[0034] Figure 6 It is a structural schematic diagram of a mining device with entity enhancement rules provided in Example 6 of the present application;
[0035] Figure 7 It is a structural diagram of a computer device provided in Example 7 of the present application. DETAILED DESCRIPTION
[0036] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0037] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0038] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0039] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0040] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0041] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0042] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0043] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0044] It should be understood that the size of the serial numbers of the steps in the following embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0045] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0046] The first embodiment of the present application provides a method for mining entity enhancement rules, which can be applied in the following aspects: Figure 1 In the application environment, the server connects the client and the corresponding database, the client configures the corresponding metric (i.e., the parameters for pruning operation) to the server, and the server obtains the data stored in the database and performs mining based on the above method. The client may include but is not limited to a PDA, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud computer device, a personal digital assistant (PDA), and other computer devices. The server may be implemented as an independent server or an integrated server. The database may refer to a relational database such as Mysql and SqlServe, and of course, it may also be a non-relational database.
[0047] See also Figure 2 , is a flow chart of a method for mining entity enhancement rules provided in the second embodiment of the present application. The above mining method is applied to Figure 1 In the server, the client configures the corresponding metrics (i.e., the parameters used for pruning operations) to the server, and the server obtains the data stored in the database and executes the subsequent method steps to mine entity enhancement rules. Figure 2 As shown, the mining method of the entity enhancement rule may include the following steps:
[0048] Step S201, initialize the initial mining rule set and the used predicate set to empty sets, merge each candidate predicate in the candidate predicate set with the used predicate set respectively, obtain the used predicate set corresponding to the candidate predicate, use all the predicates in the used predicate set of each candidate predicate, combine with the rule target of the known rules, and construct the corresponding candidate rule.
[0049] In this embodiment, the rules used are entity enhancing rules (REE), and the basic component of REE is the predicate p, which is defined as follows:
[0050] p=R(t)|tA◎c|tA◎sB|M(tA,sB)
[0051] Among them, ◎ is an operator, which can be equal or not equal; R(t) means that t is a tuple variable in the relational table R; tA represents the A attribute of variable t; M is a machine learning model, if tA and sB are related, the model returns true, otherwise it returns false. tA◎c has a constant and is a constant predicate; tA◎sB does not have a constant and is a variable predicate; M(tA,sB) is a machine learning predicate.
[0052] Based on predicates, REE is defined as: X→e, where (1) X is the combination of multiple predicates and is the premise of REE; (2) e is a predicate and is the result of REE.
[0053] A specific REE The following are examples:
[0054] Express(t)∧Express(s)∧t.Recipient=s.Recipient∧t.Address=“S City”→s.Postal Code=“000000”
[0055] This REE The scenario described is that if the recipients of two express deliveries t and s are the same person, and the address of t is in "S City", then the postal code of s must be "000000".
[0056] The mining rule set is a set for storing the mined rules. The initial mining rule set is set to an empty set at the beginning of step S201 to store the subsequently mined rules.
[0057] The candidate predicate set is a set storing all candidate predicates, and the candidate predicate set can be directly obtained from the database.
[0058] The used predicate set is a set storing predicates that have been used to construct rules. At the beginning of step S201, the used predicate set is an empty set. After the current iteration is completed, it contains a predicate. In subsequent iterations, the corresponding predicate is stored in the used predicate set. After a candidate predicate is extracted from the candidate predicate set, the candidate predicate set becomes the remaining candidate predicate set (excluding the extracted candidate predicate).
[0059] The initial used predicate set is an empty set. After being merged with a selected candidate predicate, the used predicate set includes the candidate predicate. Combined with the rule target of the known rule, a candidate rule is constructed to achieve the rule target for the candidate predicate. The known rule is a rule obtained from the user's prior knowledge or interest, which can express the rule target.
[0060] One candidate rule corresponds to one used predicate set and a remaining candidate predicate set, and is used to expand the candidate rule in subsequent iterations using the predicates in the remaining candidate predicate set in sequence. The number of candidate rules formed in step S201 is equal to the number of predicates in the candidate predicate set.
[0061] Step S202: Performing a benefit score on each candidate rule and the rule obtained by extending the candidate rule according to a preset correlation metric and a preset diversity metric, and obtaining an upper bound and a lower bound of a benefit score corresponding to each candidate rule.
[0062] In this embodiment, the preset relevance metric and the preset diversity metric are selected and set by the user of the above-mentioned operating client, and can also be used to form a pruning strategy used subsequently, wherein, in order to find rules that meet user needs, a relevance metric that captures the user's prior knowledge or interests is defined. use Representation Rules The correlation, so The higher, The more relevant it is to the user’s needs. Similarly, given a set of REE rules named Σ, δ div (Σ) represents the diversity among the rules in Σ, i.e., δ div The larger (Σ), the more diverse the rules in Σ. The above are open to any relevance and diversity metrics and can be set according to requirements.
[0063] A variety of pruning and optimization strategies based on ranking scores are adopted, and the upper and lower bounds of scores are additionally maintained for each rule. It is worth noting that the specific calculation method of the upper and lower bounds of scores is related to the correlation δ rel () and diversity δ div () metrics, allowing different metrics to have their own calculation methods, but the upper and lower bounds of the scores calculated based on any metric must meet the following conditions:
[0064] 1) The idea of the pruning strategy is to calculate the upper bound of the benefit score UB for any given REE. Compute an upper bound UB such that any The benefit score of the extended REE does not exceed UB, i.e., for all The expanded
[0065] 2) The benefit score lower bound LB. The value of LB is always lower than any The exact benefit score of the extended REE rule is that for all The expanded
[0066] Optionally, each candidate rule and its extended rule are scored for benefit according to a preset correlation metric and a preset diversity metric, and an upper bound and a lower bound of a benefit score corresponding to each candidate rule are obtained, including:
[0067] For any candidate rule, the benefit score of the candidate rule is calculated according to the preset relevance metric and the preset diversity metric;
[0068] According to the remaining candidate predicates in the candidate predicate set except the candidate predicate corresponding to the candidate rule, the candidate rule is expanded to obtain an expanded rule;
[0069] According to the preset relevance metric and the preset diversity metric, the benefit score of each expanded rule is calculated;
[0070] According to the benefit scores of the candidate rules and the rules obtained by their extension, the benefit score upper bound and benefit score lower bound of the candidate rules are obtained, and all candidate rules are traversed to obtain the benefit score upper bound and benefit score lower bound corresponding to each candidate rule.
[0071] Among them, for a candidate rule, it corresponds to the used predicate set and the remaining predicate set. A predicate is selected from the remaining predicate set and merged with the used predicate set to form a new rule. This rule is the rule expanded from the candidate rule. All predicates in the remaining predicate set are traversed to obtain all the rules that can be expanded. It can be seen that the extended rule includes at least two predicates.
[0072] For a candidate rule, the profit scores of all the rules extended from it and the candidate rule itself are calculated to determine a maximum profit score and a minimum profit score, that is, the maximum profit score is the upper bound of the profit score, and the minimum profit score is the lower bound of the profit score.
[0073] Step S203, calculate the credibility of each candidate rule, determine the candidate best rule subset and the candidate rule subset for the next round of iteration according to the upper bound of the profit score, the lower bound of the profit score and the credibility of each candidate rule, add each rule in the candidate best rule subset to the initial mining rule set, and obtain the updated rule set corresponding to each rule.
[0074] Among them, credibility can be support or confidence, which is used to characterize whether a rule is reasonable. Only rules with support greater than the support threshold or confidence greater than the confidence threshold can be used as valid rules. Valid rules are necessary conditions for writing into the mining rule set to ensure that the mined rules are available.
[0075] The credibility can be used to screen the candidate rules to a certain extent to see whether they can be included in the mining rule set. Similarly, the upper bound and lower bound of the benefit score can be used in combination with the above credibility to screen the candidate rules, thereby determining the candidate best rule subset that can be selected into the mining rule set (that is, the candidate best rule subset includes at least one rule). In this process, the candidate rule subset used in the next round of iteration can also be determined to achieve a cycle. In this embodiment, the iterative greedy algorithm is used as the basis to achieve cyclic iteration.
[0076] Maintains the best REE seen so far in this iteration if Profit score ratio Big (i.e. ), for all The expanded For example, Therefore, this can be skipped in the current greedy round , and write it into the next iteration.
[0077] For each rule in the candidate best rule subset, an updated rule set can be formed with the initial mining rule set, that is, the number of updated rule sets is the same as the number of rules in the candidate best rule subset.
[0078] Step S204, calculate the benefit improvement of each updated rule set compared to the initial mining rule set, determine the rule corresponding to the updated rule set with the highest benefit improvement as the best rule for this round of iteration, add the best rule to the initial mining rule set to obtain an updated mining rule set, add the rules in the candidate best rule subset except the best rule to the candidate rule subset for the next round of iteration, and obtain an updated candidate rule subset for the next round of iteration.
[0079] In this embodiment, the rule that improves the benefit score of the initial mining rule set the most is screened out from the candidate best rule subset and is used as the best rule of this round, thereby forming an updated mining rule set with the initial mining rule set. If the number of iterations is 1, there is 1 rule in the updated mining rule set, and so on.
[0080] For example, using the iterative greedy algorithm TopKDivMine, Σ is initialized to an empty set at the beginning, and then the best next REE is greedily found iteratively based on the current set Σ, and this REE is added to Σ until Σ contains k REE rules. The profit score is obtained by calculating the profit score of the rule. After adding to Σ, the improvement of the score of the objective function F() can be expressed mathematically as a REE The profit score is Each time, the REE with the highest profit score is greedily added to the current Σ until Σ contains k REEs. At this point, the algorithm stops and Σ is returned.
[0081] Of course, the remaining rules except the best rule in the above-mentioned candidate best rule subset can enter the next round of iteration, that is, these rules are written into the candidate rule subset for the next round of iteration.
[0082] Step S205, in the next round of iteration, an extended search is performed with the updated candidate rule subset for the next round of iteration to obtain extended rules, and the extended rules are used as candidate rules, and the updated mining rule set is used as the initial mining rule set, and the calculation of the credibility of each candidate rule is returned until the number of rules in the updated mining rule set reaches a preset number or reaches a preset number of iterations, thereby obtaining an updated mining rule set.
[0083] In this embodiment, after the previous round of iterations ends, the current round of iterations begins, and based on the rules in the candidate rule subset of the next round of iterations updated in the previous round of iterations, the rules therein are extended and searched, wherein the extension can be performed in the manner of extending the rules recorded above, that is, the extension is performed for each candidate rule to obtain an extended rule, and the extended rule is used as the candidate rule in step S203, and the calculation is returned to be repeated until a preset number (i.e., k) of rules are found in the updated mining rule set. Of course, the number of iterations can also be set to avoid unlimited iterations.
[0084] To find the best next REE, we generate candidate rules step by step. For each REE result e, we start with an empty precondition P. sel We start by adding predicates one by one and gradually expand it. More specifically, suppose the candidate REE under consideration is P sel →e, and P re is the remaining set of candidate predicates. re Select a predicate p to generate a new REE: P sel ∪{p}→e. Here, P re The predicates in can be processed in different orders. For example, predicates that can constitute high-scoring rules (i.e., those with high support) can be processed first to obtain high-ranked REEs as much as possible. However, it is worth noting that only when a rule passes the pruning condition (i.e., the rule in the updated next iteration candidate rule subset mentioned above) does it need to be expanded.
[0085] Instead of searching all rules in the entire rule space in each iteration, TopKDivMiner maintains a search boundary, and each rule is expanded at most once. Intuitively, the search boundary is a set B of rules such that for any rule One of the following three conditions is always met:
[0086] 1) On the border, that is
[0087] 2) Within the boundary, i.e. from We can expand it to get a rule Make On the border, this indicates It has been visited before, so it does not need to be visited again;
[0088] 3) Outside the boundary, there is a rule on the boundary So that φ can be By extension, this indicates that φ has not been visited yet.
[0089] Specifically, this search boundary B consists of four rule subsets: (a) Qpast, i.e., rules that have the potential to become the best rules but do not need to be further expanded; (b) Qrm, i.e., rules that can be completely excluded and do not need to be further expanded; (c) Qnext, i.e., rules that can only be excluded in the current iteration but may be expanded and become the best rules in later iterations; (d) Q, i.e., rules that have not yet been tested. In the current iteration, all rules in Q will be checked until Q becomes empty. It is worth noting that the rules within the boundary are invalid rules (i.e., they do not meet the support threshold or confidence threshold), and these rules do not need to be checked a second time. Therefore, the next iteration can let Q=Qnext continue searching from the current boundary outward.
[0090] Optionally, after performing an extended search with the updated candidate rule subset for the next iteration to obtain an extended rule, the following steps are further included:
[0091] For any extended rule, a candidate rule of the extended rule is determined by extension, and the upper bound and lower bound of the profit score corresponding to the candidate rule are used as the upper bound and lower bound of the profit score of the extended rule.
[0092] Among them, for the extended rule, the profit score has been calculated in step S202, and the upper and lower bounds of the profit score are consistent with the upper and lower bounds of the candidate rule for extending the extended rule, thereby avoiding repeated calculations and improving mining efficiency.
[0093] For example, the working principle of TopKDivMiner is as follows:
[0094] Assume that initially k = 2 and P re ={pcname, ptype, porg, pest, pUSCC, pcid} is the initial set of candidate predicates. Among them, pcname, ptype, porg, pest, pUSCC and pcid compare the company name, type, organization code, establishment time, social unified credit code and company ID respectively. For example, pcid: t.cid = s.cid compares whether the IDs of company t and company s are equal. For the convenience of display, we use pcid as a fixed rule result.
[0095] Assume we know the rules pcname∧ptype→pcid. Assuming that the user wants to discover unknown rules, the relevance metric is designed and each candidate rule is calculated. and known rules The repeatability, if and Similar or equal, then The lower the relevance to the user, the lower the relevance to the user. In addition, the design diversity measure is the attribute diversity of the rules in Σ, that is, the fewer attributes the rules in Σ reuse, the higher the diversity of Σ.
[0096] Initially, P sel is an empty set, from P re Select a predicate p to generate a new REE: Psel∪{p}→pcid. Therefore, five new rules pcname→pcid, ptype→pcid, porg→pcid, pest→pcid and pUSCC→pcid are obtained in Q. Assume that only porg→pcid satisfies the support / confidence threshold, that is, it does not need to be expanded, then add it to Qpast. Assuming that the upper bound of the scores of other REEs is lower than the benefit score of porg→pcid, then porg→pcid is the best REE in the first round of iteration, and other REEs will be excluded in this round of iteration and added to Qnext. In the current iteration, all rules in Q will be checked until Q becomes empty, the first iteration ends, and Σ={porg→pcid} is returned. Next, the second iteration continues the search from the current boundary outward from Q=Qnext. To find the second best REE, we need to consider not only the relevance of the candidate rules, but also the difference from the first best REE porg→pcid, so that every rule in Σ satisfies the support / confidence threshold and these rules are as close as possible to the known rules. Different, at the same time, the attributes used between the rules of Σ are as diverse as possible.
[0097] The efficiency of using this scheme and traditional rule discovery algorithms is comprehensively compared in multiple public data. The results show that the rule discovery method that aims to optimize rule relevance and diversity is effective. For all k ≤ 40, the average speed of PTopKDivMiner is faster than mining the entire set of Σ all The rules are 62.4 times faster. This is feasible in practice: when there are 20 processors, it takes less than 818 seconds to find 10 REEs on a large data set of 1681617 records. On average, the speed increases by 3.05 times when the number of processors changes from 4 to 20. The method of the present application also has good scalability when the parameter k changes. In addition, the pruning strategy is effective. When k=1, PTopKDivMiner reduces the running time by 51.66 times compared to not using the pruning strategy. When the number of errors detected by the rules is used as the relevance measure, the rules returned by PTopKDivMiner are relevant and diverse. For example, when k=10, its average F1 for true error detection is 0.74, which is 39.62% higher than the best existing method; at the same time, the 10 rules returned by PTopKDivMiner can capture Σ all 77.5% of errors detected.
[0098] The embodiment of the present application screens candidate rules by setting upper and lower bounds of the revenue score and credibility, determines effective rules by means of revenue improvement, and excludes rules that have been processed and cannot achieve the best result in future expansion, thereby limiting the rules for the next round of iterations, reducing unnecessary interference, and avoiding redundant processing of rules for multiple iterations. The reduction in the amount of rule processing effectively improves processing efficiency.
[0099] See also Figure 3 , is a flow chart of a method for mining entity enhancement rules provided in Example 3 of the present application. Figure 3 As shown, in the above step S203, according to the upper bound of the profit score, the lower bound of the profit score and the credibility of each candidate rule, the candidate best rule subset and the candidate rule subset for the next iteration are determined, including the following steps:
[0100] Step S301, detecting whether the credibility of each candidate rule is greater than a credibility threshold. If it is detected that the credibility of a candidate rule is not greater than the credibility threshold, the candidate rule is classified as a candidate rule subset for the next round of iteration.
[0101] Step S302: If it is detected that the credibility of a candidate rule is greater than the credibility threshold, the candidate rule is used as the candidate best rule. For the first candidate best rule and the second candidate best rule among all the candidate best rules, if it is detected that the lower bound of the profit score corresponding to the first candidate best rule is greater than the upper bound of the profit score corresponding to the second candidate best rule, the second candidate best rule is classified into the candidate rule subset for the next round of iteration.
[0102] Step S303: if it is detected that there is an intersection between the upper and lower bounds of the profit score corresponding to the first candidate best rule and the upper and lower bounds of the profit score corresponding to the second candidate best rule, the first candidate best rule and the second candidate best rule are classified as candidate best rule subsets.
[0103] In this embodiment, the credibility is compared with the credibility threshold, so that the rules that are not greater than the credibility threshold are directly excluded from the iteration of this round and added to the candidate rule subset for the next iteration. The credibility can be divided into support or confidence in the above manner.
[0104] If the credibility is greater than the credibility threshold, the candidate rule is used as the candidate best rule. If there are multiple candidate best rules, the upper and lower bounds of any two candidate best rules can be determined. If the lower bound of one candidate best rule is greater than the upper bound of another candidate best rule, the candidate best rule with a smaller benefit score cannot achieve the best in this round of iteration and can be excluded from the next round of iteration or directly excluded from all iterations.
[0105] If the above method cannot be used to determine the two candidate best rules, both are written into the candidate best rule subset, and the above step S204 is used to determine the best rule, thereby obtaining the best rule.
[0106] The embodiments of the present application can effectively screen candidate rules, thereby reducing the number of rules, avoiding global search rules, and using upper and lower bounds and credibility to achieve accurate screening, thereby improving the efficiency of the entire rule mining.
[0107] See also Figure 4 , is a flow chart of a method for mining entity enhancement rules provided in the fourth embodiment of the present application. Figure 4 As shown, after calculating the credibility of each candidate rule in the above step S20, the following steps may also be included:
[0108] Step S401, obtaining the remaining number of the initial mining rule set, where the remaining number of the initial mining rule set is the difference between the preset number of entries and the current number of entries in the initial mining rule set.
[0109] Step S402, sorting all candidate rules according to the lower bound of the revenue score from high to low, and determining the candidate rule with the numerical value corresponding to the remaining quota as the lower bound rule.
[0110] Step S403: all candidate rules whose upper bound of profit score is less than the lower bound of profit score of the lower bound rule are classified into an exclusion rule subset, and all rules in the exclusion rule subset are eliminated from all rounds of iteration.
[0111] Among them, the rules on the current search boundary are sorted according to the score benefit score lower bound, and the benefit score lower bound ranked k-|Σ| is recorded as LBlazy(Σ), and k-|Σ| represents the remaining places in Σ. Through the definition of this score lower bound and search boundary, LBlazy(Σ) represents the score lower bound of all the rules that can form the set Σ of optimal rules. Because any rule has either been visited or has not been visited, but can be expanded by the rules that have been visited and are on the search boundary. Any score upper bound Rules below this lower bound None of them can enter the final optimal rule subset Σ, thus realizing the greedy round-to-round rule This lower bound LBlazy(Σ) is also used to skip the actual score calculation, also known as lazy evaluation.
[0112] The embodiment of the present application can exclude the rules that are unlikely to obtain the best in subsequent iterations in one iteration based on the remaining places in the mining rule set, thereby reducing the number of rule searches and helping to improve mining efficiency.
[0113] See also Figure 5 , is a flow chart of a method for mining entity enhancement rules provided in Example 5 of the present application. Figure 5 As shown, the calculation of the revenue improvement of each updated rule set compared with the initial mining rule set in the above step S204 includes the following steps:
[0114] Step S501 : using the objective function, calculate and obtain a first benefit score of the initial mining rule set and a second benefit score of each updated rule set.
[0115] Step S502: Subtract each second profit score from the first profit score to determine the difference as the profit improvement of each updated rule set compared to the initial mining rule set.
[0116] In this embodiment, the first benefit score of the initial mining rule set and the second benefit score of the updated rule set are calculated, and then the difference between the two is taken to see the improvement of the benefit after adding the corresponding rules.
[0117] Optionally, the objective function is as follows:
[0118]
[0119] In the formula, Σ represents the initial mining rule set or the update rule set, λ∈[0,1], Characterize the rules within the set Σ, δ div (Σ) represents the calculation of the diversity metric of the rules in the set Σ, Characterization Pair Rules Calculation of correlation measures with known rules.
[0120] The embodiment of the present application can effectively analyze the improvement of revenue, thereby obtaining an accurate amount of revenue improvement, so as to accurately determine the best rule and improve the accuracy of rule mining.
[0121] Corresponding to the mining method of entity enhancement rules in the above embodiment, Figure 6 The structural block diagram of the mining device of the entity enhancement rule provided in the sixth embodiment of the present application is shown. The mining device is applied to Figure 1 For ease of description, only the parts related to the embodiment of the present application are shown.
[0122] See also Figure 6 , the excavation device comprises:
[0123] The candidate rule construction module 61 is used to initialize the initial mining rule set and the used predicate set to empty sets, merge each candidate predicate in the candidate predicate set with the used predicate set to obtain the used predicate set corresponding to the candidate predicate, and use all predicates in the used predicate set of each candidate predicate, combined with the rule target of the known rule, to construct the corresponding candidate rule;
[0124] The upper and lower bound calculation module 62 is used to score the benefits of each candidate rule and the rule obtained by its extension according to the preset correlation metric and the preset diversity metric, and obtain the upper bound and lower bound of the benefit score corresponding to each candidate rule;
[0125] The rule screening module 63 is used to calculate the credibility of each candidate rule, determine the candidate best rule subset and the candidate rule subset for the next iteration according to the upper bound of the profit score, the lower bound of the profit score and the credibility of each candidate rule, and add each rule in the candidate best rule subset to the initial mining rule set to obtain the updated rule set corresponding to each rule;
[0126] The rule mining update module 64 is used to calculate the profit improvement of each updated rule set compared with the initial mining rule set, determine the rule corresponding to the updated rule set with the highest profit improvement as the best rule of this round of iteration, add the best rule to the initial mining rule set to obtain an updated mining rule set, and add the rules in the candidate best rule subset except the best rule to the candidate rule subset for the next round of iteration to obtain an updated candidate rule subset for the next round of iteration;
[0127] The loop iteration module 65 is used to perform an extended search with the updated candidate rule subset for the next iteration in the next iteration to obtain the extended rules, use the extended rules as candidate rules, and use the updated mining rule set as the initial mining rule set, and return to execute the calculation of the credibility of each candidate rule until the number of rules in the updated mining rule set reaches a preset number or reaches a preset number of iterations, thereby obtaining an updated mining rule set.
[0128] Optionally, the rule screening module 63 includes:
[0129] A first classification unit is used to detect whether the credibility of each candidate rule is greater than a credibility threshold, and if it is detected that the credibility of a candidate rule is not greater than the credibility threshold, the candidate rule is classified as a candidate rule subset for the next round of iteration;
[0130] A second classification unit is used for, if it is detected that the credibility of a candidate rule is greater than the credibility threshold, taking the candidate rule as a candidate best rule, and for the first candidate best rule and the second candidate best rule among all the candidate best rules, if it is detected that the lower bound of the profit score corresponding to the first candidate best rule is greater than the upper bound of the profit score corresponding to the second candidate best rule, classifying the second candidate best rule as a candidate rule subset for the next round of iteration;
[0131] The third classification unit is used to classify both the first candidate best rule and the second candidate best rule into the candidate best rule subset if it is detected that there is an intersection between the upper and lower bounds of the profit score corresponding to the first candidate best rule and the upper and lower bounds of the profit score corresponding to the second candidate best rule.
[0132] Optionally, the excavating device further comprises:
[0133] The remaining quota acquisition module is used to obtain the remaining quota of the initial mining rule set after calculating the credibility of each candidate rule, and the remaining quota is the difference between the preset number of items and the current number of items in the initial mining rule set;
[0134] A sorting module is used to sort all candidate rules according to the lower bound of the benefit score from high to low, and determine the candidate rule with the corresponding value of the remaining quota as the lower bound rule;
[0135] The rule exclusion module is used to classify the candidate rules whose upper bound of the profit score is less than the lower bound of the profit score of the lower bound rule in all candidate rules into an exclusion rule subset, and all rules in the exclusion rule subset are eliminated from all round iterations.
[0136] Optionally, the rule mining update module 64 includes:
[0137] A benefit score calculation unit, used to calculate a first benefit score of the initial mining rule set and a second benefit score of each updated rule set using the objective function;
[0138] The revenue improvement calculation unit is used to make a difference between each second revenue score and the first revenue score, and determine the difference as the revenue improvement of each updated rule set compared with the initial mining rule set.
[0139] Optionally, the objective function is as follows:
[0140]
[0141] In the formula, Σ represents the initial mining rule set or the update rule set, λ∈[0,1], Characterize the rules within the set Σ, δ div (Σ) represents the calculation of the diversity metric of the rules in the set Σ, Characterization Pair Rules Calculation of correlation measures with known rules.
[0142] Optionally, the upper and lower bounds calculation module 62 includes:
[0143] A candidate score calculation unit, used for calculating the benefit score of any candidate rule according to a preset relevance metric and a preset diversity metric;
[0144] A rule expansion unit, used to expand the candidate rule according to the remaining candidate predicates in the candidate predicate set except the candidate predicate corresponding to the candidate rule, to obtain an expanded rule;
[0145] An expansion score calculation unit, used to calculate the benefit score of each expanded rule according to a preset relevance metric and a preset diversity metric;
[0146] The upper and lower bound calculation unit is used to obtain the upper bound and lower bound of the profit score of the candidate rule according to the profit score of the candidate rule and the rule obtained by its extension, and traverse all candidate rules to obtain the upper bound and lower bound of the profit score corresponding to each candidate rule.
[0147] Optionally, the excavating device further comprises:
[0148] The extended benefit score determination module is used to determine the candidate rule of the extended rule obtained by expanding the search with the updated candidate rule subset of the next round of iteration, and after obtaining the extended rule, for any extended rule, the upper bound and lower bound of the benefit score corresponding to the candidate rule are used as the upper bound and lower bound of the benefit score of the extended rule.
[0149] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0150] Figure 7 This is a schematic diagram of the structure of a computer device provided in Example 7 of this application. Figure 7 As shown, the computer device of this embodiment includes: at least one processor ( Figure 7 Only one is shown), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps in any of the above-mentioned entity enhancement rule mining method embodiments are implemented.
[0151] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Figure 7 This is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.
[0152] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0153] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may also be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on a computer device. Further, the memory may also include both an internal storage unit of a computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs, etc. The memory may also be used to temporarily store data that has been output or is to be output.
[0154] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiment when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0155] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be completed through a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing the computer program product.
[0156] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0157] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0158] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0159] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0160] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for mining entity enhancement rules, characterized in that: The mining method comprises: Initializing the initial mining rule set and the used predicate set to empty sets, merging each candidate predicate in the candidate predicate set with the used predicate set to obtain the used predicate set corresponding to the candidate predicate, using all predicates in the used predicate set of each candidate predicate, combined with the rule target of the known rule, to construct the corresponding candidate rule; According to the preset relevance metric and the preset diversity metric, each candidate rule and the rule obtained by its extension are scored for benefits, and the upper bound and the lower bound of the benefit score corresponding to each candidate rule are obtained; Calculate the credibility of each candidate rule, determine the candidate best rule subset and the next round of iteration candidate rule subset according to the upper bound of the profit score, the lower bound of the profit score and the credibility of each candidate rule, and add each rule in the candidate best rule subset to the initial mining rule set to obtain the updated rule set corresponding to each rule; Calculate the profit improvement of each updated rule set compared to the initial mining rule set, determine the rule corresponding to the updated rule set with the highest profit improvement as the best rule for this round of iteration, add the best rule to the initial mining rule set to obtain an updated mining rule set, add the rules in the candidate best rule subset except the best rule to the candidate rule subset for the next round of iteration to obtain an updated candidate rule subset for the next round of iteration; In the next round of iteration, the updated candidate rule subset for the next round of iteration is used for extended search to obtain extended rules, which are used as candidate rules, and the updated mining rule set is used as the initial mining rule set. The process returns to calculate the credibility of each candidate rule until the number of rules in the updated mining rule set reaches a preset number or a preset number of iterations, thereby obtaining an updated mining rule set.
2. The excavation method according to claim 1, characterized in that: The step of determining the best candidate rule subset and the next round of iteration candidate rule subset according to the upper bound of the benefit score, the lower bound of the benefit score and the credibility of each candidate rule includes: Detecting whether the credibility of each candidate rule is greater than a credibility threshold, and if it is detected that the credibility of a candidate rule is not greater than the credibility threshold, classifying the candidate rule as a subset of candidate rules for the next round of iteration; If it is detected that the credibility of a candidate rule is greater than the credibility threshold, the candidate rule is used as a candidate best rule, and for the first candidate best rule and the second candidate best rule among all the candidate best rules, if it is detected that the lower bound of the profit score corresponding to the first candidate best rule is greater than the upper bound of the profit score corresponding to the second candidate best rule, the second candidate best rule is classified as the candidate rule subset for the next round of iteration; If it is detected that there is an intersection between the upper and lower bounds of the profit score corresponding to the first candidate best rule and the upper and lower bounds of the profit score corresponding to the second candidate best rule, the first candidate best rule and the second candidate best rule are both classified as a candidate best rule subset.
3. The excavation method according to claim 1, characterized in that: After calculating the credibility of each candidate rule, the method further includes: Obtaining the remaining number of the initial mining rule set, where the remaining number of the initial mining rule set is the difference between the preset number of entries and the current number of entries in the initial mining rule set; Sort all candidate rules according to the lower bound of the benefit score from high to low, and determine the candidate rule with the corresponding value of the remaining quota as the lower bound rule; Among all candidate rules, the candidate rules whose upper bound of the profit score is less than the lower bound of the profit score of the lower bound rule are classified into an exclusion rule subset, and all rules in the exclusion rule subset are eliminated from all rounds of iterations.
4. The excavation method according to claim 1, characterized in that: The calculating the revenue improvement of each updated rule set compared to the initial mining rule set includes: Using the objective function, calculating a first benefit score of the initial mining rule set and a second benefit score of each updated rule set; Each second profit score is subtracted from the first profit score to determine the difference as the profit improvement of each updated rule set compared to the initial mining rule set.
5. The excavation method according to claim 4, characterized in that: The objective function is as follows: Where, Σ represents the initial mining rule set or the update rule set, λ∈[0,1], Characterize the rules within the set Σ, δ div (Σ) represents the calculation of the diversity metric of the rules in the set Σ, Characterization Pair Rules A measure of relevance to the known rules is calculated.
6. The excavation method according to claim 1, characterized in that: The method of scoring the benefits of each candidate rule and the rule obtained by its extension according to the preset correlation metric and the preset diversity metric, and obtaining the upper bound and lower bound of the benefit score corresponding to each candidate rule, includes: For any candidate rule, a benefit score of the candidate rule is calculated according to a preset relevance metric and a preset diversity metric; According to the remaining candidate predicates in the candidate predicate set except the candidate predicate corresponding to the candidate rule, the candidate rule is expanded to obtain an expanded rule; According to the preset relevance metric and the preset diversity metric, the benefit score of each expanded rule is calculated; According to the revenue scores of the candidate rule and the rule obtained by extending it, the revenue score upper bound and the revenue score lower bound of the candidate rule are obtained, and all candidate rules are traversed to obtain the revenue score upper bound and the revenue score lower bound corresponding to each candidate rule.
7. The excavation method according to any one of claims 1 to 6, characterized in that: After performing an extended search with the updated next-round iteration candidate rule subset to obtain an extended rule, the method further includes: For any extended rule, a candidate rule of the extended rule is determined by extension, and the upper bound and lower bound of the revenue score corresponding to the candidate rule are used as the upper bound and lower bound of the revenue score of the extended rule.
8. A device for mining entity enhancement rules, characterized in that: The excavating device comprises: A candidate rule construction module is used to initialize the initial mining rule set and the used predicate set to empty sets, merge each candidate predicate in the candidate predicate set with the used predicate set to obtain the used predicate set corresponding to the candidate predicate, and use all predicates in the used predicate set of each candidate predicate, combined with the rule target of the known rule, to construct the corresponding candidate rule; The upper and lower bound calculation module is used to score the benefits of each candidate rule and the rules obtained by its extension according to the preset correlation measurement and the preset diversity measurement, and obtain the upper bound and lower bound of the benefit score corresponding to each candidate rule; A rule screening module is used to calculate the credibility of each candidate rule, determine the candidate best rule subset and the next round of iteration candidate rule subset according to the upper bound of the profit score, the lower bound of the profit score and the credibility of each candidate rule, and add each rule in the candidate best rule subset to the initial mining rule set to obtain an updated rule set corresponding to each rule; A rule mining update module is used to calculate the benefit improvement of each updated rule set compared to the initial mining rule set, determine the rule corresponding to the updated rule set with the highest benefit improvement as the best rule for this round of iteration, add the best rule to the initial mining rule set to obtain an updated mining rule set, and add the rules in the candidate best rule subset except the best rule to the candidate rule subset for the next round of iteration to obtain an updated candidate rule subset for the next round of iteration; The loop iteration module is used to perform an extended search with the updated next-round iteration candidate rule subset in the next iteration to obtain extended rules, use the extended rules as the candidate rules, and use the updated mining rule set as the initial mining rule set, and return to execute the calculation of the credibility of each candidate rule until the number of rules in the updated mining rule set reaches a preset number or a preset number of iterations, thereby obtaining an updated mining rule set.
9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the mining method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the mining method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Rule mining method and device for interpretation of recommendation model, equipment and medium
CN119761494A
Diversified Top-k rule selection and mining method and system, terminal and storage medium
CN121881286A
