Semantic compression system and method for relational data

By using a semantic compression system for relational data and leveraging first-order Horn rule mining and redundancy analysis, the system addresses the issues of insufficient compression ratio and slow operation speed in existing technologies, achieving more efficient semantic compression and knowledge reasoning capabilities, and is suitable for relational data models.

CN121485697APending Publication Date: 2026-02-06王若愚
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511407221.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient compression ratio and slow operation speed in semantic compression of knowledge bases. In particular, semantic-based compression methods cannot effectively reduce space occupancy and are not applicable to relational data models. Furthermore, existing semantic models have weak expressive power and cannot be applied to downstream knowledge reasoning businesses.

Method used

A semantic compression system for relational data is adopted, including a data management module, a relation mining module, and a redundancy analysis module. By mining first-order Horn rules and identifying redundant information, a parallel rule calculation and redundancy analysis process is constructed. Directed graph analysis is used to optimize logical reasoning relationships, thereby achieving efficient semantic compression.

Benefits of technology

It enhances the expressive power of semantic models, achieves a lower compression rate, and improves operational efficiency, enabling compressed data to continue to use statistical compression to further enhance the effect. It is suitable for relational data with any number of elements and supports knowledge reasoning tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121485697A_ABST
    Figure CN121485697A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of knowledge base data mining, and relates to a semantic compression system and method for relational data, and the compression system comprises a data management module, a relation mining module, a rule calculation module and a redundancy analysis module. According to the semantic compression method, the first-order Horn rule is mined for relational data, and the length of the rule, the number of elements of predicates and use of quantifiers are not limited, so that the expression ability of a semantic model is improved, the semantic model can be applied to the relation of any number of elements, a rule set with richer semantic information is obtained, the lower compression rate is achieved, and the semantic compression efficiency is improved. And the mined rules can be better applied to reasoning tasks based on knowledge and logic. Information utilized by semantic compression based on logic rules is different from information utilized by a statistical compression method, so that data subjected to semantic compression can continue to be subjected to statistical compression to further enhance the compression effect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of knowledge base data mining, and particularly relates to a semantic compression system and method for relational data. BACKGROUND

[0002] Knowledge bases are widely used in business and scenarios such as field knowledge question answering and decision making, and provide interpretable knowledge representation and reasoning methods. Knowledge bases are mainly constructed based on the theoretical model of first-order predicate logic or its subset (such as description logic), mainly in the form of relational databases or knowledge graphs, and store a large amount of field-related or general common sense factual knowledge. However, the large-scale knowledge base constructed automatically has a large amount of redundant information, which increases the cost of deployment, maintenance and update.

[0003] Statistical-based compression methods can effectively reduce the space occupancy rate of knowledge bases. For example, compression tools such as 7Zip, Bzip2 and Gzip developed based on LZ77, LZMA2 and other algorithms can achieve a compression rate of 10-15%, and the lower the compression rate, the better the compression effect. Semantic-based compression methods can identify redundant information and replace it with more concise content, thereby reducing the space occupancy rate of the knowledge base. For example, Logical Linked-data Compressor (DOI: 10.1007 / 978-3-642-38288-8_12) mines association rules according to the content in the knowledge base, and then uses these association rules to identify redundant information in the knowledge base. The KGist system (DOI: 10.1145 / 3366423.3380189) mines high-frequency subgraph patterns according to the graph structure of the knowledge graph, and reduces the space occupancy rate of the knowledge base by replacing structures that meet these patterns with simple symbols.

[0004] However, the knowledge base processed by the statistical compression method cannot be directly queried and reasoned, and must rely on the corresponding decompression process. This will greatly increase the performance overhead of querying and reasoning.

[0005] Semantic-based compression methods can avoid the above problems, but the compression effect of these methods is weak and cannot effectively reduce the space occupancy rate of the knowledge base. For example, Logical Linked-data Compressor can only achieve an average compression rate of 90%. The compression rate of the KGist system is more than 70%.

[0006] Although semantic-based compression methods can provide more semantic information and interpretability than statistical compression, the semantic models used in current semantic compression systems have weak expressive ability and can only adapt to unary and binary relationships, which cannot be applied to relational data models. Weak semantic models also result in insufficient semantic information. For example, the above-mentioned Logical Linked-data Compressor and KGist system, the association rules and subgraph patterns used for compression provide weak semantic information and cannot be applied to downstream knowledge reasoning services.

[0007] Another major problem of semantic compression is slow running speed. This is mainly because the mining process of the semantic model has high theoretical complexity. For example, mining first-order Horn rules with the best compression effect is an NP-complete (NP-Complete) problem, and there is currently no algorithm that can give an optimal solution in polynomial time. SUMMARY

[0008] To solve the above problems, a semantic compression system and method for relational data are disclosed in the present application. The technical solution of the present application is implemented as follows:

[0009] The first aspect of the present application discloses a semantic compression system for relational data, which comprises a data management module, a relationship mining module, a rule calculation module and a redundancy analysis module.

[0010] The data management module is used to read all data of the knowledge base from the file system and load it in the memory for other modules to quickly read and query information in the knowledge base.

[0011] The relationship mining module is used to create and manage several rule calculation modules running in parallel.

[0012] Each rule calculation module is used to mine first-order Horn rules from a specific relationship of the knowledge base.

[0013] The redundancy analysis module is used to collect the first-order Horn rules mined by the rule calculation module, identify and delete redundant information in the knowledge base, and transmit the information to the data management module.

[0014] The second aspect of the present application discloses a semantic compression method for relational data, which is implemented by relying on the compression system disclosed in the first aspect of the present application. The method comprises the following steps:

[0015] 101. The data management module reads all data of the knowledge base from the file system and loads it in the memory for subsequent steps to quickly read and filter relevant information.

[0016] 102, the compression system determines whether there is a relation in the knowledge base such that a new first-order Horn rule can be mined from the relation and the rule can make the result of a method of quantitatively evaluating the compression effect exceed a corresponding threshold value based on the current rule mining state, and if so, step 103 is performed, otherwise, step 104 is skipped;

[0017] 103, the rule computing module selects a relation from the relations satisfying the condition in step 102, and then mines a new first-order Horn rule from the relation; thereafter, the rule computing module calculates information that can be inferred by the rule through logical inference, marks information that originally exists in the knowledge base as "inferable", and records the inference dependency relationship; marks information that originally does not exist in the knowledge base as "counterexample";

[0018] 104, the redundancy analysis module determines the redundant information that can be deleted based on the inference relationship between all the Horn rules that have been mined and the knowledge base information;

[0019] 105, the redundancy analysis module deletes the information that can be deleted determined after step 104 from the knowledge base, and transmits the remaining part of the knowledge base, all the information marked as "counterexample" and all the first-order Horn rules mined to the data management module, and the data management module stores the information collected from the redundancy analysis module as the compressed knowledge base in the file system.

[0020] Preferably, the method of quantitatively evaluating the compression effect in step 102 specifically satisfies the following characteristics:

[0021] The method of quantitatively evaluating the compression effect of the rule r should return a score f(r), and f(r) is proportional to , and inversely proportional to and |r|;

[0022] At the same time, does not include information in the knowledge base that has been marked as "inferable";

[0023] In this step, r is a first-order Horn rule; the information that can be inferred by the rule r and is in the knowledge base is The amount of information contained is denoted as The information that can be inferred but is not in the knowledge base is The amount of information contained is denoted as The length of the rule is |r|.

[0024] Preferably, step 103 specifically includes the following process:

[0025] 201, set the target relation selected by the compression system as p, and the number of elements of p as n, then construct the following formula as the basic rule, and add it to the candidate set;

[0026]

[0027] The above formula indicates that each question mark appearing in the formula of the first-order Horn rule is an abbreviated writing of a globally unique variable symbol; the meanings and representations of the remaining symbols are the same as the general conventions of first-order predicate logic;

[0028] 202, according to an extension manner of a logical rule, construct all sub-rules of each rule in the current candidate set, and add these sub-rules to the same sub-rule set;

[0029] 203, calculate the scores of all elements in the candidate set and the sub-rule set according to the method of quantitatively evaluating the compression effect in step 102;

[0030] 204, determine whether there is a rule in the candidate set according to the score in step 203, which is the current local maximum, i.e. the score of the rule is not less than the scores of all other rules in the candidate set and the sub-rule set; if there is, execute step 206; otherwise, execute step 205;

[0031] 205, select several rules with the highest scores from the sub-rule set to form a new candidate set, and then execute step 202;

[0032] 206, return the rule with the highest score in the candidate set as the result of mining:

[0033] If there are multiple rules with the same score and the highest score, select the one with the smallest |r| and return it;

[0034] If there are still multiple rules at this time, select the one with the smallest |r| and return it;

[0035] If there are still multiple rules at this time, return a rule at random.

[0036] Preferably, the extension manner of the logical rule in step 202 satisfies the following characteristics: monotonically adding limited and enumerable new constraint conditions to the target rule.

[0037] Preferably, step 104 includes the following process:

[0038] ​301, identify the inference dependency relations of the information in the knowledge base according to all the first-order Horn rules mined, and construct a directed graph G according to the relations; a node in G represents an independent record in the knowledge base, and an edge in G represents the inference relation of the records in the knowledge base, the direction of the edge is from the record used for inference to the record inferred; if there are multiple inference ways for a record in the knowledge base, only the dependency relation of one of the ways is retained in G; the "record" referred to in this step refers to a constant first-order atomic predicate, which is referred to as a record for short;

[0039] 302, identify all the strongly connected components in G;

[0040] 303, for each strongly connected component S, select a subset V of the nodes in S, so that the node set of any loop in S intersects with V; then, mark the corresponding information of the knowledge base in V as "non-deletable";

[0041] 304, mark the information in the knowledge base corresponding to the nodes in G with an in-degree of 0 and not marked as "non-deletable" as "deletable".

[0042] Preferably, step 303 comprises the following process:

[0043] 401, select the node with the maximum product of out-degree and in-degree in the current strongly connected component and add it to the node set V; if there are multiple nodes with the maximum product, randomly select one from them;

[0044] 402, delete all the nodes and edges connected to the node selected in step 401; if there are nodes with out-degree or in-degree of 0 in the remaining structure, continue to delete these nodes and the edges connected to them; repeat this process until there are no nodes with out-degree or in-degree of 0 in the remaining structure of the current strongly connected component;

[0045] 403, determine whether there are still undelleted edges in the remaining structure of the current strongly connected component; if yes, execute 401; otherwise, execute 404;

[0046] 404, return the node set V currently constructed.

[0047] The advantages of the present application are as follows:

[0048] The semantic compression method in the application faces the first-order Horn rule of relational data mining, and does not limit the length of the rule, the number of predicates and the use of quantifiers, thereby improving the expression ability of the semantic model, making it applicable to any number of relations, obtaining a rule set with richer semantic information, achieving a lower compression rate, and enabling the mined rules to be better applied to knowledge and logic-based reasoning tasks. The information used by the semantic compression based on logical rules is different from the information used by the statistical compression method, so the data compressed by the semantic compression can continue to use statistical compression to further enhance the compression effect.

[0049] The top-down rule mining process of the application mines as many effective Horn rules as possible under controllable time and space overhead, improving the running efficiency.

[0050] The coverage strategy of the application simplifies the mined rule set, reducing the repeated semantics of the mined rules.

[0051] The directed graph analysis method of the application optimizes the logical reasoning relationship in the knowledge base, improves the removable information quantity under the premise of lossless compression, and further reduces the compression rate.

[0052] The semantic compression system of the application parallelizes the mining process at the rule mining and rule quality evaluation level, fully utilizes system resources, and further improves the efficiency of mining. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only one embodiment of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0054] Figure 1 The system structure diagram of the embodiment of the application;

[0055] Figure 2 The method flowchart of the embodiment shown in the figure; Figure 1

[0056] Figure 3 The flowchart of step 103 in the embodiment of the application;

[0057] Figure 4 The flowchart of step 104 in the embodiment of the application;

[0058] Figure 5 The flowchart of step 303 in the embodiment of the application.

[0059] ​In the above figures, the meaning of the symbols in each figure is as follows:

[0060] 501, file system; 502, data management module; 503, relation mining module; 504, rule calculation module; 505, redundancy analysis module. DETAILED DESCRIPTION

[0061] Embodiment: a semantic compression system for relational data, as shown in the figure, including a data management module 502, a relation mining module 503, a rule calculation module 504, and a redundancy analysis module 505. The file system 501 is not within the scope of the system. Figure 1

[0062] As shown in the figure, the application process of the embodiment is as follows: Figure 2

[0063] Step 101, the compression system reads all the data of the knowledge base from the file system and loads it in the memory for subsequent steps to quickly read and screen related information.

[0064] Step 102, the system judges whether there is a relation in the knowledge base based on the current rule mining state, so that a new first-order Horn rule can be mined from the relation, and the rule can make the result of a method of quantitatively evaluating the compression effect exceed the corresponding threshold. If it exists, proceed to step 103, otherwise jump to step 104.

[0065] Let r be a first-order Horn rule; the information that can be inferred by the rule r and in the knowledge base is The amount of information contained in it is denoted as The information that can be inferred but not in the knowledge base is The amount of information contained in it is denoted as The length of the rule is |r|. In 102, the method of quantitatively evaluating the compression effect of the rule r should return a score f(r), and f(r) is proportional to , and inversely proportional to and |r|. In addition, The information in the knowledge base that has been marked as "inferable" is not included in the above. Through such a coverage strategy, the compression algorithm can reduce the repeated semantics of the mined rules.

[0066] ​​Step 103 is executed when the answer of step 102 is "yes": the rule computing module selects one relation from the relations satisfying the condition in step 102, and then mines a new first-order Horn rule from the relation. After that, the rule computing module calculates the information that can be inferred by the rule through logical inference, marks the information that already exists in the knowledge base as "inferable", and records the inference dependency; marks the information that does not exist in the knowledge base as "counterexample".

[0067] Step 104 is executed when the answer of step 102 is "no": the redundancy analysis module determines the redundant information that can be deleted based on the inference relationship between all the Horn rules that have been mined and the knowledge base information.

[0068] Step 105, the redundancy analysis module deletes the information that can be deleted determined in step 104 from the knowledge base, and sends the remaining part of the knowledge base, all the information marked as "counterexample" and all the mined first-order Horn rules to the data management module for storage in the file system as the compressed knowledge base.

[0069] As shown in Figure 3 the detailed method of step 103 for mining new first-order Horn rules is as follows:

[0070] 201, assuming that the target relation selected by the relation mining module is p, and the number of elements of p is n, the rule computing module constructs the following formula as the basis rule, and adds it to the candidate set.

[0071]

[0072] In this specification, each question mark appearing in the formula representing a first-order Horn rule is an abbreviated writing of a globally unique variable symbol. The meanings and representations of the remaining symbols are the same as the general conventions of first-order predicate logic.

[0073] Step 202, the rule computing module constructs all the sub-rules of each rule in the current candidate set according to an extension mode of logical rules, and adds these sub-rules to the same sub-rule set.

[0074] The extension mode of logical rules in step 202 monotonically adds limited and enumerable new constraints to the target rule. Such an extension mode ensures that the sub-rule set of any rule is limited and enumerable.

[0075] Step 203, the rule computing module calculates the scores of all elements in the candidate set and the sub-rule set according to the method of quantitatively evaluating the compression effect in step 102.

[0076] Step 204: The rule computing module determines whether there is a rule in the candidate set which is the current local maximum, i.e. the score of the rule is not less than the scores of all other rules in the candidate set and the sub-rule set, according to the scores in step 203. If yes, step 206 is executed; otherwise, step 205 is executed.

[0077] Step 205: When the result of step 204 is "no", the rule computing module selects several rules with the highest scores from the sub-rule set to form a new candidate set, and then executes step 202.

[0078] Step 206: When the result of step 204 is "yes", the rule computing module returns the rule with the highest score in the candidate set as the result of the mining. If there are several rules with the same highest score, the rule with the largest |r| is returned. If there are still several rules with the same |r|, a rule is returned randomly.

[0079] As shown in FIG. 1, the detailed method of determining the redundant information that can be deleted in step 104 is as follows: Figure 4

[0080] Step 301: The redundancy analyzing module identifies the reasoning dependency relationship of the information in the knowledge base according to all the first-order Horn rules mined, and constructs a directed graph G according to the relationship. A node in G represents an independent constant first-order atomic predicate (referred to as "record" for short) in the knowledge base, and an edge represents the reasoning relationship of the records in the knowledge base. The direction of the edge points from the record used for reasoning to the record that can be reasoned out. If there are multiple reasoning ways for a record in the knowledge base, only the dependency relationship of one of the ways is retained in G.

[0081] Step 302: The redundancy analyzing module identifies all the strongly connected components in G. The loop structure in the strongly connected component represents the case that the records in the knowledge base have circular reasoning.

[0082] Step 303: For each strongly connected component S, the redundancy analyzing module selects a subset V of the nodes in S, such that the node set of any loop in S intersects with V. Then, the system marks the corresponding information of the knowledge base in V as "non-deletable".

[0083] Step 304: The redundancy analyzing module marks the information in the knowledge base corresponding to the nodes in G with in-degree not equal to 0 and not marked as "non-deletable" as "deletable".

[0084] As shown in FIG. 3, the detailed method of selecting the set V from a strongly connected component in step 303 is as follows: Figure 5 ​​​

[0085] Step 401: The redundancy analysis module selects the node with the largest product of out-degree and in-degree in the current strongly connected component and adds it to the child node set V. If multiple nodes have the same largest product, one is randomly selected from them.

[0086] In step 402, the redundancy analysis module deletes all the nodes selected in step 401 and their connected edges. If any node in the remaining structure has an out-degree or in-degree of 0, then these nodes and their connected edges are deleted. This process is repeated until there are no nodes with an out-degree or in-degree of 0 in the remaining structure of the current strongly connected component.

[0087] Step 403: The redundancy analysis module determines whether there are still undeleted edges in the remaining structure of the current strongly connected component. If so, proceed to step 401; otherwise, proceed to step 404.

[0088] Step 404 is executed if step 403 determines "no": Return the currently constructed set of child nodes V.

[0089] In this embodiment, the data management module 502 is responsible for reading all data from the knowledge base from the file system and loading it into memory so that other modules can quickly read and query the information in the knowledge base. After the redundancy analysis module 505 identifies and deletes redundant information, it sends the remaining information in the knowledge base, all information marked as "counterexamples", and all mined first-order Horn rules to the data management module 502. The data management module 502 then stores this information as a compressed knowledge base into the file system 501.

[0090] The relation mining module 503 is responsible for creating and managing multiple parallel rule calculation modules 504. When a rule calculation module 504 can no longer mine new first-order Horn rules from the knowledge base, the relation mining module 503 is responsible for shutting it down.

[0091] Each rule calculation module 504 is responsible for refining a rule from a specific relation in the knowledge base, based on, for example... Figure 3 The method shown mines first-order Horn rules. During mining, the rule calculation module 504 creates an independent thread for each rule in the candidate set to execute steps 202 and 203; these threads run in parallel. When all threads have completed the above steps, all results are aggregated, and steps 204, 205, and 206 are executed. Then, the rule calculation module 504 sends the rules from step 206 to the redundancy analysis module 505. If new rules can be mined from the current relationship, the process jumps back to step 201 to begin a new mining cycle.

[0092] The redundancy analysis module 505 is responsible for collecting the first-order Horn rules mined by the rule calculation module 504, and based on...Figure 4 and Figure 5 The method identifies and removes the redundant information in the knowledge base. After the identification, the redundancy analysis module 505 sends the remaining information in the knowledge base, all the information marked as "counterexample" and all the mined first-order Horn rules to the data management module 502.

[0093] In a specific application, the method for quantitatively compressing the effect in step 102 can be implemented as one of the following functions:

[0094]

[0095] wherein and are respectively implemented as and the number of records contained in

[0096] |r| = ∑ P∈r φ(P) - ψ(r);

[0097] P in the above formula is a predicate in r, φ(P) represents the number of parameters of the predicate P, and ψ(r) represents the number of different variable symbols in r.

[0098] In a specific application, the extension mode of the first-order logical rule in step 202 can be implemented as the following fine-grained extension mode:

[0099] The mode contains five cases, and each extension can be performed according to one of the cases to obtain a new first-order Horn rule based on the current rule:

[0100] Case 1: one globally unique variable in the current rule is changed into an existing non-unique variable in the current rule.

[0101] Case 2: a new predicate is added to the rule body of the current rule. The relation symbol of the newly added predicate must exist in the compressed knowledge base, the number of parameters of the predicate is the same as the number of parameters of the corresponding relation in the knowledge base, and all the parameters of the predicate are different globally unique variables. Then one of the parameters of the newly added predicate is changed into an existing non-unique variable in the current rule.

[0102] Case 3: two different globally unique variables in the current rule are changed into the same new variable.

[0103] Case 4: A new predicate is added to the rule body of the current rule. The relation symbol of the new added predicate must exist in the compressed knowledge base, the number of parameters of the predicate is the same as that of the corresponding relation in the knowledge base, and all parameters of the predicate are different global unique variables. Then one is selected from the new added global unique variables, one is selected from the global unique variables already existing in the current rule, and the two selected variables are converted into the same new variable.

[0104] Case 5: One global unique variable in the current rule is converted into a constant symbol.

[0105] It should be noted that the above only describes the preferred embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A semantic compression system for relational data, the system comprising: The system comprises a data management module, a relation mining module, a rule computing module and a redundancy analysis module. The data management module is configured to read all data of the knowledge base from a file system and load the data in a memory for other modules to quickly read and query information in the knowledge base. The relation mining module is configured to create and manage a plurality of rule computing modules running in parallel. Each rule computing module is configured to mine first-order Horn rules from a specific relation of the knowledge base. The redundancy analysis module is configured to collect the first-order Horn rules mined by the rule computing modules, identify and delete redundant information in the knowledge base, and transmit the information to the data management module.

2. A semantic compression method for relational data, which adopts the compression system of claim 1, and comprises the following steps:

101. The data management module reads all data of the knowledge base from a file system and loads the data in a memory for other modules to quickly read and query information in the knowledge base.

102. The compression system determines whether there is a relation in the knowledge base based on a current rule mining state, such that a new first-order Horn rule can be mined from the relation, and the rule can make the result of a quantitative evaluation method for compression effect exceed a corresponding threshold value; if yes, step 103 is performed, otherwise, step 104 is performed.

103. The rule computing module selects a relation from the relation satisfying the condition in step 102, and mines a new first-order Horn rule from the relation. Then, the rule computing module calculates information that can be inferred by the rule through logical inference, marks information that already exists in the knowledge base as "inferable", and records the inference dependency relationship; marks information that does not exist in the knowledge base as "counterexample".

104. The redundancy analysis module determines redundant information that can be deleted based on all Horn rules that have been mined and the inference relationship between the knowledge base information.

105. The redundancy analysis module deletes the information that can be deleted determined in step 104 from the knowledge base, and transmits the remaining part of the knowledge base, all information marked as "counterexample" and all mined first-order Horn rules to the data management module, which stores the information collected from the redundancy analysis module as the compressed knowledge base in the file system.

3. The method of claim 2, wherein, Step 103 comprises the following processes:

201. Set the target relation selected by the compression system as p, and the number of elements of p as n, then construct the following formula as a basic rule and add it to a candidate set. The above formula indicates that each question mark appearing in the formula of the first-order Horn rule is an omitted writing of a globally unique variable symbol; the meanings and representations of the remaining symbols are the same as the general conventions of first-order predicate logic.

202. Construct all sub-rules of each rule in the current candidate set according to an extension method of logical rules, and add these sub-rules to a same sub-rule set.

203. Calculate the scores of all elements in the candidate set and the sub-rule set according to the quantitative evaluation method for compression effect in step 102. 204, according to the score in step 203, determine whether there is a rule in the candidate set which is the current local maximum, i.e. the score of the rule is not less than the scores of all other rules in the candidate set and the sub-rule set; if so, execute step 206; Otherwise, execute step 205; 205, select several rules with the highest scores from the sub-rule set to form a new candidate set, and then execute step 202; 206, return the rule with the highest score in the candidate set as the result of the mining.

4. The method of claim 3, wherein, Step 206 further includes the following processes: If there are multiple rules with the same score and the highest score, select one of them Return the maximum. If there are still multiple rules in contention at this time, select the one with the smallest |r| and return it; If there are still multiple rules in contention at this time, return a rule at random; r is a first-order Horn rule; the information that can be inferred by the rule r and that is in the knowledge base is The amount of information contained is denoted by The information that the rule r can infer but is not in the knowledge base is The amount of information contained is denoted by The length of the rule is |r|.

5. The method of claim 2, wherein, Step 104 includes the following processes: 301, identify the reasoning dependency relationships of the information in the knowledge base according to all the first-order Horn rules mined, and construct a directed graph G according to these relationships; a node in G represents an independent record in the knowledge base, and an edge in G represents the reasoning relationship of the records in the knowledge base, with the direction of the edge pointing from the record used for reasoning to the record that can be reasoned out; if there are multiple reasoning ways for a record in the knowledge base, only the dependency relationship of one of the ways is retained in G; the record is a constant first-order atomic predicate; 302, identify all strongly connected components in G; 303, for each strongly connected component S, select a subset V of the nodes in S such that the node set of any loop in S intersects with V; then, mark the corresponding information of the knowledge base in V as "non-deletable"; 304, mark the information in the knowledge base corresponding to the nodes in G with an in-degree of 0 and not marked as "non-deletable" as "deletable".

6. The method of claim 5, wherein, Step 303 includes the following processes: 401, select the node with the maximum product of out-degree and in-degree in the current strongly connected component and add it to the node set V; if there are multiple nodes with the maximum product in contention, select one at random; 402, delete all the nodes and edges connected to them selected in step 401; if there are nodes with out-degree or in-degree of 0 in the remaining structure, continue to delete these nodes and the edges connected to them; repeat this process until there are no nodes with out-degree or in-degree of 0 in the remaining structure of the current strongly connected component; 403, determine whether there are still undelleted edges in the remaining structure of the current strongly connected component; if so, execute 401; otherwise, execute 404; 404, return the current constructed node set V.

7. The method of claim 2, wherein, The method for quantitatively compressing the effect in step 102 specifically satisfies the following characteristics: The method for quantitatively evaluating the compression effect of a rule r should return a score f(r), and f(r) is proportional to and inversely proportional to and |r|; At the same time, does not include information in the knowledge base that has been marked as "inferable"; In this step, r is a first-order Horn rule; the information that can be inferred by rule r and is in the knowledge base is The amount of information it contains is denoted by The information that can be inferred but is not in the knowledge base is The amount of information it contains is denoted by The length of the rule is |r|.

8. The method of claim 3, wherein, The extension method of the logical rule in step 202 satisfies the following characteristics: monotonically adding limited and enumerable new constraint conditions to the target rule.