Method and device for quickly realizing NL2SQL based on vectorized semantic rule
A semantic and rule-based technology, applied in the field of fast implementation of NL2SQL based on vectorized semantic rules, can solve the problems of lack of accurate mapping of fields, complex process, and inability to build model training, etc., to achieve good accuracy, generalization ability, and high recall rate Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Examples
Example Embodiment
[0043] Example one
[0044] like figure 1 Shown embodiment the present invention provides a fast implementation NL2SQL based on semantic rules to the quantization method, comprising:
[0045] S101, the first sentence of natural language processing and performs segmentation entity recognition;
[0046] S102, the first sentence in place of an entity corresponding to the entity type using a preset, to give a second statement;
[0047] S103, the second identified sentence according to the preset templates semantic rules, semantic fragments obtained;
[0048] S104, according to the matched semantic fragment obtained field information table and the service database;
[0049] S105, generates SQL statements in accordance with the table as the field information of the service database.
[0050] Performing step S101, the specifically comprises: using a conventional dictionaries and rule templates entity predefined to the first statement and the word processing entity recognition, to obtain the
Example Embodiment
[0182] Example 2
[0183] like figure 2 Shown, comprises a further aspect of the present invention and the method fully corresponds to the same process function module architecture, i.e., embodiments of the present invention further provides a fast implementation based on the quantization means NL2SQL semantic rules, comprising:
[0184] Entity identification module 201 for the first sentence of natural language processing and word segmentation entity recognition;
[0185] Alternatively entity type module 202, for replacing the corresponding entity of the first sentence, the sentence obtained by using a second predetermined entity type;
[0186] Semantic segment identification module 203 for identifying the sentence in accordance with a preset second semantic rules templates, to obtain semantic fragment;
[0187] The service database table matching module 204, for obtaining field information table and the service database according to the semantic matching segments;
[0188] SQL stat
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap