Data query result generation methods, devices, equipment, media and program products

CN118708782BActive Publication Date: 2026-08-14JINGDONG TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]图查询相关算法和图计算相关算法均存在图结构数据处理效率低下,处理复杂度高的问题

Benefits of technology

[0029]本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的数据查询结果生成方法,可以针对性的根据目标图结构数据查询要求信息,合理化地执行对应的图查询任务集和/或图计算任务集,以提高图结构数据查询效率。具体来说,造成相关的图结构数据查询效率低下的原因在于:图查询相关算法和图计算相关算法均存在图结构数据处理效率低下,处理复杂度高的问题。针对图结构数据查询要求较为复杂时,存在图查询相关算法和图计算相关算法合理调用效率低下的问题,导致浪费大量计算资源,查询效率低下。基于此,本公开的一些实施例的数据查询结果生成方法,首先,根据获取的目标图结构数据查询要求信息,生成针对点结构的第一查询信息集、针对边结构的第二查询信息集和针对路径结构的第三查询信息集。在这里,对目标图结构数据查询要求信息进行分析,以生成针对各种结构的查询信息,来精准地匹配对应的图查询任务和图计算任务。通过图查询任务和图计算任务的精准合理调度,充分利用了图查询和图计算的计算资源,避免了计算资源的浪费。接着,可以精准地生成针对上述第一查询信息集、上述第二查询信息集和上述第三查询信息集的图查询任务信息集和/或图计算任务信息集,以实现图查询和图计算的合理使用调度。进而,生成针对上述图查询任务信息集的图查询语句集、和/或针对上述图计算任务信息集的图计算任务请求信息集,以便于后续执行对应的任务,得到对应任务的执行结果。再接着,执行上述图查询语句集中的图查询语句和/或上述图计算任务请求信息集中的图计算任务请求信息,得到任务执行结果集。在这里,通过图查询语句集和/或上述图计算任务请求信息集的执行,可以精准、便捷地实现任务执行结果的生成。最后,生成针对上述任务执行结果集的图结构数据查询结果。综上,通过针对目标图结构数据查询要求信息,而生成不同结构类型的查询信息,以实现图查询任务和图计算任务的合理调度,充分利用了计算资源,提高了图结构数据的查询精准性和查询速度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708782B_ABST
    Figure CN118708782B_ABST
Patent Text Reader

Abstract

This disclosure presents embodiments of a method, apparatus, device, medium, and program product for generating data query results. One specific implementation of the method includes: generating a first query information set for vertex structures, a second query information set for edge structures, and a third query information set for path structures based on acquired target graph structure data query requirement information; generating a graph query task information set and / or a graph computation task information set; generating a graph query statement set and / or a graph computation task request information set; executing the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set; and generating graph structure data query results. This implementation relates to graph structure data querying and can specifically and rationally execute corresponding graph query task sets and / or graph computation task sets based on the target graph structure data query requirement information to improve the efficiency of graph structure data querying.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed herein relate to the field of computer technology, specifically to methods, apparatus, devices, media, and program products for generating data query results. Background Technology

[0002] Currently, graph querying and graph computation are two methods for processing graph data. Graph querying is used to extract relevant information. Graph computation is used to perform corresponding computational operations on graph data. For querying graph-structured data, the common approach is to call graph query-related algorithms and graph computation-related algorithms according to the query requirements to achieve the query.

[0003] However, the inventors discovered that the following technical problems often arise when using the above method:

[0004] Both graph query and graph computation algorithms suffer from low efficiency and high complexity in processing graph data. When querying complex graph data, the efficient use of these algorithms leads to wasted computational resources and low query performance.

[0005] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0007] Some embodiments of this disclosure provide methods, apparatus, devices, media, and program products for generating data query results to solve one or more of the technical problems mentioned in the background section above.

[0008] In a first aspect, some embodiments of this disclosure provide a data query result generation method, comprising: generating a first query information set for a point structure, a second query information set for an edge structure, and a third query information set for a path structure based on the obtained target graph structure data query requirement information; generating a graph query task information set and / or a graph computation task information set for the first query information set, the second query information set, and the third query information set; generating a graph query statement set for the graph query task information set and / or a graph computation task request information set for the graph computation task information set; executing the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set; and generating a graph structure data query result for the task execution result set.

[0009] Optionally, the above-mentioned generation of graph query task information set and / or graph computation task information set for the first query information set, the second query information set, and the third query information set includes: generating graph query task information corresponding to each first query information in the first query information set; for each second query information in the second query information set, performing the following first generation step: determining the edge description information corresponding to the second query information; in response to determining that the edge description information satisfies the first information completeness condition, generating graph query task information for the second query information; for each third query information in the third query information set, performing the following second generation step: determining the path description information corresponding to the third query information; in response to determining that the path description information satisfies the second information completeness condition, generating graph query task information for the third query information.

[0010] Optionally, after generating graph query task information for the second query information in response to determining that the edge description information satisfies the first information completeness condition, the method further includes: generating graph computation task information for the second query information in response to determining that the edge description information satisfies the third information completeness condition.

[0011] Optionally, after generating graph query task information for the third query information in response to determining that the path description information satisfies the second information completeness condition, the method further includes: generating graph computation task information for the third query information in response to determining that the path description information satisfies the fourth information completeness condition.

[0012] Optionally, the above-mentioned execution of the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set includes: executing the graph query statement set to obtain a query result set; sending the graph computation task request information set to the graph computation engine to obtain a graph computation result set; and determining the query result set and / or the graph computation result set as the task execution result set.

[0013] Optionally, the above-mentioned generation of a graph query statement set for the graph query task information set and / or a graph computation task request information set for the graph computation task information set includes: in response to determining that the graph query task information set exists, for each graph query task information in the graph query task information set, performing the following third generation step: determining the query complexity corresponding to the graph query task information as a first query complexity; obtaining first construction tool information for the graph query task information based on the first query complexity and the graph structure and query conditions corresponding to the graph query task information; generating a graph query statement for the graph query task information using the construction tool corresponding to the first construction tool information; in response to determining that the graph computation task information set exists, for each graph computation task information in the graph computation task information set, performing the following fourth generation step: determining the query complexity corresponding to the graph computation task information as a second query complexity; obtaining second construction tool information for the graph computation task information based on the second query complexity, the graph structure and query conditions corresponding to the graph computation task information; generating a graph computation task request information for the graph computation task information using the construction tool corresponding to the second construction tool information.

[0014] Optionally, after generating graph query task information for the second query information in response to determining that the edge description information satisfies the first information completeness condition, the method further includes: generating target graph computation task information and target graph query task information in response to determining that the edge description information satisfies the fifth information completeness condition, wherein the target graph computation task information is graph computation task information for the second query information, and the target graph query task information is graph query task information for the second query information.

[0015] Optionally, the above-mentioned execution of graph query statements in the graph query statement set and / or graph computation task request information in the graph computation task request information set to obtain a task execution result set includes: in response to determining that a target graph query statement exists in the graph query statement set and that a target graph computation task request information exists in the graph computation task request information set, wherein the target graph query statement and the target graph computation task request information correspond to the same second query information, the following processing steps are performed: in response to determining that the execution result generation speed corresponding to the target graph query statement is faster than the execution result generation speed corresponding to the target graph computation task request information, the first task execution result corresponding to the target graph query statement is determined as the task execution result corresponding to the second query information, wherein the target graph query statement and the target graph computation task request information correspond to the same second query information; in response to determining that the execution result generation speed corresponding to the target graph query statement is slower than the execution result generation speed corresponding to the target graph computation task request information, the second task execution result corresponding to the target graph computation task request information is determined as the task execution result corresponding to the second query information.

[0016] Optionally, generating the graph query task information set and / or graph computation task information set for the first query information set, the second query information set, and the third query information set includes: using the graph query and graph computation encapsulation interface to generate the graph query task information set and / or graph computation task information set for the first query information set, the second query information set, and the third query information set.

[0017] Secondly, some embodiments of this disclosure provide a data query result generation apparatus, comprising: a first generation unit configured to generate a first query information set for a vertex structure, a second query information set for an edge structure, and a third query information set for a path structure based on acquired target graph structure data query requirement information; a second generation unit configured to generate a graph query task information set and / or a graph computation task information set for the first, second, and third query information sets; a third generation unit configured to generate a graph query statement set for the graph query task information set and / or a graph computation task request information set for the graph computation task information set; an execution unit configured to execute the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set; and a fourth generation unit configured to generate graph structure data query results for the task execution result set.

[0018] Optionally, the second generation unit can be configured to: generate graph query task information corresponding to each first query information in the first query information set; for each second query information in the second query information set, perform the following first generation steps: determine the edge description information corresponding to the second query information; in response to determining that the edge description information satisfies the first information completeness condition, generate graph query task information for the second query information; for each third query information in the third query information set, perform the following second generation steps: determine the path description information corresponding to the third query information; in response to determining that the path description information satisfies the second information completeness condition, generate graph query task information for the third query information.

[0019] Optionally, the second generation unit can be configured to generate graph computation task information for the second query information in response to determining that the edge description information satisfies the third information completeness condition.

[0020] Optionally, the second generation unit can be configured to: after generating graph query task information for the third query information in response to determining that the path description information satisfies the second information completeness condition, the method further includes: generating graph computation task information for the third query information in response to determining that the path description information satisfies the fourth information completeness condition.

[0021] Optionally, the execution unit can be configured to: execute the above graph query statement set to obtain a query result set; send the above graph computation task request information set to the graph computation engine to obtain a graph computation result set; and determine the above query result set and / or the above graph computation result set as the task execution result set.

[0022] Optionally, the third generation unit can be configured to: in response to determining the existence of the aforementioned graph query task information set, for each graph query task information in the aforementioned graph query task information set, perform the following third generation steps: determine the query complexity corresponding to the aforementioned graph query task information as a first query complexity; obtain first construction tool information for the aforementioned graph query task information based on the aforementioned first query complexity and the graph structure and query conditions corresponding to the aforementioned graph query task information; generate a graph query statement for the aforementioned graph query task information using the construction tool corresponding to the aforementioned first construction tool information; in response to determining the existence of the aforementioned graph computation task information set, for each graph computation task information in the aforementioned graph computation task information set, perform the following fourth generation steps: determine the query complexity corresponding to the aforementioned graph computation task information as a second query complexity; obtain second construction tool information for the aforementioned graph computation task information based on the aforementioned second query complexity, the graph structure and query conditions corresponding to the aforementioned graph computation task information; generate graph computation task request information for the aforementioned graph computation task information using the construction tool corresponding to the aforementioned second construction tool information.

[0023] Optionally, the second generation unit can be configured to: in response to determining that the edge description information satisfies the fifth information completeness condition, generate target graph computation task information and target graph query task information, wherein the target graph computation task information is graph computation task information for the second query information, and the target graph query task information is graph query task information for the second query information.

[0024] Optionally, the execution unit can be configured to: in response to determining that a target graph query statement exists in the graph query statement set and a target graph computation task request information exists in the graph computation task request information set, wherein the target graph query statement and the target graph computation task request information correspond to the same second query information, perform the following processing steps: in response to determining that the execution result generation speed corresponding to the target graph query statement is faster than the execution result generation speed corresponding to the target graph computation task request information, determine the first task execution result corresponding to the target graph query statement as the task execution result corresponding to the second query information, wherein the target graph query statement and the target graph computation task request information correspond to the same second query information; in response to determining that the execution result generation speed corresponding to the target graph query statement is slower than the execution result generation speed corresponding to the target graph computation task request information, determine the second task execution result corresponding to the target graph computation task request information as the task execution result corresponding to the second query information.

[0025] Optionally, the second generation unit can be configured to: use the graph query and graph computation encapsulation interface to generate a graph query task information set and / or a graph computation task information set for the first query information set, the second query information set, and the third query information set.

[0026] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, such that when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.

[0027] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as described in any implementation of the first aspect.

[0028] Fifthly, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0029] The above embodiments of this disclosure have the following beneficial effects: Through the data query result generation method of some embodiments of this disclosure, the corresponding graph query task set and / or graph computation task set can be executed rationally and specifically according to the target graph structure data query requirements information, thereby improving the efficiency of graph structure data query. Specifically, the reason for the low efficiency of related graph structure data queries is that both graph query-related algorithms and graph computation-related algorithms suffer from low efficiency and high complexity in processing graph structure data. When the graph structure data query requirements are complex, there is a problem of low efficiency in the rational invocation of graph query-related algorithms and graph computation-related algorithms, resulting in a waste of a large amount of computing resources and low query efficiency. Based on this, the data query result generation method of some embodiments of this disclosure first generates a first query information set for point structures, a second query information set for edge structures, and a third query information set for path structures based on the obtained target graph structure data query requirements information. Here, the target graph structure data query requirements information is analyzed to generate query information for various structures, so as to accurately match the corresponding graph query tasks and graph computation tasks. By precisely and rationally scheduling graph query and graph computation tasks, computational resources are fully utilized, avoiding waste. Next, graph query task information sets and / or graph computation task information sets can be accurately generated for the first, second, and third query information sets mentioned above, achieving rational scheduling of graph queries and computations. Then, graph query statement sets and / or graph computation task request information sets are generated for the graph query task information sets, facilitating subsequent task execution and obtaining results. Next, the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set are executed to obtain a task execution result set. Here, the execution of the graph query statement set and / or the graph computation task request information set allows for precise and convenient generation of task execution results. Finally, graph structure data query results are generated for the task execution result set. In summary, by generating query information for different structure types based on the query requirements of the target graph structure data, the graph query and graph computation tasks can be rationally scheduled, making full use of computing resources and improving the accuracy and speed of querying graph structure data. Attached Figure Description

[0030] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0031] Figure 1This is a schematic diagram illustrating an application scenario of a data query result generation method according to some embodiments of the present disclosure;

[0032] Figure 2 This is a flowchart of some embodiments of the data query result generation method based on this disclosure;

[0033] Figure 3 These are schematic diagrams of various graph structure types in some embodiments of the data query result generation method of this disclosure;

[0034] Figure 4 These are flowcharts of some other embodiments of the data query result generation method based on this disclosure;

[0035] Figure 5 These are schematic diagrams illustrating the structure of some embodiments of the apparatus for generating data query results based on this disclosure;

[0036] Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0037] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0038] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0039] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0040] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0041] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0042] Before performing any of the operations involving the collection, storage, or use of user personal information (such as target graph structure data query requirements), the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, informing personal information subjects, and obtaining prior authorization and consent from personal information subjects.

[0043] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0044] Figure 1 This is a schematic diagram of an application scenario of a data query result generation method according to some embodiments of the present disclosure.

[0045] exist Figure 1In this application scenario, the electronic device 101 can first generate a first query information set 103 for the point structure, a second query information set 104 for the edge structure, and a third query information set 105 for the path structure based on the acquired target graph structure data query requirement information 102. In this application scenario, the target graph structure data query requirement information 102 can be "graph structure data query requirement information for graph A". The first query information set 103 for the point structure can include: first query information 1031 and first query information 1032. First query information 1031 can be "node query connected to node A". First query information 1032 can be "node query at the center of the graph". The second query information set 104 for the edge structure includes: second query information 1041 and second query information 1042. Second query information 1041 can be "edge query near edge [A,B]". Second query information 1042 can be "edge query with an edge value of 0.6". The third query information set 105 for the path structure includes: third query information 1051 and third query information 1052. Third query information 1051 can be a "path query with node V". Third query information 1052 can be a "path query with a path length of 4". Then, the electronic device 101 can generate a graph query task information set and / or a graph computation task information set for the aforementioned first query information set 103, the aforementioned second query information set 104, and the aforementioned third query information set 105. In this application scenario, the graph query task information set includes: a graph query task information subset 106 and graph query task information 107. Graph query task information subset 106 is the information subset corresponding to the first query information set 103. Information subset 107 is the subset corresponding to the second query information set 104. Graph computation task information subset 108 is the subset corresponding to the third query information set 105. Graph query task information subset 106 includes: graph query task information 1061 corresponding to the first query information 1031 and graph query task information 1062 corresponding to the first query information 1032. Information subset 107 includes: graph computation task information 1071 corresponding to the second query information 1041 and graph query task information 1072 corresponding to the second query information 1042. Graph computation task information subset 108 includes: graph computation task information 1081 corresponding to the third query information 1051 and graph computation task information 1082 corresponding to the third query information 1052. Graph computation task information set includes: graph computation task information subset 108 and graph computation task information 1071. Next, electronic device 101 can generate a graph query statement set for the above graph query task information set and / or a graph computation task request information set for the above graph computation task information set. In this application scenario, the graph query statement set includes: graph query statement subset 109 and graph query statement 1102 corresponding to graph query task information 1072.Graph query statement subset 109 includes: graph query statement 1091 corresponding to graph query task information 1061 and graph query statement 1092 corresponding to graph query task information 1062. Information subset 110 includes: graph computation task request information 1101 corresponding to graph computation task information 1071 and graph query statement 1102 corresponding to graph query task information 1072. Graph computation task request information set includes: graph computation task request information subset 111 and graph computation task request information 1101 corresponding to graph computation task information 1071. Graph computation task request information subset 111 includes: graph computation task request information 1111 corresponding to graph computation task information 1081 and graph computation task request information 1112 corresponding to graph computation task information 1081. Furthermore, electronic device 101 can execute the graph query statements in the above graph query statement set and / or the graph computation task request information in the above graph computation task request information set to obtain task execution result set 112. Finally, the electronic device 101 can generate a graph-structured data query result 113 for the aforementioned task execution result set 112.

[0046] It should be noted that the aforementioned electronic device 101 can be either hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the electronic device is software, it can be installed in the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0047] It should be understood that Figure 1 The number of electronic devices shown is merely illustrative. Any number of electronic devices can be used depending on the implementation requirements.

[0048] Continue to refer to Figure 2 The flowchart 200 illustrates some embodiments of a data query result generation method according to the present disclosure. The data query result generation method includes the following steps:

[0049] Step 201: Based on the obtained target graph structure data query requirements information, generate a first query information set for the point structure, a second query information set for the edge structure, and a third query information set for the path structure.

[0050] In some embodiments, the execution entity of the above-described data query result generation method (e.g.) Figure 1The electronic device 101 shown can generate a first query information set for point structures, a second query information set for edge structures, and a third query information set for path structures based on the acquired target graph structure data query requirement information. The target graph structure data query requirement information can be the graph structure data query requirement information corresponding to a query request issued by the upper-layer system. Specifically, the aforementioned executing entity can perform request analysis on the query request to generate the graph structure data query requirement information. The graph structure data query requirement information can be the requirement information for querying graph structure data. Graph structure data can be data of graph structure data type. In practice, graph structure data can be node data in a knowledge graph, or edge data in a knowledge graph. The upper-layer system can be the system end that obtains the data to be queried. The graph structure data query requirement information can include, but is not limited to, at least one of the following: the data result to be queried, and data filtering conditions. The data result to be queried can be the query data result desired by the upper-layer system. Data filtering conditions can be the conditions for filtering out the data to be queried. For example, data filtering conditions can be filtering out edges of length **. Point structures can be graph structure data in point form. For example, it can be node data in a graph. Edge structures can be graph structure data in edge form. For example, it could be edge data in a graph. The path structure could be graph structure data in the form of paths. For example, it could be path data in a graph. The first query information could be query information where the graph structure data type is in the form of a vertex structure. For example, the first query information could be "query node data with node identifier '7678'". The second query information could be query information where the graph structure data type is in the form of an edge structure. For example, the second query information could be "query edge data where the edge includes the target node". The third query information could be query information where the graph structure data type is in the form of a path structure. For example, the third query information could be "query data with a path length of 3".

[0051] As an example, see Figure 3 , Figure 3 This is a schematic diagram of the graph. The data for the point structure can be data node C301 in the graph. The data for the edge structure can be edge data 302 in the graph. Edge data 302 can include: data node E and data node O. The data for the path structure can be path data 303 in the graph. Path data 303 can include: edge data composed of data node A and data node B, edge data composed of data node B and data node D, and edge data composed of data node D and data node W.

[0052] As an example, the aforementioned execution entity can analyze the data results and data filtering conditions included in the target graph structure data query requirements to perform result and condition analysis. It can then comprehensively utilize at least one generation condition to generate a first query information set for the point structure, a second query information set for the edge structure, and a third query information set for the path structure. In practice, each generation condition in the at least one generation condition can be a pre-set condition. Generation conditions determine how to generate the corresponding query information. For example, at least one generation condition may include, but is not limited to, at least one of the following: a condition indicating whether there is a starting point, a condition indicating whether there is a cycle, and a condition indicating whether the data length is greater than the target value.

[0053] Step 202: Generate a graph query task information set and / or a graph computation task information set for the first query information set, the second query information set, and the third query information set.

[0054] In some embodiments, the aforementioned executing entity may generate a graph query task information set and / or a graph computation task information set for the aforementioned first query information set, second query information set, and third query information set. The graph query task information in the graph query task information set may be task information corresponding to the graph query task. In practice, task information may be a task identifier. A graph query task may be a task that performs a direct graph query operation. Direct graph query operations are used to extract information, using query languages ​​or algorithms to retrieve graph data that meets the conditions, and are widely used in fields such as social network analysis and knowledge graph management. The graph computation task information in the graph computation task information set may be task information corresponding to the graph computation task. A graph computation task may be a task that performs data computation on graph structure data. Graph computation is used to perform computational operations, including vertex computation and message passing, to solve graph analysis, graph mining, and graph machine learning problems.

[0055] As an example, the aforementioned execution entity can filter out query information that does not require further calculation from the first, second, and third query information sets to obtain a first target query information set, and filter out query information that requires further calculation to obtain a second target query information set. Graph query task information corresponding to each first target query information in the first target query information set is generated, resulting in a graph query task information set. Graph computation task information corresponding to each second target query information in the second target query information set is generated, resulting in a graph computation task information set.

[0056] In some optional implementations of certain embodiments, the aforementioned execution entity can utilize the graph query and graph computation encapsulation interface to generate graph query task information sets and / or graph computation task information sets for the first query information set, the second query information set, and the third query information set. The graph query and graph computation encapsulation interface can be an interface that encapsulates graph query-related algorithms and graph computation-related algorithms. Through the graph query and graph computation encapsulation interface, quick invocation of graph query operations and graph computation operations can be achieved, which can greatly improve system performance and scalability, and reduce usage costs.

[0057] Step 203: Generate a graph query statement set for the graph query task information set mentioned above, and / or a graph computation task request information set for the graph computation task information set mentioned above.

[0058] In some embodiments, the executing entity may generate a set of graph query statements for the graph query task information set and / or a set of graph computation task request information for the graph computation task information set. There is a one-to-one correspondence between the graph query statements in the graph query statement set and the graph query task information in the graph query task information set. A graph query statement may be a database statement that performs a graph query operation. A graph computation task request information may be a request information for executing a corresponding graph computation task in response to the query information.

[0059] As an example, the aforementioned execution entity can generate a set of graph query statements for the aforementioned graph query task information set by generating a graph query statement template, and / or generate a set of graph computation task request information for the aforementioned graph computation task information set by generating a request information template.

[0060] In some optional implementations of certain embodiments, the generation of the graph query statement set for the graph query task information set and / or the graph computation task request information set for the graph computation task information set may include the following steps:

[0061] First, in response to the determination that the above graph query task information set exists, for each graph query task information in the above graph query task information set, the following third generation step is performed:

[0062] The first sub-step involves determining the query complexity corresponding to the graph query task information mentioned above, which is then used as the first query complexity. The first query complexity characterizes the difficulty of querying the task corresponding to the graph query task information. For example, the first query complexity can be represented numerically; the larger the value, the higher the query difficulty.

[0063] As an example, the aforementioned execution entity can determine the query complexity corresponding to the graph query task information based on the schema of the graph database, and use it as the first query complexity.

[0064] The second sub-step involves obtaining the first construction tool information for the graph query task information based on the first query complexity, the graph structure corresponding to the graph query task information, and the query conditions. The query conditions can be those found within the information content corresponding to the graph query task information. These query conditions represent the logic for performing the information query. The tool corresponding to the first construction tool information can be a commander tool. For example, the first construction tool information could be the HasVidCommander tool information.

[0065] As an example, firstly, the aforementioned execution entity can determine whether the first query complexity is greater than a first value. Then, in response to the determination that it is greater than the first value, based on the query conditions and graph structure, the graph query task information is partitioned to generate a subset of graph query task information whose first query complexity is less than or equal to the aforementioned first value. Next, a corresponding first construction tool is assigned to the aforementioned subset of graph query task information, obtaining the first construction tool information. The specific allocation method of the first construction tool can be pre-set. For example, for graph query tasks, the HasVidCommander tool is used to generate subsequent query statements.

[0066] The third sub-step involves using the construction tool corresponding to the first construction tool information to generate a graph query statement for the graph query task information.

[0067] Therefore, based on the established set of graph query task information, for each graph query task, firstly, the query complexity corresponding to the graph query task information is determined to explicitly represent the query difficulty of the graph query task. Then, based on the query complexity, graph structure, and query conditions, the corresponding first construction tool information is obtained. This first construction tool information is used to quickly and efficiently execute the graph query task corresponding to the graph query task information, effectively ensuring the task execution efficiency of the graph query task.

[0068] The second step, in response to the determination that the above graph computation task information set exists, is to perform the following fourth generation step for each graph computation task information in the above graph computation task information set:

[0069] The first sub-step involves determining the query complexity corresponding to the graph computation task information mentioned above, which is then used as the second query complexity. The second query complexity characterizes the difficulty of querying the task corresponding to the graph computation task information. For example, the second query complexity can be represented numerically; the larger the value, the higher the query difficulty.

[0070] The second sub-step involves obtaining the second construction tool information for the graph computation task information based on the aforementioned second query complexity, the graph structure corresponding to the graph computation task information, and the query conditions. The query conditions can be those found within the information content corresponding to the graph computation task information. These query conditions represent the logic for performing information computation. The tool corresponding to the second construction tool information can be a commander tool. For example, the second construction tool information could be the HasGlobalEdgeRestrictionsCommander tool information.

[0071] As an example, firstly, the aforementioned execution entity can determine whether the second query complexity is greater than the second value. Then, in response to the determination that it is greater than the second value, based on the query conditions and graph structure, the graph computation task information is partitioned to generate a subset of graph computation task information where the second query complexity is less than or equal to the aforementioned second value. Next, a corresponding second construction tool is assigned to the aforementioned subset of graph computation task information to obtain second construction tool information. The specific allocation method of the second construction tool can be pre-set. For example, for graph query tasks, the HasGlobalEdgeRestrictionsCommander tool is used to generate subsequent graph computation task request information.

[0072] The third sub-step involves using the construction tool corresponding to the second construction tool information to generate graph computation task request information for the aforementioned graph computation task information. Therefore, based on the confirmed existence of a set of graph computation task information, for each graph computation task information, firstly, the query complexity corresponding to the graph computation task information is determined to explicitly represent the query difficulty of the graph computation task. Then, based on the query complexity, graph structure, and query conditions, the corresponding first construction tool information is obtained. This allows for the quick and efficient execution of the graph computation task corresponding to the graph computation task information using the first construction tool information, effectively ensuring the task execution efficiency of the graph computation task.

[0073] Step 204: Execute the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain the task execution result set.

[0074] In some embodiments, the aforementioned execution entity may execute graph query statements in the graph query statement set and / or graph computation task request information in the graph computation task request information set to obtain a task execution result set. The task execution results in the task execution result set may be the execution results of a graph query task or a graph computation task. In practice, there is a one-to-one correspondence between the graph query statements in the graph query statement set and the task execution results in the first task execution result subset. That is, the query result corresponding to the graph query statement is the task execution result in the first task execution result subset. Similarly, there is a one-to-one correspondence between the graph computation task request information in the graph computation task request information set and the task execution results in the second task execution result subset. That is, the request result corresponding to the graph computation task request information is the task execution result in the second task execution result subset.

[0075] In some optional implementations of certain embodiments, the process of executing the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set may include the following steps:

[0076] The first step is to execute the above set of graph query statements to obtain the query result set. There is a one-to-one correspondence between the query results in the result set and the graph query statements in the graph query statement set.

[0077] As an example, the aforementioned execution entity can execute the above set of graph query statements on a graph-structured database to obtain a set of query results.

[0078] The second step involves sending the aforementioned graph computation task request information set to the graph computation engine to obtain the graph computation result set. The graph computation engine can be an engine that performs graph data computations on the graph corresponding to the graph structure data. The graph computation engine can return the graph computation results. There is a one-to-one correspondence between the graph computation results in the graph computation result set and the graph technology task request information in the graph computation task request information set.

[0079] The third step is to determine the above query result set and / or the above graph calculation result set as the task execution result set.

[0080] As an example, in response to determining that a graph query task information set exists but a graph computation task information set does not exist, the aforementioned execution entity may determine the query result set as the task execution result set. In response to determining that a graph query task information set does not exist but a graph computation task information set exists, the aforementioned execution entity may determine the graph computation result set as the task execution result set. In response to determining that a graph query task information set exists and a graph computation task information set exists, the aforementioned execution entity may determine both the query result set and the graph computation result set as the task execution result set.

[0081] Here, since the execution methods for graph query statements and graph computation task requests are different, corresponding methods can be used to efficiently execute the graph computation tasks corresponding to the graph query statements and graph computation task request information, so as to obtain the corresponding query results and graph computation results, which greatly improves the execution efficiency.

[0082] In some optional implementations of certain embodiments, the execution of graph query statements in the graph query statement set and / or graph computation task request information in the graph computation task request information set to obtain a task execution result set includes:

[0083] In response to the determination that a target graph query statement exists in the above graph query statement set and a target graph computation task request information exists in the above graph computation task request information set, the following processing steps are performed:

[0084] The first sub-step involves determining that the execution result generation speed of the target graph query statement is faster than the execution result generation speed of the target graph computation task request information, and then determining the first task execution result corresponding to the target graph query statement as the task execution result corresponding to the second query information. Here, the target graph query statement and the target graph computation task request information correspond to the same second query information. The second query information can be information whose corresponding edge description information satisfies the fifth information completeness condition. The fifth information completeness condition can be that the information completeness corresponding to the edge description information is within a first interval. The first interval can be [75%-85%]. Information completeness within the first interval indicates that it is unclear whether an image query operation or an image computation operation will be performed. Therefore, for this type of second query information, under the premise of sufficient computing resources, both target graph query task information and target graph computation task information for the second query information can be generated simultaneously.

[0085] The second sub-step, in response to determining that the execution result generation speed of the aforementioned target graph query statement is slower than the execution result generation speed of the aforementioned target graph computation task request information, determines the second task execution result corresponding to the aforementioned target graph computation task request information as the task execution result corresponding to the aforementioned second query information. The execution result generation speed of the target graph query statement can be the query speed of the target graph query statement itself. The execution result generation speed of the target graph computation task request information can be the request result speed of the target graph computation task request information.

[0086] Here, by comparing the generation speed of the execution result corresponding to the target graph query statement and the generation speed of the execution result corresponding to the target graph calculation task request, the execution result with the faster generation speed can be identified as the task execution result, which can effectively ensure the generation efficiency of the execution result.

[0087] Optionally, in response to determining that the execution result generation speed corresponding to the above target graph query statement is equal to the execution result generation speed corresponding to the above target graph calculation task request information, either the second task execution result or the first task execution result is determined as the task execution result corresponding to the above second query information.

[0088] Step 205: Generate graph structure data query results for the above task execution result set.

[0089] In some embodiments, the aforementioned execution entity may generate graph structure data query results for the aforementioned task execution result set. These graph structure data query results may be query results for graph structure data required by the upper-layer system.

[0090] As an example, the aforementioned executing entity can summarize the results of each task execution in the task execution result set to generate a summary result, which can then be used as the query result for graph structure data.

[0091] The above embodiments of this disclosure have the following beneficial effects: Through the data query result generation method of some embodiments of this disclosure, the corresponding graph query task set and / or graph computation task set can be executed rationally and specifically according to the target graph structure data query requirements information, thereby improving the efficiency of graph structure data query. Specifically, the reason for the low efficiency of related graph structure data queries is that both graph query-related algorithms and graph computation-related algorithms suffer from low efficiency and high complexity in processing graph structure data. When the graph structure data query requirements are complex, there is a problem of low efficiency in the rational invocation of graph query-related algorithms and graph computation-related algorithms, resulting in a waste of a large amount of computing resources and low query efficiency. Based on this, the data query result generation method of some embodiments of this disclosure first generates a first query information set for point structures, a second query information set for edge structures, and a third query information set for path structures based on the obtained target graph structure data query requirements information. Here, the target graph structure data query requirements information is analyzed to generate query information for various structures, so as to accurately match the corresponding graph query tasks and graph computation tasks. By precisely and rationally scheduling graph query and graph computation tasks, computational resources are fully utilized, avoiding waste. Next, graph query task information sets and / or graph computation task information sets can be accurately generated for the first, second, and third query information sets mentioned above, achieving rational scheduling of graph queries and computations. Then, graph query statement sets and / or graph computation task request information sets are generated for the graph query task information sets, facilitating subsequent task execution and obtaining results. Next, the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set are executed to obtain a task execution result set. Here, the execution of the graph query statement set and / or the graph computation task request information set allows for precise and convenient generation of task execution results. Finally, graph structure data query results are generated for the task execution result set. In summary, by generating query information for different structure types based on the query requirements of the target graph structure data, the graph query and graph computation tasks can be rationally scheduled, making full use of computing resources and improving the accuracy and speed of querying graph structure data.

[0092] Further reference Figure 4 The flowchart 400 illustrates some other embodiments of the data query result generation method according to this disclosure. The data query result generation method includes the following steps:

[0093] Step 401: Based on the obtained target graph structure data query requirement information, generate a first query information set for the point structure, a second query information set for the edge structure, and a third query information set for the path structure.

[0094] Step 402: Generate graph query task information corresponding to each first query information in the first query information set mentioned above.

[0095] In some embodiments, the executing entity (e.g. Figure 1 The electronic device 101 shown can generate graph query task information corresponding to each first query information in the aforementioned first query information set. That is, for each point structure's first query information, the corresponding graph query task information is directly generated.

[0096] Step 403: For each piece of second query information in the above second query information set, perform the following first generation step:

[0097] Step 4031: Determine the edge description information corresponding to the second query information mentioned above.

[0098] In some embodiments, the executing entity may determine the edge description information corresponding to the second query information. The edge description information may be descriptive information describing the related structure of the edges in the second query information. For example, the edge description information may include, but is not limited to, at least one of the following: edge node description information, edge position description information, and edge numerical description information. Edge node description information may be descriptive information corresponding to the node group associated with the edge. Edge position description information may be descriptive information about the position of the edge in the graph. Edge numerical description information may be descriptive information about the associated numerical values ​​between the nodes in the node group corresponding to the edge.

[0099] As an example, the aforementioned execution entity can extract relevant edge structure information from the second query information to generate edge description information.

[0100] Step 4032: In response to determining that the edge description information satisfies the first information completeness condition, graph query task information for the second query information is generated.

[0101] In some embodiments, in response to determining that the edge description information satisfies the first information completeness condition, the executing entity can generate graph query task information for the second query information. The information completeness corresponding to the first information completeness condition is greater than the information completeness corresponding to the fifth information completeness condition. In practice, the information completeness corresponding to the fifth information completeness condition is [75%-85%], while the information completeness corresponding to the first information completeness condition is (85%, 100%). The first information completeness condition can characterize that the description degree of the edge description information is relatively complete. Therefore, through the graph query task, graph structure data query for the second query information can be realized.

[0102] In some optional implementations of certain embodiments, after step 4032, the steps further include:

[0103] In response to determining that the edge description information satisfies the third information completeness condition, the execution entity can generate graph computation task information for the second query information.

[0104] The information completeness level corresponding to the third information completeness condition is lower than that corresponding to the fifth information completeness condition. In practice, the information completeness level corresponding to the fifth information completeness condition is [75%-85%], while the information completeness level corresponding to the third information completeness condition is [0%, 75%]. The third information completeness condition can characterize the incompleteness of the edge description information. Therefore, through graph computation tasks, it is necessary to perform relevant graph data calculations to generate query results for the second query information.

[0105] Here, if the edge description information meets the condition of the completeness of the third information (i.e., edge query with incomplete edge description), the corresponding graph computation task can be directly generated to ensure the execution efficiency of the subsequent second query information.

[0106] In some optional implementations of certain embodiments, after step 4032, the steps further include:

[0107] In response to the determination that the aforementioned edge description information satisfies the fifth information completeness condition, the aforementioned executing entity can generate target graph computation task information and target graph query task information. Specifically, the aforementioned target graph computation task information is graph computation task information based on the aforementioned second query information, and the aforementioned target graph query task information is graph query task information based on the aforementioned second query information. The fifth information completeness condition can characterize that the descriptive degree of the edge description information is relatively vague, existing on the boundary between unclear and clear description.

[0108] Here, when the edge description information meets the fifth information completeness condition (i.e., it is close to the completeness required by the graph computation task and also close to the completeness required by the graph query task), the target graph computation task information and the target graph query task information can be generated simultaneously, so that the execution results can be obtained efficiently and quickly through subsequent execution comparison.

[0109] Step 404: For each third query information in the above third query information set, perform the following second generation step:

[0110] Step 4041: Determine the path description information corresponding to the third query information mentioned above.

[0111] In some embodiments, the executing entity may determine the path description information corresponding to the third query information. The path description information may be descriptive information describing the relevant structure of the path in the third query information. For example, the path description information may include, but is not limited to, at least one of the following: path node description information, path location description information, and path numerical description information. Edge node description information may be descriptive information corresponding to the node group associated with the edge. Path location description information may be descriptive information of the position of the path composed of multiple edges in the graph. Path numerical description information may be the edge length corresponding to multiple edges.

[0112] Step 4042: In response to determining that the above path description information meets the second information completeness condition, generate graph query task information for the above third query information.

[0113] In some embodiments, in response to determining that the path description information meets the second information completeness condition, the executing entity can generate graph query task information for the third query information. The information completeness corresponding to the second information completeness condition is greater than the information completeness corresponding to the sixth information completeness condition. In practice, the information completeness corresponding to the sixth information completeness condition is [65%-75%], while the information completeness corresponding to the second information completeness condition is (75%, 100%). The second information completeness condition can characterize that the description of the path description information is relatively complete. Therefore, through the graph query task, graph structure data query for the third query information can be realized. The sixth information completeness condition can characterize that the description of the path description information is relatively vague, falling on the boundary between unclear and clear description.

[0114] In some optional implementations of certain embodiments, after step 4042, the steps further include:

[0115] In response to determining that the path description information satisfies the fourth information completeness condition, the execution entity can generate graph computation task information for the third query information.

[0116] The fourth information completeness condition corresponds to a lower level of information completeness than the sixth condition. In practice, the information completeness for the sixth condition is typically [65%-75%], while the information completeness for the fourth condition is [0%, 65%]. The fourth condition indicates that the description of the edge information is incomplete. Therefore, graph computation tasks require computation of relevant graph data to generate query results for the third query information.

[0117] Here, if the path description information meets the fourth information completeness condition (i.e., the path description information is incomplete), the corresponding graph computation task can be directly generated to ensure the execution efficiency of the subsequent third query information. In some optional implementations of some embodiments, after step 4042, the steps further include:

[0118] In response to determining that the aforementioned path description information satisfies the sixth information completeness condition, the aforementioned executing entity can generate candidate graph computation task information and candidate graph query task information. Specifically, the aforementioned candidate graph computation task information is graph computation task information for the aforementioned third query information. The aforementioned candidate graph query task information is graph query task information for the aforementioned third query information.

[0119] Here, when the path description information meets the sixth information completeness condition (i.e., the path description information is relatively vague and is on the boundary between unclear and clear description), target graph calculation task information and target graph query task information can be generated simultaneously, so that the execution results can be obtained efficiently and quickly through subsequent execution comparison.

[0120] Step 405: Generate a graph query statement set for the graph query task information set mentioned above, and / or a graph computation task request information set for the graph computation task information set mentioned above.

[0121] Step 406: Execute the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain the task execution result set.

[0122] Step 407: Generate graph structure data query results for the above task execution result set.

[0123] In some embodiments, the specific implementation of steps 401, 405-407 and their resulting technical effects can be found in [reference needed]. Figure 2 Steps 201 and 203-205 in the corresponding embodiments will not be repeated here.

[0124] from Figure 4It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 4 In some corresponding embodiments, the data query result generation method flow 400 accurately determines which task (i.e., graph query task and graph computation task) should be used to generate the corresponding query result for the second query information by considering the edge description information of the second query information in the first generation step. Furthermore, it accurately determines which task should be used to generate the corresponding query result for the third query information by considering the edge description information of the third query information in the second generation step. Based on this, highly appropriate task information corresponding to each query information can be accurately determined.

[0125] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a data query result generation apparatus, which are similar to... Figure 2 Corresponding to the method embodiments shown, this data query result generation device can be specifically applied to various electronic devices.

[0126] like Figure 5 As shown, a data query result generation device 500 includes: a first generation unit 501, a second generation unit 502, a third generation unit 503, an execution unit 504, and a fourth generation unit 505. The first generation unit 501 is configured to generate a first query information set for a vertex structure, a second query information set for an edge structure, and a third query information set for a path structure based on the obtained target graph structure data query requirement information; the second generation unit 502 is configured to generate a graph query task information set and / or a graph computation task information set for the first, second, and third query information sets; the third generation unit 503 is configured to generate a graph query statement set for the graph query task information set and / or a graph computation task request information set for the graph computation task information set; the execution unit 504 is configured to execute the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set; and the fourth generation unit 505 is configured to generate graph structure data query results for the task execution result set.

[0127] In some optional implementations of certain embodiments, the second generation unit 502 may be further configured to: generate graph query task information corresponding to each first query information in the first query information set; for each second query information in the second query information set, perform the following first generation steps: determine the edge description information corresponding to the second query information; in response to determining that the edge description information satisfies the first information completeness condition, generate graph query task information for the second query information; for each third query information in the third query information set, perform the following second generation steps: determine the path description information corresponding to the third query information; in response to determining that the path description information satisfies the second information completeness condition, generate graph query task information for the third query information.

[0128] In some optional implementations of some embodiments, the second generation unit 502 may be further configured to: generate graph computation task information for the second query information in response to determining that the edge description information satisfies the third information completeness condition.

[0129] In some optional implementations of some embodiments, the second generation unit 502 may be further configured to: after generating graph query task information for the third query information in response to determining that the path description information satisfies the second information completeness condition, the method further includes: generating graph computation task information for the third query information in response to determining that the path description information satisfies the fourth information completeness condition.

[0130] In some optional implementations of some embodiments, the execution unit 504 may be further configured to: execute the above-mentioned graph query statement set to obtain a query result set; send the above-mentioned graph computation task request information set to the graph computation engine to obtain a graph computation result set; and determine the above-mentioned query result set and / or the above-mentioned graph computation result set as a task execution result set.

[0131] In some optional implementations of certain embodiments, the third generation unit 503 may be further configured to: in response to determining the existence of the above-mentioned graph query task information set, for each graph query task information in the above-mentioned graph query task information set, perform the following third generation step: determine the query complexity corresponding to the above-mentioned graph query task information as a first query complexity; obtain first construction tool information for the above-mentioned graph query task information based on the first query complexity and the graph structure and query conditions corresponding to the above-mentioned graph query task information; generate a graph query statement for the above-mentioned graph query task information using the construction tool corresponding to the first construction tool information; in response to determining the existence of the above-mentioned graph computation task information set, for each graph computation task information in the above-mentioned graph computation task information set, perform the following fourth generation step: determine the query complexity corresponding to the above-mentioned graph computation task information as a second query complexity; obtain second construction tool information for the above-mentioned graph computation task information based on the second query complexity, the graph structure and query conditions corresponding to the above-mentioned graph computation task information; generate graph computation task request information for the above-mentioned graph computation task information using the construction tool corresponding to the second construction tool information.

[0132] In some optional implementations of some embodiments, the second generation unit 502 may be further configured to: in response to determining that the edge description information satisfies the fifth information completeness condition, generate target graph computation task information and target graph query task information, wherein the target graph computation task information is graph computation task information for the second query information, and the target graph query task information is graph query task information for the second query information.

[0133] In some optional implementations of certain embodiments, the execution unit 504 may be further configured to: in response to determining that a target graph query statement exists in the graph query statement set and a target graph computation task request information exists in the graph computation task request information set, wherein the target graph query statement and the target graph computation task request information correspond to the same second query information, perform the following processing steps: in response to determining that the execution result generation speed corresponding to the target graph query statement is faster than the execution result generation speed corresponding to the target graph computation task request information, determine the first task execution result corresponding to the target graph query statement as the task execution result corresponding to the second query information, wherein the target graph query statement and the target graph computation task request information correspond to the same second query information; in response to determining that the execution result generation speed corresponding to the target graph query statement is slower than the execution result generation speed corresponding to the target graph computation task request information, determine the second task execution result corresponding to the target graph computation task request information as the task execution result corresponding to the second query information.

[0134] In some optional implementations of some embodiments, the second generation unit 502 may be further configured to: generate a graph query task information set and / or a graph computation task information set for the first query information set, the second query information set and the third query information set using the graph query and graph computation encapsulation interface.

[0135] It is understandable that the units recorded in the data query result generation device 500 are related to the reference. Figure 2 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the data query result generation device 500 and the units contained therein, and will not be repeated here.

[0136] The following is for reference. Figure 6 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 A schematic diagram of the structure of electronic device 101)600 in the middle. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0137] like Figure 6 As shown, the electronic device 600 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory 602 or a program loaded from a storage device 608 into a random access memory 603. The random access memory 603 also stores various programs and data required for the operation of the electronic device 600. The processing unit 601, the read-only memory 602, and the random access memory 603 are interconnected via a bus 604. An input / output interface 605 is also connected to the bus 604.

[0138] Typically, the following devices can be connected to the input / output interface 605: input devices 606 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 608 including, for example, magnetic tape, hard disk, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.

[0139] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a read-only memory 602. When the computer program is executed by the processing device 601, it performs the functions defined above in the methods of some embodiments of this disclosure.

[0140] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0141] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0142] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: generate a first query information set for a vertex structure, a second query information set for an edge structure, and a third query information set for a path structure based on the acquired target graph structure data query requirement information; generate a graph query task information set and / or a graph computation task information set for the aforementioned first query information set, the aforementioned second query information set, and the aforementioned third query information set; generate a graph query statement set for the aforementioned graph query task information set, and / or a graph computation task request information set for the aforementioned graph computation task information set; execute the graph query statements in the aforementioned graph query statement set and / or the graph computation task request information in the aforementioned graph computation task request information set to obtain a task execution result set; and generate a graph structure data query result for the aforementioned task execution result set.

[0143] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0145] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first generation unit, a second generation unit, a third generation unit, an execution unit, and a fourth generation unit. The names of these units do not necessarily limit the specific unit; for example, the fourth generation unit may also be described as "a unit that generates graph-structured data query results for the aforementioned task execution result set."

[0146] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0147] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the above-described methods for generating data query results.

[0148] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for generating data query results, comprising: Based on the obtained target graph structure data query requirements, generate a first query information set for the point structure, a second query information set for the edge structure, and a third query information set for the path structure. Generate a graph query task information set and / or a graph computation task information set for the first query information set, the second query information set, and the third query information set; Generating a set of graph query statements for the graph query task information set and / or a set of graph computation task request information for the graph computation task information set includes: in response to determining the existence of the graph query task information set, for each graph query task information in the graph query task information set, performing the following third generation step: determining the query complexity corresponding to the graph query task information as a first query complexity; obtaining first construction tool information for the graph query task information based on the first query complexity, the graph structure corresponding to the graph query task information, and the query conditions; and generating a graph query statement for the graph query task information using the construction tool corresponding to the first construction tool information. Execute the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set; Generate graph-structured data query results for the task execution result set.

2. The method according to claim 1, wherein, The generation of graph query task information sets and / or graph computation task information sets for the first query information set, the second query information set, and the third query information set includes: Generate graph query task information corresponding to each first query information in the first query information set; For each second query message in the second query information set, perform the following first generation step: Determine the edge description information corresponding to the second query information; In response to determining that the edge description information satisfies the first information completeness condition, graph query task information for the second query information is generated; For each third query information in the third query information set, perform the following second generation step: Determine the path description information corresponding to the third query information; In response to determining that the path description information meets the second information completeness condition, graph query task information for the third query information is generated.

3. The method according to claim 2, wherein, After generating graph query task information for the second query information in response to determining that the edge description information satisfies the first information completeness condition, the method further includes: In response to determining that the edge description information satisfies the third information completeness condition, graph computation task information for the second query information is generated.

4. The method according to claim 2, wherein, After generating graph query task information for the third query information in response to determining that the path description information satisfies the second information completeness condition, the method further includes: In response to determining that the path description information satisfies the fourth information completeness condition, graph computation task information for the third query information is generated.

5. The method according to claim 1, wherein, The execution of graph query statements in the graph query statement set and / or graph computation task request information in the graph computation task request information set yields a task execution result set, including: Execute the graph query statement set to obtain the query result set; The graph computation task request information set is sent to the graph computation engine to obtain the graph computation result set; The query result set and / or the graph computation result set are determined as the task execution result set.

6. The method according to claim 1, wherein, The generation of a graph query statement set for the graph query task information set and / or a graph computation task request information set for the graph computation task information set includes: In response to determining the existence of the graph computation task information set, for each graph computation task information in the graph computation task information set, the following fourth generation step is performed: The query complexity corresponding to the graph computation task information is determined as the second query complexity; Based on the second query complexity, the graph structure corresponding to the graph computation task information, and the query conditions, obtain the second construction tool information for the graph computation task information; Using the construction tool corresponding to the second construction tool information, a graph computing task request information is generated for the graph computing task information.

7. The method according to claim 2, wherein, After generating graph query task information for the second query information in response to determining that the edge description information satisfies the first information completeness condition, the method further includes: In response to determining that the edge description information satisfies the fifth information completeness condition, target graph computation task information and target graph query task information are generated, wherein the target graph computation task information is graph computation task information for the second query information, and the target graph query task information is graph query task information for the second query information.

8. The method according to claim 7, wherein, The execution of graph query statements in the graph query statement set and / or graph computation task request information in the graph computation task request information set yields a task execution result set, including: In response to determining that a target graph query statement exists in the graph query statement set and a target graph computation task request information exists in the graph computation task request information set, the following processing steps are performed: In response to determining that the execution result generation speed corresponding to the target graph query statement is faster than the execution result generation speed corresponding to the target graph computation task request information, the first task execution result corresponding to the target graph query statement is determined as the task execution result corresponding to the second query information, wherein the target graph query statement and the target graph computation task request information correspond to the same second query information; In response to determining that the execution result generation speed of the target graph query statement is slower than the execution result generation speed of the target graph computation task request information, the second task execution result corresponding to the target graph computation task request information is determined as the task execution result corresponding to the second query information.

9. The method according to claim 1, wherein, The generation of graph query task information sets and / or graph computation task information sets for the first query information set, the second query information set, and the third query information set includes: By utilizing the graph query and graph computation encapsulation interface, a graph query task information set and / or a graph computation task information set are generated for the first query information set, the second query information set, and the third query information set.

10. A data query result generation device, comprising: The first generation unit is configured to generate a first query information set for the point structure, a second query information set for the edge structure, and a third query information set for the path structure based on the query requirement information obtained from the target graph structure data. The second generation unit is configured to generate a graph query task information set and / or a graph computation task information set for the first query information set, the second query information set, and the third query information set; The third generation unit is configured to generate a set of graph query statements for the graph query task information set and / or a set of graph computation task request information for the graph computation task information set, including: in response to determining that the graph query task information set exists, for each graph query task information in the graph query task information set, performing the following third generation steps: determining the query complexity corresponding to the graph query task information as a first query complexity; obtaining first construction tool information for the graph query task information based on the first query complexity, the graph structure corresponding to the graph query task information, and the query conditions; and generating a graph query statement for the graph query task information using the construction tool corresponding to the first construction tool information. The execution unit is configured to execute the graph query statements in the graph query statement set and / or the graph computation task request information in the graph computation task request information set to obtain a task execution result set; The fourth generation unit is configured to generate graph-structured data query results for the task execution result set.

11. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-9.

12. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-9.

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

Citation Information

Patent Citations

  • Data query method, system and equipment based on knowledge graph and storage medium

    CN116414878A

  • Building appearance effect picture rendering method and device based on three-dimensional picture and medium

    CN118154802A