Aiming to improve the Structured Query Language( SQL) injection penetration test accuracy through the formalismguided test case generation,an attack purpose based attack tree model of SQL injection is proposed,and the...Aiming to improve the Structured Query Language( SQL) injection penetration test accuracy through the formalismguided test case generation,an attack purpose based attack tree model of SQL injection is proposed,and then under the guidance of this model, the formal descriptions for the SQL injection vulnerability feature and SQL injection attack inputs are established. Moreover,according to new coverage criteria,these models are instantiated and the executable test cases are generated.Experiments show that compared with the random enumerated test case used in other works,the test case generated by our method can detect the SQL injection vulnerability more effectively. Therefore,the false negative is reduced and the test accuracy is improved.展开更多
The performance and reliability of converting natural language into structured query language can be problematic in handling nuances that are prevalent in natural language. Relational databases are not designed to und...The performance and reliability of converting natural language into structured query language can be problematic in handling nuances that are prevalent in natural language. Relational databases are not designed to understand language nuance, therefore the question why we must handle nuance has to be asked. This paper is looking at an alternative solution for the conversion of a Natural Language Query into a Structured Query Language (SQL) capable of being used to search a relational database. The process uses the natural language concept, Part of Speech to identify words that can be used to identify database tables and table columns. The use of Open NLP based grammar files, as well as additional configuration files, assist in the translation from natural language to query language. Having identified which tables and which columns contain the pertinent data the next step is to create the SQL statement.展开更多
The advantage of recursive programming is that it is very easy to write and it only requires very few lines of code if done correctly.Structured query language(SQL)is a database language and is used to manipulate data...The advantage of recursive programming is that it is very easy to write and it only requires very few lines of code if done correctly.Structured query language(SQL)is a database language and is used to manipulate data.In Microsoft SQL Server 2000,recursive queries are implemented to retrieve data which is presented in a hierarchical format,but this way has its disadvantages.Common table expression(CTE)construction introduced in Microsoft SQL Server 2005 provides the significant advantage of being able to reference itself to create a recursive CTE.Hierarchical data structures,organizational charts and other parent-child table relationship reports can easily benefit from the use of recursive CTEs.The recursive query is illustrated and implemented on some simple hierarchical data.In addition,one business case study is brought forward and the solution using recursive query based on CTE is shown.At the same time,stored procedures are programmed to do the recursion in SQL.Test results show that recursive queries based on CTEs bring us the chance to create much more complex queries while retaining a much simpler syntax.展开更多
This paper presents the semantic analysis of queries written in natural language (French) and dedicated to the object oriented data bases. The studied queries include one or two nominal groups (NG) articulating around...This paper presents the semantic analysis of queries written in natural language (French) and dedicated to the object oriented data bases. The studied queries include one or two nominal groups (NG) articulating around a verb. A NG consists of one or several keywords (application dependent noun or value). Simple semantic filters are defined for identifying these keywords which can be of semantic value: class, simple attribute, composed attribute, key value or not key value. Coherence rules and coherence constraints are introduced, to check the validity of the co-occurrence of two consecutive nouns in complex NG. If a query is constituted of a single NG, no further analysis is required. Otherwise, if a query covers two valid NG, it is a subject of studying the semantic coherence of the verb and both NG which are attached to it.展开更多
With the rapid development of artificial intelligence, large language models (LLMs) have demonstrated remarkable capabilities in natural language understanding and generation. These models have great potential to enha...With the rapid development of artificial intelligence, large language models (LLMs) have demonstrated remarkable capabilities in natural language understanding and generation. These models have great potential to enhance database query systems, enabling more intuitive and semantic query mechanisms. Our model leverages LLM’s deep learning architecture to interpret and process natural language queries and translate them into accurate database queries. The system integrates an LLM-powered semantic parser that translates user input into structured queries that can be understood by the database management system. First, the user query is pre-processed, the text is normalized, and the ambiguity is removed. This is followed by semantic parsing, where the LLM interprets the pre-processed text and identifies key entities and relationships. This is followed by query generation, which converts the parsed information into a structured query format and tailors it to the target database schema. Finally, there is query execution and feedback, where the resulting query is executed on the database and the results are returned to the user. The system also provides feedback mechanisms to improve and optimize future query interpretations. By using advanced LLMs for model implementation and fine-tuning on diverse datasets, the experimental results show that the proposed method significantly improves the accuracy and usability of database queries, making data retrieval easy for users without specialized knowledge.展开更多
Text2SQL技术通过减少非专业用户与关系数据库交互的技术障碍,已发展为数据分析和数据库管理的重要工具.以GPT为代表的大语言模型(large language model,LLM)的引入,进一步提升了Text2SQL系统的性能.然而,由于空间数据涉及复杂的几何关...Text2SQL技术通过减少非专业用户与关系数据库交互的技术障碍,已发展为数据分析和数据库管理的重要工具.以GPT为代表的大语言模型(large language model,LLM)的引入,进一步提升了Text2SQL系统的性能.然而,由于空间数据涉及复杂的几何关系、多样化的查询类型和对高精度语义理解的需求,现有的Text2SQL技术难以直接适用于空间数据库领域.为了解决上述问题,降低普通用户与空间数据库的交互门槛,提出了面向空间数据库的自然语言查询(natural language query,NLQ)转换方法.该方法有两个核心阶段:(1)自然语言理解;(2)可执行语言生成.在阶段(1)中使用实体信息提取算法提取关键查询实体,并基于大语言模型构建空间数据查询语料库进而确定查询类型.在阶段(2)中根据查询类型选择结构化语言模型(structured language model,SLM),然后将实体映射到结构化语言模型中,得到最终的空间数据库可执行语言.在多组真实数据集上的实验结果表明,该方法可以实现从用户的自然语言查询到空间数据库可执行语言的高效转换.展开更多
大语言模型(large language model,LLM)为数据库性能带来了极大的提升,将LLM与数据库相结合成为当前的研究热点。然而,目前大部分高校数据库实验课程仍停留于数据库基础操作层面,学生普遍缺乏数据库前沿技术相关知识。文本转结构化查询...大语言模型(large language model,LLM)为数据库性能带来了极大的提升,将LLM与数据库相结合成为当前的研究热点。然而,目前大部分高校数据库实验课程仍停留于数据库基础操作层面,学生普遍缺乏数据库前沿技术相关知识。文本转结构化查询语言(text to structured query language,Text-to-SQL)技术为基于LLM的数据库设计的重要研究方向之一。首先,设计实验课程系统地介绍基于LLM的Text-to-SQL方法的教学意义,以盘古大模型为例对实验课程相关技术进行介绍;其次,分析并划定基于LLM的数据库设计实验课程的教学目标,阐述具体的教学设计和实施;最后,对教学方法设计的各方面进行系统总结。展开更多
为了解决铁路自然灾害监测系统数据查询模式单一、灵活度不足、用户友好度欠佳等问题。文章采用基于大语言模型(LLM,Large Language Model)的多智能体技术,对其查询功能进行优化。文章设计了工点数据、传感器数据及预警数据等3类核心业...为了解决铁路自然灾害监测系统数据查询模式单一、灵活度不足、用户友好度欠佳等问题。文章采用基于大语言模型(LLM,Large Language Model)的多智能体技术,对其查询功能进行优化。文章设计了工点数据、传感器数据及预警数据等3类核心业务数据查询智能体,并采用集中式架构组成多智能体网络,实现基于自然语言的铁路自然灾害监测系统数据查询功能,为用户提供了数据查询的人机交互新模式。在保证原有监测系统架构与核心功能稳定运行的前提下,这种新型数据查询功能有效简化了该系统数据查询的操作流程,显著提高数据查询功能的灵活度与结果展示的友好性,可为LLM与多智能体技术在铁路信息系统的应用提供实践参考。展开更多
基金National Natural Science Foundation of China(No.51274150)Tianjin Major Project of Application Foundation and Advanced Technology,China(No.12JCZDJC27800)
文摘Aiming to improve the Structured Query Language( SQL) injection penetration test accuracy through the formalismguided test case generation,an attack purpose based attack tree model of SQL injection is proposed,and then under the guidance of this model, the formal descriptions for the SQL injection vulnerability feature and SQL injection attack inputs are established. Moreover,according to new coverage criteria,these models are instantiated and the executable test cases are generated.Experiments show that compared with the random enumerated test case used in other works,the test case generated by our method can detect the SQL injection vulnerability more effectively. Therefore,the false negative is reduced and the test accuracy is improved.
文摘The performance and reliability of converting natural language into structured query language can be problematic in handling nuances that are prevalent in natural language. Relational databases are not designed to understand language nuance, therefore the question why we must handle nuance has to be asked. This paper is looking at an alternative solution for the conversion of a Natural Language Query into a Structured Query Language (SQL) capable of being used to search a relational database. The process uses the natural language concept, Part of Speech to identify words that can be used to identify database tables and table columns. The use of Open NLP based grammar files, as well as additional configuration files, assist in the translation from natural language to query language. Having identified which tables and which columns contain the pertinent data the next step is to create the SQL statement.
文摘The advantage of recursive programming is that it is very easy to write and it only requires very few lines of code if done correctly.Structured query language(SQL)is a database language and is used to manipulate data.In Microsoft SQL Server 2000,recursive queries are implemented to retrieve data which is presented in a hierarchical format,but this way has its disadvantages.Common table expression(CTE)construction introduced in Microsoft SQL Server 2005 provides the significant advantage of being able to reference itself to create a recursive CTE.Hierarchical data structures,organizational charts and other parent-child table relationship reports can easily benefit from the use of recursive CTEs.The recursive query is illustrated and implemented on some simple hierarchical data.In addition,one business case study is brought forward and the solution using recursive query based on CTE is shown.At the same time,stored procedures are programmed to do the recursion in SQL.Test results show that recursive queries based on CTEs bring us the chance to create much more complex queries while retaining a much simpler syntax.
文摘This paper presents the semantic analysis of queries written in natural language (French) and dedicated to the object oriented data bases. The studied queries include one or two nominal groups (NG) articulating around a verb. A NG consists of one or several keywords (application dependent noun or value). Simple semantic filters are defined for identifying these keywords which can be of semantic value: class, simple attribute, composed attribute, key value or not key value. Coherence rules and coherence constraints are introduced, to check the validity of the co-occurrence of two consecutive nouns in complex NG. If a query is constituted of a single NG, no further analysis is required. Otherwise, if a query covers two valid NG, it is a subject of studying the semantic coherence of the verb and both NG which are attached to it.
文摘With the rapid development of artificial intelligence, large language models (LLMs) have demonstrated remarkable capabilities in natural language understanding and generation. These models have great potential to enhance database query systems, enabling more intuitive and semantic query mechanisms. Our model leverages LLM’s deep learning architecture to interpret and process natural language queries and translate them into accurate database queries. The system integrates an LLM-powered semantic parser that translates user input into structured queries that can be understood by the database management system. First, the user query is pre-processed, the text is normalized, and the ambiguity is removed. This is followed by semantic parsing, where the LLM interprets the pre-processed text and identifies key entities and relationships. This is followed by query generation, which converts the parsed information into a structured query format and tailors it to the target database schema. Finally, there is query execution and feedback, where the resulting query is executed on the database and the results are returned to the user. The system also provides feedback mechanisms to improve and optimize future query interpretations. By using advanced LLMs for model implementation and fine-tuning on diverse datasets, the experimental results show that the proposed method significantly improves the accuracy and usability of database queries, making data retrieval easy for users without specialized knowledge.
文摘Text2SQL技术通过减少非专业用户与关系数据库交互的技术障碍,已发展为数据分析和数据库管理的重要工具.以GPT为代表的大语言模型(large language model,LLM)的引入,进一步提升了Text2SQL系统的性能.然而,由于空间数据涉及复杂的几何关系、多样化的查询类型和对高精度语义理解的需求,现有的Text2SQL技术难以直接适用于空间数据库领域.为了解决上述问题,降低普通用户与空间数据库的交互门槛,提出了面向空间数据库的自然语言查询(natural language query,NLQ)转换方法.该方法有两个核心阶段:(1)自然语言理解;(2)可执行语言生成.在阶段(1)中使用实体信息提取算法提取关键查询实体,并基于大语言模型构建空间数据查询语料库进而确定查询类型.在阶段(2)中根据查询类型选择结构化语言模型(structured language model,SLM),然后将实体映射到结构化语言模型中,得到最终的空间数据库可执行语言.在多组真实数据集上的实验结果表明,该方法可以实现从用户的自然语言查询到空间数据库可执行语言的高效转换.
文摘大语言模型(large language model,LLM)为数据库性能带来了极大的提升,将LLM与数据库相结合成为当前的研究热点。然而,目前大部分高校数据库实验课程仍停留于数据库基础操作层面,学生普遍缺乏数据库前沿技术相关知识。文本转结构化查询语言(text to structured query language,Text-to-SQL)技术为基于LLM的数据库设计的重要研究方向之一。首先,设计实验课程系统地介绍基于LLM的Text-to-SQL方法的教学意义,以盘古大模型为例对实验课程相关技术进行介绍;其次,分析并划定基于LLM的数据库设计实验课程的教学目标,阐述具体的教学设计和实施;最后,对教学方法设计的各方面进行系统总结。
文摘为了解决铁路自然灾害监测系统数据查询模式单一、灵活度不足、用户友好度欠佳等问题。文章采用基于大语言模型(LLM,Large Language Model)的多智能体技术,对其查询功能进行优化。文章设计了工点数据、传感器数据及预警数据等3类核心业务数据查询智能体,并采用集中式架构组成多智能体网络,实现基于自然语言的铁路自然灾害监测系统数据查询功能,为用户提供了数据查询的人机交互新模式。在保证原有监测系统架构与核心功能稳定运行的前提下,这种新型数据查询功能有效简化了该系统数据查询的操作流程,显著提高数据查询功能的灵活度与结果展示的友好性,可为LLM与多智能体技术在铁路信息系统的应用提供实践参考。