[go: up one dir, main page]

CN116303610A - Database data query method, device, electronic equipment and storage medium based on state dictionary - Google Patents

Database data query method, device, electronic equipment and storage medium based on state dictionary Download PDF

Info

Publication number
CN116303610A
CN116303610A CN202310275693.4A CN202310275693A CN116303610A CN 116303610 A CN116303610 A CN 116303610A CN 202310275693 A CN202310275693 A CN 202310275693A CN 116303610 A CN116303610 A CN 116303610A
Authority
CN
China
Prior art keywords
hash
data
query
target
value
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
CN202310275693.4A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202310275693.4A priority Critical patent/CN116303610A/en
Publication of CN116303610A publication Critical patent/CN116303610A/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/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • 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
    • G06F16/2255Hash tables
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a database data query method and device based on a state dictionary, electronic equipment and a storage medium. The method is characterized by comprising the following steps: receiving a data query instruction aiming at a target database, and determining target query data corresponding to the data query instruction; performing hash calculation on the target query data according to a hash function set stored in a state dictionary, and determining a query hash value of the target query data; and if the hash bit number group stored in the state dictionary has the same target hash value as the query hash value, sending the data query instruction to a target database for data query. The method and the device realize the pre-query of the data stored in the database, can filter the data which does not exist in the database through the state dictionary, reduce the times of querying the database by invalid data and improve the query efficiency.

Description

基于状态字典的数据库数据查询方法、装置、电子设备和存储 介质Database data query method, device, electronic equipment and storage based on state dictionary medium

技术领域technical field

本发明涉及数据库查询领域,尤其涉及一种基于状态字典的数据库数据查询方法、装置、电子设备和存储介质。The invention relates to the field of database query, in particular to a database data query method, device, electronic equipment and storage medium based on a state dictionary.

背景技术Background technique

在信息化社会中,信息的交互的场景随处可见,用户在应用端请求服务端获取数据,服务端根据用户请求在数据库系统中查询相应的数据,并将查询的数据进行反馈,而现有的服务端通常集成多个功能,业务复杂且访问量高,数据访问量呈指数倍增长,性能较低的数据库在面对高并发的数据请求时,难以及时的反馈数据请求,难以快速响应。为了节约硬件资源和成本,现有技术通常是对服务端的数据请求中的信息做优化和预处理,再将处理后的数据请求发送至数据库中,以便数据库能够快速响应数据请求。但是现有技术虽然提高了数据库的响应速度,但是无法过滤数据请求,仍然需要在数据库中逐个查询,浪费数据库资源。In the information society, the scene of information interaction can be seen everywhere. The user requests the server to obtain data on the application side, and the server queries the corresponding data in the database system according to the user's request, and feeds back the queried data. The existing The server usually integrates multiple functions, the business is complex and the access volume is high, and the data access volume increases exponentially. When faced with high concurrent data requests, it is difficult for a database with low performance to respond to data requests in a timely manner and respond quickly. In order to save hardware resources and costs, the existing technology usually optimizes and preprocesses the information in the data request of the server, and then sends the processed data request to the database, so that the database can quickly respond to the data request. However, although the prior art improves the response speed of the database, it cannot filter data requests, and still needs to query one by one in the database, which wastes database resources.

发明内容Contents of the invention

本发明提供了一种基于状态字典的数据库数据查询方法、装置、电子设备和存储介质,以实现对数据库的数据请求进行过滤,提高数据库的响应速度。The invention provides a database data query method, device, electronic equipment and storage medium based on a state dictionary, so as to filter the data requests of the database and improve the response speed of the database.

根据本发明的一方面,提供了一种基于状态字典的数据库数据查询方法,包括:According to one aspect of the present invention, a kind of database data query method based on state dictionary is provided, comprising:

接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据;receiving a data query instruction for the target database, and determining the target query data corresponding to the data query instruction;

根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值;Perform hash calculation on the target query data according to the hash function group stored in the state dictionary, and determine the query hash value of the target query data;

如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询。If the hash bit array stored in the state dictionary has the same target hash value as the query hash value, the data query instruction is sent to the target database for data query.

根据本发明的另一方面,提供了一种基于状态字典的数据库数据查询装置、包括:According to another aspect of the present invention, a kind of database data query device based on state dictionary is provided, comprising:

数据查询模块,用于接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据;A data query module, configured to receive a data query instruction for the target database, and determine the target query data corresponding to the data query instruction;

哈希计算模块,用于根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值;a hash calculation module, configured to perform hash calculation on the target query data according to the hash function group stored in the state dictionary, and determine the query hash value of the target query data;

哈希验证模块,用于如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询。The hash verification module is configured to send the data query instruction to the target database for data query if the hash bit array stored in the state dictionary has the same target hash value as the query hash value.

根据本发明的另一方面,提供了一种电子设备,所述电子设备包括:According to another aspect of the present invention, an electronic device is provided, and the electronic device includes:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的基于状态字典的数据库数据查询方法。The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the method described in any embodiment of the present invention. A database data query method based on a state dictionary.

根据本发明的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的基于状态字典的数据库数据查询方法。According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any of the embodiments of the present invention when executed. The database data query method based on the state dictionary.

本发明实施例的技术方案通过接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据,在进入数据库之前确定目标查询数据,能够提高数据查询的准确率;根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值,通过查询哈希值能够确认目标查询数据在数据库中存在状态,提高数据库响应速度,减少数据库资源的浪费;如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询,在状态字典确认数据库中存在目标查询数据,将数据查询指令发送至目标数据库,实现了数据库的快速反应,提高了数据库的响应速度,解决了现有技术中难以过滤对数据库数据请求的技术问题,提高了数据库的反馈效率,节省了数据库资源。The technical solution of the embodiment of the present invention can improve the accuracy of data query by receiving the data query instruction for the target database, determining the target query data corresponding to the data query instruction, and determining the target query data before entering the database; according to the state dictionary The stored hash function group performs hash calculation on the target query data, determines the query hash value of the target query data, and can confirm the existence status of the target query data in the database by querying the hash value, thereby improving the response speed of the database, Reduce the waste of database resources; if the hash bit array stored in the state dictionary has the same target hash value as the query hash value, send the data query instruction to the target database for data query, and confirm in the state dictionary There is target query data in the database, and the data query command is sent to the target database, which realizes the rapid response of the database, improves the response speed of the database, solves the technical problem that it is difficult to filter the request for database data in the prior art, and improves the performance of the database. Feedback efficiency saves database resources.

应当理解,本部分所描述的内容并非旨在标识本发明的实施例的关键或重要特征,也不用于限制本发明的范围。本发明的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will be easily understood from the following description.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

图1是本发明实施例一提供的一种基于状态字典的数据库数据查询方法的流程图;Fig. 1 is a flow chart of a database data query method based on a state dictionary provided by Embodiment 1 of the present invention;

图2为本发明实施例公开的一种状态字典的示意图;FIG. 2 is a schematic diagram of a state dictionary disclosed in an embodiment of the present invention;

图3为本发明实施例公开的一种计数链表的示意图;FIG. 3 is a schematic diagram of a counting linked list disclosed in an embodiment of the present invention;

图4是本发明实施例二提供的另一种基于状态字典的数据库数据查询方法的流程图;4 is a flow chart of another state dictionary-based database data query method provided in Embodiment 2 of the present invention;

图5是本发明实施例三提供的另一种基于状态字典的数据库数据查询方法的流程图;5 is a flow chart of another state dictionary-based database data query method provided by Embodiment 3 of the present invention;

图6为本发明实施例公开的一种预测成功率、预设扩容系数和哈希函数的数量的关联关系的示意图;FIG. 6 is a schematic diagram of the relationship between a prediction success rate, a preset expansion coefficient, and the number of hash functions disclosed in an embodiment of the present invention;

图7为本发明实施例公开一种目标数据库添加数据时更新状态字典的示意图;7 is a schematic diagram of updating a state dictionary when adding data to a target database disclosed by an embodiment of the present invention;

图8为本发明实施例公开一种目标数据库删除数据时更新状态字典的示意图;8 is a schematic diagram of updating a state dictionary when a target database deletes data according to an embodiment of the present invention;

图9是本发明实施例三提供的一种基于状态字典的数据库数据查询装置的结构示意图;9 is a schematic structural diagram of a database data query device based on a state dictionary provided by Embodiment 3 of the present invention;

图10是实现本发明实施例的基于状态字典的数据库数据查询方法的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device implementing a state dictionary-based database data query method according to an embodiment of the present invention.

具体实施方式Detailed ways

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

实施例一Embodiment one

图1是本发明实施例一提供了一种基于状态字典的数据库数据查询方法的流程图,本实施例可适用于服务端向数据库进行数据查询的情况,该方法可以由基于状态字典的数据库数据查询装置来执行,该基于状态字典的数据库数据查询装置可以采用硬件和/或软件的形式实现,该基于状态字典的数据库数据查询装置可配置于电子设备中。如图1所示,该方法包括:Fig. 1 is a flowchart of a database data query method based on a state dictionary provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where the server performs data query to the database. The database data query device based on the state dictionary can be implemented in the form of hardware and/or software, and the database data query device based on the state dictionary can be configured in electronic equipment. As shown in Figure 1, the method includes:

S110、接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据。S110. Receive a data query instruction for the target database, and determine target query data corresponding to the data query instruction.

其中,目标数据库是服务端请求数据的数据库;目标数据库用于存储管理多个目标查询数据。目标数据库可以包括MySQL数据库、SQL(Structured Query Language)Server、MongoDB数据库和其他非关系数据库中的至少一种。Wherein, the target database is a database for data requested by the server; the target database is used to store and manage multiple target query data. The target database may include at least one of MySQL database, SQL (Structured Query Language) Server, MongoDB database and other non-relational databases.

其中,数据查询指令可以是客户端向服务端请求目标查询数据的查询指令;数据查询指令用于通过服务端获取数据库中的目标查询数据。Wherein, the data query instruction may be a query instruction for the client to request the target query data from the server; the data query instruction is used to obtain the target query data in the database through the server.

可选的,服务端是向客户端提供服务和资源,服务端可以是服务器端,也可以是任意能够提供服务的程序。其中,服务端和客户端可以是在同一设备中。Optionally, the server is to provide services and resources to the client, and the server may be a server or any program capable of providing services. Wherein, the server and the client may be in the same device.

其中,目标查询数据可以是客户端请求查询的数据。需要说明的是,在本发明实施例中,客户端向服务器请求目标查询数据时,客户端和服务端无法获知目标数据库中是否存在目标查询数据,需要根据目标查询指令在目标数据库中查询后,才能获知目标数据库中是否存储目标查询数据。Wherein, the target query data may be the data that the client requests to query. It should be noted that, in the embodiment of the present invention, when the client requests the target query data from the server, the client and the server cannot know whether the target query data exists in the target database. After querying in the target database according to the target query instruction, In order to know whether the target query data is stored in the target database.

具体的,用户在客户端使用服务端提供的服务,向服务端请求服务时,发出针对目标服务器的数据查询指令,服务端在接受到数据查询指令,确定数据查询指令查询的目标查询数据。Specifically, when the user requests the service from the server using the service provided by the server, the user issues a data query command for the target server, and the server determines the target query data queried by the data query command after receiving the data query command.

可选的,服务端在接受到数据查询指令,可以对数据查询指令进行指令解析,确定数据查询指令查询的目标查询数据,并确定目标查询数据对应的目标数据库。Optionally, after receiving the data query instruction, the server may analyze the data query instruction, determine the target query data queried by the data query command, and determine the target database corresponding to the target query data.

S120、根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值。S120. Perform hash calculation on the target query data according to the hash function group stored in the state dictionary, and determine a query hash value of the target query data.

其中,哈希函数组可以是在状态字典中存储多个哈希函数。哈希函数组可以用于计算目标查询数据的哈希值。本发明实施例使用的哈希函数对应的算法可以是MD5算法、安全哈希算法、直接定址法、数字分析法、折叠法、平方取中法、减去法、基数转换法、除留余数法、随机乘数法和字符串数值哈希法中的至少一种。Wherein, the hash function group may store multiple hash functions in the state dictionary. The hash function group can be used to calculate the hash value of the target query data. The algorithm corresponding to the hash function used in the embodiment of the present invention may be MD5 algorithm, secure hash algorithm, direct addressing method, digital analysis method, folding method, square method, subtraction method, base conversion method, and division and remainder method , at least one of random multiplier method and string value hash method.

其中,状态字典可以是在服务端创建的用于记录目标数据库中数据的数据结构。可选的,在本发明实施例中,状态字典由哈希函数组、哈希位数组和计数链表三个部分组成,状态字典、哈希位数组和计数链表的长度相同。其中,哈希位数组可以是记录哈希值的位数组,哈希位数组可以是一维数组;计数链表可以是记录哈希位数组每个位数数量的链表,计数链表可以是二维数组。Wherein, the state dictionary may be a data structure created on the server side for recording data in the target database. Optionally, in this embodiment of the present invention, the state dictionary is composed of three parts: a hash function group, a hash bit array, and a count linked list, and the state dictionary, the hash bit array, and the count linked list have the same length. Wherein, the hash bit array can be a bit array recording the hash value, and the hash bit array can be a one-dimensional array; the counting linked list can be a linked list recording the number of digits of each hash bit array, and the counting linked list can be a two-dimensional array .

示例性的,图2为本发明实施例公开的一种状态字典的示意图。图3为本发明实施例公开的一种计数链表的示意图。如图2和图3所示,状态字典的长度用L表示,哈希位数组和计数链表的长度与状态字典的长度相同,且都为L,计数链表为二维数组,用Count_List进行表示。Exemplarily, FIG. 2 is a schematic diagram of a state dictionary disclosed by an embodiment of the present invention. Fig. 3 is a schematic diagram of a counting linked list disclosed by an embodiment of the present invention. As shown in Figure 2 and Figure 3, the length of the state dictionary is represented by L, the length of the hash bit array and the count list are the same as the length of the state dictionary, and both are L, and the count list is a two-dimensional array, represented by Count_List.

其中,查询哈希值可以是目标查询数据通过哈希函数计算得到的哈希值;查询哈希值用于确定目标数据库中是否存在目标查询数据。Wherein, the query hash value may be a hash value obtained by calculating the target query data through a hash function; the query hash value is used to determine whether the target query data exists in the target database.

具体的,服务端将目标查询数据发送至状态字典,状态字典中存储的哈希函数组对目标查询数据进行哈希计算,得到目标查询数据对应的查询哈希值。Specifically, the server sends the target query data to the state dictionary, and the hash function group stored in the state dictionary performs hash calculation on the target query data to obtain a query hash value corresponding to the target query data.

S130、如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询。S130. If the hash bit array stored in the state dictionary has the same target hash value as the query hash value, send the data query instruction to the target database for data query.

其中,目标哈希值可以是哈希位数组中存储的哈希值;目标哈希值可以是用于判断目标数据库中是否存在目标查询数据。可选的,在本发明实施例中,在哈希位数组中查询是否存在与查询哈希值相同的目标哈希值,根据查询哈希值确定哈希位数组中数据的位置,如果查询哈希值对应的位置的已经存在数据,则认为哈希位数组中存在与查询哈希值相同的目标哈希值;相反,如果询哈希值对应的位置的不存在数据,则认为哈希位数组中不存在与查询哈希值相同的目标哈希值。Wherein, the target hash value may be a hash value stored in the hash bit array; the target hash value may be used to determine whether the target query data exists in the target database. Optionally, in this embodiment of the present invention, whether there is a target hash value identical to the query hash value in the hash bit array is queried, and the position of the data in the hash bit array is determined according to the query hash value. If there is already existing data at the location corresponding to the hash value, it is considered that the hash bit array has the same target hash value as the query hash value; on the contrary, if there is no data at the location corresponding to the query hash value, the hash bit is considered to be The same target hash as the query hash does not exist in the array.

具体的,在状态字典中得到与目标查询数据对应的查询哈希值,将查询哈希值传入哈希位数组中,判断哈希位数组是否存在与查询哈希值相同的目标哈希值,如果哈希位数组中存在与查询哈希值相同的目标哈希值,则确定目标数据库中存在目标查询数据,进而将数据查询指令发送至目标数据库进行数据查询;如果哈希位数组中不存在与查询哈希值相同的目标哈希值,则确定目标数据库中不存在目标查询数据,则向服务端返回目标数据库不存在目标查询数据。Specifically, get the query hash value corresponding to the target query data in the state dictionary, pass the query hash value into the hash bit array, and judge whether the hash bit array has the same target hash value as the query hash value , if there is a target hash value identical to the query hash value in the hash bit array, it is determined that the target query data exists in the target database, and then the data query instruction is sent to the target database for data query; if there is no If there is a target hash value identical to the query hash value, it is determined that the target query data does not exist in the target database, and the target query data does not exist in the target database is returned to the server.

本发明实施例的技术方案通过接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据,在进入数据库之前确定目标查询数据,能够提高数据查询的准确率;根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值,通过查询哈希值能够确认目标查询数据在数据库中存在状态,提高数据库响应速度,减少数据库资源的浪费;如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询,在状态字典确认数据库中存在目标查询数据,将数据查询指令发送至目标数据库,实现了数据库的快速反应,提高了数据库的响应速度,解决了现有技术中难以过滤对数据库数据请求的技术问题,提高了数据库的反馈效率,节省了数据库资源。The technical solution of the embodiment of the present invention can improve the accuracy of data query by receiving the data query instruction for the target database, determining the target query data corresponding to the data query instruction, and determining the target query data before entering the database; according to the state dictionary The stored hash function group performs hash calculation on the target query data, determines the query hash value of the target query data, and can confirm the existence status of the target query data in the database by querying the hash value, thereby improving the response speed of the database, Reduce the waste of database resources; if the hash bit array stored in the state dictionary has the same target hash value as the query hash value, send the data query instruction to the target database for data query, and confirm in the state dictionary There is target query data in the database, and the data query command is sent to the target database, which realizes the rapid response of the database, improves the response speed of the database, solves the technical problem that it is difficult to filter the request for database data in the prior art, and improves the performance of the database. Feedback efficiency saves database resources.

实施例二Embodiment two

图4是本发明实施例二提供的另一种基于状态字典的数据库数据查询方法的流程图,本实施例与上述实施例之间的关系为通过哈希函数组计算查询哈希值的具体方法。如图4所示,该基于状态字典的数据库数据查询方法包括:Fig. 4 is a flow chart of another state dictionary-based database data query method provided by Embodiment 2 of the present invention. The relationship between this embodiment and the above-mentioned embodiment is the specific method of calculating the query hash value through the hash function group . As shown in Figure 4, the database data query method based on the state dictionary includes:

S210、接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据。S210. Receive a data query instruction for the target database, and determine target query data corresponding to the data query instruction.

S220、根据所述目标查询数据确定目标查询数据对应的目标查询字符;根据所述目标查询字符将目标查询数据划分为多个目标查询子数据;根据所述哈希函数对多个所述目标查询子数据进行哈希计算,确定目标查询数据的查询哈希值。S220. Determine the target query character corresponding to the target query data according to the target query data; divide the target query data into multiple target query sub-data according to the target query character; The hash calculation is performed on the sub-data to determine the query hash value of the target query data.

其中,哈希函数组包括至少一个哈希函数。在状态字典中可以根据哈希计算的需求,设置至少一个哈希函数。Wherein, the hash function group includes at least one hash function. In the state dictionary, at least one hash function can be set according to the requirements of hash calculation.

其中,目标查询字符可以是目标查询数据对应的多个字符。需要说明的是,目标查询数据通常是由多个字符组成,根据目标查询数据确定对应目标查询字符。其中,字符包括字母、数字、运算符号、标点符号和其他符号。Wherein, the target query character may be a plurality of characters corresponding to the target query data. It should be noted that the target query data is usually composed of multiple characters, and the corresponding target query characters are determined according to the target query data. Wherein, characters include letters, numbers, operation symbols, punctuation marks and other symbols.

其中,目标查询子数据可以对目标查询数据的每一个字符组成的数据。Wherein, the target query sub-data may be data composed of each character of the target query data.

可选的,本发明实施例中,在获取到目标查询数据目标查询字符,将目标查询数据按照每个字符进行划分,每一个字符划分为一个目标查询子数据,得到多个目标查询子数据。Optionally, in the embodiment of the present invention, after the target query character of the target query data is obtained, the target query data is divided according to each character, each character is divided into a target query sub-data, and multiple target query sub-data are obtained.

可选的,本发明实施例还可以设置划分的目标查询数据的单位字符数量,根据单位字符数量对目标查询数据进行划分,划分字符数量为单位字符数量的多个目标查询子数据。其中,单位字符数量为至少一个字符。Optionally, in this embodiment of the present invention, the number of unit characters of the divided target query data can be set, and the target query data is divided according to the number of unit characters, and the number of characters is divided into multiple target query subdata with the number of unit characters. Wherein, the number of unit characters is at least one character.

具体的,状态字典获取到目标查询数据,确定目标查询数据对应的目标查询字符,根据目标查询字符对目标查询数据进行字符划分,划分为多个目标查询子数据,进而通过哈希函数对多个目标查询子数据进行哈希计算,确定目标查询数据的查询哈希值。Specifically, the state dictionary obtains the target query data, determines the target query character corresponding to the target query data, divides the target query data into characters according to the target query character, and divides the target query data into multiple target query sub-data, and then uses the hash function to Perform hash calculation on the target query sub-data to determine the query hash value of the target query data.

可选的,在本发明另一可选实施例中,所述查询哈希值包括至少一个哈希位数值;所述根据所述哈希函数对多个所述目标查询子数据进行哈希计算,确定目标查询数据的查询哈希值,包括:Optionally, in another optional embodiment of the present invention, the query hash value includes at least one hash bit value; performing hash calculation on a plurality of target query sub-data according to the hash function , to determine the query hash value of the target query data, including:

根据预设随机数生成方法根据哈希函数的数量和目标查询子数据的数量生成多维随机数;其中,多维随机数的维度数量用于指示哈希函数的数量,每一个维度的多维随机数中随机数的数量用于指示目标查询子数据的数量;According to the preset random number generation method, a multi-dimensional random number is generated according to the number of hash functions and the number of target query sub-data; wherein, the dimension number of the multi-dimensional random number is used to indicate the number of hash functions, and the multi-dimensional random number of each dimension The number of random numbers is used to indicate the number of target query subdata;

针对每个哈希函数,根据所述哈希函数对应的维度的多维随机数和多个目标查询子数据进行哈希计算,确定每个哈希函数对应的哈希位数值;For each hash function, perform hash calculation according to the multidimensional random number of the dimension corresponding to the hash function and a plurality of target query sub-data, and determine the hash bit value corresponding to each hash function;

根据每个哈希函数对应的哈希位数值确定目标查询数据的查询哈希值。The query hash value of the target query data is determined according to the hash bit value corresponding to each hash function.

其中,预设随机数生成方法可以是预先设置用于生成随机数的方法。Wherein, the preset random number generation method may be a method preset for generating random numbers.

其中,多维随机数可以是多组数量相同的随机数。需要说明的是,随机数之间不存在任何的关联,具备不可预测性,通过多维随机数能够提高哈希计算的随机性,提高查询的准确率。Wherein, the multidimensional random number may be multiple sets of random numbers with the same number. It should be noted that there is no correlation between random numbers and they are unpredictable. Multidimensional random numbers can improve the randomness of hash calculations and improve the accuracy of queries.

其中,多维随机数的维度数量用于指示哈希函数的数量,每一个维度的多维随机数中随机数的数量用于指示目标查询子数据的数量;可选的,在通过预设随机数生产方法生成多维随机数时,由于多维随机数参与哈希函数的计算,且每个目标查询子数据都需要一个随机数,进而多维随机数中每一个维度的随机数数量需要等同于目标查询子数据的数量,每一个哈希函数能够通过一个维度的随机数和目标查询子数据进行哈希计算,进而多维随机数的维度与哈希函数组中的哈希函数数量相同。Wherein, the number of dimensions of the multi-dimensional random number is used to indicate the number of hash functions, and the number of random numbers in the multi-dimensional random number of each dimension is used to indicate the number of target query sub-data; When the method generates a multidimensional random number, since the multidimensional random number participates in the calculation of the hash function, and each target query subdata requires a random number, the number of random numbers in each dimension of the multidimensional random number needs to be equal to the target query subdata Each hash function can perform hash calculation through a random number of one dimension and the target query sub-data, and then the dimension of the multi-dimensional random number is the same as the number of hash functions in the hash function group.

其中,哈希位数值可以是指示哈希位数组中哈希位数值的位置。需要说明的是,在哈希位数组为二进制一维数组,每一位的值为1或0,哈希位数值用于指示哈希位数组对应的位数,通过哈希位数值可以查询到哈希位数组对应的位数的值。Wherein, the hash bit value may indicate a position of the hash bit value in the hash bit array. It should be noted that the hash bit array is a binary one-dimensional array, and the value of each bit is 1 or 0. The hash bit value is used to indicate the number of bits corresponding to the hash bit array, which can be queried through the hash bit value The value of the number of bits corresponding to the hash bit array.

可选的,本发明实施例,在通过哈希函数对多维随机数和多个目标查询子数据进行哈希计算,确定每一个目标查询子数据对应的多维随机数,针对每一个目标查询子数据,确定目标查询子数据和对应多维随机数的乘积,对全部目标查询子数据的乘积进行求和计算,得到哈希函数的哈希位数值。其中,通过哈希函数计算哈希位数值的公式如下公式(1)所示:Optionally, in this embodiment of the present invention, after performing hash calculation on the multidimensional random number and multiple target query subdata through a hash function, the multidimensional random number corresponding to each target query subdata is determined, and for each target query subdata , determine the product of the target query sub-data and the corresponding multi-dimensional random number, and calculate the sum of the products of all the target query sub-data to obtain the hash bit value of the hash function. Among them, the formula for calculating the hash bit value through the hash function is shown in the following formula (1):

hash=XiKey[i]+Xi-1Key[i-1]+...+X1Key[1]hash=X i Key[i]+X i-1 Key[i-1]+...+X 1 Key[1]

其中,hash为哈希计算得到的哈希位数值;Xi为第i个随机数,Key[i]为第i个目标查询子数据。Among them, hash is the hash bit value obtained by hash calculation; X i is the i-th random number, and Key[i] is the i-th target query sub-data.

具体的,针对目标查询数据的多个目标查询子数据,根据预设随机数生成方法生成维度等于哈希函数的数量和每一个维度的多维随机数中随机数的数量等于目标查询子数据的数量的多维随机数,每个哈希函数针对对应一个维度的多维随机数和多个目标查询子数据进行哈希计算,确定每个哈希函数对应的哈希位数值,根据每个哈希函数对应的哈希位数值确定目标查询数据的查询哈希值。Specifically, for multiple target query sub-data of the target query data, according to the preset random number generation method, the number of dimensions equal to the number of hash functions and the number of random numbers in the multi-dimensional random numbers of each dimension are equal to the number of target query sub-data Each hash function performs hash calculations on multidimensional random numbers corresponding to one dimension and multiple target query sub-data, and determines the hash bit value corresponding to each hash function. According to each hash function The hash bit value of determines the query hash value for the target query data.

S230、如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询。S230. If the hash bit array stored in the state dictionary has the same target hash value as the query hash value, send the data query instruction to the target database for data query.

本发明实施例的技术方案通过接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据;根据所述目标查询数据确定目标查询数据对应的目标查询字符;根据所述目标查询字符将目标查询数据划分为多个目标查询子数据;根据所述哈希函数对多个所述目标查询子数据进行哈希计算,确定目标查询数据的查询哈希值,通过对目标查询数据进行字符划分,并添加多维随机数,提高计算哈希函数的随机性,能够得到更精准的查询哈希值,提高状态字典确定目标查询数据的准确率;如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询,实现了数据库的快速反应,提高了数据库的响应速度,解决了现有技术中难以过滤对数据库数据请求的技术问题,提高了数据库的反馈效率,节省了数据库资源。The technical solution of the embodiment of the present invention determines the target query data corresponding to the data query command by receiving the data query command for the target database; determines the target query character corresponding to the target query data according to the target query data; The character divides the target query data into a plurality of target query sub-data; performs hash calculation on a plurality of target query sub-data according to the hash function, determines the query hash value of the target query data, and performs Character division, and multi-dimensional random numbers are added to improve the randomness of the hash function calculation, which can obtain more accurate query hash values and improve the accuracy of the state dictionary to determine the target query data; if the hash bit array stored in the state dictionary exists If the target hash value is the same as the query hash value, the data query instruction is sent to the target database for data query, which realizes the rapid response of the database, improves the response speed of the database, and solves the problem that is difficult in the prior art. Filter the technical problems of the database data request, improve the feedback efficiency of the database, and save the database resources.

实施例三Embodiment Three

图5是本发明实施例三提供的另一种基于状态字典的数据库数据查询方法的流程图,本实施例与上述实施例之间的关系为在通过状态字典进行数据查询之前,还包括在服务端中对目标服务器对应创建状态字典。如图5所示,该方法包括:Fig. 5 is a flow chart of another state dictionary-based database data query method provided by Embodiment 3 of the present invention. Create a state dictionary corresponding to the target server in the terminal. As shown in Figure 5, the method includes:

S310、获取目标数据库的最大存储量。S310. Obtain the maximum storage capacity of the target database.

其中,最大存储量为目标数据库能够存储的最大数据量;最大存储量可以是创建目标数据库时,数据库管理人员预估的最大存储量。Wherein, the maximum storage capacity is the maximum amount of data that the target database can store; the maximum storage capacity may be the maximum storage capacity estimated by the database manager when the target database is created.

具体的,在服务端创建状态字典时,获取目标数据库的最大存储量。Specifically, when the state dictionary is created on the server side, the maximum storage capacity of the target database is obtained.

S320、根据预设的预测成功率要求确定状态字典中哈希函数的数量和预设扩容系数。S320. Determine the number of hash functions and a preset expansion factor in the state dictionary according to a preset prediction success rate requirement.

其中,预设扩容系数可以是预先设置的扩容系数。预设扩容系数可以用于判断目标数据库是否进行扩容。Wherein, the preset expansion factor may be a preset expansion factor. The preset expansion factor can be used to determine whether the target database needs to be expanded.

其中,预测成功率要求可以是预先设置用于判断状态字典查询成功率的要求。需要说明的是,本发明实施例中,在数据查询指令到达状态字典时,通过状态字典判断数据查询指令对应的目标查询数据在数据库中是否存在,预测成功率要求用于约束状态字典判断的成功率。Wherein, the predicted success rate requirement may be a preset requirement for judging the query success rate of the state dictionary. It should be noted that, in the embodiment of the present invention, when the data query instruction arrives at the state dictionary, it is judged through the state dictionary whether the target query data corresponding to the data query instruction exists in the database, and the prediction success rate requirement is used to constrain the success of the state dictionary judgment. Rate.

具体的,获取服务端预设的预测成功率要求、根据预测成功率要求、预设扩容系数和哈希函数的数量三者之间的关联关系选择满足预测成功率要求的预设扩容系数和哈希函数的数量Specifically, obtain the preset prediction success rate requirements of the server, and select the preset expansion coefficient and hash function that meet the prediction success rate requirements according to the relationship between the prediction success rate requirements, the preset expansion coefficient, and the number of hash functions. number of Hich functions

可选的,在本发明实施例中,预测成功率、字典长度和最大存储量之间的关系如下公式(2)所示:Optionally, in the embodiment of the present invention, the relationship between the prediction success rate, the dictionary length and the maximum storage capacity is shown in the following formula (2):

Figure BDA0004138789960000081
Figure BDA0004138789960000081

其中,P_true为预测成功率;M为添加至目标数据库中的数据量;n为哈希函数的数量;L为状态字典的长度,e为预测的期望值。进一步的,为保障状态字典的准确性和占用内存的合理性,状态字典的字典长度需要满足最大存储量、哈希函数的数量和预设扩容系数的限制,状态字典的字典长度与最大存储量、哈希函数的数量和预设扩容系数的关系如下公式(3)所示:Among them, P_true is the prediction success rate; M is the amount of data added to the target database; n is the number of hash functions; L is the length of the state dictionary, and e is the predicted expected value. Further, in order to ensure the accuracy of the state dictionary and the rationality of memory usage, the dictionary length of the state dictionary needs to meet the restrictions of the maximum storage capacity, the number of hash functions, and the preset expansion coefficient. The dictionary length of the state dictionary and the maximum storage capacity , the number of hash functions and the preset expansion coefficient are shown in the following formula (3):

L=max*n*kL=max*n*k

其中,max为最大存储量;k为预设扩容系数。Among them, max is the maximum storage capacity; k is the preset expansion factor.

基于添加至目标数据库中的数据量一定小于目标数据库的最大存储量一定成立的情况下,根据上述公式(2)和(3)能够计算得到预测成功率、预设扩容系数和哈希函数的数量的关联关系如公式(4)所示:Based on the fact that the amount of data added to the target database must be less than the maximum storage capacity of the target database, the prediction success rate, preset expansion coefficient, and number of hash functions can be calculated according to the above formulas (2) and (3) The association relationship is shown in formula (4):

Figure BDA0004138789960000082
Figure BDA0004138789960000082

图6为本发明实施例公开的一种预测成功率、预设扩容系数和哈希函数的数量的关联关系的示意图,如图6所示,基于公式公式(4),在输入目标数据库中的数据量一定小于目标数据库的最大存储量,且最大存储量与输入目标数据库中的数据量为固定值时,预设扩容系数和哈希函数的数量会影响状态字典的预测成功率,通过预测成功率、预设扩容系数和哈希函数的数量三者之间的关联关系,进而根据预测成功率要求,确定预设扩容系数和哈希函数的数量。Fig. 6 is a schematic diagram of the relationship between a prediction success rate, a preset expansion coefficient, and the number of hash functions disclosed in an embodiment of the present invention. As shown in Fig. 6, based on formula (4), in the input target database The amount of data must be less than the maximum storage capacity of the target database, and when the maximum storage capacity and the amount of data input into the target database are fixed values, the preset expansion coefficient and the number of hash functions will affect the prediction success rate of the state dictionary. rate, the preset expansion coefficient and the number of hash functions, and then determine the preset expansion coefficient and the number of hash functions according to the requirements of the predicted success rate.

S330、根据哈希函数的数量、所述最大存储量和所述预设扩容系数确定状态字典的字典长度。S330. Determine the dictionary length of the state dictionary according to the number of hash functions, the maximum storage capacity, and the preset expansion factor.

其中,字典长度可以是状态字典的长度。Wherein, the dictionary length may be the length of the state dictionary.

具体的,根据哈希函数的数量、最大存储量和预设扩容系数确定状态字典的字典长度。Specifically, the dictionary length of the state dictionary is determined according to the number of hash functions, the maximum storage capacity and the preset expansion factor.

S340、根据所述字典长度和所述哈希函数的数量设置状态字典S340. Set a state dictionary according to the dictionary length and the number of hash functions

具体的,获取状态字典的字典长度和所述哈希函数的数量,根据字典长度和哈希函数的数量设置状态字典。Specifically, the dictionary length of the state dictionary and the number of hash functions are obtained, and the state dictionary is set according to the dictionary length and the number of hash functions.

可选的,在本发明另一可选实施例中,所述根据所述字典长度和所述哈希函数的数量设置所述状态字典,包括:Optionally, in another optional embodiment of the present invention, setting the state dictionary according to the dictionary length and the number of hash functions includes:

根据所述字典长度设置哈希位数组和计数链表,根据预设的哈希处理算法和哈希函数的数量设置哈希函数,确定哈希函数组;根据预设的哈希函数组、所述哈希位数组和所述计数链表设置所述状态字典。Set the hash bit array and the count linked list according to the dictionary length, set the hash function according to the preset hash processing algorithm and the number of hash functions, and determine the hash function group; according to the preset hash function group, the described The hash bit array and the count linked list set the state dictionary.

其中,所述哈希位数组的长度和计数链表的长度与所述状态字典长度相同;Wherein, the length of the hash bit array and the length of the count linked list are the same as the length of the state dictionary;

其中,哈希处理算法可以是预先设置用于哈希函数的哈希算法。哈希处理算法可以包括MD5算法、安全哈希算法、直接定址法、数字分析法、折叠法、平方取中法、减去法、基数转换法、除留余数法、随机乘数法和字符串数值哈希法中的至少一种。Wherein, the hash processing algorithm may be a hash algorithm preset for a hash function. Hash processing algorithms can include MD5 algorithm, secure hash algorithm, direct addressing method, number analysis method, folding method, square method, subtraction method, radix conversion method, division and remainder method, random multiplier method and string At least one of numerical hashing methods.

具体的,获取状态字典的字典长度和所述哈希函数的数量,根据状态字典的字典长度设置长度与字典长度相同的哈希位数组和计数链表,并根据预设的哈希处理算法和哈希函数的数量设置哈希函数,确定状态字典的哈希函数组,根据预设的哈希函数组、哈希位数组和计数链表设置所述状态字典。Specifically, obtain the dictionary length of the state dictionary and the number of the hash functions, set the hash bit array and the counting list with the same length as the dictionary length according to the dictionary length of the state dictionary, and according to the preset hash processing algorithm and hash function The number of hash functions sets the hash function, determines the hash function group of the state dictionary, and sets the state dictionary according to the preset hash function group, hash bit array and counting linked list.

可选的,在本发明另一可选实施例中,所述方法还包括:Optionally, in another optional embodiment of the present invention, the method further includes:

获取所述目标数据库更新的目标更新数据;根据所述哈希函数组对所述目标更新数据进行哈希计算,确定目标更新数据的更新哈希值;根据所述更新哈希值更新所述哈希位数组和计数链表。Acquiring target update data updated by the target database; performing hash calculation on the target update data according to the hash function group to determine an update hash value of the target update data; updating the hash according to the update hash value Hi bit array and count linked list.

其中,目标更新数据可以是服务端对目标数据库中进行更新的数据,需要说明的是,在服务端对目标数据库进行更新数据时,存在两种情况,第一种情况是向目标数据库中添加数据,在服务端进行添加数据时,添加的数据为目标更新数据;第二种情况是删除目标数据库中的数据,在服务端进行删除数据时,删除的数据为目标更新数据。Wherein, the target update data may be the data updated by the server in the target database. It should be noted that, when the server updates the target database, there are two cases. The first case is to add data to the target database , when adding data on the server side, the added data is the target update data; the second case is to delete the data in the target database, and when deleting data on the server side, the deleted data is the target update data.

其中,更新哈希值目标更新数据通过哈希函数计算得到的哈希值。Wherein, the update hash value object updates the hash value calculated by the hash function.

具体的,在服务端对目标数据库进行添加数据和删除数据时,获取目标数据库更新的目标更新数据,通过哈希函数组对所述目标更新数据进行哈希计算,得到目标更新数据的更新哈希值,根据所述更新哈希值更新哈希位数组和计数链表。Specifically, when the server adds data to or deletes data from the target database, the target update data updated by the target database is obtained, and the hash calculation is performed on the target update data through the hash function group to obtain the update hash of the target update data value, and update the hash bit array and count linked list according to the updated hash value.

可选的,在本发明另一可选实施例中,所述更新哈希值包括至少一个哈希位数值;所述根据所述更新哈希值更新所述哈希位数组和所述计数链表,包括:Optionally, in another optional embodiment of the present invention, the updated hash value includes at least one hash bit value; the updating of the hash bit array and the count linked list according to the updated hash value ,include:

根据所述哈希位数值查询所述哈希位数组中对应的二进制位数值;Querying the corresponding binary digit value in the hash digit array according to the hash digit value;

如果所述二进制位数值为预设数值,则根据所述哈希位数值更新所述计数链表中对应的计数值。If the binary digit value is a preset value, the corresponding count value in the count linked list is updated according to the hash digit value.

其中,二进制位数值可以是哈希位数组中每一个位数记录的数值;哈希位数组为二进制一维数组,每一位的值为1或0,哈希位数值用于指示哈希位数组对应的位数。Wherein, the binary bit value can be the value recorded by each bit in the hash bit array; the hash bit array is a binary one-dimensional array, the value of each bit is 1 or 0, and the hash bit value is used to indicate the hash bit The number of bits corresponding to the array.

其中,预设数值可以是预先设置用于判断二进制位数值是否需要进行更新的二进制位数值。示例性的,在哈希位数组通常设置为1。Wherein, the preset value may be a preset binary value for judging whether the binary value needs to be updated. Exemplarily, it is usually set to 1 in the hash bit array.

其中,计数值可以是计数链表中每一个计数记录的计数值。计数值可以用于记录二进制位数值为预设数值的数量。Wherein, the count value may be the count value of each count record in the count linked list. The count value can be used to record the number of binary digits whose value is a preset value.

具体的,获取更新哈希值,根据更新哈希值中的哈希位数值查询哈希位数组中对应的二进制位数值;判断二进制位数值是否为预设数值,如果二进制位数值为预设数值,则根据哈希位数值更新所述计数链表中对应的计数值;如果二进制位数值不为预设数值,则将哈希位数值更新为预设数值。Specifically, obtain the updated hash value, query the corresponding binary digit value in the hash digit array according to the hash digit value in the updated hash value; determine whether the binary digit value is a preset value, and if the binary digit value is a preset value , then update the corresponding count value in the count linked list according to the hash bit value; if the binary bit value is not a preset value, then update the hash bit value to a preset value.

示例性的,图7为本发明实施例公开一种目标数据库添加数据时更新状态字典的示意图。如图7所示:向目标数据库中添加数据,获取添加的目标更新数据为数据一,通过哈希函数组中的三个哈希函数计算得到对应的更新哈希值,更新哈希值包括三个哈希位数值为Hash1()、Hash2()和Hash3()在更新状态字典时由上至下分为三种情况,第一种情况:在哈希位数组中Hash1()、Hash2()和Hash3()分别对应的三个目标位数值都为0时,则分别将三个目标位数值调整为1;第二种情况:在哈希位数组中Hash1()、Hash2()和Hash3()分别对应的三个目标位数值存在0、0、1时,则分别将目标位数值为0的目标位数值调整为1,将目标位数值为1对应的计数链表中计数值调整为1;第三种情况:在哈希位数组中Hash1()和Hash3()分别对应的三个目标位数值存在1、1时,将目标位数值为1,计数值为0对应的计数链表中计数值0调整为1,将目标位数值为1,计数值为1对应的计数链表中计数值由1调整为2。Exemplarily, FIG. 7 is a schematic diagram of updating a state dictionary when data is added to a target database according to an embodiment of the present invention. As shown in Figure 7: Add data to the target database, obtain the added target update data as data 1, calculate the corresponding update hash value through three hash functions in the hash function group, and update the hash value including three Hash bit values are Hash1(), Hash2() and Hash3(), which are divided into three cases from top to bottom when updating the state dictionary. The first case: Hash1(), Hash2() in the hash bit array When the three target bit values corresponding to Hash3() are all 0, adjust the three target bit values to 1; the second case: in the hash bit array, Hash1(), Hash2() and Hash3( ) when there are 0, 0, and 1 in the three target digit values corresponding respectively, then the target digit value with the target digit value of 0 is adjusted to 1, and the count value in the count linked list corresponding to the target digit value of 1 is adjusted to 1; The third case: when the three target bit values corresponding to Hash1() and Hash3() in the hash bit array respectively exist 1 and 1, the target bit value is 1, and the count value is 0 corresponding to the count value in the count list 0 is adjusted to 1, the target bit value is 1, and the count value in the count list corresponding to the count value 1 is adjusted from 1 to 2.

示例性的,图8为本发明实施例公开一种目标数据库删除数据时更新状态字典的示意图。如图8所示:向目标数据库中删除数据,获取删除的目标更新数据为数据一,通过哈希函数组中的三个哈希函数计算得到对应的更新哈希值,更新哈希值包括三个哈希位数值为Hash1()、Hash2()和Hash3()在更新状态字典时由上至下分为三种情况,第一种情况:在哈希位数组中Hash1()、Hash2()和Hash3()分别对应的三个目标位数值为1、1、1时,则确定计算链表中对应的计数值分别为1、3、5,将计算链表中对应的计数值调整为0、2、4;第二种情况:在哈希位数组中Hash1()、Hash2()和Hash3()分别对应的三个目标位数值存在1、1、1时,则确定计算链表中对应的计数值分别为0、1、4,将目标位数值为1,计数值0的目标位数值调整为0,将目标位数值为1,计数值1的目标位数值对应的计数链表中计数值调整为0,将目标位数值为1,计数值4的计数值调整为3;第三种情况:在哈希位数组中Hash1()和Hash3()分别对应的两个目标位数值为1和1时,确定两个目标位数值对应的计算值为0和3,将目标位数值为1,计数值0的目标位数值对应的目标位数值由1调整为0,将目标位数值为1,计数值3目标位数值对应的计数值由3调整为2。Exemplarily, FIG. 8 is a schematic diagram of updating a state dictionary when a target database deletes data according to an embodiment of the present invention. As shown in Figure 8: delete data in the target database, obtain the deleted target update data as data 1, calculate the corresponding update hash value through the three hash functions in the hash function group, and update the hash value including three Hash bit values are Hash1(), Hash2() and Hash3(), which are divided into three cases from top to bottom when updating the state dictionary. The first case: Hash1(), Hash2() in the hash bit array When the three target digit values corresponding to Hash3() are 1, 1, and 1, then determine that the corresponding count values in the calculation linked list are 1, 3, and 5 respectively, and adjust the corresponding count values in the calculation linked list to 0, 2 , 4; the second case: when the three target digit values corresponding to Hash1(), Hash2() and Hash3() in the hash bit array respectively exist 1, 1, 1, then determine and calculate the corresponding count value in the linked list They are 0, 1, and 4 respectively, set the target digit value to 1, adjust the target digit value of count value 0 to 0, adjust the target digit value to 1, and adjust the count value in the counting list corresponding to the target digit value of count value 1 to 0 , adjust the target bit value to 1, and adjust the count value of the count value 4 to 3; the third case: when the two target bit values corresponding to Hash1() and Hash3() in the hash bit array are 1 and 1 respectively, Determine the calculated values corresponding to the two target digit values of 0 and 3, set the target digit value to 1, and adjust the target digit value corresponding to the target digit value of the count value 0 from 1 to 0, set the target digit value to 1, and the count value to 3 The counter value corresponding to the target bit value is adjusted from 3 to 2.

本发明实施例的技术方案通过接收获取目标数据库的最大存储量;针对目标数据库的存储量,能够确定更符合目标数据库的状态字典,提高状态字典的性能,并减少状态字典的空间;根据预设的预测成功率要求确定状态字典中哈希函数的数量和预设扩容系数;对状态字典的期望成功率,能够确定目标数据库的预设扩容系数,进一步提高数据库的性能和状态字典的反应速度;根据哈希函数的数量、所述最大存储量和所述预设扩容系数确定状态字典的字典长度;设置合适的字典长度,能够保证状态字典的准确性和占用内存的合理性,根据所述字典长度和所述哈希函数的数量设置状态字典,实现了对目标数据库创建相应的状态字典,进一步的提高了数据库的响应速度,解决了现有技术中难以过滤对数据库数据请求的技术问题,提高了数据库的反馈效率,节省了数据库资源。The technical solution of the embodiment of the present invention acquires the maximum storage capacity of the target database by receiving; for the storage capacity of the target database, it is possible to determine a state dictionary that is more in line with the target database, improve the performance of the state dictionary, and reduce the space of the state dictionary; according to the preset The predictive success rate requires determining the number of hash functions in the state dictionary and the preset expansion coefficient; for the expected success rate of the state dictionary, the preset expansion coefficient of the target database can be determined, and the performance of the database and the response speed of the state dictionary can be further improved; Determine the dictionary length of the state dictionary according to the number of hash functions, the maximum storage capacity and the preset expansion factor; setting a suitable dictionary length can ensure the accuracy of the state dictionary and the rationality of occupying memory, according to the dictionary Length and the quantity setting state dictionary of described hash function, have realized that corresponding state dictionary is created to target database, have further improved the response speed of database, solved the technical problem that is difficult to filter to database data request in the prior art, improved This improves the feedback efficiency of the database and saves database resources.

可选的,本发明实施例公开了另一种基于状态字典的数据库数据查询方法,其中,所述方法包括:Optionally, the embodiment of the present invention discloses another database data query method based on a state dictionary, wherein the method includes:

S1、为目标数据库创建一个状态字典Dist。状态字典Dist的初始化长度为L,哈希位数组Bloom和计数链表Count_List长度都为L,状态字典的数据结构如图2所示,其内部用二进制表示,其中Bloom为一维数组,Count_List为二数组如附图3所示。同时也要确定一组相互独立的哈希函数组Hash_Group()。S1. Create a state dictionary Dist for the target database. The initial length of the state dictionary Dist is L, the length of the hash bit array Bloom and the count list Count_List are both L, the data structure of the state dictionary is shown in Figure 2, and its internal representation is in binary, where Bloom is a one-dimensional array and Count_List is a two-dimensional array. The array is shown in Figure 3. At the same time, a set of independent hash function groups Hash_Group() should be determined.

可选的,在创建一个状态字典Dist的具体过程如下所示:Optionally, the specific process of creating a state dictionary Dist is as follows:

为保证状态字典的准确性和占用内存的合理性,其状态字典Dise的初始长度L可遵循公式(3):In order to ensure the accuracy of the state dictionary and the rationality of occupying memory, the initial length L of the state dictionary Dise can follow the formula (3):

L=max*n*kL=max*n*k

进一步的,预测成功率、字典长度L和最大存储量max之间的关系如下公式(2)所示:Further, the relationship between the prediction success rate, the dictionary length L and the maximum storage capacity max is shown in the following formula (2):

Figure BDA0004138789960000111
Figure BDA0004138789960000111

其中,P_true为预测成功率;M为添加至目标数据库中的数据量;n为哈希函数的数量;L为状态字典的长度,e为预测的期望值。Among them, P_true is the prediction success rate; M is the amount of data added to the target database; n is the number of hash functions; L is the length of the state dictionary, and e is the predicted expected value.

基于添加至目标数据库中的数据量一定小于目标数据库的最大存储量一定成立的情况下,根据上述公式(2)和(3)能够计算得到预测成功率、预设扩容系数和哈希函数的数量的关联关系如公式(4)所示:Based on the fact that the amount of data added to the target database must be less than the maximum storage capacity of the target database, the prediction success rate, preset expansion coefficient, and number of hash functions can be calculated according to the above formulas (2) and (3) The association relationship is shown in formula (4):

Figure BDA0004138789960000112
Figure BDA0004138789960000112

图6为本发明实施例公开的一种预测成功率、预设扩容系数和哈希函数的数量的关联关系的示意图,如图6所示,基于公式(4),在输入目标数据库中的数据量一定小于目标数据库的最大存储量,且最大存储量与输入目标数据库中的数据量为固定值时,预设扩容系数和哈希函数的数量会影响状态字典的预测成功率,通过预测成功率、预设扩容系数和哈希函数的数量三者之间的关联关系,进而根据预测成功率要求,确定预设扩容系数和哈希函数的数量。进而根据哈希函数的数量、最大存储量和预设扩容系数确定状态字典的字典长度。获取状态字典的字典长度和所述哈希函数的数量,根据字典长度和哈希函数的数量设置状态字典。Fig. 6 is a schematic diagram of the relationship between a prediction success rate, a preset expansion coefficient, and the number of hash functions disclosed in an embodiment of the present invention. As shown in Fig. 6, based on formula (4), the data in the input target database The amount must be less than the maximum storage capacity of the target database, and when the maximum storage capacity and the amount of data input into the target database are fixed values, the preset expansion coefficient and the number of hash functions will affect the prediction success rate of the state dictionary. By predicting the success rate , the preset expansion coefficient and the number of hash functions, and then determine the preset expansion coefficient and the number of hash functions according to the requirements of the predicted success rate. Furthermore, the dictionary length of the state dictionary is determined according to the number of hash functions, the maximum storage capacity and the preset expansion factor. The dictionary length of the state dictionary and the number of hash functions are obtained, and the state dictionary is set according to the dictionary length and the number of hash functions.

S2、向数据库中新增或者删除数据时,同时也更新状态字典的内部数据。S2. When adding or deleting data to the database, the internal data of the state dictionary is also updated at the same time.

具体的,向数据库中新增数据更新状态字典时,对新增的目标更新数据data在Hash_Group()中进行哈希计算,计算得到更新哈希值如公式(5)所示:Specifically, when new data is added to the database to update the state dictionary, hash calculation is performed on the newly added target update data data in Hash_Group(), and the calculated updated hash value is shown in formula (5):

Figure BDA0004138789960000121
Figure BDA0004138789960000121

其中,{N1,N2,...Nn}为哈希计算得到的更新哈希值,N1,N2,...Nn为哈希位数值。根据哈希位数值更新状态字典中的哈希位数组Bloom和计数链表,Wherein, {N 1 , N 2 ,...N n } are updated hash values obtained by hash calculation, and N 1 , N 2 ,...Nn are hash bit values. Update the hash bit array Bloom and the count list in the state dictionary according to the hash bit value,

查询哈希位数值对应的哈希位数组位置上的目标位数值,如果目标位数值原本为0,则更新为1,如果已经为1,则更新该位置的计数链表值加1,最后得到更新后的位数组Bloom{L,0/1}和计数链表Count_List{L,N|N>=0}。Query the target bit value at the position of the hash bit array corresponding to the hash bit value. If the target bit value is originally 0, update it to 1. If it is already 1, update the counting list value at this position and add 1, and finally get updated The subsequent bit array Bloom{L, 0/1} and the counting list Count_List{L, N|N>=0}.

向数据库中删除数据更新状态字典时,对删除的目标更新数据data在Hash_Group()中进行哈希计算,计算得到更新哈希值如公式(5)所示:When deleting data from the database to update the state dictionary, hash calculation is performed on the deleted target update data data in Hash_Group(), and the calculated update hash value is shown in formula (5):

Figure BDA0004138789960000122
Figure BDA0004138789960000122

其中,{N1,N2,...Nn}为哈希计算得到的更新哈希值,N1,N2,...Nn为哈希位数值。根据哈希位数值更新状态字典中的哈希位数组Bloom和计数链表,Wherein, {N 1 , N 2 ,...N n } are updated hash values obtained by hash calculation, and N 1 , N 2 ,...Nn are hash bit values. Update the hash bit array Bloom and the count list in the state dictionary according to the hash bit value,

查询哈希位数值映射在的哈希位数组位置上的目标位数值,并查询目标位数值对应的计数链表Count_List的计数值,如果计数值大于0,则减1,如果计数值为0,则更新该计数值对应的哈希位数组的目标位数值Bloom值为0,得到更新后的状态字典。Query the target bit value at the position of the hash bit array where the hash bit value is mapped, and query the count value of the count list Count_List corresponding to the target bit value. If the count value is greater than 0, decrement 1. If the count value is 0, then Update the target bit value Bloom value of the hash bit array corresponding to the count value to 0, and obtain the updated state dictionary.

S3、在通过状态字典查询目标查询数据时,首先进入状态字典判定目标数据库内是否存在目标查询数据,若不存在直接返回查询为null,否则进入到目标数据库内查询。S3. When querying the target query data through the state dictionary, first enter the state dictionary to determine whether the target query data exists in the target database. If there is no target query data, directly return the query to null, otherwise enter the target database for query.

具体的,对目标查询数据data先在Hash_Group()中进行哈希计算得到查询哈希值,计算得到查询哈希值如公式(5)所示:Specifically, hash calculation is performed on the target query data data in Hash_Group() to obtain the query hash value, and the calculated query hash value is shown in formula (5):

Figure BDA0004138789960000123
Figure BDA0004138789960000123

其中,{N1,N2,...Nn}为哈希计算得到的查询哈希值,进而判断查询哈希值在哈希位数组中是否存在与查询哈希值完全相同的目标哈希值,判断的公式如下公式(6)所示:Among them, {N 1 , N 2 ,...N n } is the query hash value obtained by hash calculation, and then judge whether the query hash value has the same target hash value as the query hash value in the hash bit array. The Greek value, the judgment formula is shown in the following formula (6):

Res=Bloom(N1)&Bloom(N2)&...&Bloom(Nn)Res=Bloom(N 1 )&Bloom(N 2 )&...&Bloom(N n )

其中,Nn表示哈希位数组中第Nn位的值,Res表示计算结果,如果结果Res等于1表示目标查询数据data可能存在目标数据库,Res等于0表示目标查询数据data一定不在目标数据库中,如果判断在目标查询数据data可能存在目标数据库中,则进入目标数据库查询,如果判断在目标查询数据data不存在目标数据库中,则直接返回null。Among them, N n represents the value of the N nth bit in the hash bit array, and Res represents the calculation result. If the result Res is equal to 1, it means that the target query data data may exist in the target database, and Res is equal to 0, which means that the target query data data must not be in the target database. , if it is judged that the target query data data may exist in the target database, then enter the target database query, if it is judged that the target query data data does not exist in the target database, then directly return null.

本发明实施例的技术方案能够实现了数据库的快速反应,提高了数据库的响应速度,解决了现有技术中难以过滤对数据库数据请求的技术问题,提高了数据库的反馈效率,节省了数据库资源。The technical scheme of the embodiment of the present invention can realize the rapid response of the database, improve the response speed of the database, solve the technical problem that it is difficult to filter the data request to the database in the prior art, improve the feedback efficiency of the database, and save database resources.

实施例四Embodiment four

图9是本发明实施例三提供的一种基于状态字典的数据库数据查询装置的结构示意图。如图9所示,该装置包括:数据查询模块910、哈希计算模块920和哈希验证模块930,其中,FIG. 9 is a schematic structural diagram of a database data query device based on a state dictionary provided by Embodiment 3 of the present invention. As shown in Figure 9, the device includes: a data query module 910, a hash calculation module 920 and a hash verification module 930, wherein,

数据查询模块910,用于接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据;The data query module 910 is configured to receive a data query instruction for the target database, and determine the target query data corresponding to the data query instruction;

哈希计算模块920,用于根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值;Hash calculation module 920, configured to perform hash calculation on the target query data according to the hash function group stored in the state dictionary, and determine the query hash value of the target query data;

哈希验证模块930,用于如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询;The hash verification module 930 is used to send the data query instruction to the target database for data query if the hash bit array stored in the state dictionary has the same target hash value as the query hash value;

本发明实施例的技术方案通过接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据,在进入数据库之前确定目标查询数据,能够提高数据查询的准确率;根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值,通过查询哈希值能够确认目标查询数据在数据库中存在状态,提高数据库响应速度,减少数据库资源的浪费;如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询,在状态字典确认数据库中存在目标查询数据,将数据查询指令发送至目标数据库,实现了数据库的快速反应,提高了数据库的响应速度,解决了现有技术中难以过滤对数据库数据请求的技术问题,提高了数据库的反馈效率,节省了数据库资源。The technical solution of the embodiment of the present invention can improve the accuracy of data query by receiving the data query instruction for the target database, determining the target query data corresponding to the data query instruction, and determining the target query data before entering the database; according to the state dictionary The stored hash function group performs hash calculation on the target query data, determines the query hash value of the target query data, and can confirm the existence status of the target query data in the database by querying the hash value, thereby improving the response speed of the database, Reduce the waste of database resources; if the hash bit array stored in the state dictionary has the same target hash value as the query hash value, send the data query instruction to the target database for data query, and confirm in the state dictionary There is target query data in the database, and the data query command is sent to the target database, which realizes the rapid response of the database, improves the response speed of the database, solves the technical problem that it is difficult to filter the request for database data in the prior art, and improves the performance of the database. Feedback efficiency saves database resources.

可选的,所述哈希函数组包括至少一个哈希函数;所述哈希计算模块具体用于:根据所述目标查询数据确定目标查询数据对应的目标查询字符;Optionally, the hash function group includes at least one hash function; the hash calculation module is specifically configured to: determine a target query character corresponding to the target query data according to the target query data;

根据所述目标查询字符将目标查询数据划分为多个目标查询子数据;dividing the target query data into a plurality of target query sub-data according to the target query characters;

根据所述哈希函数对多个所述目标查询子数据进行哈希计算,确定目标查询数据的查询哈希值。Hash calculation is performed on a plurality of target query sub-data according to the hash function to determine a query hash value of the target query data.

可选的,所述查询哈希值包括至少一个哈希位数值;所述哈希计算模块具体还用于:Optionally, the query hash value includes at least one hash bit value; the hash calculation module is also specifically used for:

根据预设随机数生成方法根据哈希函数的数量和目标查询子数据的数量生成多维随机数;其中,多维随机数的维度数量用于指示哈希函数的数量,每一个维度的多维随机数中随机数的数量用于指示目标查询子数据的数量;According to the preset random number generation method, a multi-dimensional random number is generated according to the number of hash functions and the number of target query sub-data; wherein, the dimension number of the multi-dimensional random number is used to indicate the number of hash functions, and the multi-dimensional random number of each dimension The number of random numbers is used to indicate the number of target query subdata;

针对每个哈希函数,根据所述哈希函数对应的维度的多维随机数和多个目标查询子数据进行哈希计算,确定每个哈希函数对应的哈希位数值;For each hash function, perform hash calculation according to the multidimensional random number of the dimension corresponding to the hash function and a plurality of target query sub-data, and determine the hash bit value corresponding to each hash function;

根据每个哈希函数对应的哈希位数值确定目标查询数据的查询哈希值。The query hash value of the target query data is determined according to the hash bit value corresponding to each hash function.

可选的,所述装置还包括:状态字典设置模块;所述状态字典设置模块具体用于:数据获取单元,用于获取目标数据库的最大存储量;参数计算单元,用于根据预设的预测成功率要求确定状态字典中哈希函数的数量和预设扩容系数;字典长度计算单元,用于根据哈希函数的数量、所述最大存储量和所述预设扩容系数确定状态字典的字典长度;字典设置单元,用于根据所述字典长度和所述哈希函数的数量设置状态字典。Optionally, the device further includes: a state dictionary setting module; the state dictionary setting module is specifically used for: a data acquisition unit for obtaining the maximum storage capacity of the target database; a parameter calculation unit for predicting according to a preset The success rate requires determining the number of hash functions and the preset expansion coefficient in the state dictionary; the dictionary length calculation unit is used to determine the dictionary length of the state dictionary according to the number of hash functions, the maximum storage capacity and the preset expansion coefficient ; A dictionary setting unit, configured to set a state dictionary according to the dictionary length and the number of hash functions.

可选的,所述状态字典设置模块具体还用于:Optionally, the state dictionary setting module is also specifically used for:

根据所述字典长度设置哈希位数组和计数链表,其中,所述哈希位数组的长度和计数链表的长度与所述状态字典长度相同;According to the length of the dictionary, the hash bit array and the count linked list are set, wherein the length of the hash bit array and the length of the count linked list are the same as the length of the state dictionary;

根据预设的哈希处理算法和哈希函数的数量设置哈希函数,确定哈希函数组;Set the hash function according to the preset hash processing algorithm and the number of hash functions, and determine the hash function group;

根据预设的哈希函数组、所述哈希位数组和所述计数链表设置所述状态字典。The state dictionary is set according to the preset hash function group, the hash bit array and the count linked list.

可选的,所述装置还包括:状态字典更新模块和哈希更新模块;其中,Optionally, the device further includes: a state dictionary update module and a hash update module; wherein,

所述状态字典更新模块,用于获取所述目标数据库更新的目标更新数据;The state dictionary update module is used to obtain target update data for updating the target database;

所述哈希计算模块,具体还用于根据所述哈希函数组对所述目标更新数据进行哈希计算,确定目标更新数据的更新哈希值;The hash calculation module is further configured to perform hash calculation on the target update data according to the hash function group, and determine the update hash value of the target update data;

所述哈希更新模块,用于根据所述更新哈希值更新所述哈希位数组和计数链表。The hash update module is configured to update the hash bit array and count linked list according to the updated hash value.

可选的,所述更新哈希值包括至少一个哈希位数值;所述哈希更新模块具体用于:Optionally, the updated hash value includes at least one hash bit value; the hash update module is specifically used for:

根据所述哈希位数值查询所述哈希位数组中对应的二进制位数值;Querying the corresponding binary digit value in the hash digit array according to the hash digit value;

如果所述二进制位数值为预设数值,则根据所述哈希位数值更新所述计数链表中对应的计数值。If the binary digit value is a preset value, the corresponding count value in the count linked list is updated according to the hash digit value.

本发明实施例所提供的基于状态字典的数据库数据查询装置可执行本发明任意实施例所提供的基于状态字典的数据库数据查询方法,具备执行方法相应的功能模块和有益效果。The database data query device based on the state dictionary provided by the embodiment of the present invention can execute the database data query method based on the state dictionary provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

实施例四Embodiment four

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

如图10所示,电子设备10包括至少一个处理器11,以及与至少一个处理器11通信连接的存储器,如只读存储器(ROM)12、随机访问存储器(RAM)13等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器11可以根据存储在只读存储器(ROM)12中的计算机程序或者从存储单元18加载到随机访问存储器(RAM)13中的计算机程序,来执行各种适当的动作和处理。在RAM 13中,还可存储电子设备10操作所需的各种程序和数据。处理器11、ROM 12以及RAM 13通过总线14彼此相连。输入/输出(I/O)接口15也连接至总线14。As shown in FIG. 10 , the electronic device 10 includes at least one processor 11, and a memory communicatively connected with the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores There is a computer program executable by at least one processor, and the processor 11 can operate according to a computer program stored in a read-only memory (ROM) 12 or loaded from a storage unit 18 into a random access memory (RAM) 13. Various appropriate actions and processes are performed. In the RAM 13, various programs and data necessary for the operation of the electronic device 10 are also stored. The processor 11 , ROM 12 , and RAM 13 are connected to each other through a bus 14 . An input/output (I/O) interface 15 is also connected to the bus 14 .

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

处理器11可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器11的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器11执行上文所描述的各个方法和处理,例如基于状态字典的数据库数据查询方法。Processor 11 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes various methods and processes described above, such as a database data query method based on a state dictionary.

在一些实施例中,基于状态字典的数据库数据查询方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元18。在一些实施例中,计算机程序的部分或者全部可以经由ROM 12和/或通信单元19而被载入和/或安装到电子设备10上。当计算机程序加载到RAM 13并由处理器11执行时,可以执行上文描述的基于状态字典的数据库数据查询方法的一个或多个步骤。备选地,在其他实施例中,处理器11可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行基于状态字典的数据库数据查询方法。In some embodiments, the database data query method based on the state dictionary can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18 . In some embodiments, part or all of the computer program may be loaded and/or installed on the electronic device 10 via the ROM 12 and/or the communication unit 19 . When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the state dictionary-based database data query method described above can be executed. Alternatively, in other embodiments, the processor 11 may be configured in any other appropriate way (for example, by means of firmware) to execute the database data query method based on the state dictionary.

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

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

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

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

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

计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。A computing system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the problems of difficult management and weak business expansion in traditional physical hosts and VPS services. defect.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present invention may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution of the present invention can be achieved, there is no limitation herein.

实施例五Embodiment five

本实施例提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任意实施例所提供的基于状态字典的数据库数据查询方法步骤,该方法包括:This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the database data query method based on the state dictionary provided by any embodiment of the present invention are implemented. The method includes:

接收针对目标数据库的数据查询指令,确定所述数据查询指令对应的目标查询数据;receiving a data query instruction for the target database, and determining the target query data corresponding to the data query instruction;

根据状态字典中存储的哈希函数组对所述目标查询数据进行哈希计算,确定所述目标查询数据的查询哈希值;Perform hash calculation on the target query data according to the hash function group stored in the state dictionary, and determine the query hash value of the target query data;

如果状态字典中存储的哈希位数组存在与所述查询哈希值相同的目标哈希值,则将所述数据查询指令发送至目标数据库进行数据查询。If the hash bit array stored in the state dictionary has the same target hash value as the query hash value, the data query instruction is sent to the target database for data query.

本发明实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于:电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiments of the present invention may use any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer-readable storage medium may be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections with one or more leads, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .

计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present invention may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through the Internet using an Internet service provider). connect).

本领域普通技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个计算装置上,或者分布在多个计算装置所组成的网络上,可选地,他们可以用计算机装置可执行的程序代码来实现,从而可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件的结合。Those of ordinary skill in the art should understand that each module or each step of the present invention described above can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed on a network formed by multiple computing devices. Optionally, they can be implemented with executable program codes of computer devices, so that they can be stored in storage devices and executed by computing devices, or they can be made into individual integrated circuit modules, or a plurality of modules in them Or the steps are fabricated into a single integrated circuit module to realize. As such, the present invention is not limited to any specific combination of hardware and software.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present invention may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution of the present invention can be achieved, there is no limitation herein.

上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above specific implementation methods do not constitute a limitation to the protection scope of the present invention. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1. A method for querying database data based on a state dictionary, comprising:
receiving a data query instruction aiming at a target database, and determining target query data corresponding to the data query instruction;
performing hash calculation on the target query data according to a hash function set stored in a state dictionary, and determining a query hash value of the target query data;
and if the hash bit number group stored in the state dictionary has the same target hash value as the query hash value, sending the data query instruction to a target database for data query.
2. The method of claim 1, wherein the set of hash functions comprises at least one hash function; the hash calculation is performed on the target query data according to the hash function set stored in the state dictionary, and the determining of the query hash value of the target query data includes:
determining target query characters corresponding to the target query data according to the target query data;
dividing target query data into a plurality of target query sub-data according to the target query characters;
and carrying out hash calculation on a plurality of target query sub-data according to the hash function, and determining a query hash value of the target query data.
3. The method of claim 2, wherein the query hash value comprises at least one hash bit value; performing hash calculation on the plurality of target query sub-data according to the hash function, and determining a query hash value of the target query data, including:
generating a multi-dimensional random number according to the number of the hash functions and the number of the target query sub-data according to a preset random number generation method; the number of the dimensions of the multi-dimensional random numbers is used for indicating the number of the hash functions, and the number of the random numbers in the multi-dimensional random numbers of each dimension is used for indicating the number of target query sub-data;
aiming at each hash function, carrying out hash calculation according to the multidimensional random number of the dimension corresponding to the hash function and a plurality of target query sub-data, and determining a hash bit value corresponding to each hash function;
and determining a query hash value of the target query data according to the hash bit number value corresponding to each hash function.
4. The method of claim 1, wherein before receiving the data query command for the target database and determining the target query data corresponding to the data query command, further comprises:
obtaining the maximum storage capacity of a target database;
Determining the number of hash functions in a state dictionary and a preset expansion coefficient according to a preset prediction success rate requirement;
determining the dictionary length of a state dictionary according to the number of hash functions, the maximum storage amount and the preset expansion coefficient;
and setting a state dictionary according to the dictionary length and the number of the hash functions.
5. The method of claim 4, wherein said setting said state dictionary according to said dictionary length and said number of hash functions comprises:
setting Ha Xiwei arrays and counting linked lists according to the dictionary length, wherein the length of the Ha Xiwei arrays and the length of the counting linked lists are the same as the state dictionary length;
setting hash functions according to a preset hash processing algorithm and the number of the hash functions, and determining a hash function set;
and setting the state dictionary according to a preset hash function set, the Ha Xiwei set and the counting chain table.
6. The method of claim 5, wherein the method further comprises:
acquiring target update data updated by the target database;
performing hash calculation on the target update data according to the Ha Xihan array, and determining an update hash value of the target update data;
And updating the Ha Xiwei array and the counting linked list according to the updated hash value.
7. The method of claim 6, wherein the updated hash value comprises at least one hash bit value; the updating the Ha Xiwei array and the count linked list according to the updated hash value comprises:
inquiring a corresponding binary bit value in the hash bit array according to the hash bit value;
and if the binary digit value is a preset value, updating a corresponding count value in the count chain table according to the hash digit value.
8. A state dictionary-based database data query apparatus, comprising:
the data query module is used for receiving a data query instruction aiming at the target database and determining target query data corresponding to the data query instruction;
the hash calculation module is used for carrying out hash calculation on the target query data according to a preset hash function set and determining a query hash value of the target query data;
and the hash verification module is used for sending the data query instruction to a target database for data query if the hash bit number group stored in the state dictionary has the same target hash value as the query hash value.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the state dictionary based database data querying method of any of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the state dictionary based database data querying method of any of claims 1-7.
CN202310275693.4A 2023-03-20 2023-03-20 Database data query method, device, electronic equipment and storage medium based on state dictionary Pending CN116303610A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310275693.4A CN116303610A (en) 2023-03-20 2023-03-20 Database data query method, device, electronic equipment and storage medium based on state dictionary

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310275693.4A CN116303610A (en) 2023-03-20 2023-03-20 Database data query method, device, electronic equipment and storage medium based on state dictionary

Publications (1)

Publication Number Publication Date
CN116303610A true CN116303610A (en) 2023-06-23

Family

ID=86790146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310275693.4A Pending CN116303610A (en) 2023-03-20 2023-03-20 Database data query method, device, electronic equipment and storage medium based on state dictionary

Country Status (1)

Country Link
CN (1) CN116303610A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775697A (en) * 2023-07-06 2023-09-19 北京火山引擎科技有限公司 Data table query method, device, computing equipment and storage medium in database

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782645A (en) * 2019-11-29 2020-10-16 北京沃东天骏信息技术有限公司 Data processing method and device
CN113986921A (en) * 2021-10-27 2022-01-28 中国工商银行股份有限公司 A blacklist query method, system, electronic device and storage medium
CN114647658A (en) * 2022-03-30 2022-06-21 新华三信息技术有限公司 Data retrieval method, device, equipment and machine-readable storage medium
WO2022143540A1 (en) * 2020-12-31 2022-07-07 杭州趣链科技有限公司 Block chain index storage method and apparatus, computer device and medium
CN115374142A (en) * 2022-04-15 2022-11-22 北京理工大学 LSH-based direct query method for non-equivalent connectable data table

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782645A (en) * 2019-11-29 2020-10-16 北京沃东天骏信息技术有限公司 Data processing method and device
WO2022143540A1 (en) * 2020-12-31 2022-07-07 杭州趣链科技有限公司 Block chain index storage method and apparatus, computer device and medium
CN113986921A (en) * 2021-10-27 2022-01-28 中国工商银行股份有限公司 A blacklist query method, system, electronic device and storage medium
CN114647658A (en) * 2022-03-30 2022-06-21 新华三信息技术有限公司 Data retrieval method, device, equipment and machine-readable storage medium
CN115374142A (en) * 2022-04-15 2022-11-22 北京理工大学 LSH-based direct query method for non-equivalent connectable data table

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775697A (en) * 2023-07-06 2023-09-19 北京火山引擎科技有限公司 Data table query method, device, computing equipment and storage medium in database

Similar Documents

Publication Publication Date Title
CN112015775B (en) Tag data processing methods, devices, equipment and storage media
CN113568938B (en) Data stream processing method, device, electronic equipment and storage medium
US20220358178A1 (en) Data query method, electronic device, and storage medium
CN111177476B (en) Data query method, device, electronic device and readable storage medium
CN112818013B (en) Time series database query optimization method, device, equipment and storage medium
CN115665159B (en) Metadata management method and system in big data environment
CN113190551A (en) Feature retrieval system construction method, feature retrieval method, device and equipment
WO2023160137A1 (en) Graph data storage method and system, and computer device
CN114035750A (en) File processing method, device, equipment, medium and product
CN111259090B (en) Graph generation method, device, electronic device and storage medium for relational data
US11971856B2 (en) Efficient database query evaluation
CN116303610A (en) Database data query method, device, electronic equipment and storage medium based on state dictionary
CN116594962A (en) Access request processing method and device and forward index system
CN112307062A (en) Database aggregation query method, device and system
CN114817651A (en) Data storage method, data query method, device and equipment
CN114936246A (en) Redis data management method, device, equipment, storage medium and product
CN114416414A (en) Fault information positioning method, device, equipment and storage medium
CN114417023A (en) Data processing method and device, electronic equipment and storage medium
CN117271840B (en) Data query method and device of graph database and electronic equipment
CN114579573B (en) Information retrieval method, information retrieval device, electronic equipment and storage medium
CN116578646A (en) A time series data synchronization method, device, equipment and storage medium
CN116680295A (en) Method, system and device for multi-database processing data
CN115904240A (en) Data processing method, device, electronic device and storage medium
CN116450715A (en) Information integration data processing method, system, electronic equipment and storage medium
CN115328917A (en) Query method, device, equipment 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