A knowledge base retrieval method that supports compression
By applying prefix compression and intelligent differential compression algorithms to the B+ tree index structure, combined with intelligent index retrieval algorithms, the problems of low compression efficiency and slow retrieval are solved, achieving efficient data storage and fast retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA NAT BUILDING MATERIALS TECH CO LTD
- Filing Date
- 2024-06-04
- Publication Date
- 2026-05-26
AI Technical Summary
Existing compression and retrieval methods suffer from low compression efficiency, slow retrieval response, and long data decompression time when dealing with dynamically changing data and complex queries.
We employ a B+ tree index structure combined with prefix compression technology and intelligent differential compression algorithm. Through intelligent index retrieval algorithm, we adjust the interaction between the index structure and compressed data, and monitor performance indicators in real time to optimize data storage and retrieval efficiency.
Significantly reduces storage space requirements, improves data access speed, optimizes query paths, enhances retrieval efficiency, and ensures the system maintains high performance under different access modes.
Smart Images

Figure CN120950622B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge base technology, and more specifically, to a knowledge base retrieval method that supports compression. Background Technology
[0002] A knowledge base retrieval method that supports compression aims to optimize storage and retrieval efficiency in large-scale data environments through efficient data compression technology and intelligent indexing mechanisms. It utilizes prefix compression technology to compress the B+ tree index structure and combines it with intelligent differential compression algorithm to compress data in the knowledge base, significantly reducing storage space requirements while improving data retrieval speed.
[0003] Existing compression and retrieval methods suffer from low compression efficiency, slow retrieval response, and long data decompression time when dealing with dynamically changing data and complex queries due to the complexity and volume of data, the variability of index structures, and the mismatch between compression strategies. Therefore, this paper proposes a knowledge base retrieval method that supports compression. Summary of the Invention
[0004] The purpose of this invention is to provide a knowledge base retrieval method that supports compression, in order to solve the problems mentioned in the background art, such as low compression efficiency, slow retrieval response, and long data decompression time caused by the complexity and large volume of data, the variability of index structure and the mismatch between compression strategies.
[0005] To achieve the above objectives, the present invention aims to provide a knowledge base retrieval method that supports compression, comprising the following steps:
[0006] S1. Establish a B+ tree as the index structure of the knowledge base, and compress the B+ tree index structure using prefix compression technology;
[0007] S2. Compress the data in the knowledge base using the intelligent differential compression algorithm;
[0008] S3. Based on the B+ tree index structure, use intelligent index retrieval algorithms to adjust the interaction between the index structure and compressed data;
[0009] S4. Monitor performance metrics in real time and check the integrity of data regularly.
[0010] As a further improvement to this technical solution, in S1, the B+ tree is a self-balancing multi-way search tree used to organize and manage knowledge base data, enabling fast data retrieval and efficient data insertion and deletion operations.
[0011] The prefix compression technique is used to process a set of strings with a common prefix in a B+ tree. The specific steps of the prefix compression technique to compress the index structure of a B-tree are as follows:
[0012] S1.1 Traverse the set of strings to be compressed and identify the shared prefix parts;
[0013] S1.2 Eliminate duplicate prefixes and store the length information of the unique suffix and prefix for each string;
[0014] S1.3. In the non-leaf nodes of the B+ tree, compress the shared prefixes between key values;
[0015] S1.4 Maintain the sequential links between leaf nodes and update the pointers of non-leaf nodes;
[0016] Prefix compression technology reduces storage requirements by eliminating duplicate prefixes, thereby improving storage efficiency. Applying prefix compression technology to the index structure of a B-tree can significantly reduce the space occupied by the index, especially when the index key is a string and there are many common prefixes.
[0017] As a further improvement to this technical solution, in step S2, the intelligent differential compression algorithm is used to reduce the data storage space of the knowledge base. Through intelligent compression strategies and index optimization, it improves the efficiency of data storage and ensures the performance of data retrieval. The intelligent differential compression algorithm is based on natural language processing technology and is integrated with B+ tree indexes to achieve the functions of optimizing data storage space and improving query performance using differential compression strategies. The specific steps involved in the intelligent differential compression algorithm are as follows:
[0018] S2.1, For the dataset D = {d1, d2, ..., dn} in the knowledge base n The data is cleaned and standardized, and then natural language processing techniques are used to extract the feature vector F for each data item. i ={f i1 f i2 …f im};
[0019] S2.2 Calculate the difference using cosine similarity: Calculate the cosine similarity between data items A and B:
[0020] Cosine similarity
[0021] Here, data items A and B are represented as vector A = (a1, a1…a1) n ) and vector B = (b1, b1…b n A·B represents the dot product of vectors A and B; ||A||||B|| represent the Euclidean norms of vectors A and B, respectively.
[0022] S2.3. Based on cosine similarity evaluation, a differential compression strategy is used in conjunction with a genetic algorithm to maximize the average compression ratio of the entire dataset.
[0023] S2.4. Compress the data based on the obtained maximum average compression ratio, and adjust the B+ tree index to adapt to the compressed data;
[0024] Intelligent differential compression algorithms automatically label data and construct relationship graphs between data by analyzing the context and semantic information of the data. This deep data understanding allows the algorithm to identify potential connections and differences between data, thereby implementing more refined compression strategies. By integrating this intelligent data processing method with the B+ tree index structure, the algorithm can not only effectively reduce the storage space of knowledge base data, but also optimize the data retrieval path and improve query efficiency.
[0025] As a further improvement to this technical solution, in S2.1, the natural language processing technology is used to process and analyze text data, including word segmentation, stop word removal, part-of-speech tagging, and feature construction, to automatically extract information and features from the original text. The steps involved are as follows:
[0026] S2.1.1, Apply word segmentation technology to divide each text d i Decompose into a set of words;
[0027] S2.1.2 Remove stop words from the decomposed word set;
[0028] S2.1.3 Calculate the frequency of each word in the text and convert it into a feature vector F. i ={f i1 f i2 …f im}
[0029] As a further improvement to this technical solution, in S2.3, the differentiated compression strategy is an intelligent data compression method that assigns different compression ratios to each data item based on factors such as the content differences, importance, and access frequency between data items. The specific compression strategy is as follows:
[0030] S2.3.1 Content-based differentiated compression: A higher compression ratio is used for data items with high content repetition, and a lower compression ratio is used for data items with unique content;
[0031] S2.3.2 Importance-based differentiated compression: Use a lower compression ratio for high-value data and a higher compression ratio for relatively low-value data;
[0032] S2.3.3 Use a lower compression ratio for frequently accessed data and a higher compression ratio for less frequently accessed data.
[0033] As a further improvement to this technical solution, in step S3, the intelligent index retrieval algorithm is implemented based on compressed sensing technology, decompression, and dynamic decompression technology. The steps involved in the intelligent index retrieval algorithm to realize an intelligent and fast data retrieval method are as follows:
[0034] S3.1. Combining compressed sensing technology, construct a compressed metadata table and mark the access frequency and last access time of nodes:
[0035] Compressed Meta Information Table: CMT = {(P i L i S i )};
[0036] Node access frequency:
[0037] Last access time: LAT(N) = max(T(Q) i ));
[0038] Among them, P i Location of the compressed block; L i For compression levels; S i For block size; F(Q) i ) indicates query Q i The number of times node N is visited; T(Q) i ) indicates query Q i The timestamp of accessing node N;
[0039] S3.2. Using partial decompression and dynamic decompression techniques, only partially decompress the data block C required for querying. i During query execution, only the data block C involved in the query is decompressed. i ;
[0040] S3.3. Based on the data compression mode and index information, optimize the query path using a path optimization algorithm, and utilize parallel processing technology to process multiple query requests simultaneously:
[0041] Optimized path O(Q) = min∑W(N) i );
[0042] S3.4. Dynamically adjust and reorganize the B+ tree index structure based on query logs and data access patterns.
[0043] As a further improvement to this technical solution, step S3.2 utilizes partial decompression and dynamic decompression techniques to only partially decompress the data block C required for querying. i The decompression functions involved are as follows:
[0044] Partial decompression function: PD(C i R) = C i [R];
[0045] Among them, C i Represents the i-th compressed data block; R is the range of the desired data segment; C i [R] indicates that the compressed data block C is from i Extract the raw data within the range R;
[0046] Specifically, during the query execution process, only the data block C involved in the query is decompressed. i The query decompression functions involved are as follows:
[0047] Query the decompression function: D(Q) = UPD(C) i , R(Q));
[0048] Where Q represents the query, containing the required data and conditions; R(Q) represents the scope of the query; C i Represents the i-th compressed data block; ∪ represents the union operation of sets, merging the results of all partial decompression functions; PD(C i R(Q)) represents the i-th data block C i Partial decompression is performed to obtain the fragment R(Q) required for querying Q.
[0049] As a further improvement to this technical solution, the dynamic adjustment and reorganization of the B+ tree index structure in S3.4 is used to ensure that the system maintains high performance under different access modes;
[0050] The dynamically adjusted B+ tree index structure calculates the adjustment weight W(N) of each node based on the node access frequency AF(N) and last access time LAT(N) in S3.1. Nodes are adjusted when the access frequency exceeds a set threshold θ. The mathematical formulas involved in calculating the adjustment weight W(N) of each node are as follows:
[0051]
[0052] Where α and β are weighting coefficients; t represents the current time; T max This indicates the maximum time span recorded by the system;
[0053] The mathematical model formula involved in adjusting the nodes when the threshold θ is exceeded is as follows:
[0054] Adjust(N) → Rebalance.
[0055] As a further improvement to this technical solution, the reorganization of the B+ tree index structure in S3.4 is used to periodically reorganize and compress data blocks and update the index based on access patterns and query efficiency. The steps involved are as follows:
[0056] S3.4.1 Calculate C for each compressed data blocki UE (C) efficiency i ):
[0057]
[0058] Wherein, the U(Q) j ) indicates query Q j Use data block C i The number of times; S(C i ) Representation data block C i Size;
[0059] S3.4.2, when UE(C i When the data falls below the set threshold γ, rearrange the data blocks.
[0060] Reorganize(C i → Optimize Layout.
[0061] As a further improvement to this technical solution, real-time monitoring technology is used in step S4 to monitor performance indicators in real time. The specific steps involved in real-time monitoring of performance indicators are as follows:
[0062] S4.1, Query Response Time (QRT) and Data Loading Speed (DLS):
[0063] Response Time (QRT):
[0064] Data loading speed DLS:
[0065] S4.2 Configure monitoring tools and alarm thresholds.
[0066] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0067] 1. In this knowledge base retrieval method that supports compression, the data in the knowledge base is compressed by using an intelligent differential compression algorithm, which achieves efficient data compression and storage optimization, significantly reducing storage space requirements and improving data access speed.
[0068] 2. In this knowledge base retrieval method that supports compression, based on the B+ tree index structure, an intelligent index retrieval algorithm is used to adjust the interaction between the index structure and compressed data, thereby achieving intelligent and fast data retrieval. This can optimize the query path, reduce data decompression time, and improve retrieval efficiency. Attached Figure Description
[0069] Figure 1 This is a flowchart of the overall method of the present invention. Detailed Implementation
[0070] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0071] Example:
[0072] Please see Figure 1 As shown, this embodiment provides a knowledge base retrieval method that supports compression, including the following steps: S1, establishing a B+ tree as the index structure of the knowledge base, and using prefix compression technology to compress the index structure of the B+ tree;
[0073] In S1, the B+ tree is a self-balancing multi-way search tree used to organize and manage knowledge base data, enabling fast data retrieval and efficient data insertion and deletion operations.
[0074] The prefix compression technique is used to process a set of strings with a common prefix in a B+ tree. The specific steps of the prefix compression technique to compress the index structure of a B-tree are as follows:
[0075] S1.1 Traverse the set of strings to be compressed and identify the shared prefix parts;
[0076] S1.2 Eliminate duplicate prefixes and store the length information of the unique suffix and prefix for each string;
[0077] S1.3. In the non-leaf nodes of the B+ tree, compress the shared prefixes between key values;
[0078] S1.4 Maintain the sequential links between leaf nodes and update the pointers of non-leaf nodes;
[0079] Prefix compression technology reduces storage requirements by eliminating duplicate prefixes, thereby improving storage efficiency. Applying prefix compression technology to the index structure of a B-tree can significantly reduce the space occupied by the index, especially when the index key is a string and there are many common prefixes.
[0080] S2. Compress the data in the knowledge base using the intelligent differential compression algorithm;
[0081] In step S2, the intelligent differential compression algorithm is used to reduce the data storage space of the knowledge base. Through intelligent compression strategies and index optimization, it improves data storage efficiency and ensures data retrieval performance. The intelligent differential compression algorithm is based on natural language processing technology and is integrated with B+ tree indexes to use differential compression strategies to achieve the functions of data storage space optimization and query performance improvement. The specific steps involved in the intelligent differential compression algorithm are as follows:
[0082] S2.1, For the dataset D = {d1, d2, ..., dn} in the knowledge base n The data is cleaned and standardized, and then natural language processing techniques are used to extract the feature vector F for each data item. i ={f i1 f i2 …f im};
[0083] S2.2 Calculate the difference using cosine similarity: Calculate the cosine similarity between data items A and B:
[0084] Cosine similarity
[0085] Here, data items A and B are represented as vector A = (a1, a1…a1) n ) and vector B = (b1, b1…b n A·B represents the dot product of vectors A and B; ||A||||B|| represent the Euclidean norms of vectors A and B, respectively.
[0086] S2.3. Based on cosine similarity evaluation, a differential compression strategy is used in conjunction with a genetic algorithm to maximize the average compression ratio of the entire dataset.
[0087] S2.4. Compress the data based on the obtained maximum average compression ratio, and adjust the B+ tree index to adapt to the compressed data;
[0088] Intelligent differential compression algorithms automatically label data and construct relationship graphs between data by analyzing the context and semantic information of the data. This deep data understanding allows the algorithm to identify potential connections and differences between data, thereby implementing more refined compression strategies. By integrating this intelligent data processing method with the B+ tree index structure, the algorithm can not only effectively reduce the storage space of knowledge base data, but also optimize the data retrieval path and improve query efficiency.
[0089] In step S2.1, the natural language processing technology is used to process and analyze text data, including word segmentation, stop word removal, part-of-speech tagging, and feature construction, to automatically extract information and features from the original text. The steps involved are as follows:
[0090] S2.1.1, Apply word segmentation technology to divide each text d i Decompose into a set of words;
[0091] S2.1.2 Remove stop words from the decomposed word set;
[0092] S2.1.3 Calculate the frequency of each word in the text and convert it into a feature vector F. i ={f i1 f i2 …f im}
[0093] In step S2.3, the differentiated compression strategy is an intelligent data compression method that assigns different compression ratios to each data item based on factors such as content differences, importance, and access frequency. The specific compression strategy is as follows:
[0094] S2.3.1 Content-based differentiated compression: A higher compression ratio is used for data items with high content repetition, and a lower compression ratio is used for data items with unique content;
[0095] S2.3.2 Importance-based differentiated compression: Use a lower compression ratio for high-value data and a higher compression ratio for relatively low-value data;
[0096] S2.3.3 Use a lower compression ratio for frequently accessed data and a higher compression ratio for less frequently accessed data.
[0097] S3. Based on the B+ tree index structure, use intelligent index retrieval algorithms to adjust the interaction between the index structure and compressed data;
[0098] In step S3, the intelligent index retrieval algorithm is implemented based on compressed sensing technology, decompression, and dynamic decompression technology. The steps involved in the intelligent index retrieval algorithm to achieve an intelligent and fast data retrieval method are as follows:
[0099] S3.1. Combining compressed sensing technology, construct a compressed metadata table and mark the access frequency and last access time of nodes:
[0100] Compressed Meta Information Table: CMT = {(P i L i S i )};
[0101] Node access frequency:
[0102] Last access time: LAT(N) = max(T(Q) i ));
[0103] Among them, P i Location of the compressed block; L i For compression levels; S i For block size; F(Q) i ) indicates query Q i The number of times node N is visited; T(Q)i ) indicates query Q i The timestamp of accessing node N;
[0104] S3.2. Using partial decompression and dynamic decompression techniques, only partially decompress the data block C required for querying. i During query execution, only the data block C involved in the query is decompressed. i ;
[0105] S3.3. Based on the data compression mode and index information, optimize the query path using a path optimization algorithm, and utilize parallel processing technology to process multiple query requests simultaneously:
[0106] Optimized path O(Q) = min∑W(N) i );
[0107] S3.4. Dynamically adjust and reorganize the B+ tree index structure based on query logs and data access patterns.
[0108] In step S3.2, partial decompression and dynamic decompression techniques are used to partially decompress the data block C required for querying. i The decompression functions involved are as follows:
[0109] Partial decompression function: PD(C i R) = C i [R];
[0110] Among them, C i Represents the i-th compressed data block; R is the range of the desired data segment; C i [R] indicates that the compressed data block C is from i Extract the raw data within the range R;
[0111] Specifically, during the query execution process, only the data block C involved in the query is decompressed. i The query decompression functions involved are as follows:
[0112] Query the decompression function: D(Q) = UPD(C) i , R(Q));
[0113] Where Q represents the query, containing the required data and conditions; R(Q) represents the scope of the query; C i Represents the i-th compressed data block; U represents the union operation of sets, merging the results of all partial decompression functions; PD(C i R(Q)) represents the i-th data block C i Partial decompression is performed to obtain the fragment R(Q) required for querying Q.
[0114] The dynamic adjustment and reorganization of the B+ tree index structure in S3.4 is used to ensure that the system maintains high performance under different access modes;
[0115] The dynamically adjusted B+ tree index structure calculates the adjustment weight W(N) of each node based on the node access frequency AF(N) and last access time LAT(N) in S3.1. Nodes are adjusted when the access frequency exceeds a set threshold θ. The mathematical formulas involved in calculating the adjustment weight W(N) of each node are as follows:
[0116]
[0117] Where α and β are weighting coefficients; t represents the current time; T max This indicates the maximum time span recorded by the system;
[0118] The mathematical model formula involved in adjusting the nodes when the threshold θ is exceeded is as follows:
[0119] Adjust(N) → Rebalance.
[0120] The reorganization of the B+ tree index structure in S3.4 is used to periodically reorganize and compress data blocks and update the index based on access patterns and query efficiency. The steps involved are as follows:
[0121] S3.4.1 Calculate C for each compressed data block i UE (C) efficiency i ):
[0122]
[0123] Wherein, the U(Q) j ) indicates query Q j Use data block C i The number of times; S(C i ) Representation data block C i Size;
[0124] S3.4.2, when UE(C i When the data falls below the set threshold γ, rearrange the data blocks.
[0125] Reorganize(C i → Optimize Layout.
[0126] S4. Monitor performance metrics in real time and check the integrity of data regularly;
[0127] In step S4, real-time monitoring technology is used to monitor performance indicators in real time. The specific steps involved in real-time monitoring of performance indicators are as follows:
[0128] S4.1, Query Response Time (QRT) and Data Loading Speed (DLS):
[0129] Response Time (QRT):
[0130] Data loading speed DLS:
[0131] S4.2 Configure monitoring tools and alarm thresholds.
[0132] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A knowledge base retrieval method supporting compression, characterized in that: Includes the following steps: S1. Establish a B+ tree as the index structure of the knowledge base, and compress the B+ tree index structure using prefix compression technology; S2. Compress the data in the knowledge base using the intelligent differential compression algorithm; S3. Based on the B+ tree index structure, use intelligent index retrieval algorithms to adjust the interaction between the index structure and compressed data; S4. Monitor performance metrics in real time and check the integrity of data regularly; In step S3, the intelligent index retrieval algorithm is implemented based on compressed sensing technology, partial decompression, and dynamic decompression technology. The steps involved in the intelligent index retrieval algorithm to achieve an intelligent and fast data retrieval method are as follows: S3.
1. Combining compressed sensing technology, construct a compressed metadata table and mark the access frequency and last access time of nodes: Compression metadata table: ; Node access frequency: ; Last access time: ; in, Location of the compressed block; Compression level; Block size; Indicates query Access Node The number of times; Indicates query Access Node timestamp; S3.
2. Using partial decompression and dynamic decompression techniques, only partially decompress the data blocks needed for querying. During query execution, only the data blocks involved in the query are decompressed. ; S3.
3. Based on the data compression mode and index information, optimize the query path using a path optimization algorithm, and utilize parallel processing technology to process multiple query requests simultaneously: Optimize path ; S3.
4. Dynamically adjust and reorganize the B+ tree index structure based on query logs and data access patterns; In step S4, real-time monitoring technology is used to monitor performance indicators in real time. The specific steps involved in real-time monitoring of performance indicators are as follows: S4.1, Query Response Time (QRT) and Data Loading Speed (DLS): Response time : ; Data loading speed : ; S4.2 Configure monitoring tools and alarm thresholds.
2. The knowledge base retrieval method supporting compression according to claim 1, characterized in that: In step S2, the intelligent differential compression algorithm is used to reduce the data storage space of the knowledge base. Through intelligent compression strategies and index optimization, it improves data storage efficiency and ensures data retrieval performance. The intelligent differential compression algorithm is based on natural language processing technology and is integrated with B+ tree indexes to use differential compression strategies to achieve the functions of data storage space optimization and query performance improvement. The specific steps involved in the intelligent differential compression algorithm are as follows: S2.1, Data sets in the knowledge base The data is cleaned and standardized, and then natural language processing techniques are used to extract the feature vector for each data item. ; S2.2 Calculate the difference of data items using cosine similarity. and Cosine similarity between them: Cosine similarity ; Among them, data items and Represented as a vector sum vector ; Representing vectors and The dot product; Representing vectors respectively and The Euclidean norm; S2.
3. Based on cosine similarity evaluation, a differential compression strategy is used in conjunction with a genetic algorithm to maximize the average compression ratio of the entire dataset. ; S2.
4. Compress the data based on the obtained maximum average compression ratio, and adjust the B+ tree index to adapt to the compressed data.
3. The knowledge base retrieval method supporting compression according to claim 2, characterized in that: In step S2.1, the natural language processing technology is used to process and analyze text data, including word segmentation, stop word removal, part-of-speech tagging, and feature construction, to automatically extract information and features from the original text. The steps involved are as follows: S2.1.1, Apply word segmentation technology to divide each text Decompose into a set of words; S2.1.2 Remove stop words from the decomposed word set; S2.1.3 Calculate the frequency of each word in the text and convert it into a feature vector. .
4. The knowledge base retrieval method supporting compression according to claim 2, characterized in that: In step S2.3, the differentiated compression strategy is an intelligent data compression method that assigns different compression ratios to each data item based on factors such as content differences, importance, and access frequency. The specific compression strategy is as follows: S2.3.1 Content-based differentiated compression: A higher compression ratio is used for data items with high content repetition, and a lower compression ratio is used for data items with unique content; S2.3.2 Importance-based differentiated compression: Use a lower compression ratio for high-value data and a higher compression ratio for relatively low-value data; S2.3.3 Use a lower compression ratio for frequently accessed data and a higher compression ratio for less frequently accessed data.
5. The knowledge base retrieval method supporting compression according to claim 1, characterized in that: In step S3.2, partial decompression and dynamic decompression techniques are used to partially decompress the data blocks required for querying. The decompression functions involved are as follows: ; in, Indicates the first One compressed data block; The range of the required data segment; Indicates from compressed data blocks Extract range The original data within; Specifically, during the query execution process, only the data blocks involved in the query are decompressed. The query decompression functions involved are as follows: Query decompression function: ; in, The query contains the required data and conditions; To define the scope of the query; Indicates the first One compressed data block; This represents the union operation of sets, which combines the results of all partial decompression functions; Indicates the first Data blocks Partial decompression to obtain query results Required fragments .
6. The knowledge base retrieval method supporting compression according to claim 1, characterized in that: The dynamic adjustment and reorganization of the B+ tree index structure in S3.4 is used to ensure that the system maintains high performance under different access modes; The dynamic adjustment of the B+ tree index structure is based on the node access frequency in S3.
1. and last visit time Calculate the adjustment weight for each node Exceeding the set threshold Adjust nodes in real time and calculate the adjustment weight for each node. The mathematical formulas involved are as follows: ; in, These are the weighting coefficients; Indicates the current time; This indicates the maximum time span recorded by the system.
7. The knowledge base retrieval method supporting compression according to claim 1, characterized in that: The reorganization of the B+ tree index structure in S3.4 is used to periodically reorganize and compress data blocks and update the index based on access patterns and query efficiency. The steps involved are as follows: S3.4.1 Calculate each compressed data block usage efficiency : ; Among them, the Indicates query Use data blocks The number of times; Represents data block Size; S3.4.2, when Below the set threshold At that time, the data blocks are rearranged.