[go: up one dir, main page]

CN116595029A - Automatic SQL sentence generation method and related equipment - Google Patents

Automatic SQL sentence generation method and related equipment Download PDF

Info

Publication number
CN116595029A
CN116595029A CN202310451434.2A CN202310451434A CN116595029A CN 116595029 A CN116595029 A CN 116595029A CN 202310451434 A CN202310451434 A CN 202310451434A CN 116595029 A CN116595029 A CN 116595029A
Authority
CN
China
Prior art keywords
sql
target
sql statement
natural language
keyword
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310451434.2A
Other languages
Chinese (zh)
Inventor
罗伟凡
陈光炎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hexun Huagu Information Technology Co ltd
Original Assignee
Shenzhen Hexun Huagu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hexun Huagu Information Technology Co ltd filed Critical Shenzhen Hexun Huagu Information Technology Co ltd
Priority to CN202310451434.2A priority Critical patent/CN116595029A/en
Publication of CN116595029A publication Critical patent/CN116595029A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种SQL语句自动生成方法,包括:设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;获取测试用例,所述测试用例为使用自然语言描述的查询要求;基于文本解析器解析所述测试用例得到所述测试用例所包括的目标自然语言关键词;基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;基于所述目标SQL关键词生成目标SQL语句。基于本方法可知,本申请所具有的的有益效果包括:增强数据查询效率,使用该方法可以根据自然语言描述的查询要求自动生成SQL语句,减少非专业人士的工作难度,提高数据库操作的效率。

The application discloses a method for automatically generating SQL statements, including: setting corresponding rules for SQL statements, and the corresponding rules for SQL statements include: corresponding rules between natural language keywords and SQL keywords; obtaining test cases, the test A use case is a query requirement described in natural language; the test case is parsed based on a text parser to obtain the target natural language keywords included in the test case; based on the corresponding rules of the SQL statement, the corresponding A target SQL keyword; generating a target SQL statement based on the target SQL keyword. Based on this method, it can be seen that the beneficial effects of this application include: enhancing data query efficiency, using this method can automatically generate SQL statements according to query requirements described in natural language, reduce the work difficulty of non-professionals, and improve the efficiency of database operations.

Description

一种SQL语句自动生成方法及相关设备A method for automatically generating SQL statements and related equipment

技术领域technical field

本申请属于数据处理领域,尤其涉及一种SQL语句自动生成方法及相关设备。The application belongs to the field of data processing, and in particular relates to a method for automatically generating SQL statements and related equipment.

背景技术Background technique

当今大数据测试过程中,当进行端到端的大数据测试时,需要等待所有的测试数据处理完成,这个过程可能比较漫长,这会导致测试时间长,并且存在着测试执行冗余的情况。此外,一些定时处理工具(例如Azkaban等类型的批量工作流任务调度器)可能因为前置数据未及时处理完成而导致结果数据未能如预期般按时输出,进一步降低了测试效率。In today's big data testing process, when performing end-to-end big data testing, it is necessary to wait for all the test data to be processed. This process may be relatively long, which will lead to long testing time and redundant test execution. In addition, some timing processing tools (such as batch workflow task schedulers such as Azkaban) may not output the result data as expected due to the incomplete processing of the pre-processed data, which further reduces the test efficiency.

从数据仓库当前的分层治理角度考虑,将数据测试细化到每个层级是一种比较好的解决方案。大多数大数据组件在各自的层级都会开放SQL接口供用户使用。因此,在测试过程中,我们可以利用SQL查询方法对数据进行质量保障,以确保测试数据在每个层级中的准确性和一致性。Considering the current layered governance of data warehouses, it is a better solution to refine data testing to each level. Most big data components open SQL interfaces at their respective levels for users to use. Therefore, during the testing process, we can use the SQL query method to ensure the quality of the data to ensure the accuracy and consistency of the test data at each level.

然而,由于每个层级用来查询的SQL要求不同、功能不同,导致使用SQL进行数据测试的测试用例数量会几何级数地上升。导致SQL语句编写工作变得复杂且琐碎,耗费大量的人力物力。However, due to the different requirements and functions of the SQL used for querying at each level, the number of test cases using SQL for data testing will increase exponentially. As a result, the writing of SQL statements becomes complicated and trivial, consuming a lot of manpower and material resources.

发明内容Contents of the invention

本发明的目的在于提供一种SQL语句自动生成方法,旨在解决现有的SQL语句编写工作复杂且琐碎,耗费大量的人力物力的问题,本申请提供的SQL语句自动生成方法包括:The purpose of the present invention is to provide a method for automatically generating SQL statements, aiming to solve the problem that the existing SQL statement writing work is complicated and trivial, and consumes a large amount of manpower and material resources. The method for automatically generating SQL statements provided by the application includes:

本申请实施例第一方面提供了一种SQL语句自动生成方法,包括:The first aspect of the embodiment of the present application provides a method for automatically generating SQL statements, including:

设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;The SQL statement correspondence rule is set, and the SQL statement correspondence correspondence rule comprises: the correspondence rule between the natural language keyword and the SQL keyword;

获取测试用例,所述测试用例为使用自然语言描述的查询要求;Obtain a test case, the test case is a query requirement described in natural language;

基于文本解析器解析所述测试用例,得到所述测试用例所包括的目标自然语言关键词;Analyzing the test case based on a text parser to obtain target natural language keywords included in the test case;

基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;Determine the target SQL keyword corresponding to the target natural language keyword based on the SQL statement correspondence rule;

基于所述目标SQL关键词生成目标SQL语句。A target SQL statement is generated based on the target SQL keywords.

基于本申请实施例第一方面所提供的SQL语句自动生成方法,可选的,所述SQL语句对应规则还包括:自然语言关键词语序调整规则。Based on the method for automatically generating SQL statements provided in the first aspect of the embodiment of the present application, optionally, the SQL statement correspondence rules further include: natural language keyword order adjustment rules.

基于本申请实施例第一方面所提供的SQL语句自动生成方法,可选的,所述基于所述目标SQL关键词生成目标SQL语句,包括:Based on the method for automatically generating SQL statements provided in the first aspect of the embodiment of the present application, optionally, generating a target SQL statement based on the target SQL keyword includes:

基于所述自然语言关键词语序调整规则和所述目标SQL关键词生成目标SQL语句。A target SQL statement is generated based on the natural language key word order adjustment rule and the target SQL key word.

基于本申请实施例第一方面所提供的SQL语句自动生成方法,可选的,所述方法还包括:Based on the method for automatically generating SQL statements provided in the first aspect of the embodiment of the present application, optionally, the method further includes:

所述目标SQL语句用于查询大数据测试数据库,所述大数据测试数据库为分层结构。The target SQL statement is used to query the big data test database, and the big data test database has a hierarchical structure.

基于本申请实施例第一方面所提供的SQL语句自动生成方法,可选的,所述SQL语句对应规则还包括:Based on the method for automatically generating SQL statements provided in the first aspect of the embodiment of the present application, optionally, the SQL statement corresponding rules further include:

关键词层级设置规则,所述关键词层级设置规则基于所述大数据测试数据库的分层结构而设置;keyword level setting rules, the keyword level setting rules are set based on the hierarchical structure of the big data test database;

所述方法还包括:The method also includes:

基于所述关键词层级设置规则调整所述目标SQL语句。The target SQL statement is adjusted based on the keyword level setting rule.

基于本申请实施例第一方面所提供的SQL语句自动生成方法,可选的,所述方法还包括:Based on the method for automatically generating SQL statements provided in the first aspect of the embodiment of the present application, optionally, the method further includes:

执行所述目标SQL语句,得到查询结果和执行结果。Execute the target SQL statement to obtain query results and execution results.

本申请实施例第二方面提供了一种SQL语句自动生成方法,包括:The second aspect of the embodiment of the present application provides a method for automatically generating SQL statements, including:

设置单元,用于设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;The setting unit is used to set the corresponding rules of the SQL statement, and the corresponding corresponding rules of the SQL statement include: the corresponding rules between the natural language keywords and the SQL keywords;

获取单元,用于获取测试用例,所述测试用例为使用自然语言描述的查询要求;An acquisition unit, configured to acquire a test case, where the test case is a query requirement described in natural language;

解析单元,用于基于文本解析器解析所述测试用例得到所述测试用例所包括的目标自然语言关键词;A parsing unit, configured to parse the test case based on a text parser to obtain target natural language keywords included in the test case;

确定单元,用于基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;A determining unit, configured to determine a target SQL keyword corresponding to the target natural language keyword based on the SQL statement correspondence rule;

生成单元,用于基于所述目标SQL关键词生成目标SQL语句。A generating unit, configured to generate a target SQL statement based on the target SQL keyword.

基于本申请实施例第二方面所提供的SQL语句自动生成设备,可选的,所述SQL语句对应规则还包括:自然语言关键词语序调整规则。Based on the device for automatically generating SQL statements provided in the second aspect of the embodiment of the present application, optionally, the SQL statement correspondence rules further include: natural language keyword order adjustment rules.

基于本申请实施例第二方面所提供的SQL语句自动生成设备,可选的,所述生成单元具体用于:Based on the SQL statement automatic generation device provided in the second aspect of the embodiment of the present application, optionally, the generation unit is specifically used for:

基于所述自然语言关键词语序调整规则和所述目标SQL关键词生成目标SQL语句。A target SQL statement is generated based on the natural language key word order adjustment rule and the target SQL key word.

基于本申请实施例第二方面所提供的SQL语句自动生成设备,可选的,所述目标SQL语句用于查询大数据测试数据库,所述大数据测试数据库为分层结构。Based on the SQL statement automatic generation device provided in the second aspect of the embodiment of the present application, optionally, the target SQL statement is used to query a big data test database, and the big data test database has a hierarchical structure.

基于本申请实施例第二方面所提供的SQL语句自动生成设备,可选的,所述SQL语句对应规则还包括:Based on the SQL statement automatic generation device provided in the second aspect of the embodiment of the present application, optionally, the SQL statement corresponding rules further include:

关键词层级设置规则,所述关键词层级设置规则基于所述大数据测试数据库的分层结构而设置;keyword level setting rules, the keyword level setting rules are set based on the hierarchical structure of the big data test database;

所述设备还包括:调整单元,用于基于所述关键词层级设置规则调整所述目标SQL语句。The device further includes: an adjustment unit, configured to adjust the target SQL statement based on the keyword level setting rule.

基于本申请实施例第二方面所提供的SQL语句自动生成设备,可选的,所述设备还包括:执行单元,用于执行所述目标SQL语句,得到查询结果和执行结果。Based on the device for automatically generating SQL statements provided in the second aspect of the embodiment of the present application, optionally, the device further includes: an execution unit configured to execute the target SQL statement to obtain query results and execution results.

本申请实施例第三方面提供了一种SQL语句自动生成设备,包括:The third aspect of the embodiment of the present application provides a device for automatically generating SQL statements, including:

中央处理器,存储器,输入输出接口,有线或无线网络接口以及电源;Central processing unit, memory, input and output interfaces, wired or wireless network interface and power supply;

所述存储器为短暂存储存储器或持久存储存储器;The memory is a temporary storage memory or a persistent storage memory;

所述中央处理器配置为与所述存储器通信,在所述SQL语句自动生成设备上执行所述存储器中的指令操作以执行如本申请实施例第一方面中任意一项所述的方法。The central processing unit is configured to communicate with the memory, and execute instructions in the memory on the device for automatically generating SQL statements to perform the method described in any one of the first aspects of the embodiments of the present application.

本申请实施例第四方面提供了一种计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如本申请实施例第一方面中任意一项所述的方法。The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, including instructions, and when the instructions are run on a computer, the computer executes the method described in any one of the first aspects of the embodiments of the present application.

本申请实施例第五方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如本申请实施例第一方面中任意一项所述的方法。The fifth aspect of the embodiments of the present application provides a computer program product including instructions, which, when run on a computer, cause the computer to execute the method described in any one of the first aspects of the embodiments of the present application.

从以上技术方案可以看出,本申请实施例具有以下优点:本申请提供了一种SQL语句自动生成方法,包括:设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;获取测试用例,所述测试用例为使用自然语言描述的查询要求;基于文本解析器解析所述测试用例得到所述测试用例所包括的目标自然语言关键词;基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;基于所述目标SQL关键词生成目标SQL语句。基于本方法可知,本申请所具有的的有益效果包括:增强数据查询效率:SQL语句是执行数据库操作的重要工具,而手动编写SQL语句需要熟悉SQL语法和数据库结构,对非专业人士来说容易出现错误和耗费时间。使用该方法可以根据自然语言描述的查询要求自动生成SQL语句,减少非专业人士的工作难度,提高数据库操作的效率。As can be seen from the above technical solutions, the embodiments of the present application have the following advantages: the present application provides a method for automatically generating SQL statements, including: setting the corresponding rules for SQL statements, and the corresponding corresponding rules for the SQL statements include: natural language keywords and Correspondence rule between SQL keywords; Obtain test case, described test case is the query requirement described in natural language; Analyze described test case based on text parser and obtain the target natural language keyword that described test case includes; Based on The SQL statement correspondence rule determines a target SQL keyword corresponding to the target natural language keyword; and generates a target SQL statement based on the target SQL keyword. Known based on the method, the beneficial effects of the present application include: enhanced data query efficiency: SQL statements are an important tool for performing database operations, and manual writing of SQL statements requires familiarity with SQL syntax and database structure, which is easy for non-professionals Mistakes and time consuming. Using this method, SQL statements can be automatically generated according to the query requirements described in natural language, reducing the work difficulty of non-professionals and improving the efficiency of database operations.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。可以理解的是,本部分所提供的附图仅用于更好地理解本方案,不构成对本申请的限定。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present application, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work. It can be understood that the drawings provided in this section are only used to better understand the present solution, and do not constitute a limitation to the present application.

图1为本申请所提供的SQL语句自动生成方法实施例的一个流程示意图;Fig. 1 is a schematic flow sheet of the embodiment of the automatic generation method of SQL statement provided by the application;

图2为本申请所提供的SQL语句自动生成方法实施例的另一个流程示意图;Fig. 2 is another schematic flow sheet of the embodiment of the automatic generation method for SQL statements provided by the application;

图3为本申请所提供的SQL语句自动生成设备实施例的一个结构示意图;Fig. 3 is a structural representation of the automatic generation equipment embodiment of SQL sentence that the application provides;

图4为本申请所提供的SQL语句自动生成设备实施例的另一个结构示意图。FIG. 4 is another schematic structural diagram of an embodiment of the device for automatically generating SQL statements provided by the present application.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本申请方案,下面对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。同时,为了描述清楚和简明,以下的描述中省略了对公知的功能和结构的描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application are clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. the embodiment. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application. Meanwhile, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness of description.

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, product or apparatus comprising a series of steps or elements need not be limited to those steps explicitly listed or units, but may include other steps or units not explicitly listed or inherent to the process, method, product or apparatus.

当今大数据测试过程中,当进行端到端的大数据测试时,需要等待所有的测试数据处理完成,这个过程可能比较漫长,这会导致测试时间长,并且存在着测试执行冗余的情况。此外,一些定时处理工具(例如azkaban)可能因为前置数据未及时处理完成而导致结果数据未能如预期般按时输出,进一步降低了测试效率。In today's big data testing process, when performing end-to-end big data testing, it is necessary to wait for all the test data to be processed. This process may be relatively long, which will lead to long testing time and redundant test execution. In addition, some timing processing tools (such as azkaban) may not output the result data as expected because the pre-data processing is not completed in time, which further reduces the test efficiency.

从数据仓库当前的分层治理角度考虑,将数据测试细化到每个层级是一种比较好的解决方案。大多数大数据组件在各自的层级都会开放SQL接口供用户使用。因此,在测试过程中,我们可以利用SQL查询方法对数据进行质量保障,以确保测试数据在每个层级中的准确性和一致性。Considering the current layered governance of data warehouses, it is a better solution to refine data testing to each level. Most big data components open SQL interfaces at their respective levels for users to use. Therefore, during the testing process, we can use the SQL query method to ensure the quality of the data to ensure the accuracy and consistency of the test data at each level.

然而,由于每个层级用来查询的SQL要求不同、功能不同,导致使用SQL进行数据测试的测试用例数量会几何级数地上升。导致SQL语句编写工作变得复杂且琐碎,耗费大量的人力物力。为解决上述问题,本申请提供了一种新的SQL语句自动生成方法,请参阅图1,本申请所提供的SQL语句自动生成方法的一个实施例包括:However, due to the different requirements and functions of the SQL used for querying at each level, the number of test cases using SQL for data testing will increase exponentially. As a result, the writing of SQL statements becomes complicated and trivial, consuming a lot of manpower and material resources. In order to solve the above problems, the application provides a new method for automatically generating SQL statements, referring to Fig. 1, an embodiment of the method for automatically generating SQL statements provided by the application includes:

101、设置SQL语句对应规则。101. Set the SQL statement corresponding rules.

具体的,为了将自然语言查询转换成SQL查询,首先需要建立自然语言关键词与SQL关键词之间的对应规则。可以通过分析常见的自然语言查询与SQL查询的对应关系进行设置。例如,“查询”对应SQL的“select”关键词,“条件”对应SQL的“where”关键词等等。此外,还需要将数据查询涉及的连接信息、字段、表之间的血缘关系等配置信息分类存储,方便后续的转换处理。对于通用配置信息,可以通过在规则库中提前设置好;对于业务配置信息,可以通过动态读取数据库元数据信息等方式获取。Specifically, in order to convert a natural language query into an SQL query, it is first necessary to establish a corresponding rule between natural language keywords and SQL keywords. It can be set by analyzing the corresponding relationship between common natural language queries and SQL queries. For example, "query" corresponds to the "select" keyword of SQL, "condition" corresponds to the "where" keyword of SQL, and so on. In addition, it is also necessary to classify and store configuration information such as connection information, fields, and blood relationship between tables involved in data query, so as to facilitate subsequent conversion processing. For general configuration information, it can be set in advance in the rule base; for business configuration information, it can be obtained by dynamically reading database metadata information.

需要注意的是,SQL语句中不同的查询语法会存在不同的SQL关键词与运算符。因此,建立SQL语句对应规则时需要全面考虑SQL语言的语法结构,以及具体业务查询的需求,根据实际情况设置相应的规则以达到转换成功的目的。同时,在实际应用场景中,也需要定期维护SQL语句对应规则的准确性和完整性,防止数据结构发生变化导致的规则匹配错误或者翻译错误的问题发生。具体的配置方式可依据实际情况而定,此处不做限定。It should be noted that different query syntaxes in SQL statements will have different SQL keywords and operators. Therefore, when establishing the corresponding rules for SQL statements, it is necessary to fully consider the grammatical structure of the SQL language and the needs of specific business queries, and set corresponding rules according to the actual situation to achieve the goal of successful conversion. At the same time, in actual application scenarios, it is also necessary to regularly maintain the accuracy and integrity of the rules corresponding to SQL statements to prevent rule matching errors or translation errors caused by changes in data structures. The specific configuration method can be determined according to the actual situation, which is not limited here.

102、获取测试用例。102. Obtain a test case.

具体的,获取测试用例,测试用例是指用户用自然语言描述的查询要求,可以通过人工编写或自动生成。测试用例比如说要测试水杯能不能用,盛水看水杯会不会漏水就是其中一条用例。在编写测试用例时,需要结合实际业务场景,把查询的相关要素都考虑到。可以采用思维导图、文本编辑器等方式进行记录,以便后续的转换处理。后期再根据项目实际通过python转换文件格式。对于测试用例需要确保测试用例的描述准确、清晰,能够完整地描述用户的查询需求,涉及到的表、字段和查询条件等都要详细指明。以便于保证后续自动生成的SQL语句的准确性和可用性。Specifically, a test case is obtained. The test case refers to a query requirement described by a user in natural language, which can be manually written or automatically generated. Test cases For example, to test whether the water cup can be used, filling water to see if the water cup will leak is one of the use cases. When writing test cases, it is necessary to take into account the relevant elements of the query in combination with the actual business scenario. Mind maps, text editors, etc. can be used to record for subsequent conversion processing. Later, according to the actual project, the file format will be converted through python. For test cases, it is necessary to ensure that the description of test cases is accurate and clear, and can fully describe the user's query requirements, and the tables, fields, and query conditions involved must be specified in detail. In order to ensure the accuracy and usability of subsequent automatically generated SQL statements.

103、基于文本解析器解析所述测试用例,得到所述测试用例所包括的目标自然语言关键词。103. Parse the test case based on a text parser to obtain target natural language keywords included in the test case.

基于文本解析器解析测试用例,得到所包括的目标自然语言关键词:在步骤102中,我们已经获取了测试用例,接下来的任务就是将测试用例转换成计算机语言,以便计算机能够处理并实现用户的查询请求。为此可以使用一些开源工具和技术,如自然语言处理技术、正则表达式、语法分析等,通过编写程序,对测试用例中的自然语言文本进行解析和识别,提取出其中的目标自然语言关键词。其中,目标自然语言关键词包括了用户查询意义上的主要信息,如要查询的数据表名、所需要查询的字段、查询条件等等,具体实施方式可依据实际情况而定,此处不做限定。Analyze the test case based on the text parser to obtain the included target natural language keywords: in step 102, we have obtained the test case, and the next task is to convert the test case into a computer language so that the computer can process and realize the user query request. To this end, you can use some open source tools and technologies, such as natural language processing technology, regular expressions, syntax analysis, etc., to analyze and identify the natural language text in the test case by writing a program, and extract the target natural language keywords . Among them, the target natural language keywords include the main information in the sense of user query, such as the name of the data table to be queried, the fields to be queried, query conditions, etc. The specific implementation method can be determined according to the actual situation, and will not be done here limited.

需要注意的是,在实际应用中可能会遇到一些自然语言描述比较复杂或者存在歧义的测试用例,这时需要通过扩充解析器的规则,或者增加上下文语境等方式进行处理,以准确提取出目标自然语言关键词,从而转换为SQL语句。具体的解析过程依据解析器实际情况而定,此处不做限定。It should be noted that in practical applications, some test cases with complex or ambiguous natural language descriptions may be encountered. At this time, it is necessary to expand the rules of the parser, or increase the context, etc. to accurately extract the test cases. The target natural language keywords are converted into SQL statements. The specific parsing process depends on the actual situation of the parser, and is not limited here.

104、基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词。104. Determine a target SQL keyword corresponding to the target natural language keyword based on the SQL statement correspondence rule.

基于SQL语句对应规则确定目标自然语言关键词对应的目标SQL关键词,根据步骤101所设置的SQL语句对应规则,将目标自然语言关键词转换成对应的SQL关键词。这个过程需要根据规则库中的数据结构和元数据信息进行匹配和转换。The target SQL keywords corresponding to the target natural language keywords are determined based on the SQL statement corresponding rules, and the target natural language keywords are converted into corresponding SQL keywords according to the SQL statement corresponding rules set in step 101 . This process needs to be matched and transformed according to the data structure and metadata information in the rule base.

例如,对于测试用例“查询A表五月的收入”,解析后获得的目标自然语言关键词分别为:“查询”、“A表”、“五月”、“收入”。根据步骤101所设置的规则库,可以将“查询”关键词对应的SQL关键词转换成“select”;将“A表”转换成“from A”;将“五月”转换成“wheremonth=‘May’”;将“收入”转换成“sum(income)”等。For example, for the test case "Query the income of Table A in May", the target natural language keywords obtained after parsing are: "query", "Table A", "May", and "income". According to the rule base set in step 101, the SQL keyword corresponding to the "query" keyword can be converted into "select"; "A table" can be converted into "from A"; "May" can be converted into "wheremonth=' May'"; Convert "income" to "sum(income)", etc.

需要注意的是,在进行概念转换的过程中,还需要考虑到用户输入的表名、字段名等可能是拼写错误、大小写不规范、别名使用混乱等问题,可以在规则库中设置相应的容错机制和规则,以增加系统的准确性和稳定性。It should be noted that in the process of concept conversion, it is also necessary to consider that the table name and field name entered by the user may be misspelled, the capitalization is not standardized, and the use of aliases is confusing. You can set the corresponding rules in the rule base. Fault tolerance mechanisms and rules to increase the accuracy and stability of the system.

105、基于所述目标SQL关键词生成目标SQL语句。105. Generate a target SQL statement based on the target SQL keyword.

具体的,基于所述目标SQL关键词生成目标SQL语句,将基于步骤104所得到的的多个目标SQL关键词合并生成目标SQL语句,所生成的目标SQL语句在执行时,与用户通过自然语言写入的测试用例查询要求一致,如用户输入的用例描述:查询A表五月的收入。基于上述步骤104至步骤105处理,得到结果为:select sum(income)from A where month=’May’。用户可以使用该目标SQL语句进行查询,得到相应的查询结果。Specifically, a target SQL statement is generated based on the target SQL keyword, and a plurality of target SQL keywords obtained in step 104 are combined to generate a target SQL statement. When the generated target SQL statement is executed, it communicates with the user through natural language The written test case query requirements are consistent, such as the use case description input by the user: query the income of Table A in May. Based on the above steps 104 to 105, the result obtained is: select sum(income) from A where month='May'. Users can use the target SQL statement to query and obtain corresponding query results.

从以上技术方案可以看出,本申请实施例具有以下优点:本申请提供了一种SQL语句自动生成方法,包括:设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;获取测试用例,所述测试用例为使用自然语言描述的查询要求;基于文本解析器解析所述测试用例得到所述测试用例所包括的目标自然语言关键词;基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;基于所述目标SQL关键词生成目标SQL语句。基于本方法可知,本申请所具有的的有益效果包括:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages: the present application provides a method for automatically generating SQL statements, including: setting the corresponding rules for SQL statements, and the corresponding corresponding rules for the SQL statements include: natural language keywords and Correspondence rule between SQL keywords; Obtain test case, described test case is the query requirement described in natural language; Analyze described test case based on text parser and obtain the target natural language keyword that described test case includes; Based on The SQL statement correspondence rule determines a target SQL keyword corresponding to the target natural language keyword; and generates a target SQL statement based on the target SQL keyword. Known based on this method, the beneficial effect that the present application has comprises:

1、增强数据查询效率:SQL语句是执行数据库操作的重要工具,而手动编写SQL语句需要熟悉SQL语法和数据库结构,对非专业人士来说容易出现错误和耗费时间。使用该方法可以根据自然语言描述的查询要求自动生成SQL语句,减少非专业人士的工作难度,提高数据库操作的效率。1. Enhance data query efficiency: SQL statements are an important tool for performing database operations, and manually writing SQL statements requires familiarity with SQL syntax and database structure, which is prone to errors and time-consuming for non-professionals. Using this method, SQL statements can be automatically generated according to the query requirements described in natural language, reducing the work difficulty of non-professionals and improving the efficiency of database operations.

2、减少错误率:手动编写SQL语句容易出现因为疏忽或语法错误导致查询结果不准确的情况。使用该方法可以避免这种情况的发生,通过预设SQL语句对应规则、基于文本解析器解析测试用例,将目标自然语言关键词对应的目标SQL关键词确定,从而生成准确的SQL语句。2. Reduce the error rate: Manually writing SQL statements is prone to inaccurate query results due to negligence or grammatical errors. Using this method can avoid the occurrence of this situation. By presetting the corresponding rules of SQL statements and analyzing the test cases based on the text parser, the target SQL keywords corresponding to the target natural language keywords are determined to generate accurate SQL statements.

3、提高查询准确性:传统的查询方式可能需要用户自己写代码或者进行多次尝试才能找到满足查询需求的SQL语句,查询效率较低。使用该方法可以根据自然语言描述的查询要求自动生成准确的SQL语句,提高查询准确性和效率。3. Improve query accuracy: The traditional query method may require the user to write code or make multiple attempts to find the SQL statement that meets the query requirements, and the query efficiency is low. Using this method, accurate SQL statements can be automatically generated according to query requirements described in natural language, thereby improving query accuracy and efficiency.

4、简化操作流程:使用该方法可以省略用户编写SQL语句的步骤,将自然语言描述的查询要求转化为SQL语句,简化了操作流程,使得用户可以更快速地完成数据库查询。4. Simplify the operation process: Using this method can omit the steps for users to write SQL statements, and convert the query requirements described in natural language into SQL statements, which simplifies the operation process and enables users to complete database queries more quickly.

5、降低学习门槛:SQL语言需要一定程度的学习和理解,而使用该方法可以使得用户不需要精通SQL语言,只需要使用自然语言描述查询要求即可生成SQL语句,降低了学习门槛。5. Lower learning threshold: SQL language requires a certain degree of learning and understanding, and using this method allows users not to be proficient in SQL language, and only needs to use natural language to describe query requirements to generate SQL statements, which lowers the learning threshold.

为便于在实施实施过程中使用本方法,可选的本申请还提供了一种可选择实施的更为详细的实施例,请参照图2,本申请所提供的一个SQL语句自动生成方法的一个实施例包括:In order to facilitate the use of this method in the implementation process, the optional application also provides a more detailed embodiment of an optional implementation, please refer to Fig. 2, a SQL statement automatic generation method provided by the application Examples include:

201、设置SQL语句对应规则。201. Set the rules corresponding to the SQL statement.

设置SQL语句对应规则。具体的,步骤201在实施时与前述步骤101类似,包括自然语言关键词与SQL关键词之间的对应规则:例如“选择”对应“SELECT”,“从xx表”对应“FROM”,“条件”对应“WHERE”等等。此外SQL语句对应规则还应包括自然语言关键词语序调整规则,在不同自然语言描述的查询要求中,自然语言关键词的顺序可能存在差异,然而,SQL语句中关键词的顺序是固定的,此时需要根据规则将自然语言关键词的顺序调整为正确的SQL语句顺序,例如“从xx表+选择+条件”等等。Set the rules corresponding to SQL statements. Specifically, step 201 is similar to the aforementioned step 101 during implementation, including the corresponding rules between natural language keywords and SQL keywords: for example, "select" corresponds to "SELECT", "from xx table" corresponds to "FROM", "condition " corresponds to "WHERE" and so on. In addition, the corresponding rules for SQL statements should also include the order adjustment rules for natural language keywords. In the query requirements described in different natural languages, the order of natural language keywords may be different. However, the order of keywords in SQL statements is fixed. It is necessary to adjust the order of natural language keywords to the correct order of SQL statements according to the rules, such as "from xx table + selection + condition" and so on.

另外SQL语句对应规则还应包括关键词层级设置规则,在面向大数据测试数据库进行查询时,数据通常会按照一定的层级结构进行组织,例如文件目录结构、多级索引等等。此时,需要根据层级设置规则将SQL语句中的关键词调整为正确层级下的关键词,以确保查询到目标数据。In addition, the corresponding rules for SQL statements should also include the keyword level setting rules. When querying the big data test database, the data is usually organized according to a certain hierarchical structure, such as file directory structure, multi-level index, etc. At this time, it is necessary to adjust the keywords in the SQL statement to the keywords under the correct level according to the level setting rules, so as to ensure that the target data can be queried.

202、获取测试用例。202. Obtain a test case.

本步骤与前述图1对应实施例中步骤102类似,具体此处不做赘述,需要说明的是,所述测试用例用于查询大数据测试数据库,所述大数据测试数据库为分层结构。This step is similar to step 102 in the above-mentioned embodiment corresponding to FIG. 1 , and details are not described here. It should be noted that the test case is used to query the big data test database, and the big data test database has a hierarchical structure.

203、基于文本解析器解析所述测试用例,得到所述测试用例所包括的目标自然语言关键词。203. Parse the test case based on a text parser to obtain target natural language keywords included in the test case.

具体的,通过文本解析器解析测试用例中包括的目标自然语言关键词。文本解析器是一种自然语言处理工具,通过对输入文本进行分词、语法分析等处理过程,将文本转化为机器可读的格式,以便后续处理。具体包括以下内容:分词:将输入的自然语言文本分割成独立的词语,去除标点符号等无关成分,以便后续处理和分析。词性标注:对于每个分词后的词语,确定其在句子中所属的词性,例如名词、动词、形容词等。语法分析:根据分词和词性标注结果,对句子的语法结构进行分析,包括语法树的构建、词语之间的依存关系等等。通过文本解析器处理测试用例,可以将自然语言文本转化为机器可处理的格式,为后续的SQL语句生成提供基础。Specifically, target natural language keywords included in the test case are parsed by a text parser. A text parser is a natural language processing tool that converts the text into a machine-readable format for subsequent processing by performing word segmentation and grammatical analysis on the input text. It specifically includes the following content: word segmentation: segment the input natural language text into independent words, and remove irrelevant components such as punctuation marks for subsequent processing and analysis. Part-of-speech tagging: For each word after word segmentation, determine the part of speech it belongs to in the sentence, such as noun, verb, adjective, etc. Grammatical analysis: According to word segmentation and part-of-speech tagging results, analyze the grammatical structure of sentences, including the construction of grammatical trees, the dependencies between words, and so on. Processing test cases through a text parser can convert natural language text into a machine-processable format, providing the basis for subsequent SQL statement generation.

204、基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词。204. Determine a target SQL keyword corresponding to the target natural language keyword based on the SQL statement correspondence rule.

具体,步骤204与前述图1对应实施例中步骤104类似,具体可参照前述内容,此处不做赘述。Specifically, step 204 is similar to step 104 in the aforementioned embodiment corresponding to FIG. 1 , for details, reference may be made to the aforementioned content, and details are not repeated here.

205、基于所述自然语言关键词语序调整规则和所述目标SQL关键词生成目标SQL语句。205. Generate a target SQL statement based on the natural language keyword order adjustment rule and the target SQL keyword.

具体的,基于所述自然语言关键词语序调整规则和所述目标SQL关键词生成目标SQL语句。其中自然语言关键词语序调整规则保证了从自然语言向SQL语言转化过程中语序上的调整规则在不同自然语言描述的查询要求中,自然语言关键词的顺序可能存在差异,然而,SQL语句中关键词的顺序是固定的,此时需要根据规则将自然语言关键词的顺序调整为正确的SQL语句顺序,例如“从xx表+选择+条件”等等。基于该语序调整规则和从测试用例中获得的目标SQL关键词生成目标SQL语句。Specifically, a target SQL statement is generated based on the natural language keyword order adjustment rule and the target SQL keyword. Among them, the natural language keyword word order adjustment rules ensure the word order adjustment rules in the process of converting from natural language to SQL language. In the query requirements described in different natural languages, the order of natural language keywords may be different. However, the key words in the SQL statement The order of words is fixed. At this time, it is necessary to adjust the order of natural language keywords to the correct order of SQL statements according to the rules, such as "from xx table + selection + condition" and so on. Generate target SQL statements based on the word order adjustment rules and target SQL keywords obtained from test cases.

206、基于所述关键词层级设置规则调整所述目标SQL语句。206. Adjust the target SQL statement based on the keyword level setting rule.

具体的,基于所述关键词层级设置规则调整所述目标SQL语句。在实际用户编写测试用例时可能未对关键词所属的层级引起额外的注意,但在面向大数据测试数据库进行查询时,数据通常会按照一定的层级结构进行组织,例如文件目录结构、多级索引等等。此时,需要根据层级设置规则将SQL语句中的关键词调整为正确层级下的关键词,以确保调用正确接口,查询到目标数据。Specifically, the target SQL statement is adjusted based on the keyword level setting rule. When actual users write test cases, they may not pay extra attention to the hierarchy of keywords, but when querying big data test databases, the data is usually organized according to a certain hierarchical structure, such as file directory structure, multi-level index etc. At this time, it is necessary to adjust the keywords in the SQL statement to keywords under the correct level according to the level setting rules, so as to ensure that the correct interface is called and the target data is queried.

如测试用例为对A表内的数据进行查询,但A表在层级上属于统计层级,因此在生成该测试用例对应的SQL语句时需要在识别到对A表查询时对应的统计层级查询路径相应的SQL关键词,并增加到所生成的SQL语句中,以使得目标SQL语句可以对大数据数据库中正确层级下的数据进行查询。For example, the test case is to query the data in table A, but table A belongs to the statistical level in terms of hierarchy, so when generating the SQL statement corresponding to the test case, it is necessary to identify the query path corresponding to the statistical level when querying table A. The SQL keywords are added to the generated SQL statement, so that the target SQL statement can query the data at the correct level in the big data database.

207、执行所述目标SQL语句,得到查询结果和执行结果。207. Execute the target SQL statement to obtain a query result and an execution result.

具体的,在得到目标SQL语句后执行所述目标SQL语句,得到查询结果和执行结果。其中查询结果为具体数据,即SQL语句执行所得到的结果,执行结果为目标SQL语句是否执行成功的执行结果即用例执行结果,同时执行结果为执行错误的情况下,还可以向用户反馈错误原因等内容,以便用户获得SQL语句的执行情况与执行结果,进而使得用户可以及时对SQL语句或测试用例进行调整。具体可依据实际情况而定,此处不做限定。Specifically, after the target SQL statement is obtained, the target SQL statement is executed to obtain a query result and an execution result. The query result is specific data, that is, the result obtained by executing the SQL statement. The execution result is the execution result of whether the target SQL statement is successfully executed, that is, the execution result of the use case. At the same time, if the execution result is an execution error, the cause of the error can also be fed back to the user etc., so that the user can obtain the execution status and execution results of the SQL statement, so that the user can adjust the SQL statement or test case in time. The details may be determined according to actual conditions, and are not limited here.

基于本方法可知,本申请所具有的的有益效果包括:Known based on this method, the beneficial effect that the present application has comprises:

1、增强数据查询效率:SQL语句是执行数据库操作的重要工具,而手动编写SQL语句需要熟悉SQL语法和数据库结构,对非专业人士来说容易出现错误和耗费时间。使用该方法可以根据自然语言描述的查询要求自动生成SQL语句,减少非专业人士的工作难度,提高数据库操作的效率。1. Enhance data query efficiency: SQL statements are an important tool for performing database operations, and manually writing SQL statements requires familiarity with SQL syntax and database structure, which is prone to errors and time-consuming for non-professionals. Using this method, SQL statements can be automatically generated according to the query requirements described in natural language, reducing the work difficulty of non-professionals and improving the efficiency of database operations.

2、减少错误率:手动编写SQL语句容易出现因为疏忽或语法错误导致查询结果不准确的情况。使用该方法可以避免这种情况的发生,通过预设SQL语句对应规则、基于文本解析器解析测试用例,将目标自然语言关键词对应的目标SQL关键词确定,从而生成准确的SQL语句。2. Reduce the error rate: Manually writing SQL statements is prone to inaccurate query results due to negligence or grammatical errors. Using this method can avoid the occurrence of this situation. By presetting the corresponding rules of SQL statements and analyzing the test cases based on the text parser, the target SQL keywords corresponding to the target natural language keywords are determined to generate accurate SQL statements.

3、提高查询准确性:传统的查询方式可能需要用户自己写代码或者进行多次尝试才能找到满足查询需求的SQL语句,查询效率较低。使用该方法可以根据自然语言描述的查询要求自动生成准确的SQL语句,提高查询准确性和效率。3. Improve query accuracy: The traditional query method may require the user to write code or make multiple attempts to find the SQL statement that meets the query requirements, and the query efficiency is low. Using this method, accurate SQL statements can be automatically generated according to query requirements described in natural language, thereby improving query accuracy and efficiency.

4、简化操作流程:使用该方法可以省略用户编写SQL语句的步骤,将自然语言描述的查询要求转化为SQL语句,简化了操作流程,使得用户可以更快速地完成数据库查询。4. Simplify the operation process: Using this method can omit the steps for users to write SQL statements, and convert the query requirements described in natural language into SQL statements, which simplifies the operation process and enables users to complete database queries more quickly.

5、降低学习门槛:SQL语言需要一定程度的学习和理解,而使用该方法可以使得用户不需要精通SQL语言,只需要使用自然语言描述查询要求即可生成SQL语句,降低了学习门槛。5. Lower learning threshold: SQL language requires a certain degree of learning and understanding, and using this method allows users not to be proficient in SQL language, and only needs to use natural language to describe query requirements to generate SQL statements, which lowers the learning threshold.

上述内容对本申请所提供的SQL语句自动生成方法进行了描述,为支持上述实施例的实施,本申请还提供了一种SQL语句自动生成设备,请参阅图3,本申请所提供的SQL语句自动生成设备的一个实施例包括:The above content has described the SQL statement automatic generation method provided by the application. In order to support the implementation of the above embodiments, the application also provides a SQL statement automatic generation device. Please refer to Fig. 3, the SQL statement provided by the application is automatically One embodiment of a generating device includes:

设置单元301,用于设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;The setting unit 301 is used to set the corresponding rules of the SQL statement, and the corresponding corresponding rules of the SQL statement include: the corresponding rules between natural language keywords and SQL keywords;

获取单元302,用于获取测试用例,所述测试用例为使用自然语言描述的查询要求;An acquisition unit 302, configured to acquire a test case, which is a query requirement described in natural language;

解析单元303,用于基于文本解析器解析所述测试用例得到所述测试用例所包括的目标自然语言关键词;A parsing unit 303, configured to parse the test case based on a text parser to obtain the target natural language keywords included in the test case;

确定单元304,用于基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;A determining unit 304, configured to determine a target SQL keyword corresponding to the target natural language keyword based on the SQL statement correspondence rule;

生成单元305,用于基于所述目标SQL关键词生成目标SQL语句。A generating unit 305, configured to generate a target SQL statement based on the target SQL keywords.

可选的,所述SQL语句对应规则还包括:自然语言关键词语序调整规则。Optionally, the SQL statement correspondence rule further includes: a natural language keyword sequence adjustment rule.

可选的,所述生成单元具体用于:Optionally, the generating unit is specifically used for:

基于所述自然语言关键词语序调整规则和所述目标SQL关键词生成目标SQL语句。A target SQL statement is generated based on the natural language key word order adjustment rule and the target SQL key word.

可选的,所述目标SQL语句用于查询大数据测试数据库,所述大数据测试数据库为分层结构。Optionally, the target SQL statement is used to query a big data test database, and the big data test database has a hierarchical structure.

可选的,所述SQL语句对应规则还包括:Optionally, the SQL statement corresponding rule also includes:

关键词层级设置规则,所述关键词层级设置规则基于所述大数据测试数据库的分层结构而设置;keyword level setting rules, the keyword level setting rules are set based on the hierarchical structure of the big data test database;

所述设备还包括:调整单元,用于基于所述关键词层级设置规则调整所述目标SQL语句。The device further includes: an adjustment unit, configured to adjust the target SQL statement based on the keyword level setting rule.

可选的,所述设备还包括:执行单元,用于执行所述目标SQL语句,得到查询结果和执行结果。Optionally, the device further includes: an execution unit, configured to execute the target SQL statement to obtain a query result and an execution result.

本实施例中,SQL语句自动生成设备中各单元所执行的流程与前述图1或图2所对应的实施例中描述的方法流程类似,此处不再赘述。In this embodiment, the processes executed by each unit in the device for automatically generating SQL statements are similar to the process described in the embodiment corresponding to FIG. 1 or FIG. 2 , and will not be repeated here.

图4示出了可以用来实施本申请的实施例的示例电子设备400的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。FIG. 4 shows a schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present application. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the applications described and/or claimed herein.

如图4所示,设备400包括计算单元401,其可以根据存储在只读存储器(ROM)402中的计算机程序或者从存储单元408加载到随机访问存储器(RAM)403中的计算机程序,来执行各种适当的动作和处理。在RAM 403中,还可存储设备400操作所需的各种程序和数据。计算单元401、ROM 402以及RAM 403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。As shown in FIG. 4, the device 400 includes a computing unit 401 that can execute according to a computer program stored in a read-only memory (ROM) 402 or loaded from a storage unit 408 into a random-access memory (RAM) 403. Various appropriate actions and treatments. In the RAM 403, various programs and data necessary for the operation of the device 400 can also be stored. The computing unit 401 , ROM 402 and RAM 403 are connected to each other through a bus 404 . An input/output (I/O) interface 405 is also connected to bus 404 .

设备400中的多个部件连接至I/O接口405,包括:输入单元406,例如键盘、鼠标等;输出单元407,例如各种类型的显示器、扬声器等;存储单元408,例如磁盘、光盘等;以及通信单元409,例如网卡、调制解调器、无线通信收发机等。通信单元409允许设备400通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the device 400 are connected to the I/O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, an optical disk, etc. ; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 409 allows the device 400 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.

计算单元401可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元401的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元401执行上文所描述的各个方法和处理,例如SQL语句自动生成方法。例如,在一些实施例中,可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元408。在一些实施例中,计算机程序的部分或者全部可以经由ROM 402和/或通信单元409而被载入和/或安装到设备400上。当计算机程序加载到RAM 403并由计算单元401执行时,可以执行上文描述的SQL语句自动生成方法的一个或多个步骤。备选地,在其他实施例中,计算单元401可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行SQL语句自动生成方法。The computing unit 401 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 401 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 executes various methods and processes described above, for example, a method for automatically generating SQL statements. For example, in some embodiments, may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 408 . In some embodiments, part or all of the computer program may be loaded and/or installed on the device 400 via the ROM 402 and/or the communication unit 409 . When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the method for automatically generating SQL statements described above can be executed. Alternatively, in other embodiments, the computing unit 401 may be configured in any other appropriate way (for example, by means of firmware) to execute the method for automatically generating SQL statements.

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.

用于实施本申请的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

在本申请的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.

以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、互联网和区块链网络。To implement the systems and techniques described herein in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, or a server of a distributed system, or a server combined with a blockchain.

本申请实施例还提供了一种计算机存储介质,该计算机存储介质用于储存为上述SQL语句自动生成方法所用的计算机软件指令,其包括用于执行为SQL语句自动生成方法所设计的程序。The embodiment of the present application also provides a computer storage medium, the computer storage medium is used to store the computer software instructions used for the above SQL statement automatic generation method, which includes the program designed for executing the SQL statement automatic generation method.

该SQL语句自动生成方法可以如前述图1中所描述的SQL语句自动生成方法。The method for automatically generating SQL statements may be the same as the method for automatically generating SQL statements described in FIG. 1 .

本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现上述图1图2中任意一项的SQL语句自动生成方法的流程。The embodiment of the present application also provides a computer program product, the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method for automatically generating SQL statements in any one of the above-mentioned Fig. 1 and Fig. 2 process.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,电路的等效变换,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the equivalent transformation of circuits and the division of units are only a logical function division. In actual implementation, there may be other division methods, such as multiple units or Components may be combined or integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换或改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention. Any modification, equivalent replacement or improvement made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (10)

1.一种SQL语句自动生成方法,其特征在于,包括:1. A SQL statement automatic generation method is characterized in that, comprising: 设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;The SQL statement correspondence rule is set, and the SQL statement correspondence correspondence rule comprises: the correspondence rule between the natural language keyword and the SQL keyword; 获取测试用例,所述测试用例为使用自然语言描述的查询要求;Obtain a test case, the test case is a query requirement described in natural language; 基于文本解析器解析所述测试用例,得到所述测试用例所包括的目标自然语言关键词;Analyzing the test case based on a text parser to obtain target natural language keywords included in the test case; 基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;Determine the target SQL keyword corresponding to the target natural language keyword based on the SQL statement correspondence rule; 基于所述目标SQL关键词生成目标SQL语句。A target SQL statement is generated based on the target SQL keywords. 2.根据权利要求1所述的SQL语句自动生成方法,其特征在于,所述SQL语句对应规则还包括:自然语言关键词语序调整规则。2. The method for automatically generating SQL statements according to claim 1, wherein the SQL statement corresponding rules further comprise: natural language keyword order adjustment rules. 3.根据权利要求2所述的SQL语句自动生成方法,其特征在于,所述基于所述目标SQL关键词生成目标SQL语句,包括:3. the SQL statement automatic generation method according to claim 2, is characterized in that, described target SQL statement is generated based on described target SQL keyword, comprises: 基于所述自然语言关键词语序调整规则和所述目标SQL关键词生成目标SQL语句。A target SQL statement is generated based on the natural language key word order adjustment rule and the target SQL key word. 4.根据权利要求1所述的SQL语句自动生成方法,其特征在于,所述目标SQL语句用于查询大数据测试数据库,所述大数据测试数据库为分层结构。4. The method for automatically generating SQL statements according to claim 1, wherein the target SQL statement is used to query a large data test database, and the large data test database is a hierarchical structure. 5.根据权利要求4所述的SQL语句自动生成方法,其特征在于,所述SQL语句对应规则还包括:5. the SQL statement automatic generation method according to claim 4, is characterized in that, described SQL statement correspondence rule also comprises: 关键词层级设置规则,所述关键词层级设置规则基于所述大数据测试数据库的分层结构而设置;keyword level setting rules, the keyword level setting rules are set based on the hierarchical structure of the big data test database; 所述方法还包括:The method also includes: 基于所述关键词层级设置规则调整所述目标SQL语句。The target SQL statement is adjusted based on the keyword level setting rule. 6.根据权利要求1所述的SQL语句自动生成方法,其特征在于,所述方法还包括:6. the SQL statement automatic generation method according to claim 1, is characterized in that, described method also comprises: 执行所述目标SQL语句,得到查询结果和执行结果。Execute the target SQL statement to obtain query results and execution results. 7.一种SQL语句自动生成方法,其特征在于,包括:7. A SQL statement automatic generation method is characterized in that, comprising: 设置单元,用于设置SQL语句对应规则,所述SQL语句对应对应规则包括:自然语言关键词与SQL关键词之间的对应规则;The setting unit is used to set the corresponding rules of the SQL statement, and the corresponding corresponding rules of the SQL statement include: the corresponding rules between the natural language keywords and the SQL keywords; 获取单元,用于获取测试用例,所述测试用例为使用自然语言描述的查询要求;An acquisition unit, configured to acquire a test case, where the test case is a query requirement described in natural language; 解析单元,用于基于文本解析器解析所述测试用例得到所述测试用例所包括的目标自然语言关键词;A parsing unit, configured to parse the test case based on a text parser to obtain target natural language keywords included in the test case; 确定单元,用于基于所述SQL语句对应规则确定所述目标自然语言关键词对应的目标SQL关键词;A determining unit, configured to determine a target SQL keyword corresponding to the target natural language keyword based on the SQL statement correspondence rule; 生成单元,用于基于所述目标SQL关键词生成目标SQL语句。A generating unit, configured to generate a target SQL statement based on the target SQL keyword. 8.一种SQL语句自动生成设备,其特征在于,包括:8. A SQL statement automatic generation device is characterized in that, comprising: 中央处理器,存储器,输入输出接口,有线或无线网络接口以及电源;Central processing unit, memory, input and output interfaces, wired or wireless network interface and power supply; 所述存储器为短暂存储存储器或持久存储存储器;The memory is a temporary storage memory or a persistent storage memory; 所述中央处理器配置为与所述存储器通信,在所述SQL语句自动生成设备上执行所述存储器中的指令操作以执行权利要求1至6中任意一项所述的方法。The central processing unit is configured to communicate with the memory, and the SQL statement automatic generation device executes instructions in the memory to perform the method described in any one of claims 1 to 6. 9.一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1至6中任意一项所述的方法。9. A computer-readable storage medium, characterized by comprising instructions, and when the instructions are run on a computer, the computer is made to execute the method according to any one of claims 1 to 6. 10.一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行如权利要求1至6中任意一项所述的方法。10. A computer program product comprising instructions, characterized in that when it is run on a computer, it causes the computer to execute the method according to any one of claims 1 to 6.
CN202310451434.2A 2023-04-17 2023-04-17 Automatic SQL sentence generation method and related equipment Pending CN116595029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310451434.2A CN116595029A (en) 2023-04-17 2023-04-17 Automatic SQL sentence generation method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310451434.2A CN116595029A (en) 2023-04-17 2023-04-17 Automatic SQL sentence generation method and related equipment

Publications (1)

Publication Number Publication Date
CN116595029A true CN116595029A (en) 2023-08-15

Family

ID=87589034

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310451434.2A Pending CN116595029A (en) 2023-04-17 2023-04-17 Automatic SQL sentence generation method and related equipment

Country Status (1)

Country Link
CN (1) CN116595029A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636855A (en) * 2023-09-19 2024-03-01 深圳市西迪特科技股份有限公司 Device configuration method, computer device, and computer-readable storage medium
CN117687902A (en) * 2023-11-20 2024-03-12 北京计算机技术及应用研究所 Seed mining method for fuzzy test
CN118331996A (en) * 2024-06-14 2024-07-12 科大讯飞(苏州)科技有限公司 Method and related device for converting natural language into SQL (structured query language) sentence
CN118709684A (en) * 2024-07-12 2024-09-27 深圳市元道通信技术有限公司 A method for converting text into SQL, storage medium and electronic device
CN119917531A (en) * 2024-11-18 2025-05-02 国网河北省电力有限公司信息通信分公司 A query method based on retrieval enhancement generation, electronic device, and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113779062A (en) * 2021-02-23 2021-12-10 北京沃东天骏信息技术有限公司 SQL statement generation method and device, storage medium and electronic equipment
CN114064861A (en) * 2020-07-31 2022-02-18 阿里巴巴集团控股有限公司 A method and device for generating a query statement
CN115080603A (en) * 2022-08-16 2022-09-20 广东省科技基础条件平台中心 Database query language conversion method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114064861A (en) * 2020-07-31 2022-02-18 阿里巴巴集团控股有限公司 A method and device for generating a query statement
CN113779062A (en) * 2021-02-23 2021-12-10 北京沃东天骏信息技术有限公司 SQL statement generation method and device, storage medium and electronic equipment
CN115080603A (en) * 2022-08-16 2022-09-20 广东省科技基础条件平台中心 Database query language conversion method, device, equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636855A (en) * 2023-09-19 2024-03-01 深圳市西迪特科技股份有限公司 Device configuration method, computer device, and computer-readable storage medium
CN117687902A (en) * 2023-11-20 2024-03-12 北京计算机技术及应用研究所 Seed mining method for fuzzy test
CN118331996A (en) * 2024-06-14 2024-07-12 科大讯飞(苏州)科技有限公司 Method and related device for converting natural language into SQL (structured query language) sentence
CN118709684A (en) * 2024-07-12 2024-09-27 深圳市元道通信技术有限公司 A method for converting text into SQL, storage medium and electronic device
CN119917531A (en) * 2024-11-18 2025-05-02 国网河北省电力有限公司信息通信分公司 A query method based on retrieval enhancement generation, electronic device, and device

Similar Documents

Publication Publication Date Title
US12299407B2 (en) Model training method, electronic device, and storage medium
CN116595029A (en) Automatic SQL sentence generation method and related equipment
US20210407499A1 (en) Automatically generating conference minutes
CN116737908A (en) Knowledge question-answering method, device, equipment and storage medium
US20210342348A1 (en) Method for parsing query, electronic device and readable storage medium
TW201915777A (en) Financial analysis system and method for unstructured text data
US20120158742A1 (en) Managing documents using weighted prevalence data for statements
CN111708800A (en) Inquiry method, device and electronic equipment
CN111858880B (en) Methods, devices, electronic devices and readable storage media for obtaining query results
CN113220710A (en) Data query method and device, electronic equipment and storage medium
US20250005018A1 (en) Information processing method, device, equipment and storage medium based on large language model
CN113821533A (en) Data query method, device, equipment and storage medium
CN114077646A (en) Information extraction method and device, electronic equipment and storage medium
CN118885463A (en) Database adaptation and compatibility method and device, electronic device and storage medium
CN109828775B (en) WEB management system and method for multilingual translation text content
CN118277406A (en) SQL sentence generation method and device based on large language model
CN117371406A (en) Annotation generation method, device, equipment and medium based on large language model
CN115879424A (en) Data processing method, device, equipment and storage medium
US11704094B2 (en) Data integrity analysis tool
CN114676694A (en) Method, device, equipment, medium and program product for generating business model
US11720531B2 (en) Automatic creation of database objects
US20240193161A1 (en) Reverse engineered retokenization for translation of machine interpretable languages
CN113688213B (en) Application program interface service searching system and searching method thereof
US20230342560A1 (en) Text translation method and apparatus, electronic device, and storage medium
Kochedykov et al. Conversing with databases: Practical natural language querying

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination