Query service execution method based on database

By analyzing and optimizing the client input content in the query business system, selecting the optimal execution path based on the database, and obtaining and sorting data in the buffer, the problem of low query efficiency is solved, and efficient and fast data query is achieved.

CN119691005APending Publication Date: 2025-03-25SUZHOU DAYU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311234904.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, the amount of data generated by the query business system during operation continues to increase, and the logical complexity increases, resulting in an extended data loading time and reducing the efficiency of data query.

Method used

The query content is input by the client, and the parsing module performs syntax analysis and optimization. Based on the understanding of the database, the optimization module selects the optimal execution path. The execution module obtains data from the buffer, extracts matching content within the specified time, and finally sorts the obtained content optimally.

Benefits of technology

It improves the success rate and efficiency of querying corresponding content, reduces the data buffering process, extracts more content according to time requirements, and improves the recognition and utilization of content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691005A_ABST
    Figure CN119691005A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of database query, and discloses a database-based query service execution method, which comprises the following steps of: S1, inputting a content needing to be queried through a client, and determining the input; s2, analyzing components in the content through an analysis module, analyzing the grammar of the content, and checking whether the grammar conforms to the specification or not; s3, optimizing the content statements through an optimization module, and determining an optimal execution mode of the content statements by utilizing information collected and counted by a database; and S4, calling the content data of the database through an execution module according to the optimized content, and returning the content data to the client. The database-based query service execution method provided by the invention has the technical effects of simple and flexible query process and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database query, and more specifically to a method for executing query services based on a database. Background Art

[0002] A database can be viewed as an electronic filing cabinet and a place for storing electronic files. Users can add, extract, update, delete, and other operations on the data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared by multiple users, has as little redundancy as possible, and is independent of the application. A database consists of multiple table spaces.

[0003] The shortcomings of the existing technology: the amount of data generated by the query business system during operation will continue to increase, and the logical complexity of the query business needs will also gradually increase, which will result in more and more data loading time required for query display of business data, reducing data query efficiency. Summary of the invention

[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method for executing query services based on a database to solve the problems existing in the above-mentioned background technology.

[0005] The present invention provides the following technical solution: a method for executing a query service based on a database, comprising the following steps:

[0006] S1: Input the content to be queried through the client and confirm the input;

[0007] S2: parse the components of the content through the parsing module, analyze the content syntax, and check whether the syntax conforms to the specification;

[0008] S3: Optimize the content statements through the optimization module, and use the statistical information collected by the database to determine the best execution method of the content statements;

[0009] S4: The execution module retrieves the content data of the database according to the optimized content and returns it to the client.

[0010] Preferably, after the client passes the password verification, the query data is connected to the database server through a connector.

[0011] Preferably, the analysis module analyzes whether the content in the query content statement exists and whether there is a problem. If the queried content data does not exist or there is a problem, it will directly return to the client to issue a prompt.

[0012] Preferably, the analysis module analyzes whether the content in the query content statement has the authority, and if it does not have the content data query authority, it will directly return to the client and issue a prompt.

[0013] Preferably, the optimization module selects an optimal execution path for data content based on the understanding of the database and intelligently determines the query path.

[0014] Preferably, the execution module obtains the query content from the buffer, and if the buffer has the query content, it will be directly obtained from the buffer.

[0015] Preferably, the execution module may set an execution time to extract the matching content within a specified time, and may also not set an execution time to obtain more matching content.

[0016] Preferably, the execution module will perform optimal sorting on the acquired content, so that the optimal acquired content is sorted.

[0017] Technical effects and advantages of the present invention:

[0018] 1. The present invention requires the client to input the content to be queried and confirm the input, and then uses the parsing module to parse the components in the content, analyze the content syntax, and check whether the syntax conforms to the specification. Then, the optimization module selects an optimal execution path for the data content based on the understanding of the database, and intelligently judges the query path, such as whether to access through a single content statement or a full content statement, to avoid the full content statement failing to obtain the corresponding content. Through this query path method, the success rate of querying the corresponding content can be improved.

[0019] 2. The present invention obtains the query content from the buffer through the execution module. If the buffer has the queried content, it will be directly obtained from the buffer. By obtaining the data of the corresponding content from the buffer, the buffering process of some content is reduced and the query efficiency is improved. At the same time, the execution module can set the execution time to extract the matching content within the specified time. At the same time, the execution time can also be not set to obtain more matching content. The execution time can be set according to one's own time requirements to control it within a certain time during the query process, and more matching content can be extracted from the database in a limited manner, thereby avoiding consuming too much time and obtaining content with poor matching. Finally, the execution module will perform optimal sorting on the obtained content, so that the optimal obtained content is sorted. In the sorting, it can be sorted according to the full sentence of the query data, and it can also be sorted according to multiple single words and sentences, so that the recognition and utilization rate of the obtained content are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1It is a schematic diagram of the flow of the query method of the present invention. DETAILED DESCRIPTION

[0021] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. In addition, the forms of the various structures recorded in the following implementation modes are merely illustrative. The database-based query business execution method involved in the present invention is not limited to the various structures recorded in the following implementation modes. All other implementation modes obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0022] The present invention provides a method for executing a query service based on a database, comprising the following steps:

[0023] S1: Input the content to be queried through the client and confirm the input;

[0024] S2: parse the components of the content through the parsing module, analyze the content syntax, and check whether the syntax conforms to the specification;

[0025] S3: Optimize the content statements through the optimization module, and use the statistical information collected by the database to determine the best execution method of the content statements;

[0026] S4: The execution module retrieves the content data of the database according to the optimized content and returns it to the client.

[0027] Furthermore, after the client passes the password verification, the query data is connected to the database server through the connector to verify the identity of the querying user so that the access record can be queried to facilitate content extraction for subsequent use. At the same time, the query content can be backed up for subsequent use.

[0028] Furthermore, the parsing module analyzes whether the content in the query content statement exists and whether there are any problems. If the queried content data does not exist or there are problems, it will directly return to the client to issue a prompt. The user can change the query content data according to the prompt to improve the success rate and content quality of obtaining the corresponding content from the database.

[0029] Furthermore, the parsing module parses the content in the query content statement to see if it has permission. If it does not have permission to query the content data, it will directly return to the client and issue a prompt. Some important data in the database can be encrypted, and only some users with permission can query it. In this way, more data can be safely saved in the database.

[0030] Furthermore, the optimization module selects an optimal execution path for data content based on its understanding of the database, and intelligently determines the query path, such as whether to access through a single content statement or a full content statement, to avoid the full content statement failing to obtain the corresponding content. This query path method can improve the success rate of querying the corresponding content.

[0031] Furthermore, the execution module will obtain the query content from the buffer. If the buffer has the query content, it will be directly obtained from the buffer. By obtaining the data of the corresponding content from the buffer, the buffering process of some content is reduced and the query efficiency is improved.

[0032] Furthermore, the execution module can set the execution time to extract the matching content within the specified time. At the same time, the execution time can also be set without setting it to obtain more matching content. The execution time can be set according to one's own time requirements to control it within a certain time during the query process, and only a large number of matching contents can be extracted from the database, thereby avoiding wasting too much time and obtaining content with poor matching.

[0033] Furthermore, the execution module will perform optimal sorting on the acquired content, so that the optimal acquired content can be sorted. In the sorting, it can be sorted according to the full sentence of the query data, and it can also be sorted according to multiple single words and sentences, so that the recognition and utilization rate of the acquired content are improved.

[0034] The working principle of the present invention is as follows: the client inputs the content to be queried and confirms the input. After the password is verified, the query data is connected to the database server through a connector. Then, the components in the content are parsed through a parsing module, the content syntax is analyzed, and whether the syntax conforms to the specification is checked. The content in the query content statement is inquired whether it exists and whether there is a problem. If the queried content data does not exist or there is a problem, it will be directly returned to the client to issue a prompt. At the same time, it will be examined whether the content in the query content statement has the authority. If the content data query authority is not available, it will be directly returned to the client and a prompt will be issued. Then, the content statement will be optimized through the optimization module, and the information collected and counted by the database will be used to determine the best execution method of the content statement. The optimization module selects an optimal execution path for the data content based on the understanding of the database, and intelligently determines the query path. For example, a single content statement is used to Access is still accessed by full content statements to avoid the full content statement failing to obtain the corresponding content. Through this query path method, the success rate of querying the corresponding content can be improved. Finally, the execution module retrieves the content data of the database according to the optimized content and returns it to the client. The execution module can set the execution time to extract the matching content within the specified time. At the same time, the execution time can also be not set to obtain more matching content. The execution time can be set according to your own time requirements to control it within a certain time during the query process, and more matching content can be extracted from the database in a limited manner, thereby avoiding consuming too much time and obtaining content with poor matching. The execution module will perform the best sorting on the obtained content, so that the best obtained content is sorted. In the sorting, it can be sorted according to the full sentence of the query data, and it can also be sorted according to multiple single words and sentences, so that the recognition and utilization of the obtained content are improved.

[0035] Finally, a few points should be explained: First, in the description of this application, it should be noted that, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, which may refer to mechanical connection or electrical connection, or internal communication between two components, or direct connection. "upper", "lower", "left", "right", etc. are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may change;

[0036] Secondly: In the drawings of the embodiments disclosed in the present invention, only the structures related to the embodiments disclosed in the present invention are involved, and other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of the present invention can be combined with each other;

[0037] Finally: 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 in the protection scope of the present invention.

Claims

1. A method for executing a query service based on a database, characterized in that: The following steps are involved: S1: Input the content to be queried through the client and confirm the input; S2: parse the components of the content through the parsing module, analyze the content syntax, and check whether the syntax conforms to the specification; S3: Optimize the content statements through the optimization module, and use the statistical information collected by the database to determine the best execution method of the content statements; S4: The execution module retrieves the content data of the database according to the optimized content and returns it to the client.

2. A method for executing a query service based on a database according to claim 1, characterized in that: After the client passes the password verification, the query data is connected to the database server through the connector.

3. The method for executing a query service based on a database according to claim 1, characterized in that: The analysis module analyzes whether the content in the query content statement exists and whether there is a problem. If the queried content data does not exist or there is a problem, it will directly return to the client to issue a prompt.

4. A method for executing a query service based on a database according to claim 3, characterized in that: The analysis module analyzes whether the content in the query content statement has the authority. If it does not have the content data query authority, it will directly return to the client and issue a prompt.

5. The method for executing a query service based on a database according to claim 1, characterized in that: The optimization module selects an optimal execution path for data content based on the understanding of the database and intelligently determines the query path.

6. A method for executing a query service based on a database according to claim 1, characterized in that: The execution module will obtain the query content from the buffer, and if the buffer has the query content, it will be directly obtained from the buffer.

7. A method for executing a query service based on a database according to claim 6, characterized in that: The execution module may set an execution time to extract the matching content within a specified time, or may not set an execution time to obtain more matching content.

8. A method for executing a query service based on a database according to claim 6, characterized in that: The execution module will perform optimal sorting on the acquired content, so that the optimal acquired content is sorted.