Data structure and method for optimizing first-order logic rule mining

By optimizing the data structure and methods for first-order logical rule mining, and utilizing rule caching, cache block pools, and block computation lookup tables, the problems of slow speed and high memory usage in existing technologies are solved, achieving efficient logical rule mining.

CN121455844APending Publication Date: 2026-02-03王若愚
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, first-order logic rule mining is slow and consumes a lot of memory, especially in large-scale knowledge bases where it cannot be effectively mined, and database technology limits computational efficiency.

Method used

A specialized data structure and method, including rule caching, cache block pool, and block computation lookup table, are used to optimize the representation and operation of variable substitution, reduce memory usage, and avoid redundant calculations.

Benefits of technology

It significantly improves the efficiency of first-order logical rule mining, reduces memory consumption, and increases computing speed and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455844A_ABST
    Figure CN121455844A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of knowledge base data mining, and relates to a data structure and method for optimizing first-order logic rule mining, and the data structure comprises a rule cache, a cache block pool and a block calculation lookup table. According to the rule cache, an expression mode of a variable replacement set in a single logic rule is divided into a plurality of cache segments to implicitly express a Cartesian product among the segments, so that the memory occupation of the cache is greatly reduced. The cache block pool optimizes the related operation of variable modification in the first-order logic, and improves the performance of index construction and related operation. The block calculation lookup table maximizes the reuse rate of the cache blocks in the cache block pool, records the same cache block operation in the table to avoid repeated operation, and further reduces the memory occupancy rate while improving the calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge base data mining technology, and in particular to a data structure and method for optimizing first-order logic rule mining. Background Technology

[0002] First-order logic rules are widely used in knowledge representation and reasoning. Based on a set of predicates, a first-order logic rule can derive a new set of predicates through logical entailment. It plays a crucial role in specific tasks such as knowledge base construction, completion, validation, and question answering. The top-down approach to mining first-order logic rules is widely adopted in data science research due to its ease of understanding.

[0003] However, mining first-order logic rules is slow and cannot be applied to large-scale knowledge bases. To improve mining performance, researchers have proposed optimization methods at the algorithm, architecture, and data levels.

[0004] Algorithm-oriented optimization primarily focuses on limiting the expressive power of the mining logic rules. For example, the DL-FOIL system (DOI: 10.1007 / 978-3-540-85928-4_12) restricts general first-order logic rules to general descriptive logic rules. The AMIE system (DOI: 10.1007 / 978-3-030-49461-2_3) restricts the length of the mined first-order Horn rules to no more than three atomic predicates, each predicate to contain at most two parameters, and each variable appearing in the rule at least twice. Pruning is also a commonly used algorithm-level optimization technique. The QuickFOIL system (DOI: 10.14778 / 2735508.2735510) prunes substitutable redundant elements that appear during the mining process. The EDA-ILP system (DOI: 10.1007 / 978-3-642-31951-8_25) uses a statistical estimation-based approach to prune search branches with lower scores.

[0005] Architecture-oriented optimization primarily focuses on implementing logical rule mining algorithms using more efficient technologies. For example, the FOIL-D system (DOI: 10.1007 / 978-3-540-30109-7_9) utilizes relational database query statements to implement logical rule mining algorithms in its block computation lookup table, making data querying and logical reasoning more efficient. The ScaleKB system (DOI: 10.1007 / s00778-016-0444-3) parallelizes pathfinding algorithms to improve efficiency.

[0006] Data-oriented optimization primarily focuses on simplifying data representation. For example, similar information can be aggregated to reduce the amount of input data for rule mining algorithms (DOI: 10.1016 / j.eswa.2020.113781). However, data-oriented optimization methods are still quite limited at present.

[0007] Algorithm and architecture optimizations have improved the speed of logical rule mining algorithms, but the data structures upon which these algorithms rely contain significant memory waste, indirectly increasing their runtime. Existing optimization techniques still fall short of enabling mining algorithms to extract data from large-scale knowledge bases quickly, especially when the knowledge base contains multiple relationships—that is, when the knowledge base is built on a relational data model. Furthermore, without limiting the length of mining rules, current algorithms consume enormous amounts of memory, further restricting the size of the target knowledge base that can be mined.

[0008] This is because there is an issue with the explicit representation of Cartesian products during the mining process. When calculating the reasoning effect of logical rules, current algorithms need to explicitly enumerate the Cartesian products of multiple sets representing variable substitutions and then count them. This process not only consumes a significant amount of time but also requires massive amounts of space to store the statistical results.

[0009] At the same time, the speed of performing the above calculations is also limited by current database technology. This is because relational databases are designed for general data querying, rather than operator optimization based on logical models. The time and memory requirements for index building and matching queries remain high.

[0010] Furthermore, there are no specific management methods for these results in current database technology. If these calculation results are cached, a large amount of memory space is required; if these calculation results are not cached, repeated calculations will be frequently encountered during the algorithm's progress, which will consume even more time. Summary of the Invention

[0011] To address the issues of slow speed and high memory consumption in current first-order logic rule mining systems, this invention proposes a data structure and method specifically for top-down first-order logic rule mining processes. This data structure comprises three main parts: a rule cache, a cache block pool, and a block computation lookup table. The rule cache stores the variable substitution set in a single logic rule in the form of cache fragments. The cache block pool manages the cache blocks used in the rule cache uniformly. The constant first-order atomic predicates (referred to as "records") cached in each cache block are indexed using an integer table, optimizing operations related to variable modifications in first-order logic. The block computation lookup table stores the results of existing block computations, allowing direct lookup when duplicate computations are encountered. The technical solution of this invention is implemented as follows:

[0012] The first aspect of this invention discloses a data structure for optimizing first-order logic rule mining, the data structure including a rule cache, a cache block pool, and a block calculation query table;

[0013] The rule cache is used to store all variable replacement methods for a single first-order logic rule; each candidate first-order logic rule corresponds to an instance in the rule cache, and each instance of the rule cache includes several instances of cache fragments;

[0014] A cached fragment represents the way variables are replaced in a rule fragment composed of some predicates in the current first-order logical rule;

[0015] Each instance of a cache fragment includes instances of several cache items;

[0016] A cache entry represents how variables are replaced in the connected component corresponding to a cached segment;

[0017] Each instance of a cached item corresponds to a unique variable substitution method;

[0018] Each instance of a cached item contains several instances of cache block references;

[0019] A cache block reference is a pointer to a cache block in the cache block pool;

[0020] The cache block is used to manage and maintain a collection of all records for variable substitutions that conform to the predicate;

[0021] Each instance of a cache block includes an instance of a list of records and an instance of an integer table;

[0022] The record list is a list of all records managed and maintained by the cache block;

[0023] Integer tables are used to index records in the record list to implement cache block extraction, splitting, matching, and joining operations;

[0024] The cache block pool is used to manage and maintain all cache blocks used in the current rule mining process, and to clear the corresponding storage space when the cache block is no longer needed;

[0025] The block computation lookup table is used to record the results of extraction, splitting, matching, and joining operations of cache blocks.

[0026] The term "record" as used in this invention refers to a constant first-order atomic predicate, or simply "record".

[0027] Preferably, the predicate set corresponding to each instance of the cache fragment is a connected segment of a first-order logical rule corresponding to the cache rule, and each connected segment in the logical rule is represented by a certain cache fragment.

[0028] Preferably, the integer table includes an ordered reference, a column constant table, an index distance table, and a constant quantity table;

[0029] An ordered reference consists of an n-row, l-column table where each element is a pointer to a record in a list of records.

[0030] The column constant table consists of a table with l columns, and the number of rows in each column is between 1 and n. The elements in the column are the constant values ​​that appear in the parameters of the records in the record list.

[0031] The indexed distance table consists of a table with l columns; wherein the number of rows in the j-th column of the indexed distance table is the same as the number of rows in the j-th column of the column constant table.

[0032] The constant count table consists of a 1-row, l-column table; the element value in the j-th column of the constant count table represents the number of elements in the j-th column of the current integer table and the index distance table.

[0033] n is the number of records in the record list, and l is the number of parameters corresponding to each record in the record list.

[0034] Preferably, the j-th column of the ordered reference is a sequence of pointers to all records in the corresponding record list, and when accessing the corresponding records in the order of the pointers, the value of the j-th parameter of these records is non-decreasing.

[0035] Preferably, the j-th column of the constant table stores the values ​​of all constants that appear in the j-th parameter of all records in the record list;

[0036] The values ​​in each column of the constant table are sorted in ascending order and there are no duplicates.

[0037] Preferably, let the value of the element in the i-th row and j-th column of the index distance table be a, let the value of the element in the (i+1)-th row and j-th column of the index distance table be b, let the value of the element in the i-th row and j-th column of the column constant table be c, and let the value of the j-th parameter of all the records pointed to by the pointers in the j-th column from row a to row b be c.

[0038] The second aspect of this invention discloses a data method for optimizing first-order logic rule mining. The method is implemented based on the data structure disclosed in the first aspect of this invention. The method includes the following steps: In the top-down mining process of first-order logic rules, the update of the rules will generate corresponding rule cache instance updates, which will then correspond to the creation and update operations of the integer table.

[0039] The update operations include extraction, splitting, matching, and joining.

[0040] Preferably, the process of creating the integer table is as follows:

[0041] Loop through all records in the record list; the loop process is as follows: start from the last column of parameters and loop towards the first column of parameters;

[0042] After completing the loop processing, the pointer order of the first column in the ordered reference is the lexicographical order of the records in the record list.

[0043] Preferably, the extraction method in the update operation includes the following steps:

[0044] Read parameters: Integer table instance I, column number j, constant value c;

[0045] Perform a binary search in the j-th column of the constants table of I to find the position of value c, and assume that the position is in the i-th row;

[0046] Read the value 'a' in the i-th row and j-th column of the index distance table of I, and the value 'b' in the (i+1)-th row and j-th column of the index distance table;

[0047] Finally, it returns an ordered reference to I, containing all the records corresponding to pointers in the range from row a to row b in column j.

[0048] Preferably, the splitting operation in the update operation includes the following steps:

[0049] Read parameters: Integer table instance I, column index j;

[0050] Read the value k from the j-th column of the constant count table of I;

[0051] For each i satisfying 2 ≤ i < k, read the value a at the j-th column of the (i - 1)-th row of the index distance table of I, read the value b at the j-th column of the i-th row of the index distance table of I, and take out the records corresponding to all the pointers in the range from the a-th row to the row before the b-th row of the j-th column of the ordered reference of I as a new record set and add it to the return value set;

[0052] Read the value a at the j-th column of the k-th row of the index distance table of I, and take out the records corresponding to all the pointers in the range from the a-th row to the n-th row of the j-th column of the ordered reference of I as a new record set and add it to the return value set;

[0053] Return the return value set.

[0054] Preferably, the process of the matching operation in the update operation is as follows:

[0055] Read the parameters: integer table instance I, column serial number j, column serial number k;

[0056] Filter out all the records in I that meet the condition "the j-th and k-th parameters are the same" and construct a new instance of an integer table, denoted as I';

[0057] Execute the Split(I', j) operation and return the result.

[0058] Preferably, the process of the join operation in the update operation is as follows:

[0059] First, read the parameters: integer table instance I1, column serial number j1, integer table instance I2, column serial number j2;

[0060] Let the sets of records maintained by I1 and I2 be L1 and L2, and execute the θ-join operation: Construct a new instance of an integer table according to the operation result, denoted as I';

[0061] Execute the Match(I', j1, j2) operation and return the result.

[0062] The advantages of the present invention are as follows:

[0063] In the present invention, the rule cache splits the representation of the variable substitution set in a single logical rule into several cache fragments to implicitly represent the Cartesian product between multiple fragments, greatly reducing the memory occupancy of the cache.

[0064] The cache block and the cache block pool are optimized for the related operations of variable modification in first-order logic, improving the performance of index construction and related operations.

[0065] The block computation lookup table maximizes the reuse rate of cache blocks in the cache block pool. It records the same cache block operations in the table to avoid duplicate operations, thereby improving computational efficiency and further reducing memory usage. Attached Figure Description

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

[0067] Figure 1 This is a system structure diagram of an embodiment of the present invention;

[0068] Figure 2 for Figure 1 The embodiment shown is a structural diagram of the integer table;

[0069] Figure 3 for Figure 1 The flowchart for constructing the integer table in the illustrated embodiment is shown.

[0070] Figure 4 This is a flowchart of the extraction operation in an embodiment of the present invention;

[0071] Figure 5 This is a flowchart of the splitting operation in an embodiment of the present invention;

[0072] Figure 6 This is a flowchart of the matching operation in an embodiment of the present invention;

[0073] Figure 7 This is a flowchart of the connection operation in an embodiment of the present invention.

[0074] The symbols in the above figures have the following meanings:

[0075] 101. Rule Cache; 102. Cache Fragment; 103. Cache Item; 104. Cache Block Reference; 105. Cache Block Pool; 106. Cache Block; 107. Record List; 108. Integer Table; 109. Block Computation Lookup Table; 201. Ordered Reference; 202. Column Constant Table; 203. Index Distance Table; 204. Constant Quantity Table. Detailed Implementation

[0076] Example: A data structure for optimizing first-order logical rule mining, such as... Figure 1 As shown, it includes rule cache 101, cache block pool 105, and block calculation lookup table 109.

[0077] Rule cache 101 is used to store all variable substitution methods for a single first-order logic rule. During the top-down first-order logic rule mining process, each candidate first-order logic rule corresponds to an instance of rule cache 101. An instance of rule cache 101 contains several cache fragment 102 instances.

[0078] Cache fragment 102 represents the method of variable substitution in a rule fragment composed of some predicates in the current rule. The way cache fragment 102 is divided in a rule cache 101 is not arbitrary; it must satisfy the following condition: the set of predicates corresponding to each cache fragment 102 is a connected segment of the first-order logical rule r corresponding to rule cache 101, and each connected segment in r is represented by a cache fragment 102. The definition of a connected segment is as follows:

[0079] If two predicates P and Q in a first-order logic rule r have the same variable x, then P and Q are said to be connected, denoted as P~Q.

[0080] Let P and Q be two predicates in a first-order logic rule r. If there exist n predicates R1, ..., R2... n Make P ~ R1 ~ ... ~ R n If P ~ Q, then there exists a connected path between P and Q, denoted as P~. * Q.

[0081] set up It is a subset of all predicates that make up a logical rule r. If for And for r There's no Q~ * P i Then it is called It is a connected segment in r.

[0082] An instance of cache fragment 102 contains several instances of cache item 103.

[0083] Cache entry 103 represents the substitution method for variables in the connected segment corresponding to a cache fragment 102. One instance of cache entry 103 corresponds to one variable substitution method. All instances of cache entry 103 within a cache fragment 102 instance are different. An instance of cache entry 103 contains several cache block reference instances 104.

[0084] Cache block reference 104 is a pointer to cache block 106 in cache block pool 105. One instance of cache block reference 104 points to one instance of cache block 106. Multiple instances of cache block reference 104 can point to the same instance of cache block 106.

[0085] Cache block pool 105 manages and maintains all cache blocks used in the current rule mining process to avoid duplicate cache blocks and clears the corresponding storage space when a cache block is no longer needed. Multiple cache block 106 instances are managed within a single cache block pool 105 instance.

[0086] Cache block 106 manages and maintains a set of all records that conform to the predicate's variable substitution. The set of records managed and maintained by a cache block instance 106 contains records in the knowledge base that satisfy a specific condition, which is the variable substitution scheme represented by the predicate corresponding to the cache block reference instance 104 referenced by the cache block instance 106 in the corresponding cache item instance 103. A cache block instance 106 has one and only one record list instance 107 and one integer table instance 108.

[0087] Record list 107 is a list of all records managed and maintained in cache block 106.

[0088] Integer table 108 is used to index records in record list 107 to enable fast extraction, splitting, matching, and joining operations of cache block 106.

[0089] The block computation lookup table 109 records the results of extraction, splitting, matching, and joining operations of cache blocks 106. When an operation of one or two cache block 106 instances is triggered, the instance first searches for the corresponding operation record in the block computation lookup table 109. If a matching operation result exists, the cache block 106 instance directly returns the result from the block computation lookup table 109; otherwise, the cache block 106 instance performs the operation, stores the result in the block computation lookup table 109, and then returns the result.

[0090] To save storage space, the block computation lookup table 109 assigns a partial order to symmetric operations and stores the result of the symmetric operation at the position of the smallest operation among these operations under that partial order. Furthermore, the block computation lookup table 109 instance does not store cache block 106 instances, but only contains pointers to the corresponding cache block 106 instances.

[0091] Figure 2 The detailed structure of the integer table 108 includes four parts: ordered references 201, column constants table 202, index distance table 203, and constant quantity table 204.

[0092] Ordered reference 201 is an n-row, l-column table. It stores pointers to records in the corresponding record list 107. Here, n is the number of records in the corresponding record list 107, and l is the number of parameters for these records. The j-th column of ordered reference 201 is a sequence of pointers to all records in the corresponding record list 107, satisfying the constraint that if the records are accessed in the order of their pointers, the value of the j-th parameter of these records is non-decreasing.

[0093] Column constant table 202 is an l-column table. The number of rows in each column is between 1 and n, where n is the number of records in the corresponding record list 107, and l is the number of parameters in these records. The j-th column of column constant table 202 stores the values ​​of all constants that appear in the j-th parameter of all records in the corresponding record list 107, sorted in ascending order, and without duplicates.

[0094] Index distance table 203 is a table with l columns. The number of elements in each column is the same as the number of elements in the corresponding column of column constant table 202 in the current integer table 108. Let the value of the element in the i-th row and j-th column of index distance table 203 be a, the value of the element in the (i+1)-th row and j-th column of index distance table 203 be b, and the value of the element in the i-th row and j-th column of column constant table 202 be c. The j-th parameter of all the records pointed to by the pointers in the j-th column of ordered reference 201 from row a to row b is c.

[0095] The constant count table 204 is a 1-row, l-column table. Here, l represents the number of parameters in the corresponding record list 107. The element value in the j-th column of the constant count table 204 instance represents the number of elements in the j-th column of the constant table 202 and the index distance table 203 in the current integer table 108.

[0096] In the process of mining first-order logical rules from top to bottom, the update of the rules will generate the update of the corresponding rule cache 101 instance, which will eventually correspond to the creation operation of the integer table 108 responsible for managing specific records and the four update operations.

[0097] The creation process of integer table 108 is as follows: Figure 3 As shown.

[0098] 301, take the list of records in record list 107 as input, and loop through the records from the last column parameter to the first column parameter.

[0099] 302, let i = k-1; k is the number of parameters to be recorded;

[0100] 303. In the loop that processes the i-th column parameter, the method uses a stable sorting algorithm to update the current record list to ascending order according to the i-th column parameter values ​​of all records, and records the pointers of the current record list in the i-th column of the ordered reference 201.

[0101] 304. The values ​​of the i-th column in column constant table 202, index distance table 203, and constant quantity table 204 are also updated according to the current record.

[0102] 305. Check if i is equal to 0. If yes, proceed to 306. Otherwise, decrement the value of i by one and return to 303.

[0103] 306, returns the constructed integer table.

[0104] After processing all columns, the pointers to the first column in ordered reference 201 are in lexicographical order of the records in record list 107.

[0105] The four update operations for integer table 108 are: extraction, splitting, matching, and joining.

[0106] The extraction operation method of integer table 108 is as follows: Figure 4 As shown.

[0107] Let I be an instance of an integer table 108. The extraction operation Get(I,j,c) of I means returning a list of all records managed by I that meet the condition "the j-th parameter is c".

[0108] 401. First, read the parameters I, j, and c.

[0109] 402. Perform a binary search in the j-th column of column constant table 202 to find the position of value c. Assume that the position is located in the i-th row. Read the value a in the j-th column of the i-th row of index distance table 203 and the value b in the (i+1)-th row of index distance table 203.

[0110] 403, returns all records corresponding to pointers in the ordered reference range of column j, row a to row b (inclusive of row a, exclusive of row b) of I.

[0111] The decomposition operation method of integer table 108 is as follows: Figure 5 As shown.

[0112] Let I be an instance of an integer table 108. The split operation Split(I,j) of I means dividing the records in I by index into several subsets according to the value of the j-th column, such that the j-th parameter of all records in each subset has the same value, and the number of subsets is minimized.

[0113] 501. First, read the parameters I and j.

[0114] 502. Split I according to the j-th column of the index distance table 203. Let the value of the j-th column of the constant quantity table 204 of I be k. Then, for each i satisfying 2 ≤ i < k, read the value a of the (i - 1)-th row and j-th column of the index distance table 203 of I, and read the value b of the i-th row and j-th column of the index distance table 203 of I. Take out all the records corresponding to the pointers in the range from the a-th row to the row before the b-th row of the j-th column of the ordered reference 201 of I as a new record set, denoted as L i . Read the value a of the k-th row and j-th column of the index distance table 203 of I. Take out all the records corresponding to the pointers in the range from the a-th row to the n-th row of the j-th column of the ordered reference 201 of I as a new record set, denoted as L k . Where n represents the number of records indexed in I.

[0115] 503. Add L1, L2, …, L k to the return value set.

[0116] 504. Finally, return the return value set.

[0117] The matching operation method of the integer table 108 is as Figure 6 shown. Let I be an instance of the integer table 108. The matching operation Match(I, j, k) of I means dividing all the records in I that satisfy the condition of "the j-th and k-th parameters are the same" according to the value of the j-th column into several subsets, so that the j-th and k-th parameter values of all records in each subset are the same, and the number of divided subsets is the least.

[0118] 601. First, read the parameters I, j, and k.

[0119] 602. Then, filter out all the records in I that meet the condition of "the j-th and k-th parameters are the same" and construct a new instance of the integer table 108, denoted as I'.

[0120] 603. Execute the Split(I', j) operation and return the result.

[0121] The concatenation operation method of the integer table 108 is as Figure 7 shown.

[0122] Let I1 and I2 be two instances of the integer table 108. The concatenation operation Join(I1, j1, I2, j2) of I1 and I2 means concatenating the records in I1 and I2 in the way of θ-join of the relational data model, and restricting that the j1-th column parameter of the records in I1 is the same as the j2-th column parameter of the records in I2, and then splitting the concatenated result.

[0123] 701. First, read the parameters I1, j1, I2, and j2.

[0124] 702, then perform the θ-join operation. Let L1 and L2 be the sets of records maintained by I1 and I2, respectively. Then the θ-join operation is expressed as: Then, based on the result of this operation, a new integer table 108 instance is constructed, denoted as I'.

[0125] 703. Finally, perform the Match(I',j1,j2) operation and return the result.

[0126] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A data structure for optimizing first-order logic rule mining, characterized in that, This includes rule caching, cache block pool, and block computation lookup table; The rule cache is used to store all variable replacement methods for a single first-order logic rule; each candidate first-order logic rule corresponds to an instance in the rule cache, and each instance of the rule cache includes several instances of cache fragments; A cached fragment represents the way variables are replaced in a rule fragment composed of some predicates in the current first-order logical rule; Each instance of a cache fragment includes instances of several cache items; A cache entry represents how variables are replaced in the connected component corresponding to a cached segment; Each instance of a cached item corresponds to a unique variable substitution method; Each instance of a cached item contains several instances of cache block references; A cache block reference is a pointer to a cache block in the cache block pool; The cache block is used to manage and maintain a collection of all records for variable substitutions that conform to the predicate; Each instance of a cache block includes an instance of a list of records and an instance of an integer table; The record list is a list of all records managed and maintained by the cache block; Integer tables are used to index records in the record list to implement cache block extraction, splitting, matching, and joining operations; The cache block pool is used to manage and maintain all cache blocks used in the current rule mining process, and to clear the corresponding storage space when the cache block is no longer needed; The block computation lookup table is used to record the results of extraction, splitting, matching, and joining operations of cache blocks.

2. The system according to claim 1, characterized in that, The predicate set corresponding to each cache fragment is a connected segment of the first-order logical rule corresponding to the cache rule, and each connected segment in the logical rule is represented by a certain cache fragment.

3. The system according to claim 1, characterized in that, The integer table includes an ordered reference, a column constant table, an index distance table, and a constant quantity table; An ordered reference consists of an n-row, l-column table where each element is a pointer to a record in a list of records. The column constant table consists of a table with l columns, and the number of rows in each column is between 1 and n. The elements in the column are the constant values ​​that appear in the parameters of the records in the record list. The indexed distance table consists of a table with l columns; wherein the number of rows in the j-th column of the indexed distance table is the same as the number of rows in the j-th column of the column constant table. The constant count table consists of a 1-row, l-column table; the element value in the j-th column of the constant count table represents the number of elements in the j-th column of the current integer table and the index distance table. n is the number of records in the record list, and l is the number of parameters corresponding to each record in the record list.

4. The system according to claim 3, characterized in that, The j-th column of the ordered reference is a sequence of pointers to all records in the corresponding record list, and when accessing the corresponding records in the order of the pointers, the value of the j-th parameter of these records is non-decreasing; The j-th column of the constant table stores the values ​​of all constants that appear in the j-th parameter of all records in the record list; The values ​​in each column of the constant table are sorted in ascending order and there are no duplicates; Let the value of the element in the i-th row and j-th column of the index distance table be a, the value of the element in the (i+1)-th row and j-th column of the index distance table be b, and the value of the element in the i-th row and j-th column of the column constant table be c. The value of the j-th parameter of all the records pointed to by the pointers in the j-th column from row a to row b is c.

5. A data method for optimizing first-order logic rule mining, employing the data structure described in any one of claims 1-4, characterized in that, The method includes the following steps: During the mining process of top - down first - order logic rules, the update of rules will generate corresponding instance updates of the rule cache, which are then mapped to the creation operation and update operations of the integer table; The update operations include extraction, splitting, matching, and linking.

6. The method according to claim 5, characterized in that, The process of creating the integer table is as follows: Loop through all records in the record list; the loop process is: loop from the last column parameter to the first column parameter; After completing the loop process, the pointer order of the first column in the ordered reference is the lexicographical order of the records in the record list.

7. The method according to claim 5, characterized in that, The extraction method in the update operation includes the following steps: Read parameters: integer table instance I, column number j representing the column, and constant value c; Perform a binary search in the j - th column of the column constant table of I to find the position of value c, and assume this position is in the i - th row; Read the value a in the i - th row and j - th column of the index distance table of I and the value b in the (i + 1) - th row and j - th column of the index distance table; Finally, return all the records corresponding to the pointers in the range from the a - th row to the row before the b - th row in the j - th column of the ordered reference of I.

8. The method according to claim 5, characterized in that, The splitting operation in the update operation includes the following steps: Read parameters: integer table instance I, column number j representing the column; Read the value k in the j - th column of the constant quantity table of I; For each i satisfying 2 ≤ i < k, read the value a in the (i - 1) - th row and j - th column of the index distance table of I, read the value b in the i - th row and j - th column of the index distance table of I, and take out all the records corresponding to the pointers in the range from the a - th row to the row before the b - th row in the j - th column of the ordered reference of I as a new record set and add it to the return value set; Read the value a in the k - th row and j - th column of the index distance table of I, and take out all the records corresponding to the pointers in the range from the a - th row to the n - th row in the j - th column of the ordered reference of I as a new record set and add it to the return value set; Return the return value set.

9. The method according to claim 5, characterized in that, The process of the matching operation in the update operation is as follows: Read parameters: integer table instance I, column number j representing the column, column number k representing the column; Filter out all records in I that meet the condition of "the j - th and k - th parameters are the same" and construct a new instance of the integer table, denoted as I'; Execute the Split(I', j) operation and return the result.

10. The method according to claim 5, characterized in that, The process of the linking operation in the update operation is as follows: First, read parameters: integer table instance I1, column number j1 representing the column, integer table instance I2, column number j2 representing the column; Let L1 and L2 be the sets of records maintained by I1 and I2, respectively. Perform the θ-join operation: Based on the result of this operation, construct a new instance of the integer table, denoted as I'; Execute the Match(I', j'1, j'2) operation and return the result.