Graph data storage method and device, equipment, medium and program product

By converting knowledge graph data in financial business systems into vectors and storing them in a vector database, the accuracy problem of cross-graph fusion queries is solved, achieving more efficient data analysis and more accurate query results.

CN121722753APending Publication Date: 2026-03-24INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511874431.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In financial business systems, cross-graph fusion queries suffer from poor accuracy due to differences in graph structure and entity attribute value representations among multiple knowledge graphs.

Method used

The graph data of multiple knowledge graphs are stored in a graph database, converted into vectors, and stored in a vector database. The coordinates are obtained as vector values ​​of the graph data through the mapping relationship in the vector database and stored in the graph database. The vector similarity is used to perform hierarchical extended queries.

Benefits of technology

It improves the accuracy and efficiency of cross-graph fusion query results and enhances the data analysis capabilities of financial business systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121722753A_ABST
    Figure CN121722753A_ABST
Patent Text Reader

Abstract

The invention discloses a graph data storage method and device, equipment, a medium and a program product. The graph data storage method comprises the steps of storing graph data corresponding to a plurality of knowledge graphs into a graph database; converting each piece of graph data in the graph database into a vector, and storing the vector corresponding to each piece of graph data into a vector database; obtaining coordinates of each vector in the vector database, and taking the coordinates as vector values corresponding to the graph data according to a mapping relation between each vector in the vector database and the graph data; and storing the vector value corresponding to each graph data into the graph database. According to the technical scheme, the accuracy of the cross-graph fusion query result can be improved, and conditions are provided for a data analysis scene in a financial service system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data technology, applicable to financial business scenarios, and particularly to a method, apparatus, device, medium, and program product for storing graph data. Background Technology

[0002] Currently, in the field of big data analytics, graph databases are commonly used to store knowledge graph data. However, for financial business systems, a single knowledge graph cannot support graph data with tens of billions of nodes and edges. Therefore, multiple knowledge graphs are needed to store business data according to specific business scenarios.

[0003] In existing technologies, when users perform cross-graph fusion queries on multiple knowledge graphs, the differences in graph structure between the multiple knowledge graphs (e.g., the entity attribute name in knowledge graph A is "name" and the entity attribute name in knowledge graph B is "name"), and the different knowledge graphs may also have different expressions for entity attribute values ​​(e.g., the attribute value for the attribute name "address" in knowledge graph A is "XX" and the attribute value for the attribute name "address" in knowledge graph B is "XX city"), make it difficult to match entities between the two graphs during cross-graph fusion queries, resulting in poor accuracy of the query results. Summary of the Invention

[0004] This invention provides a method, apparatus, device, medium, and program product for storing graph data, which can improve the accuracy of cross-graph fusion query results and provide conditions for data analysis scenarios in financial business systems.

[0005] According to one aspect of the present invention, a method for storing graph data is provided, the method comprising:

[0006] Store the graph data corresponding to multiple knowledge graphs into a graph database;

[0007] Each graph data in the graph database is converted into a vector, and the vector corresponding to each graph data is stored in the vector database;

[0008] Obtain the coordinates of each vector in the vector database, and use the coordinates as the vector values ​​corresponding to the graph data according to the mapping relationship between each vector in the vector database and the graph data;

[0009] The vector value corresponding to each graph data is stored in the graph database.

[0010] According to another aspect of the present invention, a storage device for graph data is provided, the device comprising:

[0011] The graph database storage module is used to store the graph data corresponding to multiple knowledge graphs into the graph database.

[0012] The vector database storage module is used to convert each graph data in the graph database into a vector, and store the vector corresponding to each graph data into the vector database;

[0013] The vector value determination module is used to obtain the coordinates of each vector in the vector database and, based on the mapping relationship between each vector in the vector database and the graph data, use the coordinates as the vector value corresponding to the graph data.

[0014] The vector value storage module is used to store the vector value corresponding to each graph data into the graph database.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the graph data storage method according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the graph data storage method according to any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the graph data storage method described in any embodiment of the present invention.

[0021] The technical solution provided by this invention stores graph data corresponding to multiple knowledge graphs in a graph database, converts each graph data in the graph database into a vector, stores the vector corresponding to each graph data in a vector database, obtains the coordinates of each vector in the vector database, and uses the coordinates as the vector value corresponding to the graph data according to the mapping relationship between each vector in the vector database and the graph data. This technique of storing the vector value corresponding to each graph data in the graph database can improve the accuracy of cross-graph fusion query results and provide conditions for data analysis scenarios in financial business systems.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart of a graph data storage method provided by an embodiment of the present invention;

[0025] Figure 2 This is a flowchart of another method for storing graph data according to an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of the structure of a graph data storage device according to an embodiment of the present invention;

[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the graph data storage method of the present invention. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] Figure 1 This is a flowchart illustrating a method for storing graph data according to an embodiment of the present invention. This embodiment is applicable to storing graph data of knowledge graphs in financial business systems. The method can be executed by a graph data storage device, which can be implemented in hardware and / or software and configured in the financial business system of an electronic device, such as... Figure 1 As shown, the method includes:

[0031] Step 110: Store the graph data corresponding to the multiple knowledge graphs into the graph database.

[0032] In this embodiment, a knowledge graph, also known as a knowledge domain visualization or knowledge domain mapping map, is a series of different graphs that display the development process and structural relationships of knowledge. It uses visualization technology to describe knowledge resources and their carriers, mining, analyzing, constructing, drawing, and displaying knowledge and their interrelationships. The database that carries the knowledge graph is called a graph database. Optionally, taking a financial business system as an example, the multiple knowledge graphs may include a registered user graph and business graphs under different registered users.

[0033] In one specific embodiment, the graph database is used to store graph data, including graph structure, entity, and relation data. Compared to traditional graph databases, all graph data stored in the graph database provided in this embodiment carries a hidden, indexed "vector value" attribute, which records the vector coordinates corresponding to the graph data in the vector database.

[0034] Step 120: Convert each graph data in the graph database into a vector, and store the vector corresponding to each graph data into a vector database.

[0035] In this embodiment, optionally, while storing graph data in a graph database, a graph neural network can also be used to embed each graph data into a low-dimensional vector representation, and the vector corresponding to each graph data can be stored in a vector database. Since the vectorized graph data retains less information, a single vector database can support hundreds of billions of data points, thus enabling the projection of graph data from all scenes in the graph database onto the same vector database.

[0036] The advantage of this setup is that by vectorizing the graph data, key topological information of the graph data can be preserved, making it easier to query the subgraphs associated with the graph data in the future.

[0037] Step 130: Obtain the coordinates of each vector in the vector database, and use the coordinates as the vector values ​​corresponding to the graph data according to the mapping relationship between each vector in the vector database and the graph data.

[0038] In this embodiment, the coordinates of a vector can be a specific numerical combination of the vector in a multidimensional space.

[0039] Step 140: Store the vector value corresponding to each graph data into the graph database.

[0040] In this embodiment, after storing the knowledge graph data in the financial business system using the above method, it can respond to data processing requests triggered by users through graph service nodes, such as data addition requests, data modification requests, data deletion requests, and data query requests, and use the graph database and vector database together to process the user-triggered requests.

[0041] Compared to existing cross-graph fusion query methods, this embodiment introduces middleware (i.e., a vector database) to extract and store key feature information of entities in each knowledge graph. Even if the entity information between multiple knowledge graphs does not match, graph data with similar meanings can be queried through the key feature information in the vector database, thereby improving the accuracy of cross-graph fusion query results.

[0042] The technical solution provided by this invention stores graph data corresponding to multiple knowledge graphs in a graph database, converts each graph data in the graph database into a vector, stores the vector corresponding to each graph data in a vector database, obtains the coordinates of each vector in the vector database, and uses the coordinates as the vector value corresponding to the graph data according to the mapping relationship between each vector in the vector database and the graph data. This technique of storing the vector value corresponding to each graph data in the graph database can improve the accuracy of cross-graph fusion query results and provide conditions for data analysis scenarios in financial business systems.

[0043] Figure 2 A flowchart of another method for storing graph data provided in an embodiment of the present invention is shown below. Figure 2 As shown, the method includes:

[0044] Step 210: Store the graph data corresponding to the multiple knowledge graphs into the graph database.

[0045] Step 220: Convert each graph data in the graph database into a vector, and store the vector corresponding to each graph data into a vector database.

[0046] Step 230: Obtain the coordinates of each vector in the vector database, and use the coordinates as the vector values ​​corresponding to the graph data according to the mapping relationship between each vector in the vector database and the graph data.

[0047] Step 240: Store the vector value corresponding to each graph data into the graph database.

[0048] Step 250: In response to a user-triggered data query request, locate the starting entity in the graph database according to the data query request, and obtain the vector value corresponding to the starting entity.

[0049] In this embodiment, optionally, the data query request may include a specific entity attribute name. After obtaining the data query request, the starting entity can be located in the graph database according to the entity attribute name.

[0050] Step 260: In the vector database, based on the vector value corresponding to the starting entity, obtain the reference vector and the alternative vectors similar to the reference vector, and record the reference vector and the alternative vectors in the vector list.

[0051] In this step, specifically, the vector corresponding to the starting entity (i.e., the reference vector) can be obtained from the vector database based on the vector value corresponding to the starting entity. Then, the similarity between the reference vector and other vectors in the vector database is calculated, and other vectors with similarity greater than a preset threshold are selected as candidate vectors.

[0052] Step 270: In all knowledge graphs of the graph database, obtain the target entities corresponding to all vectors in the vector list, and query the subgraphs extended by the target entities.

[0053] In this step, after obtaining the target entity, the target entity can be used as the starting point to query the subgraph extended by the target entity in the graph database.

[0054] Step 280: Determine whether the graph database meets the query termination condition. If yes, determine that the query has ended. If no, use all entities in the subgraph as the starting entity again, and then return to the operation of step 260 until the graph database meets the query termination condition.

[0055] In this embodiment, after querying the subgraph extended by the target entity through the above steps, the vector values ​​corresponding to all entities in the subgraph can be obtained from the graph database. Then, all entities in the subgraph are used as the starting entities again, and the operation in step 260 is returned to be executed until the graph database meets the query termination condition.

[0056] The advantage of this setup is that when a user triggers a cross-graph fusion query request, it provides a way to perform hierarchical expansion queries on graph data by combining vector similarity, thereby improving query efficiency while ensuring the accuracy of the query results.

[0057] In a specific embodiment, it can be determined whether the target entity being queried has no extended subgraphs, or whether the number of extended layers of the target entity has reached a preset threshold; if so, it is determined that the graph database meets the query termination condition.

[0058] The advantage of this setup is that by judging the subgraph of the target entity and the number of expansion layers, the final query results fed back to the user can be as comprehensive as possible, thereby improving the user's experience with the financial business system.

[0059] In one embodiment of this example, after storing the vector value corresponding to each graph data into the graph database, the method further includes: in response to a user-triggered data addition request, storing the new graph data in the graph database; determining the vector corresponding to the new graph data through a large language model, and storing the vector corresponding to the new graph data into a vector database; and writing the vector coordinates corresponding to the new graph data into the vector value attribute corresponding to the new graph data in the graph database.

[0060] The advantage of this setup is that by introducing a large language model to determine the vectors corresponding to the graph data, the key feature information of the graph data can be accurately extracted, improving the response rate of new data requests and the reliability of graph data processing results in the financial business system.

[0061] In one specific embodiment, since users generally prefer to query knowledge graph data within the same scenario rather than across scenarios, other operations after storing new graph data in the graph database (such as vectorization processing, vector storage, coordinate writing, etc.) can be executed as asynchronous tasks.

[0062] In another embodiment of this example, after storing the vector value corresponding to each graph data into the graph database, the method further includes: responding to a data change request triggered by a user, querying the target graph data corresponding to the change request in the graph database; obtaining the vector value corresponding to the target graph data, and deleting the vector corresponding to the target graph data in the vector database according to the vector value; modifying the target graph data in the graph database, determining the vector corresponding to the modified data through a large language model, and storing the vector in the vector database; and writing the vector coordinates corresponding to the modified data into the vector value attribute corresponding to the modified data in the graph database.

[0063] The advantage of this setup is that by introducing a large language model to determine the vectors of graph data, key feature information of the graph data can be accurately extracted, improving the response rate of data change requests and the reliability of graph data processing results in financial business systems.

[0064] In a specific embodiment, similar to the processing method of the above-mentioned data addition request, other operations after modifying the target graph data of the graph database (such as vectorization processing, vector storage, coordinate writing, etc.) can be executed as asynchronous tasks.

[0065] In another embodiment of this example, after storing the vector value corresponding to each graph data into the graph database, the method further includes: responding to a data deletion request triggered by a user, querying the target graph data corresponding to the deletion request in the graph database; deleting the vector corresponding to the target graph data in the vector database according to the vector value corresponding to the target graph data, and then deleting the target graph data in the graph database.

[0066] The advantage of this setup is that by pre-loading all graph data with a "vector value" attribute in the graph database, the response rate of data deletion requests can be improved, thus enhancing the user experience of the financial business system.

[0067] The technical solution provided by this invention improves the accuracy of cross-graph fusion query results by storing graph data corresponding to multiple knowledge graphs in a graph database, converting each graph data in the graph database into a vector and storing it in a vector database, storing the vector coordinates as the vector values ​​corresponding to the graph data in the graph database according to the mapping relationship between each vector and the graph data, and responding to a user-triggered data query request by obtaining a baseline vector and similar candidate vectors from the vector database based on the vector value corresponding to the starting entity, retrieving the target entities corresponding to all vectors in the vector list from all knowledge graphs in the graph database, querying the subgraphs extended by the target entities, using all entities in the subgraphs as starting entities again, and then returning to execute the operation of obtaining the baseline vector and candidate vectors based on the vector value corresponding to the starting entity until the graph database meets the query termination condition.

[0068] Figure 3 This is a schematic diagram of a graph data storage device provided in an embodiment of the present invention. The device is applied in an electronic device, such as... Figure 3 As shown, the device includes: a graph database storage module 310, a vector database storage module 320, a vector value determination module 330, and a vector value storage module 340.

[0069] Graph database storage module 310 is used to store graph data corresponding to multiple knowledge graphs into a graph database;

[0070] The vector database storage module 320 is used to convert each graph data in the graph database into a vector, and store the vector corresponding to each graph data into the vector database;

[0071] The vector value determination module 330 is used to obtain the coordinates of each vector in the vector database and, according to the mapping relationship between each vector in the vector database and the graph data, use the coordinates as the vector value corresponding to the graph data.

[0072] The vector value storage module 340 is used to store the vector value corresponding to each graph data into the graph database.

[0073] The technical solution provided by this invention stores graph data corresponding to multiple knowledge graphs in a graph database, converts each graph data in the graph database into a vector, stores the vector corresponding to each graph data in a vector database, obtains the coordinates of each vector in the vector database, and uses the coordinates as the vector value corresponding to the graph data according to the mapping relationship between each vector in the vector database and the graph data. This technique of storing the vector value corresponding to each graph data in the graph database can improve the accuracy of cross-graph fusion query results and provide conditions for data analysis scenarios in financial business systems.

[0074] Based on the above embodiments, the device further includes:

[0075] The data query module is used to respond to a user-triggered data query request, locate the starting entity in the graph database according to the data query request, and obtain the vector value corresponding to the starting entity; in the vector database, based on the vector value corresponding to the starting entity, obtain the baseline vector and the candidate vectors similar to the baseline vector, and record the baseline vector and the candidate vectors in the vector list; in all knowledge graphs of the graph database, obtain the target entities corresponding to all vectors in the vector list, and query the subgraphs extended by the target entities; use all entities in the subgraphs as starting entities again, and then return to execute the operation of obtaining the baseline vector and candidate vectors based on the vector value corresponding to the starting entity in the vector database, until the graph database meets the query termination condition;

[0076] The data addition module is used to respond to user-triggered data addition requests, store the added graph data in the graph database; determine the vector corresponding to the added graph data through a large language model, and store the vector corresponding to the added graph data in the vector database; write the vector coordinates corresponding to the added graph data into the vector value attribute corresponding to the added graph data in the graph database.

[0077] The data modification module is used to respond to a user-triggered data modification request by querying the target graph data corresponding to the modification request in the graph database; obtaining the vector value corresponding to the target graph data; deleting the vector corresponding to the target graph data in the vector database based on the vector value; modifying the target graph data in the graph database; determining the vector corresponding to the modified data through a large language model; and storing the vector in the vector database; and writing the vector coordinates corresponding to the modified data into the vector value attribute corresponding to the modified data in the graph database.

[0078] The data deletion module is used to respond to a data deletion request triggered by a user, query the target graph data corresponding to the deletion request in the graph database; delete the vector corresponding to the target graph data in the vector database according to the vector value corresponding to the target graph data, and then delete the target graph data in the graph database.

[0079] The data query module includes:

[0080] The condition judgment unit is used to determine whether the target entity being queried has no extended subgraphs, or whether the number of extended layers of the target entity has reached a preset threshold; if so, it is determined that the graph database meets the query termination condition.

[0081] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in the embodiments of the present invention can be found in the methods provided in all the foregoing embodiments of the present invention.

[0082] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. 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 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0083] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from the storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0084] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0085] Processor 11 can be a variety of general-purpose and / or special-purpose processing components 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 special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processing (DSP) processors, and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as methods for storing graph data.

[0086] In some embodiments, the graph data storage method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the graph data storage method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the graph data storage method by any other suitable means (e.g., by means of firmware).

[0087] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0088] Computer programs used to implement 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 executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0089] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0090] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD)) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0091] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0092] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) in terms of management difficulty and weak business scalability.

[0093] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0094] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for storing graph data, characterized in that, The method includes: Store the graph data corresponding to multiple knowledge graphs into a graph database; Each graph data in the graph database is converted into a vector, and the vector corresponding to each graph data is stored in the vector database; Obtain the coordinates of each vector in the vector database, and use the coordinates as the vector values ​​corresponding to the graph data according to the mapping relationship between each vector in the vector database and the graph data; The vector value corresponding to each graph data is stored in the graph database.

2. The method according to claim 1, characterized in that, After storing the vector value corresponding to each graph data into the graph database, the process also includes: In response to a user-triggered data query request, the starting entity is located in the graph database according to the data query request, and the vector value corresponding to the starting entity is obtained. In the vector database, a baseline vector and alternative vectors similar to the baseline vector are obtained based on the vector value corresponding to the starting entity, and the baseline vector and alternative vectors are recorded in a vector list; In all knowledge graphs of the graph database, obtain the target entities corresponding to all vectors in the vector list, and query the subgraphs extended by the target entities; All entities in the subgraph are used as starting entities again, and then the process is returned to the vector database to obtain the baseline vector and candidate vectors based on the vector values ​​corresponding to the starting entities, until the graph database meets the query termination condition.

3. The method according to claim 2, characterized in that, After taking all entities in the subgraph as starting entities again, and then returning to the vector database to obtain the baseline vector and candidate vectors based on the vector values ​​corresponding to the starting entities, the process further includes: Determine whether the target entity in the query has no extended subgraph, or whether the number of extended layers of the target entity has reached a preset threshold; If so, then the graph database is determined to meet the query termination condition.

4. The method according to claim 1, characterized in that, After storing the vector value corresponding to each graph data into the graph database, the process also includes: In response to a user-triggered data addition request, store the newly added graph data in the graph database; The vector corresponding to the newly added graph data is determined by the large language model, and the vector corresponding to the newly added graph data is stored in the vector database; Write the vector coordinates corresponding to the newly added graph data into the vector value attribute of the newly added graph data in the graph database.

5. The method according to claim 1, characterized in that, After storing the vector value corresponding to each graph data into the graph database, the process also includes: In response to a user-triggered data change request, query the graph database for the target graph data corresponding to the change request; Obtain the vector value corresponding to the target image data, and delete the vector corresponding to the target image data in the vector database based on the vector value; The target graph data in the graph database is modified, the vector corresponding to the modified data is determined by a large language model, and the vector is stored in a vector database. Write the vector coordinates corresponding to the modified data into the vector value attribute of the modified data in the graph database.

6. The method according to claim 1, characterized in that, After storing the vector value corresponding to each graph data into the graph database, the process also includes: In response to a user-triggered data deletion request, query the graph database for the target graph data corresponding to the deletion request; Based on the vector value corresponding to the target graph data, delete the vector corresponding to the target graph data in the vector database, and then delete the target graph data in the graph database.

7. A storage device for graph data, characterized in that, The device includes: The graph database storage module is used to store the graph data corresponding to multiple knowledge graphs into the graph database. The vector database storage module is used to convert each graph data in the graph database into a vector, and store the vector corresponding to each graph data into the vector database; The vector value determination module is used to obtain the coordinates of each vector in the vector database and, based on the mapping relationship between each vector in the vector database and the graph data, use the coordinates as the vector value corresponding to the graph data. The vector value storage module is used to store the vector value corresponding to each graph data into the graph database.

8. An electronic device, characterized in that, The electronic device includes: 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, the computer program being executed by the at least one processor to enable the at least one processor to perform the method for storing graph data according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for storing graph data according to any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method for storing graph data according to any one of claims 1-6.