A general metadata operation method and system based on a graph database

By building a scalable connection pool and a unified parameter model, intelligent statement orchestration and optimization are achieved, and standardized API interfaces are provided. This solves the problems of inefficiency in graph database metadata operations and cross-database adaptation, and improves the stability and scalability of the system.

CN122153122APending Publication Date: 2026-06-05LINEWELL SOFTWARE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LINEWELL SOFTWARE
Filing Date
2026-02-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing graph database metadata operations rely on manually writing query statements, resulting in low efficiency and error-proneness. They are also difficult to adapt to cross-database environments, have high expansion costs, lack sufficient coordination between supporting technologies and operational logic, and lack a unified interface and automation mechanism.

Method used

By building a scalable connection pool, defining a unified parameter model, implementing intelligent statement orchestration and optimization, and providing standardized API interfaces and fine-grained permission control, it supports seamless adaptation to various mainstream graph databases, achieving standardization of metadata operations, universalization of interfaces, and flexible expansion.

Benefits of technology

It enables efficient, intelligent, and secure graph database metadata operations, reduces development and maintenance costs, improves system stability and scalability, and supports seamless adaptation to various mainstream graph databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153122A_ABST
    Figure CN122153122A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computers and discloses a general metadata operation method and system based on a graph database, which comprises the following steps: S1, using a configuration file yml of SpringBoot to configure to create a connection pool SessionPool of a NebulaGraph Database graph database based on a NebulaPool custom implementation, containing definitions of maxCountSession, minCountSession, hostAndPort, userName and passWord parameters; S2, defining parameter models for accepting different interfaces, including a model for creating a graph space, a model for creating a point, a model for creating an edge, a model for creating an index and a general query model; S3, using an independently developed NebulaUtil tool to automatically arrange nGQL statements for the accepted parameter models according to the input models; S4, defining different Controller layers to provide an open and unified Api interface externally; S5, using an execution service of a GraphCommonService graph database to obtain an effective connection of the NebulaGraph Database graph database from the SessionPool; and S6, executing the nGQL statements automatically arranged by the NebulaUtil tool and analyzing and returning a result model, and uniformly returning the result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to the field of data management and graph database technology, and more specifically, relating to a general metadata operation method and system based on graph database.

[0002] This invention addresses the core needs of standardized operations, universal interfaces, and flexible extensions in graph database metadata management. It provides a general metadata operation technology solution that supports adaptation and extension to various mainstream graph databases (such as NebulaGraph, Neo4j, and ArangoDB). Through custom connection pool optimization, automated statement orchestration, a unified parameter model, and standardized API design, it solves the problems of traditional metadata operations, such as reliance on manually written query statements, difficulty in cross-database adaptation, and high extension costs. This invention can be widely applied in enterprise-level data platforms, knowledge graph construction, complex relationship data analysis, big data governance, recommendation systems, and intelligent risk control. It supports personalized extensions based on different business scenarios and is compatible with mainstream operating systems such as Windows, Linux, and macOS, as well as various processor architectures such as x86 and ARM. Background Technology

[0003] In existing technologies, metadata management in graph databases mainly relies on the following methods: a. Native query languages: such as NebulaGraph's nGQL, Neo4j's Cypher, and ArangoDB's AQL. These languages ​​are all declarative query languages, supporting flexible graph pattern matching and basic metadata operations (such as creating spaces, tags, and indexes). While nGQL's syntax is close to SQL and easy to learn, batch metadata operations (such as batch creation of spaces or indexes) require manually writing and orchestrating multiple statements, and it lacks built-in automated sharding and optimization mechanisms.

[0004] b. Graphical management tools: such as NebulaGraph Studio and Neo4j Bloom, provide a visual interface to support metadata viewing, editing, and simple operations. These tools are easy to manage intuitively, but most are deployed on a single machine or bound to a specific database (such as Studio's limitations on architecture and data volume, and Bloom's constraints on search results and editing permissions), making them difficult to embed into enterprise systems, and lacking in capabilities for automated triggering (such as scheduled backups) and large-scale batch processing.

[0005] c. Graph Database Management Systems: Mainstream graph databases provide basic storage, query, and backup functions, as well as some schema management (such as the flexibility brought by Neo4j's schema-less design). However, the metadata operation syntax and logic of different databases differ significantly (such as NebulaGraph's CREATE SPACE versus Neo4j's CREATE DATABASE, and ArangoDB's collection management), lacking a unified cross-platform operation standard.

[0006] d. Related supporting technologies: Technologies such as network communication, data verification and access control provide basic support for metadata operations, but they are not tightly coupled with the core operation logic. Verification rules often need to be implemented separately for specific scenarios, and cannot form a reusable framework.

[0007] Based on the above analysis, the existing technology has the following main problems and defects: a. Manual operation is inefficient and high-risk: Batch or complex metadata operations rely on manually writing query statements, which are prone to failure due to syntax errors, missing parameters, or timeouts; the lack of complete operation log traceability and automatic rollback mechanism may cause metadata corruption in large-scale scenarios, affecting system stability.

[0008] b. Insufficient scalability and scenario adaptability: Existing tools and languages ​​are mostly bound to specific databases, making it difficult to quickly adapt to other mainstream graph databases; adding new operation types (such as custom permission verification or change notification) requires significant modifications to the original system, resulting in high expansion costs.

[0009] c. Lack of universality leads to high development and maintenance costs: The lack of a unified operation interface and standard across databases means that enterprises need to repeatedly develop adaptation modules when integrating multiple graph databases. Inconsistent interface and return formats further increase the difficulty of system maintenance.

[0010] d. Insufficient coordination between supporting technologies and operational logic: Data verification, security control, etc., have not formed a unified framework, and rules cannot be reused across operation types; there is a lack of automatic linkage mechanism (such as event notification business system) after metadata changes, requiring manual intervention and reducing overall efficiency. Summary of the Invention

[0011] To address the problems of inefficient manual metadata operations, difficulties in cross-database adaptation, high expansion costs, and insufficient collaborative support technologies in existing technologies, this invention provides a general metadata operation method and system based on graph databases. This solution achieves standardized operations, universal interfaces, and flexible expansion of graph database metadata by constructing a dynamically adjustable and cross-database adaptable connection pool, defining a scalable unified parameter model, realizing intelligent automated statement orchestration and optimization, providing standardized API interfaces and fine-grained permission control, ensuring high-availability connection acquisition, and unified result processing and event-driven linkage. It supports seamless adaptation to various mainstream graph databases (such as NebulaGraph, Neo4j, and ArangoDB), and boasts advantages such as high efficiency, intelligence, security, and traceability, making it widely applicable to enterprise-level data management scenarios.

[0012] This invention is implemented as follows: a general metadata manipulation method based on a graph database, comprising the following steps: S1. Scalable Connection Pool Construction: Build a graph database connection pool based on configuration files, defining basic parameters such as maximum / minimum number of sessions, address port, and authentication information; further includes dynamic session adjustment function (automatic release based on idle threshold, temporary expansion when load warning is triggered), and cross-database adaptation interface (supports multiple graph databases by injecting different driver implementation classes without modifying the core logic). S2. Extensible Parameter Model Definition: Define standardized parameter models, including graph space creation models (space name, number of partitions, number of replicas, etc.), vertex label creation models (label name, attribute list, constraints, etc.), edge type creation models (edge ​​name, associated labels, attributes, etc.), index creation models (index name, associated objects, fields, etc.), and general query models (conditions, pagination, sorting, etc.); further including custom extended fields (supporting business-specific parameters), lineage identification parameters (recording source, creator, etc. for traceability), and a unified parameter validation framework (defining rules through annotations or configuration, reusable across all models); S3, Intelligent Statement Arrangement: Automatically generates corresponding query statements based on parameter models; further includes a multi-database syntax template library (automatically matches syntax templates based on database type), statement optimization and pre-validation (automatic sharding of batch operations to avoid timeouts, syntax and parameter validation, and provision of correction suggestions); S4. Unified API Interface and Access Control: Provides standardized RESTful API interfaces, supporting metadata CRUD operations; further includes fine-grained access control (assigning resource permissions based on roles), API version compatibility mechanism (path includes version number, provides change logs), and operation audit log recording (mandatory recording of operator and source). S5, High Availability Connection Acquisition: Obtain valid connections from the connection pool; further includes lightweight heartbeat detection (performs simple queries to verify connections), automatic retry mechanism for failures (configurable number of times and intervals), and multi-instance load balancing (supports round-robin, weighted, least connections and other strategies). S6. Unified Result Processing and Event Notification: Execute the generated statements, parse and uniformly format the returned results (including status codes, prompts, data, and pagination information); further including intelligent exception classification and suggestions (distinguishing between syntax errors, insufficient permissions, etc. and providing solutions), error rollback configuration (rollback when part of a batch operation fails), and change event notification (real-time linkage is achieved by pushing to the business system through a message queue).

[0013] Furthermore, the preferred usage procedure of the method includes: (1) Users select and call the interface through the API documentation (which supports online debugging and examples), and pass in standardized or extended parameters; (2) Integrate the SDK or microservice into the project and you can use it by only configuring the database type and connection parameters; (3) Call the interface to perform the operation, and the system will automatically complete the verification, orchestration, execution and return; (4) Users can process the returned results or query detailed logs and traceability information by operation ID.

[0014] Another objective of this invention is to provide a general metadata operating system based on graph databases, comprising the following functional modules: Graph database connection management module: responsible for the construction, maintenance and high availability of connection pools. Functions include dynamic session adjustment, cross-database driver adaptation, heartbeat detection, fault retry and load balancing, supporting high-concurrency and stable access in server cluster environment; Parameter Model Management Module: Responsible for the definition, verification, and traceability of standardized and scalable parameters. Functions include unified model building, custom field expansion, lineage information recording, and a verification framework for cross-model reuse, ensuring parameter legality and operational traceability. Intelligent query processing module: Responsible for the automatic generation, optimization and validation of query statements. Functions include multi-database syntax template matching, batch sharding optimization, pre-validation and error suggestions to avoid invalid execution and improve efficiency; API Interface Management Module: Responsible for providing and controlling the security of unified external interfaces. Functions include standardized API definition, fine-grained permission allocation, version compatibility management, and operation audit log recording to ensure interface security and long-term availability. Connection acquisition and execution module: responsible for securely acquiring connections from the connection pool and executing statements, integrating high availability mechanisms and load balancing; The results processing and linkage module is responsible for the unified parsing of statement execution results, intelligent exception handling, error rollback, and change event push, enabling intelligent feedback and real-time linkage with business systems.

[0015] Another object of the present invention is to provide a computer device, including a processor and a memory, wherein the memory stores a computer program, which, when executed by the processor, implements the steps of the above-described method; the device supports cluster deployment and supports multiple processor architectures such as x86 and ARM, as well as operating systems such as Windows, Linux, and macOS.

[0016] Another objective of this invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method; the medium supports cross-device portability and includes complete logic such as connection management, parameter verification, statement arrangement, access control, and event linkage.

[0017] Another objective of this invention is to provide an information data processing terminal for implementing the above-mentioned system; the terminal provides a visual configuration interface, supports setting database parameters, permission rules, event notifications, etc. in a no-code manner, and improves deployment and maintenance efficiency. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the 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.

[0019] Figure 1 This is a flowchart of a general metadata operation method based on a graph database provided in this embodiment of the invention (supplemented with innovative steps such as "dynamic session adjustment", "statement pre-validation", and "event notification"). Figure 2 This is a flowchart of the general metadata operation method based on graph database provided in the embodiments of the present invention (supplemented with detailed steps such as "configuring database parameters" and "querying operation logs"); Figure 3 This is a general metadata operating system structure diagram based on graph database provided in the embodiments of the present invention (clearly defining the sub-modules under each module, such as the "graph database creation module" including the "dynamic session adjustment sub-module" and the "cross-database adaptation sub-module"). Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0021] To address the problems existing in the prior art, the present invention provides a general metadata operation method and system based on graph databases. The present invention will be described in detail below with reference to the accompanying drawings.

[0022] I. Explanation of the Implementation Examples To enable those skilled in the art to fully understand how the present invention is specifically implemented, this section provides an explanatory description of the embodiments that expand upon the technical solutions of the claims.

[0023] like Figure 1 As shown in the figure, an embodiment of the present invention provides a general metadata operation method based on a graph database, the general metadata operation method based on a graph database includes: S1. Use the Spring Boot configuration file yml to create a custom connection pool SessionPool based on NebulaPool to implement NebulaGraph Database graph database, including the definition of maxCountSession, minCountSession, hostAndPort, userName, and passWord parameters; S2. Define parameter models that accept different interfaces, including models for creating graph spaces, creating points, creating edges, creating indexes, and general query models. S3. Based on the input model, use the self-developed NebulaUtil tool to automatically orchestrate nGQL statements for the received parameter model; S4. Define different Controller layers to provide an open and unified API interface to the outside world; S5. Use the GraphCommonService graph database execution service to obtain a valid connection to the NebulaGraph Database graph database from the SessionPool; S6. Execute the nGQL statements automatically orchestrated by the NebulaUtil tool, parse the returned result model, and return the results uniformly.

[0024] like Figure 2 As shown, the steps for using the general metadata manipulation method based on graph databases are as follows: (1) Users can directly consult the interface documentation generated by the built-in Swagger tool and call the appropriate service based on the provided API and their own usage scenario; (2) Users integrate the entire project service into their own projects and call the Service; (3) Users call the API interface to combine their own usage scenarios with parameter passing, execute statements of positive, negative and positive deletion types and return a unified result model; (4) Users can use or display the returned results according to their own usage scenarios.

[0025] This invention proposes a solution for a general metadata manipulation method based on the NebulaGraph Database.

[0026] First, a unified API interface is used to operate on the NebulaGraph Database, which includes all operations on the NebulaGraph Database, such as creating graph data space, creating, modifying and deleting tags, creating, modifying and deleting edges, and a unified query interface, to avoid users having to manually write nGQL orchestration processes.

[0027] Secondly, the Spring Boot open-source technology framework is used as the base for the general metadata tools of the entire NebulaGraph Database graph database, which can be applied to different operating systems, environments or system architectures.

[0028] Finally, the system is designed for cluster deployment to improve its availability and stability, and to adapt to the needs of large-scale data processing and high-concurrency access.

[0029] An application embodiment of the present invention provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of a general metadata operation method based on a graph database.

[0030] An application embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform steps of a general metadata manipulation method based on a graph database.

[0031] An application embodiment of the present invention provides an information data processing terminal, which is used to implement a general metadata operating system based on a graph database.

[0032] II. Application Examples To further demonstrate the inventiveness, practicality, and technical value of the present invention, several application embodiments of the present invention are described in detail below. These embodiments are based on mature R&D practices, deployed and verified in actual enterprise-level systems, covering a variety of industry scenarios, and fully demonstrating the versatility, scalability, and engineering advantages of the present invention.

[0033] Application Example 1: Construction and Management of Product Knowledge Graphs on E-commerce Platforms In a large e-commerce company, it is necessary to manage both product relationship data (stored in NebulaGraph) and user behavior profile data (stored in Neo4j). In the traditional way, metadata operations require developing adaptation code for each of the two databases separately. When creating product point tags and relationship edge types in batches, it relies on manually writing nGQL and Cypher statements, which is inefficient and prone to errors.

[0034] After adopting this invention: Configure a multi-instance connection pool through the graph database connection management module to support dynamic adaptation and load balancing of NebulaGraph and Neo4j; Use the parameter model management module to define a unified and extensible parameter model (such as adding the "Business Domain: E-commerce Product" extended field to the product point label model), and record lineage identifiers to achieve full-chain traceability; The API interface management module calls the standardized interface to create hundreds of point / edge labels and indexes in batches, and the intelligent statement processing module automatically matches the corresponding syntax template and performs sharding optimization. After metadata changes, the results processing and linkage module pushes events through the message queue, automatically triggering the downstream recommendation engine to update synchronously.

[0035] Implementation results: In a cluster deployment environment (x86 server, Linux system), the time taken for batch operations was reduced from several hours in the traditional manual method to minutes, improving efficiency by more than 80%; the cross-database adaptation development cycle was shortened from several weeks to 1-2 days, and the annual maintenance manpower cost was reduced by about 1.5 million yuan; the metadata error rate was reduced to below 0.05%, ensuring the stable operation of the knowledge graph during the Double Eleven peak period.

[0036] Application Example 2: Intelligent Risk Control Knowledge Graph in the Financial Industry In a commercial bank's anti-fraud system, a complex relational graph needs to be built (primarily based on NebulaGraph, with some historical data migrated to ArangoDB). The existing tools cannot uniformly manage metadata from multiple databases, have loose access control, and cannot notify the risk control rule engine in real time after changes.

[0037] After adopting this invention: The API interface management module implements fine-grained access control (risk control developers can only query, administrators can modify), and combines OAuth2.0 to ensure compliance auditing; The unified validation framework of the parameter model management module reuses rules (such as attribute non-null constraints and length limits) to avoid redundant development. The pre-validation function of the intelligent statement processing module automatically detects missing fields and provides suggestions when creating anti-fraud edge types in batches; A high-availability connection acquisition and event notification mechanism ensures stable connection in high-concurrency query scenarios, and change events are pushed to the risk control system in real time.

[0038] Implementation Results: Deployed on an ARM architecture server cluster (Linux system), the system supports millions of metadata operations and queries per day; the timeliness of risk control rule updates has been improved from hours to seconds, and the accuracy of fraud identification has increased by 15%; the compliance audit pass rate has reached 100%, and annual risk losses have been reduced by approximately 3 million yuan.

[0039] Application Example 3: Data Platform for People's Livelihood in the Government Sector In a provincial government data platform project, it was necessary to integrate multi-source heterogeneous relational data (NebulaGraph for real-time relational analysis, Neo4j for document retrieval). Traditional management tools, deployed on a single machine, could not meet the needs of concurrent operations across multiple departments and unified management across databases.

[0040] After adopting this invention: Database parameters, permission rules, and event notification addresses can be set without coding through the visual configuration interface of the information data processing terminal. The connection management module's dynamic session adjustment and load balancing support high-concurrency access from multiple departments; The results processing and linkage module enables automatic rollback and event notification after metadata deletion, preventing accidental operations from affecting public services.

[0041] Implementation Results: Deployed on a hybrid architecture (x86+ARM, Windows / Linux compatible), supporting concurrent operations for thousands of users; metadata management efficiency improved by 70%, cross-departmental collaborative development costs reduced by 60%; data governance compliance significantly improved, and response time for public service inquiries shortened by 50%.

[0042] Application Example 4: Medical and Health Knowledge Graph and Intelligent Diagnostic Assistance In a top-tier hospital's disease-drug-symptom knowledge graph system, NebulaGraph is used to store massive amounts of medical relationship data. Previously, index creation and query optimization relied on manual expert intervention, and adding new entity types was costly.

[0043] After adopting this invention: The parameter model management module supports custom extended fields (such as "medical grade: high risk"), making it easy to add new entities related to the epidemic; The intelligent statement processing module automatically optimizes batch index creation statements to avoid timeouts. The event notification mechanism enables real-time synchronization of updated metadata to the diagnostic auxiliary AI model.

[0044] Implementation Results: Deployed on the hospital's private cloud (Linux system), the efficiency of batch metadata operations was improved by 75%; the knowledge graph update cycle was shortened from weekly to daily, supporting the rapid expansion of new entities during the pandemic; and the accuracy of diagnostic assistance was improved by 12%.

[0045] The above application examples demonstrate that the present invention has reached a mature R&D stage and can be deployed on a large scale in various industries, significantly reducing metadata management costs and improving operational efficiency and system stability.

[0046] An application embodiment of the present invention also provides a computer device, including a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, implements all the steps of the above-described method, supporting cluster deployment and high-concurrency processing.

[0047] An application embodiment of the present invention also provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the complete logic of the above-described method, including connection management, parameter verification, statement arrangement, access control, and event linkage.

[0048] An application embodiment of the present invention also provides an information data processing terminal for implementing the above system. The terminal is equipped with a visual configuration interface, which supports operation and maintenance personnel to quickly configure and monitor without coding.

[0049] Example 1: Graph Space Creation and Execution Based on Parametric Model In this embodiment, during the startup phase, the system initializes the graph database session pool through a configuration file, presets upper and lower limits for the number of sessions, and establishes a session connection management mechanism with the graph database. Users submit graph space creation requests to the system. The request parameters are organized according to a predefined graph space operation parameter model, which explicitly includes the graph space name, number of shards, number of replicas, and character set information. The system performs structured parsing of the received parameters to form a unified metadata operation model.

[0050] After parameter parsing is complete, the automated statement orchestration mechanism selects the corresponding graph database statement template based on the graph space operation type defined in the parameter model, and maps the field values ​​in the model to the template to generate a complete graph space creation statement. The execution service module obtains a valid session from the session pool and executes the statement. The execution result returned by the graph database is parsed into a unified data result model, and finally, the system returns the creation result status information to the caller.

[0051] Example 2: Point Data Creation and Return Processing Based on a Unified Model In this embodiment, the user submits a point data creation request through a unified external interface. The request parameters are organized according to a point operation parameter model, which includes a point type identifier, a point unique identifier, and a set of point attribute key-value pairs. After parsing the received request parameters, the system does not distinguish point types based on specific business scenarios, but instead describes the point structure information through a unified model.

[0052] The automated statement orchestration mechanism generates corresponding point data insertion statements based on the parsed parameter model, and executes these statements within a valid graph database session through the execution service module. After execution, the system performs structured parsing of the results returned by the graph database, encapsulating information such as whether point creation was successful and the number of affected data points into a unified data result model and returning it, thus avoiding the caller directly processing the underlying graph database's return format.

[0053] Example 3: Edge Relationship Creation and Execution Control Based on Model Mapping In this embodiment, the system receives an edge relationship creation request. The request parameters are organized according to an edge operation parameter model, which includes at least a start point identifier, an end point identifier, an edge type identifier, and a set of edge attributes. The system parses the request through a parameter model parsing module to form structured relation metadata description information.

[0054] Based on this, the automated statement orchestration mechanism generates corresponding graph relationship creation statements according to the edge operation type, and the execution service module selects an available session from the session pool for execution. If a session becomes unavailable during execution, the execution service module reacquires a valid session through a session state detection mechanism and continues execution, ensuring the continuity of the relationship creation process. The execution result is finally returned to the caller in the form of a unified result model.

[0055] Example 4: Graph Data Query and Parsing Based on a General Query Model In this embodiment, the user submits a graph data query request. The request parameters are organized according to a general query parameter model, which includes the query target type, filtering conditions, and return field definitions. The system does not hardcode the query statement; instead, it describes the query intent through model fields, ensuring that different query requests are processed through a unified mechanism.

[0056] The system generates corresponding graph query statements based on a general query parameter model and executes the query operation in the graph database. After the query results are returned, the system performs field reorganization and type normalization on the original results returned by the graph database to generate a consistent result data model. This allows callers to use a consistent data structure for business processing or result display in different query scenarios.

[0057] Example 5: Application of high-concurrency execution scenarios based on session pools In this embodiment, the system is deployed in a high-concurrency access environment, and the minimum and maximum number of sessions in the session pool are preset through configuration files. When multiple users submit metadata operation requests simultaneously, the system uses a session pool management mechanism to uniformly schedule graph database sessions, avoiding the performance loss caused by frequent connection creation and destruction.

[0058] During request execution, the execution service module dynamically allocates session resources based on session availability and returns the session to the session pool for reuse after execution. Through this mechanism, the system can stably complete graph database operations even in high-concurrency scenarios, ensuring the consistency of returned results and the controllability of the execution process.

[0059] Example 6: Business System Integration Application Based on Unified Service Invocation In this embodiment, the system provides a unified graph database operation interface as an independent service, and exposes it to external systems through interface documentation. External business systems select the appropriate interface capabilities according to their own needs and transmit metadata operation parameters according to the agreed parameter model format, without needing to know the specific syntax rules of the graph database.

[0060] After receiving a service request, the system completes the graph database operation through parameter model mapping and automated statement orchestration, and returns the execution result to the external system in a unified data result model format. The external system directly performs business processing or display based on the returned result, realizing decoupled reuse of graph database capabilities and reducing system integration and maintenance costs.

[0061] It should be noted that embodiments of the present invention can be implemented using hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented using hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or using software executed by various types of processors, or using a combination of the above-described hardware circuitry and software, such as firmware.

[0062] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A general metadata manipulation method based on graph databases, characterized in that, Includes the following steps: A session pool management mechanism for graph databases is built using configuration files, which centrally manages graph database sessions with preset upper and lower limits for the number of sessions. Based on a predefined metadata operation parameter model, the received operation requests are structured and parsed. The parameter model includes at least a graph space operation model, a point operation model, an edge operation model, an index operation model, and a general query model. Based on the structured field mapping relationships in the parameter model, a graph query statement consistent with the graph database syntax rules is generated; A unified execution service mechanism is used to obtain a valid graph database session from the session pool and execute the graph query statement in that session. The execution results returned by the graph database are parsed in a structured manner to generate a unified data result model and return it.

2. The general metadata operation method based on graph database according to claim 1, characterized in that, The session pool management mechanism achieves the reuse and controlled allocation of graph database connection resources by dynamically maintaining the minimum and maximum number of sessions.

3. The general metadata operation method based on graph database according to claim 1, characterized in that, The process of generating the graph query statement includes: Select the corresponding statement template based on the metadata operation type defined in the parameter model; The field values ​​from the parameter model are filled into the statement template to form a graph query statement that can be executed directly.

4. The general metadata operation method based on graph database according to claim 1, characterized in that, The unified data result model performs field reorganization and type normalization on the original results returned by the graph database to shield the differences in the returned structure of the underlying graph database.

5. A general-purpose metadata operating system based on a graph database, used to implement the method as described in any one of claims 1 to 4, characterized in that, include: The session pool management module is used to build graph database session pools based on configuration files and to manage session resources in a unified manner. The parameter model parsing module is used to receive external operation requests and convert them into structured metadata operation parameter models. The statement auto-arrangement module is used to generate corresponding graph query statements based on the parameter model. The execution scheduling module is used to obtain valid sessions from the session pool and execute the graph query statement; The results parsing module is used to uniformly parse the execution results and output a standardized result model.

6. The general metadata operating system based on graph database according to claim 5, characterized in that, The parameter model parsing module achieves unified entry control for operations on multiple types of graph databases by uniformly modeling different metadata operation types.

7. The general metadata operating system based on graph database according to claim 5, characterized in that, When the execution scheduling module fails to acquire a session, it reselects an available session through a session status detection mechanism to ensure the continuous execution of graph query statements.

8. A method for invoking general metadata operation services based on graph databases, characterized in that, include: It provides a unified set of graph database operation interfaces to receive service requests carrying metadata operation parameters. The service request is mapped using a parameter model, and the corresponding graph query statement is generated by calling the statement auto-arrangement mechanism. The graph database execution service is invoked to complete the statement execution and return a unified data result model to the caller.

9. The method for invoking general metadata operation services based on graph databases according to claim 8, characterized in that, The unified set of graph database operation interfaces is made public through interface documentation to support callers in selecting metadata operation capabilities as needed.

10. The method for invoking a general metadata operation service based on a graph database according to claim 8, characterized in that, The caller performs business processing or displays the results of graph database operations based on the returned unified data result model, without having to parse the return structure of the underlying graph database.