CN113220710B - Data query method, device, electronic device and storage medium - Google Patents
Data query method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN113220710B CN113220710B CN202110514766.1A CN202110514766A CN113220710B CN 113220710 B CN113220710 B CN 113220710B CN 202110514766 A CN202110514766 A CN 202110514766A CN 113220710 B CN113220710 B CN 113220710B
- Authority
- CN
- China
- Prior art keywords
- database
- query
- query statement
- data
- target
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本公开提供了数据查询方法、装置、电子设备以及存储介质,涉及数据处理技术领域,尤其涉及智能搜索领域。具体实现方案为:获取用于查询目标数据的初始查询信息;对初始查询信息进行解析,得到适用于查询目标数据的数据库查询语句,其中,数据库查询语句为第一查询语句或第二查询语句;在数据库查询语句为第一查询语句的情况下,根据第一查询语句从第一数据库中查询目标数据;以及在数据库查询语句为第二查询语句的情况下,根据第二查询语句从第二数据库中查询目标数据。
The present disclosure provides a data query method, device, electronic device and storage medium, which relate to the field of data processing technology, and in particular to the field of intelligent search. The specific implementation scheme is: obtaining initial query information for querying target data; parsing the initial query information to obtain a database query statement suitable for querying the target data, wherein the database query statement is a first query statement or a second query statement; when the database query statement is the first query statement, querying the target data from the first database according to the first query statement; and when the database query statement is the second query statement, querying the target data from the second database according to the second query statement.
Description
技术领域Technical Field
本公开涉及数据处理技术领域,尤其涉及智能搜索领域。The present disclosure relates to the field of data processing technology, and in particular to the field of intelligent search.
背景技术Background technique
数据库,又称为数据管理系统,是处理的数据按照一定的方式储存在一起,能够让多个用户共享、尽可能减小冗余度的数据集合。一个数据库可以由多个数据表空间构成,用户可以对文件中的资料运行新增、截取、更新、删除等操作。A database, also known as a data management system, is a collection of data that is processed and stored in a certain way so that it can be shared by multiple users and with minimal redundancy. A database can consist of multiple data table spaces, and users can perform operations such as adding, extracting, updating, and deleting data in the file.
发明内容Summary of the invention
本公开提供了一种数据查询方法、装置、电子设备、存储介质和计算机程序产品。The present disclosure provides a data query method, device, electronic device, storage medium and computer program product.
根据本公开的一方面,提供了一种数据查询方法,包括:获取用于查询目标数据的初始查询信息;对所述初始查询信息进行解析,得到适用于查询所述目标数据的数据库查询语句,其中,所述数据库查询语句为第一查询语句或第二查询语句;在所述数据库查询语句为所述第一查询语句的情况下,根据所述第一查询语句从第一数据库中查询所述目标数据;以及在所述数据库查询语句为第二查询语句的情况下,根据所述第二查询语句从第二数据库中查询所述目标数据。According to one aspect of the present disclosure, a data query method is provided, comprising: acquiring initial query information for querying target data; parsing the initial query information to obtain a database query statement suitable for querying the target data, wherein the database query statement is a first query statement or a second query statement; when the database query statement is the first query statement, querying the target data from a first database according to the first query statement; and when the database query statement is the second query statement, querying the target data from a second database according to the second query statement.
根据本公开的另一方面,提供了一种数据查询装置,包括:第一获取模块,用于获取用于查询目标数据的初始查询信息;解析模块,用于对所述初始查询信息进行解析,得到适用于查询所述目标数据的数据库查询语句,其中,所述数据库查询语句为第一查询语句或第二查询语句;第一查询模块,用于在所述数据库查询语句为所述第一查询语句的情况下,根据所述第一查询语句从第一数据库中查询所述目标数据;以及第二查询模块,用于在所述数据库查询语句为第二查询语句的情况下,根据所述第二查询语句从第二数据库中查询所述目标数据。According to another aspect of the present disclosure, a data query device is provided, including: a first acquisition module, used to acquire initial query information for querying target data; a parsing module, used to parse the initial query information to obtain a database query statement suitable for querying the target data, wherein the database query statement is a first query statement or a second query statement; a first query module, used to query the target data from a first database according to the first query statement when the database query statement is the first query statement; and a second query module, used to query the target data from a second database according to the second query statement when the database query statement is the second query statement.
根据本公开的另一方面,提供了一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上所述的方法。According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行如上所述的方法。According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method as described above.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如上所述的方法。According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method described above when executed by a processor.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
图1示意性示出了根据本公开实施例的可以应用数据查询方法及装置的示例性系统架构;FIG1 schematically shows an exemplary system architecture to which a data query method and apparatus can be applied according to an embodiment of the present disclosure;
图2示意性示出了根据本公开实施例的数据查询方法的流程图;FIG2 schematically shows a flow chart of a data query method according to an embodiment of the present disclosure;
图3示意性示出了根据本公开实施例的数据查询方法的另一流程图;FIG3 schematically shows another flow chart of a data query method according to an embodiment of the present disclosure;
图4示意性示出了根据本公开实施例的数据查询方法的一种示例流程图;FIG4 schematically shows an example flow chart of a data query method according to an embodiment of the present disclosure;
图5示意性示出了根据本公开实施例的数据维护服务的数据维护流程图;FIG5 schematically shows a data maintenance flow chart of a data maintenance service according to an embodiment of the present disclosure;
图6示意性示出了根据本公开实施例的数据查询系统的架构图;FIG6 schematically shows an architecture diagram of a data query system according to an embodiment of the present disclosure;
图7示意性示出了根据本公开实施例的数据查询装置的框图;以及FIG7 schematically shows a block diagram of a data query device according to an embodiment of the present disclosure; and
图8示出了可以用来实施本公开的实施例的示例电子设备的示意性框图。FIG8 shows a schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
随着科学技术的发展,以及互联网信息、人工智能、大数据等的普及,越来越多的数据交互通过线上来完成。线上数据交互需要庞大的优质资源库。为了满足数据资源的多语义的查询,需要对数据建立大量的字段来保存数据各个维度的信息,因此每条数据通常会具有100条以上的属性。With the development of science and technology, as well as the popularization of Internet information, artificial intelligence, and big data, more and more data interactions are completed online. Online data interaction requires a huge library of high-quality resources. In order to meet the multi-semantic query of data resources, a large number of fields need to be established for the data to save information in various dimensions of the data. Therefore, each piece of data usually has more than 100 attributes.
图数据库是以图这种数据结构存储和查询数据的数据库,最小单位是每条数据,数据互相之间有边维护关系。图数据库与其他数据库不同之处在于,关系在图数据库中占首要地位,图数据库通过对数据间关系的维护来维护整体的数据资源。A graph database is a database that stores and queries data in a graph data structure. The smallest unit is each piece of data, and there are edges between the data. The difference between a graph database and other databases is that relationships play a primary role in a graph database. A graph database maintains the overall data resources by maintaining the relationships between data.
ES(ElasticSearch,一种开源高扩展的分布式全文检索引擎)数据库通过倒排索引(Inverted Index)来维护多条数据。其中以一个索引index作为一个数据库,最小单位是每条数据,且每条数据互相之间相互独立。倒排索引是指这种索引表中的每一项都包括一个属性值和具有该属性值的各记录的地址,由属性值来确定记录的地址,而不是由记录来确定属性值,因此被称为倒排索引。ES (ElasticSearch, an open source, highly scalable distributed full-text search engine) database maintains multiple data through an inverted index. An index is used as a database, and the smallest unit is each data, and each data is independent of each other. An inverted index means that each item in the index table includes an attribute value and the address of each record with the attribute value. The address of the record is determined by the attribute value, rather than the record determining the attribute value, so it is called an inverted index.
发明人在实现本公开构思的过程中发现,利用图数据库存储数据,由于仅能通过图的遍历查询数据,导致不方便维护,并且不支持倒排查询,在数据量较大时会明显降低查询性能。此外,使用图数据库需要学习专门的图查询语言,导致开发者的学习成本和使用成本过大。In the process of implementing the concept of the present disclosure, the inventors found that using a graph database to store data is inconvenient to maintain because data can only be queried by traversing the graph, and does not support reverse query, which significantly reduces query performance when the amount of data is large. In addition, using a graph database requires learning a specialized graph query language, which results in excessive learning and usage costs for developers.
此外,虽然使用ES存储支持倒排查询,比较灵活,但是因为ES存储的数据之间相互独立,在需要查询某些关系时,需要进行二次甚至多次查询,对服务的上游调用方来说,很容易因为查询时间过长导致查询请求失败。In addition, although ES storage supports reverse query and is relatively flexible, because the data stored in ES are independent of each other, when certain relationships need to be queried, a second or even multiple queries are required. For the upstream caller of the service, it is easy for the query request to fail due to the long query time.
图1示意性示出了根据本公开实施例的可以应用数据查询方法及装置的示例性系统架构。FIG1 schematically shows an exemplary system architecture to which a data query method and apparatus according to an embodiment of the present disclosure can be applied.
需要注意的是,图1所示仅为可以应用本公开实施例的系统架构的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。It should be noted that FIG. 1 is merely an example of a system architecture to which an embodiment of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiment of the present disclosure cannot be used in other devices, systems, environments or scenarios.
如图1所示,根据该实施例的系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线和/或无线通信链路等等。As shown in Fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, etc.
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如知识阅读类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端和/或社交平台软件等(仅为示例)。Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients and/or social platform software, etc. (only as examples).
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
服务器105可以是提供各种服务的服务器,例如对用户利用终端设备101、102、103所浏览的内容提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的用户请求等数据进行分析等处理,并将处理结果(例如根据用户请求获取或生成的网页、信息、或数据等)反馈给终端设备。服务器也可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务(″VirtualPrivate Server″,或简称″VPS″)中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器Server 105 can be a server that provides various services, such as a background management server that provides support for the content browsed by users using terminal devices 101, 102, and 103 (only as an example). The background management server can analyze and process the received data such as user requests, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests, etc.) to the terminal device. The server can also be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system. It solves the problems of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server can also be a server for a distributed system, or a server combined with blockchain.
需要说明的是,本公开实施例所提供的数据查询方法一般可以由终端设备101、102、或103执行。相应地,本公开实施例所提供的数据查询装置也可以设置于终端设备101、102、或103中。It should be noted that the data query method provided in the embodiment of the present disclosure can generally be executed by the terminal device 101, 102, or 103. Accordingly, the data query device provided in the embodiment of the present disclosure can also be set in the terminal device 101, 102, or 103.
或者,本公开实施例所提供的数据查询方法一般也可以由服务器105执行。相应地,本公开实施例所提供的数据查询装置一般可以设置于服务器105中。本公开实施例所提供的数据查询方法也可以由不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的数据查询装置也可以设置于不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群中。Alternatively, the data query method provided in the embodiment of the present disclosure may also be generally executed by the server 105. Accordingly, the data query device provided in the embodiment of the present disclosure may generally be arranged in the server 105. The data query method provided in the embodiment of the present disclosure may also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the data query device provided in the embodiment of the present disclosure may also be arranged in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and/or the server 105.
例如,在用户需要查询目标数据时,用户可以在终端设备101、102、103的搜索框中输入用于查询该目标数据的初始查询信息。终端设备101、102、103可以获取该初始查询信息,然后将获取的该初始查询信息发送给服务器105,由服务器105对该初始查询信息进行解析,得到用于查询该目标数据的数据库查询语句,以便于根据该数据库查询语句从相应的数据库中查询到该目标数据。或者由能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群对初始查询信息进行解析,并根据解析得到的数据库查询语句查询目标数据。For example, when a user needs to query target data, the user can enter initial query information for querying the target data in the search box of the terminal device 101, 102, 103. The terminal device 101, 102, 103 can obtain the initial query information, and then send the obtained initial query information to the server 105, and the server 105 parses the initial query information to obtain a database query statement for querying the target data, so as to query the target data from the corresponding database according to the database query statement. Alternatively, a server or server cluster that can communicate with the terminal device 101, 102, 103 and/or the server 105 parses the initial query information, and queries the target data according to the database query statement obtained by the parsing.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the number of terminal devices, networks and servers in Figure 1 is only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
图2示意性示出了根据本公开实施例的数据查询方法的流程图。FIG2 schematically shows a flow chart of a data query method according to an embodiment of the present disclosure.
如图2所示,该方法包括操作S210~S240。As shown in FIG. 2 , the method includes operations S210 to S240 .
在操作S210,获取用于查询目标数据的初始查询信息。In operation S210, initial query information for querying target data is acquired.
在操作S220,对初始查询信息进行解析,得到适用于查询目标数据的数据库查询语句。其中,数据库查询语句为第一查询语句或第二查询语句。In operation S220, the initial query information is parsed to obtain a database query statement suitable for querying the target data, wherein the database query statement is a first query statement or a second query statement.
在操作S230,在数据库查询语句为第一查询语句的情况下,根据第一查询语句从第一数据库中查询目标数据。In operation S230 , when the database query statement is a first query statement, target data is queried from a first database according to the first query statement.
在操作S240,在数据库查询语句为第二查询语句的情况下,根据第二查询语句从第二数据库中查询目标数据。In operation S240, when the database query statement is a second query statement, target data is queried from a second database according to the second query statement.
根据本公开的实施例,目标数据可以为用户想要获得的存储于后台数据库中的数据,后台数据库可以包括上述第一数据库和第二数据库,第一数据库和第二数据库可以包括各种关系型数据库和非关系型数据库等其中任意两者。例如,第一数据库和第二数据库可以包括MySQL(一种小型的开源的关系型数据库管理系统)、SQL Server(一种关系数据库管理系统)、Oracle(目前流行的关系数据库管理系统)、DB2(一种关系型数据库平台)、Redis(一种键值存储数据库)、HBase(一种分布式的、面向列的开源数据库)、MongoDB(一种面向文档的开源数据库)、ES、Neo4j(图数据库)等其中任意两者。According to an embodiment of the present disclosure, the target data may be data that a user wants to obtain and is stored in a background database, and the background database may include the first database and the second database described above, and the first database and the second database may include any two of various relational databases and non-relational databases. For example, the first database and the second database may include any two of MySQL (a small open source relational database management system), SQL Server (a relational database management system), Oracle (a currently popular relational database management system), DB2 (a relational database platform), Redis (a key-value storage database), HBase (a distributed, column-oriented open source database), MongoDB (a document-oriented open source database), ES, Neo4j (graph database), etc.
根据本公开的实施例,后台数据库可以不仅限于两种数据库,在实际应用中,后台数据库还可以包括更多种数据库的组合。同时,为保证数据存储的完整性,以及数据查询的有效性,后台数据库例如可以为关系型数据库和非关系型数据库的组合,例如还可以为图数据库和非图数据库的组合等。According to the embodiments of the present disclosure, the backend database may not be limited to two types of databases. In practical applications, the backend database may also include a combination of more types of databases. At the same time, to ensure the integrity of data storage and the effectiveness of data query, the backend database may be, for example, a combination of a relational database and a non-relational database, for example, a combination of a graph database and a non-graph database, etc.
根据本公开的实施例,初始查询信息例如为用户输入搜索框中的信息,用于查询目标数据。According to an embodiment of the present disclosure, the initial query information is, for example, information input by a user into a search box, which is used to query target data.
根据本公开的实施例,数据库查询语句例如为搜索引擎响应于初始查询信息进行数据查询时所使用的语句。该语句例如可以为程序化语句,包括结构化查询语句和图查询语句等。例如,在第一数据库和第二数据库为图数据库和非图数据库的组合的情况下,第一查询语句和第二查询语句可以为图查询语句和结构化查询语句。According to an embodiment of the present disclosure, a database query statement is, for example, a statement used by a search engine when performing a data query in response to initial query information. The statement may be, for example, a programmatic statement, including a structured query statement and a graph query statement. For example, in a case where the first database and the second database are a combination of a graph database and a non-graph database, the first query statement and the second query statement may be a graph query statement and a structured query statement.
根据本公开的实施例,在后台数据库为第一数据库和第二数据库的情况下,可以从第一查询语句和第二查询语句两者中确定适用于查询目标数据的数据库查询语句。在后台数据库包括多个数据库的情况下,可以从用于查询该多个数据库的查询语句中确定适用于查询目标数据的数据库查询语句。确定的数据库查询语句可以为可选择的所有查询方式中查询效率最快的一种查询语句。According to an embodiment of the present disclosure, when the backend database is a first database and a second database, a database query statement suitable for querying the target data can be determined from the first query statement and the second query statement. When the backend database includes multiple databases, a database query statement suitable for querying the target data can be determined from the query statements used to query the multiple databases. The determined database query statement can be a query statement with the fastest query efficiency among all selectable query methods.
需要说明的是,以上实施例仅是示例性实施例,但不限于此,还可以包括本领域已知的其他数据查询方法,只要能够实现数据查询即可。It should be noted that the above embodiments are merely exemplary embodiments, but are not limited thereto, and may also include other data query methods known in the art, as long as data query can be implemented.
通过本公开的上述实施例,由于通过解析初始查询信息可以得到适用于查询目标数据的数据库查询语句,可以利用适用于查询目标数据的数据库查询语句,从对应的数据库中进行数据查询,能够至少部分的解决单类型的数据存储方式在需要进行数据查询时查询效率不高的技术问题,进而提高数据查询效率。Through the above-mentioned embodiments of the present disclosure, since a database query statement suitable for querying the target data can be obtained by parsing the initial query information, the database query statement suitable for querying the target data can be used to perform data query from the corresponding database, which can at least partially solve the technical problem of low query efficiency of a single type of data storage method when data query is needed, thereby improving data query efficiency.
下面结合具体实施例,并参考图3~图6,对图2所示的数据查询方法做进一步说明。The data query method shown in FIG. 2 is further described below in conjunction with specific embodiments and with reference to FIGS. 3 to 6 .
根据本公开的实施例,有鉴于图数据库在进行关系查询时性能较高的优势,以及ES存储支持倒排索引的优势,例如可以结合图数据库和ES存储构建一个数据查询系统。例如,第一数据库可以为图数据库,第二数据库可以为分布式搜索引擎数据库,分布式搜索引擎数据库例如为ES数据库等。According to the embodiments of the present disclosure, in view of the advantages of the graph database in terms of high performance when performing relational queries, and the advantages of the ES storage in supporting inverted indexes, for example, a data query system can be constructed by combining the graph database and the ES storage. For example, the first database can be a graph database, and the second database can be a distributed search engine database, such as an ES database.
通过本公开的上述实施例,可以综合图数据库和ES数据库的优势,提高数据查询效率。Through the above-mentioned embodiments of the present disclosure, the advantages of the graph database and the ES database can be combined to improve data query efficiency.
根据本公开的实施例,初始查询信息包括文本信息。对初始查询信息进行解析,得到适用于查询目标数据的数据库查询语句包括:对文本信息进行分词处理,得到用于表征文本信息的至少一个关键词。获取与该至少一个关键词相匹配的目标查询语句。将目标查询语句作为数据库查询语句。According to an embodiment of the present disclosure, the initial query information includes text information. Parsing the initial query information to obtain a database query statement suitable for querying target data includes: performing word segmentation processing on the text information to obtain at least one keyword for characterizing the text information. Obtaining a target query statement that matches the at least one keyword. Using the target query statement as a database query statement.
根据本公开的实施例,以文本信息为“定风波的作者的朝代”为例,通过对文本信息进行分词处理,得到的至少一个关键词可以为“定风波”、“作者”、“朝代”。目标查询语句可以为与“定风波”、“作者”、“朝代”这三个关键词均匹配的查询语句。例如,目标查询语句可以为同时包含有“诗词”、“作者”、“朝代”这三个变量信息的查询语句。According to an embodiment of the present disclosure, taking the text information "dynasty of the author of Ding Fengbo" as an example, by performing word segmentation processing on the text information, at least one keyword obtained may be "Ding Fengbo", "author", and "dynasty". The target query statement may be a query statement that matches the three keywords "Ding Fengbo", "author", and "dynasty". For example, the target query statement may be a query statement that contains the three variable information "poem", "author", and "dynasty" at the same time.
通过本公开的上述实施例,根据对文本信息分词得到的关键词确定数据库查询语句,能够选取到更为合适的查询语句,来实现对目标数据的查询,有利于查询性能的提高。Through the above-mentioned embodiments of the present disclosure, a database query statement is determined according to keywords obtained by segmenting text information, and a more appropriate query statement can be selected to implement the query of target data, which is conducive to improving the query performance.
根据本公开的实施例,上述至少一个关键词可以包括N个关键词,N为大于1的整数。获取与至少一个关键词相匹配的目标查询语句可以包括:在获取到与N个关键词均匹配的全匹配查询语句的情况下,将该全匹配查询语句作为目标查询语句。在未获取到与N个关键词均匹配的查询语句的情况下:从N个关键词中选择i个目标关键词,以及获取与i个目标关键词均匹配的查询语句作为目标查询语句,其中,1≤i<N。According to an embodiment of the present disclosure, the at least one keyword may include N keywords, where N is an integer greater than 1. Obtaining a target query statement that matches at least one keyword may include: in the case where a full match query statement that matches all N keywords is obtained, using the full match query statement as the target query statement. In the case where a query statement that matches all N keywords is not obtained: selecting i target keywords from the N keywords, and obtaining a query statement that matches all i target keywords as the target query statement, where 1≤i<N.
根据本公开的实施例,以至少一个关键词为“定风波”、“作者”、“朝代”为例,可以确定此时的N取值为3,全匹配查询语句可以为上述的同时包含有“诗词”、“作者”、“朝代”这三个变量信息的查询语句。在该三个关键词未能匹配到该全匹配查询语句的情况下,可以从该三个关键词中选择两个关键词再次匹配。例如,可以选择“定风波”、“作者”这两个词作为目标关键词,此时的全匹配查询语句可以为包含有“诗词”、“作者”这两个变量信息的查询语句。类似地,在未能获取到与任意两个目标关键词相匹配的全匹配查询语句的情况下,可以继续缩减关键词个数。例如,可以选择“定风波”作为目标关键词,并获取包含有“诗词”这一变量信息的查询语句作为目标查询语句。According to an embodiment of the present disclosure, taking at least one keyword as "Ding Fengbo", "author", and "dynasty" as an example, it can be determined that the value of N at this time is 3, and the full match query statement can be the above-mentioned query statement that contains the three variable information of "poetry", "author", and "dynasty" at the same time. In the case that the three keywords fail to match the full match query statement, two keywords can be selected from the three keywords to match again. For example, the two words "Ding Fengbo" and "author" can be selected as target keywords, and the full match query statement at this time can be a query statement containing the two variable information of "poetry" and "author". Similarly, in the case that a full match query statement that matches any two target keywords cannot be obtained, the number of keywords can continue to be reduced. For example, "Ding Fengbo" can be selected as the target keyword, and a query statement containing the variable information of "poetry" can be obtained as the target query statement.
通过本公开的上述实施例,在基于关键词确定查询语句的过程中,可以通过缩减关键词个数确定目标查询语句,从而能够有效确定最为合适的数据库查询语句,为目标数据的查询过程提供有效合理的保障。Through the above-mentioned embodiments of the present disclosure, in the process of determining query statements based on keywords, the target query statement can be determined by reducing the number of keywords, so that the most appropriate database query statement can be effectively determined, providing effective and reasonable guarantees for the query process of target data.
图3示意性示出了根据本公开实施例的数据查询方法的另一流程图。FIG3 schematically shows another flow chart of the data query method according to an embodiment of the present disclosure.
如图3所示,该方法包括操作S310~S370。As shown in FIG. 3 , the method includes operations S310 to S370 .
在操作S310,获取用于查询目标数据的初始查询信息。In operation S310, initial query information for querying target data is acquired.
在操作S320,对初始查询信息进行解析,得到适用于查询目标数据的数据库查询语句。其中,数据库查询语句为第一查询语句或第二查询语句。In operation S320, the initial query information is parsed to obtain a database query statement suitable for querying the target data, wherein the database query statement is a first query statement or a second query statement.
在操作S330,获取数据库查询语句的格式。In operation S330, the format of the database query statement is obtained.
在操作S340,在格式与第一数据库的查询语法的格式相匹配的情况下,确定数据库查询语句为第一查询语句。In operation S340 , when the format matches the format of the query grammar of the first database, it is determined that the database query statement is a first query statement.
在操作S350,根据第一查询语句从第一数据库中查询目标数据。In operation S350, target data is queried from a first database according to a first query statement.
在操作S360,在格式与第二数据库的查询语法的格式相匹配的情况下,确定数据库查询语句为第二查询语句。In operation S360, when the format matches the format of the query grammar of the second database, it is determined that the database query statement is a second query statement.
在操作S370,根据第二查询语句从第二数据库中查询目标数据。In operation S370, target data is queried from the second database according to the second query statement.
根据本公开的实施例,由于在从不同数据库中查询数据时,需要结合相适配的查询语句来实现快捷查询,因此,在获取到数据库查询语句后,可以通过判断数据库查询语句的语法格式来确定需要查询的数据库的类型。例如,数据库查询语句为结构化查询语句,语法格式为JSON(一种轻量级的数据交换格式),则可以确定需要查询的数据库例如为ES数据库。再如,数据库查询语句为图查询语句,语法格式为gremlin(一种图查询语言),则可以确定需要查询的数据库为图数据库。According to an embodiment of the present disclosure, when querying data from different databases, it is necessary to combine compatible query statements to achieve quick query. Therefore, after obtaining the database query statement, the type of database to be queried can be determined by judging the syntax format of the database query statement. For example, if the database query statement is a structured query statement and the syntax format is JSON (a lightweight data exchange format), it can be determined that the database to be queried is, for example, an ES database. For another example, if the database query statement is a graph query statement and the syntax format is gremlin (a graph query language), it can be determined that the database to be queried is a graph database.
需要说明的是,关于该实施例中的其余技术特征在前述实施例中已有描述,在此不再赘述。It should be noted that the remaining technical features in this embodiment have been described in the previous embodiments and will not be repeated here.
通过本公开的上述实施例,由于针对用于查询目标数据的初始查询信息,在进行查询过程中可自行适配最适用于查询该目标数据的查询方式,由此在实现智能化查询的同时,还可有效提升查询性能。Through the above-mentioned embodiments of the present disclosure, since the initial query information used to query the target data can automatically adapt the query method most suitable for querying the target data during the query process, while realizing intelligent query, it can also effectively improve the query performance.
根据本公开的实施例,在数据库查询语句为第一查询语句的情况下,根据第一查询语句从第一数据库中查询目标数据包括:根据第一查询语句,通过查询第一数据库得到具有第一数据格式的第一查询结果。确定用于展示目标数据的目标数据格式。将第一查询结果转换为具有该目标数据格式的目标查询结果。基于目标查询结果展示目标数据。According to an embodiment of the present disclosure, when the database query statement is a first query statement, querying the target data from the first database according to the first query statement includes: obtaining a first query result having a first data format by querying the first database according to the first query statement. Determining a target data format for displaying the target data. Converting the first query result into a target query result having the target data format. Displaying the target data based on the target query result.
根据本公开的实施例,由于从不同数据库中查询得到的查询结果的格式不同,为保证不同查询结果对上游数据格式透明,可以将该查询结果转换为具有统一的目标数据格式的结果。例如,以第一数据库为图数据库为例,查询得到的第一查询结果的数据格式可以为字符串格式。在获取到字符串格式的第一查询结果之后,可以将字符串格式的第一查询结果转换为具有目标数据格式的结果,并基于该具有目标数据格式的结果实现目标数据的展示。According to an embodiment of the present disclosure, since the formats of query results obtained from queries in different databases are different, in order to ensure that different query results are transparent to the upstream data format, the query results can be converted into results with a unified target data format. For example, taking the first database as a graph database as an example, the data format of the first query result obtained by the query can be a string format. After obtaining the first query result in the string format, the first query result in the string format can be converted into a result in the target data format, and the display of the target data can be realized based on the result in the target data format.
通过本公开的上述实施例,在获取到查询结果之后,通过统一数据格式,实现对上游数据格式透明,可有效减少开发人员在进行上游设计时的工作,提高查询效率。Through the above-mentioned embodiments of the present disclosure, after the query results are obtained, the upstream data format is made transparent by unifying the data format, which can effectively reduce the work of developers when performing upstream design and improve query efficiency.
根据本公开的实施例,确定用于展示目标数据的目标数据格式包括:确定第二数据格式,该第二数据格式与根据第二查询语句查询第二数据库得到的第二查询结果相对应。将第二数据格式作为目标数据格式。According to an embodiment of the present disclosure, determining a target data format for displaying target data includes: determining a second data format corresponding to a second query result obtained by querying a second database according to a second query statement, and using the second data format as the target data format.
根据本公开的实施例,由于ES数据库可以支持字符串、key-value(键-值)、对象、JSON等存储结构,而图数据库仅支持字符串、数组等存储结构,且图数据库不支持JSON存储结构。以第一数据库为图数据库,第二数据库为ES数据库为例,为保证从ES数据库和图数据库中查询得到的查询结果对上游数据格式透明,可以将从图数据库中查询得到的字符串格式的查询结果转化为JSON格式的结果。同时,由于ES数据库支持JSON结构,为简化设计流程,例如可以将JSON结构的格式作为用于展示目标数据的目标数据格式。According to the embodiments of the present disclosure, since the ES database can support storage structures such as strings, key-value, objects, and JSON, while the graph database only supports storage structures such as strings and arrays, and the graph database does not support the JSON storage structure. Taking the first database as a graph database and the second database as an ES database as an example, in order to ensure that the query results obtained from the ES database and the graph database are transparent to the upstream data format, the query results in the string format obtained from the graph database can be converted into results in the JSON format. At the same time, since the ES database supports the JSON structure, in order to simplify the design process, for example, the format of the JSON structure can be used as the target data format for displaying the target data.
通过本公开的上述实施例,可进一步简化设计流程,同时保证查询结果的有效展示。Through the above-mentioned embodiments of the present disclosure, the design process can be further simplified while ensuring the effective display of the query results.
图4示意性示出了根据本公开实施例的数据查询方法的一种示例流程图。FIG. 4 schematically shows an example flow chart of a data query method according to an embodiment of the present disclosure.
如图4所示,该方法包括操作S410~S490。As shown in FIG. 4 , the method includes operations S410 to S490 .
在操作S410,获取用于查询目标数据的初始查询信息。In operation S410, initial query information for querying target data is acquired.
在操作S420,调用Query解析模块查询并解析初始查询信息。其中,Query表示由搜索引擎或数据库发出的消息,以便在数据库中查找某一特定文件、网站、记录或一系列记录。In operation S420, the Query parsing module is called to query and parse the initial query information, wherein Query represents a message sent by a search engine or a database to find a specific file, website, record or a series of records in the database.
在操作S430,确定是否获取到Query对应的数据库查询语句。若是,则执行操作S440~470;若否,则执行操作S490。In operation S430, it is determined whether a database query statement corresponding to Query is obtained. If so, operations S440 to 470 are executed; if not, operation S490 is executed.
在操作S440,分析数据库查询语句,确定要查询的目标数据库。In operation S440, the database query statement is analyzed to determine the target database to be queried.
在操作S450,在数据库查询语句为第一查询语句的情况下,查询第一数据库。In operation S450, when the database query statement is a first query statement, a first database is queried.
在操作S460,在数据库查询语句为第二查询语句的情况下,查询第二数据库。In operation S460, when the database query statement is a second query statement, a second database is queried.
在操作S470,是否成功获取查询结果。若是,则执行操作S480;若否,则执行操作S490。In operation S470, it is determined whether the query result is successfully obtained. If yes, operation S480 is executed; if no, operation S490 is executed.
在操作S480,统一数据格式,返回目标数据。In operation S480, the data format is unified and the target data is returned.
在操作S490,返回错误信息。In operation S490, error information is returned.
根据本公开的实施例,以设置第一数据库为图数据库,第二数据库为ES数据库为例。针对图数据库的学习成本和大数据场景下图查询过慢的问题,可以根据查询场景,选择在特定场景下必须用到图查询的方式来查询数据时,才使用图数据库进行存储,其他非必要情况可以仅是ES存储,来把图数据库和ES数据库对外进行一同封装,实现数据管理服务。由此,用户只需要输入初始查询信息,该数据管理服务就可通过分析确定需要进行ES查询还是图查询。According to the embodiments of the present disclosure, the first database is set as a graph database and the second database is set as an ES database as an example. In view of the learning cost of the graph database and the problem of slow graph query in big data scenarios, it is possible to use the graph database for storage only when the graph query method must be used to query data in a specific scenario according to the query scenario. In other non-essential situations, only ES storage can be used to package the graph database and ES database together to realize data management services. Therefore, the user only needs to enter the initial query information, and the data management service can determine whether ES query or graph query is required through analysis.
根据本公开的实施例,在未能根据Query解析模块解析得到Query对应的数据库查询语句,或是未能从数据库中成功获取到查询结果的情况下,例如还可以返回错误信息。According to an embodiment of the present disclosure, when a database query statement corresponding to the Query cannot be parsed according to the Query parsing module, or when a query result cannot be successfully obtained from the database, for example, an error message may be returned.
根据本公开的实施例,错误信息例如可以包括查询失败、未能查找到相关数据、推荐相似词等信息中的任意至少之一。According to an embodiment of the present disclosure, the error information may include, for example, any at least one of information such as query failure, failure to find relevant data, recommendation of similar words, etc.
通过本公开的上述实施例,将不同的数据库封装为同一个服务,能够满足更多查询场景下的资源召回,可有效提升召回率,减少单ES存储下多次查询的耗时,缓解大数据查询的情况下图数据库响应超时的问题。同时,可减少图数据库的数据量。并且,对开发者来说,可以只需要知晓ES,减少了学习成本和开发成本。Through the above-mentioned embodiments of the present disclosure, different databases are encapsulated into the same service, which can meet the resource recall in more query scenarios, effectively improve the recall rate, reduce the time consumption of multiple queries under a single ES storage, and alleviate the problem of graph database response timeout in the case of big data queries. At the same time, the amount of data in the graph database can be reduced. Moreover, for developers, they only need to know ES, which reduces the learning cost and development cost.
根据本公开的实施例,在进行数据查询之前,例如可以对数据管理服务进行数据维护,即提供一种数据维护服务,为数据管理服务配置相应的数据处理程序,以能够在需要查询数据时遵循本公开实施例中的任一种数据查询流程,并为数据管理服务中的每一个数据库配置供查找的基础数据。由此能够提高利用数据管理服务查询数据的成功率。According to the embodiments of the present disclosure, before performing data query, for example, data maintenance can be performed on the data management service, that is, a data maintenance service is provided, and a corresponding data processing program is configured for the data management service, so that any data query process in the embodiments of the present disclosure can be followed when data query is required, and basic data for search is configured for each database in the data management service. This can improve the success rate of querying data using the data management service.
根据本公开的实施例,配置基础数据的过程例如可以包括:获取用于为目标数据提供查询基础的基础数据,其中,基础数据可以具有第三数据格式。在确定基础数据需要同时存储于第一数据库和第二数据库的情况下:将基础数据转换为适配于第一数据库的存储格式并存储于第一数据库中,同时,将基础数据转换为适配于第二数据库的存储格式并存储于第二数据库中。According to an embodiment of the present disclosure, the process of configuring basic data may include, for example: obtaining basic data for providing a query basis for target data, wherein the basic data may have a third data format. In the case where it is determined that the basic data needs to be stored in both the first database and the second database: converting the basic data into a storage format adapted to the first database and storing it in the first database, and at the same time, converting the basic data into a storage format adapted to the second database and storing it in the second database.
根据本公开的实施例,基础数据的数据格式可以不同于第一数据库和第二数据库的存储格式,只需在需要存储至相应的数据库的时候适配相应数据库的存储格式即可。According to the embodiments of the present disclosure, the data format of the basic data may be different from the storage format of the first database and the second database, and it only needs to adapt the storage format of the corresponding database when it needs to be stored in the corresponding database.
根据本公开的实施例,基础数据的数据格式也可以仅不同于第一数据库和第二数据库其中之一的数据格式。例如,以第一数据库为图数据库,第二数据库为ES数据库为例,基础数据可以为ES格式的数据。在接收到传入的ES格式的数据之后,数据维护服务可以根据需要确定是否需要同时在两个数据库中存储以及维护数据关系。在确定基础数据需要同时被存储于图数据库中的情况下,可以通过调整数据结构,得到适配于图数据库的存储格式的数据结构,并完成在图数据库中的存储。According to an embodiment of the present disclosure, the data format of the basic data may also be different from the data format of only one of the first database and the second database. For example, taking the first database as a graph database and the second database as an ES database as an example, the basic data may be data in the ES format. After receiving the incoming ES format data, the data maintenance service can determine whether it is necessary to store and maintain data relationships in both databases at the same time as needed. In the case where it is determined that the basic data needs to be stored in the graph database at the same time, the data structure can be adjusted to obtain a data structure that is adapted to the storage format of the graph database, and the storage in the graph database can be completed.
通过本公开的上述实施例,提供了一种数据维护方法,能够为数据管理服务提供数据支持。Through the above-mentioned embodiments of the present disclosure, a data maintenance method is provided, which can provide data support for data management services.
根据本公开的实施例,配置基础数据的过程例如还可以包括:在将基础数据存储至第一数据库的第一存储过程出现异常的情况下,对第一存储过程执行回滚(rollback)操作。在将基础数据存储至第二数据库的第二存储过程出现异常的情况下,对第二存储过程执行回滚操作。According to an embodiment of the present disclosure, the process of configuring basic data may further include, for example: when an exception occurs in a first stored process for storing basic data in a first database, performing a rollback operation on the first stored process. When an exception occurs in a second stored process for storing basic data in a second database, performing a rollback operation on the second stored process.
通过本公开的上述实施例,通过对第二存储过程执行回滚操作,可以保持数据库的可用性及稳定性。Through the above embodiments of the present disclosure, by performing a rollback operation on the second stored procedure, the availability and stability of the database can be maintained.
图5示意性示出了根据本公开实施例的数据维护服务的数据维护流程图。FIG5 schematically shows a data maintenance flow chart of a data maintenance service according to an embodiment of the present disclosure.
如图5所示,该方法包括操作S510~S580。As shown in FIG. 5 , the method includes operations S510 to S580 .
在操作S510,获取ES格式的基础数据。In operation S510, basic data in the ES format is acquired.
在操作S520,基础数据是否需要维护图数据库。若是,则执行操作S530~S550;若否,则执行操作S570~S580。In operation S520, whether the basic data needs to maintain the graph database, if yes, then execute operations S530 to S550; if no, then execute operations S570 to S580.
在操作S530,调整基础数据的数据结构,以适配图数据库的存储格式,并维护边关系。In operation S530 , the data structure of the basic data is adjusted to adapt to the storage format of the graph database, and the edge relationship is maintained.
在操作S540,导入图数据库。In operation S540 , a graph database is imported.
在操作S550,是否成功导入图数据库。若否,则执行操作S560;若是,则执行操作S580。In operation S550, it is determined whether the graph database is successfully imported. If not, operation S560 is executed; if yes, operation S580 is executed.
在操作S560,执行回滚。In operation S560, rollback is performed.
在操作S570,导入ES数据库。In operation S570, the ES database is imported.
在操作S580,是否成功导入ES数据库。若否,则执行操作S560;若是,则结束流程。In operation S580, it is determined whether the ES database is successfully imported. If not, operation S560 is executed; if yes, the process ends.
根据本公开的实施例,例如,在存在一批基础数据需要导入数据库的情况下,可以对所有基础数据进行分析,以确定该基础数据是否需要同时导入图数据库。在经分析确定需要导入图数据库时,可以将基础数据整体导入图数据库,以维护数据间的关系,该关系可以通过在图数据库中维护边关系确定。与此同时,将基础数据导入ES数据库的过程例如可以批量实现。According to an embodiment of the present disclosure, for example, when there is a batch of basic data that needs to be imported into a database, all basic data can be analyzed to determine whether the basic data needs to be imported into a graph database at the same time. When it is determined through analysis that the graph database needs to be imported, the basic data can be imported into the graph database as a whole to maintain the relationship between the data, which can be determined by maintaining edge relationships in the graph database. At the same time, the process of importing basic data into the ES database can be implemented in batches, for example.
根据本公开的实施例,在将基础数据导入图数据库或ES数据库的过程出现错误的情况下,可以对当前执行的导入过程执行回滚操作,以恢复数据库在导入过程执行之前的正确状态。According to an embodiment of the present disclosure, in the event that an error occurs in the process of importing basic data into a graph database or an ES database, a rollback operation can be performed on the currently executed import process to restore the correct state of the database before the import process is executed.
通过本公开的上述实施例,在数据维护时,开发者只需要知晓ES就可以对数据进行操作。由于数据对使用者透明,在减少开发成本的同时,还提供了回滚的保障。Through the above embodiments of the present disclosure, when maintaining data, developers only need to know ES to operate the data. Since the data is transparent to the user, it reduces the development cost and also provides rollback guarantee.
图6示意性示出了根据本公开实施例的数据查询系统的架构图。FIG6 schematically shows an architecture diagram of a data query system according to an embodiment of the present disclosure.
如图6所示,数据查询系统600例如包括数据管理模块610、数据维护模块620、Query解析模块630、ES数据库640和图数据库650。As shown in FIG. 6 , the data query system 600 includes, for example, a data management module 610 , a data maintenance module 620 , a query parsing module 630 , an ES database 640 , and a graph database 650 .
根据本公开的实施例,数据管理模块610用于在接收到用户针对目标数据的查询请求时,调用Query解析模块630对用户输入的初始查询信息进行解析,以得到适用于查询该目标数据的数据库查询语句。然后,通过分析该数据库查询语句,确定是调用ES数据库640还是图数据库650来进行数据查询,并将查询到的结果进行统一数据格式的处理。之后,数据管理模块610可以基于统一数据格式后的结果生成目标目视并返回给用户。According to an embodiment of the present disclosure, the data management module 610 is used to call the Query parsing module 630 to parse the initial query information input by the user when receiving a query request for target data, so as to obtain a database query statement suitable for querying the target data. Then, by analyzing the database query statement, it is determined whether to call the ES database 640 or the graph database 650 to query the data, and the query results are processed in a unified data format. Afterwards, the data management module 610 can generate a target visual based on the results in the unified data format and return it to the user.
根据本公开的实施例,数据维护模块620可以接收ES格式的数据,并通过分析数据结构,确定需要维护的数据库,即确定该ES格式的数据是否需要同时导入ES数据库和图数据库。在确定需要导入图数据库的情况下,数据维护模块620还可以更改该ES格式的数据的数据结构,使其适配图数据库的存储格式,并导入图数据库。According to an embodiment of the present disclosure, the data maintenance module 620 can receive data in ES format and determine the database that needs to be maintained by analyzing the data structure, that is, determine whether the data in ES format needs to be imported into the ES database and the graph database at the same time. In the case of determining that the data needs to be imported into the graph database, the data maintenance module 620 can also change the data structure of the data in ES format to adapt it to the storage format of the graph database, and import it into the graph database.
通过本公开的上述实施例,结合数据管理服务和数据维护服务,实现了一种可靠、高效率、高准确率的数据查询系统。Through the above embodiments of the present disclosure, a reliable, efficient and accurate data query system is implemented in combination with data management services and data maintenance services.
图7示意性示出了根据本公开实施例的数据查询装置的框图。FIG. 7 schematically shows a block diagram of a data query device according to an embodiment of the present disclosure.
如图7所示,数据查询装置700包括:第一获取模块710、解析模块720、第一查询模块730和第二查询模块740。As shown in FIG. 7 , the data query device 700 includes: a first acquisition module 710 , a parsing module 720 , a first query module 730 and a second query module 740 .
第一获取模块710,用于获取用于查询目标数据的初始查询信息。The first acquisition module 710 is used to acquire initial query information for querying target data.
解析模块720,用于对初始查询信息进行解析,得到适用于查询目标数据的数据库查询语句,其中,数据库查询语句为第一查询语句或第二查询语句。The parsing module 720 is used to parse the initial query information to obtain a database query statement suitable for querying the target data, wherein the database query statement is a first query statement or a second query statement.
第一查询模块730,用于在数据库查询语句为第一查询语句的情况下,根据第一查询语句从第一数据库中查询目标数据。The first query module 730 is used to query target data from the first database according to the first query statement when the database query statement is the first query statement.
第二查询模块740,用于在数据库查询语句为第二查询语句的情况下,根据第二查询语句从第二数据库中查询目标数据。The second query module 740 is used to query the target data from the second database according to the second query statement when the database query statement is the second query statement.
通过本公开的上述实施例,由于通过解析初始查询信息可以得到适用于查询目标数据的数据库查询语句,可以利用适用于查询目标数据的数据库查询语句从对应的数据库中进行数据查询,能够至少部分的解决单类型的数据存储方式在需要进行数据查询时查询效率不高的技术问题,进而达到提高数据查询效率的技术效果。Through the above-mentioned embodiments of the present disclosure, since a database query statement suitable for querying the target data can be obtained by parsing the initial query information, the database query statement suitable for querying the target data can be used to perform data query from the corresponding database, which can at least partially solve the technical problem of low query efficiency of a single type of data storage method when data query is required, thereby achieving the technical effect of improving data query efficiency.
根据本公开的实施例,上述初始查询信息包括文本信息。上述解析模块包括:分词单元、获取单元和定义单元。According to an embodiment of the present disclosure, the initial query information includes text information. The parsing module includes: a word segmentation unit, an acquisition unit and a definition unit.
分词单元,用于对文本信息进行分词处理,得到用于表征文本信息的至少一个关键词。The word segmentation unit is used to perform word segmentation processing on the text information to obtain at least one keyword used to represent the text information.
获取单元,用于获取与至少一个关键词相匹配的目标查询语句。The acquisition unit is used to acquire a target query sentence matching at least one keyword.
定义单元,用于将目标查询语句作为数据库查询语句。A definition unit is used to use a target query statement as a database query statement.
根据本公开的实施例,上述至少一个关键词包括N个关键词,N为大于1的整数。上述获取单元包括:第一定义子单元和第二定义子单元。According to an embodiment of the present disclosure, the at least one keyword includes N keywords, where N is an integer greater than 1. The acquisition unit includes: a first definition subunit and a second definition subunit.
第一定义子单元,用于在获取到与N个关键词均匹配的全匹配查询语句的情况下,将全匹配查询语句作为目标查询语句。The first definition subunit is used to use the full match query statement as the target query statement when a full match query statement matching all N keywords is obtained.
第二定义子单元,用于在未获取到与N个关键词均匹配的查询语句的情况下:从N个关键词中选择i个目标关键词,以及获取与i个目标关键词均匹配的查询语句作为目标查询语句,其中,1≦i<N。The second definition subunit is used to select i target keywords from the N keywords and obtain query statements matching the i target keywords as target query statements when no query statements matching the N keywords are obtained, wherein 1≦i<N.
根据本公开的实施例,上述数据查询装置还包括:第二获取模块、第一确定模块和第二确定模块。According to an embodiment of the present disclosure, the above-mentioned data query device further includes: a second acquisition module, a first determination module and a second determination module.
第二获取模块,用于获取数据库查询语句的格式。The second acquisition module is used to acquire the format of the database query statement.
第一确定模块,用于在格式与第一数据库的查询语法的格式相匹配的情况下,确定数据库查询语句为第一查询语句。The first determination module is used to determine that the database query statement is a first query statement when the format matches the format of the query grammar of the first database.
第二确定模块,用于在格式与第二数据库的查询语法的格式相匹配的情况下,确定数据库查询语句为第二查询语句。The second determination module is configured to determine that the database query statement is a second query statement when the format matches the format of the query grammar of the second database.
根据本公开的实施例,上述第一查询模块包括:查询单元、确定单元、转换单元和展示单元。According to an embodiment of the present disclosure, the first query module includes: a query unit, a determination unit, a conversion unit and a display unit.
查询单元,用于根据第一查询语句,通过查询第一数据库得到具有第一数据格式的第一查询结果。The query unit is used to obtain a first query result in a first data format by querying a first database according to a first query statement.
确定单元,用于确定用于展示目标数据的目标数据格式。The determination unit is used to determine a target data format for displaying the target data.
转换单元,用于将第一查询结果转换为具有目标数据格式的目标查询结果。The conversion unit is used to convert the first query result into a target query result having a target data format.
展示单元,用于基于目标查询结果展示目标数据。The display unit is used to display target data based on the target query result.
根据本公开的实施例,上述确定单元包括:确定子单元和第三定义子单元。According to an embodiment of the present disclosure, the above-mentioned determination unit includes: a determination subunit and a third definition subunit.
确定子单元,用于确定第二数据格式,第二数据格式与根据第二查询语句查询第二数据库得到的第二查询结果相对应。The determination subunit is used to determine a second data format, where the second data format corresponds to a second query result obtained by querying the second database according to the second query statement.
第三定义子单元,用于将第二数据格式作为目标数据格式。The third definition subunit is used to use the second data format as the target data format.
根据本公开的实施例,上述数据查询装置还包括:第三获取模块和存储模块。According to an embodiment of the present disclosure, the above-mentioned data query device also includes: a third acquisition module and a storage module.
第三获取模块,用于获取用于为目标数据提供查询基础的基础数据,其中,基础数据具有第三数据格式。The third acquisition module is used to acquire basic data for providing a query basis for the target data, wherein the basic data has a third data format.
存储模块,用于在确定基础数据需要同时存储于第一数据库和第二数据库的情况下:将基础数据转换为适配于第一数据库的存储格式并存储于第一数据库中,以及将基础数据转换为适配于第二数据库的存储格式并存储于第二数据库中。The storage module is used to convert the basic data into a storage format suitable for the first database and store it in the first database, and convert the basic data into a storage format suitable for the second database and store it in the second database when it is determined that the basic data needs to be stored in the first database and the second database at the same time.
根据本公开的实施例,上述数据查询装置还包括:第一回滚模块和第二回滚模块。According to an embodiment of the present disclosure, the above-mentioned data query device also includes: a first rollback module and a second rollback module.
第一回滚模块,用于在将基础数据存储至第一数据库的第一存储过程出现异常的情况下,对第一存储过程执行回滚操作;以及A first rollback module is used to perform a rollback operation on the first stored procedure when an exception occurs in the first stored procedure for storing the basic data in the first database; and
第二回滚模块,用于在将基础数据存储至第二数据库的第二存储过程出现异常的情况下,对第二存储过程执行回滚操作。The second rollback module is used to perform a rollback operation on the second stored procedure when an exception occurs in the second stored procedure for storing the basic data in the second database.
根据本公开的实施例,上述第一数据库包括图数据库,上述第二数据库包括分布式搜索引擎数据库。According to an embodiment of the present disclosure, the first database includes a graph database, and the second database includes a distributed search engine database.
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
根据本公开的实施例,一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如上所述的方法。According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.
根据本公开的实施例,一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行如上所述的方法。According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method described above.
根据本公开的实施例,一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现如上所述的方法。According to an embodiment of the present disclosure, a computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the method as described above.
图8示出了可以用来实施本公开的实施例的示例电子设备800的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。FIG8 shows a schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and/or required herein.
如图8所示,设备800包括计算单元801,其可以根据存储在只读存储器(ROM)802中的计算机程序或者从存储单元808加载到随机访问存储器(RAM)803中的计算机程序,来执行各种适当的动作和处理。在RAM 803中,还可存储设备800操作所需的各种程序和数据。计算单元801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。As shown in Figure 8, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
设备800中的多个部件连接至I/O接口805,包括:输入单元806,例如键盘、鼠标等;输出单元807,例如各种类型的显示器、扬声器等;存储单元808,例如磁盘、光盘等;以及通信单元809,例如网卡、调制解调器、无线通信收发机等。通信单元809允许设备800通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
计算单元801可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元801的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元801执行上文所描述的各个方法和处理,例如数据查询方法。例如,在一些实施例中,数据查询方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元808。在一些实施例中,计算机程序的部分或者全部可以经由ROM 802和/或通信单元809而被载入和/或安装到设备800上。当计算机程序加载到RAM803并由计算单元801执行时,可以执行上文描述的数据查询方法的一个或多个步骤。备选地,在其他实施例中,计算单元801可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行数据查询方法。The computing unit 801 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a data query method. For example, in some embodiments, the data query method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed on the device 800 via ROM 802 and/or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the data query method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the data query method in any other appropriate manner (e.g., by means of firmware).
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(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 (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。The program code for implementing the method of the present disclosure 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 device, so that the program code, when executed by the processor or controller, implements the functions/operations specified in the flow chart and/or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, 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, device, or equipment. 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a 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 (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types 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 input from the user can be received in any form (including acoustic input, voice input, or tactile input).
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented 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., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以是分布式系统的服务器,或者是结合了区块链的服务器。A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server arises through computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110514766.1A CN113220710B (en) | 2021-05-11 | 2021-05-11 | Data query method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110514766.1A CN113220710B (en) | 2021-05-11 | 2021-05-11 | Data query method, device, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113220710A CN113220710A (en) | 2021-08-06 |
CN113220710B true CN113220710B (en) | 2024-06-04 |
Family
ID=77094882
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110514766.1A Active CN113220710B (en) | 2021-05-11 | 2021-05-11 | Data query method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113220710B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114117143A (en) * | 2021-12-02 | 2022-03-01 | 工银科技有限公司 | Flow display method and device, electronic equipment and readable storage medium |
CN114329161B (en) * | 2021-12-29 | 2025-07-11 | 北京百度网讯科技有限公司 | Data query method, device and electronic equipment |
CN114496140B (en) * | 2021-12-31 | 2022-12-30 | 医渡云(北京)技术有限公司 | Data matching method, device, equipment and medium for query conditions |
CN114064810B (en) * | 2022-01-17 | 2022-05-03 | 北京奥星贝斯科技有限公司 | Method and device for processing transaction |
CN115062043A (en) * | 2022-06-15 | 2022-09-16 | 中国工商银行股份有限公司 | Data query method, device, device and medium for cross-line message |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109446358A (en) * | 2018-08-27 | 2019-03-08 | 电子科技大学 | A kind of chart database accelerator and method based on ID caching technology |
CN110968615A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Data query method and device |
CN111125368A (en) * | 2019-12-31 | 2020-05-08 | 重庆百事得大牛机器人有限公司 | Legal opinion book generation method based on target object |
CN111414375A (en) * | 2020-02-29 | 2020-07-14 | 深圳壹账通智能科技有限公司 | Input recommendation method based on database query, electronic device and storage medium |
CN111414407A (en) * | 2020-02-13 | 2020-07-14 | 中国平安人寿保险股份有限公司 | Data query method, device, computer equipment and storage medium for database |
CN111475534A (en) * | 2020-05-12 | 2020-07-31 | 北京爱笔科技有限公司 | Data query method and related equipment |
CN112416962A (en) * | 2020-11-06 | 2021-02-26 | 北京偶数科技有限公司 | Data query method, device and storage medium |
WO2021083239A1 (en) * | 2019-10-28 | 2021-05-06 | 北京大学 | Graph data query method and apparatus, and device and storage medium |
-
2021
- 2021-05-11 CN CN202110514766.1A patent/CN113220710B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109446358A (en) * | 2018-08-27 | 2019-03-08 | 电子科技大学 | A kind of chart database accelerator and method based on ID caching technology |
CN110968615A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Data query method and device |
WO2021083239A1 (en) * | 2019-10-28 | 2021-05-06 | 北京大学 | Graph data query method and apparatus, and device and storage medium |
CN111125368A (en) * | 2019-12-31 | 2020-05-08 | 重庆百事得大牛机器人有限公司 | Legal opinion book generation method based on target object |
CN111414407A (en) * | 2020-02-13 | 2020-07-14 | 中国平安人寿保险股份有限公司 | Data query method, device, computer equipment and storage medium for database |
CN111414375A (en) * | 2020-02-29 | 2020-07-14 | 深圳壹账通智能科技有限公司 | Input recommendation method based on database query, electronic device and storage medium |
CN111475534A (en) * | 2020-05-12 | 2020-07-31 | 北京爱笔科技有限公司 | Data query method and related equipment |
CN112416962A (en) * | 2020-11-06 | 2021-02-26 | 北京偶数科技有限公司 | Data query method, device and storage medium |
Non-Patent Citations (1)
Title |
---|
受限领域自然语言数据库查询接口研究;余正涛, 樊孝忠, 耿增民;昆明理工大学学报(理工版);20040825(第04期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113220710A (en) | 2021-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113220710B (en) | Data query method, device, electronic device and storage medium | |
CN113836314B (en) | Knowledge graph construction method, device, equipment and storage medium | |
CN113204621B (en) | Document storage, document retrieval method, device, equipment and storage medium | |
CN113568938B (en) | Data stream processing method and device, electronic equipment and storage medium | |
CN111708805A (en) | Data query method, device, electronic device and storage medium | |
CN112559717B (en) | Search matching method, device, electronic equipment and storage medium | |
CN112528067A (en) | Graph database storage method, graph database reading method, graph database storage device, graph database reading device and graph database reading equipment | |
CN112989170A (en) | Keyword matching method applied to information search, information search method and device | |
CN118820400A (en) | Multi-channel recall retrieval enhancement generation method and device based on real-time data index | |
CN113448957B (en) | A data query method and device | |
CN113609100B (en) | Data storage method, data query device and electronic equipment | |
CN114491253B (en) | Method and device for processing observation information, electronic equipment and storage medium | |
CN113239054B (en) | Information generation method and related device | |
CN113407749B (en) | Image index construction method, device, electronic device and storage medium | |
CN118445452A (en) | Vector search method, device, equipment and medium | |
CN112887426A (en) | Information flow pushing method and device, electronic equipment and storage medium | |
CN109542912B (en) | Interval data storage method, device, server and storage medium | |
CN117633194A (en) | Large model prompts data processing methods, devices, electronic equipment and storage media | |
CN114579573B (en) | Information retrieval method, information retrieval device, electronic equipment and storage medium | |
CN116955856A (en) | Information display method, device, electronic equipment and storage medium | |
CN113326416B (en) | Method for searching data, method and device for sending search data to client | |
CN116894021A (en) | A log data storage method, query method, device, equipment and medium | |
CN114936246A (en) | Redis data management method, device, equipment, storage medium and product | |
CN116450715A (en) | Information integration data processing method, system, electronic equipment and storage medium | |
CN113822057B (en) | Location information determination method, device, electronic device, and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |