[go: up one dir, main page]

CN111767303A - A data query method, device, server and readable storage medium - Google Patents

A data query method, device, server and readable storage medium Download PDF

Info

Publication number
CN111767303A
CN111767303A CN202010737086.1A CN202010737086A CN111767303A CN 111767303 A CN111767303 A CN 111767303A CN 202010737086 A CN202010737086 A CN 202010737086A CN 111767303 A CN111767303 A CN 111767303A
Authority
CN
China
Prior art keywords
full
query
search engine
text search
index
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
CN202010737086.1A
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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010737086.1A priority Critical patent/CN111767303A/en
Publication of CN111767303A publication Critical patent/CN111767303A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/2428Query predicate definition using graphical user interfaces, including menus and forms
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

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

Abstract

本发明实施例提供了一种数据查询方法、装置、服务器及可读存储介质,其中方法包括:获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表;获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段;利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据,从而可以支持存储数据的全文检索,实现跨多个表进行数据查询,并提高数据查询的效率。

Figure 202010737086

Embodiments of the present invention provide a data query method, device, server, and readable storage medium, wherein the method includes: acquiring a data query request submitted by a user through a query interface, where the data query request includes a query condition and a query condition related to the query condition. Relevant target fields, the target fields correspond to multiple single tables of the relational database; obtain the index of the full-text search engine corresponding to the multiple single tables, the index of the full-text search engine is generated according to the multiple single tables, the full-text search engine The index of the engine includes all the fields of the multiple single tables; the retrieval syntax of the full-text search engine is used to query the data matching the query conditions from the index of the full-text search engine, so that the full-text retrieval of the stored data can be supported, and the realization of Query data across multiple tables and improve the efficiency of data query.

Figure 202010737086

Description

一种数据查询方法、装置、服务器及可读存储介质A data query method, device, server and readable storage medium

技术领域technical field

本发明涉及数据库技术领域,尤其涉及一种数据查询方法、装置、服务器及可读存储介质。The present invention relates to the technical field of databases, and in particular, to a data query method, device, server and readable storage medium.

背景技术Background technique

目前,基于关系型数据库的单表表单引擎实现方式简单,但是在日常应用运用中,很少有仅使用单表表单就能完成数据查询的场景。在大多数情况下,针对某个数据的查询还是依赖多表(跨表)查询,例如,现在多表查询通过视图view将多表关联生成一个视图,但是因为多表的关联结果可能非常大,该视图view不适合全文检索,数据查询的效率也比较低下。At present, the implementation of single-table form engines based on relational databases is simple, but in daily applications, there are few scenarios in which data query can be completed only by using single-table forms. In most cases, the query for a certain data still relies on multi-table (cross-table) query. For example, the multi-table query now associates multiple tables to generate a view through the view view, but because the multi-table association result may be very large, This view is not suitable for full-text retrieval, and the efficiency of data query is relatively low.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种数据查询方法、装置、服务器及可读存储介质,可以支持存储数据的全文检索,实现跨多个表进行数据查询,并提高数据查询的效率。Embodiments of the present invention provide a data query method, device, server, and readable storage medium, which can support full-text retrieval of stored data, implement data query across multiple tables, and improve data query efficiency.

本发明实施例第一方面提供了一种数据查询方法,包括:A first aspect of the embodiments of the present invention provides a data query method, including:

获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表;obtaining a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database;

获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段;obtaining an index of a full-text search engine corresponding to the multiple single tables, where the index of the full-text search engine is generated according to the multiple single tables, and the index of the full-text search engine includes all fields of the multiple single tables;

利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。Data matching the query condition is queried from the index of the full-text search engine by using the retrieval syntax of the full-text search engine.

本发明实施例第二方面提供了一种数据查询装置,包括:A second aspect of the embodiments of the present invention provides a data query device, including:

获取模块,用于获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表;an acquisition module, configured to acquire a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database;

所述获取模块,还用于获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段;The obtaining module is further configured to obtain the index of the full-text search engine corresponding to the multiple single tables, the index of the full-text search engine is generated according to the multiple single tables, and the index of the full-text search engine includes the index of the multiple single tables. all fields;

处理模块,用于利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。The processing module is configured to query the data matching the query condition from the index of the full-text search engine by using the retrieval syntax of the full-text search engine.

本发明实施例第三方面提供了一种服务器,包括处理器、网络接口和存储装置,所述处理器、所述网络接口和所述存储装置相互连接,其中,所述网络接口受所述处理器的控制用于收发数据,所述存储装置用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行上述第一方面所述的数据查询方法。A third aspect of the embodiments of the present invention provides a server, including a processor, a network interface, and a storage device, wherein the processor, the network interface, and the storage device are connected to each other, wherein the network interface is subject to the processing The control of the processor is used to send and receive data, the storage device is used to store a computer program, the computer program includes program instructions, and the processor is configured to invoke the program instructions to perform the data query described in the first aspect above. method.

本发明实施例第四方面提供了一种计算机可读存储介质,该计算机可读存储介质中存储有程序指令,该程序指令被执行时,用于实现上述第一方面所述的数据查询方法。A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where program instructions are stored in the computer-readable storage medium, and when the program instructions are executed, are used to implement the data query method described in the first aspect.

本发明实施例第五方面提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述第一方面所述的数据查询方法。A fifth aspect of the embodiments of the present invention provides a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data query method described in the first aspect.

在本发明实施例中,服务器获取用户通过查询界面提交的数据查询请求,该数据查询请求包括查询条件和与该查询条件相关的目标字段,该目标字段对应关系型数据库的多张单表,并获取多张单表对应的全文搜索引擎的索引,该全文搜索引擎的索引是根据该多张单表生成的,该全文搜索引擎的索引包括多张单表的全部字段,进而利用全文搜索引擎的检索语法从该全文搜索引擎的索引中查询与该查询条件匹配的数据,可以支持存储数据的全文检索,实现跨多个表进行数据查询,并提高数据查询的效率。In the embodiment of the present invention, the server obtains a data query request submitted by a user through a query interface, the data query request includes a query condition and a target field related to the query condition, the target field corresponds to multiple single tables of a relational database, and obtains multiple The index of the full-text search engine corresponding to the single table, the index of the full-text search engine is generated according to the multiple single tables, the index of the full-text search engine includes all the fields of the multiple single tables, and then the full-text search engine is used. Querying data matching the query conditions in the index can support full-text retrieval of stored data, implement data query across multiple tables, and improve data query efficiency.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying 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 These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1是本发明实施例提供的一种数据查询方法的流程示意图;1 is a schematic flowchart of a data query method provided by an embodiment of the present invention;

图2是本发明实施例提供的另一种数据查询方法的流程示意图;2 is a schematic flowchart of another data query method provided by an embodiment of the present invention;

图3a是本发明实施例提供的表单引擎配置界面;3a is a form engine configuration interface provided by an embodiment of the present invention;

图3b是本发明实施例提供的配置查询条件的界面;3b is an interface for configuring query conditions provided by an embodiment of the present invention;

图3c是本发明实施例提供的编辑样式的示意图;3c is a schematic diagram of an editing style provided by an embodiment of the present invention;

图3d是本发明实施例提供的设置结果与展示的字段;FIG. 3d is a setting result provided by an embodiment of the present invention and a field displayed;

图3e是本发明实施例提供的查询界面;3e is a query interface provided by an embodiment of the present invention;

图4是本发明实施例提供的多表生成单表的示意图;4 is a schematic diagram of generating a single table from multiple tables provided by an embodiment of the present invention;

图5是本发明实施例提供一种数据查询装置的结构示意图;5 is a schematic structural diagram of a data query apparatus provided by an embodiment of the present invention;

图6是本发明实施例提供一种服务器的结构示意图。FIG. 6 is a schematic structural diagram of a server provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

云计算(cloud computing)指IT基础设施的交付和使用模式,指通过网络以按需、易扩展的方式获得所需资源;广义云计算指服务的交付和使用模式,指通过网络以按需、易扩展的方式获得所需服务。这种服务可以是IT和软件、互联网相关,也可是其他服务。云计算是网格计算(Grid Computing)、分布式计算(DistributedComputing)、并行计算(Parallel Computing)、效用计算(Utility Computing)、网络存储(NetworkStorageTechnologies)、虚拟化(Virtualization)、负载均衡(Load Balance)等传统计算机和网络技术发展融合的产物。Cloud computing refers to the delivery and use mode of IT infrastructure, which refers to obtaining the required resources in an on-demand and easy-to-expand way through the network; cloud computing in a broad sense refers to the delivery and use mode of services, which refers to the on-demand, Get the services you need in an easily scalable way. Such services can be IT and software, Internet-related, or other services. Cloud computing is Grid Computing, Distributed Computing, Parallel Computing, Utility Computing, Network Storage Technologies, Virtualization, Load Balance It is the product of the integration of traditional computer and network technology development.

随着互联网、实时数据流、连接设备多样化的发展,以及搜索服务、社会网络、移动商务和开放协作等需求的推动,云计算迅速发展起来。不同于以往的并行分布式计算,云计算的产生从理念上将推动整个互联网模式、企业管理模式发生革命性的变革。Cloud computing has grown rapidly with the development of the Internet, real-time data streaming, the diversity of connected devices, and the need for search services, social networking, mobile commerce, and open collaboration. Different from the parallel distributed computing in the past, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model.

云存储(cloud storage)是在云计算概念上延伸和发展出来的一个新的概念,分布式云存储系统(以下简称存储系统)是指通过集群应用、网格技术以及分布存储文件系统等功能,将网络中大量各种不同类型的存储设备(存储设备也称之为存储节点)通过应用软件或应用接口集合起来协同工作,共同对外提供数据存储和业务访问功能的一个存储系统。Cloud storage is a new concept extended and developed from the concept of cloud computing. Distributed cloud storage system (hereinafter referred to as storage system) refers to functions such as cluster application, grid technology and distributed storage file system. A storage system that integrates a large number of different types of storage devices (also called storage nodes) in the network through application software or application interfaces to work together to provide external data storage and service access functions.

目前,存储系统的存储方法为:创建逻辑卷,在创建逻辑卷时,就为每个逻辑卷分配物理存储空间,该物理存储空间可能是某个存储设备或者某几个存储设备的磁盘组成。客户端在某一逻辑卷上存储数据,也就是将数据存储在文件系统上,文件系统将数据分成许多部分,每一部分是一个对象,对象不仅包含数据而且还包含数据标识(ID,IDentity)等额外的信息,文件系统将每个对象分别写入该逻辑卷的物理存储空间,且文件系统会记录每个对象的存储位置信息,从而当客户端请求访问数据时,文件系统能够根据每个对象的存储位置信息让客户端对数据进行访问。At present, the storage method of the storage system is as follows: creating a logical volume, and when creating a logical volume, a physical storage space is allocated to each logical volume, and the physical storage space may be composed of a storage device or disks of several storage devices. The client stores data on a logical volume, that is, the data is stored on the file system. The file system divides the data into many parts, each part is an object, and the object contains not only data but also data identification (ID, IDentity), etc. For additional information, the file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access data, the file system can The storage location information allows clients to access the data.

存储系统为逻辑卷分配物理存储空间的过程,具体为:按照对存储于逻辑卷的对象的容量估量(该估量往往相对于实际要存储的对象的容量有很大余量)和独立冗余磁盘阵列(RAID,Redundant Array of Independent Disk)的组别,预先将物理存储空间划分成分条,一个逻辑卷可以理解为一个分条,从而为逻辑卷分配了物理存储空间。The process of allocating physical storage space by the storage system to the logical volume, specifically: according to the capacity estimation of the objects stored in the logical volume (this estimation often has a large margin relative to the actual capacity of the objects to be stored) and independent redundant disks Array (RAID, Redundant Array of Independent Disk) group, which divides the physical storage space into stripes in advance, and a logical volume can be understood as a stripe, thereby allocating physical storage space for the logical volume.

数据库(Database),简而言之可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据进行新增、查询、更新、删除等操作。所谓“数据库”是以一定方式储存在一起、能与多个用户共享、具有尽可能小的冗余度、与应用程序彼此独立的数据集合。Database, in short, can be regarded as an electronic filing cabinet—a place where electronic files are stored, and users can perform operations such as adding, querying, updating, and deleting data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of applications.

数据库管理系统(英语:Database Management System,简称DBMS)是为管理数据库而设计的电脑软件系统,一般具有存储、截取、安全保障、备份等基础功能。数据库管理系统可以依据它所支持的数据库模型来作分类,例如关系式、XML(Extensible MarkupLanguage,即可扩展标记语言)、全文搜索引擎Elasticsearch;或依据所支持的计算机类型来作分类,例如服务器群集、移动电话;或依据所用查询语言来作分类,例如SQL(结构化查询语言(Structured Query Language)、XQuery;或依据性能冲量重点来作分类,例如最大规模、最高运行速度;亦或其他的分类方式。不论使用哪种分类方式,一些DBMS能够跨类别,例如,同时支持多种查询语言。Database management system (English: Database Management System, referred to as DBMS) is a computer software system designed for database management, generally with basic functions such as storage, interception, security, backup and so on. The database management system can be classified according to the database model it supports, such as relational, XML (Extensible Markup Language), full-text search engine Elasticsearch; or according to the supported computer types, such as server clusters , mobile phone; or classify according to the query language used, such as SQL (Structured Query Language), XQuery; or classify according to the focus of performance impulse, such as maximum size, maximum operating speed; or other classifications Approach. Regardless of the taxonomy used, some DBMSs are able to cross-category, eg, support multiple query languages simultaneously.

目前,针对多表(跨表)的数据查询,主要利用视图view将多表关联生成一个视图,从而实现多表之前的数据查询,这样能够实现跨表查询,但是多表的关联结果可能非常大,查询的效率可能会非常低,而且不适合于全文检索。At present, for multi-table (cross-table) data query, the view view is mainly used to associate multiple tables to generate a view, so as to realize the data query before the multi-table, which can realize the cross-table query, but the multi-table association result may be very large , the query efficiency may be very low, and it is not suitable for full-text retrieval.

因此本发明实施例借鉴单表的表单引擎思想,将有关联的多张单表变成一张单表,使得多表的查询变得和单表查询一样,不需要进行代码开发,极大的提高了开发效率,并且利用Elasticsearch天然的分布式架构,能够实现万亿级的记录检索,同时Elasticsearch非常好友的支持全文检索,能够解决查询效率低下的问题。其中,Elasticsearch是一种nosql数据库,提供一个分布式多用户能力的全文搜索引擎,并基于Lucene实现,提供RESTful web接口。Elasticsearch是用Java语言开发的,并作为Apache许可条款下的开放源码发布,是一种流行的企业级搜索引擎。在云计算中,能够达到实时搜索,稳定,可靠,快速,安装使用方便。Therefore, the embodiment of the present invention draws on the idea of the form engine of a single table, and turns multiple related single tables into a single table, so that the query of multiple tables becomes the same as the query of a single table, and no code development is required, which greatly improves the development efficiency. , and using the natural distributed architecture of Elasticsearch, it can achieve trillion-level record retrieval. At the same time, Elasticsearch is very friendly to support full-text retrieval, which can solve the problem of low query efficiency. Among them, Elasticsearch is a nosql database that provides a full-text search engine with distributed multi-user capabilities, and is implemented based on Lucene to provide a RESTful web interface. Developed in the Java language and released as open source under the terms of the Apache License, Elasticsearch is a popular enterprise-grade search engine. In cloud computing, real-time search can be achieved, which is stable, reliable, fast, and easy to install and use.

在一种可行的实施例中,服务器可以获取用户通过查询界面提交的数据查询请求,该数据查询请求包括查询条件和与该查询条件相关的目标字段,该目标字段对应关系型数据库的多张单表,并获取多张单表对应的全文搜索引擎的索引,该全文搜索引擎的索引是根据多张单表生成的,该全文搜索引擎的索引包括所述多张单表的全部字段,进而利用全文搜索引擎的检索语法从全文搜索引擎的索引中查询与所述查询条件匹配的数据,可以支持存储数据的全文检索,实现跨多个表进行数据查询,并提高数据查询的效率。In a feasible embodiment, the server may acquire a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database, And obtain the index of the full-text search engine corresponding to the multiple single tables, the index of the full-text search engine is generated according to the multiple single tables, the index of the full-text search engine includes all the fields of the multiple single tables, and then uses the full-text search engine. Querying data matching the query conditions in the index of the search engine can support full-text retrieval of stored data, realize data query across multiple tables, and improve data query efficiency.

请参阅图1,图1为本发明实施例提供的一种数据查询方法的流程示意图。该方法可由服务器执行,本实施例中所描述的数据查询方法,包括以下步骤:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a data query method according to an embodiment of the present invention. The method can be executed by the server, and the data query method described in this embodiment includes the following steps:

101、获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表。101. Acquire a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database.

其中,上述目标字段包括至少两个与查询条件相关的字段,上述查询条件可以是对性别、时间、身份证等,该查询条件可以关联至少两个字段。例如,假设数据查询请求为查询某个用户有哪些角色,该数据查询请求包括该查询条件和该查询条件关联的目标字段,该查询条件为用户和角色,该查询条件关联的目标字段包括角色对应的字段和用户对应的字段。Wherein, the above target field includes at least two fields related to query conditions. The above query conditions may be gender, time, ID card, etc., and the query conditions may be associated with at least two fields. For example, suppose the data query request is to query which roles a certain user has, the data query request includes the query condition and the target field associated with the query condition, the query condition is user and role, and the target field associated with the query condition includes the role corresponding to the fields and the fields corresponding to the user.

其中,上述多张单表包括单表之间的关联关系表,该关联关系表包括单表的主外键关系,根据该主外键关系可以确定多张表之间的关联关系。The above-mentioned multiple single tables include an association relationship table between the single tables, and the association relationship table includes a primary and foreign key relationship of the single table, and the association relationship between the multiple tables can be determined according to the primary and foreign key relationship.

具体的,服务器获取用户通过查询界面提交的数据查询数据请求,服务器根据至少两个与查询条件相关的字段可以确定至少两个与查询条件相关的字段对应关系型数据库中的至少两个张单表。例如,上述例子中,该查询条件关联的目标字段包括角色对应的字段和用户对应的字段,根据角色对应的字段和用户对应的字段可以确定有一张user用户表A、user_role用户和角色关联表、role角色表。Specifically, the server obtains the data query data request submitted by the user through the query interface, and the server can determine that the at least two fields related to the query conditions correspond to at least two single tables in the relational database according to the at least two fields related to the query conditions. For example, in the above example, the target fields associated with the query condition include fields corresponding to roles and fields corresponding to users. According to the fields corresponding to roles and the fields corresponding to users, it can be determined that there is a user user table A, user_role user and role association table, role role table.

例如,根据上述例子,该查询条件关联的目标字段包括角色对应的字段和用户对应的字段,根据角色对应的字段和用户对应的字段可以确定出三张单表(多表),分别为表1的user用户表A、表2的user_role用户和角色关联表、表3的role角色表,其中,在表2中包括其余两张单表的主外键关系,可以通过表2的user_role用户和角色关联表建立表1和表2之间的联系,以使得后续根据对应的主外键关系进行多表查询。For example, according to the above example, the target fields associated with the query condition include fields corresponding to roles and fields corresponding to users. According to the fields corresponding to roles and the fields corresponding to users, three single tables (multiple tables) can be determined, which are respectively the user in Table 1. User table A, the user_role user and role association table in table 2, and the role role table in table 3, where the primary and foreign key relationships of the remaining two single tables are included in table 2, and a table can be established through the user_role user and role association table in table 2 The connection between table 1 and table 2 enables subsequent multi-table queries based on the corresponding primary and foreign key relationships.

表1Table 1

字段field 类型type 长度length 说明illustrate user_iduser_id bigintbigint 2020 主键primary key user_nameuser_name charchar 5050 名字name create_timecreate_time datetimedatetime 1010 创建时间creation time channelchannel tinyinttinyint 44 注册渠道来源Registration Channel Source

表2Table 2

字段field 类型type 长度length 说明illustrate role_idrole_id bigintbigint 2020 主键,外键role表Primary key, foreign key role table user_iduser_id bigintbigint 2020 主键,外键user表Primary key, foreign key user table

表3table 3

字段field 类型type 长度length 说明illustrate role_idrole_id bigintbigint 2020 主键primary key role_namerole_name charchar 2020 角色名称Role Name

需要说明的是,根据至少两个与查询条件相关的字段查询出来至少两个单表,并不是一一对应,其中与至少两个与查询条件相关的字段关联的表也可以查询到,例如上述例子,查询出的3张单表。It should be noted that at least two single tables are queried based on at least two fields related to the query conditions, not one-to-one correspondence. Tables associated with at least two fields related to the query conditions can also be queried, such as the above For example, 3 single tables are queried.

102、获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段。102. Obtain an index of a full-text search engine corresponding to the multiple single tables, where the index of the full-text search engine is generated according to the multiple single tables, and the index of the full-text search engine includes all fields of the multiple single tables.

其中,全文搜索引擎可以是Elasticsearch,若全文搜索引擎为Elasticsearch,则全文搜索引擎的索引为Elasticsearch索引,该Elasticsearch索引为类似关系型数据库的表。The full-text search engine may be Elasticsearch. If the full-text search engine is Elasticsearch, the index of the full-text search engine is an Elasticsearch index, and the Elasticsearch index is a table similar to a relational database.

该全文搜索引擎的索引可以理解为一张单表,这张单表包括上述多张单表中的所有字段。The index of the full-text search engine can be understood as a single table, and this single table includes all the fields in the above-mentioned multiple single tables.

具体的,服务器在获取用户通过查询界面提交的数据查询请求后,先根据目标字段获取目标字段对应的多张单表,由于该全文搜索引擎的索引是由上述多张单表生成,该全文搜索引擎的索引包括上述多张单表的全部字段,因此根据上述多张单表中包括的字段可以获取根据上述多张单表生成的全文搜索引擎的索引。Specifically, after obtaining the data query request submitted by the user through the query interface, the server first obtains multiple single tables corresponding to the target field according to the target field. Since the index of the full-text search engine is generated from the above-mentioned multiple single tables, the index of the full-text search engine includes All the fields of the above multiple single tables, therefore, according to the fields included in the foregoing multiple single tables, the index of the full-text search engine generated according to the foregoing multiple single tables can be obtained.

103、利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。103. Use the retrieval syntax of the full-text search engine to query the index of the full-text search engine for data matching the query condition.

其中,针对全文搜索引擎有固定的检索语法,例如,一般全文搜索引擎的检索语法可以是restapi或dsl。There is a fixed retrieval syntax for the full-text search engine, for example, the retrieval syntax of a general full-text search engine may be restapi or dsl.

在一种可行的实施例中,服务器可以利用全文搜索引擎的检索语法和查询条件构建检索语句,并利用检索语句从全文搜索引擎的索引中查询与查询条件匹配的数据。其中,利用全文搜索引擎的检索语法和查询条件构建检索语句可以实现对全文搜索引擎的索引进行检索改造,从而替代上述关系型数据库中结构化查询语言SQL查询的方式。In a feasible embodiment, the server may construct a retrieval sentence using the retrieval syntax and query conditions of the full-text search engine, and use the retrieval sentence to query the index of the full-text search engine for data matching the query conditions. Wherein, using the retrieval syntax and query conditions of the full-text search engine to construct the retrieval statement can realize the retrieval and transformation of the index of the full-text search engine, thereby replacing the structured query language SQL query method in the relational database.

例如,关系型数据库中结构化查询语言SQL查询的检索语句为:For example, the retrieval statement of the structured query language SQL query in the relational database is:

Figure BDA0002605484110000071
Figure BDA0002605484110000071

Figure BDA0002605484110000081
Figure BDA0002605484110000081

而在全文搜索引擎的检索语句(如elasticsearch dsl语法)为:And the retrieval statement in the full-text search engine (such as elasticsearch dsl syntax) is:

Figure BDA0002605484110000082
Figure BDA0002605484110000082

通过检索改造,可以看出利用全文搜索引擎的检索语句比较简单。Through the retrieval transformation, it can be seen that the retrieval sentence using the full-text search engine is relatively simple.

在本发明实施例中,服务器可以获取用户通过查询界面提交的数据查询请求,该数据查询请求包括查询条件和与该查询条件相关的目标字段,该目标字段对应关系型数据库的多张单表,并获取多张单表对应根据该多张单表生成的全文搜索引擎的索引,进而利用全文搜索引擎的检索语法从全文搜索引擎的索引中查询与查询条件匹配的数据,可以支持存储数据的全文检索,实现跨多个表进行数据查询,并提高数据查询的效率。In this embodiment of the present invention, the server may acquire a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database, and acquires Multiple single tables correspond to the full-text search engine index generated based on the multiple single tables, and then use the full-text search engine's retrieval syntax to query the full-text search engine's index for data that matches the query conditions, which can support full-text search of stored data and achieve cross-multiple table for data query, and improve the efficiency of data query.

请参阅图2,图2为本发明实施例提供的另一种数据查询方法的流程示意图。该方法可由服务器执行,本实施例中所描述的数据查询方法,包括:Please refer to FIG. 2, which is a schematic flowchart of another data query method provided by an embodiment of the present invention. The method can be executed by the server, and the data query method described in this embodiment includes:

201、获取所述多张单表包括的字段中的多个字段,所述多个字段是由管理员通过表单引擎配置界面从所述多张单表包括的字段中选取的。201. Acquire multiple fields among the fields included in the multiple single sheets, where the multiple fields are selected from the fields included in the multiple single sheets by an administrator through a form engine configuration interface.

具体的,该多个字段是由管理员(如开发人员)预先通过表单引擎配置界面在多张单表中的每张单表中选取至少一个字段组成的,服务器可以获取由上述每张单表包括的字段中的至少一个字段的多个字段。Specifically, the multiple fields are formed by an administrator (such as a developer) selecting at least one field from each of the multiple single sheets through the form engine configuration interface in advance, and the server may obtain at least one field from the fields included in each of the aforementioned single sheets. Multiple fields for one field.

在一种可行的实施例中,表单引擎配置界面可以提供配置某张单表的表单引擎配置界面,服务器响应针对单表的表单引擎配置请求,并通过客户端输出表单引擎配置界面,在该表单引擎配置界面需要选择数据源、查询条件等等,在数据源选择时,需要确定哪些字段可以作为查询条件对应的字段,在3a中,可以看出字段sfzh、sbsj_date、gender可以作为查询条件对应的字段。在完成数据源选择后,服务器输出配置查询条件的界面,如图3b,该查询条件可以是身份证、申办时间、性别等等,并且确定身份证对应的字段sfzh,性别对应的字段gender,申办时间对应的字段sbsj_date。针对身份证、申办时间、性别等可以编辑对应的样式,性别样式编辑界面如图3c所示;在配置查询条件后,进入图3d,设置结果与展示的字段,即可以对结果与展示的字段设置展示顺序;当配置成功之后,可以通过客户端展示整个查询界面,该查询界面如图3e所示,其中,日期字段是可以按日期检索查询,性别是可以生成字典形式,进行下拉选择,通过日期、身份证和性别进行数据查询。In a feasible embodiment, the form engine configuration interface may provide a form engine configuration interface for configuring a single form, the server responds to the form engine configuration request for the single form, and outputs the form engine configuration interface through the client, where the form engine configures The interface needs to select the data source, query conditions, etc. When selecting the data source, it is necessary to determine which fields can be used as the fields corresponding to the query conditions. In 3a, it can be seen that the fields sfzh, sbsj_date, and gender can be used as the fields corresponding to the query conditions. After completing the selection of the data source, the server outputs the interface for configuring the query conditions, as shown in Figure 3b, the query conditions can be ID card, application time, gender, etc., and determine the field sfzh corresponding to the ID card, the field gender corresponding to the gender, and the application The field sbsj_date corresponding to the time. For ID card, application time, gender, etc., the corresponding styles can be edited. The gender style editing interface is shown in Figure 3c; after configuring the query conditions, enter Figure 3d, and set the results and displayed fields, that is, the results and displayed fields can be edited. Set the display order; when the configuration is successful, the entire query interface can be displayed through the client. The query interface is shown in Figure 3e, where the date field can be retrieved and queried by date, and the gender can be generated in the form of a dictionary. Date, ID and gender for data query.

需要说明的是,上述多张单表都是通过上述单表流程进行配置。It should be noted that the above multiple single sheets are configured through the above single sheet process.

202、根据所述多个字段从所述关系型数据库中获取所述多张单表。202. Acquire the multiple single tables from the relational database according to the multiple fields.

其中,多张单表包括单表之间的关联关系表,该关联关系表包括单表的主外键关系。The multiple single tables include an association relationship table between the single tables, and the association relationship table includes primary and foreign key relationships of the single tables.

具体的,将多个字段与关系型数据库中包括的多张单表进行匹配,若多个字段与上述多个单表中包括的字段匹配,则从关系型数据库中获取多张单表。Specifically, multiple fields are matched with multiple single tables included in the relational database, and if multiple fields match with the fields included in the multiple single tables, multiple single tables are acquired from the relational database.

203、利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引。203. Perform field mapping processing on the multiple single tables by using a structured query language and a field mapping relationship, so as to generate an index of a full-text search engine.

其中,结构化查询语言可以是SQL。The structured query language may be SQL.

其中,由于关系型数据库比较多,类型定义不一样,设置一字段映射关系,将各个关系型数据库的字段类型和全文搜索引擎中的字段类型进行映射,以便于后续表单引擎处理。Among them, because there are many relational databases and the type definitions are different, a field mapping relationship is set up to map the field types of each relational database with the field types in the full-text search engine, so as to facilitate subsequent form engine processing.

具体的,服务器利用结构化查询语言对多张单表进行处理,得到全文搜索引擎的结果索引,该结果索引包括的字段类型与多张表中字段类型相同,然后将结果索引中包括的字段类型根据全文搜索引擎中的字段映射关系进行映射处理,实现字段类型统一,从而得到全文搜索引擎的索引。Specifically, the server uses the structured query language to process multiple single tables to obtain a result index of the full-text search engine. The field types included in the result index are the same as the field types in the multiple tables, and then the field types included in the result index are based on the full-text search engine. The field mapping relationship in the mapping process is performed to realize the unification of field types, so as to obtain the index of the full-text search engine.

例如,在实施例图1中,提到user用户表A、user_role用户和角色关联表、role角色表,根据结构化查询语言SQL和字段映射关系可以生成如图4的单表(即全文搜索引擎的索引),可以看到该单表包括user用户表A、user_role用户和角色关联表、role角色表这三张单表中所有的字段。其中,该图4可以通过以下sql实现:For example, in FIG. 1 of the embodiment, the user user table A, the user_role user and role association table, and the role role table are mentioned. According to the structured query language SQL and the field mapping relationship, a single table (that is, a full-text search engine) as shown in FIG. 4 can be generated. index), you can see that the single table includes all the fields in the three single tables: user user table A, user_role user and role association table, and role role table. Among them, the figure 4 can be realized by the following sql:

select user.user_id,user.user_name,user.create_time,user.channel,select user.user_id,user.user_name,user.create_time,user.channel,

role.role_id,role.role_namerole.role_id,role.role_name

from user,user_role,rolefrom user,user_role,role

where user.user_id=user_role.user_id and user_role.role_id=role.role_idwhere user.user_id=user_role.user_id and user_role.role_id=role.role_id

根据上述sql得到结果索引的字段,并将结果索引的字段通过字段映射关系统一进行映射,从而构造出如图4中索引。The fields of the result index are obtained according to the above sql, and the fields of the result index are uniformly mapped through the field mapping relationship, thereby constructing the index as shown in Figure 4.

需要说明的是,如果不同的表,字段相同,可以在命名的时候,使用表名+字段作为结果索引的字段,以区分不同的单表。It should be noted that if different tables have the same fields, you can use the table name + field as the field of the result index when naming to distinguish different single tables.

在一种可行的实施例中,服务器利用结构化查询语言和字段映射关系对多张单表进行字段映射处理,以生成全文搜索引擎的索引之前,服务器可以确定各个关系型数据库的字段类型与全文搜索引擎中的字段类型之间的字段映射关系,并将字段映射关系存储在全文搜索引擎中,以便后续进行字段映射时直接使用该字段映射关系。例如,在表4中,可以将各个数据库字段类型映射为elasticsearch索引中的类型,如把int、integer等可以映射为long,把date,datetime,timestamp映射为date等等。In a feasible embodiment, the server uses the structured query language and field mapping relationship to perform field mapping processing on multiple single tables, so as to generate an index for the full-text search engine, the server may determine the field type of each relational database and the full-text search engine. The field mapping relationship between the field types in the , and the field mapping relationship is stored in the full-text search engine, so that the field mapping relationship can be directly used in subsequent field mapping. For example, in Table 4, each database field type can be mapped to the type in the elasticsearch index, such as int, integer, etc. can be mapped to long, date, datetime, timestamp can be mapped to date and so on.

表4Table 4

Figure BDA0002605484110000101
Figure BDA0002605484110000101

Figure BDA0002605484110000111
Figure BDA0002605484110000111

在一种可行的实施例中,利用结构化查询语言和字段映射关系对多张单表进行字段映射处理,以生成全文搜索引擎的索引之后,通过全量同步将多张单表中每张单表包括的数据导入全文搜索引擎的索引中,其具体实现方式为:服务器利用结构化查询语言查询多张单表中每张单表包括的数据,并将每张单表包括的数据导入到全文搜索引擎的索引中。若每张单表包括的数据过多,可以分批次进行导入全文搜索引擎的索引中,实现多张单表中每张单表包括的数据与全文搜索引擎的索引中的数据同步。In a feasible embodiment, the structured query language and the field mapping relationship are used to perform field mapping processing on multiple single tables to generate an index for a full-text search engine, and then the data included in each single table in the multiple single tables is imported into the full-text search through full synchronization. In the index of the engine, the specific implementation method is as follows: the server uses a structured query language to query the data included in each single table in the multiple single tables, and import the data included in each single table into the index of the full-text search engine. If each single table contains too much data, it can be imported into the index of the full-text search engine in batches, so that the data included in each single table of multiple single tables can be synchronized with the data in the index of the full-text search engine.

进一步地,当多张单表中任一单表包括的数据发生变化时,通过增量同步将发生变化的数据更新到全文搜索引擎的索引中,其具体实现方式为:当多张单表中任一单表包括的数据发生变化时,服务器根据任一单表发生变化的数据对应的字段将发生变化的数据更新到全文搜索引擎的索引中。当多张单表中任一单表包括的数据发生变化时,服务器把发生变化的数据放入队列中,当获取到负责更新该发生变化的数据的代码时,根据发生变化的数据对应的字段和全文搜索引擎中的字段映射关系来确定更新全文搜索引擎的索引对应的数据,即根据发生变化的数据对应的字段和字段映射关系找到全文搜索引擎的索引,然后将发生变化的数据更新到全文搜索引擎的索引中,例如,当上述对user用户表A、user_role用户和角色关联表、role角色表中role角色表进行修改(即role角色表包括的数据发生变化),根据role角色表中修改的数据对应的字段和全文搜索引擎中的字段映射关系来确定更新全文搜索引擎的索引对应的数据。Further, when the data included in any single table in the multiple single tables changes, the changed data is updated to the index of the full-text search engine through incremental synchronization. The specific implementation method is: when any single table in the multiple single tables changes When the included data changes, the server updates the changed data to the index of the full-text search engine according to the field corresponding to the changed data of any single table. When the data included in any one of the multiple single tables changes, the server puts the changed data into the queue, and when the code responsible for updating the changed data is obtained, the corresponding fields and full text of the changed data are obtained. The field mapping relationship in the search engine determines the data corresponding to the index of the updated full-text search engine, that is, the index of the full-text search engine is found according to the field and field mapping relationship corresponding to the changed data, and then the changed data is updated to the full-text search engine. In the index of , for example, when the user user table A, the user_role user and role association table, and the role role table in the role role table are modified (that is, the data included in the role role table changes), according to the modified data in the role role table The corresponding field and the field mapping relationship in the full-text search engine are used to determine the data corresponding to the index of the updated full-text search engine.

204、获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表。204. Acquire a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database.

205、获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段。205. Obtain an index of a full-text search engine corresponding to the multiple single tables, where the index of the full-text search engine is generated according to the multiple single tables, and the index of the full-text search engine includes all fields of the multiple single tables.

206、利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。206. Use the retrieval syntax of the full-text search engine to query the index of the full-text search engine for data matching the query condition.

其中,步骤204~206的具体实现方式可以参见上述数据查询方法中101~103中的相关描述,在此不再赘述。For the specific implementation manner of steps 204 to 206, reference may be made to the relevant descriptions in 101 to 103 in the above data query method, which will not be repeated here.

在本发明实施例中,服务器获取多张单表包括的字段中的多个字段,该多个字段是由管理员通过表单引擎配置界面从多张单表包括的字段中选取的,并根据多个字段从关系型数据库中获取多张单表,利用结构化查询语言和字段映射关系对多张单表进行字段映射处理,以生成全文搜索引擎的索引,获取用户通过查询界面提交的数据查询请求,该数据查询请求包括查询条件和与该查询条件相关的目标字段,该目标字段对应关系型数据库的多张单表,获取该多张单表对应的全文搜索引擎的索引,该全文搜索引擎的索引是根据多张单表生成的,该全文搜索引擎的索引包括多张单表的全部字段,利用全文搜索引擎的检索语法从全文搜索引擎的索引中查询与查询条件匹配的数据,实现将多表转成单表,间接实现对多表(跨表)查询的表单引擎,提高数据查询的效率。In this embodiment of the present invention, the server acquires multiple fields among the fields included in the multiple single sheets, the multiple fields are selected by the administrator from the fields included in the multiple single sheets through the form engine configuration interface, and the multiple fields are selected from the fields included in the multiple single sheets according to the multiple fields. Obtain multiple single tables from a database, use structured query language and field mapping to perform field mapping processing on multiple single tables to generate an index for a full-text search engine, and obtain data query requests submitted by users through the query interface. The data query request includes query conditions and the target field related to the query condition, the target field corresponds to multiple single tables of the relational database, and obtains the index of the full-text search engine corresponding to the multiple single tables, the index of the full-text search engine is generated according to the multiple single tables, the full-text search engine The index includes all fields of multiple single tables, and uses the retrieval syntax of the full-text search engine to query the data matching the query conditions from the index of the full-text search engine to convert multiple tables into a single table, and indirectly implement multi-table (cross-table) query form engine to improve the efficiency of data query.

请参阅图5,为本发明实施例提供的一种数据查询装置的结构示意图。本实施例中所描述的数据查询装置,该装置可由服务器执行,包括:Please refer to FIG. 5 , which is a schematic structural diagram of a data query apparatus according to an embodiment of the present invention. The data query device described in this embodiment, which can be executed by a server, includes:

获取模块501,用于获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表;The obtaining module 501 is configured to obtain a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database;

所述获取模块501,还用于获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段;The obtaining module 501 is further configured to obtain an index of a full-text search engine corresponding to the plurality of single tables, the index of the full-text search engine is generated according to the plurality of single tables, and the index of the full-text search engine includes the plurality of single tables all fields of ;

处理模块502,用于利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。The processing module 502 is configured to query the data matching the query condition from the index of the full-text search engine by using the retrieval syntax of the full-text search engine.

可选地,所述获取模块501,还用于:Optionally, the obtaining module 501 is further configured to:

获取所述多张单表包括的字段中的多个字段,所述多个字段是由管理员通过表单引擎配置界面从所述多张单表包括的字段中选取的;Acquiring multiple fields in the fields included in the multiple single sheets, the multiple fields are selected from the fields included in the multiple single sheets by the administrator through the form engine configuration interface;

根据所述多个字段从所述关系型数据库中获取所述多张单表;Acquiring the plurality of single tables from the relational database according to the plurality of fields;

利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引。Field mapping processing is performed on the multiple single tables by using structured query language and field mapping relationship, so as to generate an index of a full-text search engine.

可选地,所述处理模块502,还用于:Optionally, the processing module 502 is further configured to:

所述确定各个关系型数据库的字段类型与全文搜索引擎中的字段类型之间的字段映射关系;Determining the field mapping relationship between the field types of each relational database and the field types in the full-text search engine;

将所述字段映射关系存储在所述全文搜索引擎中。The field mapping relationship is stored in the full-text search engine.

可选地,所述多张单表包括单表之间的关联关系表,所述关联关系表包括单表的主外键关系。Optionally, the plurality of single tables include an association relationship table between the single tables, and the association relationship table includes primary and foreign key relationships of the single tables.

可选地,所述处理模块502利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引之后,还用于:Optionally, after the processing module 502 performs field mapping processing on the plurality of single tables by using structured query language and field mapping relationships to generate an index of a full-text search engine, the processing module 502 is also used for:

利用所述结构化查询语言查询所述多张单表中每张单表包括的数据;Use the structured query language to query the data included in each single table in the plurality of single tables;

将所述每张单表包括的数据导入到所述全文搜索引擎的索引中。The data included in each single table is imported into the index of the full-text search engine.

可选地,所述处理模块502,还用于:Optionally, the processing module 502 is further configured to:

当所述多张单表中任一单表包括的数据发生变化时,根据所述任一单表发生变化的数据对应的字段将所述发生变化的数据更新到所述全文搜索引擎的索引中。When the data included in any single table in the multiple single tables changes, the changed data is updated into the index of the full-text search engine according to the field corresponding to the changed data of the any single table.

可选地,所述处理模块502,具体用于:Optionally, the processing module 502 is specifically configured to:

利用所述全文搜索引擎的检索语法和所述查询条件构建检索语句;Use the retrieval syntax of the full-text search engine and the query conditions to construct a retrieval statement;

利用所述检索语句从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。Data matching the query condition is queried from the index of the full-text search engine by using the retrieval sentence.

可以理解的是,本实施例的数据查询装置的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例图1或者图2的相关描述,此处不再赘述。It can be understood that the functions of each functional module of the data query apparatus in this embodiment can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can refer to the relevant descriptions in FIG. 1 or FIG. 2 of the above method embodiments. It is not repeated here.

在本发明实施例中,获取模块501可以获取用户通过查询界面提交的数据查询请求,该数据查询请求包括查询条件和与该查询条件相关的目标字段,该目标字段对应关系型数据库的多张单表,并获取多张单表对应根据该多张单表生成的全文搜索引擎的索引,进而处理模块502利用全文搜索引擎的检索语法从全文搜索引擎的索引中查询与查询条件匹配的数据,可以支持存储数据的全文检索,实现跨多个表进行数据查询,并提高数据查询的效率。In this embodiment of the present invention, the obtaining module 501 may obtain a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database, And obtain the index of the full-text search engine generated according to the multiple single tables corresponding to the multiple single tables, and then the processing module 502 uses the retrieval syntax of the full-text search engine to query the index of the full-text search engine for data matching the query conditions, which can support full-text retrieval of stored data. , to implement data query across multiple tables and improve the efficiency of data query.

请参见图6,为本发明实施例提供的一种服务器的结构示意图。本实施例中所描述的服务器,包括:处理器601、网络接口602及存储器603。其中,处理器601、网络接口602及存储器603可通过总线或其他方式连接,本发明实施例以通过总线连接为例。Referring to FIG. 6 , it is a schematic structural diagram of a server according to an embodiment of the present invention. The server described in this embodiment includes: a processor 601 , a network interface 602 and a memory 603 . The processor 601, the network interface 602, and the memory 603 may be connected through a bus or other means, and the embodiment of the present invention takes the connection through a bus as an example.

其中,处理器601(或称中央处理器(Central Processing Unit,CPU))是服务器的计算核心以及控制核心。网络接口602可选的可以包括标准的有线接口、无线接口(如WI-FI、移动通信接口等),受处理器601的控制用于收发数据。存储器603(Memory)是服务器的记忆设备,用于存放程序和数据。可以理解的是,此处的存储器603可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器;可选的还可以是至少一个位于远离前述处理器601的存储装置。存储器603提供存储空间,该存储空间存储了服务器的操作系统和可执行程序代码,可包括但不限于:Windows系统(一种操作系统)、Linux(一种操作系统)系统等等,本发明对此并不作限定。The processor 601 (or called a central processing unit (Central Processing Unit, CPU)) is the computing core and the control core of the server. Optionally, the network interface 602 may include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), and is controlled by the processor 601 to send and receive data. The memory 603 (Memory) is a memory device of the server for storing programs and data. It can be understood that the memory 603 here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory; optionally, it can also be at least one memory located far away from the aforementioned processor 601. storage device. The memory 603 provides storage space, which stores the operating system and executable program codes of the server, which may include but are not limited to: Windows system (an operating system), Linux (an operating system) system, etc. This is not limited.

在本发明实施例中,处理器601通过运行存储器603中的可执行程序代码,执行如下操作:In this embodiment of the present invention, the processor 601 performs the following operations by running the executable program code in the memory 603:

获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表;obtaining a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database;

获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段;obtaining an index of a full-text search engine corresponding to the multiple single tables, where the index of the full-text search engine is generated according to the multiple single tables, and the index of the full-text search engine includes all fields of the multiple single tables;

利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。Data matching the query condition is queried from the index of the full-text search engine by using the retrieval syntax of the full-text search engine.

可选地,所述处理器601获取用户通过查询界面提交的数据查询请求之前,还用于:Optionally, before the processor 601 acquires the data query request submitted by the user through the query interface, it is further used for:

获取所述多张单表包括的字段中的多个字段,所述多个字段是由管理员通过表单引擎配置界面从所述多张单表包括的字段中选取的;Acquiring multiple fields in the fields included in the multiple single sheets, the multiple fields are selected from the fields included in the multiple single sheets by the administrator through the form engine configuration interface;

根据所述多个字段从所述关系型数据库中获取所述多张单表;Acquiring the plurality of single tables from the relational database according to the plurality of fields;

利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引。Field mapping processing is performed on the multiple single tables by using structured query language and field mapping relationship, so as to generate an index of a full-text search engine.

可选地,所述处理器601利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引之前,还用于::Optionally, before the processor 601 performs field mapping processing on the multiple single tables by using a structured query language and field mapping relationships, so as to generate an index of a full-text search engine, the processor 601 is further used for:

确定各个关系型数据库的字段类型与全文搜索引擎中的字段类型之间的字段映射关系;Determine the field mapping relationship between the field types of each relational database and the field types in the full-text search engine;

将所述字段映射关系存储在所述全文搜索引擎中。The field mapping relationship is stored in the full-text search engine.

可选地,所述多张单表包括单表之间的关联关系表,所述关联关系表包括单表的主外键关系。Optionally, the plurality of single tables include an association relationship table between the single tables, and the association relationship table includes primary and foreign key relationships of the single tables.

可选地,所述处理器601利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引之后,还用于:Optionally, after the processor 601 performs field mapping processing on the multiple single tables by using structured query language and field mapping relationships to generate an index of a full-text search engine, the processor 601 is further used for:

利用所述结构化查询语言查询所述多张单表中每张单表包括的数据;Use the structured query language to query the data included in each single table in the plurality of single tables;

将所述每张单表包括的数据导入到所述全文搜索引擎的索引中。The data included in each single table is imported into the index of the full-text search engine.

可选地,所述处理器601,还用于:Optionally, the processor 601 is further configured to:

当所述多张单表中任一单表包括的数据发生变化时,根据所述任一单表发生变化的数据对应的字段将所述发生变化的数据更新到所述全文搜索引擎的索引中。When the data included in any single table in the multiple single tables changes, the changed data is updated into the index of the full-text search engine according to the field corresponding to the changed data of the any single table.

可选地,所述处理器601,具体用于:Optionally, the processor 601 is specifically configured to:

利用所述全文搜索引擎的检索语法和所述查询条件构建检索语句;Use the retrieval syntax of the full-text search engine and the query conditions to construct a retrieval statement;

利用所述检索语句从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。Data matching the query condition is queried from the index of the full-text search engine by using the retrieval sentence.

在本发明实施例中,服务器601可以获取用户通过查询界面提交的数据查询请求,该数据查询请求包括查询条件和与该查询条件相关的目标字段,该目标字段对应关系型数据库的多张单表,并获取多张单表对应根据该多张单表生成的全文搜索引擎的索引,进而服务器601利用全文搜索引擎的检索语法从全文搜索引擎的索引中查询与查询条件匹配的数据,可以支持存储数据的全文检索,实现跨多个表进行数据查询,并提高数据查询的效率。In this embodiment of the present invention, the server 601 may acquire a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database, and Obtaining multiple single tables corresponding to the indexes of the full-text search engine generated according to the multiple single tables, and then the server 601 uses the retrieval syntax of the full-text search engine to query the index of the full-text search engine for data matching the query conditions, which can support the full-text search of the stored data and realize Query data across multiple tables and improve the efficiency of data query.

具体实现中,本发明实施例中所描述的处理器601、网络接口602及存储器603可执行本发明实施例提供的一种数据查询方法的流程中所描述的实现方式,也可执行本发明实施例提供的一种数据查询装置中所描述的实现方式,在此不再赘述。In the specific implementation, the processor 601, the network interface 602, and the memory 603 described in the embodiment of the present invention can execute the implementation manner described in the process of a data query method provided by the embodiment of the present invention, and can also execute the implementation of the present invention. The implementation manner described in the data query apparatus provided by the example is not repeated here.

本发明实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,可执行上述数据查询实施例中所执行的步骤。An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned data query can be executed steps performed in the examples.

本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述数据查询实施例中所执行的步骤。Embodiments of the present application also provide a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps performed in the above data query embodiment.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。The above disclosure is only a preferred embodiment of the present invention, and of course, it cannot limit the scope of rights of the present invention. Those of ordinary skill in the art can understand that all or part of the process for realizing the above-mentioned embodiment can be realized according to the rights of the present invention. The equivalent changes required to be made still belong to the scope covered by the invention.

Claims (10)

1.一种数据查询方法,其特征在于,所述方法包括:1. a data query method, characterized in that the method comprises: 获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表;obtaining a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database; 获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段;obtaining an index of a full-text search engine corresponding to the multiple single tables, where the index of the full-text search engine is generated according to the multiple single tables, and the index of the full-text search engine includes all fields of the multiple single tables; 利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。Data matching the query condition is queried from the index of the full-text search engine by using the retrieval syntax of the full-text search engine. 2.根据权利要求1所述的方法,其特征在于,所述获取用户通过查询界面提交的数据查询请求之前,所述方法还包括:2. The method according to claim 1, characterized in that, before obtaining the data query request submitted by the user through the query interface, the method further comprises: 获取所述多张单表包括的字段中的多个字段,所述多个字段是由管理员通过表单引擎配置界面从所述多张单表包括的字段中选取的;Acquiring multiple fields in the fields included in the multiple single sheets, the multiple fields are selected from the fields included in the multiple single sheets by the administrator through the form engine configuration interface; 根据所述多个字段从所述关系型数据库中获取所述多张单表;Acquiring the plurality of single tables from the relational database according to the plurality of fields; 利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引。Field mapping processing is performed on the multiple single tables by using structured query language and field mapping relationship, so as to generate an index of a full-text search engine. 3.根据权利要求2所述的方法,其特征在于,所述利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引之前,所述方法还包括:3. The method according to claim 2, characterized in that, before performing field mapping processing on the plurality of single tables by using structured query language and field mapping relationship to generate an index of a full-text search engine, the method further comprises: : 确定各个关系型数据库的字段类型与全文搜索引擎中的字段类型之间的字段映射关系;Determine the field mapping relationship between the field types of each relational database and the field types in the full-text search engine; 将所述字段映射关系存储在所述全文搜索引擎中。The field mapping relationship is stored in the full-text search engine. 4.根据权利要求2或3所述的方法,其特征在于,所述多张单表包括单表之间的关联关系表,所述关联关系表包括单表的主外键关系。4 . The method according to claim 2 or 3 , wherein the plurality of single tables comprises an association relationship table between the single tables, and the association relationship table includes primary and foreign key relationships of the single tables. 5 . 5.根据权利要求2所述的方法,其特征在于,所述利用结构化查询语言和字段映射关系对所述多张单表进行字段映射处理,以生成全文搜索引擎的索引之后,所述方法还包括:5. The method according to claim 2, characterized in that, after performing field mapping processing on the plurality of single tables by using structured query language and field mapping relationship to generate an index of a full-text search engine, the method further comprises: : 利用所述结构化查询语言查询所述多张单表中每张单表包括的数据;Use the structured query language to query the data included in each single table in the plurality of single tables; 将所述每张单表包括的数据导入到所述全文搜索引擎的索引中。The data included in each single table is imported into the index of the full-text search engine. 6.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, wherein the method further comprises: 当所述多张单表中任一单表包括的数据发生变化时,根据所述任一单表发生变化的数据对应的字段将所述发生变化的数据更新到所述全文搜索引擎的索引中。When the data included in any single table in the multiple single tables changes, the changed data is updated into the index of the full-text search engine according to the field corresponding to the changed data of the any single table. 7.根据权利要求1所述的方法,其特征在于,所述利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据,包括:7. The method according to claim 1, wherein the querying data matching the query condition from the index of the full-text search engine by using the retrieval syntax of the full-text search engine comprises: 利用所述全文搜索引擎的检索语法和所述查询条件构建检索语句;Use the retrieval syntax of the full-text search engine and the query conditions to construct a retrieval statement; 利用所述检索语句从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。Data matching the query condition is queried from the index of the full-text search engine by using the retrieval sentence. 8.一种数据查询装置,其特征在于,所述装置包括:8. A data query device, wherein the device comprises: 获取模块,用于获取用户通过查询界面提交的数据查询请求,所述数据查询请求包括查询条件和与所述查询条件相关的目标字段,所述目标字段对应关系型数据库的多张单表;an acquisition module, configured to acquire a data query request submitted by a user through a query interface, where the data query request includes a query condition and a target field related to the query condition, and the target field corresponds to multiple single tables of a relational database; 所述获取模块,还用于获取所述多张单表对应的全文搜索引擎的索引,所述全文搜索引擎的索引是根据所述多张单表生成的,所述全文搜索引擎的索引包括所述多张单表的全部字段;The obtaining module is further configured to obtain the index of the full-text search engine corresponding to the multiple single tables, the index of the full-text search engine is generated according to the multiple single tables, and the index of the full-text search engine includes the index of the multiple single tables. all fields; 处理模块,用于利用所述全文搜索引擎的检索语法从所述全文搜索引擎的索引中查询与所述查询条件匹配的数据。The processing module is configured to query the data matching the query condition from the index of the full-text search engine by using the retrieval syntax of the full-text search engine. 9.一种服务器,其特征在于,包括处理器、网络接口和存储装置,所述处理器、所述网络接口和所述存储装置相互连接,其中,所述网络接口受所述处理器的控制用于收发数据,所述存储装置用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行如权利要求1~7中任一项所述的数据查询方法。9. A server, comprising a processor, a network interface and a storage device, wherein the processor, the network interface and the storage device are connected to each other, wherein the network interface is controlled by the processor For sending and receiving data, the storage device is used for storing a computer program, the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the program according to any one of claims 1 to 7 data query method. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1-7任一项所述的数据查询方法。10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to execute The data query method according to any one of claims 1-7.
CN202010737086.1A 2020-07-28 2020-07-28 A data query method, device, server and readable storage medium Pending CN111767303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010737086.1A CN111767303A (en) 2020-07-28 2020-07-28 A data query method, device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010737086.1A CN111767303A (en) 2020-07-28 2020-07-28 A data query method, device, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN111767303A true CN111767303A (en) 2020-10-13

Family

ID=72727586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010737086.1A Pending CN111767303A (en) 2020-07-28 2020-07-28 A data query method, device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN111767303A (en)

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112269806A (en) * 2020-12-11 2021-01-26 深圳市房多多网络科技有限公司 Data query method, device, equipment and computer storage medium
CN112463827A (en) * 2020-11-16 2021-03-09 北京达佳互联信息技术有限公司 Query method and device, electronic equipment and storage medium
CN112507200A (en) * 2020-12-28 2021-03-16 浪潮云信息技术股份公司 Method and apparatus for synchronizing data into search engine
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment
CN112711649A (en) * 2020-12-25 2021-04-27 政采云有限公司 Database multi-field matching method, device, equipment and storage medium
CN112905600A (en) * 2021-03-19 2021-06-04 腾讯科技(深圳)有限公司 Data query method and device, storage medium and electronic equipment
CN113111641A (en) * 2021-04-20 2021-07-13 上海渠杰信息科技有限公司 Data operation method and equipment based on full-text search engine
CN113127596A (en) * 2021-05-08 2021-07-16 北京明略昭辉科技有限公司 Full-text retrieval method, system, electronic equipment and storage medium
CN113157754A (en) * 2021-03-22 2021-07-23 招银云创信息技术有限公司 Method, device and equipment for displaying flow form data and storage medium
CN113918565A (en) * 2021-09-30 2022-01-11 北方健康医疗大数据科技有限公司 Data storage method and device, electronic equipment and storage medium
CN114356930A (en) * 2021-12-31 2022-04-15 中国农业银行股份有限公司 Public opinion data query method and related device
CN114385680A (en) * 2021-12-15 2022-04-22 江苏电力信息技术有限公司 Elasticissearch-based database multi-table association query speed optimization method
CN114385721A (en) * 2022-01-14 2022-04-22 阳光财产保险股份有限公司 Data visualization query method and device, electronic equipment and storage medium
CN114398403A (en) * 2022-01-14 2022-04-26 中国建设银行股份有限公司 Data searching method, device, equipment and computer program product
CN114416775A (en) * 2022-01-14 2022-04-29 北京百度网讯科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN114741392A (en) * 2022-04-14 2022-07-12 北京字节跳动网络技术有限公司 Data query method, device, electronic device and storage medium
CN114896458A (en) * 2022-05-12 2022-08-12 河南创源生物技术有限公司 A pig gene bank data retrieval method, system and storage medium
CN114925118A (en) * 2022-06-09 2022-08-19 北京百度网讯科技有限公司 Cross-table search method, device, equipment and storage medium
CN115617859A (en) * 2022-12-16 2023-01-17 安徽华云安科技有限公司 Data query method and device based on knowledge graph cluster
CN115757387A (en) * 2022-08-19 2023-03-07 北京银丰新融科技开发有限公司 A Method of Association Integration and Fast Retrieval Supporting Multi-source Heterogeneous Data
CN116010682A (en) * 2023-01-10 2023-04-25 中国建设银行股份有限公司 Data query method and its device, equipment, medium and product
CN116126850A (en) * 2022-08-12 2023-05-16 马上消费金融股份有限公司 Data storage method, data query method and related devices
CN116204556A (en) * 2022-12-29 2023-06-02 上海云砺信息科技有限公司 Real-time object storage query system based on search engine and relational database
CN116431675A (en) * 2023-04-24 2023-07-14 上海聚货通电子商务有限公司 A multi-table associated data query method, system and device
CN117033387A (en) * 2023-08-23 2023-11-10 山东中创软件商用中间件股份有限公司 Data query management method, device, equipment and storage medium
WO2024000896A1 (en) * 2022-06-27 2024-01-04 深圳前海微众银行股份有限公司 Sql script optimization method and device
CN119961346A (en) * 2023-10-30 2025-05-09 荣耀终端股份有限公司 Data synchronization method, device and electronic device
CN120086264A (en) * 2025-04-30 2025-06-03 武汉佰思杰科技有限公司 Relational database query method, device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446289A (en) * 2017-09-26 2018-08-24 北京中安智达科技有限公司 A kind of data retrieval method for supporting heterogeneous database
CN108491470A (en) * 2018-03-07 2018-09-04 北京奇安信科技有限公司 For the management method, server-side and management method of search server
CN108874924A (en) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 Creation method, device and the computer readable storage medium of search service
CN110321344A (en) * 2019-05-20 2019-10-11 平安普惠企业管理有限公司 Information query method, device, computer equipment and the storage medium of associated data
CN111382226A (en) * 2018-12-29 2020-07-07 北京神州泰岳软件股份有限公司 Database query retrieval method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446289A (en) * 2017-09-26 2018-08-24 北京中安智达科技有限公司 A kind of data retrieval method for supporting heterogeneous database
CN108491470A (en) * 2018-03-07 2018-09-04 北京奇安信科技有限公司 For the management method, server-side and management method of search server
CN108874924A (en) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 Creation method, device and the computer readable storage medium of search service
CN111382226A (en) * 2018-12-29 2020-07-07 北京神州泰岳软件股份有限公司 Database query retrieval method and device and electronic equipment
CN110321344A (en) * 2019-05-20 2019-10-11 平安普惠企业管理有限公司 Information query method, device, computer equipment and the storage medium of associated data

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463827A (en) * 2020-11-16 2021-03-09 北京达佳互联信息技术有限公司 Query method and device, electronic equipment and storage medium
CN112463827B (en) * 2020-11-16 2024-03-12 北京达佳互联信息技术有限公司 Query methods, devices, electronic equipment and storage media
CN112269806A (en) * 2020-12-11 2021-01-26 深圳市房多多网络科技有限公司 Data query method, device, equipment and computer storage medium
CN112269806B (en) * 2020-12-11 2021-03-19 深圳市房多多网络科技有限公司 Data query method, device, equipment and computer storage medium
CN112711649A (en) * 2020-12-25 2021-04-27 政采云有限公司 Database multi-field matching method, device, equipment and storage medium
CN112507200A (en) * 2020-12-28 2021-03-16 浪潮云信息技术股份公司 Method and apparatus for synchronizing data into search engine
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment
CN112905600A (en) * 2021-03-19 2021-06-04 腾讯科技(深圳)有限公司 Data query method and device, storage medium and electronic equipment
CN112905600B (en) * 2021-03-19 2023-09-26 腾讯科技(深圳)有限公司 Data query method and device, storage medium and electronic equipment
CN113157754B (en) * 2021-03-22 2023-01-31 招银云创信息技术有限公司 Method, device and equipment for displaying flow form data and storage medium
CN113157754A (en) * 2021-03-22 2021-07-23 招银云创信息技术有限公司 Method, device and equipment for displaying flow form data and storage medium
CN113111641A (en) * 2021-04-20 2021-07-13 上海渠杰信息科技有限公司 Data operation method and equipment based on full-text search engine
CN113127596A (en) * 2021-05-08 2021-07-16 北京明略昭辉科技有限公司 Full-text retrieval method, system, electronic equipment and storage medium
CN113918565A (en) * 2021-09-30 2022-01-11 北方健康医疗大数据科技有限公司 Data storage method and device, electronic equipment and storage medium
CN114385680A (en) * 2021-12-15 2022-04-22 江苏电力信息技术有限公司 Elasticissearch-based database multi-table association query speed optimization method
CN114356930A (en) * 2021-12-31 2022-04-15 中国农业银行股份有限公司 Public opinion data query method and related device
CN114385721A (en) * 2022-01-14 2022-04-22 阳光财产保险股份有限公司 Data visualization query method and device, electronic equipment and storage medium
CN114398403A (en) * 2022-01-14 2022-04-26 中国建设银行股份有限公司 Data searching method, device, equipment and computer program product
CN114416775A (en) * 2022-01-14 2022-04-29 北京百度网讯科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN114741392A (en) * 2022-04-14 2022-07-12 北京字节跳动网络技术有限公司 Data query method, device, electronic device and storage medium
CN114896458A (en) * 2022-05-12 2022-08-12 河南创源生物技术有限公司 A pig gene bank data retrieval method, system and storage medium
CN114925118A (en) * 2022-06-09 2022-08-19 北京百度网讯科技有限公司 Cross-table search method, device, equipment and storage medium
WO2024000896A1 (en) * 2022-06-27 2024-01-04 深圳前海微众银行股份有限公司 Sql script optimization method and device
CN116126850A (en) * 2022-08-12 2023-05-16 马上消费金融股份有限公司 Data storage method, data query method and related devices
CN115757387A (en) * 2022-08-19 2023-03-07 北京银丰新融科技开发有限公司 A Method of Association Integration and Fast Retrieval Supporting Multi-source Heterogeneous Data
CN115617859A (en) * 2022-12-16 2023-01-17 安徽华云安科技有限公司 Data query method and device based on knowledge graph cluster
CN116204556A (en) * 2022-12-29 2023-06-02 上海云砺信息科技有限公司 Real-time object storage query system based on search engine and relational database
CN116204556B (en) * 2022-12-29 2023-11-28 上海云砺信息科技有限公司 Real-time object storage query system based on search engine and relational database
CN116010682A (en) * 2023-01-10 2023-04-25 中国建设银行股份有限公司 Data query method and its device, equipment, medium and product
CN116010682B (en) * 2023-01-10 2025-10-28 中国建设银行股份有限公司 Data query method and its device, equipment, medium and product
CN116431675A (en) * 2023-04-24 2023-07-14 上海聚货通电子商务有限公司 A multi-table associated data query method, system and device
CN117033387A (en) * 2023-08-23 2023-11-10 山东中创软件商用中间件股份有限公司 Data query management method, device, equipment and storage medium
CN119961346A (en) * 2023-10-30 2025-05-09 荣耀终端股份有限公司 Data synchronization method, device and electronic device
CN119961346B (en) * 2023-10-30 2025-12-12 荣耀终端股份有限公司 Data synchronization method and device and electronic equipment
CN120086264A (en) * 2025-04-30 2025-06-03 武汉佰思杰科技有限公司 Relational database query method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN111767303A (en) A data query method, device, server and readable storage medium
US12099472B2 (en) Utilizing metadata to prune a data set
US11475034B2 (en) Schemaless to relational representation conversion
JP7130600B2 (en) Implementing semi-structured data as first-class database elements
US10318491B1 (en) Object metadata query with distributed processing systems
US11494337B2 (en) Data pruning based on metadata
US9081837B2 (en) Scoped database connections
US11216455B2 (en) Supporting synergistic and retrofittable graph queries inside a relational database
TW202032386A (en) Data storage apparatus, translation apparatus, and database access method
WO2019017997A1 (en) Distributed graph database writes
US11188228B1 (en) Graphing transaction operations for transaction compliance analysis
US11567957B2 (en) Incremental addition of data to partitions in database tables
Lamllari Extending a methodology for migration of the database layer to the Cloud considering relational database schema migration to NoSQL
Brad Data De-Duplication in NoSQL Databases

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
TA01 Transfer of patent application right

Effective date of registration: 20230920

Address after: 100190 Beijing Haidian District Zhichun Road 49 No. 3 West 309

Applicant after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors

Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TA01 Transfer of patent application right