Data query method, system and storage medium based on artificial intelligence

By introducing artificial intelligence-based data query methods into the data query system, using multi-module storage and machine learning models to calculate the characteristic values ​​of the combination of to-determinal words, the problem of low success rate of data query in the existing technology is solved, and more efficient and accurate data retrieval effect is achieved.

CN119621945BActive Publication Date: 2025-05-13GBICC GLOBAL BUSINESS INTELLIGENCE CONSULTING CORP +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510157215.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-13
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

The query success rate of existing data query methods is low, and it cannot effectively improve the accuracy and efficiency of data retrieval.

Method used

Using an artificial intelligence-based data query method, different data records are stored through the first comparison module, the second comparison module and the third comparison module, the machine learning model is used to calculate the characteristic values ​​of the combination of words to be definite, and the combination is divided according to the original words and sentences entered by the user for combination processing, ultimately improving the success rate of data retrieval.

Benefits of technology

By automatically generating the combination of pending words for re-search, the success rate of data retrieval is significantly improved and the accuracy and efficiency of data query are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621945B_ABST
    Figure CN119621945B_ABST
Patent Text Reader

Abstract

This application relates to the field of data query technology, and in particular to a data query method, system, and storage medium based on artificial intelligence. The method includes: S1, a first comparison module stores different first data records, and a second comparison module stores different second data records; S2, a retrieval module performs query processing on the storage module based on the original phrase, and when a retrieval result cannot be successfully obtained, a control module, for the original phrase, uses different third data records stored in a third comparison module to divide the original phrase into different undetermined words, obtaining combinations of several undetermined words corresponding to the original phrase; S3, for each combination of several undetermined words corresponding to the original phrase, the control module calculates the feature value of the combination of several undetermined words, and the retrieval module uses combinations of several selected words corresponding to the original phrase determined by the user for query processing. This application can improve the success rate of data retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data query technology, and in particular to an artificial intelligence-based data query method, system and storage medium. Background Art

[0002] With the development of computer application technology, people will use data query more and more in their work and life to quickly obtain the required work data.

[0003] The Chinese patent application with publication number CN115145953A provides a data query method, which mainly includes the following steps: step 1, input a query request, and the query module accepts and parses the query request to obtain a query condition; step 2, determine whether the same query condition exists in the cache module, if so, directly obtain the query result from the cache module, if not, proceed to step 3; step 3, adjust the query resources allocated by the query module to each block data in the storage module according to the reward and punishment function of the optimization module and query to obtain the query result; step 4, record the information of each block data queried during the query process, including the query condition, query time and query result, and merge them into a query result set; step 5, cache the query condition and query result in the cache module. In addition, a Chinese patent application with publication number CN104216984A discloses a data query method, which queries data in a storage network equipped with several storage devices, queries and searches data by using a processor or microprocessor in the storage network, and then sends the query or search sub-results to the server processor for processing, thereby solving the bottleneck of data reading from the storage network to the server memory and reducing the power consumption of importing large amounts of data into the server memory.

[0004] However, the query success rate of the data query methods provided by the above two patent applications still needs to be improved. Therefore, the present application proposes a data query method, system and storage medium based on artificial intelligence. Summary of the invention

[0005] The present application sets a first comparison module to store different first data records, sets a second comparison module to store different second data records, and sets a third comparison module to store different third data records. When the search result cannot be successfully obtained according to the original sentence, the original sentence is divided into different pending words using the different third data records stored in the third comparison module, and combination processing is performed on different pending words to obtain a combination of several pending words corresponding to the original sentence. For each combination of several pending words corresponding to the original sentence, the characteristic values ​​of the combination of several pending words are calculated based on the different first data records stored in the first comparison module and the different second data records stored in the second comparison module, and the query processing is performed using a combination of several selected words corresponding to the original sentence determined by the user. The present application aims to improve the success rate of data retrieval.

[0006] This application provides a data query method based on artificial intelligence, comprising the following steps:

[0007] S1, a first comparison module stores different first data records, the first data records include historical original words and sentences and representative values ​​of the historical original words and sentences, and combinations of several historical pending words corresponding to the historical original words and sentences and representative values ​​of combinations of several historical pending words, and a second comparison module stores different second data records, the second data records include combinations of several historical selected words and representative values ​​of combinations of several historical selected words;

[0008] S2, the retrieval module obtains an original word or phrase input from the user module, performs query processing on the storage module according to the original word or phrase, and the control module determines whether the retrieval module successfully obtains the retrieval result. If not, the control module divides the original word or phrase into different pending words using different third data records stored in the third comparison module, wherein the third data records include a standard phrase and a plurality of standard words corresponding to the standard phrase, and performs combination processing on different pending words to obtain combinations of a plurality of pending words corresponding to the original word or phrase respectively.

[0009] S3. Regarding each combination of several pending words corresponding to the original sentence, the control module calculates the feature values ​​of the combination of several pending words based on different first data records stored in the first comparison module and different second data records stored in the second comparison module, and the user module displays different combinations of several pending words corresponding to the original sentence in order from large to small according to the corresponding feature values, and the retrieval module also uses the combination of several selected words corresponding to the original sentence determined by the user to perform query processing on the storage module.

[0010] As a preferred technical solution of the present application, after the retrieval module uses a combination of several selected words corresponding to the original sentence determined by the user to perform query processing on the storage module, the first comparison module generates a first data record for storing the original sentence and the representative value of the original sentence, as well as a combination of several selected words corresponding to the original sentence determined by the user and the representative values ​​of the combination of several selected words.

[0011] As a preferred technical solution of the present application, after the retrieval module obtains the retrieval result from the storage module using the combination of several selected words corresponding to the original sentence determined by the user, the second comparison module generates a second data record for storing the combination of several selected words corresponding to the original sentence determined by the user and for which the retrieval result was obtained, as well as the representative value of the combination of several selected words.

[0012] As a preferred technical solution of the present application, the control module divides the original words and sentences into different undetermined words using different third data records stored in the third comparison module for the original words and sentences, including the following steps:

[0013] S211, the control module regards the position of the first word in the original word as the first position;

[0014] S212, the control module regards the position of the last character in the original word as the second position;

[0015] S213, the control module determines whether there is a standard phrase matching the part of the original phrase from the first position to the second position in the original phrase in all the third data records, and if yes, proceeds to the next step, if not, moves the second position forward by one word and repeats this step;

[0016] S214, the control module determines whether the matched standard phrase corresponds to a plurality of standard words, and if so, records the plurality of standard words respectively, and if not, records the matched standard phrase;

[0017] S215, the control module determines the total number of all characters in the matching standard phrase, moves the first position backward by the total number of characters, and determines whether the end condition is met. If yes, end all steps, if not, jump to S212.

[0018] As a preferred technical solution of the present application, after the control module divides the original words and sentences into different undetermined words using different third data records stored in the third comparison module, the following steps are also included:

[0019] S221, the control module divides the original sentence into different candidate words, obtains different candidate words into which the original sentence is divided using different third data records stored by the third comparison module, and the control module regards the position of the first candidate word among the different candidate words as the third position, and regards the position of the first candidate word among the different candidate words as the fourth position;

[0020] S222, the control module determines whether the candidate word corresponding to the third position is the same as the undetermined word corresponding to the fourth position. If yes, the third position is moved backward by one candidate word, and the fourth position is moved backward by one undetermined word, and this step is repeated. If no, proceed to the next step.

[0021] S223, the control module determines a plurality of consecutive words to be selected after the word to be selected corresponding to the third position, uses the word to be selected corresponding to the third position and the determined plurality of words to be selected to generate a word group to be selected, determines a plurality of consecutive words to be selected after the word to be determined corresponding to the fourth position, uses the word to be determined corresponding to the fourth position and the determined plurality of words to be selected to generate a word group to be determined, so that the word group to be selected is identical to the word group to be determined, and the third comparison module generates a third data record for storing the generated word group to be selected, and generating different words to be selected for the word group to be selected;

[0022] S224, the control module determines a first total number of different words to be selected for generating a word group to be selected, moves the third position backward by the first total number of words to be selected, determines a second total number of different words to be selected for generating a word group to be determined, moves the fourth position backward by the second total number of words to be determined, and determines whether the end condition is met. If yes, end all steps, if not, jump to S222.

[0023] As a preferred technical solution of the present application, for each combination of several undetermined words corresponding to the original sentence, the control module calculates the feature value of the combination of several undetermined words, including the following steps:

[0024] S31, for each first data record stored in the first comparison module, the control module uses a machine learning model to obtain a first degree of similarity between a representative value of an original word and a representative value of a historical original word in the first data record, and simultaneously uses a machine learning model to obtain a second degree of similarity between a representative value of a combination of several undetermined words and a representative value of a combination of several historical undetermined words in the first data record;

[0025] S32, for each second data record stored in the second comparison module, the control module uses the machine learning model to obtain a third similarity degree value between a representative value of a combination of several pending words and a representative value of a combination of several historically selected words in the second data record;

[0026] S33, the control module uses a feature value calculation formula to obtain feature values ​​of a combination of several undetermined words.

[0027] As a preferred technical solution of this application, the characteristic value calculation formula is: ,in, is the characteristic value of the combination of several undetermined words, and is the weight value, , is the total number of first data records, is the total number of second data records, is the representative value of the original sentence and a first degree of similarity of a representative value of a historical original word or sentence in a first data record, is the representative value of the combination of several pending words and a second degree of similarity value of a representative value of a combination of several historical undetermined words in a first data record, is the representative value of the combination of several pending words and a third degree of similarity value of a representative value of a combination of a plurality of historical selected words in a second data record, , ,as well as are the corresponding adjustment values ​​respectively.

[0028] This application also provides an artificial intelligence-based data query system, including the following modules:

[0029] A first comparison module, used to store different first data records, the first data records including historical original words and sentences and representative values ​​of the historical original words and sentences, and combinations of several historical pending words corresponding to the historical original words and sentences and representative values ​​of the combinations of several historical pending words;

[0030] a second comparison module, used to store different second data records, the second data records including a combination of a plurality of historically selected words and a representative value of the combination of the plurality of historically selected words;

[0031] a third comparison module, used to store different third data records, the third data records including a standard phrase and a plurality of standard words corresponding to the standard phrase;

[0032] A storage module is used to store data that users need to retrieve;

[0033] A user module, for receiving an original word or sentence input by a user, and for displaying different combinations of several pending words corresponding to the original word or sentence in descending order of corresponding feature values, and for receiving a combination of several selected words corresponding to the original word or sentence determined by the user;

[0034] A retrieval module, for obtaining an original word or phrase input from a user module, performing query processing on the storage module according to the original word or phrase, and for performing query processing on the storage module using a combination of a plurality of selected words corresponding to the original word or phrase determined by the user;

[0035] A control module is used to determine whether the retrieval module successfully obtains the retrieval results. If not, the control module uses different third data records stored in the third comparison module to divide the original sentence into different pending words, the third data record includes a standard phrase, and several standard words corresponding to the standard phrase, and performs combination processing on different pending words to obtain several combinations of pending words corresponding to the original sentence, and is used to calculate the characteristic values ​​of the combination of several pending words for each combination of several pending words corresponding to the original sentence based on different first data records stored in the first comparison module and different second data records stored in the second comparison module.

[0036] The present application also provides a storage medium, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute any one of the above methods.

[0037] Compared with the prior art, the beneficial effects of the present application are at least as follows:

[0038] In the technical solution provided by the present application, first, the first comparison module stores different first data records, and the second comparison module stores different second data records. Secondly, the retrieval module obtains an original sentence input from the user module, performs query processing on the storage module according to the original sentence, and when the retrieval result cannot be successfully obtained according to the original sentence, the control module divides the original sentence into different pending words for the original sentence using different third data records stored in the third comparison module, performs combination processing on different pending words, and obtains the combination of several pending words corresponding to the original sentence respectively. Finally, for each combination of several pending words corresponding to the original sentence, the control module calculates the characteristic value of the combination of several pending words based on the different first data records stored in the first comparison module and the different second data records stored in the second comparison module, and the retrieval module uses the combination of several selected words corresponding to the original sentence determined by the user to perform query processing on the storage module. Through the present application, when the retrieval result cannot be successfully obtained according to the original sentence, the combination of several selected words automatically generated by the original sentence can be used for re-retrieval, thereby improving the success rate of data retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0040] Figure 1 This is a flow chart of a data query method based on artificial intelligence in an embodiment of the present application;

[0041] Figure 2 A flowchart of a method for dividing different undetermined words in an embodiment of the present application;

[0042] Figure 3 A flowchart of a method for updating storage content of a third comparison module in an embodiment of the present application;

[0043] Figure 4 Schematic diagram of an artificial intelligence-based data query system in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The embodiments of the present application provide a data query method, system and storage medium based on artificial intelligence. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 The artificial intelligence-based data query method in the embodiment of the present application includes the following main steps:

[0046] S1, a first comparison module stores different first data records, the first data records include historical original words and sentences and representative values ​​of the historical original words and sentences, and combinations of several historical pending words corresponding to the historical original words and sentences and representative values ​​of combinations of several historical pending words, and a second comparison module stores different second data records, the second data records include combinations of several historical selected words and representative values ​​of combinations of several historical selected words;

[0047] S2, the retrieval module obtains an original word or phrase input from the user module, performs query processing on the storage module according to the original word or phrase, and the control module determines whether the retrieval module successfully obtains the retrieval result. If not, the control module divides the original word or phrase into different pending words using different third data records stored in the third comparison module, wherein the third data records include a standard phrase and a plurality of standard words corresponding to the standard phrase, and performs combination processing on different pending words to obtain combinations of a plurality of pending words corresponding to the original word or phrase respectively;

[0048] S3. Regarding each combination of several pending words corresponding to the original sentence, the control module calculates the feature values ​​of the combination of several pending words based on different first data records stored in the first comparison module and different second data records stored in the second comparison module, and the user module displays different combinations of several pending words corresponding to the original sentence in order from large to small according to the corresponding feature values, and the retrieval module also uses the combination of several selected words corresponding to the original sentence determined by the user to perform query processing on the storage module.

[0049] Specifically, in the prior art, data retrieval is usually performed directly based on the original words and sentences input by the user, so the success rate of data retrieval cannot be guaranteed. In order to solve this technical problem, S1 to S3 are mainly proposed. In S1, the first comparison module stores different first data records, and the first data record includes historical original words and sentences and representative values ​​of historical original words, as well as a combination of several historical pending words corresponding to the historical original words and sentences and representative values ​​of a combination of several historical pending words. For example, the historical original words and sentences are "When does the attendance system of the R&D department take effect?", and the combination of several historical pending words corresponding to the historical original words and sentences is "R&D department, attendance system, effective time", wherein the representative values ​​of the historical original words and sentences and the representative values ​​of the combination of several historical pending words are in the form of vectors, which can be obtained by inputting the combination of historical original words and sentences and several historical pending words into the machine learning model in the prior art. Of course, it can also be obtained by other methods, such as extracting the total number of all historical words and The total number of useful historical words is used as the representative value of the historical original words, and the appearance position of each historical pending word in the historical original words and sentences, as well as the ratio of the total number of all historical pending words to the total number of all historical words are extracted as the representative value of the combination of several historical pending words. The second data record includes a combination of several historical selected words and a representative value of a combination of several historical selected words. The combination of several historical selected words refers to one of all the combinations of several historical pending words determined by the user, which is used for data retrieval. For example, the combination of several historical selected words is a combination of several historical pending words "R&D department, attendance system, effective time", then the representative value of the combination of several historical selected words is also the representative value of the combination of several historical pending words "R&D department, attendance system, effective time". In S2, the retrieval module obtains an original word or sentence input from the user module, and directly performs query processing on the storage module based on the original word or sentence. The control module determines whether the retrieval module successfully obtains the retrieval result. If so, the retrieval result is displayed through the user module, and all steps are terminated, waiting for the user to input the original word or sentence through the user module next time. If not, the control module uses different third data records stored in the third comparison module to divide the original word or sentence into different pending words, and performs combination processing on different pending words to obtain a combination of several pending words corresponding to the original word or sentence. The total number of all pending words corresponding to different combinations of several pending words may be different, wherein the third data record includes a standard phrase and several standard words corresponding to the standard phrase. For example, the standard phrase is "effective time", and the several standard words corresponding to the standard phrase are "effective, time".In S3, for each combination of several pending words corresponding to the original sentence, the control module calculates the feature value of the combination of several pending words based on different first data records stored in the first comparison module and different second data records stored in the second comparison module. The larger the feature value, the better the performance of the corresponding combination of several pending words. The user module displays different combinations of several pending words corresponding to the original sentence in order from large to small according to the corresponding feature values. The retrieval module uses the combination of several selected words corresponding to the original sentence determined by the user to perform query processing on the storage module. If the retrieval result cannot be successfully obtained, the user can use the user module to determine other combinations of several pending words again.

[0050] Furthermore, after the retrieval module uses a combination of several selected words determined by the user corresponding to the original sentence to perform query processing on the storage module, the first comparison module generates a first data record for storing the original sentence and the representative value of the original sentence, as well as a combination of several selected words determined by the user corresponding to the original sentence and the representative values ​​of the combination of several selected words.

[0051] Specifically, after the retrieval module uses the combination of several selected words corresponding to the original sentence determined by the user to perform query processing on the storage module, the combination of several selected words corresponding to the original sentence determined by the user needs to be stored in the first comparison module for use in subsequent data retrieval. The specific method is that the first comparison module generates a first data record, storing the original sentence and the representative value of the original sentence, as well as the combination of several selected words corresponding to the original sentence determined by the user and the representative values ​​of the combination of several selected words.

[0052] Furthermore, after the retrieval module obtains the retrieval results from the storage module using the combination of several selected words corresponding to the original sentence determined by the user, the second comparison module generates a second data record for storing the combination of several selected words corresponding to the original sentence determined by the user and for which the retrieval results were obtained, as well as representative values ​​of the combination of several selected words.

[0053] Specifically, after the retrieval module obtains the retrieval results from the storage module using the combination of several selected words corresponding to the original words determined by the user and obtaining the retrieval results, it is also necessary to store the combination of several selected words corresponding to the original words determined by the user and obtaining the retrieval results in the second comparison module for use in subsequent data retrieval. The specific method is that the second comparison module generates a second data record, storing the combination of several selected words corresponding to the original words determined by the user and obtaining the retrieval results, and the representative values ​​of the combination of several selected words.

[0054] Furthermore, the control module divides the original words and sentences into different pending words using different third data records stored in the third comparison module for the original words and sentences, including the following steps:

[0055] S211, the control module regards the position of the first word in the original word as the first position;

[0056] S212, the control module regards the position of the last character in the original word as the second position;

[0057] S213, determining whether there is a standard phrase matching the portion of the original phrase from the first position to the second position in the original phrase in all the third data records, if yes, proceeding to the next step, if no, moving the second position forward by one word, and repeating this step;

[0058] S214, the control module determines whether the matched standard phrase corresponds to a plurality of standard words, and if so, records the plurality of standard words respectively, and if not, records the matched standard phrase;

[0059] S215, the control module determines the total number of all characters in the matching standard phrase, moves the first position backward by the total number of characters, and determines whether the end condition is met. If yes, end all steps, if not, jump to S212.

[0060] Specifically, refer to Figure 2As shown, the control module uses different third data records stored by the third comparison module to divide the original sentence into different pending words. In S211, the control module regards the position of the first word in the original sentence as the first position. In S212, the control module regards the position of the last word in the original sentence as the second position. In S213, the control module searches for standard phrases that match the part of the original sentence from the first position to the second position in the original sentence in all the third data records. The matching is the same meaning. In the initial case, the part of the original sentence is the original sentence. It is determined whether there is a standard phrase that matches the part of the original sentence from the first position to the second position in the original sentence in all the third data records. If yes, continue to the next step. If not, move the second position forward by one word and repeat this step. In S214, the control module determines whether the matched standard phrase corresponds to several standard words, that is, whether there are several standard words in the third data record corresponding to the matched standard phrase. It should be noted that in the third data record stored by the third comparison module, the standard phrase cannot be empty, but in the case where the standard phrase cannot be further divided, the several standard words corresponding to the standard phrase can be empty. If yes, record several standard words respectively, and use commas to separate different standard words. If not, record the matched standard phrase. In S215, the control module determines the total number of all words in the matched standard phrase, moves the first position backward by the total number of words, and then determines whether the end condition is met. The end condition can be that the first position has moved to the end word in the original sentence. If yes, output the recorded standard phrases or standard words in sequence according to the order of recording, that is, the different pending words into which the original sentence is divided, and end all steps. If not, jump to S212 to continue execution.

[0061] Furthermore, after the control module divides the original word or sentence into different undetermined words using different third data records stored in the third comparison module, the following steps are also included:

[0062] S221, the control module divides the original sentence into different candidate words, obtains different candidate words into which the original sentence is divided using different third data records stored by the third comparison module, and the control module regards the position of the first candidate word among the different candidate words as the third position, and regards the position of the first candidate word among the different candidate words as the fourth position;

[0063] S222, the control module determines whether the candidate word corresponding to the third position is the same as the undetermined word corresponding to the fourth position. If yes, the third position is moved backward by one candidate word, and the fourth position is moved backward by one undetermined word, and this step is repeated. If no, proceed to the next step.

[0064] S223, the control module determines a number of consecutive words to be selected after the word to be selected corresponding to the third position, uses the word to be selected corresponding to the third position and the determined number of words to be selected to generate a word group to be selected, determines a number of consecutive words to be selected after the word to be determined corresponding to the fourth position, uses the word to be determined corresponding to the fourth position and the determined number of words to be determined to generate a word group to be determined, so that the word group to be selected is the same as the word group to be determined, and the third comparison module generates a third data record for storing the generated word group to be selected and the different words to be selected that generate the word group to be selected;

[0065] S224, the control module determines a first total number of different candidate words for generating a candidate phrase, moves the third position backward by the first total number of candidate words, determines a second total number of different candidate words for generating a candidate phrase, moves the fourth position backward by the second total number of candidate words, and determines whether the end condition is met. If yes, end all steps, if not, jump to S222.

[0066] Specifically, refer to Figure 3As shown, after the control module divides the original sentence into different pending words using different third data records stored in the third comparison module for the original sentence, the control module also executes S221 to S224, the purpose of which is to add new third data records to the third comparison module for subsequent data retrieval. In S221, the control module divides the original sentence into different pending words. It should be noted that the method of dividing the original sentence into different pending words is different from the method of dividing the original sentence into different pending words using different third data records stored in the third comparison module for the original sentence. The machine learning model can be used for division. Therefore, the different pending words into which the original sentence is divided may be different from the different pending words into which the original sentence is divided. The control module regards the position of the first pending word in the different pending words as the third position, and regards the position of the first pending word in the different pending words as the fourth position. In S222, the control module determines whether the candidate word corresponding to the third position is the same as the undetermined word corresponding to the fourth position. If they are the same, the third position is moved backward by one candidate word, and the fourth position is moved backward by one undetermined word, and this step is repeated. If they are not the same, proceed to the next step. In S223, the control module determines a number of consecutive candidates after the candidate word corresponding to the third position, uses the candidate word corresponding to the third position and the determined number of candidates to generate a candidate phrase, and at the same time determines a number of consecutive candidates after the candidate word corresponding to the fourth position, uses the candidate word corresponding to the fourth position and the determined number of candidates to generate a candidate phrase, so that the candidate phrase is the same as the candidate phrase, for example, the original sentence "Who is the leader of the sales department" is divided into different candidates "sales, department, of, leader, who", and the original sentence "Who is the leader of the sales department" is divided into different candidates "sales, department, leader, who", when "department" is different from "leader of the department", it is necessary to determine three candidates "of", "leader", and "who", and at the same time it is necessary to determine one candidate "who", and then the third comparison module generates a third data record to store the generated candidate phrase, for example, "Who is the leader of the department", and the different candidates to generate the candidate phrase, for example, "department, of, leader, who". In S224, the control module determines a first total number of different candidate words for generating a candidate phrase, moves the third position backward by the first total number of candidate words, determines a second total number of different candidate words for generating a candidate phrase, moves the fourth position backward by the second total number of candidate words, and determines whether the end condition is met. The end condition may be that the third position has moved to after the last candidate word. If so, terminate all steps. If not, jump to S222 to continue execution.

[0067] Furthermore, for each combination of several undetermined words corresponding to the original sentence, the control module calculates the feature value of the combination of several undetermined words, including the following steps:

[0068] S31, for each first data record stored in the first comparison module, the control module uses the machine learning model to obtain a first degree of similarity between a representative value of an original word and a representative value of a historical original word in the first data record, and simultaneously uses the machine learning model to obtain a second degree of similarity between a representative value of a combination of several undetermined words and a representative value of a combination of several historical undetermined words in the first data record;

[0069] S32, for each second data record stored in the second comparison module, the control module uses the machine learning model to obtain a third similarity degree value between a representative value of a combination of several pending words and a representative value of a combination of several historically selected words in the second data record;

[0070] S33. The control module uses a characteristic value calculation formula to obtain characteristic values ​​of a combination of several undetermined words.

[0071] Specifically, the process of the control module calculating the characteristic value of a combination of several pending words is introduced. In S31, for each first data record stored in the first comparison module, the control module inputs the representative value of the original word and the representative value of the historical original word in the first data record into the machine learning model to obtain a first sameness value, and inputs the representative value of the combination of several pending words and the representative value of the combination of several historical pending words in the first data record into the machine learning model to obtain a second sameness value. For example, the recurrent neural network in the prior art can calculate the similarity between two vectors. In S32, for each second data record stored in the second comparison module, the control module inputs the representative value of the combination of several pending words and the representative value of the combination of several historical selected words in the second data record into the machine learning model to obtain a third sameness value. In S33, the control module uses a characteristic value calculation formula to obtain the characteristic value of the combination of several pending words, and the characteristic value calculation formula will be described below.

[0072] Furthermore, the eigenvalue calculation formula is ,in, is the characteristic value of the combination of several undetermined words, and is the weight value, , is the total number of first data records, is the total number of second data records, is the representative value of the original sentence and a first degree of similarity of a representative value of a historical original word or sentence in a first data record, is the representative value of the combination of several pending words and a second degree of similarity value of a representative value of a combination of several historical undetermined words in a first data record, is the representative value of the combination of several pending words and a third degree of similarity value of a representative value of a combination of a plurality of historical selected words in a second data record, , ,as well as are the corresponding adjustment values ​​respectively.

[0073] Specifically, the calculation formula is: , is the characteristic value of the combination of several undetermined words, and is the weight value, , this embodiment is not correct and The value of is set according to the actual application scenario. is the total number of first data records, is the total number of second data records, is the representative value of the original word and the a first degree of similarity of a representative value of a historical original word or sentence in a first data record, is the representative value of the combination of several pending words and a second degree of similarity value of a representative value of a combination of several historical undetermined words in a first data record, is the representative value of the combination of several pending words and a third degree of similarity value of a representative value of a combination of a plurality of historical selected words in a second data record, , ,as well as are corresponding adjustment values, and this embodiment is also not , , The values ​​are specifically restricted and set according to the actual application scenarios.

[0074] According to another aspect of the embodiment of the present application, refer to Figure 4 As shown, the present application also provides an artificial intelligence-based data query system, including a first comparison module, a second comparison module, a third comparison module, a storage module, a user module, a retrieval module, and a control module to implement the artificial intelligence-based data query method described above.

[0075] The functions of each module are as follows:

[0076] A first comparison module, used to store different first data records, the first data records including historical original words and sentences and representative values ​​of the historical original words and sentences, and combinations of several historical pending words corresponding to the historical original words and sentences and representative values ​​of the combinations of several historical pending words;

[0077] a second comparison module, used to store different second data records, the second data records including a combination of a plurality of historically selected words and a representative value of the combination of the plurality of historically selected words;

[0078] a third comparison module, used to store different third data records, the third data records including a standard phrase and a plurality of standard words corresponding to the standard phrase;

[0079] A storage module is used to store data that users need to retrieve;

[0080] A user module, for receiving an original word or sentence input by a user, and for displaying different combinations of several pending words corresponding to the original word or sentence in descending order of corresponding feature values, and for receiving a combination of several selected words corresponding to the original word or sentence determined by the user;

[0081] A retrieval module, for obtaining an original word or phrase input from a user module, performing query processing on the storage module according to the original word or phrase, and for performing query processing on the storage module using a combination of a plurality of selected words corresponding to the original word or phrase determined by the user;

[0082] A control module is used to determine whether the retrieval module successfully obtains the retrieval results. If not, the control module uses different third data records stored in the third comparison module to divide the original sentence into different pending words, the third data record includes a standard phrase, and several standard words corresponding to the standard phrase, and performs combination processing on different pending words to obtain several combinations of pending words corresponding to the original sentence, and is used to calculate the characteristic values ​​of the combination of several pending words for each combination of several pending words corresponding to the original sentence based on different first data records stored in the first comparison module and different second data records stored in the second comparison module.

[0083] According to another aspect of an embodiment of the present application, a storage medium is further provided, wherein the storage medium stores program instructions, wherein when the program instructions are executed, a device where the storage medium is located is controlled to execute any one of the above methods.

[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0086] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data query method based on artificial intelligence, characterized in that: The method comprises the following steps: S1, a first comparison module stores different first data records, the first data records include historical original words and sentences and representative values ​​of the historical original words and sentences, and combinations of several historical pending words corresponding to the historical original words and sentences and representative values ​​of combinations of several historical pending words, and a second comparison module stores different second data records, the second data records include combinations of several historical selected words and representative values ​​of combinations of several historical selected words; S2, the retrieval module obtains an original word or phrase input from the user module, performs query processing on the storage module according to the original word or phrase, and the control module determines whether the retrieval module successfully obtains the retrieval result. If not, the control module divides the original word or phrase into different pending words using different third data records stored in the third comparison module, wherein the third data records include a standard phrase and a plurality of standard words corresponding to the standard phrase, and performs combination processing on different pending words to obtain combinations of a plurality of pending words corresponding to the original word or phrase respectively. S3. Regarding each combination of several pending words corresponding to the original sentence, the control module calculates the feature values ​​of the combination of several pending words based on different first data records stored in the first comparison module and different second data records stored in the second comparison module, and the user module displays different combinations of several pending words corresponding to the original sentence in order from large to small according to the corresponding feature values, and the retrieval module also uses the combination of several selected words corresponding to the original sentence determined by the user to perform query processing on the storage module.

2. The method according to claim 1, characterized in that After the retrieval module uses a combination of several selected words determined by the user corresponding to the original sentence to perform query processing on the storage module, the first comparison module generates a first data record for storing the original sentence and the representative value of the original sentence, as well as a combination of several selected words determined by the user corresponding to the original sentence and the representative values ​​of the combination of several selected words.

3. The method according to claim 2, characterized in that After the retrieval module obtains the retrieval result from the storage module using the combination of several selected words corresponding to the original sentence determined by the user, the second comparison module generates a second data record for storing the combination of several selected words corresponding to the original sentence determined by the user and for which the retrieval result was obtained, as well as the representative value of the combination of several selected words.

4. The method according to claim 3, characterized in that The control module divides the original words and sentences into different pending words using different third data records stored in the third comparison module, for the original words and sentences, including the following steps: S211, the control module regards the position of the first word in the original word as the first position; S212, the control module regards the position of the last character in the original word as the second position; S213, the control module determines whether there is a standard phrase matching the part of the original phrase from the first position to the second position in the original phrase in all the third data records, and if yes, proceeds to the next step, if not, moves the second position forward by one word and repeats this step; S214, the control module determines whether the matched standard phrase corresponds to a plurality of standard words, and if so, records the plurality of standard words respectively, and if not, records the matched standard phrase; S215, the control module determines the total number of all characters in the matching standard phrase, moves the first position backward by the total number of characters, and determines whether the end condition is met. If yes, end all steps, if not, jump to S212.

5. The method according to claim 4, characterized in that After the control module divides the original words and sentences into different undetermined words using different third data records stored in the third comparison module, the following steps are also included: S221, the control module divides the original sentence into different candidate words, obtains different candidate words into which the original sentence is divided using different third data records stored by the third comparison module, and the control module regards the position of the first candidate word among the different candidate words as the third position, and regards the position of the first candidate word among the different candidate words as the fourth position; S222, the control module determines whether the candidate word corresponding to the third position is the same as the undetermined word corresponding to the fourth position. If yes, the third position is moved backward by one candidate word, and the fourth position is moved backward by one undetermined word, and this step is repeated. If no, proceed to the next step. S223, the control module determines a plurality of consecutive words to be selected after the word to be selected corresponding to the third position, uses the word to be selected corresponding to the third position and the determined plurality of words to be selected to generate a word group to be selected, determines a plurality of consecutive words to be selected after the word to be determined corresponding to the fourth position, uses the word to be determined corresponding to the fourth position and the determined plurality of words to be selected to generate a word group to be determined, so that the word group to be selected is identical to the word group to be determined, and the third comparison module generates a third data record for storing the generated word group to be selected, and generating different words to be selected for the word group to be selected; S224, the control module determines a first total number of different words to be selected for generating a word group to be selected, moves the third position backward by the first total number of words to be selected, determines a second total number of different words to be selected for generating a word group to be determined, moves the fourth position backward by the second total number of words to be determined, and determines whether the end condition is met. If yes, end all steps, if not, jump to S222.

6. The method according to claim 5, characterized in that Regarding each combination of several undetermined words corresponding to the original sentence, the control module calculates the feature value of the combination of several undetermined words, including the following steps: S31, for each first data record stored in the first comparison module, the control module uses a machine learning model to obtain a first degree of similarity between a representative value of an original word and a representative value of a historical original word in the first data record, and simultaneously uses a machine learning model to obtain a second degree of similarity between a representative value of a combination of several undetermined words and a representative value of a combination of several historical undetermined words in the first data record; S32, for each second data record stored in the second comparison module, the control module uses the machine learning model to obtain a third similarity degree value between a representative value of a combination of several pending words and a representative value of a combination of several historically selected words in the second data record; S33, the control module uses a feature value calculation formula to obtain feature values ​​of a combination of several undetermined words.

7. The method according to claim 6, characterized in that The characteristic value calculation formula is: ,in, is the characteristic value of the combination of several undetermined words, and is the weight value, , is the total number of first data records, is the total number of second data records, is the representative value of the original sentence and a first degree of similarity of a representative value of a historical original word or sentence in a first data record, is the representative value of the combination of several pending words and a second degree of similarity value of a representative value of a combination of several historical undetermined words in a first data record, is the representative value of the combination of several pending words and a third degree of similarity value of a representative value of a combination of a plurality of historical selected words in a second data record, , ,as well as are the corresponding adjustment values ​​respectively.

8. An artificial intelligence-based data query system for implementing the method according to any one of claims 1 to 7, characterized in that: Includes the following modules: A first comparison module, used to store different first data records, the first data records including historical original words and sentences and representative values ​​of the historical original words and sentences, and combinations of several historical pending words corresponding to the historical original words and sentences and representative values ​​of the combinations of several historical pending words; a second comparison module, used to store different second data records, the second data records including a combination of a plurality of historically selected words and a representative value of the combination of the plurality of historically selected words; a third comparison module, used to store different third data records, the third data records including a standard phrase and a plurality of standard words corresponding to the standard phrase; A storage module is used to store data that users need to retrieve; A user module, for receiving an original word or sentence input by a user, and for displaying different combinations of several pending words corresponding to the original word or sentence in descending order of corresponding feature values, and for receiving a combination of several selected words corresponding to the original word or sentence determined by the user; A retrieval module, for obtaining an original word or phrase input from a user module, performing query processing on the storage module according to the original word or phrase, and for performing query processing on the storage module using a combination of a plurality of selected words corresponding to the original word or phrase determined by the user; A control module is used to determine whether the retrieval module successfully obtains the retrieval results. If not, the control module uses different third data records stored in the third comparison module to divide the original sentence into different pending words, the third data record includes a standard phrase, and several standard words corresponding to the standard phrase, and performs combination processing on different pending words to obtain several combinations of pending words corresponding to the original sentence, and is used to calculate the characteristic values ​​of the combination of several pending words for each combination of several pending words corresponding to the original sentence based on different first data records stored in the first comparison module and different second data records stored in the second comparison module.

9. A storage medium, characterized in that: The storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data inquiry method

    CN104216984A

  • Data query method

    CN115145953A

  • Construction method and device of retrieval model, electronic equipment and storage medium

    CN116361339A

  • Data retrieval method and device, computer equipment and storage medium

    CN116701612A