Query service execution method based on database

By extracting and grouping keywords in the database query business, and performing individual queries and information comparisons, the problems of long query time and inaccurate results in the existing technology are solved, and efficient and accurate query result output is achieved.

CN118779341AInactive Publication Date: 2024-10-15NINGBO JINZHIYUAN MARKETING PLANNING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310373711.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the existing database query business handles complex queries, the query time is long and the query results are not accurate enough, so it cannot effectively meet the data comparison needs.

Method used

By inputting business query content, extracting keywords, conducting individual queries and information comparisons, using keyword grouping and sorting technology to optimize the query process, and improve query efficiency and accuracy.

Benefits of technology

It achieves improved query efficiency and accuracy of results, can quickly search and sort output, expands the query scope, and improves the performance of database query business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779341A_ABST
    Figure CN118779341A_ABST
Patent Text Reader

Abstract

The invention provides a query service execution method based on a database. The query service execution method based on the database comprises the following steps that S1, service query content is input, specifically, query content input is conducted in an input module, the input mode comprises character input and voice input, and character input comprises pinyin, Chinese characters and English; s2, carrying out keyword extraction on the query content; s3, independently querying a single keyword to obtain query information; and S4, comparing the information after single keyword retrieval, sorting the compared information, and finally outputting the information. The database-based query service execution method provided by the invention has the advantages of high query efficiency and relatively accurate query result.
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 in particular to a method for executing query services based on a database. Background Art

[0002] In actual database business, some complex query businesses cannot be implemented with a single SQL statement. For example, in data comparison requirements, you need to first query data from several tables based on conditions, then compare the data, and the output results need to be queried and compared in another table, or even other comparison operations may be required.

[0003] When querying services in a database, most of the query contents are directly queried, which results in a long query time during the query process.

[0004] Therefore, it is necessary to provide a new database-based query service execution method to solve the above technical problems. Summary of the invention

[0005] The technical problem solved by the present invention is to provide a method for executing query services based on a database with high query efficiency and relatively accurate query results.

[0006] In order to solve the above technical problems, the present invention provides a method for executing a query service based on a database, comprising the following steps:

[0007] S1: Enter the business query content;

[0008] S2: extract keywords from the query content;

[0009] S3: query a single keyword separately to obtain query information;

[0010] S4: Compare the information retrieved by the single keyword, sort the compared information, and finally output it.

[0011] Preferably, in S1, the business query content is input, specifically, the query content is input in an input module, and the input method includes text input and voice input, and the text input includes pinyin, Chinese characters and English.

[0012] Preferably, in S2, keyword extraction is performed on the query content, specifically, the query content is split into multiple keywords, and at least one keyword group is formed, and the keywords in each keyword group are sorted. The keywords include single words, words and sentences. Keywords with the same words are grouped and sorted according to the number of words in the keywords.

[0013] Preferably, in S3, a single keyword is queried separately to obtain query information, specifically, each keyword is queried simultaneously, and the keyword query information results in each keyword group are grouped together.

[0014] Preferably, in S4, the information after single keyword retrieval is compared, the compared information is sorted, and finally outputted. Specifically, after the results of keyword query in each group of keywords are obtained, the query results with a single word as the keyword are used as the basic query information, the comparison query information of other keyword queries is compared with the basic query information at the same time, the query results in the comparison query information that are the same as the basic query information are marked with the number of times, and the basic query information is sorted according to the size of the marked number in the basic query information.

[0015] Preferably, when splitting a keyword consisting of multiple characters, the keyword consisting of multiple characters is first split into individual characters and then sorted, and then the sorted characters are arranged and combined to form at least one group.

[0016] Preferably, when the sorted characters are arranged and combined and divided into at least one group, the characters or strings containing the first character are first divided into one group, and then the characters or strings containing the second character but not including the first character are divided into another group, and so on, until the last character is a separate group.

[0017] Preferably, the character comprises a single character or a single English word

[0018] Compared with the related art, the database-based query service execution method provided by the present invention has the following beneficial effects:

[0019] The present invention provides a query service execution method based on a database, which can search for the required query content more quickly and with a larger query range by performing keyword extraction and splitting on the required query content, and grouping and splitting the keywords composed of characters, and performing simultaneous query on all characters after the splitting; after the query, by comparing the query results, the query results can be quickly and conveniently sorted and output. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The present invention provides a flowchart of a method for executing a query service based on a database. DETAILED DESCRIPTION

[0021] The present invention will be further described below in conjunction with the accompanying drawings and implementation modes.

[0022] Please refer to Figure 1 ,in, Figure 1The flowchart of the database-based query service execution method provided by the present invention. The database-based query service execution method comprises: S1: inputting the service query content, specifically inputting the query content in the input module, the input mode comprises text input and voice input, and the text input comprises pinyin, Chinese characters and English;

[0023] S2: extracting keywords from the query content, specifically splitting the query content into multiple keywords and forming at least one keyword group, sorting the keywords in each keyword group, wherein the keywords include single words, phrases and sentences, and grouping keywords with the same words and sorting them according to the number of words in the keywords;

[0024] When splitting a keyword consisting of multiple characters, first split the keyword consisting of multiple characters into individual characters and then sort them, and then arrange and combine the sorted characters to form at least one group;

[0025] When the characters (the characters are single characters or single English words) after being arranged and combined according to the sorting are divided into at least one group, the characters or character strings containing the first character are first divided into one group, and then the characters or character strings containing the second character but not including the first character are divided into another group, and so on, until the last character is a separate group;

[0026] For example, for the keyword ABCD composed of characters A, B, C, and D, the phrases after splitting are: the first group is A, AB, AC, AD, ABC, ABD, and ACD; the second group is B, BC, BD, and BCD; the third group is C and CD; and the fourth group is D.

[0027] S3: querying a single keyword separately to obtain query information, specifically querying each keyword at the same time, and grouping the keyword query information results in each keyword group into one group;

[0028] S4: Compare the information retrieved after a single keyword search, sort the compared information, and finally output it. Specifically, after the results of the keyword search in each group of keywords are obtained, the query results with a single word as the keyword are used as the basic query information, and the comparison query information of other keyword queries is compared with the basic query information at the same time, and the query results in the comparison query information that are the same as the basic query information are marked with the number of times, and the basic query information is sorted according to the size of the marked number in the basic query information.

[0029] Compared with the related art, the database-based query service execution method provided by the present invention has the following beneficial effects:

[0030] The present invention provides a query service execution method based on a database, which can search for the required query content more quickly and with a larger query range by performing keyword extraction and splitting on the required query content, and grouping and splitting the keywords composed of characters, and performing simultaneous query on all characters after the splitting; after the query, by comparing the query results, the query results can be quickly and conveniently sorted and output.

[0031] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent 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: Enter the business query content; S2: extract keywords from the query content; S3: query a single keyword separately to obtain query information; S4: Compare the information retrieved by the single keyword, sort the compared information, and finally output it.

2. The method for executing a query service based on a database according to claim 1, characterized in that: In S1, the business query content is input, specifically, the query content is input in the input module, and the input method includes text input and voice input. The text input includes pinyin, Chinese characters and English.

3. The method for executing a query service based on a database according to claim 1, characterized in that: In S2, keywords are extracted from the query content, specifically, the query content is split into multiple keywords, and at least one keyword group is formed, and the keywords in each keyword group are sorted. The keywords include single words, words and sentences. Keywords with the same words are grouped and sorted according to the number of words in the keywords.

4. The method for executing a query service based on a database according to claim 1, characterized in that: In S3, a single keyword is queried separately to obtain query information, specifically, each keyword is queried simultaneously, and the keyword query information results in each keyword group are grouped together.

5. The method for executing a query service based on a database according to claim 1, characterized in that: In the S4, the information after the single keyword retrieval is compared, the compared information is sorted, and finally outputted. Specifically, after the results of the keyword query in each group of keywords are obtained, the query results with a single word as the keyword are used as the basic query information, and the comparison query information of other keyword queries is compared with the basic query information at the same time, the query results in the comparison query information that are the same as the basic query information are marked with the number of times, and the basic query information is sorted according to the size of the marked number in the basic query information.

6. The method for executing a query service based on a database according to claim 3, characterized in that: When splitting a keyword consisting of multiple characters, the keyword consisting of multiple characters is first split into individual characters and then sorted, and then the sorted characters are arranged and combined to form at least one group.

7. The method for executing a query service based on a database according to claim 6, characterized in that: When the sorted characters are arranged and combined to form at least one group, the characters or strings containing the first character are first grouped, and then the characters or strings containing the second character but not including the first character are grouped into another group, and so on, until the last character is grouped alone.

8. The method for executing a query service based on a database according to claim 7, characterized in that: The character includes a single character or a single English word.