Object query method and device, computer equipment and storage medium

By mapping bit marking and synchronization in the marker array of the graph database, the problem of low memory utilization rate in multi-hop relationship query is solved, and efficient memory utilization and computing performance is achieved.

CN120234448APending Publication Date: 2025-07-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311835534.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

When the graph database querys other point objects with multi-hop relationships with point objects, it requires a large amount of memory space to save related point objects and edge objects, resulting in low memory utilization.

Method used

By mapping bit marking in the current tag array containing the global object map bits, for each round of target map bits, the mapping bits of adjacent objects with connection relationships with the target map bits represented by the target map bits are positioned and marked from the unmarked map bits of the global tag array, and synchronized to the current tag array until a graph object that meets the query conditions are obtained.

Benefits of technology

It effectively reduces memory overhead, improves memory utilization, and takes into account both memory overhead and computing overhead, improving the efficiency of object query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234448A_ABST
    Figure CN120234448A_ABST
Patent Text Reader

Abstract

The invention relates to an object query method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in response to a graph object query request, determining a starting point object and a query condition corresponding to the graph object query request; marking the mapping bit of the starting point object in the current marking array containing the global object mapping bit to obtain a target mapping bit of the current marking array in the current round; for a target mapping bit of each round, positioning and marking a mapping bit of an adjacent object having a connection relationship with a target object represented by the target mapping bit, and synchronizing a newly added mark of the global mark array in the current round to the current mark array; and based on the mark synchronized to the current mark array, determining a target mapping bit of the current mark array in a new round so as to carry out mapping bit marking in the new round until a graph object meeting a query condition is obtained. By adopting the method, the memory utilization rate in the object query process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technologies, and in particular, to a method, apparatus, computer device, and storage medium for object query. Background Art

[0002] With the rapid development of the mobile Internet, the relationships between the data to be processed in the big data industry grow geometrically with the data volume. There is an urgent need for a database that supports operations on massive and complex data relationships. Therefore, the graph database has emerged as the times require. A graph database, abbreviated as a graph DB, is a non-relational database that can store relationship information between entities by applying graph theory. Currently, the graph data in the graph database can be traversed by depth-first search, and the object query is specifically performed by using the object passing method for data exchange. However, the graph data in the graph database can store entities and the relationship information between entities. In the scenario where it is necessary to query other point objects that have multi-hop relationships with a point object, a large amount of memory space is often required to save the relevant point objects and edge objects. Therefore, the abstraction cost overhead combined with the global memory barrier will lead to the problem of low memory utilization. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, computer device, and storage medium for object query that can improve memory utilization.

[0004] In a first aspect, this application provides a method for object query. The method includes:

[0005] In response to a graph object query request, determine a starting object corresponding to the graph object query request and a query condition;

[0006] In a current marker array including global object mapping bits, mark the mapping bit of the starting object to obtain a target mapping bit of the current marker array in the current round;

[0007] For each target mapping bit in each round, locate and mark the mapping bits of adjacent objects that have a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array, and synchronize the newly added marks of the global marker array in the current round to the current marker array; the number of global object mapping bits included in the global marker array is the same as that of the current marker array;

[0008] In the case where the objects represented by the marked mapping bits do not satisfy the query condition with the starting object, based on the marks synchronized to the current marker array, determine the target mapping bit of the current marker array in a new round to perform a new round of mapping bit marking until a graph object that satisfies the query condition is obtained.

[0009] In a second aspect, the present application further provides an object query device. The device includes:

[0010] A request response module, configured to determine a starting object corresponding to a graph object query request and a query condition in response to the graph object query request;

[0011] A mapping bit marking module, configured to mark the mapping bit of the starting object in a current marking array including global object mapping bits, to obtain a target mapping bit of the current marking array in the current round;

[0012] A marking synchronization module, configured to, for the target mapping bit of each round, locate and mark the mapping bits of adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marking array, and synchronize the newly added markings of the global marking array in the current round to the current marking array; the number of global object mapping bits included in the global marking array is the same as that of the current marking array;

[0013] An object query module, configured to, when the objects represented by the marked mapping bits do not satisfy the query condition with respect to the starting object, determine a target mapping bit of the current marking array in a new round based on the markings synchronized to the current marking array to perform a new round of mapping bit marking until a graph object that satisfies the query condition is obtained.

[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0015] Determine a starting object corresponding to a graph object query request and a query condition in response to the graph object query request;

[0016] Mark the mapping bit of the starting object in a current marking array including global object mapping bits, to obtain a target mapping bit of the current marking array in the current round;

[0017] For the target mapping bit of each round, locate and mark the mapping bits of adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marking array, and synchronize the newly added markings of the global marking array in the current round to the current marking array; the number of global object mapping bits included in the global marking array is the same as that of the current marking array;

[0018] When the objects represented by the marked mapping bits do not satisfy the query condition with respect to the starting object, determine a target mapping bit of the current marking array in a new round based on the markings synchronized to the current marking array to perform a new round of mapping bit marking until a graph object that satisfies the query condition is obtained.

[0019] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0020] In response to a graph object query request, determine a starting object corresponding to the graph object query request and a query condition;

[0021] In a current marker array including global object mapping bits, mark the mapping bit of the starting object to obtain a target mapping bit of the current marker array in the current round;

[0022] For each round of target mapping bits, locate and mark the mapping bits of adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array, and synchronize the newly added marks of the global marker array in the current round to the current marker array; the number of global object mapping bits included in the global marker array is the same as that of the current marker array;

[0023] In the case where the objects represented by the marked mapping bits do not satisfy the query condition with respect to the starting object, based on the marks synchronized to the current marker array, determine the target mapping bit of the current marker array in a new round for a new round of mapping bit marking until a graph object that satisfies the query condition is obtained.

[0024] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0025] In response to a graph object query request, determine a starting object corresponding to the graph object query request and a query condition;

[0026] In a current marker array including global object mapping bits, mark the mapping bit of the starting object to obtain a target mapping bit of the current marker array in the current round;

[0027] For each round of target mapping bits, locate and mark the mapping bits of adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array, and synchronize the newly added marks of the global marker array in the current round to the current marker array; the number of global object mapping bits included in the global marker array is the same as that of the current marker array;

[0028] In the case where the objects represented by the marked mapping bits do not satisfy the query condition with respect to the starting object, based on the marks synchronized to the current marker array, determine the target mapping bit of the current marker array in a new round for a new round of mapping bit marking until a graph object that satisfies the query condition is obtained.

[0029] For the above method, apparatus, computer device, storage medium, and computer program product for object query, first perform mapping bit marking for the current round through the current marking array, and locate and mark the mapping bits of adjacent objects characterized by the marked target mapping bits in the current marking array from the unmarked mapping bits of the global marking array. The dot mapping value of the mapping bit can effectively reduce the memory overhead while ensuring the object indexing ability, and determine whether the objects represented by the marked mapping bits and the starting object meet the query conditions in the graph object query request, so as to obtain the graph objects that meet the query conditions and complete the object query more efficiently. That is, during the object query process, the mapping bits where the dot mapping values of the queried objects are located can be marked by using the current marking array and the global marking array. By allocating local continuity for the mapping bits on the marking array, the memory utilization rate during the marking process is increased, that is, the memory utilization rate during the object query process is improved, and both the memory overhead and the calculation overhead are taken into account. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is an application environment diagram of the method for object query in an embodiment;

[0031] Figure 2 It is a flowchart of the method for object query in an embodiment;

[0032] Figure 3 It is a structural diagram of the current marking array in an embodiment;

[0033] Figure 4 It is a structural diagram of the global marking array and the current marking array in an embodiment;

[0034] Figure 5 It is a schematic diagram of point objects with connection relationships in graph data in an embodiment;

[0035] Figure 6 It is a flowchart of the marking process based on the global marking array and the current marking array in an embodiment;

[0036] Figure 7 It is a flowchart of the process of obtaining the target mapping bit by marking in an embodiment;

[0037] Figure 8 It is a flowchart of the process of locating the mapping bits of adjacent objects in an embodiment;

[0038] Figure 9 It is a flowchart of the process of locating the mapping bits of adjacent objects in another embodiment;

[0039] Figure 10Schematic diagram of the process of synchronizing the tags newly added to the global tag array in the current round to the current tag array in an embodiment;

[0040] Figure 11 Array structure diagram of the current tag array, adjacent tag array, and global tag array in an embodiment;

[0041] Figure 12 Schematic diagram of the process of performing tagging based on the current tag array, adjacent tag array, and global tag array in an embodiment;

[0042] Figure 13 Schematic diagram of the process of scanning the target mapping bit in an embodiment;

[0043] Figure 14 Schematic diagram of the mapping table structure of the interval mapping table in an embodiment;

[0044] Figure 15 Schematic diagram of the mapping table structure of the first interval mapping table and the second interval mapping table in an embodiment;

[0045] Figure 16 Schematic diagram of the process of constructing the interval mapping table in an embodiment;

[0046] Figure 17 Schematic diagram of the process of constructing the first interval mapping table in an embodiment;

[0047] Figure 18 Schematic diagram of the process of constructing the second interval mapping table in an embodiment;

[0048] Figure 19 Schematic diagram of the process of generating the relationship path between the starting object and the target query object in an embodiment;

[0049] Figure 20 Schematic diagram of the process of updating the reverse current tag array in an embodiment;

[0050] Figure 21 Schematic diagram of the reverse current tag array and the current tag array in an embodiment;

[0051] Figure 22 Complete schematic diagram of the process of the object query method in an embodiment;

[0052] Figure 23 Schematic diagram of the process of the three-way tagging process in an embodiment;

[0053] Figure 24 Schematic diagram of the process of the construction process and traversal process of the secondary card table in an embodiment;

[0054] Figure 25A flowchart showing the process of label traceability in an embodiment;

[0055] Figure 26 A structural block diagram of an object query device in an embodiment;

[0056] Figure 27 A structural block diagram of an object query device in another embodiment;

[0057] Figure 28 A structural block diagram of an object query device in yet another embodiment;

[0058] Figure 29 An internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0059] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] With the rapid development of the mobile Internet, the relationships between the data to be processed in the big data industry increase geometrically with the data volume. There is an urgent need for a database that supports massive and complex data relationship operations. Therefore, the graph database has emerged as the times require. A graph database, abbreviated as a graph database, is a non-relational database that can store relationship information between entities by applying graph theory. Currently, the graph data can be traversed by depth-first search, and the object query is specifically performed by using the object passing method for data exchange. For example, the depth-first traversal (Depth-First-Search, DFS) of the graph is performed using the volcano model because the volcano model can perform depth-first traversal of the graph using a smaller memory space. However, the graph data in the graph database can store entities and the relationship information between entities. Then, in the scenario where other point objects with multi-hop relationships with the point object need to be queried, a large amount of memory space is often required to save the relevant point objects and edge objects. For example, the iterative calculation of the volcano model will bring a large overhead of virtual function calls, and the volcano model uses the object passing method for data exchange. During this period, the generation and release of objects will also bring a large computational overhead. Secondly, the volcano model cannot effectively control the memory in the aggregation scenario. For example, in scenarios such as deduplication, sorting, and classification, a large amount of memory space is often required to save temporary point-edge objects. It can be seen from this that the abstract cost overhead is superimposed on the global memory barrier, resulting in the inability to complete the traversal task and low memory utilization.

[0061] To solve the foregoing problems, an embodiment of the present application provides a method for object query that can perform breadth-first search (BFS) on a graph, specifically, a method for object query that can improve memory utilization. The object query method provided by the embodiment of the present application can be applied to, for example, Figure 1 the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or on other servers.

[0062] Specifically, taking the server 104 shown in Figure 1 as an example for illustration, the server 104 first responds to a graph object query request, and determines the starting object corresponding to the graph object query request and the query condition. Then, the server 104 marks the mapping bit of the starting object in the current marker array including the global object mapping bits, obtains the target mapping bit of the current marker array in the current round, and for each target mapping bit in each round, locates and marks the mapping bits of the adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array, and synchronizes the newly added marks of the global marker array in the current round to the current marker array; the number of global object mapping bits included in the global marker array is the same as that of the current marker array. In the case where the objects represented by the marked mapping bits do not meet the query condition with the starting object, based on the marks synchronized to the current marker array, determine the target mapping bit of the current marker array in a new round for a new round of mapping bit marking until a graph object that meets the query condition is obtained. Therefore, in the object query process, the use of the current marker array and the global marker array can complete the marking of the mapping bits where the point mapping values of the queried objects are located. By allocating local continuity to the mapping bits on the marker array, the memory utilization rate during the marking process is increased, that is, the memory utilization rate during the object query process is improved.

[0063] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, which are not limited in this application.

[0064] Furthermore, since the object query method provided in the embodiments of this application also involves cloud technology, the cloud technology will be briefly described below. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing.

[0065] Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the background system for logical processing. Data at different levels will be processed separately, and various industry data requires a powerful system support, which can only be achieved through cloud computing.

[0066] Among them, a database, in short, can be regarded as an electronic filing cabinet - a place for storing electronic files. Users can perform operations such as adding, querying, updating, and deleting data in the files. The so-called "database" is a data set that is stored together in a certain way, can be shared by multiple users, has the smallest possible redundancy, and is independent of the application program.

[0067] A database management system (DBMS for short) is a computer software system designed for managing databases, generally having basic functions such as storage, interception, security guarantee, backup, etc. Database management systems can be classified according to the database models they support, such as relational, XML (Extensible Markup Language); or according to the types of computers they support, such as server clusters, mobile phones; or according to the query languages they use, such as SQL (Structured Query Language), XQuery; or according to the key points of performance measurement, such as maximum scale, highest running speed; or other classification methods. No matter which classification method is used, some DBMSs can cross categories. For example, they can support multiple query languages at the same time.

[0068] Specifically, it is described through the following embodiments: In one embodiment, as Figure 2 shown, a method for object query is provided. Taking the method applied to Figure 1 the server 104 in it as an example for description, it can be understood that this method can also be applied to the terminal 102, and can also be applied to a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. It can be understood that since the database management system can be used to manage databases, the server 104 can be deployed with a database management system to complete the query requirements for graph objects in the database. In this embodiment, the method includes the following steps:

[0069] Step 202, in response to a graph object query request, determine the starting object corresponding to the graph object query request and the query condition. In this application, the graph object query request can also be understood as a graph query request, that is, this application is applied to a general graph query scenario and can be flexibly embedded into the query layer of the graph database, so as to efficiently and stably implement basic graph query requirements such as multi-hop query, shortest path, and simple path.

[0070] Among them, the graph object query request carries a starting object and query conditions. The starting object is specifically a point object in the graph data, and the starting object can be a single point object or a set of multiple point objects. In addition, the graph object query request can also carry a graph data identifier, which is used to uniquely identify the graph data to be queried. That is, the query parameter is specifically a parameter used to indicate the query of objects in the graph data to be queried, and the starting object belongs to the graph data to be queried. Based on this, the query conditions can at least include: a target query object, a relationship quantity condition for satisfying the connection relationship, and a condition for no adjacent object. The aforementioned target query object is the object that needs to be queried after multi-hop query based on the starting object, and the target query object belongs to the graph data to be queried. The relationship quantity condition means that the connection relationship between the queried object and the starting object reaches the required query hop count. The condition for no adjacent object means that there is no adjacent object that can be further accessed.

[0071] Specifically, in the case of needing to query objects for the graph data to be queried, the server first receives a graph object query request for the graph data to be queried. Since it is a graph object query request for the graph data to be queried, at least a graph data identifier for uniquely identifying the graph data to be queried, a starting object belonging to the graph data to be queried, and query conditions for the graph data to be queried are included in the graph object query request. Based on this, the server responds to the graph object query request and extracts the starting object and query conditions from the graph object query request.

[0072] Step 204: In the current marker array containing the global object mapping bits, mark the mapping bit of the starting object to obtain the target mapping bit of the current marker array in the current round.

[0073] Among them, the current marker array (Current array) contains global object mapping bits. The global object mapping bit is a mapping bit in the marker array that can map all objects. And the current marker array is used to mark the objects for which adjacent object queries with connection relationships are required in the current round. And each mapping bit in the global object mapping bits of the current marker array is mapped one-to-one with the point mapping value of the object. The point mapping value is specifically a long keyword. The long keyword represents a long integer data type, which is a basic data type in the programming language. The long keyword is default to be a signed long integer and contains 8 bytes. For example, mapping bit A1 corresponds to the point mapping value C1 of object B1, and mapping bit A2 corresponds to the point mapping value C2 of object B2.

[0074] Secondly, the current tag array is a Long-type array, and the current tag array is specifically composed of multiple current tag element intervals. Each current tag element interval contains multiple bit positions, and each bit position is a mapping bit used to map and correspond to the point mapping of the object. Moreover, the number of bit positions contained in each current tag element interval is the same, that is, the number of mapping bits of the mapping bits contained in each current tag element interval is the same. A mapping bit marked as 1 indicates that the point mapping value of the object corresponding to the mapping bit has been queried. Otherwise, that is, when the mapping bit is not marked as 0, it indicates that the point mapping value of the object corresponding to the mapping bit has not been queried. Since the current tag array is a Long-type array and a long type is 64 bits, each current tag element interval in the current tag array can map the point mapping values of 64 objects, that is, the current tag element interval contains 64 bit positions. To facilitate understanding of the current tag array, as Figure 3 shown, the current tag array 301 includes multiple current tag element intervals such as the current tag element interval 302, the current tag element interval 303, the current tag element interval 304, and the current tag element interval 305, and the number of mapping bits contained in the current tag element interval 302 and other multiple current tag element intervals is the same.

[0075] Secondly, the target mapping bit is used to describe the mapping bit corresponding to the point mapping value of the object for which object query needs to be performed in the current round, and the target mapping bit has not been marked in other rounds. For example, in the current round, it is necessary to perform object query on the adjacent objects having a connection relationship with object B1, object B2, and object B3, and object B1, object B2, and object B3 respectively correspond to the mapping bits A1, A2, and A3 in the current tag array. If the mapping bits A1, A2, and A3 are not marked, at this time, the mapping bits A1, A2, and A3 can be marked, and the marked mapping bits A1, A2, and A3 are determined as the target mapping bits.

[0076] Specifically, the server first obtains the current tag array containing the global object mapping bits. When determining the starting object in response to the graph object query request, the server determines the mapping bit of the starting object from the current tag array and marks the mapping bit of the starting object, so as to determine the marked mapping bit of the starting object as the target mapping bit in the current round. For example, if the starting object is object B1 in the foregoing example, then the mapping bit of the starting object (object B1) in the current tag array is mapping bit A1, then the mapping bit A1 is marked, and the marked mapping bit A1 is determined as the target mapping bit in the current round.

[0077] It is understandable that the marking described in this embodiment is to mark the bit value of the mapping bit as 1. If the bit value of the mapping bit is 0, it means that the mapping bit is not marked.

[0078] Step 206: For each round of target mapping bits, locate and mark the mapping bits of adjacent objects that have a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marking array, and synchronize the newly added marks in the current round of the global marking array to the current marking array; the number of global object mapping bits included in the global marking array is the same as that of the current marking array.

[0079] Among them, the global marking array (Global array) includes global object mapping bits, and the global marking array is used to record the objects marked in each round during the graph object query to prevent the marked objects from being queried repeatedly, and the unmarked mapping bits are the mapping bits that are not marked. Similar to the current marking array, each mapping bit in the global object mapping bits of the global marking array is mapped one-to-one with the point mapping value of the object. Secondly, the global marking array is a Long-type array, similar to the current marking array, and the global marking array is specifically composed of multiple global marking element intervals. Each global marking element interval contains multiple bit positions, and each bit position is a mapping bit, which is used to map and correspond to the point mapping of the object, and the number of bit positions included in each global marking element interval is the same, that is, the number of mapping bits included in each global marking element interval is the same. The mapping bit marked as 1 indicates that the point mapping value of the object corresponding to the mapping bit has been queried. Otherwise, that is, when the mapping bit is not marked as 0, it means that the point mapping value of the object corresponding to the mapping bit has not been queried. From this, it can be seen that the unmarked mapping bit is the mapping bit not marked as 1. Since the global marking array is a Long-type array and long type is 64 bits, each global marking element interval in the global marking array can map the point mapping values of 64 objects, that is, the global marking element interval contains 64 bit positions.

[0080] Based on this, the number of global object mapping bits included in the global marking array is the same as that of the current marking array, that is, the global marking array includes the same global object mapping bits as the current marking array. And the global object mapping bits included in the global marking array can be exactly the same as the global object mapping bits included in the current marking array. Or, the global object mapping bits included in the global marking array have a one-to-one correspondence with the global object mapping bits included in the current marking array.

[0081] It can be seen that in the embodiments of the present application, a marking structure with multiple paths is used for mapping bit marking to complete object query. The data structure of the multiple paths is composed of a Long-type array, and the data structure of the multiple paths includes at least a global marking array (Global array) and a current marking array (Current array). Among them, the Global array is used for global marking to prevent the point mapping value of the starting object from being traversed repeatedly. The Current array is used to parse the marking into a set of point mapping values of the point mapping value to be accessed currently for extension. Each bit in the Long-type array in the data structure of the multiple paths is mapped one-to-one with the point mapping value in the Runtime Dynamic ID Mapping (RDIM). When the bit is marked as 1, it means that the point mapping value has been traversed; otherwise, when the bit is marked as 0, it means that the point mapping value has not been traversed. The point mapping value is 64 bits, so each marking element interval in the array can map the point mapping values of 64 objects. Among them, the Runtime Dynamic ID Mapping (RDIM) is a memory model oriented to the graph structure. The RDIM model specifically includes a bucketed point table, a mapping table, and an adjacency table. Each sub-bucket in the bucketed point table is used to record the point mapping value assigned to each point object with the same hash value. The mapping table is used to record the mapping relationship between the point mapping value and the data storage location, and the adjacency table is used to describe the mapping relationship between the point mapping value and the adjacent point object array.

[0082] To facilitate the understanding of the relationship between the global marking array and the current marking array, as Figure 4 shown, the global marking array 401 includes a global marking element interval 4021, a global marking element interval 4022, a global marking element interval 4023, a global marking element interval 4024 to a global marking element interval 4028, and the current marking array 403 includes a current marking element interval 4041, a current marking element interval 4042, a current marking element interval 4043, a current marking element interval 4044 to a current marking element interval 4048.

[0083] Based on this, if the global object mapping bits contained in the global tag array are exactly the same as the current tag array, it means that the mapping bits in the global tag element range 4021 are the same as those in the current tag element range 4041, the mapping bits in the global tag element range 4022 are the same as those in the current tag element range 4042, and so on until the mapping bits in the global tag element range 4028 are the same as those in the current tag element range 4048. Secondly, if the global object mapping bits contained in the global tag array have a one-to-one correspondence with the current tag array, and there is a one-to-one correspondence between the global tag element range 4021 and the current tag element range 4045, then the mapping bits in the global tag element range 4021 are the same as those in the current tag element range 4045. Similarly, if there is a one-to-one correspondence between the global tag element range 4022 and the current tag element range 4046, then the mapping bits in the global tag element range 4022 are the same as those in the current tag element range 4046. And so on, which will not be elaborated here.

[0084] Among them, the connection relationship means that there is a direct connection relationship between objects, that is, in the graph data, the point objects are directly connected to each other. Therefore, the adjacent object of an object is the point object with a connection relationship. For the sake of understanding, as Figure 5 shown, there are objects 501, 502, 503, and 504 in the graph data. There is a connection relationship between object 501 and object 502. Therefore, object 502 can be used as the adjacent object of object 501, and object 501 can also be used as the adjacent object of object 502. Similarly, there is a connection relationship between object 502 and object 503. Therefore, object 503 can be used as the adjacent object of object 502, and object 502 can also be used as the adjacent object of object 503. And there is a connection relationship between object 503 and object 504. Therefore, object 504 can be used as the adjacent object of object 503, and object 503 can also be used as the adjacent object of object 504. And through Figure 5 it can be known that there is no directly connected edge between object 501 and object 503, that is, there is no connection relationship between object 501 and object 503. Therefore, object 501 and object 503 cannot be adjacent objects to each other.

[0085] Specifically, for each round of target mapping bits, the server locates and marks the mapping bits of adjacent objects that have a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marking array. That is, the server first determines the candidate adjacent objects that have a connection relationship with the target object represented by the target mapping bit for each round of target mapping bits, and then determines the mapping bits of the point mapping values of the candidate adjacent objects from the global marking array through the point mapping values of the candidate adjacent objects, and determines whether the mapping bits of the point mapping values of the candidate adjacent objects are marked. If they are marked, the already marked mapping bits will not be processed repeatedly. If they are not marked, then the mapping bits of the point mapping values of the unmarked candidate adjacent objects are located as the mapping bits of the adjacent objects that have a connection relationship with the target object represented by the target mapping bit, and this mapping bit is marked.

[0086] For example, the global marking array includes mapping bit D1, mapping bit D2, mapping bit D3, and mapping bit D4, and mapping bit D1 corresponds to the point mapping value C1 of object B1, mapping bit D2 corresponds to the point mapping value C2 of object B2, mapping bit D3 corresponds to the point mapping value C3 of object B3, and mapping bit D4 corresponds to the point mapping value C4 of object B4. If the target mapping bit is mapping bit A1 in the current marking array, then based on the foregoing example, the target object represented by the target mapping bit (mapping bit A1) is object B1. Based on this, if object B1 has a connection relationship with object B2, and the point mapping value C2 of object B2 corresponds to mapping bit D2 in the global marking array, and mapping bit D2 is an unmarked mapping bit, then mapping bit D2 is marked at this time.

[0087] Further, the server synchronizes the newly added marks in the global marking array in the current round to the current marking array. At this time, there is no mark on the mapping bit of the starting object in the synchronized current marking array, and only the newly added marks in the current round exist. That is, in the next round, the current marking array uses the mapping bit where the newly added marks in the current round are located as the target mapping bit for a new round of mapping bit marking. For the convenience of understanding, the foregoing example is further introduced, and the global object mapping bits included in the global marking array are exactly the same as the current marking array. After marking mapping bit D2, the newly added mark in the global marking array in the current round is the mark on mapping bit D2. At this time, the mark on mapping bit D2 is synchronized to the corresponding mapping bit A2 in the current marking array, that is, mapping bit A2 in the current marking array has been marked, and the mark on mapping bit A1 in the current marking array is cleared, that is, mapping bit A1 in the current marking array is not marked.

[0088] For the convenience of understanding the foregoing marking process, such as Figure 6As shown in the figure, first, in the current tag array 601 containing the global object mapping bits, determine the mapping bit of the starting object. The mapping bit of the starting object belongs to the current tag element range 6021. Then, locate and mark the mapping bits of the adjacent objects that have a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global tag array 603. The mapping bits of the adjacent objects belong to the global tag element range 6043 in the global tag array 603. Then, synchronize the tags newly added to the global tag array 603 in the current round (i.e., the tags belonging to the current tag element range 6043) to the current tag array 601. After synchronization, the target mapping bit corresponding to the mapping bit of the adjacent object is marked in the current tag array 601. At this time, the target mapping bit belongs to the current tag element range 6023. It can be seen from this that by multiplexed tagging, the global tag array (Global array) and the current tag array (Current array) are used to mark the bit positions corresponding to the point mapping values of the point objects during traversal, and the point mapping value sets of the global tag and the current tag are respectively recorded.

[0089] Step 208, in the case where the objects represented by the marked mapping bits do not satisfy the query conditions with the starting object, based on the tags synchronized to the current tag array, determine the target mapping bits of the current tag array in a new round for a new round of mapping bit marking until a graph object that satisfies the query conditions is obtained.

[0090] Specifically, the server determines the object represented by the point mapping value of the marked mapping bit by the point mapping value of the marked mapping bit, and then determines whether the objects represented by the marked mapping bits satisfy the query conditions in the graph object query request with the starting object. If satisfied, the graph object that satisfies the query conditions is obtained. It can be seen from the foregoing introduction that the query conditions can at least include: the target query object, the relationship quantity condition that satisfies the connection relationship, and the condition of no adjacent object. The following introduces the method for determining whether the query conditions are satisfied:

[0091] In the case where the query condition includes the target query object, if the object to be queried, the target query object, exists in the objects represented by the marked mapping bits, it is determined that the query condition is satisfied. For example, if the target query object is object B2, and the objects represented by the marked mapping bits include object B2 and object B3, that is, object B2 exists in object B2 and object B3, it is determined that the query condition is satisfied. At this time, the graph object that satisfies the query condition can be output as object B2.

[0092] In the case where the query condition includes the relationship quantity condition that satisfies the connection relationship, the server needs to first determine the relationship hop count between the objects represented by the marked mapping bits and the starting object. The relationship hop count is used to describe the number of edges existing between the object and the starting object. Please refer to again Figure 5, if the starting object is object 501 and the object represented by the mapped bit of the mark is object 503, and there are two edges between object 501 and object 503, it can be known that the relationship hop count between object 501 and object 503 is 2. Based on this, the server determines whether the relationship hop count reaches the relationship quantity. When the relationship hop count reaches the relationship quantity, it is determined that the query condition is satisfied. For example, if the relationship quantity set in the query condition is 3, then when the relationship hop count between the object represented by each mapped bit of the mark and the starting object reaches 3, it is determined that the query condition is satisfied.

[0093] When the query condition includes the non - adjacent object condition, that is, when the server does not query an adjacent object having a connection relationship with the object represented by each mapped bit of the mark, it is determined that the query condition is satisfied. It should be understood that not querying an adjacent object having a connection relationship with the object represented by each mapped bit of the mark specifically refers to non - duplicate objects. That is, if an adjacent object is queried but the mapped bit of the point mapping value of the adjacent object in the global mark array has been marked, then it is determined that no adjacent object has been queried.

[0094] Conversely, if not satisfied, that is, when the objects represented by the mapped bits of the mark and the starting object do not satisfy the query condition, based on the marks synchronized to the current mark array, in a manner similar to the foregoing embodiments, the target mapped bits of the current mark array in a new round are determined for marking the mapped bits in a new round until a graph object that satisfies the query condition is obtained. From the foregoing introduced situations where the query condition is satisfied, not satisfying the query condition specifically includes:

[0095] When the query condition includes the target query object, if the object represented by each mapped bit of the mark does not have the target query object to be queried, it is determined that the query condition is not satisfied.

[0096] When the query condition includes the relationship quantity condition for satisfying the connection relationship, the server needs to first determine the relationship hop count between the object represented by each mapped bit of the mark and the starting object. If the relationship hop count does not reach the relationship quantity, it is determined that the query condition is not satisfied.

[0097] When the query condition includes the non - adjacent object condition, that is, when the server can still query an adjacent object having a connection relationship with the object represented by each mapped bit of the mark, it is determined that the query condition is not satisfied.

[0098] It can be understood that all the examples shown in this embodiment are only used to understand this solution, but the foregoing examples should not be understood as specific limitations of this solution.

[0099] In the above method for object query, first, the mapping bit of the current round is marked through the current marker array, and the unmarked mapping bits of the global marker array are used to locate and mark the mapped bits of the target object in the current marker array that represent the adjacent objects having a connection relationship with the target object. The point mapping value of the mapping bit can effectively reduce the memory overhead while ensuring the object indexing ability. And by determining whether the objects represented by the marked mapping bits and the starting object meet the query conditions in the graph object query request, the graph objects that meet the query conditions can be obtained more efficiently to complete the object query. That is, during the object query process, the mapping bits where the point mapping values of the queried objects are located can be marked by using the current marker array and the global marker array. By allocating local continuity to the mapping bits on the marker array, the memory utilization rate during the marking process is increased, that is, the memory utilization rate during the object query process is improved, and both the memory overhead and the computational overhead are taken into account.

[0100] The following will introduce the method for determining the target mapping bit: In one embodiment, as Figure 7 shown, in the current marker array containing the global object mapping bits, the mapping bit of the starting object is marked to obtain the target mapping bit of the current marker array in the current round, including:

[0101] Step 702, based on the element interval composition of the current marker array, determine the number of mapping bits in the element interval of the current marker array.

[0102] Among them, the mapping bits included in each current marker element interval in the current marker array are the same. Based on this, the number of mapping bits is used to describe the total number of mapping bits included in each current marker element interval. Since the current marker array is in the form of an array, the number of mapping bits is the array length of the current marker element interval. Through the foregoing embodiments, each current marker element interval in the current marker array can map the point mapping values of 64 objects, that is, the current marker element interval contains 64 bit positions, that is, the number of mapping bits is 64. Specifically, when the server obtains the current marker array, it can preset the element interval composition of the current marker array and determine the preset number of mapping bits. Therefore, in practical applications, based on the element interval composition of the current marker array, the preset number of mapping bits in the element interval of the current marker array can be determined.

[0103] Step 704, based on the quotient result of dividing the point mapping value of the starting object by the number of mapping bits, determine the target element interval where the starting object is located in the current marker array.

[0104] Specifically, the server performs a division calculation on the point mapping value of the starting object and the number of mapping bits to obtain the quotient result of the division of the point mapping value of the starting object by the number of mapping bits, thereby determining the target element interval in which the starting object is located in the current marking array through the quotient result. By performing a division calculation on the point mapping value of the starting object and the number of mapping bits, it is possible to know the target element interval in which the starting object is located in the current marking array. Then, based on the quotient result of the division of the point mapping value of the starting object by the number of mapping bits, add 1 to the value described by the modulo result to indicate the target element interval. Alternatively, determine the previous current marking element interval based on the value described by the quotient result, and then determine the subsequent current marking element interval adjacent to the previous current marking element interval as the target element interval.

[0105] Exemplarily, taking the number of mapping bits as 64 and the point mapping value of the starting object as 100 as an example for illustration, and assuming that the current marking array includes the current marking element interval E1, the current marking element interval E2, and the current marking element interval E3. Then, through the division calculation of the point mapping value "100" of the starting object by the number of mapping bits "64", the quotient result of the division of the point mapping value "100" of the starting object by the number of mapping bits "64" is described as 1. And 1 indicates that the current marking element interval E1 contains 64 mapping bits. At this time, the point mapping value "100" of the starting object is greater than 64 but less than 128 (64 * 2). Therefore, the point mapping value "100" of the starting object belongs to the subsequent current marking element interval, that is, it is written into the current marking element interval E2. Then, at this time, the current marking element interval E2 is determined as the target element interval in which the starting object is located in the current marking array.

[0106] Step 706: Based on the modulo result of the point mapping value of the starting object and the number of mapping bits, determine and mark the mapping bit in which the starting object is located in the target element interval.

[0107] Specifically, the server performs a division calculation on the point mapping value of the starting object and the number of mapping bits to obtain the quotient result in the foregoing embodiments. After completing the division calculation, further perform a modulo calculation on the point mapping value of the starting object and the number of mapping bits to obtain the modulo result of the point mapping value of the starting object and the number of mapping bits. Then, determine and mark the mapping bit in which the starting object is located in the target element interval through the modulo result. Since after determining the target element interval, the obtained modulo result can determine the sequential position of the point mapping value of the starting object in the target element interval, and the sequential position in the target element interval is the mapping bit in which the point mapping value of the starting object is located in the target element interval. Then, mark the mapping bit in which the point mapping value of the starting object is located in the target element interval.

[0108] Exemplarily, based on the number of mapping bits in the foregoing example being 64 and the point mapping value of the starting object being 100 as an example for further illustration, after determining the current marked element interval E2 as the target element interval, since the modulo operation result obtained by the point mapping value "100" of the starting object and the number of mapping bits "64" is 36 (100 * 1 - 64), it can be known that the sequential position of the point mapping value of the starting object in the target element interval is 36, that is, the mapping bit at the sequential position of 36 in the target element interval is the mapping bit where the starting object is located in the target element interval, and then mark the mapping bit at the sequential position of 36 in the target element interval.

[0109] Step 708, use the mapping bits in the marked state as the target mapping bits of the current marking array in the current round.

[0110] Specifically, the server uses the mapping bits in the marked state as the target mapping bits of the current marking array in the current round. Through the foregoing steps, it can be known that the server will mark the mapping bit where the mapping value of the starting object is located in the target element interval, that is, the mapping bit where the mapping value of the starting object is located in the target element interval is in the marked state. Therefore, the mapping bit where the mapping value of the starting object is located in the target element interval is determined as the target mapping bit of the current marking array in the current round.

[0111] It can be understood that all the examples shown in this embodiment are only for understanding this solution, but the foregoing examples should not be understood as specific limitations to this solution.

[0112] In this embodiment, by dividing the point mapping value of the starting object by the number of mapping bits to determine the target element interval where the point mapping value of the starting object is located, and then further determining the specific mapping bit of the point mapping value of the starting object in the target element interval through the obtained modulo operation result, and then marking through the specific mapping bit in the target element interval. The method of positioning through division and modulo operation is used to complete the deserialization query of the mapping bits, so as to ensure that the accurate mapping bits can be marked, and further ensure the reliability and accuracy of the target mapping bits, so as to further ensure the reliability and accuracy of object query.

[0113] In one embodiment, as Figure 8 shown, from the unmarked mapping bits of the global marking array, locate and mark the mapping bits of the adjacent objects that have a connection relationship with the target object represented by the target mapping bit, including:

[0114] Step 802, query the point mapping values of the adjacent objects that have a connection relationship with the target object represented by the target mapping bit by looking up the adjacency list based on the point mapping value.

[0115] Among them, the adjacency list belongs to a graph - oriented memory model of runtime dynamic ID mapping (RDIM). The RDIM model specifically includes a bucketed point table, a mapping table, and an adjacency list. Each sub - bucket in the bucketed point table is used to record the point mapping values assigned to each point object with the same hash value. The mapping table is used to record the mapping relationship between the point mapping value and the data storage location, while the adjacency list is used to describe the mapping relationship between the point mapping value and the array of adjacent point objects. It can be seen from this that the adjacency list is used to describe the mapping relationship between the point mapping value and the array of adjacent point objects. The array of adjacent point objects is composed of adjacent point objects that have a direct relationship with the point object, and the adjacent point objects belonging to the same array of adjacent point objects have the same direct relationship with the point object. For example, there is a mapping relationship between the point mapping value "1" and the array of adjacent point objects F1, and there is also a mapping relationship between the point mapping value "1" and the array of adjacent point objects F2. The array of adjacent point objects F1 includes adjacent point objects that have a colleague relationship with the point object matching the point mapping value "1", and the array of adjacent point objects F2 includes adjacent point objects that have a classmate relationship with the point object matching the point mapping value "1".

[0116] Specifically, the server queries the adjacency list based on the point mapping value to query the point mapping values of the adjacent objects that have a connection relationship with the target object represented by the target mapping bit. That is, the server first queries the adjacent objects that have a connection relationship with the target object represented by the target mapping bit in the adjacency list based on the point mapping value, and then through the sub - bucket matched by the adjacent object in the bucketed point table. Each sub - bucket in the bucketed point table is used to record the point mapping values assigned to each point object with the same hash value. Therefore, it then queries the point mapping value assigned to the adjacent object from the sub - bucket matched by the adjacent object in the bucketed point table.

[0117] Step 804: Determine the unmarked point mapping values among the point mapping values of each adjacent object through the point mapping values of the unmarked mapping bits of the global marking array and the point mapping values of each adjacent object.

[0118] Among them, the unmarked mapping bit has the element interval information of the element interval where it is located in the global marking array, and the mapping bit order information in the element interval where it is located in the global marking array. For example, the global marking array includes global marking element intervals G1, G2, and G3. If the unmarked mapping bit of the global marking array is the 40th mapping bit in the global marking element interval G2 in order, the unmarked mapping bit includes: element interval information (global marking element interval G2), and mapping bit order information (the 40th bit).

[0119] Specifically, the server scans the global object mapping bits of the global tag array and determines the unmarked mapping bits and the marked mapping bits in the global object mapping bits of the global tag array. Thus, the point mapping value of the unmarked mapping bits is calculated through the unmarked mapping bits of the global tag array. The specific method for calculating the point mapping value of the unmarked mapping bits is as follows: it is determined by performing reverse division of the unmarked mapping bits by the number of element intervals, that is, reverse division is performed based on the element interval information and the number of element intervals of the unmarked mapping bits to obtain a reverse division result, and the point mapping value of the unmarked mapping bits is obtained based on the reverse division result and the mapping bit order information. For further illustration for better understanding, as in the foregoing embodiment, the unmarked mapping bits include: element interval information (global tag element interval G2), and mapping bit order information (the 40th bit). Reverse division is performed on the element interval information and the number of mapping bits, which is "64". The reverse division result is described as 1. Then, the product of the reverse division result and the number of mapping bits is obtained as 64, and the product is added to the mapping bit order information, so as to obtain 104 (64 + 40). At this time, it can be determined that the point mapping value of this unmarked mapping bit is 104.

[0120] Further, the point mapping value of the unmarked mapping bits of the global tag array is compared with the point mapping value of each adjacent object to screen out the point mapping values that coincide with the point mapping value of the unmarked mapping bits from the point mapping values of each adjacent object, thereby determining the unmarked point mapping values among the point mapping values of each adjacent object. For example, the point mapping values of the unmarked mapping bits of the global tag array include: point mapping value "104", point mapping value "105", point mapping value "106", and point mapping value "107". The point mapping values of the adjacent objects are "1" and "104". It can be seen that the point mapping value "104" is both the point mapping value of the adjacent object and the point mapping value of the unmarked mapping bits of the global tag array. Therefore, the point mapping value "104" is determined as the unmarked point mapping value.

[0121] Step 806: Mark the mapping bits of the unmarked point mapping values among the point mapping values of each adjacent object.

[0122] Specifically, the server marks the mapping bits of the unmarked point mapping values among the point mapping values of each adjacent object. That is, the server marks the mapping bits determined as the unmarked point mapping values in the foregoing steps. For example, as can be seen from the foregoing embodiment, the point mapping value "104" is determined as the unmarked point mapping value, and the mapping bit of the point mapping value "104" is the mapping bit at the 40th position in the global tag element interval G2 in sequence. That is, specifically, the mapping bit at the 40th position in the global tag element interval G2 in sequence is marked.

[0123] It is understandable that all the examples shown in this embodiment are only for understanding this solution, but the foregoing examples should not be construed as specific limitations on this solution.

[0124] In this embodiment, first, query to obtain the point mapping value of the adjacent object having a connection relationship with the target object represented by the target mapping bit. Since the obtained point mapping value must have a connection relationship with the target object, then compare it with the point mapping value of the unmarked mapping bit. That is, ensure that the mapping bit of the unmarked point mapping value determined not only has a connection relationship with the target object but also has not been marked. Thus, mark the mapping bits of the unmarked point mapping values in the point mapping values of each adjacent object. On the basis of ensuring the reliability of marking, avoid repeated marking of the same mapping bit, that is, avoid access marking of the same object, so as to further improve the memory utilization rate of object query.

[0125] In one embodiment, as Figure 9 shown, the query condition at least includes an edge object for describing the connection relationship between two point objects.

[0126] Among them, the graph data is specifically composed of point objects and edge objects. There is a corresponding edge object between point objects having a connection relationship. The edge object is specifically used to describe the connection relationship between the connected point objects. For example, if the relationship between point object H1 and point object H2 is a colleague relationship, and there is an edge object E1 between point object H1 and point object H2 in the graph data, it can be known that the edge object E1 is specifically used to describe the colleague relationship. Secondly, if the relationship between point object H1 and point object H3 is a spousal relationship, and there is an edge object E2 between point object H1 and point object H3 in the graph data, it can be known that the edge object E2 is specifically used to describe the spousal relationship. Through the foregoing embodiment, it can be known that the query condition at least includes an edge object for describing the connection relationship between two point objects, and the edge object can be a single edge object or a set composed of edge objects describing multiple different connection relationships. If it is a set composed of edge objects describing multiple different connection relationships, there is a query order between the edge objects at this time. For example, the query order is: colleague relationship to classmate relationship to spousal relationship. It is understandable that the connection relationship can be a colleague relationship, a spousal relationship, and a classmate relationship, specifically based on the corresponding connection relationship required by the actual situation, which is not limited here.

[0127] Based on this, locating and marking the mapping bits of the adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marking array includes:

[0128] Step 902, for the point mapping value of the target mapping bit and the edge descriptor of the edge object in each round, query the adjacent object having a connection relationship with the target mapping bit.

[0129] Among them, the edge descriptor is specifically an edge descriptor (ed). The edge descriptor can represent the graph data to which the edge object belongs, the edge type of the edge object, and the direction information of the edge object, etc.

[0130] Specifically, the server determines the edge descriptor assigned to the edge object, that is, the server can query the edge descriptor corresponding to the edge object. If it exists, directly obtain the edge descriptor of the edge object. If it does not exist, that is, it is necessary to assign an edge descriptor to the edge object, and thus use the edge descriptor assigned to the edge object as the edge descriptor of the edge object required this time. Based on this, the server queries the adjacent object having a connection relationship with the target mapping bit for each round of the point mapping value of the target mapping bit and the edge descriptor of the edge object. That is, the server queries the adjacent object having a connection relationship with the target mapping bit in this round through the query order between the edge descriptor of the edge object and the edge object for each round of the point mapping value of the target mapping bit. For example, the query order is: colleague relationship to classmate relationship, then it will first query the adjacent object having a colleague relationship with the target mapping bit in this round, and then in the next round, it will query the adjacent object having a classmate relationship with the target mapping bit in this round. The specific query method is based on the adjacency list and will not be elaborated here.

[0131] Step 904: Determine the mapping bit of the adjacent object based on the point mapping value of the adjacent object.

[0132] Specifically, the server determines the mapping bit of the adjacent object based on the point mapping value of the adjacent object. That is, the server determines the target global marker element interval where the adjacent object is located in the global marker array based on the quotient result of the point mapping value of the adjacent object and the number of element intervals of the global marker array, and then determines the mapping bit where the adjacent object is located in the target global marker element interval based on the modulo result of the point mapping value of the adjacent object and the number of element intervals of the global marker array. The specific implementation manner is similar to the manner of determining the mapping bit in the current marker array introduced in the foregoing embodiments and will not be elaborated here.

[0133] Step 906: Mark the mapping bit of the adjacent object when the mapping bit of the adjacent object is in an unmarked state.

[0134] Specifically, the server marks the mapping bit of the adjacent object when the mapping bit of the adjacent object is in an unmarked state. Or the mapping bit of the adjacent object is in a marked state. At this time, skip the mapping bit of this adjacent object and perform the marking determination of the mapping bit of the next adjacent object until all the mapping bits of the adjacent objects in the unmarked state are marked.

[0135] It is understandable that all the examples shown in this embodiment are only for understanding this solution, but the foregoing examples should not be construed as specific limitations on this solution.

[0136] In this embodiment, first, an adjacent object having a connection relationship with the target mapping bit is queried, and then the mapping bit where the adjacent object is located in the target global marking element interval is located. Thus, through the marking status determination of the mapping bit for marking processing, it can also be ensured that the mapping bit of the marked adjacent object has a connection relationship with the target object and has not been marked. Furthermore, on the basis of ensuring the reliability of marking, repeated marking of the same mapping bit is avoided, and further, the memory utilization rate of object query is improved.

[0137] In one embodiment, as Figure 10 shown, the method for object query further includes:

[0138] Step 1002, when locating and marking the mapping bit of an adjacent object having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marking array, synchronously locate and mark the mapping bit of the adjacent object in the adjacent marking array. The global object mapping bits included in the adjacent marking array are the same as those of the global marking array.

[0139] Among them, the adjacent marking array (Next array) includes global object mapping bits, and the current marking array is only used to record the objects for querying adjacent objects in the next round. Similar to the global marking array, each mapping bit in the adjacent object mapping bits of the adjacent marking array is mapped one-to-one with the point mapping value of the object. Secondly, the adjacent marking array is also a Long-type array, similar to the global marking array, and the adjacent marking array is specifically composed of multiple adjacent marking array marking element intervals. Each adjacent marking array marking element interval contains multiple bit positions, and each bit position is a mapping bit for mapping correspondence with the point mapping of the object. And the number of bit positions included in each adjacent marking array marking element interval is the same, that is, the number of mapping bits included in each adjacent marking array marking element interval is the same. The mapping bit marked as 1 indicates that the point mapping value of the object corresponding to the mapping bit has been queried. Otherwise, that is, when the mapping bit is not marked as 0, it indicates that the point mapping value of the object corresponding to the mapping bit has not been queried. Thus, it can be known that the unmarked mapping bit is the mapping bit not marked as 1. Since the adjacent marking array is a Long-type array and long type is 64 bits, each adjacent marking array marking element interval in the adjacent marking array can map 64 point mapping values of objects, that is, the adjacent marking array marking element interval contains 64 bit positions.

[0140] Based on this, the global object mapping bits included in the adjacent tag array are the same as those in the global tag array, that is, the adjacent tag array includes the same global object mapping bits as the global tag array. And the global object mapping bits included in the adjacent tag array can be exactly the same as those included in the global tag array. Or, there is a one-to-one correspondence between the global object mapping bits included in the adjacent tag array and those included in the global tag array. Similarly, the global object mapping bits included in the adjacent tag array are also the same as those in the current tag array, that is, the adjacent tag array includes the same global object mapping bits as the current tag array. And the global object mapping bits included in the adjacent tag array can be exactly the same as those included in the current tag array. Or, there is a one-to-one correspondence between the global object mapping bits included in the adjacent tag array and those included in the current tag array.

[0141] As can be seen from the foregoing embodiments, in the embodiments of the present application, a three-way tag marking structure is adopted to mark mapping bits to complete object query. Therefore, the data structure of the three-way tag specifically includes a global tag array (Global array), a current tag array (Current array), and an adjacent tag array (Next array). Among them, the Next array is used to mark the point mapping values of the adjacent objects of the point object whose mapping value is marked in the current tag array. To facilitate understanding of the relationship between the current tag array, the adjacent tag array, and the global tag array, as Figure 11 shown, the global tag array 1101 includes a global tag element interval 11021, a global tag element interval 11022, a global tag element interval 11023, and a global tag element interval 11024. The current tag array 1103 includes a current tag element interval 11041, a current tag element interval 11042, a current tag element interval 11043, and a current tag element interval 11044. The adjacent tag array 1105 includes an adjacent tag element interval 11061, an adjacent tag element interval 11062, an adjacent tag element interval 11063, and an adjacent tag element interval 11064.

[0142] Based on this, if the global object mapping bits included in the current tag array, the adjacent tag array, and the global tag array are exactly the same, it means that the mapping bits in the global tag element interval 11021, the current tag element interval 11041, and the adjacent tag element interval 11061 are the same. Similarly, the mapping bits in the global tag element interval 11022, the current tag element interval 11042, and the adjacent tag element interval 11062 are the same. And so on, which will not be elaborated here.

[0143] Secondly, if the global object mapping bits included in the current tag array, the adjacent tag array, and the global tag array have a one-to-one correspondence, and the global tag element interval 11021 has a one-to-one correspondence with the current tag element interval 11042, and the current tag element interval 11042 has a one-to-one correspondence with the adjacent tag element interval 11063, then the mapping bits in the global tag element interval 11021, the current tag element interval 11042, and the adjacent tag element interval 11063 are consistent. Similarly, when the global tag element interval 11022 has a one-to-one correspondence with the current tag element interval 11043, and the current tag element interval 11043 has a one-to-one correspondence with the adjacent tag element interval 11064, the mapping bits in the global tag element interval 11022, the current tag element interval 11043, and the adjacent tag element interval 11064 are consistent. By analogy, it will not be elaborated further.

[0144] Specifically, when locating and marking the mapping bit of an adjacent object that has a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global tag array, the mapping bit of the adjacent object will also be synchronously located and marked in the adjacent tag array, that is, synchronously locate and mark in the adjacent tag array the mapping bit corresponding to the marked mapping bit of the adjacent object in the global tag array. For example, the global tag array includes mapping bits D1, D2, D3, and D4, and the adjacent tag array includes mapping bits I1, I2, I3, and I4. If mapping bit D1 corresponds to mapping bit I1, mapping bit D2 corresponds to mapping bit I2, mapping bit D3 corresponds to mapping bit I3, and mapping bit D4 corresponds to mapping bit I4. If the mapping bit of the adjacent object that has a connection relationship with the target object represented by the target mapping bit is mapping bit D2 in the global tag array, then when marking mapping bit D2 in the global tag array, the corresponding mapping bit I2 in the adjacent tag array will also be synchronously marked.

[0145] Based on this, synchronizing the newly added marks of the global tag array in the current round to the current tag array includes:

[0146] Step 1004, clear the marks of each mapping bit in the current tag array.

[0147] Specifically, the server clears the marks of each mapping bit in the current tag array. That is, before synchronizing the newly added marks of the current round in the current tag array, it is necessary to first clear the marking situation of the target mapping bits marked in the current round of the previous tag array to ensure that each mapping bit in the current tag array is in an unmarked state.

[0148] Step 1006: Swap the tags at the same mapped bits in the adjacent tag array and the current tag array, so that the mapped bit tags of the current tag array are the same as the tags newly added in the global tag array in the current round.

[0149] Specifically, the server swaps the tags at the same mapped bits in the adjacent tag array and the current tag array, so that the mapped bit tags of the current tag array are the same as the tags newly added in the global tag array in the current round. That is, the mapped bits with tags in the current tag array are the same as the mapped bits of the tags newly added in the global tag array in the current round.

[0150] For the convenience of understanding the foregoing tagging process, as Figure 12 shown, first, in the current tag array 1201 containing the global object mapped bits, determine the mapped bit of the starting object. The mapped bit of the starting object belongs to the current tag element range 12021. Then, locate and tag the mapped bits of the adjacent objects that have a connection relationship with the target object represented by the target mapped bit from the unmapped bits of the global tag array 1203. The mapped bits of the adjacent objects belong to the global tag element range 12043 in the global tag array 1203, and synchronously locate and tag the mapped bits of the adjacent objects in the adjacent tag array 1205. At this time, the synchronously located and tagged mapped bits of the adjacent objects belong to the adjacent tag element range 12063 in the adjacent tag array 1205. Based on this, then clear the tags of each mapped bit in the current tag array 1201, and swap the tags at the same mapped bits in the adjacent tag array and the current tag array, that is, swap the tags of the mapped bits synchronously located in the adjacent tag array 1205 (that is, the tags belonging to the adjacent tag element range 12063) to the current tag array 1201 with the tags cleared. At this time, there are tags after the interaction in the current tag array 1201, and the mapped bits of the tags after the interaction belong to the current tag element range 12023. It can be seen that through three-way tagging, using the global tag array (Global array), the current tag array (Current array), and the adjacent tag array (Next array), the bit corresponding to the point mapping value of the point object is tagged during the traversal process, and the sets of point mapping values of the global tags, the current tags, and the tags of the next round of tags are respectively recorded.

[0151] It can be understood that all the examples shown in this embodiment are only for understanding the present solution, but the foregoing examples should not be construed as specific limitations of the present solution.

[0152] In this embodiment, when locating and marking the mapping bits of adjacent objects that have a connection relationship with the target object represented by the target mapping bit, the mapping bits of the adjacent objects are synchronously located and marked in the adjacent marking array, so as to ensure that the mapping bits of the objects for querying adjacent objects in the next round are more accurately recorded through the adjacent marking array, and by clearing the current marking array, the marking in the previous round is prevented from affecting the next round. Furthermore, by swapping the markings of the same mapping bits in the adjacent marking array and the current marking array, the records of the objects for querying adjacent objects in the next round are ensured, and the markings newly added to the global marking array in the current round are more accurately and feasibly synchronized to the current marking array, ensuring that the marked mapping bits in the current marking array are for non-repeating objects that need to query adjacent objects, further ensuring the feasibility and reliability of object query.

[0153] The following details how to determine the target mapping bits of the current marking array in each round except the first round: In one embodiment, as Figure 13 shown, the object query method further includes:

[0154] Step 1302, obtain the interval mapping table of the global marking array. The marking status of each element in the interval mapping table is used to represent whether there are marked mapping bits in the corresponding mapping interval in the global marking array.

[0155] Among them, the marking status of each element in the interval mapping table is used to represent whether there are marked mapping bits in the corresponding mapping interval in the global marking array. And the elements included in the interval mapping table correspond one by one to the mapping intervals in the global marking array, and the mapping interval is specifically the global marking element interval. That is, when there is at least one mapping bit marked in the global marking element interval of the global marking array, the element in the interval mapping table corresponding to this global marking element interval (mapping interval) is in the marked state. Conversely, when there are no mapping bits marked in the global marking element interval of the global marking array, the element in the interval mapping table corresponding to this global marking element interval (mapping interval) is in the unmarked state.

[0156] For easy understanding, as Figure 14 shown, the interval mapping table 1401 includes multiple elements such as element 14021, element 14022, and element 14023, and the global marking array 1403 includes multiple mapping intervals such as mapping interval 14041, mapping interval 14042, and mapping interval 14043, and element 14021 corresponds to mapping interval 14041, element 14022 corresponds to mapping interval 14042, and element 14024 corresponds to mapping interval 14043. Through Figure 14 it can be known that there are marked mapping bits in mapping interval 14041 ( Figure 14In black), so the marking status of the element 14021 corresponding to the mapping interval 14041 is the marked status. Similarly, it can be known that there is no marked mapping bit in the mapping interval 14042, so the marking status of the element 14022 corresponding to the mapping interval 14042 is the unmarked status. Similarly, there is a marked mapping bit in the mapping interval 14043 ( Figure 14 In black), so the marking status of the element 14023 corresponding to the mapping interval 14043 is the marked status.

[0157] Optionally, the interval mapping table includes at least a first interval mapping table and a second interval mapping table with nested mappings. Among them, the marking status of each element in the second interval mapping table is used to represent whether there is a marked element in the corresponding mapping interval in the first interval mapping table. That is, when there is a marked element in the corresponding mapping interval in the first interval mapping table, the marking status of the corresponding element in the second interval mapping table is the marked status. Conversely, when there is no marked element in the corresponding mapping interval in the first interval mapping table, the marking status of the corresponding element in the second interval mapping table is the unmarked status. Secondly, the marking status of each element in the first interval mapping table is used to represent whether there is a marked mapping bit in the corresponding mapping interval in the global marking array. That is, when there is at least one mapping bit marked in the global marking element interval of the global marking array, the element in the first interval mapping table corresponding to this global marking element interval (mapping interval) is in the marked status. Conversely, when there is no mapping bit marked in the global marking element interval of the global marking array, the element in the first interval mapping table corresponding to this global marking element interval (mapping interval) is in the unmarked status.

[0158] It can be seen from this that the interval mapping table is specifically a two-level card table. The two-level card table consists of two long arrays, namely the second interval mapping table (Card1) and the first interval mapping table (Card2). A bit (i.e., an element) in the second interval mapping table (Card1) maps the value corresponding to the mapping interval of the first interval mapping table (Card2). A bit (i.e., an element) in the mapping interval of the first interval mapping table (Card2) maps the value corresponding to the global marker element interval in the global marker array in the three-way marker structure. If the value corresponding to the global marker element interval in the global marker array is not 0, the corresponding element in the first interval mapping table (Card2) is set to 1 (marked state). If there is an element in the first interval mapping table (Card2) whose value is not 0, the corresponding element in the second interval mapping table (Card1) is set to 1. Since the current marker array is a subset of the global marker array, when traversing the current marker array, the two-level card table can be used as an index for filtering, which can avoid a large number of invalid traversals compared to a full scan of the current marker array, especially in the case of sparse markers. Finally, traverse the global marker array or the current marker array to determine the marked mapping bits, and then convert the point mapping values corresponding to the marked mapping bits into point objects through RDIM for subsequent processing.

[0159] Therefore, the interval mapping table (i.e., the two-level card table) is used to quickly index whether the bits included in a certain element interval are marked, preventing the computational overhead caused by invalid scans of the global marker array and the current marker array. Therefore, in the case of extremely sparse markers, the object query access efficiency can be greatly improved through the two-level card table.

[0160] To facilitate understanding the relationship between the first interval mapping table, the second interval mapping table, and the global marker array, Figure 15 As shown, the global marker array 1501 includes multiple mapping intervals such as the mapping interval 15021, the mapping interval 15022, the mapping interval 15023, and the mapping interval 15024. The first interval mapping table 1503 includes elements 15041, 15042, 15043, and 15044, and the element 15041 and the element 15042 belong to the same mapping interval, while the element 15043 and the element 15044 belong to the same mapping interval. The second interval mapping table 1505 includes elements 15061 and 15062. Through Figure 5It can be seen that the mapping interval 15021 corresponds to the element 15041, the mapping interval 15022 corresponds to the element 15042, the mapping interval 15023 corresponds to the element 15043, and the mapping interval 15024 corresponds to the element 15044. And the mapping interval including the elements 15041 and 15042 corresponds to the element 15061, and the mapping interval including the elements 15043 and 15044 corresponds to the element 15062.

[0161] From this, it can be known that there are marked mapping bits in the mapping interval 15021 ( Figure 14 black in ), so the marking status of the element 15041 in the first interval mapping table 1503 corresponding to the mapping interval 15021 is the marked status. Similarly, there are no marked mapping bits in the mapping interval 15022, so the marking status of the element 15042 in the first interval mapping table 1503 corresponding to the mapping interval 15022 is the unmarked status. There are no marked mapping bits in the mapping interval 15023, so the marking status of the element 15043 in the first interval mapping table 1503 corresponding to the mapping interval 15023 is the unmarked status. There are marked mapping bits in the mapping interval 15024 ( Figure 14 black in ), so the marking status of the element 15044 in the first interval mapping table 1503 corresponding to the mapping interval 15024 is the marked status.

[0162] Furthermore, since there is an element 15041 with a marked status in the mapping interval including the elements 15041 and 15042 in the first interval mapping table 1503, it can be determined that the marking status of the element 15061 in the second interval mapping table 1505 corresponding to the mapping interval including the elements 15041 and 15042 is the marked status. Similarly, since there is an element 15043 with a marked status in the mapping interval including the elements 15043 and 15044 in the first interval mapping table 1503, it can be determined that the marking status of the element 15062 in the second interval mapping table 1505 corresponding to the mapping interval including the elements 15043 and 15044 is the marked status.

[0163] Specifically, the server obtains the interval mapping table of the global marking array. The server can obtain the interval mapping table of the global marking array from local storage, or can obtain it by constructing the interval mapping table of the global marking array in real time. This application does not specifically limit the method of obtaining the interval mapping table.

[0164] Step 1304, based on the marking status of each element in the interval mapping table, locate the mapping interval in the global marking array where there are marked mapping bits.

[0165] Specifically, the server locates the mapping intervals in the global tag array where there are tagged mapped bits based on the tag status of each element in the interval mapping table. As can be seen from the foregoing embodiments, through the tag status of each element in the interval mapping table, the mapping interval corresponding to the element with the tag status of the tagged status is determined, and thus the mapping interval corresponding to the element with the tag status of the tagged status is determined as the mapping interval in the global tag array where there are tagged mapped bits.

[0166] Exemplarily, for ease of understanding, as Figure 14 shown, in the interval mapping table 1401, the tag statuses of element 14021 and element 14023 are the tagged status. Therefore, it is determined that the mapping interval 14041 corresponding to element 14021 is the mapping interval where there are tagged mapped bits, and the mapping interval 14043 corresponding to element 14023 is the mapping interval where there are tagged mapped bits. Or, as Figure 15 shown, in the second interval mapping table 1505, the tag statuses of element 15061 and element 15062 are the tagged status. Therefore, it can be determined that in the first interval mapping table 1503, there are elements with the tagged status in the mapping intervals corresponding to element 15061 and element 15062. Then, scanning is performed in the mapping intervals corresponding to element 15061 and element 15062 in the first interval mapping table 1503, that is, it is obtained that in the second interval mapping table 1503, the tag statuses of element 15041 and element 15044 are the tagged status. In a similar manner, it can be determined that in the global tag array 1501, the mapping intervals where there are tagged mapped bits are the mapping interval 15021 and the mapping interval 15024.

[0167] Step 1306: Scan from the mapping intervals in the global tag array where there are tagged mapped bits to obtain the target mapped bits of the current tag array in each round.

[0168] Specifically, the server scans from the mapping intervals in the global tag array where there are tagged mapped bits to obtain the target mapped bits of the current tag array in each round. That is, the server traverses and scans the mapping intervals in the global tag array where there are tagged mapped bits, and determines the target mapped bits in each round from the mapping intervals where there are tagged mapped bits. For ease of understanding, please refer to Figure 14 again, based on Figure 14 it can be determined that the mapping interval 14041 corresponding to element 14021 is the mapping interval where there are tagged mapped bits, and the mapping interval 14043 corresponding to element 14023 is the mapping interval where there are tagged mapped bits. Therefore, by traversing and scanning the mapping interval 14041 and the mapping interval 14043, the Figure 14The mapped bits in black are the marked mapped bits, and thus the marked mapped bits are determined as the target mapped bits in the current round.

[0169] It can be understood that all the examples shown in this embodiment are only for understanding this solution, but the foregoing examples should not be construed as specific limitations of this solution.

[0170] In this embodiment, in the process of determining the target mapped bits, the interval mapping table of the global marking array is used as an index to filter all the mapping intervals in the global marking array, so as to screen out the mapping intervals in the global marking array where there are marked mapped bits, that is, to narrow the range of the scanned traversal interval, thereby improving the efficiency of scanning to obtain the target mapped bits of the current marking array in each round, and further improving the efficiency of object query.

[0171] The following introduces the method for constructing the interval mapping table: In one embodiment, as Figure 16 shown

[0172] Step 1602, for each newly marked mapped bit in the global marking array, determine the first target element in the first interval mapping table that has a mapping relationship with the mapping interval where the newly marked mapped bit is located.

[0173] Specifically, for each newly marked mapped bit in the global marking array, the server determines the first target element in the first interval mapping table that has a mapping relationship with the mapping interval where the newly marked mapped bit is located through the point mapping value of the newly marked mapped bit. That is, the server first obtains the number of mapping interval elements in each mapping interval of the first interval mapping table, and then performs division and modulo operations based on the point mapping value of the newly marked mapped bit to determine the first target element in the first interval mapping table that has a mapping relationship with the mapping interval where the newly marked mapped bit is located.

[0174] Step 1604, mark the first target element.

[0175] Specifically, the server marks the first target element, that is, the server modifies the marking state of the first target element to the marked state by marking the first target element.

[0176] Step 1606, determine the second target element in the second interval mapping table that has a mapping relationship with the mapping interval where the first target element is located.

[0177] Specifically, the server determines a second target element in the second interval mapping table that has a mapping relationship with the mapping interval where the first target element is located. That is, the server first obtains the number of mapped interval elements in each mapping interval of the second interval mapping table, and then performs division and modulo operations based on the point mapping value of the first target element to determine the second target element in the second interval mapping table that has a mapping relationship with the mapping interval where the first target element is located.

[0178] Step 1608, mark the second target element.

[0179] Specifically, the server marks the second target element, that is, the server modifies the marking status of the second target element to the marked status by marking the second target element.

[0180] In this embodiment, based on each newly added marked mapping bit in the global marking array, the target elements in the first interval mapping table and the second interval mapping table are respectively located to ensure that each newly added marked mapping bit can be accurately mapped to the first interval mapping table and the second interval mapping table, ensuring the reliability of constructing the first interval mapping table and the second interval mapping table, and further ensuring the reliability and accuracy of determining the marked mapping bits subsequently, thereby improving the reliability and accuracy of object query.

[0181] Next, how to determine the first target element and the second target element will be introduced in detail: In one embodiment, as Figure 17 shown, for each newly added marked mapping bit in the global marking array, determining the first target element in the first interval mapping table that has a mapping relationship with the mapping interval where the newly added marked mapping bit is located includes:

[0182] Step 1702, based on the mapping interval composition of the first interval mapping table, determine the first mapping interval number of the first interval mapping table.

[0183] Among them, the first mapping interval number is used to describe the number of elements included in each mapping interval in the first interval mapping table. Exemplarily, please refer to Figure 15 again. The first mapping interval number of the first interval mapping table is 3, that is, the number of elements included in each mapping interval in the first interval mapping table is 3. Specifically, the server determines the first mapping interval number of the first interval mapping table based on the mapping interval composition of the first interval mapping table. That is, the server can preset the mapping interval composition of the first interval mapping table and determine the preset first mapping interval number. Therefore, in practical applications, based on the mapping interval composition of the first interval mapping table, the preset number of elements included in each mapping interval in the first interval mapping table can be determined, and thus the first mapping interval number can be obtained.

[0184] Step 1704: Determine a first mapping interval in the first interval mapping table that has a mapping relationship with the mapping interval where the mapping bit of each newly added tag in the global tag array is located, based on the quotient result of the point mapping value of the mapping bit of each newly added tag in the global tag array divided by the number of first mapping intervals.

[0185] Specifically, the server performs a division calculation on the point mapping value of the mapping bit of each newly added tag in the global tag array by the number of first mapping intervals to obtain the quotient result of the point mapping value of the mapping bit of each newly added tag in the global tag array divided by the number of first mapping intervals. Thus, based on the foregoing quotient result, determine a first mapping interval in the first interval mapping table that has a mapping relationship with the mapping interval where the mapping bit of the newly added tag is located. By performing a division calculation on the point mapping value of the mapping bit of each newly added tag by the number of first mapping intervals, it is possible to know the first mapping interval in the first interval mapping table where the point mapping value of the mapping bit of the newly added tag is located. Then, based on the quotient result of the point mapping value of the mapping bit of each newly added tag divided by the number of first mapping intervals, add 1 to the value described by the modulo result to indicate the first mapping interval. Alternatively, determine the previous mapping interval in the first interval mapping table based on the value described by the quotient result, and then determine the subsequent mapping interval adjacent to the previous mapping interval in the first interval mapping table as the first mapping interval.

[0186] Step 1706: Determine a first target element in the first mapping interval based on the modulo result of the point mapping value of the mapping bit of each newly added tag in the global tag array divided by the number of first mapping intervals.

[0187] Specifically, the server performs a division calculation on the point mapping value of the mapping bit of each newly added tag by the number of first mapping intervals to obtain the quotient result in the foregoing embodiment. After completing the division calculation, further perform a modulo calculation on the point mapping value of the mapping bit of each newly added tag by the number of first mapping intervals to obtain the modulo result of the point mapping value of the mapping bit of each newly added tag divided by the number of first mapping intervals. Then, determine the first target element in the first mapping interval based on the modulo result. Since after determining the first mapping interval, the order position of the point mapping value of the mapping bit of the newly added tag in the first mapping interval can be determined through the obtained modulo result, and the order position in the first mapping interval is the first target element where the mapping interval where the mapping bit of the newly added tag is located is in the first mapping interval.

[0188] It can be understood that the manner of obtaining the quotient result and the modulo result in this embodiment is similar to that in the foregoing embodiment, and will not be elaborated here.

[0189] In this embodiment, by dividing the dot mapping value of each newly added tag in the global tag array by the number of first mapping intervals, the first mapping interval with a mapping relationship is determined. Then, through the obtained modulo result, the first target element in the first mapping interval is determined. The deserialization query of the element is completed by the method of division and modulo to ensure that the first target element can be accurately determined, so as to further ensure the accuracy of object query.

[0190] In one embodiment, as Figure 18 shown, determining the second target element in the second interval mapping table that has a mapping relationship with the mapping interval where the first target element is located includes:

[0191] Step 1802, based on the composition of the mapping intervals of the second interval mapping table, determine the number of second mapping intervals of the second interval mapping table.

[0192] Among them, the number of second mapping intervals is used to describe the number of elements included in each mapping interval in the second interval mapping table. Exemplarily, please refer to Figure 15 again. The number of second mapping intervals of the second interval mapping table is 2, that is, the number of elements included in each mapping interval in the second interval mapping table is 2. Specifically, the server determines the number of second mapping intervals of the second interval mapping table based on the composition of the mapping intervals of the second interval mapping table. That is, the server can preset the composition of the mapping intervals of the second interval mapping table and determine the preset number of second mapping intervals. Therefore, in practical applications, based on the composition of the mapping intervals of the second interval mapping table, the preset number of elements included in each mapping interval in the second interval mapping table can be determined, and thus the number of second mapping intervals can be obtained.

[0193] Step 1804, based on the quotient result of dividing the dot mapping value of the first target element by the number of second mapping intervals, determine the second mapping interval in the second interval mapping table that has a mapping relationship with the first mapping interval.

[0194] Specifically, the server performs a division calculation on the point mapping value of the first target element and the number of second mapping intervals to obtain the division result of the point mapping value of the first target element and the number of second mapping intervals, so as to determine, through the foregoing division result, the second mapping interval in the second interval mapping table that has a mapping relationship with the first mapping interval. By performing a division calculation on the point mapping value of the first target element and the number of second mapping intervals, it can be known which second mapping interval the point mapping value of the first target element is in the second interval mapping table. Then, based on the division result of the point mapping value of the first target element and the number of second mapping intervals, add 1 to the value described by the modulo result to indicate the second mapping interval. Alternatively, determine the previous mapping interval in the second interval mapping table based on the value described by the division result, and then determine the subsequent mapping interval adjacent to the previous mapping interval in the second interval mapping table as the second mapping interval.

[0195] Step 1806: Determine the second target element in the second mapping interval based on the modulo result of the point mapping value of the second target element and the number of second mapping intervals.

[0196] Specifically, the server performs a division calculation on the point mapping value of the first target element and the number of second mapping intervals to obtain the division result in the foregoing embodiment. After completing the division calculation, further perform a modulo calculation on the point mapping value of the first target element and the number of second mapping intervals to obtain the modulo result of the point mapping value of the first target element and the number of second mapping intervals. Then, determine the second target element in the second mapping interval through the modulo result. Since after determining the second mapping interval, the obtained modulo result can be used to determine the sequential position of the point mapping value of the first target element in the second mapping interval, and the sequential position in the second mapping interval is the second target element corresponding to the first mapping interval where the point mapping value of the first target element is located in the second mapping interval.

[0197] It can be understood that the methods for obtaining the division result and the modulo result in this embodiment are similar to those in the foregoing embodiment, and will not be elaborated here.

[0198] In this embodiment, by dividing the point mapping value of the first target element by the number of second mapping intervals to determine the second mapping interval with a mapping relationship, and then determining the second target element in the second mapping interval through the obtained modulo result, the deserialization query of the element is completed by the method of positioning through division and modulo, so as to ensure that the second target element can be accurately determined, and further ensure the accuracy of object query.

[0199] In one embodiment, as Figure 19 shown, the query condition includes at least a target query object.

[0200] Among them, the target query object is the object that needs to be queried after multi-hop query based on the starting object, and the target query object belongs to the graph data to be queried.

[0201] During the object query process, there may also be a query requirement for the relationship path between the starting object and the target query object. When generating the relationship path, it is often necessary to save the results of the intermediate object of the relationship path. The results of such intermediate objects often carry a large amount of duplicate point objects and edge object structures, which will cause huge memory expansion. Therefore, this application provides a way of marked traceability to generate relationship paths in object queries.

[0202] Based on this, the method for object query further includes:

[0203] Step 1902, in the reverse current marking array, mark the mapping bit of the target query object to obtain the reverse target mapping bit of the reverse current marking array in the current reverse round.

[0204] Among them, the reverse current marking array is used to mark the objects to be queried for adjacent objects that need to have a connection relationship in the current reverse round. The reverse current marking array is similar to the current marking array, and the relevant content such as mapping bits will not be elaborated here.

[0205] Specifically, since the query condition includes at least the target query object, then when the query condition is met, that is, the target query object to be queried exists among the objects represented by the marked mapping bits, the server can mark the mapping bit of the target query object in the reverse current marking array to obtain the reverse target mapping bit of the reverse current marking array in the current reverse round. That is, the server first obtains the reverse current marking array containing the global object mapping bits. Since the target query object to be queried exists among the objects represented by the marked mapping bits, the server can determine the mapping bit of the target query object from the reverse current marking array and mark the mapping bit of the target query object in the reverse current marking array, so as to determine the marked mapping bit of the target query object as the reverse target mapping bit in the current reverse round. The specific marking method is similar to the method for obtaining the target mapping bit introduced in the foregoing embodiments, and will not be elaborated here.

[0206] Step 1904, for the reverse target mapping bit of each reverse round, locate and mark the mapping bit of the reverse adjacent object that has a connection relationship with the reverse target object represented by the reverse target mapping bit from the unmarked mapping bits of the reverse global marking array, and update the reverse current marking array based on the newly added marks in the reverse global marking array in the current reverse round.

[0207] Among them, the reverse global marking array is used to record the objects marked in each reverse round to prevent the objects marked in the reverse round from being repeatedly queried, and the unmarked mapping bits are the mapping bits that have not been marked. The reverse global marking array is similar to the global marking array, and the relevant content such as mapping bits will not be elaborated here.

[0208] Specifically, for each reverse target mapping bit in the reverse round, the server locates and marks the mapping bits of the reverse adjacent objects that have a connection relationship with the reverse target object represented by the reverse target mapping bit from the unmarked mapping bits of the reverse global marking array. That is, the server first determines the candidate reverse adjacent objects that have a connection relationship with the reverse target object represented by the reverse target mapping bit for each reverse target mapping bit in the reverse round, and then determines the mapping bits of the point mapping values of the candidate reverse adjacent objects from the reverse global marking array through the point mapping values of the candidate reverse adjacent objects, and judges whether the mapping bits of the point mapping values of the candidate reverse adjacent objects are marked. If they are marked, the marked mapping bits will not be processed repeatedly. If they are not marked, then the mapping bits of the point mapping values of the unmarked candidate reverse adjacent objects are located as the mapping bits of the reverse adjacent objects that have a connection relationship with the reverse target object represented by the reverse target mapping bit, and the mapping bits are marked.

[0209] Furthermore, the server updates the reverse current marking array based on the newly added marks in the current reverse round of the reverse global marking array. The server takes the intersection of the newly added marks in the current reverse round of the reverse global marking array and the newly added marks in the current round corresponding to the current reverse round, and updates the reverse current marking array through the intersection. That is, what exists in the updated reverse current marking array is: the newly added marks in the current reverse round and the same marks in the newly added marks in the current round corresponding to the current reverse round.

[0210] Step 1906, in the case that the objects represented by the marked mapping bits do not hit the starting object, based on the marks of the updated reverse current marking array, determine the reverse target mapping bits of the reverse current marking array in a new reverse round to perform a new round of mapping bit marking until the objects represented by the marked mapping bits hit the starting object, and generate the relationship path between the starting object and the target query object.

[0211] Specifically, when the objects represented by the mapping bits of the tags in the server do not hit the starting object, the server determines the reverse target mapping bits of the reverse current tag array in a new reverse round based on the tags of the updated reverse current tag array to perform a new round of mapping bit tagging. The specific method is similar to the method of determining the target mapping bits of the current tag array in a new round based on the tags synchronized to the current tag array in the foregoing embodiments, and will not be elaborated here. Based on this, until the objects represented by the mapping bits of the tags hit the starting object, the relationship path between the starting object and the target query object can be generated. That is, record the reverse current tag array after each update, and then generate the relationship path through the starting object, the reverse current tag array recorded each time, and the target query object.

[0212] In this embodiment, since querying the relationship path often requires saving the intermediate objects between the target query object path and the starting object, and such intermediate objects often carry a large number of duplicate point objects and edge objects, it will cause huge memory inflation. Therefore, through forward and reverse round traversal, and then by allocating local continuity on the tag array according to the mapping bits of the point mapping values of each point object, the memory utilization rate is increased to improve the object query efficiency, and thus the generation efficiency of the relationship path is improved.

[0213] In one embodiment, as Figure 20 shown, the method for object query further includes:

[0214] Step 2002, save the current tag array of each round, and there is a tag order between the current tag arrays of each round.

[0215] Among them, the tag order is used to describe the current round order marked by the current tag array. Specifically, during the implementation of the foregoing embodiments, the server will save the current tag array of each round, and there is a tag order between the current tag arrays of each round. For example, the current tag array obtained based on the starting object is the current tag array J1, the current tag array J2 in the next round is obtained through the tags in the current tag array J1 in the foregoing manner, and the current tag array J3 in the next round is obtained through the tags in the current tag array J2 in the foregoing manner. And when there is a target query object to be queried among the adjacent objects located and marked based on the current tag array J3 and having a connection relationship with the target object represented by the target mapping bit, at this time, it will still record the current tag array J4 in the next round obtained through the tags in the current tag array J3 in the foregoing manner, and then obtain the current tag arrays J1, J2, J3, and J4 of the foregoing multiple rounds. And the tag order is specifically from the current tag array J1 to the current tag array J2 to the current tag array J3 to the current tag array J4.

[0216] Based on this, update the reverse current marker array based on the markers newly added in the current reverse round in the global marker array, including:

[0217] Step 2004: Determine the current marker array that matches the current reverse round from the current marker array of each round.

[0218] Among them, each round has a matching relationship with the current reverse round. For the sake of understanding, as Figure 21 shown, in the marker round, first obtain the current marker array 2101, and then sequentially obtain the current marker array 2102, the current marker array 2103, and the current marker array 2104. Then in the reverse traceability round, in the current reverse round, sequentially obtain the reverse current marker array 2105, the reverse current marker array 2106, the reverse current marker array 2107, and the reverse current marker array 2108. Through Figure 21 it can be obtained that the round where the current marker array 2101 is located matches the reverse round where the reverse current marker array 2108 is located, the round where the current marker array 2102 is located matches the reverse round where the reverse current marker array 2107 is located, the round where the current marker array 2103 is located matches the reverse round where the reverse current marker array 2106 is located, and the round where the current marker array 2104 is located matches the reverse round where the reverse current marker array 2105 is located.

[0219] Specifically, the server determines the current marker array that matches the current reverse round from the current marker array of each round. That is, the server first obtains the marker round that matches the current reverse traceability round through querying based on the reverse traceability round. For the sake of understanding, please refer to Figure 21 again. Through the reverse round where the reverse current marker array 2105 including the point mapping value of the target query object is located in the marked mapping bit, the round where the current marker array 2104 including the point mapping value of the target query object is located in the marked mapping bit can be matched, and thus it can also be determined that the reverse current marker array 2105 matches the current marker array 2104.

[0220] Furthermore, since the reverse round where the reverse current marker array 2106 is located is the next reverse round of the reverse current marker array 2105, the reverse round where the reverse current marker array 2106 is located can match the previous round of the current marker array 2104, that is, the round where the current marker array 2103 is located. That is, the reverse current marker array 2106 corresponds to the current marker array 2103.

[0221] Step 2006: Update the reverse current marker array based on the markers newly added in the current reverse round and the markers of the current marker array that matches the current reverse round.

[0222] Specifically, the server updates the reverse current marker array based on the markers newly added by the global marker array in the current reverse round and the markers of the current marker array that match the current reverse round. That is, the server uses the markers newly added by the global marker array in the current reverse round and the markers of the current marker array that match the current reverse round to perform an intersection operation to obtain an intersection result. The intersection result is the same markers between the markers newly added by the global marker array in the current reverse round and the markers of the current marker array that match the current reverse round. Therefore, the intersection result is updated to the reverse current marker array for traversing the next reverse round. That is, the same markers between the markers newly added by the global marker array in the current reverse round and the markers of the current marker array that match the current reverse round are updated to the reverse current marker array.

[0223] For ease of understanding, assume that current marker arrays J1, J2, and J3 for multiple rounds are obtained, and the marked mapping bits in current marker array J1 are mapping bit A1, the marked mapping bits in current marker array J2 are mapping bits A2, A3, and A4, and the marked mapping bits in current marker array J3 are mapping bits A5 and A6, and the object corresponding to the mapping value of mapping bit A5 is the target query object.

[0224] Based on this, for reverse tracing based on the target query object, the marked mapping bit in the reverse current marker array K1 must be mapping bit A5, which is the mapping bit of the mapping value of the target query object. Based on this, if the markers of the current marker array that match the current reverse round obtained based on the mapping value of the target query object are the markers for mapping bits A2, A3, and A7, and an intersection operation is performed between mapping bits A2, A3, and A7 and the marked mapping bits A2, A3, and A4 in current marker array J2, the resulting intersection result is mapping bits A2 and A3. Because the markers for mapping bits A2 and A3 are updated to the reverse current marker array to obtain reverse current marker array K2. Further, in the foregoing manner through mapping bits A2 and A3, if the markers of the current marker array that match the current reverse round are the markers for mapping bit A1, the intersection operation is performed again at this time to obtain the reverse current marker array K3 with the marked mapping bit A1.

[0225] Furthermore, as can be seen from the foregoing embodiments, the mapped bits marked in the reverse current marker array K1 are the mapped bit A5, the mapped bits marked in the reverse current marker array K1 are the mapped bits A2 and A3, and the mapped bit marked in the reverse current marker array K3 is the mapped bit A1. Since the mapped bit of the point mapping value of the starting object is the mapped bit A1 and the mapped bit of the point mapping value of the target query object is the mapped bit A5, it can be seen from the reverse current marker array K1 to the reverse current marker array K3 that the relationship path generated between the starting object and the target query object at least includes: the point object corresponding to the mapped value from the starting object to the mapped bit A2, the point object corresponding to the mapped value of the mapped bit A2 to the target query object, and the point object corresponding to the mapped value from the starting object to the mapped bit A3, the point object corresponding to the mapped value of the mapped bit A3 to the target query object.

[0226] It can be seen that marker tracing is a way to obtain the path. Starting from the target query object for reverse traversal, since the reverse traversal process is the same as the forward traversal, only the traversal direction is reversed. A three-way marker data structure is still used to record the traversal state, and edge information needs to be recorded during the traversal process to return and output the complete path structure. Each round of marker in the reverse traversal will generate a new reverse current marker array, and then the new reverse current marker array is intersected with the previously saved current marker array. For example, there are a total of 5 rounds of traversal. The reverse current marker array generated by the first round of reverse traversal is intersected with the current marker array generated by the fifth traversal, and the intersection result is updated into the reverse current marker array for the next round of traversal. That is, the process of reverse traversal is actually a pruning process. Therefore, the data volume of the point objects and edge objects involved in the reverse traversal is much less than that of the forward traversal. Marker tracing reduces the memory overhead of saving the results of intermediate point objects, thereby using extremely small memory to record the path, and obtaining the relationship path between the starting object and the target query object through the way of backtracking, taking into account both the memory overhead and the computing overhead.

[0227] It can be understood that all the examples shown in this embodiment are only for understanding the solution, but the foregoing examples should not be construed as specific limitations on the solution.

[0228] In this embodiment, through the traversal of forward and reverse rounds, and by intersecting arrays to eliminate non-intersecting redundant objects, the object pruning process of point objects is completed to reduce the object data to be processed. Then, combined with the mapped bits of the point mapping values of each point object, local continuity is allocated on the marker array to further improve the generation efficiency of the relationship path.

[0229] Based on the detailed introduction of the foregoing embodiments, the complete process of the object query method in the embodiments of the present application will be introduced below. In one embodiment, as Figure 22As shown, a method for object query is provided. Taking the server 104 in Figure 1 as an example for illustration, it can be understood that this method can also be applied to the terminal 102, and can also be applied to a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. It can be understood that since the database management system can be used to manage the database, the server 104 can be deployed with a database management system to complete the query requirements for the graph objects in the database. In this embodiment, the method includes the following steps:

[0230] Step 2201, in response to the graph object query request, determine the starting object corresponding to the graph object query request and the query condition.

[0231] Among them, the graph object query request carries the starting object and the query condition. The starting object is specifically a point object in the graph data, and the starting object can be a single point object or a set of multiple point objects. And the graph object query request can also carry a graph data identifier, which is used to uniquely identify the graph data to be queried, that is, the query parameter is specifically a parameter used to indicate the query of the objects in the graph data to be queried, and the starting object belongs to the graph data to be queried. Based on this, the query condition can at least include: the target query object, the relationship quantity condition that satisfies the connection relationship, and the condition of no adjacent object. The aforementioned target query object is the object to be queried after multi-hop query based on the starting object, and the target query object belongs to the graph data to be queried. The relationship quantity condition means that the connection relationship between the queried object and the starting object reaches the required query hop count. The condition of no adjacent object means that there is no adjacent object that can be further accessed.

[0232] Specifically, in the case where it is necessary to perform object query on the graph data to be queried, the server first receives the graph object query request for the graph data to be queried. Since it is a graph object query request for the graph data to be queried, at least the graph data identifier for uniquely identifying the graph data to be queried, the starting object belonging to the graph data to be queried, and the query condition for the graph data to be queried are included in the graph object query request. Based on this, the server responds to the graph object query request and extracts the starting object and the query condition from the graph object query request.

[0233] Step 2202, based on the element interval composition of the current marker array, determine the number of mapped bits in the element interval of the current marker array.

[0234] Among them, the mapping bits included in each current marker element interval in the current marker array are the same. Based on this, the number of mapping bits is used to describe the total number of mapping bits included in each current marker element interval. Since the current marker array is in the form of an array, the number of mapping bits is the array length of the current marker element interval. Specifically, when the server obtains the current marker array, it can preset the composition of the element intervals of the current marker array and determine the preset number of mapping bits. Therefore, in practical applications, based on the composition of the element intervals of the current marker array, the preset number of mapping bits in the element intervals of the current marker array can be determined.

[0235] Step 2203: Based on the quotient result of the point mapping value of the starting object and the number of mapping bits, determine the target element interval where the starting object is located in the current marker array.

[0236] Specifically, the server performs a quotient calculation on the point mapping value of the starting object and the number of mapping bits to obtain the quotient result of the point mapping value of the starting object and the number of mapping bits, so as to determine the target element interval where the starting object is located in the current marker array through the quotient result. By performing a quotient calculation on the point mapping value of the starting object and the number of mapping bits, it can be known which target element interval the starting object is located in the current marker array. Then, based on the quotient result of the point mapping value of the starting object and the number of mapping bits, add 1 to the value described by the modulo result to indicate the target element interval. Alternatively, determine the previous current marker element interval through the value described by the quotient result, and then determine the next current marker element interval adjacent to the previous current marker element interval as the target element interval.

[0237] Step 2204: Based on the modulo result of the point mapping value of the starting object and the number of mapping bits, determine and mark the mapping bit where the starting object is located in the target element interval.

[0238] Specifically, the server performs a quotient calculation on the point mapping value of the starting object and the number of mapping bits to obtain the quotient result in the foregoing embodiment. After completing the quotient calculation, further perform a modulo calculation on the point mapping value of the starting object and the number of mapping bits to obtain the modulo result of the point mapping value of the starting object and the number of mapping bits. Then, determine and mark the mapping bit where the starting object is located in the target element interval through the modulo result. Since after determining the target element interval, the order position of the point mapping value of the starting object in the target element interval can be determined through the obtained modulo result, and the order position in the target element interval is the mapping bit where the point mapping value of the starting object is located in the target element interval, and then mark the mapping bit where the point mapping value of the starting object is located in the target element interval.

[0239] Step 2205: Use the mapping bit in the marked state as the target mapping bit of the current marker array in the current round.

[0240] Specifically, the server uses the mapped bits in the marked state as the target mapped bits of the current marked array in the current round. From the foregoing steps, it can be seen that the server marks the mapped bits where the mapped value of the starting object is located in the target element interval, that is, the mapped bits where the mapped value of the starting object is located in the target element interval are in the marked state. Thus, the mapped bits where the mapped value of the starting object is located in the target element interval are determined as the target mapped bits of the current marked array in the current round.

[0241] Step 2206: For the target mapped bits in each round, locate and mark the mapped bits of the adjacent objects that have a connection relationship with the target object represented by the target mapped bits from the unmarked mapped bits of the global marked array.

[0242] Among them, the global marked array contains global object mapped bits, and the global marked array is used to record the objects marked in each round during the graph object query to prevent the marked objects from being repeatedly queried, and the unmarked mapped bits are the unmapped bits that have not been marked.

[0243] Specifically, for the target mapped bits in each round, the server locates and marks the mapped bits of the adjacent objects that have a connection relationship with the target object represented by the target mapped bits from the unmarked mapped bits of the global marked array. That is, the server first determines the candidate adjacent objects that have a connection relationship with the target object represented by the target mapped bits for the target mapped bits in each round, and then determines the mapped bits of the point mapped values of the candidate adjacent objects from the global marked array through the point mapped values of the candidate adjacent objects, and determines whether the mapped bits of the point mapped values of the candidate adjacent objects are marked. If they are marked, the already marked mapped bits will not be processed repeatedly. If they are not marked, then the mapped bits of the point mapped values of the unmarked candidate adjacent objects are located as the mapped bits of the adjacent objects that have a connection relationship with the target object represented by the target mapped bits, and these mapped bits are marked.

[0244] Step 2207: When locating and marking the mapped bits of the adjacent objects that have a connection relationship with the target object represented by the target mapped bits from the unmarked mapped bits of the global marked array, synchronously locate and mark the mapped bits of the adjacent objects in the adjacent marked array.

[0245] Among them, the adjacency marker array contains global object mapping bits, and the current marker array is only used to record the objects for which adjacent object queries are to be performed in the next round. Similar to the global marker array, each mapping bit in the object mapping bits of the adjacency marker array of the adjacency marker array is mapped one-to-one with the point mapping value of the point object. Specifically, when locating and marking the mapping bits of adjacent objects that have a connection relationship with the target object represented by the target mapping bit among the unmarked mapping bits of the global marker array, the mapping bits of the adjacent objects are also synchronously located and marked in the adjacency marker array, that is, the mapping bits corresponding to the marked mapping bits of the adjacent objects in the global marker array are synchronously located and marked in the adjacency marker array.

[0246] Step 2208, clear the marks of each mapping bit in the current marker array.

[0247] Specifically, the server clears the marks of each mapping bit in the current marker array. That is, before synchronizing the marks newly added in the current round in the current marker array, it is necessary to first ensure the marking situation of the target mapping bits marked in the current round of the previous marker array, so that each mapping bit in the current marker array is in an unmarked state.

[0248] Step 2209, swap the marks of the same mapping bits in the adjacency marker array and the current marker array, so that the mapping bit marks of the current marker array are the same as the marks newly added in the current round of the global marker array.

[0249] Specifically, the server swaps the marks of the same mapping bits in the adjacency marker array and the current marker array, so that the mapping bit marks of the current marker array are the same as the marks newly added in the current round of the global marker array. That is, the mapping bits with marks in the current marker array are the same as the mapping bits of the marks newly added in the current round of the global marker array.

[0250] Step 2210, in the case where the objects represented by the marked mapping bits do not satisfy the query conditions with the starting object, based on the marks synchronized to the current marker array, determine the target mapping bits of the current marker array in a new round for a new round of mapping bit marking until a graph object that satisfies the query conditions is obtained.

[0251] Specifically, the server determines the object represented by the point mapping value of the marked mapping bit by the point mapping value of the marked mapping bit, and then determines whether the objects represented by the marked mapping bits satisfy the query conditions in the graph object query request with the starting object. If satisfied, a graph object that satisfies the query conditions is obtained.

[0252] Conversely, if not satisfied, that is, in the case where the objects represented by the respective mapped bits of the mark do not satisfy the query condition with the starting object, based on the marks synchronized to the current mark array, in a manner similar to the foregoing embodiments, determine the target mapped bits of the current mark array in a new round for marking the mapped bits in a new round until a graph object that satisfies the query condition is obtained.

[0253] It should be understood that the specific implementation manners of steps 2201 to 2210 are similar to those of the foregoing embodiments and will not be elaborated herein.

[0254] In a specific application scenario, a method for object query is provided. This method can be implemented through an optimized calculation model for BFS graph query. This calculation model mainly consists of three parts: three-way marking, two-level card table, and mark tracing. The three-way marking uses three Long arrays to mark the bit positions corresponding to the point mapping values of point objects during traversal, and respectively records the sets of point mapping values marked by the global mark, the current mark, and the next-round mark. The two-level card table is used to quickly index whether the bit positions included in a certain element interval are marked, preventing the computational overhead caused by ineffective scanning of the global mark array and the current mark array. Mark tracing is a way to obtain paths. It uses extremely small memory to record paths and obtains path results through backtracking, taking into account both memory overhead and computational overhead. Therefore, the optimized calculation model for BFS graph query can be applied to general graph query scenarios and can be flexibly embedded into the query layer of the graph database, thereby efficiently and stably implementing basic graph query requirements such as multi-hop query, shortest path, and simple path.

[0255] Specifically, this solution realizes BFS graph traversal query based on the RDIM memory model. The core adopts the three-way marking, two-level card table, and mark tracing solutions, aiming to efficiently complete the graph traversal query task with the smallest memory overhead.

[0256] Among them, the process of three-way marking is as Figure 23As shown in the figure, the data structure adopted by the three-way marking's marking structure is three Long arrays, namely the Global array, the Current array, and the Next array. Among them, the Global array is used for global marking to prevent the point mapping values of the starting object from being traversed repeatedly. The Current array is used to parse the marking into a set of point mapping values of the point mapping values to be accessed currently, and is used to expand the Next array to mark the point mapping values of the adjacent objects of the point objects marked by the point mapping values in the current marking array. Each bit in the Long array in the data structure of the three-way marking is mapped one-to-one with the point mapping value in the Runtime Dynamic ID Mapping (RDIM). If the bit is marked as 1, it means that the point mapping value has been traversed; otherwise, if the bit is marked as 0, it means that the point mapping value has not been traversed. The point mapping value is 64 bits, so each marking element interval in the array can map the point mapping values of 64 objects. For example, the bit with the point mapping value of 100 is at the 36th bit in the marking element interval with the array subscript of 1, that is, specifically, point mapping value / 64 = 1 (array subscript is 1), and point mapping value % 64 = 36 (the 36th bit in the marking element interval). Based on this, if the above structure is used to mark 100 million point objects, the corresponding memory overhead is 3 * 100000000 / 8 / 1024 / 1024, which is approximately 36M. Therefore, the memory overhead of the three-way marking structure is very low and can meet the requirements of most scenarios.

[0257] Based on this, the marking process is specifically divided into 4 steps:

[0258] Step 1: Initialize the marking

[0259] Initializing the marking is used to mark the starting object. After the upstream passes in the starting object, after parsing the starting object into the point mapping value of the mapped starting object through RDIM, then find the corresponding mapped bit on the Current array through the quotient and modulus operations, and mark this mapped bit as 1 for subsequent expansion.

[0260] Step 2: Expand the marking

[0261] Expanding the marking scans the Current array, translates the mapped bits marked as 1 into point mapping values. The translation process is the inverse operation of finding the bit in the marking process, point mapping value = array subscript * 64 + the offset corresponding to the mapped bit with the value of 1 where the point mapping value is located. After scanning to obtain the point mapping value, find the point mapping values of the adjacent points corresponding to the point mapping value through the adjacency list of RDIM. Then, find the mapped bit of the point mapping value on the Global array. If this mapped bit has been marked as 1, skip the processing of this point mapping value; otherwise, mark the mapped bits corresponding to the point mapping value on both the Global array and the Next array as 1.

[0262] Step 3: Marker Clearing

[0263] After completing the extended marking, the Current array has been fully traversed and accessed. At this time, clear the Current array, that is, set all the mapping bits in the Current array to 0, which is used to save the results of the next traversal.

[0264] Step 4: Marker Exchange

[0265] After clearing the Current array, exchange the Current array and the Next array. After the exchange, the Current array stores the new point mapping values marked in the Next array, which are used to expand the point mapping values for the next round of parsing. The Next array after the marker exchange is in a cleared state, that is, all the mapping bits in the Next array are set to 0, which is used to mark the point mapping values of the new adjacent points in the next round.

[0266] Step 5: Loop Marking

[0267] After completing the marker exchange, if the query condition is not met at this time, repeat Step 2 for extended marking for loop marking until the query condition is met, and then return the required results to the upstream. The results can be obtained from the three-way marking data structure. Traversing the Global array can obtain all the point mapping values passed through during the expansion process, and traversing Current can obtain the current corresponding point mapping values. For the shortest path and simple path, other data structures need to be combined to generate.

[0268] Furthermore, the construction process and traversal process of the secondary hash table are as Figure 24As shown in the figure, the secondary card table consists of two Long arrays, namely Card1 and Card2. An element of Card1 maps to the value corresponding to a certain mapping interval of Card2, and an element of Card2 maps to the value corresponding to a certain element interval of the Global array in the three-way marking structure. If the value corresponding to the mapping bit in a certain element interval of the Global array is not 0, the element corresponding to this element interval in Card2 is set to 1. If the value corresponding to an element in a certain mapping interval of Card2 is not 0, the element corresponding to this mapping interval in Card1 is set to 1. Since the Current mark set is a subset of the Global mark set, traversing the Current array can use the secondary card table as an index for filtering, which can avoid a large number of invalid traversals compared to a full scan of the current mark array, especially in the scenario of sparse marking, and the benefit is more obvious. Finally, traverse the global mark array or the current mark array to determine the marked mapping bits, and then convert the point mapping values corresponding to the marked mapping bits into point objects through RDIM for subsequent processing. It can be seen that in the scenario of extremely sparse marking, the access efficiency can be increased by more than 4000 times (64x64) through the secondary card table.

[0269] Based on this, the construction process of the secondary card table is as follows:

[0270] 1. When marking the mapping bits in the Global array, find the elements in the mapped mapping interval of Card2 through division and modulo operations and mark them as 1.

[0271] 2. When marking the elements in the mapping interval of Card2, find the elements in the mapped mapping interval of Card1 through division and modulo operations and mark them as 1.

[0272] Secondly, the traversal process of the secondary card table is as follows:

[0273] 1. Starting from Card1, if the current element is marked as 1, access the mapping interval (64-bit interval) of Card2 mapped by the element marked as 1 in Card1.

[0274] 2. Traverse the mapping interval (64-bit interval) of Card2. If there is an element marked as 1 in the mapping interval of Card2, access the element interval (64-bit interval) of the Global array mapped by the element marked as 1 in Card2, or the element interval (64-bit interval) of the Current array.

[0275] 3. Element range of the Global array (64-bit range), or the element range of the Current array (64-bit range). If there is a mapped bit marked as 1 in the element range, translate the mapped bit marked as 1 in the Global array or the Current array into a dot mapping value, convert the dot mapping value into a dot object in combination with RDIM, and then return it to the upstream. Further, the process of marking traceability is as follows Figure 25 As shown, for path-related queries, it is often necessary to save the intermediate results of the path. Such intermediate results often carry a large number of repeated dot-edge structures, thus causing huge memory expansion. Marking traceability aims to reduce the memory overhead of saving intermediate results. On the premise of ensuring stability and reliability, it greatly improves the performance of path queries in combination with three-way marking and secondary card tables. Marking traceability mainly includes the following steps:

[0276] Step 1: Forward marking

[0277] Forward marking is a process of circularly reading and writing the three-way marking data structure. And before each round of marking, backup and save the current Current array. The memory overhead of the Current array is very small. Optionally, in this embodiment, the Roaringbitmap data structure can be used to replace the Current array. When the forward marking meets the query condition, it means the traversal ends. At this time, the Current arrays corresponding to the first hop, the second hop... the nth hop will be recorded. The Current arrays corresponding to the first hop, the second hop... the nth hop are C1, C2... Cn respectively.

[0278] Step 2: Reverse traceability

[0279] Starting from the target query object, perform reverse traversal. Here, the target query object may be a specified end point set (such as finding the shortest path or simple path between the start point and the end point), or a set of points obtained by the last round of expansion (without specifying the end point). The reverse traversal process is the same as the forward traversal, only the traversal direction is reversed. Still use the three-way marking data structure to record the traversal state, and the edge information needs to be recorded during the traversal to return and output the complete path structure. A new Current array will be generated for each round of marking in the reverse traversal. Then, take the intersection of the new Current array and the previously saved Current array. For example, take the intersection of the Current array generated by the i-th round of reverse traversal and the Current array C(n-i) generated by the forward marking, and update the result of the intersection to the Current array generated by the i-th round of reverse traversal for the next round of traversal. This process is actually a pruning process. Therefore, the scale of dots and edges involved in the reverse traversal will be much less than that of the forward traversal. The specific calculation amount depends on the path result.

[0280] In other application scenarios, during the marking and tracing process, the bidirectional breadth-first search method can also be combined to further reduce the search time for the shortest path and simple path.

[0281] This solution uses the bit marking method to efficiently complete the BFS traversal of the graph with less memory space. Combining with the RDIM memory model, it increases the utilization rate of the CPU Cache during the marking process by using the local continuity of the graph structure ID allocation, and can stably and efficiently complete basic graph queries such as multi-hop queries, shortest paths, and simple paths.

[0282] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless clearly stated in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be completed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.

[0283] Based on the same inventive concept, the embodiments of the present application also provide an object query device for implementing the method for object query involved above. The implementation solution provided by this device to solve the problem is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the object query device provided below can refer to the limitations on the method for object query in the above text, and will not be repeated here.

[0284] In one embodiment, as Figure 26 shown, an object query device is provided, including: a request response module 2602, a mapping bit marking module 2604, a marking synchronization module 2606, and an object query module 2608, where:

[0285] The request response module 2602 is configured to respond to a graph object query request and determine the starting object corresponding to the graph object query request and the query condition;

[0286] The mapping bit marking module 2604 is configured to mark the mapping bit of the starting object in the current marking array including the global object mapping bits to obtain the target mapping bit of the current marking array in the current round;

[0287] A marker synchronization module 2606 is configured to, for each round of target mapped bits, locate and mark the mapped bits of adjacent objects that have a connection relationship with the target object represented by the target mapped bits from the unmarked mapped bits of the global marker array, and synchronize the newly added markers in the global marker array in the current round to the current marker array; the number of global object mapped bits included in the global marker array is the same as that of the current marker array;

[0288] An object query module 2608 is configured to, when the objects represented by the marked mapped bits do not meet the query conditions with respect to the starting object, determine the target mapped bits of the current marker array in a new round based on the markers synchronized to the current marker array to perform a new round of mapped bit marking until a graph object that meets the query conditions is obtained.

[0289] In one embodiment, the mapped bit marking module 2604 is specifically configured to determine the number of mapped bits in the element range of the current marker array based on the composition of the element range of the current marker array; determine the target element range where the starting object is located in the current marker array based on the quotient of the point mapping value of the starting object and the number of mapped bits; determine and mark the mapped bit where the starting object is located in the target element range based on the remainder of the point mapping value of the starting object and the number of mapped bits; and use the mapped bits in the marked state as the target mapped bits of the current marker array in the current round.

[0290] In one embodiment, the marker synchronization module 2606 is specifically configured to query the adjacency list based on the point mapping value to query the point mapping values of adjacent objects that have a connection relationship with the target object represented by the target mapped bit; determine the unmarked point mapping values among the point mapping values of each adjacent object through the point mapping values of the unmarked mapped bits of the global marker array and the point mapping value of each adjacent object; and mark the mapped bits of the unmarked point mapping values among the point mapping values of each adjacent object.

[0291] In one embodiment, the query condition at least includes an edge object for describing the connection relationship between two point objects;

[0292] The marker synchronization module 2606 is specifically configured to query adjacent objects that have a connection relationship with the target mapped bit for the point mapping value of each round of target mapped bits and the edge descriptor of the edge object; determine the mapped bits of the adjacent objects based on the point mapping values of the adjacent objects; and mark the mapped bits of the adjacent objects when the mapped bits of the adjacent objects are in an unmarked state.

[0293] In one embodiment, the mapping bit marking module 2604 is further configured to, when locating and marking the mapping bits of adjacent objects that have a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marking array, synchronously locate and mark the mapping bits of the adjacent objects in the adjacent marking array, where the global object mapping bits included in the adjacent marking array are the same as those in the global marking array;

[0294] The marking synchronization module 2606 is specifically configured to clear the marks of each mapping bit in the current marking array; exchange the marks of the same mapping bits in the adjacent marking array and the current marking array, so that the mapping bit marks of the current marking array are the same as the newly added marks in the global marking array in the current round.

[0295] In one embodiment, as Figure 27 shown, the object query device further includes an interval mapping table acquisition module 2702;

[0296] The interval mapping table acquisition module 2702 is configured to acquire the interval mapping table of the global marking array, and the marking status of each element in the interval mapping table is used to represent whether there are marked mapping bits in the corresponding mapping interval in the global marking array;

[0297] The mapping bit marking module 2604 is further configured to, based on the marking status of each element in the interval mapping table, locate the mapping intervals in the global marking array where there are marked mapping bits; scan from the mapping intervals in the global marking array where there are marked mapping bits to obtain the target mapping bits of the current marking array in each round.

[0298] In one embodiment, the interval mapping table includes at least a first interval mapping table and a second interval mapping table with nested mappings; the marking status of each element in the second interval mapping table is used to represent whether there are marked elements in the corresponding mapping interval in the first interval mapping table; the marking status of each element in the first interval mapping table is used to represent whether there are marked mapping bits in the corresponding mapping interval in the global marking array.

[0299] In one embodiment, the interval mapping table acquisition module 2702 is further configured to, for each mapping bit with a newly added mark in the global marking array, determine a first target element in the first interval mapping table that has a mapping relationship with the mapping interval where the mapping bit with the newly added mark is located; mark the first target element; determine a second target element in the second interval mapping table that has a mapping relationship with the mapping interval where the first target element is located; mark the second target element.

[0300] In one embodiment, the interval mapping table acquisition module 2702 is specifically configured to determine the number of first mapping intervals of the first interval mapping table based on the composition of the mapping intervals of the first interval mapping table; determine, based on the quotient of the point mapping value of the mapping bit of each new tag in the global tag array and the number of first mapping intervals, the first mapping interval in the first interval mapping table that has a mapping relationship with the mapping interval where the mapping bit of the new tag is located; and determine the first target element in the first mapping interval based on the remainder of the point mapping value of the mapping bit of each new tag in the global tag array and the number of first mapping intervals.

[0301] In one embodiment, the interval mapping table acquisition module 2702 is specifically configured to determine the number of second mapping intervals of the second interval mapping table based on the composition of the mapping intervals of the second interval mapping table; determine, based on the quotient of the point mapping value of the first target element and the number of second mapping intervals, the second mapping interval in the second interval mapping table that has a mapping relationship with the first mapping interval; and determine the second target element in the second mapping interval based on the remainder of the point mapping value of the first target element and the number of second mapping intervals.

[0302] In one embodiment, the tag synchronization module 2606 is further configured to determine the number of relationship hops between the objects represented by the mapping bits of the tags and the starting object; and determine that the query condition is satisfied when the number of relationship hops reaches the number of relationships.

[0303] In one embodiment, the tag synchronization module 2606 is further configured to determine that the query condition is satisfied when no adjacent object having a connection relationship with the object represented by the mapping bit of the tag is found.

[0304] In one embodiment, the tag synchronization module 2606 is further configured to determine that the query condition is satisfied when there is a target query object to be queried for the object represented by the mapping bit of the tag.

[0305] In one embodiment, as Figure 28 shown, the object query device further includes a relationship generation module 2802;

[0306] The query condition includes at least a target query object;

[0307] The mapping bit marking module 2604 is further configured to mark the mapping bit of the target query object in the reverse current tag array to obtain the reverse target mapping bit of the reverse current tag array in the current reverse round; for the reverse target mapping bit of each reverse round, locate and mark the mapping bit of the reverse adjacent object having a connection relationship with the reverse target object represented by the reverse target mapping bit from the unmarked mapping bits of the reverse global tag array, and update the reverse current tag array based on the newly added marks in the reverse global tag array in the current reverse round.

[0308] A relationship generation module 2802, configured to, when the objects represented by the respective mapped bits of the tags do not hit the starting object, determine the reverse target mapped bits of the reverse current tag array in a new reverse round based on the tags of the updated reverse current tag array for a new round of mapped bit tagging until the objects represented by the respective mapped bits of the tags hit the starting object, and generate a relationship path between the starting object and the target query object.

[0309] In one embodiment, the mapped bit tagging module 2604 is further configured to save the current tag array of each round and the existence of a tag order between the current tag arrays of each round; determine the current tag array matching the current reverse round from the current tag arrays of each round; and update the reverse current tag array based on the tags newly added to the reverse global tag array in the current reverse round and the tags of the current tag array matching the current reverse round.

[0310] Each module in the above object query device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of the processor, or can be stored in the memory in the computer device in software form so that the processor can call and execute the operations corresponding to the above modules.

[0311] In one embodiment, a computer device is provided. The computer device can be a server or a terminal. In this embodiment, the computer device being a server is taken as an example for introduction, and its internal structure diagram can be as Figure 29 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the embodiments of the present application, such as the current tag array, the global tag array, the adjacency tag array, and the interval mapping table. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a method for object query.

[0312] Those skilled in the art can understand that Figure 29The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0313] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0314] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0315] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0316] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0317] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0318] The technical feature information of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical feature information in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical feature information, it should be considered as the scope recorded in this specification.

[0319] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for object query, characterized in that, including: responding to a graph object query request, determining a starting object corresponding to the graph object query request and a query condition; in a current marker array including global object mapping bits, marking the mapping bit of the starting object to obtain a target mapping bit of the current marker array in the current round; for each round of target mapping bits, locating and marking the mapping bits of adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array, and synchronizing the newly added marks of the global marker array in the current round to the current marker array; the number of global object mapping bits included in the global marker array is the same as that of the current marker array; in the case where the objects represented by the marked mapping bits do not satisfy the query condition with the starting object, determining a target mapping bit of the current marker array in a new round based on the marks synchronized to the current marker array for a new round of mapping bit marking until a graph object that satisfies the query condition is obtained.

2. The method according to claim 1, wherein The step of marking the mapping bit of the starting object in the current marker array including global object mapping bits to obtain the target mapping bit of the current marker array in the current round includes: determining the number of mapping bits in the element range of the current marker array based on the element range composition of the current marker array; determining a target element range where the starting object is located in the current marker array based on the quotient result of the point mapping value of the starting object and the number of mapping bits; determining and marking the mapping bit where the starting object is located in the target element range based on the modulo result of the point mapping value of the starting object and the number of mapping bits; taking the marked mapping bit as the target mapping bit of the current marker array in the current round.

3. The method according to claim 1, characterized in that, The step of locating and marking the mapping bits of adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array includes: querying the point mapping values of adjacent objects having a connection relationship with the target object represented by the target mapping bit by looking up an adjacency list based on the point mapping value; determining the unmarked point mapping values among the point mapping values of each adjacent object through the point mapping values of the unmarked mapping bits of the global marker array and the point mapping value of each adjacent object; marking the mapping bits of the unmarked point mapping values among the point mapping values of each adjacent object.

4. The method according to claim 1, characterized in that, The query condition at least includes an edge object for describing the connection relationship between two point objects; The step of locating and marking the mapping bits of adjacent objects having a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array includes: querying adjacent objects having a connection relationship with the target mapping bit for each round of point mapping value of the target mapping bit and the edge descriptor of the edge object; determining the mapping bit of the adjacent object based on the point mapping value of the adjacent object; marking the mapping bit of the adjacent object in the case where the mapping bit of the adjacent object is in an unmarked state.

5. The method according to claim 1, wherein The method further includes: When locating and marking the mapped bits of adjacent objects that have a connection relationship with the target object represented by the target mapped bit among the unmarked mapped bits of the global tag array, synchronously locate and mark the mapped bits of the adjacent objects in the adjacent tag array, where the global object mapped bits included in the adjacent tag array are the same as those in the global tag array; The synchronizing the tags newly added to the global tag array in the current round to the current tag array includes: Clearing the marks of each mapped bit in the current tag array; Exchanging the marks of the same mapped bits in the adjacent tag array and the current tag array, so that the mapped bit marks of the current tag array are the same as the tags newly added in the current round of the global tag array.

6. The method according to claim 1, characterized in that, The method further includes: Obtaining an interval mapping table of the global tag array, where the marking status of each element in the interval mapping table is used to represent whether there are marked mapped bits in the corresponding mapping interval in the global tag array; Based on the marking status of each element in the interval mapping table, locating the mapping intervals in the global tag array where there are marked mapped bits; Scanning from the mapping intervals in the global tag array where there are marked mapped bits to obtain the target mapped bits of the current tag array in each round.

7. The method according to claim 6, characterized in that, The interval mapping table at least includes a first interval mapping table and a second interval mapping table with nested mappings; The marking status of each element in the second interval mapping table is used to represent whether there are marked elements in the corresponding mapping interval in the first interval mapping table; The marking status of each element in the first interval mapping table is used to represent whether there are marked mapped bits in the corresponding mapping interval in the global tag array.

8. The method according to claim 7, characterized in that, The method further includes: For each mapped bit with a newly added mark in the global tag array, determining a first target element in the first interval mapping table that has a mapping relationship with the mapping interval where the mapped bit with the newly added mark is located; Marking the first target element; Determining a second target element in the second interval mapping table that has a mapping relationship with the mapping interval where the first target element is located; Marking the second target element.

9. The method according to claim 8, wherein The determining, for each mapped bit with a newly added mark in the global tag array, a first target element in the first interval mapping table that has a mapping relationship with the mapping interval where the mapped bit with the newly added mark is located includes: Based on the composition of the mapping intervals of the first interval mapping table, determining the number of first mapping intervals of the first interval mapping table; Based on the quotient result of the point mapping value of each mapped bit with a newly added mark in the global tag array divided by the number of first mapping intervals, determining a first mapping interval in the first interval mapping table that has a mapping relationship with the mapping interval where the mapped bit with the newly added mark is located; Based on the modulo result of the point mapping value of each mapped bit with a newly added mark in the global tag array divided by the number of first mapping intervals, determining the first target element in the first mapping interval.

10. The method according to claim 9, characterized in that, The determining a second target element in the second interval mapping table that has a mapping relationship with the mapping interval where the first target element is located includes: Determine the number of second mapping intervals of the second interval mapping table based on the composition of the mapping intervals of the second interval mapping table; Determine the second mapping interval in the second interval mapping table that has a mapping relationship with the first mapping interval based on the quotient result of the point mapping value of the first target element and the number of second mapping intervals; Determine the second target element in the second mapping interval based on the modulo result of the point mapping value of the first target element and the number of second mapping intervals.

11. The method according to claim 1, wherein The method further includes: Determine the number of relationship hops between the objects represented by the marked mapping bits and the starting object; when the number of relationship hops reaches the number of relationships, determine that the query condition is satisfied; Or, When no adjacent object having a connection relationship with the object represented by the marked mapping bit is queried, determine that the query condition is satisfied; Or, When the object represented by the marked mapping bit has a target query object to be queried, determine that the query condition is satisfied.

12. The method according to claim 1, characterized in that The query condition at least includes a target query object; The method further includes: In the reverse current marker array, mark the mapping bit of the target query object to obtain the reverse target mapping bit of the reverse current marker array in the current reverse round; For each reverse target mapping bit in each reverse round, locate and mark the mapping bits of the reverse adjacent objects having a connection relationship with the reverse target object represented by the reverse target mapping bit from the unmarked mapping bits of the reverse global marker array, and update the reverse current marker array based on the newly added markers in the current reverse round of the reverse global marker array; When the object represented by the marked mapping bit does not hit the starting object, determine the reverse target mapping bit of the reverse current marker array in a new reverse round based on the markers of the updated reverse current marker array for a new round of mapping bit marking until the object represented by the marked mapping bit hits the starting object, and generate the relationship path between the starting object and the target query object.

13. The method according to claim 12, wherein The method further includes: Save the current marker array of each round and the marker order among the current marker arrays of each round; The updating the reverse current marker array based on the newly added markers in the current reverse round of the reverse global marker array includes: Determine the current marker array matching the current reverse round from the current marker arrays of each round; Update the reverse current marker array based on the newly added markers in the current reverse round of the reverse global marker array and the markers of the current marker array matching the current reverse round.

14. An object query device, characterized in that, The apparatus includes: A request response module, configured to determine a starting object and a query condition corresponding to the graph object query request in response to the graph object query request; A mapping bit marking module, configured to mark the mapping bit of the starting object in the current marker array including global object mapping bits to obtain the target mapping bit of the current marker array in the current round; A marker synchronization module, which is used to, for each round of target mapping bits, locate and mark the mapping bits of adjacent objects that have a connection relationship with the target object represented by the target mapping bit from the unmarked mapping bits of the global marker array, and synchronize the newly added markers in the current round of the global marker array to the current marker array; the number of global object mapping bits included in the global marker array is the same as that of the current marker array; An object query module, which is used to, when the objects represented by the marked mapping bits do not meet the query conditions with respect to the starting object, determine the target mapping bits of the current marker array in a new round based on the markers synchronized to the current marker array to perform a new round of mapping bit marking until a graph object that meets the query conditions is obtained.

15. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 13.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.