Relationship graph construction method and apparatus, computer device, and storage medium

By dividing nodes into management nodes and instance nodes, configuring attribute information and relationship identifiers, and constructing a two-layer call chain, the problem that static graphs cannot adapt to data iteration is solved, and efficient and accurate data management and multi-dimensional queries are achieved.

CN121009150BActive Publication Date: 2026-05-01SHANGHAI SHUHE INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SHUHE INFORMATION TECH CO LTD
Filing Date
2025-07-21
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional static relationship graph structures cannot adapt to changes in entity node versions and attribute transformations, resulting in low data management efficiency and an inability to achieve complete trajectory tracing and control of data backtracking or strategy evolution processes.

Method used

The system divides nodes into management nodes and instance nodes, configures different attribute information and relationship identifiers, constructs a two-layer call chain based on rules and dependencies, dynamically adjusts the association relationship and attribute information, and supports multi-dimensional queries and data persistence.

Benefits of technology

It improves the accuracy and efficiency of data management, enabling efficient data control even with frequent data updates and iterations, and supports multi-dimensional queries and data traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009150B_ABST
    Figure CN121009150B_ABST
Patent Text Reader

Abstract

The application relates to a relationship graph construction method and device, computer equipment and a storage medium. The method comprises the following steps: determining the types of nodes, dividing a plurality of nodes into management nodes and instance nodes subordinate to the management nodes according to the types; associating first attribute information with each management node and associating second attribute information with each instance node; wherein the first attribute information is information representing node management rules, and the second attribute information is information representing entity business attributes; configuring a first relationship identifier between each management node and the instance nodes subordinate thereto, and configuring a second relationship identifier between each management node and the adjacent layer instance nodes dependent thereon; and constructing a relationship graph model according to the management nodes, the instance nodes, the first attribute information, the second attribute information, the first relationship identifier and the second relationship identifier. The method can improve the accuracy and efficiency of data management based on a relationship graph.
Need to check novelty before this filing date? Find Prior Art

Description

Relationship graph construction methods, apparatus, computer equipment, and storage media Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, computer device, and storage medium for constructing a relational graph. Background Technology

[0002] With the development of data processing technology, relational graph construction technology has emerged. Traditional relational graphs use entity nodes (Vertex) + edges (Edge) + attribute information (Property) as core elements and adopt a purely static approach to depict the relationships between entity nodes.

[0003] However, when faced with iterative data such as version changes and attribute transformations of entity nodes, the traditional single static relation graph structure of "node + edge" cannot be disassembled, thus failing to achieve the complete tracing and control of the data backtracking or strategy evolution process, resulting in low data management efficiency based on relation graph models. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for constructing relational graphs that can improve the accuracy and efficiency of data management based on relational graph models, in order to address the aforementioned technical problems.

[0005] Firstly, a method for constructing a relational graph is provided, the method comprising:

[0006] Determine the type of each node, and based on the type, divide the multiple nodes into management nodes and instance nodes belonging to each management node;

[0007] Associate first attribute information with each management node, and associate second attribute information with each instance node; wherein, the first attribute information is information representing the node management rules, and the second attribute information is information representing the entity business attributes;

[0008] Configure a first relationship identifier between each management node and the instance nodes belonging to it, and configure a second relationship identifier between each management node and the adjacent layer instance nodes it depends on; and

[0009] Construct a relational graph model based on management nodes, instance nodes, first attribute information, second attribute information, first relation identifier, and second relation identifier.

[0010] In some embodiments, the second attribute information includes at least one of version information, status information, grayscale information, and effective time range information.

[0011] In some embodiments, the method further includes:

[0012] Based on the node management rules and the entity business attributes of each instance node, dynamically adjust the association between the management node and each instance node belonging to it, and / or the second attribute information corresponding to the instance node.

[0013] In some embodiments, the method further includes:

[0014] Using object-relational mapping tools, the relational graph model is converted into query statements; and

[0015] The management node and instance node are respectively used as database tables, the first relation identifier and the second relation identifier are respectively used as association relation tables, and the first attribute information and the second attribute information are respectively used as table fields. Database write operations or update operations are performed to transform the relation graph model into a database table structure.

[0016] In some embodiments, the second attribute information includes effective time range information, and the method further includes:

[0017] Link the node management rules with the time management system; and

[0018] In response to the time management system triggering the target time point, the system filters the instance nodes whose effective time range information corresponds to the target time point as the target instance node, and switches the management node to establish a relationship with the target instance node.

[0019] In some embodiments, the status information includes an active state and an inactive state, and the method further includes:

[0020] Set the target instance node to the active state and set the other instance nodes to the inactive state; other instance nodes refer to the instance nodes that have not been selected as the target instance node.

[0021] In some embodiments, the method further includes:

[0022] Receive a first query instruction, perform a query operation on the relationship graph model according to the first query instruction to obtain the relationship graph; and hide each management node in the relationship graph and display the relationship graph according to the node management rules; and / or

[0023] Receive the second query instruction, and perform a query operation on the relationship graph model according to the second query instruction to obtain the entity business attributes of each instance node in the time axis dimension.

[0024] Secondly, a relational graph construction apparatus is provided, the apparatus comprising:

[0025] The node type classification module is used to determine the type of each node. Based on the type, multiple nodes are divided into management nodes and instance nodes belonging to each management node.

[0026] The rule attribute configuration module is used to associate first attribute information with each management node and second attribute information with each instance node; wherein, the first attribute information is information representing the node management rule, and the second attribute information is information representing the entity business attribute.

[0027] The association configuration module is used to configure a first relationship identifier between each management node and its subordinate instance nodes, and a second relationship identifier between each management node and its dependent adjacent layer instance nodes; and

[0028] The graph model construction module is used to construct a relation graph model based on management nodes, instance nodes, first attribute information, second attribute information, first relation identifier, and second relation identifier.

[0029] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method of any embodiment of the first aspect.

[0030] Fourthly, a computer-readable storage medium is provided that stores a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the method of any embodiment of the first aspect.

[0031] The aforementioned relationship graph construction method, apparatus, computer equipment, and storage medium categorize nodes into different types, configure node management rules for each management node, and configure entity business attributes for the instance nodes belonging to it. This constructs a two-layer control model architecture of "management node—instance node," thereby building a two-layer call chain based on rules and fundamental dependencies, which differs from the flat and static associations between instance nodes in traditional technologies. Adopting this solution can improve the accuracy of data management and enhance the efficiency of data control even under frequent data updates and iterations. Attached Figure Description

[0032] Figure 1 is a flowchart illustrating the relationship graph construction method in some embodiments;

[0033] Figure 2 shows the traditional static relational graph structure;

[0034] Figure 3 is a schematic diagram of the structure of the relational graph model of this application in some embodiments;

[0035] Figure 4 is a schematic diagram of the query process based on the relationship graph of this application in some embodiments;

[0036] Figure 5 is a schematic diagram of the query process based on the relationship graph of this application in some other embodiments;

[0037] Figure 6 is a structural block diagram of the relation graph construction device in some embodiments;

[0038] Figure 7 is an internal structure diagram of a computer device in some embodiments. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0040] The relational graph construction method provided in this application can be applied to computer devices, which may include, but are not limited to, terminal devices or servers. The terminal may include, but is not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices, and the server may be implemented using a standalone server or a server cluster composed of multiple servers.

[0041] In some embodiments, as shown in Figure 1, a relational graph construction method is provided. Taking the application of this method to the terminal in Figure 1 as an example, the method includes the following steps:

[0042] Step S102: Determine the type of each node, and based on the type, divide the multiple nodes into management nodes and instance nodes belonging to each management node.

[0043] In a relational graph (also known as a knowledge graph or graph database), nodes (vertices) are the basic units that constitute the graph, representing business entities or abstract concepts in the real world. Instance nodes refer to specific instances; for example, in practical applications, instance nodes in this embodiment can represent software applications, but are not limited to this. Management nodes do not directly represent business objects; they serve as carriers of management logic to undertake management and control functions.

[0044] Unlike the traditional static relational graph structure of "nodes + edges" (see Figure 2, which illustrates the traditional static relational graph structure), in this step, metadata representing node types is defined. Based on the node type, management nodes are first constructed, and then instance nodes belonging to each management node are constructed at the lower level.

[0045] Step S104: Associate first attribute information with each management node and second attribute information with each instance node; wherein, the first attribute information is information representing the node management rules and the second attribute information is information representing the entity business attributes.

[0046] Referring to Figure 3, Figure 3 shows a schematic diagram of the structure of the relational graph model of this application in some embodiments.

[0047] In this step, corresponding first attribute information can be configured for each management node to manage and control the instance nodes belonging to it, specifically, to manage the association relationships between the instance nodes belonging to it and the node. Second attribute information is also configured for each instance node to characterize its business attributes.

[0048] For example, the second attribute information may include at least one of version information, status information, grayscale information, and effective time range information.

[0049] Among them, version information refers to information that represents the updated version of an entity, such as version V1, V2, V3, etc.; status information refers to information that represents the effective status of an entity, such as active status, inactive status, effective status, expired status, ineffective status, etc.; grayscale information refers to information used to represent the grayscale release of an entity; and effective time range information refers to information that represents the time interval during which an entity becomes effective.

[0050] In the above exemplary embodiments, the storage fields for storing second attribute information are extended for instance nodes. That is, in addition to the basic attribute information fields of instance nodes, fields representing entity business attributes are added, such as, but not limited to, fields for storing version information, status information, grayscale information, and effective time range information. Custom configuration of effective time range information, status information, etc. can be supported, so as to more comprehensively record and manage the data generated by instance nodes throughout the entire iteration process from different dimensions.

[0051] Step S106: Configure a first relationship identifier between each management node and the instance nodes to which it belongs, and configure a second relationship identifier between each management node and the adjacent layer instance nodes to which it depends.

[0052] The first relationship identifier is used to characterize the association relationship between the management node and the instance nodes belonging to it, which is determined based on the node management rules, and the second relationship identifier is used to characterize the basic dependency relationship between nodes.

[0053] In this step, you can continue to refer to Figure 3. The first relationship identifier can be marked as "DECIDE", and the second relationship identifier can be marked as "INVOKE". In the traditional static relationship graph, only the "INVOKE" identifier exists, that is, only the basic dependency relationship between nodes exists.

[0054] Step S108: Construct a relational graph model based on the management node, instance node, first attribute information, second attribute information, first relation identifier, and second relation identifier.

[0055] In this step, as shown in Figure 3, the relationship graph model of this application constructs a hierarchical architecture of "management node-instance node", which has a multi-level call chain, namely, the call structure of management node A→A instance→management node B→B instance, and supports the first attribute information of the management node, namely the node management rules, to be passed and executed from the top to the bottom.

[0056] The aforementioned relationship graph construction method categorizes nodes into different types, configures node management rules for each management node, and configures entity business attributes for its subordinate instance nodes. This constructs a two-tiered control model architecture of "management node—instance node," thereby building a two-tiered call chain based on rules and fundamental dependencies, unlike the flat and static relationships between instance nodes in traditional technologies. This approach improves the accuracy of data management and enhances the efficiency of data control even under frequent data updates and iterations.

[0057] In some embodiments, the method further includes: dynamically adjusting the association between the management node and each instance node to which it belongs and / or the second attribute information corresponding to the instance node, based on the node management rules and the entity business attributes of each instance node.

[0058] In this embodiment, the relationship graph model can support the dynamic adjustment of node association relationships and / or attribute information (e.g., effective status information) corresponding to instance nodes according to the node management rules configured by each management node. In other words, the relationship graph model can be dynamically adjusted according to the adjustment strategy specified in the node management rules. Therefore, it can respond to and adapt to changes in node management rules in a timely manner, thereby breaking the limitations of traditional static connection relationships and improving the flexibility and efficiency of data management.

[0059] In some embodiments, the method further includes: using an object relation mapping tool to convert the relation graph model into a query statement; and using the management node and instance node as database tables, the first relation identifier and the second relation identifier as association relation tables, and the first attribute information and the second attribute information as table fields, performing a database write operation or update operation to convert the relation graph model into a database table structure.

[0060] In this embodiment, the node relationships and node attributes (e.g., the status, version, grayscale, effective time, etc. of instance nodes) in the relational graph modeling scheme can be further persisted to an OLTP (Online Transaction Processing Database) database to achieve data persistence and business query.

[0061] For example, the full metadata, such as the association between management nodes and instance nodes (e.g., DECIDE / INVOKE), node attribute information, status timeline information, and instance activation status, can be mapped to an OLTP database through an ORM (Object-Relational Mapping) framework. It can also support updating dynamically changed data to the database, thereby building a relational database corresponding to the graph and improving data persistence.

[0062] In this embodiment, all metadata, including the association between management nodes and instance nodes, node management rules, and the entity business attributes of instance nodes (version information, status information, grayscale information, and effective time range information), is mapped to the OLTP database through the ORM framework. This provides support for complex business needs such as data traceability and audit analysis, and makes up for the shortcomings of traditional technologies that only store basic dependency information between instance nodes at the persistence level.

[0063] In some embodiments, the second attribute information may include effective time range information. The method further includes: coupling the node management rules with the time management system; and, in response to the time management system triggering a target time point, filtering the instance nodes whose effective time range information matches the target time point as target instance nodes, and switching the management node to establish an association relationship with the target instance node.

[0064] In this embodiment, metadata representing the effective time range information can be bound to instance nodes. With the help of the node management rules of the management node and the linkage of the time management system, the association relationship between the management node and the instance nodes belonging to it can be automatically switched, and / or the second attribute information corresponding to the instance node can be automatically adjusted.

[0065] In some embodiments, the instance node can be further bound with metadata of "[effective time interval + effective status]". With the help of the management node "DECIDE" rule and the linkage with the time management system, the instance node status can be automatically triggered to switch. Furthermore, change logs can be recorded to achieve dynamic scheduling and traceability of versions and statuses, and to match the needs of business iteration.

[0066] In some embodiments, the status information includes an active state and an inactive state. The method further includes: setting the status information of the target instance node to an active state and setting the status information of other instance nodes to an inactive state; wherein, other instance nodes refer to the instance nodes that have not been selected as the target instance node.

[0067] In practical applications, referring to Figure 3, for example, each B instance node can be bound to a corresponding "version + gray-scale / official effective time range + effective status". By leveraging the timeline in the time management system (such as V1 gray-scale [2025-02-15, 2025-02-16], V2 official [2025-02-16,]) and the "DECIDE" rule of the management node, the automatic switching of the node instance status can be achieved (such as when 2025-02-16 is reached, V1 is automatically set to inactive and V2 is set to active), breaking through the limitations of the traditional stateless hierarchical scheduling and time-driven change mechanism.

[0068] In some embodiments, the method further includes: receiving a first query instruction, performing a query operation on the relationship graph model according to the first query instruction to obtain a relationship graph; and hiding each management node in the relationship graph and displaying the relationship graph according to node management rules.

[0069] For example, as shown in Figure 4, the first query instruction is used to find the relationship graph between instance nodes under specific rules. For example, if a user wants to find the relationship graph between instance nodes at a specific time, the server recognizes the user's search request, performs intent recognition on the search request, generates a DSL (Domain-Specific Language Query) statement, executes the query statement on the N-level association relationship of the target query object (the instance node to be queried) in the cached relationship graph model, obtains the relationship graph of the target query object, hides the management node layer, and displays the nodes that have a valid association relationship with the target query object at a specific time according to the node management rules.

[0070] In some embodiments, the method further includes: receiving a second query instruction, performing a query operation on the relationship graph model according to the second query instruction, and obtaining the entity business attributes of each instance node in terms of time axis.

[0071] In this embodiment, axis queries for changes are also supported. The second query instruction is used to query the changes of instance nodes over time. The server recognizes the user's search request, performs intent recognition on the search request, generates a DSL (Domain-Specific Language Query) statement, executes the query statement on the N-level association of the target query object in the cached relational graph model, and can combine the data in the relational database to obtain the information on the changes of the target query object over time.

[0072] The above embodiments, based on the relational graph model constructed in this application, not only support query scenarios for association relationships, but also support query scenarios for change implementation axes. Through time-axis-based DSL execution and collaborative support of graph database (relational graph model) / relational database, multi-dimensional query needs can be realized.

[0073] It should be understood that although the steps in the flowchart of Figure 1 are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in Figure 1 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0074] In some embodiments, as shown in FIG6, a relational graph construction apparatus is provided, including: a node type partitioning module 610, a rule attribute configuration module 620, an association relationship configuration module 630, and a graph model construction module 640, wherein:

[0075] The node type classification module 610 is used to determine the type of each node and, based on the type, classify multiple nodes into management nodes and instance nodes belonging to each management node.

[0076] The rule attribute configuration module 620 is used to associate first attribute information with each management node and second attribute information with each instance node; wherein, the first attribute information is information representing the node management rule, and the second attribute information is information representing the entity business attribute.

[0077] The association configuration module 630 is used to configure a first relationship identifier between each management node and its subordinate instance nodes, and to configure a second relationship identifier between each management node and its dependent adjacent layer instance nodes; and

[0078] The graph model construction module 640 is used to construct a relation graph model based on management nodes, instance nodes, first attribute information, second attribute information, first relation identifier, and second relation identifier.

[0079] In some embodiments, the association configuration module 630 is further configured to dynamically adjust the association between the management node and each instance node belonging to it and / or the second attribute information corresponding to the instance node according to the node management rules and the entity business attributes of each instance node.

[0080] In some embodiments, the graph model construction module 640 is further configured to use an object relation mapping tool to convert the relation graph model into a query statement; and to use the management node and instance node as database tables, the first relation identifier and the second relation identifier as association relation tables, and the first attribute information and the second attribute information as table fields, and to perform database write operations or update operations to convert the relation graph model into a database table structure.

[0081] In some embodiments, the association configuration module 630 is further configured to associate the node management rules with the time management system; and, in response to the time management system triggering a target time point, to filter the instance nodes whose effective time range information corresponds to the target time point as target instance nodes, and to switch the management node to build an association relationship with the target instance node.

[0082] In some embodiments, the association configuration module 630 is further configured to set the status information of the target instance node to an active state and set the status information of other instance nodes to an inactive state; wherein, other instance nodes refer to the instance nodes that have not been selected as the target instance node.

[0083] In some embodiments, the graph model construction module 640 is further configured to receive a first query instruction, perform a query operation on the relation graph model according to the first query instruction to obtain a relation graph; and hide each management node in the relation graph and display the relation graph according to the node management rules; and / or receive a second query instruction, perform a query operation on the relation graph model according to the second query instruction to obtain the entity business attributes of each instance node in the time axis dimension.

[0084] Specific limitations regarding the relation graph construction device can be found in the limitations of the relation graph construction method described above, and will not be repeated here. Each module in the aforementioned relation graph construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0085] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 7. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores relational graph data and / or association data. The network interface of the computer device is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a relational graph construction method.

[0086] Those skilled in the art will understand that the structure shown in Figure 7 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0087] In some embodiments, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: determining the type of each node; dividing multiple nodes into management nodes and instance nodes belonging to each management node according to the type; associating first attribute information with each management node and associating second attribute information with each instance node; wherein the first attribute information is information representing node management rules, and the second attribute information is information representing entity business attributes; configuring a first relationship identifier between each management node and the instance nodes belonging to it, and configuring a second relationship identifier between each management node and the adjacent layer instance nodes it depends on; and constructing a relationship graph model based on the management nodes, instance nodes, first attribute information, second attribute information, first relationship identifier, and second relationship identifier.

[0088] In some embodiments, when the processor executes the computer program, it also performs the following steps: dynamically adjusting the association between the management node and each instance node belonging to it and / or the second attribute information corresponding to the instance node, based on the node management rules and the entity business attributes of each instance node.

[0089] In some embodiments, when the processor executes the computer program, it further performs the following steps: using an object-relational mapping tool to convert the relational graph model into a query statement; and using the management node and instance node as database tables, the first relation identifier and the second relation identifier as association relation tables, and the first attribute information and the second attribute information as table fields, and performing database write or update operations to convert the relational graph model into a database table structure.

[0090] In some embodiments, when the processor executes the computer program, it further performs the following steps: coupling the node management rules with the time management system; and in response to the time management system triggering a target time point, filtering the instance nodes whose effective time range information corresponds to the target time point as target instance nodes, and switching the management node to establish an association relationship with the target instance node.

[0091] In some embodiments, when the processor executes the computer program, it further implements the following steps: setting the state information of the target instance node to an active state and setting the state information of other instance nodes to an inactive state; wherein, other instance nodes refer to the instance nodes that have not been selected as the target instance node.

[0092] In some embodiments, when the processor executes the computer program, it further implements the following steps: receiving a first query instruction, performing a query operation on the relation graph model according to the first query instruction to obtain a relation graph; and hiding each management node in the relation graph and displaying the relation graph according to the node management rules.

[0093] In some embodiments, when the processor executes the computer program, it further implements the following steps: receiving a second query instruction, performing a query operation on the relational graph model according to the second query instruction, and obtaining the entity business attributes of each instance node in terms of time axis.

[0094] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon. When the computer program is executed by a processor, it performs the following steps: determining the type of each node; dividing multiple nodes into management nodes and instance nodes belonging to each management node according to the type; associating first attribute information with each management node and associating second attribute information with each instance node; wherein the first attribute information is information representing node management rules and the second attribute information is information representing entity business attributes; configuring a first relationship identifier between each management node and the instance nodes belonging to it, and configuring a second relationship identifier between each management node and the adjacent layer instance nodes it depends on; and constructing a relationship graph model based on the management nodes, instance nodes, first attribute information, second attribute information, first relationship identifier, and second relationship identifier.

[0095] In some embodiments, when the computer program is executed by the processor, it further implements the following steps: dynamically adjusting the association between the management node and each instance node belonging to it and / or the second attribute information corresponding to the instance node, based on the node management rules and the entity business attributes of each instance node.

[0096] In some embodiments, when the computer program is executed by the processor, it further performs the following steps: using an object-relational mapping tool to convert the relational graph model into a query statement; and using the management node and instance node as database tables, the first relation identifier and the second relation identifier as association relation tables, and the first attribute information and the second attribute information as table fields, to perform database write operations or update operations to convert the relational graph model into a database table structure.

[0097] In some embodiments, when the computer program is executed by the processor, it further performs the following steps: coupling the node management rules with the time management system; and in response to the time management system triggering a target time point, filtering the instance nodes whose effective time range information corresponds to the target time point as target instance nodes, and switching the management node to establish an association relationship with the target instance node.

[0098] In some embodiments, when the computer program is executed by the processor, it further implements the following steps: setting the state information of the target instance node to an active state and setting the state information of other instance nodes to an inactive state; wherein, other instance nodes refer to the instance nodes that have not been selected as the target instance node.

[0099] In some embodiments, when the computer program is executed by the processor, it further implements the following steps: receiving a first query instruction, performing a query operation on the relation graph model according to the first query instruction to obtain a relation graph; and hiding each management node in the relation graph and displaying the relation graph according to the node management rules.

[0100] In some embodiments, when the computer program is executed by the processor, it further implements the following steps: receiving a second query instruction, performing a query operation on the relational graph model according to the second query instruction, and obtaining the entity business attributes of each instance node in terms of time axis.

[0101] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0102] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0103] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the characters in this article generally indicate that the preceding and following related objects have an "or" relationship.

[0104] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

[0105] It should be noted that in the embodiments of this application, if user information or user data are involved, the user's authorization and consent are required before acquisition and processing. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A method for constructing a relational graph, the method comprising: Determine the type of each node, and based on the type, divide the multiple nodes into management nodes and instance nodes belonging to each management node; The method involves associating first attribute information with each management node and second attribute information with each instance node; wherein the first attribute information represents node management rules, and the second attribute information represents entity business attributes; configuring a first relationship identifier between each management node and its subordinate instance nodes, and configuring a second relationship identifier between each management node and its dependent adjacent layer instance nodes; and constructing a relationship graph model based on the management nodes, instance nodes, first attribute information, second attribute information, first relationship identifier, and second relationship identifier; the method further includes: using an object-relational mapping tool to convert the relationship graph model into a query statement; and using the management nodes and instance nodes as database tables, the first relationship identifier and the second relationship identifier as association relationship tables, and the first attribute information and the second attribute information as table fields, performing database write or update operations to convert the relationship graph model into a database table structure.

2. The method according to claim 1, characterized in that, The second attribute information includes at least one of version information, status information, grayscale information, and effective time range information.

3. The method according to claim 1, characterized in that, The method further includes: dynamically adjusting the association between the management node and each instance node belonging to it and / or the second attribute information corresponding to the instance node according to the node management rules and the entity business attributes of each instance node.

4. The method according to claim 1, characterized in that, The second attribute information includes effective time range information. The method further includes: coupling the node management rules with the time management system; and in response to the time management system triggering a target time point, selecting the instance nodes from the instance nodes whose effective time range information corresponds to the target time point as target instance nodes, and switching the management node to establish an association relationship with the target instance node.

5. The method according to claim 2, characterized in that, The status information includes an active state and an inactive state. The method further includes: setting the status information of the target instance node to an active state and setting the status information of other instance nodes to an inactive state; wherein, the other instance nodes refer to the instance nodes that have not been selected as the target instance node.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: receiving a first query instruction, performing a query operation on the relationship graph model according to the first query instruction to obtain a relationship graph; hiding each of the management nodes in the relationship graph and displaying the relationship graph according to the node management rules; and / or receiving a second query instruction, performing a query operation on the relationship graph model according to the second query instruction to obtain the entity business attributes of each instance node in terms of time axis.

7. A relational graph construction device, characterized in that, The device includes: a node type classification module, used to determine the type of each node, and classify multiple nodes into management nodes and instance nodes belonging to each management node according to the type; a rule attribute configuration module, used to associate first attribute information with each management node and second attribute information with each instance node; wherein the first attribute information is information representing node management rules, and the second attribute information is information representing entity business attributes; and an association relationship configuration module, used to configure a first relationship identifier between each management node and its subordinate instance nodes, and configure a second relationship identifier between each management node and its dependent adjacent layer instance nodes; The system includes a graph model construction module, used to construct a relation graph model based on the management node, the instance node, the first attribute information, the second attribute information, the first relation identifier, and the second relation identifier; the graph model construction module is also used to convert the relation graph model into a query statement using an object relation mapping tool; and to perform database write or update operations, using the management node and the instance node as database tables, the first relation identifier and the second relation identifier as association relation tables, and the first attribute information and the second attribute information as table fields, to convert the relation graph model into a database table structure.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

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

Citation Information

Patent Citations

  • Display method and device, electronic equipment and storage medium

    CN111078967A