A Reverse Index Optimization Method and System for Relational Databases

By using inverted index and aggregation functions in relational databases, unnecessary comparison operations are reduced and merged connections are integrated with multiple connections, which solves the problem of excessive search time in the existing technology, and achieves more efficient database query speed.

CN116010448BActive Publication Date: 2025-06-27CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211672866.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2025-06-27
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

When executing, query engines that use reverse indexes in existing relational databases need to compare and merge all publish list rows to achieve merging of publish lists, resulting in a significant increase in search time of query.

Method used

By using inverted index publishing lists, unnecessary comparison operations in intersections are reduced, and invalid comparison operations are minimized using aggregate functions, integrating merged connections with multiple connections to improve processing efficiency.

Benefits of technology

It effectively reduces unnecessary comparison times, improves database query speed, shortens search time, and is suitable for query scenarios in large data databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010448B_ABST
    Figure CN116010448B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for optimizing reverse indexing in a relational database. The method reduces unnecessary comparison operations in intersections by using an inverted index posting list, uses a skip merge join method to skip rows through an aggregation function provided by the database, and then uses a multi-way join method to improve join performance and shorten the query process by simplifying complex join methods, so as to obtain the result of the posting list of keywords to be searched in one process, and at the same time process the joins of multiple posting lists to be searched, without obtaining the intermediate result value of the posting list intersection, thereby shortening the search time and improving the processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computers, and particularly relates to a method and system for optimizing reverse indexing for a relational database. Background Art

[0002] With the increasing frequency of use of large texts in various scenarios, the need to effectively manage the storage and query of large texts is rapidly increasing. Databases ensure high performance and stability through efficient index access, maintaining data integrity, backup operations, and error handling. For several years, relational database management systems have focused on text search technology. Since the original keyword search becomes more time-consuming as the number of queries increases, reverse indexing is used to accelerate full-text search. A reverse index is a data structure that indexes and stores documents based on keywords for text search across the full text. However, when a relational query engine using a reverse index executes, it compares and merges all posting list rows to achieve the merging of posting lists, significantly increasing the search time of the query. To reduce the search time, there are already methods in the market that use a fast search index to skip the merge join of posting lists. However, if the search key value is exceeded, this method still compares the posting lists. Therefore, it is necessary to reduce unnecessary comparisons and queries.

[0003] There are various search methods in relational database search. Keyword-based search is the most commonly used technique, which can be divided into graph-based or relationship-based. The graph-based search technique plots all the data of a relational database on a graph, where nodes represent tuples and the links between nodes represent defined relationships, with the advantage of fast query processing speed. The relationship-based keyword query generates a posting list for each keyword, and the tuples in each table can be joined based on the relationships represented in the schema. It is suitable for large databases and can handle complex queries.

[0004] The reverse index structure is used to store and manage large documents and can also be used in search engines. The reverse index structure can be extended according to different usage scenarios. The initial reverse index structure, although it can provide reverse index configuration without modifying the query form, has an overly large storage size and is not suitable for resource-constrained environments. Subsequently, by optimizing the indexing method, the space in nearest neighbor search is effectively utilized, reducing the size of the reverse index. However, when a relational query engine using a reverse index executes, it compares and merges all posting list rows to achieve the merging of posting lists, significantly increasing the search time of the query.

[0005] The present invention proposes a reverse index optimization method for a relational database to reduce the search time of relational database queries. By adopting an inverted index posting list, unnecessary comparison operations in the intersection are reduced, and an aggregation function is used to minimize invalid comparison operations. The merge join and multi-way join are integrated to improve the processing efficiency. Summary of the Invention

[0006] In view of the above problems, the present invention is proposed.

[0007] According to one aspect of the present invention, a reverse index optimization method for a relational database is proposed. The method includes:

[0008] Step 1: Check the value currently pointed to by the cursor for each posting list;

[0009] Step 2: Determine whether there is a match and repeat the execution;

[0010] Step 2-1: If the current values of the three posting lists are the same, the corresponding key values are stored in the result list, and the cursors of the three posting lists are all moved one cell;

[0011] Step 2-2: If there is no match, check the key value Vd(C n-1(j) ) of the nth posting list according to the cursor value Vd(C n(i) ) of the (n - 1)th posting list where there is no match; if the cursor value Vd(C n-1(j) ) is less than the key value Vd(C n(i) ), use the skip merge join method to search for rows equal to or less than the key value Vd(C n(i) ), and move the cursor to that row. The number of rows moved is determined by the aggregation function; where C n(i) represents the cursor value pointing to the ith row in list n; i and j respectively refer to the rows of the current key value and cursor value;

[0012] Step 3: After moving the cursor, return to Step 1 and determine whether the cursor values of the n posting lists match; repeat this process until the cursor indication of one or more posting lists is NULL.

[0013] Meanwhile, the method further includes query processing. When performing list intersection in merge and phrase queries, use a logical product to search for documents containing all search keywords, including join queries and phrase queries; where for the join query, the steps are as follows: The join query searches for documents containing n search keywords. The conjunctive query requires the postings to be sorted in monotonically increasing order of the n input keywords, and returns the sorted result values including the common values of the n posting lists.

[0014] In this method, the <term, docid> column in the row-oriented relational inverted index table is used to perform posting list intersection. The zigzag merge join is used. When the merged key values do not match, the zigzag merge join operator is used to search for values greater than or equal to the key value; the cursor is moved to a value equal to or greater than the required value through the SkipRow function, and the skip merge join arranged in a monotonically increasing pattern in the inverted list is used to implement the join query search.

[0015] The present invention also proposes a reverse index optimization system for a relational database, and the system includes:

[0016] Check module: Check the value currently pointed to by the cursor for each posting list;

[0017] Judgment module: Judge whether it matches and repeat the execution;

[0018] Judgment sub-module 1: If the current values of the three posting lists are the same, the corresponding key values are stored in the result list, and the cursors of the three posting lists are all moved one cell;

[0019] Judgment sub-module 2: If they do not match, then according to the cursor value Vd(C n-1(j) ) of the (n - 1)-th posting list that does not match, check the key value Vd(C n(i) ) of the n-th posting list; if the cursor value Vd(C n-1(j) ) is less than the key value Vd(C n(i) ), then use the skip merge join method to search for the row equal to or less than the key value Vd(C n(i) ), and move the cursor to that row, and the number of rows moved is determined by the aggregation function; where C n(i) represents the cursor value pointing to the i-th row in list n; i and j respectively refer to the rows of the current key value and cursor value;

[0020] Execution module: After moving the cursor, return to step 1 and determine whether the cursor values of the n posting lists match; repeat this process until the cursor indication of one or more posting lists is NULL.

[0021] At the same time, the system also includes a query processing module. When performing list intersection in merge and phrase queries, use logical product to search for documents containing all search keywords, including join queries and phrase queries; where the join query has the following steps: The join query searches for documents containing n search keywords. The conjunctive query requires the postings to be sorted in a monotonically increasing order of the n input keywords, and returns the sorted result values including the common values of the n posting lists.

[0022] In this system, the <term, docid> column in the row-oriented relational inverted index table is used to perform posting list intersection, and the zigzag merge join is used. When the merged key values do not match, the zigzag merge join operator is used to search for values greater than or equal to the key value; the cursor is moved to a value equal to or greater than the required value through the SkipRow function, and the skip merge join arranged in a monotonically increasing pattern in the inverted list is used to implement the join query search.

[0023] Compared with the prior art, the present application has the following beneficial effects:

[0024] 1. The present invention can not only reduce the unnecessary number of comparisons, but also process the joins of multiple keyword posting lists to be searched simultaneously, without obtaining the intermediate result values of the posting list intersection, thereby shortening the search time;

[0025] 2. The present invention can improve the database query speed and reduce unnecessary comparisons and queries;

[0026] 3. For the ubiquitous "big data", the application scenario of the technology of the present invention is broad, and the market scale and potential value are huge; 4. For the digital intelligence technology companies in the process of transformation and upgrading, the present invention is beneficial to enhancing the differential competitive advantage; BRIEF DESCRIPTION OF THE DRAWINGS

[0027] By describing the embodiments of the present invention in more detail in conjunction with the drawings, the above and other objects, features, and advantages of the present invention will become more obvious. The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification, and are used to explain the present invention together with the embodiments of the present invention, and do not constitute a limitation to the present invention. In the drawings, the same reference numerals generally represent the same components or steps.

[0028] Figure 1 FIG. shows a schematic diagram of a skip merge method according to an embodiment of the present invention;

[0029] Figure 2 FIG. shows a schematic diagram of a multi-way join method according to an embodiment of the present invention;

[0030] Figure 3 FIG. shows a schematic diagram of a multi-way skip merge join method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] To make the objectives, technical solutions and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention. It should be understood that the present invention is not limited by the exemplary embodiments described herein. Based on the embodiments of the present invention described herein, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.

[0032] Embodiment 1:

[0033] To solve the problems described above, the present invention proposes a method for optimizing reverse indexing in a relational database. To optimize merge or cross tasks, the designed multi-way skip merge join method reduces the number of comparisons and increases the reverse list and query execution speed. The core idea is to combine skip merge and multi-way join together, and a method for optimizing reverse indexing in a relational database is proposed. As Figure 3 shown, this method

[0034] Step 1: Check the value currently pointed to by the cursor for each posting list;

[0035] Step 2: Determine whether there is a match and repeat the execution;

[0036] Step 2-1: If the current values of the three posting lists are the same, the corresponding key values are stored in the result list, and the cursors of the three posting lists are all moved one cell;

[0037] Step 2-2: If there is no match, check the key value Vd(C n-1(j) ) of the nth posting list according to the cursor value Vd(C n(i) ) of the (n - 1)th posting list where there is no match; if the cursor value Vd(C n-1(j) ) is less than the key value Vd(C n(i) ), then use the skip merge join method to search for the rows equal to or less than the key value Vd(C n(i) ), and move the cursor to that row, and the number of rows moved is determined by the aggregation function; where C n(i) represents the cursor value pointing to the ith row in list n; i and j respectively refer to the rows of the current key value and cursor value;

[0038] Step 3: After moving the cursor, return to Step 1 and determine whether the cursor values of the n posting lists match; repeat this process until the cursor indication of one or more posting lists is NULL.

[0039] Meanwhile, the method further includes query processing. When performing list intersection in conjunctive and phrase queries, a logical product search is used to find documents containing all search keywords, including conjunctive queries and phrase queries. The steps of the conjunctive query are as follows: The conjunctive query searches for documents containing n search keywords. The conjunctive query requires publishing a list sorted in monotonically increasing order of the n keywords that have been input, and returns a sorted result value including the common values of the n posting lists.

[0040] In this method, the <term, docid> column in the row-oriented relational inverted index table is used to perform posting list intersection. The zigzag merge join is used. When the merged key values do not match, the zigzag merge join operator is used to search for values greater than or equal to the key value. The cursor is moved to a value equal to or greater than the required value through the SkipRow function, and the skip merge join arranged in a monotonically increasing pattern in the inverted list is used to implement the conjunctive query search.

[0041] Specifically, the skip merge method includes using the aggregation function provided by the database to skip the rows of two posting lists sorted in ascending order. By calculating an aggregation function, the number of rows that the cursor must move is obtained. This aggregation function refers to the number of rows between the value of the target row indicated by the cursor in the posting list and the value of the row indicated by the cursor in the posting list, thus avoiding the need for comparison. As Figure 1 shown, the value 2 in list A is less than the value 37 in list B. Therefore, the cursor pointing to 2 must move to a row with a value greater than or equal to 37. The count function is used to obtain the number of rows between 2 and 37 in the posting list, and then the cursor skips 5 rows in the posting list, thus minimizing cursor movement. At the same time, the method determines whether the key value skipped by the cursor is greater than the comparison key value through verifying binary search, or whether the offset moves within the same document number in the offset table, and checks the first offset in the moved document number, thereby avoiding unnecessary comparison problems in the merge join.

[0042] The multi-way join method includes processing the intersection of the posting lists of n search keywords simultaneously in the merge join without intermediate results, which is particularly suitable for scenarios of large data processing. Existing solutions often use two-way joins to join n keyword lists. Because it is necessary to specify intermediate results and temporarily store the join results, when the number of keywords in the join increases, the overhead also increases exponentially. Therefore, the biggest difference between the multi-way join method and the two-way join is that when using the two-way join method, n joins must be performed, while when using the multi-way join method, all posting lists can be joined simultaneously. The schematic diagram is as Figure 2As shown, when there are three posting lists, first, three cursors are used to compare the values of the first row in each inverted list. Since the cursor values of list A and list B are different, the cursor of list B is moved forward one cell. Then, the three cursor values are compared again. If the cursor values of list A and B are the same while the cursor value of list C is smaller, the cursor of list C is moved one cell to a row where the value is greater than or equal to the cursor value of list B. Therefore, the result value is obtained by concatenating the three lists simultaneously without storing intermediate result values.

[0043] The above solution can be widely applied to query scenarios in large - data - volume databases to improve query speed.

[0044] The present invention proposes a connection optimization method for storing large documents using reverse indexes in a relational database. This method uses a multi - way skip - merge join algorithm. Its core idea is to combine skip - merge and multi - way join together. By using the aggregation function provided by the database to skip rows and then using the multi - way join method, the complex connection method is simplified to improve connection performance and shorten the query process, so as to obtain the result of the posting list of keywords to be searched in one process. This method can not only reduce unnecessary comparison times but also handle the connection of multiple posting lists of keywords to be searched simultaneously without obtaining the intermediate result value of the intersection of the posting lists, thereby shortening the search time.

[0045] Embodiment 2:

[0046] The present invention also proposes a reverse index optimization system for a relational database. To optimize merge or cross tasks, the designed multi - way skip - merge join method reduces the number of comparisons and increases the reverse list and query execution speed. The core idea is to combine skip - merge and multi - way join together. A reverse index optimization system for a relational database, which system includes:

[0047] Check module: Check the value currently pointed to by the cursor for each posting list;

[0048] Judgment module: Judge whether to match and execute repeatedly;

[0049] Judgment sub - module 1: If the current values of the three posting lists are the same, the corresponding key values are stored in the result list, and the cursors of the three posting lists are all moved one cell;

[0050] Judgment sub - module 2: If they do not match, check the key value Vd(C n-1(j) ) of the nth posting list according to the cursor value Vd(C n(i) ) of the (n - 1)th posting list where there is a mismatch; if the cursor value Vd(C n-1(j) ) is less than the key value Vd(C n(i) ), then use the skip - merge join method to search for the key value Vd(Cn(i) ) rows equal to or less than this value and move the cursor to that row, where the number of rows to move is determined by the aggregation function; where C n(i) represents the cursor value in list n pointing to the i-th row; i and j respectively refer to the rows of the current key value and cursor value;

[0051] Execution module: After moving the cursor, return to step 1 and determine whether the cursor values of the n posting lists match; repeat this process until the cursor indication of one or more posting lists is NULL.

[0052] Meanwhile, the system also includes a query processing module that, when performing list intersection in conjunctive and phrase queries, uses a logical product search to find documents containing all search keywords, including conjunctive queries and phrase queries; for the conjunctive query, the steps are as follows: The conjunctive query searches for documents containing n search keywords. The conjunctive query requires posting lists sorted in monotonically increasing order of the n input keywords and returns a sorted result value including the common values of the n posting lists.

[0053] In this system, the <term, docid> column in the row-oriented relational inverted index table is used to perform posting list intersection, and a zigzag merge join is used. When the merged key values do not match, the zigzag merge join operator is used to search for values greater than or equal to the key value; the cursor is moved to a value equal to or greater than the required value through the SkipRow function, and a skip merge join arranged in a monotonically increasing pattern in the inverted list is used to implement the conjunctive query search.

[0054] Specifically, the skip merge method includes using the aggregation function provided by the database to skip the rows of two posting lists sorted in ascending order. By calculating an aggregation function, the number of rows that the cursor must move is obtained. This aggregation function refers to the number of rows between the value of the target row indicated by the cursor in the posting list and the value of the row indicated by the cursor in the posting list, thus avoiding the need for comparison. As Figure 1 shown, the value 2 in list A is less than the value 37 in list B, so the cursor pointing to 2 must be moved to a row with a value greater than or equal to 37. The count function is used to obtain the number of rows between 2 and 37 in the posting list, and then the cursor skips 5 rows in the posting list, thereby minimizing cursor movement. At the same time, the method determines whether the key value skipped by the cursor is greater than the comparison key value through verifying a binary search, or whether the offset moves within the same document number in the offset table, and checks the first offset in the moved document number, thus avoiding unnecessary comparison problems in the merge join.

[0055] The multi-way join method involves simultaneously processing the intersections of the posting lists of n search keywords in a merge join without the need for intermediate results, which is particularly suitable for scenarios involving large amounts of data processing. Existing solutions often use two-way joins to join n keyword lists. Since they require specifying intermediate results and temporarily storing the join results, the overhead increases exponentially as the number of keywords in the join increases. Therefore, the biggest difference between the multi-way join method and the two-way join is that when using the two-way join method, n joins must be performed, while when using the multi-way join method, all posting lists can be joined simultaneously. As shown in the schematic diagram Figure 2 shown, when there are three posting lists, first, three cursors are used to compare the values in the first row of each inverted list. Since the cursor values of list A and list B are different, the cursor of list B is moved forward one cell. Then, the three cursor values are compared again. If the cursor values of list A and B are the same while the cursor value of list C is smaller, the cursor of list C is moved one cell to a row where the value is greater than or equal to the cursor value of list B. Therefore, the result value is obtained by joining the three lists simultaneously without storing the intermediate result value.

[0056] The above solution can be widely applied to query scenarios in large-scale databases to improve query speed.

[0057] The key technology of the present invention is to propose a multi-way skip merge join method and system; by using inverted index posting lists to reduce unnecessary comparison operations in the intersection of posting lists, thereby improving the execution speed of posting lists. The skip merge join method that uses an aggregation function to minimize unnecessary comparison operations is integrated with the multi-way join as an alternative to the existing two-way join method.

[0058] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Those of ordinary skill in the art can make various changes and modifications therein without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as claimed in the appended claims.

[0059] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and technologies have not been shown in detail so as not to obscure the understanding of this specification.

[0060] Similarly, it should be understood that, for the purpose of streamlining the present invention and aiding in the understanding of one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, the methods of the present invention should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, the inventive point lies in that the corresponding technical problems can be solved with features less than all the features of a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, where each claim itself serves as a separate embodiment of the present invention. Those skilled in the art will understand that, except where features are mutually exclusive, any combination can be used for all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or apparatus so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0061] In addition, those skilled in the art will appreciate that although some of the embodiments described herein include certain features included in other embodiments but not others, combinations of features of different embodiments are meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.

[0062] It should be noted that the above embodiments illustrate rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several means, several of these means can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names.

[0063] As described above, it is only the specific implementation manner of the present invention or the description of the specific implementation manner. The protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should be covered within the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A reverse index optimization method for a relational database, characterized in that, Including: Step 1: Check the value currently pointed to by the cursor for each posting list; Step 2: Determine whether there is a match and repeat the execution; Step 2-1: If the current values of the three posting lists are the same, the corresponding key values are stored in the result list, and the cursors of the three posting lists are all moved one cell; Step 2-2: If there is no match, then according to the cursor value Vd(C of the (n-1)-th posting list with no match n-1(j) ) check the key value Vd(C of the n-th posting list n(i) ) ; if the cursor value Vd(C n-1(j) ) is less than the key value Vd(C n(i) ), then use the skip merge join method to search for the row equal to or less than the key value Vd(C n(i) ), and move the cursor to that row, and the number of rows moved is determined by the aggregation function; where C n(i) represents the cursor value pointing to the i-th row in list n; i and j respectively refer to the rows of the current key value and cursor value; Use the <term, docid> column in the row-oriented relational inverted index table to perform posting list intersection, use the zigzag merge join. When the merged key values do not match, use the zigzag merge join operator to search for values greater than or equal to the key value; Move the cursor to a value equal to or greater than the required value through the SkipRow function, and use the skip merge join arranged in a monotonically increasing pattern in the inverted list to implement the join query search; Step 3: After moving the cursor, return to Step 1 and determine whether the cursor values of the n posting lists match; Repeat this process until the cursor indicators of one or more posting lists indicate NULL.

2. The reverse index optimization method for a relational database according to claim 1, wherein The method further includes query processing: When performing list intersection in merge and phrase queries, use logical product to search for documents containing all search keywords, including join queries and phrase queries; Among them, for the join query, the steps are as follows: The join query searches for documents containing n search keywords. The conjunctive query requires posting lists sorted in monotonically increasing order of the n input keywords, and returns the sorted result values including the common values of the n posting lists.

3. The reverse index optimization method for a relational database according to claim 2, wherein The specific skip merge method includes using the aggregation function provided by the database to skip the rows of two posting lists sorted in ascending order, and obtaining the number of rows that the cursor must move by calculating an aggregation function, where the aggregation function refers to the number of rows between the value of the target row indicated by the cursor in the posting list and the value of the row indicated by the cursor in the posting list, thus avoiding the need for comparison; At the same time, determine whether the key value skipped by the cursor is greater than the comparison key value through verifying binary search, or whether the offset moves within the same document number in the offset table, and check the first offset in the moved document number, thus avoiding unnecessary comparison problems in the merge join.

4. The reverse index optimization method for a relational database according to claim 2, wherein The specific multi-way join method is as follows: When there are three posting lists, first, use three cursors to compare the values of the first row in each inverted list. Since the cursor values of list A and list B are different, move the cursor of list B forward one cell. Then, compare the three cursor values again. If the cursor values of list A and B are the same, while the cursor value of list C is smaller, move the cursor of list C one cell to a row with a value greater than or equal to the cursor value of list B. The result value is obtained by joining the three lists simultaneously without storing intermediate result values.

5. A reverse index optimization system for a relational database, characterized in that, Including: Check module: Check the value currently pointed to by the cursor for each posting list; Judgment module: Judge whether there is a match and repeat the execution; Judgment sub-module 1: If the current values of the three posting lists are the same, the corresponding key values are stored in the result list, and the cursors of the three posting lists are all moved one cell; Judgment sub-module 2: If there is no match, then according to the cursor value Vd(C of the (n - 1)-th posting list with no match n-1(j) ) check the key value Vd(C of the n-th posting list n(i) ) ; if the cursor value Vd(C n-1(j) ) is less than the key value Vd(C n(i) ), then use the skip merge join method to search for the row equal to or less than the key value Vd(C n(i) ), and move the cursor to that row, and the number of rows moved is determined by the aggregation function; where C n(i) represents the cursor value pointing to the i-th row in list n; i and j respectively refer to the rows of the current key value and cursor value; Use the <term, docid> column in the row-oriented relational inverted index table to perform posting list intersection, using a zigzag merge join. When the merged key values do not match, use the zigzag merge join operator to search for values greater than or equal to the key value; move the cursor to a value equal to or greater than the required value through the SkipRow function, and use the skip merge join arranged in a monotonically increasing pattern in the inverted list to implement the join query search; Execution module: After moving the cursor, return to step 1 and determine whether the cursor values of the n posting lists match; repeat this process until the cursor indication of one or more posting lists is NULL.

6. The reverse index optimization system for a relational database according to claim 5, characterized in that, The system further includes: a query processing module that uses a logical product to search for documents containing all search keywords during list intersection in merge and phrase queries, including join queries and phrase queries; wherein for the join query, the steps are as follows: the join query searches for documents containing n search keywords, and the conjunctive query requires posting lists sorted in monotonically increasing order of the n input keywords, and returns a sorted result value including the common values of the n posting lists.

7. The reverse index optimization system for a relational database according to claim 6, characterized in that: The specific skip merge method includes using the aggregation function provided by the database to skip the rows of two posting lists sorted in ascending order, obtaining the number of rows the cursor must move by calculating an aggregation function, where the aggregation function refers to the number of rows between the value of the target row indicated by the cursor in the posting list and the value of the row indicated by the cursor in the posting list, thus avoiding the need for comparison; at the same time, by verifying the binary search to determine whether the key value skipped by the cursor is greater than the comparison key value, or whether the offset moves within the same document number in the offset table, and checking the first offset in the moved document number, thus avoiding unnecessary comparison problems in the merge join.

8. The reverse index optimization system for a relational database according to claim 6, wherein: The specific multi-way join method is as follows: When there are three posting lists, first, use three cursors to compare the values of the first row in each inverted list. Since the cursor values of list A and list B are different, move the cursor of list B forward by one cell. Then, compare the three cursor values again. If the cursor values of list A and B are the same, and the cursor value of list C is smaller, move the cursor of list C by one cell to a row where the value is greater than or equal to the cursor value of list B. The result value is obtained by joining the three lists simultaneously without storing the intermediate result values.