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
Image
Examples
Embodiment 1
[0044] Such as figure 1 As shown, the embodiment of the present invention provides a method for quickly implementing NL2SQL based on vectorized semantic rules, including:
[0045] S101, performing word segmentation processing and entity recognition on the first sentence based on natural language;
[0046] S102. Using a preset entity type to replace the corresponding entity in the first sentence to obtain a second sentence;
[0047] S103. Identify the second sentence according to a preset semantic rule template to obtain a semantic segment;
[0048] S104, obtain table and field information of the business database according to the semantic segment matching;
[0049] S105. Generate an SQL statement according to the table and field information of the business database.
[0050] Executing step S101, specifically including: performing word segmentation processing and entity recognition on the first sentence by using a predefined entity rule template and a conventional dictionary...
Embodiment 2
[0183] Such as figure 2 As shown, another aspect of the present invention also includes a functional module architecture completely corresponding to the aforementioned method flow, that is, an embodiment of the present invention also provides a device for quickly implementing NL2SQL based on vectorized semantic rules, including:
[0184] Entity recognition module 201, for carrying out participle processing and entity recognition to the first sentence based on natural language;
[0185] An entity type replacement module 202, configured to use a preset entity type to replace the corresponding entity in the first sentence to obtain a second sentence;
[0186] Semantic segment recognition module 203, used for identifying the second sentence according to a preset semantic rule template to obtain a semantic segment;
[0187] The business database table matching module 204 is used to obtain the table and field information of the business database according to the semantic segment m...
PUM

Abstract
Description
Claims
Application Information

- Generate Ideas
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com