A database optimization method

By optimizing database retrieval through the establishment of a keyword association matrix and the reorganization of query statements with assigned weight values, the response latency problem of the database under high access volume was solved, and the retrieval efficiency and response capability were improved.

CN116226179BActive Publication Date: 2026-07-07TIBET YUNTU GEOGRAPHIC INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIBET YUNTU GEOGRAPHIC INFORMATION TECH CO LTD
Filing Date
2023-02-03
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing databases suffer from severe response latency when dealing with sudden surges in access volume, and current technologies cannot effectively optimize this.

Method used

By establishing a keyword relevance matrix, assigning keyword weight values, reorganizing query statements, and optimizing retrieval according to weight and relevance, including temporary storage and secondary retrieval mechanisms, retrieval efficiency is improved.

Benefits of technology

It improves the retrieval efficiency of the database under high access volume and enhances its ability to cope with sudden surges in access volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226179B_ABST
    Figure CN116226179B_ABST
Patent Text Reader

Abstract

The application discloses a database optimization method, comprising the following steps: A, extracting all the keywords contained in the database index table, establishing the correlation matrix of the keywords, and each element of the correlation matrix representing the correlation intensity between two keywords; B, extracting the keywords from the input original query statement and assigning the corresponding weight value to the keywords; C, recombining the keywords to obtain a recombined query statement; D, inputting the recombined query statement into the database for retrieval; E, restoring the retrieval result to obtain a retrieval result corresponding to the original query statement. The application can improve the deficiencies of the prior art and improve the ability of the database in coping with the sudden large access state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database technology, and in particular to a database optimization method. Background Technology

[0002] With the rapid development of information technology, databases are being used more and more widely. When designing a database, appropriate hardware and bandwidth must be selected based on the average daily access volume. However, in some application scenarios, database access volume is extremely unstable, meaning there is a significant difference between peak and off-peak access times. In such cases, a compromise strategy must be adopted when selecting hardware and bandwidth, which will result in noticeable latency during peak access times. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a database optimization method that can overcome the shortcomings of the existing technology and improve the database's ability to cope with sudden large-volume access.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows.

[0005] A database optimization method includes the following steps:

[0006] A. Extract all keywords contained in the database index table and build a keyword association matrix. Each element of the association matrix represents the strength of the association between two keywords.

[0007] B. Extract keywords from the input original query statement and assign corresponding weight values ​​to the keywords;

[0008] C. Reorganize the keywords to obtain the reorganized query statement;

[0009] D. Use a restructured query statement to input into the database for retrieval;

[0010] E. Restore the search results to obtain the search results corresponding to the original query statement.

[0011] As a preferred option, in step B, corresponding weight values ​​are assigned according to the type and frequency of occurrence of the keywords, forming a two-dimensional weight.

[0012] Preferably, step C, generating the restructured query statement, includes the following steps:

[0013] C1. Determine the optimal number of keywords to be included in the query statement based on the number of keywords to be queried and the real-time access traffic of the database; the number of keywords to be queried is directly proportional to the optimal number of keywords, and the real-time access traffic is inversely proportional to the optimal number of keywords;

[0014] C2. Insert the keyword to be queried into the reorganized query statement, and the two-dimensional weight variance of the keyword in the reorganized query statement is greater than the set threshold.

[0015] As a preferred approach, high-weight keywords are determined based on the two-dimensional weight of the keywords, and the reorganized query statement includes at least one high-weight keyword.

[0016] Preferably, step D includes the following steps in the retrieval process:

[0017] D1. Separate the keywords in the reorganized query statement and input the keywords into the database index table in descending order of their two-dimensional weights for retrieval;

[0018] D2. While executing step D1, query and retrieve keywords whose keyword relevance exceeds the set threshold from the keyword relevance matrix, and input the queried keywords into the database index table for retrieval.

[0019] D3. Temporarily store the search results and prioritize searching from the temporarily stored results before the next round of searching.

[0020] Preferably, in step D2, the threshold is set based on the real-time access traffic of the database.

[0021] Preferably, in step E, when an error occurs in the restored search result, the keyword search result that caused the error is traced back, and the traced search result is added to the blacklist; when step D is executed, if the search result appears on the blacklist, a second search is performed on the keyword corresponding to the search result.

[0022] As a preferred method, the secondary retrieval process involves combining the target keyword of the secondary retrieval with 1 to 2 keywords that are most closely related to the target keyword, then retrieving the combined keywords, and finally decoupling the retrieval results to obtain the retrieval results of the target keyword of the secondary retrieval.

[0023] The beneficial effects of adopting the above technical solution are as follows: This invention extracts keywords from the original query statement, optimizes the keywords, improves retrieval efficiency, and thus achieves the goal of improving the ability to handle large traffic volumes. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of a specific embodiment of the present invention. Detailed Implementation

[0025] Reference Figure 1 One specific embodiment of the present invention includes the following steps:

[0026] A. Extract all keywords contained in the database index table and build a keyword association matrix. Each element of the association matrix represents the strength of the association between two keywords.

[0027] B. Extract keywords from the input original query statement and assign corresponding weight values ​​to the keywords; assign corresponding weight values ​​according to the type and frequency of occurrence of the keywords to form a two-dimensional weight;

[0028] C. Reorganize the keywords to obtain a reorganized query statement; determine the high-weight keywords based on the two-dimensional weight of the keywords, and the reorganized query statement must include at least one high-weight keyword; the generation of the reorganized query statement includes the following steps.

[0029] C1. Determine the optimal number of keywords to be included in the query statement based on the number of keywords to be queried and the real-time access traffic of the database; the number of keywords to be queried is directly proportional to the optimal number of keywords, and the real-time access traffic is inversely proportional to the optimal number of keywords;

[0030] C2. Insert the keyword to be queried into the reorganized query statement, and the two-dimensional weight variance of the keyword in the reorganized query statement is greater than the set threshold.

[0031] D. Use a restructured query statement to enter the database for retrieval; the retrieval process includes the following steps.

[0032] D1. Separate the keywords in the reorganized query statement and input the keywords into the database index table in descending order of their two-dimensional weights for retrieval;

[0033] D2. While executing step D1, query and retrieve keywords whose keyword relevance exceeds a set threshold from the keyword relevance matrix, and input the retrieved keywords into the database index table for retrieval; the set threshold is determined based on the real-time access traffic of the database.

[0034] D3. Temporarily store the search results and prioritize searching from the temporarily stored search results before the next round of searching;

[0035] E. Restore the search results to obtain the search results corresponding to the original query statement; if the restored search results are incorrect, trace the keyword search results that caused the error and add the traced search results to the blacklist; when step D is executed, if the search results appear on the blacklist, perform a secondary search on the keywords corresponding to the search results; the secondary search process is to combine the target keyword of the secondary search with 1 to 2 keywords that are most closely related to the target keyword, then search the combined keywords, and then decouple the search results to obtain the search results of the target keyword of the secondary search.

[0036] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this invention, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0037] 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 illustrative of the principles of 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 this invention is defined by the appended claims and their equivalents.

Claims

1. A database optimization method, characterized in that... Includes the following steps: A. Extract all keywords contained in the database index table and build a keyword association matrix. Each element of the association matrix represents the strength of the association between two keywords. B. Extract keywords from the input original query statement and assign corresponding weight values ​​to the keywords; The keywords are assigned corresponding weight values ​​based on their type and frequency of occurrence, forming a two-dimensional weight. C. Reorganize the keywords to obtain the reorganized query statement; the generation of the reorganized query statement includes the following steps. C1. Determine the optimal number of keywords to be included in the query statement based on the number of keywords to be queried and the real-time access traffic of the database; the number of keywords to be queried is directly proportional to the optimal number of keywords, and the real-time access traffic is inversely proportional to the optimal number of keywords; C2. Insert the keyword to be queried into the reorganized query statement, and the two-dimensional weight variance of the keyword in the reorganized query statement is greater than the set threshold. D. Use a restructured query statement to enter the database for retrieval; the retrieval process includes the following steps. D1. Separate the keywords in the reorganized query statement and input the keywords into the database index table in descending order of their two-dimensional weights for retrieval; D2. While executing step D1, query and retrieve keywords whose keyword relevance exceeds the set threshold from the keyword relevance matrix, and input the queried keywords into the database index table for retrieval. D3. Temporarily store the search results and prioritize searching from the temporarily stored search results before the next round of searching; E. Restore the search results to obtain the search results corresponding to the original query statement; if the restored search results are incorrect, trace the keyword search results that caused the error and add the traced search results to the blacklist; when step D is executed, if the search results appear on the blacklist, perform a secondary search on the keywords corresponding to the search results; the secondary search process is to combine the target keyword of the secondary search with 1 to 2 keywords that are most closely related to the target keyword, then search the combined keywords, and then decouple the search results to obtain the search results of the target keyword of the secondary search.

2. The database optimization method according to claim 1, characterized in that: High-weight keywords are determined based on the two-dimensional weight of the keywords, and the query statement is reorganized to include at least one high-weight keyword.

3. The database optimization method according to claim 2, characterized in that: In step D2, the threshold is set based on the real-time access traffic of the database.