Method and device for enhancing graph computing power of graph database, equipment and medium
By segmenting and converting the graph datasets in the graph database, using the partitioning strategy and column storage format of the graph computing system, the problem of insufficient graph computing power is solved, and efficient graph computing power reuse and performance improvement is achieved.
Patent Information
- Application Number
- CN202510625483.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-08-05
AI Technical Summary
Existing graph databases have weak graph computing capabilities, or rely on integrated external graph computing systems to be cumbersome and inefficient, making it difficult to meet the efficient graph computing needs of complex scenarios.
When receiving the graph calculation request, determine the pending graph data set and graph algorithm information, divide the graph data set into multiple subsets according to the partitioning strategy of the graph computing system, and convert it into column storage format, and then transmit the subset and algorithm information to the graph computing system for calculation to obtain the final result.
The graph computing power reuse of the graph computing power of the graph database in the graph computing system is realized, the computing efficiency is improved, the integration steps are simplified, the graph computing ease of the graph database is enhanced, and the performance of graph computing is significantly improved.
Smart Images

Figure CN120429474A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of graph data computing technology, and in particular to a method, device, equipment and medium for enhancing the graph computing capabilities of a graph database. Background Art
[0002] Due to the historical development of graph technology, graph data access and graph computing technologies have evolved in parallel as relatively independent branches, each developing into independently operating systems, each playing an important role in different scenarios. Graph databases focus on graph data access, including necessary additions, deletions, and modifications, as well as query operations, and have relatively weak computing capabilities. Graph computing systems, on the other hand, focus on graph data computation, including complex queries and calculations based on various graph algorithms. However, graph data storage capabilities are relatively weak, and most graph computing systems lack graph data persistence capabilities.
[0003] In recent years, the increasing complexity of graph-based scenarios has placed high demands on the comprehensive capabilities of graph-related systems. The goal is for a system to provide both graph data storage and access, as well as graph computing capabilities for graph analysis. Therefore, there are two common implementation technologies: the first is to develop based on a graph database system, implementing a graph computing framework and various graph algorithms. The second is to integrate existing graph computing systems into graph databases. Figure 1 A schematic diagram of integrating an existing graph computing system into a graph database in the prior art.
[0004] However, the first implementation requires developing graph computing capabilities within the graph database, which is a massive undertaking and highly challenging. The second implementation also takes a long time to export the graph database to a file, especially when the data volume exceeds tens of millions, where the export time is measured in minutes. This directly results in excessively long graph computing times, making it unusable in some time-sensitive scenarios. Summary of the Invention
[0005] The present invention provides a method, apparatus, device and medium for enhancing the graph computing capability of a graph database, so as to realize the reuse of the graph computing capability of the graph database to the graph computing system, thereby improving the efficiency of graph computing.
[0006] According to one aspect of the present invention, a method for enhancing graph computing capabilities of a graph database is provided, the method comprising:
[0007] Upon receiving a graph computing request, determining a to-be-processed graph dataset and graph algorithm information corresponding to the graph computing request;
[0008] According to the partitioning strategy configuration of the graph computing system, the graph data set to be processed is divided into at least two graph data subsets; wherein the number of graph data subsets corresponds to the number of nodes in the graph computing system;
[0009] At least two graph data subsets and graph algorithm information are transmitted to a graph computing system, and after the graph computing system performs graph computing on the graph data subsets according to the graph algorithm information to obtain graph computing results, a graph computing result is obtained.
[0010] According to another aspect of the present invention, a device for enhancing graph computing capabilities of a graph database is provided, the method comprising:
[0011] A graph computing request parsing module is used to determine the to-be-processed graph dataset and graph algorithm information corresponding to the graph computing request upon receiving the graph computing request;
[0012] A graph data set segmentation module is used to segment the graph data set to be processed into at least two graph data subsets according to the partitioning strategy configuration of the graph computing system; wherein the number of graph data subsets corresponds to the number of nodes in the graph computing system;
[0013] The graph computing result acquisition module is used to transmit at least two graph data subsets and graph algorithm information to the graph computing system, and obtain the graph computing result after the graph computing system performs graph computing on the graph data subset according to the graph algorithm information to obtain the graph computing result.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising:
[0015] at least one processor;
[0016] and a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for enhancing the graph computing capability of the graph database as described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for enhancing the graph computing capability of a graph database as described in any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention is to determine the graph data set and graph algorithm information to be processed corresponding to the graph computing request when a graph computing request is received; divide the graph data set to be processed into at least two graph data subsets according to the partitioning strategy configuration of the graph computing system; transmit the at least two graph data subsets and the graph algorithm information to the graph computing system, and obtain the graph computing results after the graph computing system performs graph computing on the graph data subsets according to the graph algorithm information. The technical solution of the embodiment of the present invention solves the technical problems that the current graph database itself has weak or no graph computing capabilities, and that the integration steps are cumbersome and inefficient when relying on the integration of an external graph computing system to obtain graph computing capabilities. The graph data set to be processed is divided according to the partitioning strategy of the graph computing system, and is converted from row storage to column storage that is convenient for the graph computing system to calculate, thereby realizing the reuse of the graph computing capabilities of the graph computing system by the graph database and improving the efficiency of graph computing.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of integrating an existing graph computing system into a graph database in the prior art;
[0023] Figure 2 A flowchart of a method for enhancing graph computing capabilities of a graph database provided by an embodiment of the present invention;
[0024] Figure 3 A flowchart of another method for enhancing graph database graph computing capabilities provided by an embodiment of the present invention;
[0025] Figure 4 An architectural diagram of a system for enhancing graph database graph computing capabilities provided by an embodiment of the present invention;
[0026] Figure 5 A schematic diagram of a network transmitter according to an embodiment of the present invention transmitting a sub-data set to a graph computing system;
[0027] Figure 6 A timing diagram of the graph database and graph computing system provided by an embodiment of the present invention performing graph computing;
[0028] Figure 7 A schematic diagram of the structure of a device for enhancing graph database graph computing capabilities provided by an embodiment of the present invention;
[0029] Figure 8 A structural diagram of an electronic device for implementing the method for enhancing the graph computing capability of a graph database according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Figure 2 This is a flowchart of a method for enhancing the graph computing capability of a graph database provided by an embodiment of the present invention. This embodiment is applicable to situations where the graph computing capability of a graph database is enhanced in complex graph computing scenarios. The method can be executed by a device for enhancing the graph computing capability of a graph database. The device can be implemented in the form of hardware and / or software and can be configured in a graph database system. Figure 2 As shown, the method specifically includes the following steps:
[0033] S110. When a graph computing request is received, determine the graph data set to be processed and graph algorithm information corresponding to the graph computing request.
[0034] A graph computation request originates from a user or other application and may request the execution of a specific graph computation task on a graph dataset in a graph database. A pending graph dataset refers to a graph dataset stored in the graph database, i.e., the graph dataset that needs to be analyzed and processed. Graph algorithm information refers to information related to the graph algorithm used to analyze and process the pending dataset, such as the type of graph algorithm.
[0035] Specifically, when a graph computing request is received, in order to execute the graph computing task corresponding to the graph computing request, it is necessary to determine the data set to be processed and the graph algorithm information corresponding to the graph computing request, that is, to determine which part of the data set in the graph database needs to be executed on which graph algorithm.
[0036] In some embodiments, determining the graph data set to be processed and graph algorithm information corresponding to the graph computing request includes: parsing the graph computing request to determine the graph data set identifier, graph algorithm name and graph algorithm parameters corresponding to the graph computing request; querying the data set to be processed based on the graph data set identifier, and using the graph algorithm name and graph algorithm parameters as graph algorithm information.
[0037] The graph dataset identifier uniquely identifies the graph dataset to be processed. For example, it can be a name, ID, or other identifier. The graph algorithm name refers to the name of the specific graph algorithm to be used, such as the shortest path algorithm or community detection algorithm. Graph algorithm parameters refer to configuration parameters related to the graph algorithm. Graph algorithm parameters affect the execution and results of the algorithm, such as the algorithm's accuracy and number of iterations.
[0038] Specifically, when a graph computation request is received, it can be parsed to extract key information from the request, such as the graph dataset identifier, graph algorithm name, and graph algorithm parameters. Furthermore, the parsed graph dataset identifier is used to search and locate the specific graph dataset to be processed in the graph database storage system. Furthermore, the parsed graph algorithm name and graph algorithm parameters are combined to form graph algorithm information for subsequent graph computation processes.
[0039] In some embodiments, after obtaining the to-be-processed dataset based on the graph dataset identifier query, the method further includes: converting the storage format of the to-be-processed graph dataset from row storage to column storage.
[0040] Understandably, graph database in-memory data structures are typically designed based on row-based storage, which facilitates data updates but hinders efficient in-memory computing. However, column-based data structures offer more compact memory and more efficient computing, and are commonly used in graph computing systems. For example, Apache Arrow, an open-source columnar in-memory data format, is an example.
[0041] In this embodiment, the row-stored data in the graph database can be converted into column-stored data suitable for use by the graph computing system. This means that the storage format of the graph dataset to be processed is converted from row-store to column-store. This has the beneficial effect of accelerating data access, more efficiently executing graph algorithms, and improving response speed and computational efficiency.
[0042] S120. According to the partitioning strategy configuration of the graph computing system, the graph data set to be processed is divided into at least two graph data subsets.
[0043] Among them, the partition strategy configuration is the rule or method used to determine how to divide the graph data set to be processed into different subsets. The number of graph data subsets corresponds to the number of nodes in the graph computing system.
[0044] It should be understood that the graph dataset to be processed refers to a large-scale graph dataset that needs to be processed by the graph computing system. Based on the partitioning strategy configuration, the graph dataset to be processed can be divided into at least two smaller subsets. Each subset contains a portion of the graph dataset to be processed. The total number of graph data subsets after division is consistent with the number of nodes in the graph computing system. The nodes of the graph computing system refer to the available computing nodes in the graph computing system, such as processors and servers.
[0045] After segmentation, each compute node is responsible for processing one or more subsets of the graph data during graph computation. This beneficial effect is that by assigning graph data subsets to compute nodes, computing tasks can be evenly distributed, preventing overloading of some nodes while others remain idle. Each compute node can independently process its assigned subset of the graph data, enabling parallel computing and improving overall computation speed.
[0046] S130. Transmit at least two graph data subsets and graph algorithm information to a graph computing system, and after the graph computing system performs graph computing on the graph data subsets according to the graph algorithm information to obtain graph computing results, obtain graph computing results.
[0047] Among them, the graph computing system is a computing system specifically used to process and analyze graph data. By running graph algorithms, the graph computing system can perform complex calculations and analyses on large-scale graph data.
[0048] In an embodiment of the present invention, a communication connection is established between a graph database and a graph computing system, so that a subset of graph data is transmitted to the graph computing system for subsequent computing operations, and graph algorithm information is also transmitted at the same time.
[0049] In the graph computing system, based on the transmitted graph algorithm information, corresponding graph computing operations are performed on each subset of graph data. For example, typical graph algorithm operations such as graph traversal, shortest path calculation, and community detection are performed. After the graph computing system completes the calculation, the graph computing results are obtained. The graph database can actively obtain the graph computing results or passively receive the graph computing results sent by the graph computing system.
[0050] The technical solution of the embodiment of the present invention is to determine the graph data set and graph algorithm information to be processed corresponding to the graph computing request when a graph computing request is received; split the graph data set to be processed into at least two graph data subsets according to the partitioning strategy configuration of the graph computing system; transmit the at least two graph data subsets and the graph algorithm information to the graph computing system, and obtain the graph computing results after the graph computing system performs graph computing on the graph data subsets according to the graph algorithm information. The technical solution of the embodiment of the present invention solves the technical problems that the current graph database itself has weak or no graph computing capabilities, and relies on the integration of an external graph computing system to obtain graph computing capabilities, resulting in cumbersome integration steps and low efficiency. The graph data set to be processed is split according to the partitioning strategy of the graph computing system, and is converted from row storage to column storage that is easy for the graph computing system to calculate. This not only enables the graph database to reuse the graph computing capabilities of the graph computing system, but also improves the efficiency of graph computing.
[0051] Figure 3 This is a flowchart of another method for enhancing the graph computing capability of a graph database provided by an embodiment of the present invention. Based on the above embodiment, this embodiment can also transmit graph data subsets in parallel to each node of the graph computing system through a network transmitter. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 3 As shown, the method specifically includes the following steps:
[0052] S210. When a graph computing request is received, determine the graph data set to be processed and graph algorithm information corresponding to the graph computing request.
[0053] S220. According to the partitioning strategy configuration of the graph computing system, the graph data set to be processed is divided into at least two graph data subsets whose number is the same as the number of nodes in the graph computing system.
[0054] The partitioning strategy configuration includes the hash partitioning strategy configuration.
[0055] For example, consider a large graph dataset containing 100 million nodes and a graph computing system with 100 compute nodes. The graph database can use a hash partitioning strategy and configure the hash function to perform a modulo-100 operation based on the node ID (i.e., the node ID modulo 100). This way, each node is mapped to a hash bucket (i.e., partition) between 0 and 99. The graph database then partitions the graph dataset into 100 subsets based on the number of hash buckets (100) and assigns each subset to a compute node for processing.
[0056] S230. Transmit each graph data subset in parallel to each node of the graph computing system through a network transmitter.
[0057] Among them, the transmission protocol of the network transmitter is a zero-serialization transmission protocol. Zero serialization means that there is no need to perform serialization and deserialization operations on the data during the transmission process, which can improve transmission efficiency.
[0058] Specifically, each graph data subset in the graph database can be transmitted to each node of the graph computing system via a network transmitter. Since the number of graph data subsets and nodes is the same, the graph data subsets can be transmitted in parallel to their corresponding nodes, with each graph data subset corresponding to a single node. This parallel transmission method significantly improves data transmission efficiency, allowing multiple transmission tasks to proceed simultaneously rather than sequentially.
[0059] In the traditional data transmission process, it is usually necessary to serialize the data to be transmitted into a format suitable for network transmission in the graph database, and then deserialize it into the original data structure in the graph computing system. This process consumes computing resources and time.
[0060] In an embodiment of the present invention, by using Apache Arrow Flight technology, the original memory format of the data, such as the Arrow format, can be maintained during the transmission process, thereby eliminating the serialization and deserialization steps. Among them, Apache ArrowFlight technology is a high-performance remote procedure call (RPC) framework based on Apache Arrow and gRPC, which aims to provide efficient data transmission and processing services. In this way, not only can the computing overhead be reduced, but also the transmission speed can be increased, because the data can be copied and transmitted directly in the memory without the need for format conversion. At the same time, there is no need to export the data from the graph database and then load it into the graph computing system as in traditional technologies. The present invention can cope with some graph computing tasks with high timeliness requirements.
[0061] It should also be noted that after traditional graph data is transmitted to the graph computing system, the graph computing system usually needs to perform shuffle. Shuffle refers to the redistribution and exchange of graph data between different nodes during the calculation process. In the embodiment of the present invention, when the graph database divides the graph data set to be processed, the data has been distributed according to the partitioning strategy of the graph computing system. When the graph data subset data is transmitted to the graph computing system, each node already has all the data it needs to process. Therefore, during the calculation process of the graph computing system, there is no need to shuffle data between nodes, which can significantly reduce the communication overhead in the calculation process and improve the calculation efficiency.
[0062] S240. After the graph computing system performs graph computing on the graph data subset according to the graph algorithm information to obtain the graph computing result, obtain the graph computing result.
[0063] In some embodiments, the graph computing system performs graph computing on a subset of graph data according to graph algorithm information to obtain a graph computing result, including: for each node in the graph computing system, performing graph computing on the received subset of graph data based on the node according to the graph algorithm information to obtain a graph computing sub-result; and generating a graph computing result based on each graph computing sub-result.
[0064] Specifically, each node independently executes a graph computation task using the graph data subset and graph algorithm information it receives. After completing its assigned graph computation task, it generates one or more graph computation sub-results. After all nodes have completed their graph computation tasks and generated sub-results, the graph computation system collects these sub-results and further integrates or aggregates them to generate a global graph computation result.
[0065] The technical solution of the embodiments of the present invention, upon receiving a graph computation request, determines a pending graph dataset and graph algorithm information corresponding to the graph computation request; partitions the pending graph dataset into at least two graph data subsets equal in number to the number of nodes in the graph computation system according to the partitioning strategy configuration of the graph computation system; transmits each graph data subset in parallel to each node of the graph computation system via a network transmitter; and obtains the graph computation results after the graph computation system performs graph computation on the graph data subsets according to the graph algorithm information. The technical solution of the embodiments of the present invention addresses the technical issues of weak or no graph computation capabilities inherent in current graph databases, as well as the cumbersome and inefficient integration process when integrating with external graph computation systems to obtain graph computation capabilities. This allows the graph database to directly reuse the graph computation capabilities of the graph computation system, eliminating the extensive work of repeatedly developing graph computation capabilities within the graph database. Furthermore, it simplifies the steps for transferring graph data from the graph database to the graph computation system, enhancing the usability of graph computation within the graph database. Furthermore, through clever partition alignment and network transmission mechanisms, the performance of graph computation is significantly improved compared to integration methods that rely on exporting offline files from the database and then importing them into the graph computation system.
[0066] Figure 4 This is an architecture diagram of a system for enhancing graph database graph computing capabilities provided by an embodiment of the present invention. Figure 4 As shown in the figure, when a user initiates a graph computing task request, the request typically includes two parts: the dataset used for the graph computation and the graph computation algorithm and parameters. The dataset is retrieved from the storage layer via the graph database's query layer. The in-memory data is converted into a columnar structure via a memory structure converter. The data partitioner then partitions the resulting dataset into multiple subsets based on the graph computing system's distributed partitioning strategy configured in the partitioning strategy. These subsets are then transmitted to the various nodes of the graph computing system via a network transport. After receiving the data, the graph computing system executes the graph computation based on the graph algorithm and parameters specified in the user's request and returns the results.
[0067] The memory structure converter is responsible for converting row-based data in graph databases into column-based data suitable for use in graph computing systems. Graph database memory data structures are typically designed based on row-based storage, which facilitates data updates but hinders efficient in-memory computing. Column-based data structures, on the other hand, offer more compact memory and more efficient computing. They are commonly used by graph computing systems, such as Apache Arrow, a popular open-source in-memory columnar structure specification.
[0068] The data splitter is responsible for splitting the total dataset obtained from a graph database query into multiple subsets. The number of subsets typically matches the number of worker nodes in the distributed graph computing system. Its purpose is to enable each worker node in the graph computing system to retrieve its required subsets from the graph database in parallel, improving data transmission efficiency and eliminating the need for data shuffling between worker nodes within the graph computing system.
[0069] The partitioning logic requires reading the value of the "Partition Strategy Configuration" configuration item. This value typically depends on the distributed graph computing system's partitioning strategy and must be consistent with it. For example, if the graph computing system's partitioning strategy is Hashpartition, which determines the partition number by taking the hash value of the vertex ID modulo the total number of worker nodes, the data splitter must also follow this strategy when splitting the dataset, ultimately generating a sub-dataset with the same number of worker nodes, and with data that meets the partitioning strategy requirements.
[0070] The network transporter is responsible for efficiently transmitting sub-datasets to the graph computing system. Figure 5 A schematic diagram of a network transmitter according to an embodiment of the present invention transmitting a sub-data set to a graph computing system.
[0071] Figure 6 A timing diagram of a graph database and a graph computing system performing graph computing provided by an embodiment of the present invention. This embodiment of the present invention may include the following steps:
[0072] S1. The user sends a query and graph computation request.
[0073] S2. Coordinating controller analyzes the request: The coordinating controller analyzes the request and executes the query request first.
[0074] S3. Query execution: The storage + calculation + query compilation modules execute the query and return the total query result data set.
[0075] S4, the coordination controller receives the query completion notification and forwards the total data set to the memory structure converter;
[0076] S5. The memory structure converter sends the converted total data set to the data segmentation module.
[0077] S6. The data segmentation module reads the partitioning strategy configuration, segments the data, notifies the coordination controller after completion, and stores the data.
[0078] S7. The coordination controller notifies each working node of the graph computing system to obtain data.
[0079] S8. Each working node sends a network request through the network transmission module to obtain the corresponding sub-dataset.
[0080] S9. After receiving all sub-datasets, perform graph calculation and return the graph calculation results.
[0081] S10. The coordination controller receives the graph calculation result and returns it to the user, who then obtains the graph calculation result.
[0082] Figure 7 A schematic diagram of the structure of a device for enhancing graph database graph computing capabilities provided by an embodiment of the present invention. Figure 7 As shown, the device includes:
[0083] The graph computing request parsing module 310 is configured to determine the graph dataset to be processed and the graph algorithm information corresponding to the graph computing request upon receiving the graph computing request;
[0084] A graph data set partitioning module 320 is configured to partition the graph data set to be processed into at least two graph data subsets according to the partitioning strategy configuration of the graph computing system; wherein the number of graph data subsets corresponds to the number of nodes in the graph computing system;
[0085] The graph computing result acquisition module 330 is used to transmit at least two graph data subsets and graph algorithm information to the graph computing system, and obtain the graph computing result after the graph computing system performs graph computing on the graph data subset according to the graph algorithm information to obtain the graph computing result.
[0086] In some embodiments, the graph computation request parsing module 310 is specifically configured to:
[0087] Parse the graph computing request to determine the graph dataset identifier, graph algorithm name, and graph algorithm parameters corresponding to the graph computing request;
[0088] The dataset to be processed is queried based on the graph dataset identifier, and the graph algorithm name and graph algorithm parameters are used as graph algorithm information.
[0089] In some embodiments, the apparatus for enhancing graph database graph computing capabilities further includes:
[0090] The storage format conversion module is used to convert the storage format of the graph dataset to be processed from row storage to column storage after obtaining the dataset to be processed based on the graph dataset identifier query.
[0091] In some embodiments, the graph dataset segmentation module 320 includes:
[0092] The graph data set splitting submodule is used to split the graph data set to be processed into at least two graph data subsets with the same number of nodes in the graph computing system according to the partitioning strategy configuration of the graph computing system.
[0093] In some embodiments, the partitioning strategy configuration includes a hash partitioning strategy configuration.
[0094] In some embodiments, the graph calculation result acquisition module 330 further includes:
[0095] A transmission submodule, configured to transmit each graph data subset in parallel to each node of the graph computing system via a network transmitter;
[0096] The transmission protocol of the network transmitter is a zero-serialization transmission protocol.
[0097] In some embodiments, the graph computing system performs graph computing on the graph data subset according to the graph algorithm information to obtain a graph computing result, including:
[0098] For each node in the graph computing system, according to the graph algorithm information, the graph computing is performed on the received graph data subset based on the node to obtain the graph computing sub-result;
[0099] Generate graph calculation results based on each graph calculation sub-result.
[0100] The device for enhancing the graph computing capability of a graph database provided by an embodiment of the present invention can execute the method for enhancing the graph computing capability of a graph database provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0101] Figure 8 A schematic structural diagram of an electronic device for implementing the method of enhancing graph database graph computing capabilities of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0102] like Figure 8As shown, electronic device 10 includes at least one processor 11 and memory, such as read-only memory (ROM) 12 and random access memory (RAM) 13, communicatively connected to at least one processor 11. The memory stores computer programs executable by the at least one processor. Processor 11 can perform various appropriate actions and processes based on the computer programs stored in ROM 12 or loaded from storage unit 18 into RAM 13. RAM 13 can also store various programs and data required for the operation of electronic device 10. Processor 11, ROM 12, and RAM 13 are interconnected via bus 14. An input / output (I / O) interface 15 is also connected to bus 14.
[0103] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0104] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the method for enhancing graph database graph computing capabilities.
[0105] In some embodiments, the method for enhancing the graph database graph computing capability may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for enhancing the graph database graph computing capability described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for enhancing the graph database graph computing capability in any other appropriate manner (for example, by means of firmware).
[0106] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0108] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or apparatus. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device that has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0111] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0112] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0113] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for enhancing graph computing capabilities of a graph database, characterized in that: include: Upon receiving a graph computing request, determining a graph dataset to be processed and graph algorithm information corresponding to the graph computing request; According to the partitioning strategy configuration of the graph computing system, the graph data set to be processed is divided into at least two graph data subsets; wherein the number of the graph data subsets corresponds to the number of nodes in the graph computing system; At least two of the graph data subsets and the graph algorithm information are transmitted to the graph computing system, and after the graph computing system performs graph computing on the graph data subsets according to the graph algorithm information to obtain a graph computing result, the graph computing result is obtained.
2. The method according to claim 1, characterized in that The determining of the to-be-processed graph dataset and graph algorithm information corresponding to the graph computing request includes: Parsing the graph computing request to determine a graph dataset identifier, a graph algorithm name, and graph algorithm parameters corresponding to the graph computing request; The to-be-processed data set is queried based on the graph data set identifier, and the graph algorithm name and the graph algorithm parameters are used as the graph algorithm information.
3. The method according to claim 2, characterized in that After obtaining the dataset to be processed based on the query of the graph dataset identifier, the method further includes: The storage format of the graph dataset to be processed is converted from row storage to column storage.
4. The method according to claim 1, wherein The step of dividing the to-be-processed graph data set into at least two graph data subsets according to the partitioning strategy configuration of the graph computing system includes: According to the partitioning strategy configuration of the graph computing system, the graph data set to be processed is divided into at least two graph data subsets whose number is the same as the number of nodes in the graph computing system.
5. The method according to claim 4, characterized in that The partitioning strategy configuration includes a hash partitioning strategy configuration.
6. The method according to claim 1, characterized in that The transmitting at least two of the graph data subsets and the graph algorithm information to the graph computing system includes: Transmitting each of the graph data subsets in parallel to each node of the graph computing system via a network transmitter; Wherein, the transmission protocol of the network transmitter is a zero serialization transmission protocol.
7. The method according to claim 6, characterized in that The graph computing system performs graph computing on the graph data subset according to the graph algorithm information to obtain a graph computing result, including: For each node in the graph computing system, performing graph computing on the received graph data subset based on the node according to the graph algorithm information to obtain a graph computing sub-result; The graph calculation result is generated based on each of the graph calculation sub-results.
8. A device for enhancing graph database graph computing capabilities, characterized in that: include: A graph computing request parsing module is configured to, upon receiving a graph computing request, determine a to-be-processed graph dataset and graph algorithm information corresponding to the graph computing request; A graph data set segmentation module, configured to segment the to-be-processed graph data set into at least two graph data subsets according to a partitioning strategy configuration of the graph computing system; wherein the number of the graph data subsets corresponds to the number of nodes of the graph computing system; A graph calculation result acquisition module is used to transmit at least two of the graph data subsets and the graph algorithm information to the graph calculation system, and obtain the graph calculation result after the graph calculation system performs graph calculation on the graph data subset according to the graph algorithm information to obtain the graph calculation result.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method for enhancing the graph computing capability of a graph database according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for enhancing the graph computing capability of a graph database according to any one of claims 1 to 7 when executed.