Data query method, device and equipment and readable medium

By constructing bitmaps and querying data based on entity attributes and logical operations, the problems of slow data query speed and wasted storage resources are solved, achieving more efficient data query and storage optimization.

CN121705293APending Publication Date: 2026-03-20BEIJING JINGDONG YUANSHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

As data volume increases and query conditions become more complex, existing technologies suffer from slow data query speeds, soaring database pressure, and wasted storage resources.

Method used

By constructing a bitmap, using entity attributes, attribute values, and logical operation relationships, a target bitmap is determined from multiple bitmaps. Data queries are then performed based on the bitmap, which includes data bits arranged in sequence, with the nth data bit indicating the entity index value as n.

Benefits of technology

It improved the response speed of data queries, reduced time complexity and database pressure, and saved storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121705293A_ABST
    Figure CN121705293A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data query method and device, equipment and a readable medium. The method comprises the following steps: acquiring a query request, wherein the query request indicates at least one entity attribute, an attribute value corresponding to the at least one entity attribute and a logical operation relationship between the at least one entity attribute; based on the at least one entity attribute, the attribute value corresponding to the at least one entity attribute and a plurality of predetermined bitmap tags, at least one target bitmap is determined from the plurality of bitmaps, the bitmap comprises a plurality of data bits arranged in sequence, and the nth data bit indicates that the entity index value is n; and based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap, determining a query result corresponding to the query request. In this way, the response speed of data query can be increased, the time complexity and database pressure are reduced, and storage resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to a data query method, apparatus, electronic device and computer readable storage medium. BACKGROUND

[0002] Data query is usually directly querying a database, or caching data through caching technology. With the increase of data volume and the complication of query conditions, data query is slow, database pressure rises, and data redundancy resources are wasted. SUMMARY

[0003] In a first aspect of the present disclosure, a data query method is provided, comprising: obtaining a query request, the query request indicating at least one entity attribute, attribute values corresponding to the at least one entity attribute respectively, and a logical operation relationship between the at least one entity attribute; determining at least one target bitmap from a plurality of bitmaps based on the at least one entity attribute, the attribute values corresponding to the at least one entity attribute respectively, and a plurality of predetermined bitmap labels, a bitmap comprising a plurality of data bits arranged in order, an nth data bit indicating an entity index value of n; and determining a query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap.

[0004] In a second aspect of the present disclosure, a data query apparatus is provided, comprising: a first obtaining module configured to obtain a query request, the query request indicating at least one entity attribute, attribute values corresponding to the at least one entity attribute respectively, and a logical operation relationship between the at least one entity attribute; a first determining module configured to determine at least one target bitmap from a plurality of bitmaps based on the at least one entity attribute, the attribute values corresponding to the at least one entity attribute respectively, and a plurality of predetermined bitmap labels, a bitmap comprising a plurality of data bits arranged in order, an nth data bit indicating an entity index value of n; and a second determining module configured to determine a query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device comprises at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method of the first aspect or the second aspect of the present disclosure.

[0006] In a fourth aspect of the present disclosure, a computer readable storage medium is provided. The computer readable storage medium has stored thereon a computer program which is executable by a processor to perform the method according to the first aspect or the second aspect of the present disclosure.

[0007] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method of the first aspect or the second aspect.

[0008] It should be understood that all statements herein made regarding the foregoing aspects of the disclosure are intended to encompass both the specific and generic features thereof. Moreover, it should be understood that the foregoing description and examples are intended to be illustrative only, and are not intended to limit the scope of the disclosure. As such, the disclosure is not limited by the foregoing description and examples. BRIEF DESCRIPTION OF DRAWINGS

[0009] The above and other features, aspects, and advantages of various implementations of the present disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings. In the drawings similar elements are denoted by similar reference numerals, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0011] Figure 2 A block diagram showing a process of bitmap construction according to some embodiments of the present disclosure;

[0012] Figure 3 A block diagram showing a process of data query according to some embodiments of the present disclosure;

[0013] Figure 4 A schematic diagram showing a page of management of product attributes according to some embodiments of the present disclosure;

[0014] Figure 5 A schematic diagram showing a page of collection of package information according to some embodiments of the present disclosure;

[0015] Figure 6 A flowchart showing a process of data query according to some embodiments of the present disclosure;

[0016] Figure 7 A flowchart showing a process of bitmap construction according to some embodiments of the present disclosure;

[0017] Figure 8 A block diagram showing an apparatus of data query according to some embodiments of the present disclosure;

[0018] Figure 9 A block diagram showing an apparatus of bitmap construction according to some embodiments of the present disclosure; and

[0019] Figure 10 A block diagram of an electronic device in which one or more embodiments of the disclosure can be implemented is shown. DETAILED DESCRIPTION

[0020] Embodiments of the disclosure will be described more fully hereinafter with reference to the accompanying drawings. While several embodiments of the disclosure have been illustrated, it is to be understood that the disclosure is not limited to the precise embodiments, and that various changes and modifications can be made by persons skilled in the art without departing from the scope of the disclosure. It is therefore intended that such changes and modifications be included within the scope of the disclosure. It is to be understood that the drawings and detailed description thereto are merely illustrative and explanatory and are not intended to limit the scope of the present disclosure.

[0021] In the description of embodiments of the disclosure, the term "comprising" and its conjugations are to be understood to be open-ended, i.e., "including but not limited to". The term "based on" is to be understood as "based, at least in part, on". The term "one embodiment" or "an embodiment" is to be understood as "at least one embodiment". The term "some embodiments" is to be understood as "at least some embodiments". Additional explicit and implicit definitions can be found below.

[0022] It should be noted that in the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0023] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the scope of use, the use scenario, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0024] For example, in response to receiving the active request of the user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be executed will require obtaining and using the personal information of the user, so that the user can voluntarily choose whether to provide personal information to the software or hardware such as electronic device, application program, server or storage medium, etc. that executes the operation of the technical solutions of the present disclosure according to the prompt information.

[0025] As an optional but not limiting implementation manner, in response to receiving the active request of the user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0026] As described above, data query is usually directly queried from a database or cached by a caching technique. With the increase of data volume and the complication of query conditions, data query is slow, database pressure is high, and data redundancy resources are wasted.

[0027] For example, when data is cached by a caching technique, although part of the data can be accelerated by caching, the cache cannot aggregate multiple query conditions, resulting in slow query speed when the data volume is large and the query conditions are complex.

[0028] For example, when querying the status, type, and other enumerable values of some entities, the database often needs to scan the entire table due to low index differentiation, causing high database pressure.

[0029] For example, unified processing of data by backing up data to a search engine causes the entire data of the database to be stored twice, resulting in waste of storage resources.

[0030] Embodiments of the present disclosure provide an improved solution for data query. In embodiments of the present disclosure, a query request indicating entity attributes, attribute values, and logical operation relationships between attributes is first obtained. Then, the target bitmap is determined from a plurality of bitmaps using the entity attributes, attribute values, and a plurality of predetermined bitmap tags, the bitmap including a plurality of sequentially arranged data bits, the nth data bit indicating an entity index value of n. Finally, the query result corresponding to the query request is determined based on the logical operation relationships between the entity attributes and the target bitmap. In this way, the response speed of data query can be improved, the time complexity and database pressure can be reduced, and storage resources can be saved. Example environment

[0031] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown.

[0032] As shown in Figure 1 The environment 100 includes a server 110. The data query service 120 and the database 130 can be deployed in the server 110. The data query service 120 can query data in the database 130 based on a query condition and return a query result.

[0033] It should be understood that Figure 1 The data query service 120 and the database 130 shown in

[0034] The communication connection between server A and server B can be established via wired or wireless means. The communication connection may include, but is not limited to, Bluetooth, mobile network, Universal Serial Bus (USB), and Wireless Fidelity (WiFi) connections, and the embodiments disclosed herein are not limited in this respect.

[0035] In some embodiments, server 110 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Server 110 may include, for example, computing systems / servers such as mainframes, edge computing nodes, computing devices in a cloud environment, etc.

[0036] In some embodiments, database 130 can be any type of database. For example, a relational database management system (RDBMS), a non-relational database (Not Only SQL, NoSQL), an object-oriented database management system (OODBMS), a distributed database system (DDS), and so on.

[0037] It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Example data query

[0038] Next, combine Figure 1 This document provides a detailed description of the data query and bitmap construction schemes provided in this disclosure. Figure 2 A block diagram of a bitmap construction process 200 according to some embodiments of the present disclosure is shown. Process 200 may be implemented at data query service 120.

[0039] like Figure 2As shown, the data query service 120 can listen to a change log (e.g., a binlog) 220 of the database 130, which can reflect changes of data in the database 130. One or more attribute tables can be stored in the database 130, which can include entity index values, entity unique identifiers, one or more entity attributes, and the like. The data query service 120 can determine changes of the attribute tables in the database 130 by listening to the change log 220, and can further construct a bitmap or update an already constructed bitmap according to the changes of the attribute tables.

[0040] In embodiments of the present disclosure, one bitmap can include a plurality of data bits arranged in sequence. The nth data bit indicates an entity index value of n. For example, the bitmap can be a bit array, in which 000100, the bit array 000100 includes a total of 6 data bits, which can indicate that the entity index values in the attribute table are at most 6, and the value of the 3rd data bit of the bit array 000100 is 1, which can indicate that the entity index value is 3.

[0041] When constructing the bitmap, the data query service 120 can determine the number of data bits of the bitmap based on the number of entity index values in the attribute table. In some embodiments, the number of data bits is greater than or equal to the number of entity index values. For example, the number of entity index values in the data table is 4, and the number of data bits in the bitmap can be greater than or equal to 4.

[0042] The data query service 120 can also determine the values of the data bits based on the entity index values. For example, the index value is 2, and the value of the 2nd data bit in the bitmap can be 1, and the values of the other data bits can be 0.

[0043] After determining the number of data bits of the bitmap and the values of the data bits of the bitmap, the data query service can construct the bitmap according to the number of data bits and the values of the data bits. For example, the number of data bits is greater than or equal to 4, and the value of the 2nd data bit is 1 and the values of the other data bits are 0, then the bitmap can be constructed as: 00100, or 001000, etc.

[0044] In some embodiments, the data query service 120 can update the bitmap based on the changed attribute table in response to determining that the attribute table has changed. For example, one or more rows or columns are added or removed from the attribute table, and the data query service 120 can update the already constructed bitmap based on the changed attribute table.

[0045] In some embodiments, the bitmap has corresponding bitmap labels, which can include attribute labels and attribute value labels corresponding to the attribute labels. The data query service 120 can generate the bitmap labels based on the entity attributes in the attribute table and the attribute values corresponding to the entity attributes. For example, the bitmap labels can be represented as "entity attribute_attribute value".

[0046] In some embodiments, the bitmap and the bitmap labels can be defined in the memory, and since the operation memory is used, the response speed of the query can be improved and the waiting time of the user can be reduced.

[0047] The construction process of the bitmap will be described below in combination with a specific example.

[0048] Table 1 below shows an attribute table stored in the database 130. Table 1 Index value Identifier Attribute 1 Attribute 2 Attribute 3 1 XX1 1 1 3 2 XX2 0 0 5 3 XX3 1 2 6 4 XX4 1 1 6

[0049] The data query service 120 can determine the bitmap labels of the bitmap based on the entity attributes and the attribute values corresponding to the entity attributes as follows: attribute 1_0, attribute 1_1, attribute 2_0, attribute 2_1, attribute 2_2, attribute 3_3, attribute 3_5 and attribute 3_6. And based on the entity index values in Table 1 and the number of entity index values, the following bitmap is constructed:

[0050] Attribute 1_0, 001000, indicates that the entity index value corresponding to attribute 1 being 0 is 2;

[0051] Attribute 1_1, 010110, indicates that the entity index values corresponding to attribute 1 being 1 are 1, 3 and 4;

[0052] Attribute 2_0, 001000, indicates that the entity index value corresponding to attribute 2 being 0 is 2;

[0053] Attribute 2_1, 010010, indicates that the entity index values corresponding to attribute 2 being 1 are 1 and 4;

[0054] Attribute 2_2, 000100, indicates that the entity index value corresponding to attribute 2 being 2 is 3;

[0055] Attribute 3_3, 010000, indicates that the entity index value corresponding to attribute 3 being 3 is 1;

[0056] Attribute 3_5, 001000, indicates that the entity index value corresponding to attribute 3 being 5 is 2;

[0057] Attribute 3_6, 000110, indicates that the entity index values corresponding to attribute 3 being 6 are 3 and 4.

[0058] After the bitmap is constructed, the data query service 120 can query the data stored in the database 130 based on the query request and the bitmap.

[0059] Figure 3 A block diagram of a data query process 300 according to some embodiments of the present disclosure is shown. Process 300 may be implemented at data query service 120.

[0060] like Figure 3 As shown, after receiving a query request 310, the data query service 120 first needs to determine the query type 320, that is, determine the type of query request. In this embodiment of the disclosure, the query request may include a first type of query request and a second type of query request. The first type of query request may be a statistical query request, such as counting the number of entities that match one or more attributes; the second type of query request may be a detailed query request, such as querying the details of entities that match one or more attributes.

[0061] In this embodiment of the disclosure, a query request may include at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and the logical operation relationship between the at least one entity attribute. The logical operation relationship between the at least one entity attribute may represent one or more query conditions, for example, "query the number of entities that have attribute 1, attribute 2, and attribute 3", where the logical operation relationship between attribute 1, attribute 2, and attribute 3 is "AND". Another example is "query entities that do not have attribute 1", where the logical operation relationship for attribute 1 is "NOT".

[0062] Data query service 120 can determine at least one target bitmap from multiple bitmaps based on at least one entity attribute, the attribute values ​​corresponding to each of the at least one entity attribute, and multiple bitmap tags. Bitmap tags and bitmaps... Figure 1 One-to-one correspondence.

[0063] In some embodiments, the data query service 120 may determine an attribute label corresponding to at least one entity attribute from a plurality of predetermined bitmap labels based on at least one entity attribute, determine an attribute value label corresponding to the attribute value corresponding to at least one entity attribute from a plurality of bitmap labels based on the attribute value corresponding to at least one entity attribute, and determine at least one target bitmap from a plurality of bitmaps based on the attribute label and the attribute value label.

[0064] For example, the bitmap corresponding to the bitmap label "attribute1_0" is "001000". The data query service 120 can determine the bitmap label corresponding to the entity attribute and attribute value based on the entity attribute and attribute value in the query request, thereby determining the bitmap corresponding to the bitmap label.

[0065] The data query service 120, in response to determining that the type of the query request is the first type (i.e., the first type of query request), performs a logical operation on the same data bits in the at least one target bitmap based on the logical operation relationship, and takes the number of data bits with a value of 1 in the operation result as the query result.

[0066] For example, referring to the bitmap constructed based on Table 1, if the query request is "query the number of entities with attribute 1, attribute 2, and attribute 3, and the attribute value of attribute 1 is 1, the attribute value of attribute 2 is 2, and the attribute value of attribute 3 is 6", it can be determined that the logical operation relationship between attribute 1, attribute 2, and attribute 3 is the "and" operation, and at this time, the bitmap corresponding to attribute 1_1, attribute 2_2, and attribute 3_6 can be subjected to the "and" operation, and the number of data bits with a value of 1 in the operation result is counted.

[0067] For example, the bitmap corresponding to attribute 1_1 is 010110, the bitmap corresponding to attribute 2_2 is 000100, and the bitmap corresponding to attribute 3_6 is 000110. After the "and" operation, the operation result is 000100, and the number of data bits with a value of 1 in the operation result is 1. It can be determined that the query result satisfying the query condition is 1.

[0068] The data query service 120, in response to determining that the type of the query request is the second type (i.e., the second type of query request), performs a logical operation on the same data bits in the at least one target bitmap based on the logical operation relationship, determines the serial number of the data bit with a value of 1 in the operation result as the entity index value, and obtains the entity data corresponding to the entity index value from the database 130 based on the entity index value as the query result.

[0069] For example, continuing to refer to the above example, if the query request is "query the entity with attribute 1, attribute 2, and attribute 3, and the attribute value of attribute 1 is 1, the attribute value of attribute 2 is 2, and the attribute value of attribute 3 is 6", the operation result after the logical operation on the corresponding bitmap is 000100, indicating that the entity index value satisfying the above query condition is 3. The data query service 120 obtains the details of the entity corresponding to the entity index value 3 from the database 130 based on the entity index value, as shown in Table 2: Table 2 Index value Identifier Attribute 1 Attribute 2 Attribute 3 3 XX3 1 2 6

[0070] The data query scheme provided by the embodiments of the present disclosure can be applied to various fields. For example, the management of commodity attributes in an operations and maintenance center (OMC), the collection of package data in a sorting system, and the like.

[0071] Referring to Figure 4 , Figure 4A page 400 for managing attributes of a commodity in an operation and maintenance system is shown. An attribute table of the commodity is stored in the database 130, and the data query service 120 can pre-construct a bitmap corresponding to the attribute table of the commodity or can construct the corresponding bitmap in real time based on the attribute table of the commodity. The attributes of the commodity (for example, a unique identifier (Stock Keeping Unit, sku) of the commodity) are input in the page, and the data query service 120 can quickly query the commodity meeting the conditions through the above-mentioned manner by clicking the query.

[0072] Referring to Figure 5 , Figure 5 A collection page 500 of a parcel in a sorting system is shown. Similarly to the example of Figure 4 , conditions or attributes (for example, a type of exceeding a standard, whether to be sampled, whether to be collected compulsorily, and the like) that need to be queried are input in the page, and the data query service 120 can quickly query the commodity meeting the conditions through the above-mentioned manner by clicking the query.

[0073] In summary, according to the embodiments of the present disclosure, a query request indicating entity attributes, attribute values, and a logical operation relationship between the attributes is first acquired. Then, the target bitmap is determined from a plurality of bitmaps by using the entity attributes, the attribute values, and a plurality of predetermined bitmap labels. Finally, the query result corresponding to the query request is determined based on the logical operation relationship between the entity attributes and the target bitmap. Since the bitmap is stored in the memory, the response speed can be improved. Further, the bitmap includes a plurality of data bits arranged in sequence, and the nth data bit indicates an entity index value of n. The data is queried by using the bitmap, and the logical operation is actually performed on the bitmap, thereby reducing the time complexity and the pressure on the database. Further, since the bitmap is a bit array, each flag bit only occupies 1 bit of data. Compared with related technologies, when 10 million data indexes are stored, 10 million bits of bitmap operation are required, which is equivalent to 1.2M of storage space, thereby saving storage resources. Example process and apparatus

[0074] Figure 6 A flowchart of a process 600 of data query according to some embodiments of the present disclosure is shown. The process 600 can be implemented at the data query service 120.

[0075] At block 610, the data query service 120 acquires a query request, which indicates at least one entity attribute, an attribute value corresponding to each of the at least one entity attribute, and a logical operation relationship between the at least one entity attribute.

[0076] In box 620, data query service 120 determines at least one target bitmap from multiple bitmaps based on the at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and multiple predetermined bitmap labels. The bitmap includes multiple data bits arranged in sequence, and the nth data bit indicates that the entity index value is n.

[0077] In box 630, the data query service 120 determines the query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap.

[0078] In some embodiments, determining the query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap includes: in response to determining that the type of the query request is a first type, performing logical operations on the same data bits in the at least one target bitmap based on the logical operation relationship; and taking the number of data bits with a value of 1 in the operation result as the query result.

[0079] In some embodiments, determining the query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap includes: in response to determining that the type of the query request is a second type, performing logical operations on the same data bits in the at least one target bitmap based on the logical operation relationship; determining the sequence number of the data bit with a value of 1 in the operation result as the entity index value; and obtaining the entity data corresponding to the entity index value as the query result based on the entity index value.

[0080] In some embodiments, each predetermined bitmap tag includes an attribute tag and an attribute value tag corresponding to the attribute tag, and wherein determining at least one target bitmap from a plurality of bitmaps based on the at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and a plurality of predetermined bitmap tags includes: determining the attribute tag corresponding to each of the at least one entity attribute from the plurality of predetermined bitmap tags based on the at least one entity attribute; determining the attribute value tag corresponding to the attribute value corresponding to each of the at least one entity attribute from the plurality of predetermined bitmap tags based on the attribute value corresponding to each of the at least one entity attribute; and determining at least one target bitmap from the plurality of bitmaps based on the attribute tag and the attribute value tag.

[0081] Figure 7 A flowchart of a bitmap construction process 700 according to some embodiments of the present disclosure is shown. Process 700 can be implemented at data query service 120.

[0082] At block 710, the data query service 120 obtains an attribute table, the attribute table comprising entity index values.

[0083] At block 720, the data query service 120 determines a number of data bits of a bitmap based on a number of the entity index values.

[0084] At block 740, the data query service 120 determines values of the data bits based on the entity index values.

[0085] At block 750, the data query service 120 constructs the bitmap based on the number of the data bits and the values of the data bits, the bitmap comprising a plurality of data bits arranged in sequence, an nth data bit indicating an entity index value n.

[0086] In some embodiments, the attribute table further comprises entity attributes and attribute values corresponding to the entity attributes, and the process 700 further comprises determining bitmap labels of the bitmap based on the entity attributes and the attribute values corresponding to the entity attributes.

[0087] In some embodiments, the bitmap labels comprise attribute labels and attribute value labels corresponding to the attribute labels.

[0088] In some embodiments, the number of the data bits is greater than or equal to the number of the entity index values.

[0089] In some embodiments, the process 700 further comprises updating the bitmap based on the changed attribute table in response to determining that the attribute table is changed.

[0090] Figure 8 A block diagram of an apparatus 800 for data query is shown in accordance with some embodiments of the present disclosure. The apparatus 800 can be included at the data query service 120.

[0091] The apparatus 800 comprises a first obtaining module 810 configured to obtain a query request, the query request indicating at least one entity attribute, attribute values corresponding to the at least one entity attribute respectively, and a logical operation relationship between the at least one entity attribute. The apparatus 800 further comprises a first determining module 820 configured to determine at least one target bitmap from a plurality of bitmaps based on the at least one entity attribute, the attribute values corresponding to the at least one entity attribute respectively, and a plurality of predetermined bitmap labels, a bitmap comprising a plurality of data bits arranged in sequence, an nth data bit indicating an entity index value n. The apparatus 800 further comprises a second determining module 830 configured to determine a query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap.

[0092] In some embodiments, the second determining module 830 is further configured to, in response to determining that the type of the query request is the first type, perform a logical operation on the same data bits in the at least one target bitmap based on the logical operation relationship; and take the number of data bits with a value of 1 in the operation result as the query result.

[0093] In some embodiments, the second determining module 830 is further configured to, in response to determining that the type of the query request is the second type, perform a logical operation on the same data bits in the at least one target bitmap based on the logical operation relationship; take the serial number of the data bit with a value of 1 in the operation result as the entity index value; and based on the entity index value, obtain the entity data corresponding to the entity index value as the query result.

[0094] In some embodiments, each of the predetermined bitmap labels includes an attribute label and an attribute value label corresponding to the attribute label, and the first determining module 820 is further configured to: based on the at least one entity attribute, determine the attribute label corresponding to each of the at least one entity attribute from the plurality of predetermined bitmap labels; based on the attribute value corresponding to each of the at least one entity attribute, determine the attribute value label corresponding to the attribute value corresponding to each of the at least one entity attribute from the plurality of predetermined bitmap labels; and based on the attribute label and the attribute value label, determine at least one target bitmap from the plurality of bitmaps.

[0095] Figure 9 A block diagram of an apparatus 900 for bitmap construction is shown in accordance with some embodiments of the present disclosure. The apparatus 900 can be included at the data query service 120.

[0096] The apparatus 900 includes a second obtaining module 910 configured to obtain an attribute table, the attribute table including an entity index value. The apparatus 900 further includes a third determining module 920 configured to determine a number of data bits of a bitmap based on a number of the entity index values. The apparatus 900 further includes a fourth determining module 930 configured to determine values of the data bits based on the entity index values. The apparatus 900 further includes a constructing module configured to construct the bitmap based on the number of the data bits and the values of the data bits, the bitmap including a plurality of data bits arranged in sequence, an nth data bit indicating an entity index value of n.

[0097] In some embodiments, the attribute table further includes an entity attribute and an attribute value corresponding to the entity attribute, and the apparatus 900 further includes a fifth determining module configured to determine a bitmap label of the bitmap based on the entity attribute and the attribute value corresponding to the entity attribute.

[0098] In some embodiments, the bitmap tag includes an attribute tag and an attribute value tag corresponding to the attribute tag.

[0099] In some embodiments, the number of data bits is greater than or equal to the number of entity index values.

[0100] In some embodiments, the apparatus 900 further includes an update module configured to update the bitmap based on the changed attribute table in response to determining that the attribute table has changed.

[0101] Figure 10 A block diagram of an electronic device 1000 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 10 The electronic device 1000 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein.

[0102] like Figure 10 As shown, electronic device 1000 is in the form of a general-purpose computing device. Components of electronic device 1000 may include, but are not limited to, one or more processors or processing units 1010, memory 1020, storage device 1030, one or more communication units 1040, one or more input devices 1050, and one or more output devices 1060. Processing unit 1010 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 1020. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 1000.

[0103] Electronic device 1000 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 1000, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 1020 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 1030 can be a removable or non-removable medium and may include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data (e.g., training data for training) and accessible within electronic device 1000.

[0104] Electronic device 1000 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 10As shown in FIG. 10, a disk drive 1014, a flash memory card, or other removable nonvolatile memory can be provided, so that raw data or other data can be read from or written to the removable, nonvolatile memory. In these cases, each drive can be connected to the bus (not shown) by one or more data media interfaces. The memory 1020 can include a computer program product 1025 having one or more program modules configured to carry out the various methods or actions of the various embodiments of the present disclosure.

[0105] The communication unit 1040 enables communication through a communication medium with other electronic devices. Additionally, the functionality of the components of the electronic device 1000 can be implemented in a single computing cluster or a plurality of computer machines that are capable of communicating with each other through a communication connection. As such, the electronic device 1000 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network nodes.

[0106] The input device 1050 can be one or more input devices, such as a mouse, a keyboard, a trackball, etc. The output device 1060 can be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 1000 can also communicate with one or more external devices (not shown) such as a storage device, a display device, etc., one or more devices that enable a user to interact with the electronic device 1000, or any devices (e.g., a network card, a modem, etc.) that enable the electronic device 1000 to communicate with one or more other electronic devices, through the communication unit 1040, as needed. Such communication can be carried out via an input / output (I / O) interface (not shown).

[0107] According to an example implementation of the present disclosure, a computer readable storage medium is provided, having stored thereon one or more computer instructions, wherein the one or more computer instructions are executed by a processor to implement the method described above. According to an example implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer readable medium and includes computer executable instructions, and the computer executable instructions are executed by a processor to implement the method described above.

[0108] Various aspects of the disclosure are now described with reference to the drawings. In general, the drawings described below are diagrammatic and schematic representations of actual or conceptual structures and processes, and are not limiting of the scope of the present disclosure. In the drawings, like reference numerals designate like structural elements throughout the various figures, wherein:

[0109] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer- readable storage medium having no data, programs, program modules, e.g., instructions for operation, or digital content stored thereon or therein for a short time or not at all. The computer readable storage medium can also have other meanings inhered therein by those skilled in the art.

[0110] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0111] The flow diagrams and the block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various implementations of the present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical functions (‘instructions’). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and

[0112] implementations have been described above, the description is intended to be illustrative, and not restrictive, of the implementations disclosed. Many modifications and variations of the implementations described herein are possible and come within the scope of the implementations described. It is therefore to be understood that there is no intention to limit the disclosure to the specific implementations disclosed and that any one or more of the features can be implemented alone or in any combination thereof. The scope of the disclosure is to be determined by the following claims.

Claims

1. A data query method, comprising: Obtain a query request, wherein the query request indicates at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and the logical operation relationship between the at least one entity attribute; Based on the at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and a plurality of predetermined bitmap tags, at least one target bitmap is determined from a plurality of bitmaps, wherein the bitmap includes a plurality of data bits arranged in order, and the nth data bit indicates that the entity index value is n; as well as Based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap, the query result corresponding to the query request is determined.

2. The method according to claim 1, wherein determining the query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap includes: In response to determining that the type of the query request is a first type, logical operations are performed on the same data bits in the at least one target bitmap based on the logical operation relationship; as well as The number of data bits with a value of 1 in the calculation result is taken as the query result.

3. The method according to claim 1, wherein determining the query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap includes: In response to determining that the type of the query request is a second type, logical operations are performed on the same data bits in the at least one target bitmap based on the logical operation relationship; The index number of the data bit with a value of 1 in the calculation result is determined as the entity index value; and Based on the entity index value, the entity data corresponding to the entity index value is obtained as the query result.

4. The method of claim 1, wherein each predetermined bitmap tag includes an attribute tag and an attribute value tag corresponding to the attribute tag, and wherein determining at least one target bitmap from a plurality of bitmaps based on the at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and the plurality of predetermined bitmap tags includes: Based on the at least one entity attribute, determine the attribute label corresponding to each of the at least one entity attribute from the plurality of predetermined bitmap labels; Based on the attribute values ​​corresponding to each of the at least one entity attribute, the attribute value tag corresponding to the attribute value corresponding to each of the at least one entity attribute is determined from the plurality of predetermined bitmap tags; as well as Based on the attribute tags and the attribute value tags, at least one target bitmap is determined from multiple bitmaps.

5. The method according to claim 1, further comprising: Obtain the attribute table, which includes entity index values; The number of data bits in the bitmap is determined based on the number of entity index values. Based on the entity index value, determine the value of the data bit; as well as Based on the number of data bits and the value of the data bits, the bitmap is constructed, the bitmap including multiple data bits arranged in order, and the nth data bit indicating the entity index value is n.

6. The method according to claim 5, wherein the attribute table further includes entity attributes and attribute values ​​corresponding to the entity attributes, and the method further includes: The bitmap label of the bitmap is determined based on the entity attribute and the attribute value corresponding to the entity attribute.

7. The method according to claim 6, wherein the bitmap tag includes an attribute tag and an attribute value tag corresponding to the attribute tag.

8. The method of claim 5, wherein the number of data bits is greater than or equal to the number of entity index values.

9. The method according to claim 5, further comprising: In response to determining that the attribute table has changed, the bitmap is updated based on the changed attribute table.

10. A data query device, comprising: The first acquisition module is configured to acquire a query request, wherein the query request indicates at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and the logical operation relationship between the at least one entity attribute; The first determining module is configured to determine at least one target bitmap from multiple bitmaps based on the at least one entity attribute, the attribute value corresponding to each of the at least one entity attribute, and multiple predetermined bitmap tags. The bitmap includes multiple data bits arranged in sequence, and the nth data bit indicates that the entity index value is n. as well as The second determining module is configured to determine the query result corresponding to the query request based on the logical operation relationship between the at least one entity attribute and the at least one target bitmap.

11. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 9 when executed by the at least one processing unit.

12. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 9.

13. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 9.