CN111949831B - Graphic database establishing method and device and readable storage medium - Google Patents

Graphic database establishing method and device and readable storage medium Download PDF

Info

Publication number
CN111949831B
CN111949831B CN202010793840.3A CN202010793840A CN111949831B CN 111949831 B CN111949831 B CN 111949831B CN 202010793840 A CN202010793840 A CN 202010793840A CN 111949831 B CN111949831 B CN 111949831B
Authority
CN
China
Prior art keywords
nodes
input node
data
node data
association
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010793840.3A
Other languages
Chinese (zh)
Other versions
CN111949831A (en
Inventor
崔林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010793840.3A priority Critical patent/CN111949831B/en
Publication of CN111949831A publication Critical patent/CN111949831A/en
Application granted granted Critical
Publication of CN111949831B publication Critical patent/CN111949831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a method and a device for establishing a graphic database and a readable storage medium, wherein the method comprises the following steps: acquiring nodes, node attributes and association relations among the nodes; generating an association relation tree according to the association relation between the nodes; and establishing a graph database according to the nodes, the node attributes and the association relation tree. By utilizing the technical scheme provided by the embodiment of the application, under the condition that the architecture is changed, the database does not need to be redesigned, so that the maintenance efficiency of the database and the safety and accuracy of the data are ensured.

Description

Graphic database establishing method and device and readable storage medium
Technical Field
The application belongs to the technical field of databases, and particularly relates to a method and a device for establishing a graphic database and a readable storage medium.
Background
With the continuous development of science and technology, data is increased, so that a great deal of manpower and material resources are required to be consumed to maintain various resources and relations. Due to the wide variety of data, complex data structures and frequent changes in business logic, it is difficult to perform particularly efficient data sorting even with very expensive resources.
A configuration management database (Configuration Management Database, abbreviated CMDB) is a logical database throughout the entire corporate, business lifecycle. Maintenance of the configuration management database may be referred to as configuration management. The purpose of configuration management is to assist in managing the economic value of IT services by maintaining logical patterns of IT infrastructure and IT services, and to provide this relevant information to other business processes. In particular, the objectives may be achieved by identifying, monitoring, controlling and providing information about configuration items and versions thereof. The CMDB stores various information related to the enterprise management IT architecture, which is closely related to all the processes of service support, service delivery, etc., for supporting the operation of these processes and maintaining the configuration of the service, so that the real-time performance, accuracy and integrity of the CMDB need to be strictly ensured.
However, in the existing mode based on the traditional relational database, the structural relationship between all management information and managed information needs to be clarified in the design stage of the initial stage of construction, but once the business of an enterprise changes, structural adjustment needs to be performed according to the change, so that a large amount of structural change is possibly involved, and quick adjustment is difficult; the traditional relational database-based mode program is complex, huge and redundant in design, poor in use experience, flexibility and expansibility, and a large amount of manpower and material resources are consumed by manually inputting a large amount of information. When the business, data and relation change, personnel maintenance can hardly ensure the accuracy, timeliness, safety and integrity of the data.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The purpose of the application is to provide a graphic database establishing method and device and a readable storage medium, which can realize that the database is not required to be redesigned under the condition that the architecture is changed, and ensure the efficiency of database maintenance and the safety and accuracy of data.
The application provides a graphic database establishment method and device, and a readable storage medium, which are realized in the following way:
a method of graphical database creation, the method comprising:
acquiring nodes, node attributes and association relations among the nodes;
generating an association relation tree according to the association relation between the nodes;
and establishing a graph database according to the nodes, the node attributes and the association relation tree.
In one embodiment, after establishing the graph database according to the node, the node attribute and the association relation tree, the method further comprises:
receiving externally input node data;
determining the data type of the input node data;
determining whether metadata information of the same data type as the input node data exists;
if the metadata information with the same data type as the input node data does not exist, directly comparing the input node data with the nodes in the graph database so as to update the graph database through the input node data;
If metadata information of the same data type as the input node data exists, determining whether the attribute of the input node data accords with a rule defined in the metadata information;
if not, determining that the input node data is not input into the graphic database, and alarming;
and if the input node data is in accordance with the input node data, comparing the input node data with the nodes in the graph database so as to update the graph database through the input node data.
In one embodiment, the method further comprises:
receiving a modification request of a user for metadata definition information;
after receiving the modification request, verifying the node data in the graphic database through the modified metadata definition information;
and if node data which does not accord with the modified metadata definition information exists, alarming.
In one embodiment, after updating the graphic database according to externally input node data, the method further comprises:
after updating the graphic database according to externally input node data, determining whether the association relation of each node changes;
If there is a node whose association is changed, updating the node relationship in the association tree according to the determined change.
In one embodiment, after establishing the graph database according to the node, the node attribute and the association relation tree, the method further comprises:
receiving externally input node relations;
comparing the externally input node relation with the node relation in the association relation tree;
if the change exists, updating the node relation in the association relation tree according to the input node relation.
In one embodiment, after establishing the graph database according to the node, the node attribute and the association relation tree, the method further comprises:
acquiring a query request of a user;
acquiring authority information of a user and node attributes of nodes requested to be queried by the user based on the query request;
and according to the authority information and the node attribute of the node requesting the inquiry, the node topology data in the authority are called from the association relation tree and displayed.
In one embodiment, after establishing the graph database according to the node, the node attribute and the association relation tree, the method further comprises:
determining whether a trigger condition is satisfied;
Under the condition that the trigger condition is met is determined, determining whether node relations exist in the association relation tree and do not exist in the graph database;
if so, determining the node relation as island node data and giving an alarm.
In one embodiment, generating an association tree according to an association between nodes includes:
acquiring a source type, a source attribute, a target type and a target attribute defined by a user;
and establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
A graphic database creation apparatus comprising:
the first acquisition module is used for acquiring the nodes, the node attributes and the association relation among the nodes;
the generation module is used for generating an association relation tree according to the association relation between the nodes;
the building module is used for building a graph database according to the nodes, the node attributes and the association relation tree.
In one embodiment, the apparatus further comprises:
the receiving module is used for receiving externally input node data after a graph database is established according to the nodes, the node attributes and the association relation tree;
the first determining module is used for determining the data type of the input node data;
A second determining module for determining whether metadata information of the same data type as the input node data exists;
a first updating module, configured to directly compare the input node data with nodes in the graph database to update the graph database through the input node data when it is determined that metadata information having the same data type as the input node data does not exist;
a third determining module, configured to determine, in the presence of metadata information of the same data type as the input node data, whether an attribute of the input node data conforms to a rule defined in the metadata information;
the first alarm module is used for determining that the input node data is not input into the graphic database and giving an alarm under the condition of determining that the input node data is not met;
and the second updating module is used for comparing the input node data with the nodes in the graphic database under the condition of coincidence so as to update the graphic database through the input node data.
In one embodiment, the apparatus further comprises:
The first receiving module is used for receiving a modification request of a user for metadata definition information;
the verification module is used for verifying the data of each node in the graphic database through the modified metadata definition information after receiving the modification request;
and the second alarm module is used for alarming when the node data which does not accord with the modified metadata definition information is determined to exist.
In one embodiment, the apparatus further comprises:
a fourth determining module, configured to determine whether an association relationship of each node changes after updating the graphic database according to externally input node data and updating the graphic database according to externally input node data;
and the third updating module is used for updating the node relation in the association relation tree according to the determined change under the condition that the node with the changed association relation is determined.
In one embodiment, the apparatus further comprises:
the second receiving module is used for receiving externally input node relations after a graph database is established according to the nodes, the node attributes and the association relation tree;
The comparison module is used for comparing the externally input node relation with the node relation in the association relation tree;
and the fourth updating module is used for updating the node relation in the association relation tree according to the input node relation under the condition that the change exists.
In one embodiment, the apparatus further comprises:
the second acquisition module is used for acquiring a query request of a user after a graph database is established according to the nodes, the node attributes and the association relation tree;
the third acquisition module is used for acquiring authority information of the user and node attributes of the nodes requested to be queried by the user based on the query request;
and the calling module is used for calling and displaying node topology data in the permission from the association relation tree according to the permission information and the node attribute of the node requesting to be inquired.
In one embodiment, the apparatus further comprises:
a fifth determining module, configured to determine whether a triggering condition is satisfied after the graph database is established according to the node, the node attribute, and the association tree;
a sixth determining module, configured to determine whether there is a node relationship in the association tree and no node relationship in the graph database if it is determined that the trigger condition is satisfied;
And the third alarm module is used for determining the node relation as island node data and giving an alarm under the condition that the existence is determined.
In one embodiment, the generating module includes:
the acquisition unit is used for acquiring the source type, the source attribute, the target type and the target attribute defined by the user;
the establishing unit is used for establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
The method and the device for establishing the graphic database firstly acquire the nodes, the node attributes and the association relations among the nodes, then generate an association relation tree according to the association relations among the nodes, and then establish the graphic database according to the nodes, the node attributes and the association relation tree. That is, in this example, instead of building a graphic database based on a preset data structure, the association relationship tree is built first, and then the graphic database is built, so that under the condition that the architecture is changed, the database does not need to be redesigned, and the maintenance efficiency of the database and the safety and accuracy of the data are ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a method flow diagram of one embodiment of a graphic database creation method provided herein;
FIG. 2 is a block diagram of a knowledge-based pervasive resource configuration management system provided herein;
FIG. 3 is a schematic diagram of a server architecture provided herein;
fig. 4 is a block diagram of a graphic database creation apparatus provided in the present application.
Detailed Description
In order to better understand the technical solutions in the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
FIG. 1 is a method flow diagram of one embodiment of a method of graphical database creation as described herein. Although the present application provides a method operation step or apparatus structure as shown in the following examples or figures, more or fewer operation steps or module units may be included in the method or apparatus based on routine or non-inventive labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of the steps or the module structure of the apparatus is not limited to the execution order or the module structure shown in the drawings and described in the embodiments of the present application. The described methods or module structures may be implemented sequentially or in parallel (e.g., in a parallel processor or multithreaded environment, or even in a distributed processing environment) in accordance with the embodiments or the method or module structure connection illustrated in the figures when implemented in a practical device or end product application.
Specifically, as shown in fig. 1, a method for creating a graphic database according to an embodiment of the present application may include:
step 101: acquiring nodes, node attributes and association relations among the nodes;
step 102: generating an association relation tree according to the association relation between the nodes;
step 103: and establishing a graph database according to the nodes, the node attributes and the association relation tree.
In the above example, the association relation among the nodes, the node attributes and the nodes is obtained, then an association relation tree is generated according to the association relation among the nodes, and then a graph database is established according to the nodes, the node attributes and the association relation tree. That is, in this example, instead of building a graphic database based on a preset data structure, the association relationship tree is built first, and then the graphic database is built, so that the database does not need to be redesigned under the condition that the architecture is changed, and the maintenance efficiency of the database and the safety and accuracy of the data are ensured.
Specifically, considering that, at the time of actual implementation, if newly input node data is received, newly received node data needs to be added to the graphic database, for this purpose, the addition of new node data may be performed as follows:
S1: receiving externally input node data;
s2: determining the data type of the input node data;
s3: acquiring metadata definition information of the data type in a metadata module;
s4: determining whether the input node data accords with the metadata definition information;
that is, metadata definition information is preset, the type metadata exists, and only data conforming to the metadata definition information can be used as newly added node data. That is, the added node data needs to satisfy the basic data definition, and if not, cannot be added as the newly added node data. The node may be directly added without this type of metadata information.
Specifically, after receiving externally input node data and determining the data type of the input node data, it may be determined whether metadata information having the same data type as the input node data exists; if the metadata information with the same data type as the input node data does not exist, directly comparing the input node data with the nodes in the graph database so as to update the graph database through the input node data; if metadata information of the same data type as the input node data exists, determining whether the attribute of the input node data accords with a rule defined in the metadata information; if not, determining that the input node data is not input into the graphic database, and alarming; and if the input node data is in accordance with the input node data, comparing the input node data with the nodes in the graph database so as to update the graph database through the input node data.
S5: comparing with each node data in the graphic database under the condition that the metadata definition information is confirmed to be met;
when the node data is newly added, an incremental updating mode can be adopted, namely, the node data can be compared with the current graphic database, and if the node data has the change, the change is updated, so that the data change amount can be reduced, the updating efficiency of the data in the graphic database is improved, and the workload and the resource consumption are reduced.
S6: if there is a change from the graphic database, the graphic database is updated according to externally input node data.
The metadata definition information can be set by a user, the user can also change the metadata definition information according to architecture requirements and the like, and after the change, node data in the graphic database can meet the changed metadata definition information, so that a user's request for changing the metadata definition information can be received; after receiving the modification request, verifying the node data in the graphic database through the modified metadata definition information; and if node data which does not accord with the modified metadata definition information exists, alarming.
That is, after the modification of the metadata definition information is received, each node data in the graphic database can be compared with the new metadata definition information, if the node data does not accord with the new metadata definition information, an alarm is given, and then the user or the technician adjusts the alarm, so that the problem of the data can be found in time.
The above is a modification to the node data itself, and when implementing, because of the graph database, there is an association relationship between nodes, and the node data changes, sometimes resulting in a change in the association relationship between nodes, and this change needs to be captured and updated in time into the graph database, because the association relationship tree and the graph database complement each other. Therefore, after updating the graphic database according to externally input node data, it can be determined whether the association relationship of each node is changed; if there is a node whose association relationship changes, updating the node relationship in the graphic database according to the determined change. That is, while updating the node relationships in the graph database, incremental updating may also be employed, i.e., only the portion where there is a change is modified, with the other portions remaining unchanged.
In consideration of actual implementation, there is also a need to directly modify node relationships, and therefore, after a graph database is established according to nodes, node attributes and the association relationship tree, the node relationships input from the outside can be received; comparing the externally input node relation with the node relation in the association relation tree; if the change exists, updating the node relation in the association relation tree according to the input node relation.
The graphic database established by the method for establishing the graphic database provided by the example can provide a query function, for example, after the graphic database is established according to the nodes, the node attributes and the association relation tree, a query request of a user can be obtained; acquiring authority information of a user and node attributes of nodes requested to be queried by the user based on the query request; and according to the authority information and the node attribute of the node requesting the inquiry, retrieving and displaying the node topology data in the authority from the graphic database. That is, the data within the rights may be displayed based on joint judgment of the node attributes and the person attributes. That is, different users can be provided with different data viewing authorities, so that the security of the data can be ensured.
In order to perform integrity check to avoid island nodes that have an existing association model but do not establish an association relationship, in this example, a check procedure may be set, for example: determining whether a trigger condition is satisfied; under the condition that the trigger condition is met is determined, determining whether node relations exist in the association relation tree and do not exist in the graph database; if so, determining the node relation as island node data and giving an alarm.
The triggering condition may be that the relationship integrity verification module polls at regular time, or that the relationship integrity verification module polls when the node changes. The specific mode or modes adopted as the triggering conditions are not limited, and can be selected according to actual needs.
Specifically, when an association tree is generated according to the association between nodes, a source type, a source attribute, a target type and a target attribute defined by a user can be obtained; and then, establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
The above method is described below in connection with a specific embodiment, however, it should be noted that this specific embodiment is only for better illustrating the present application and is not meant to be a undue limitation on the present application.
In the embodiment, a universal resource configuration management platform independent of node types, node attributes and the like is established, so that the automatic maintenance of association relations and the automatic monitoring of node islands can be realized, and a multi-level visual query function can be provided according to user requirements, thereby solving the problems that the traditional CMDB requires a large amount of manpower maintenance and cannot realize the dynamic expansion and batch update of nodes.
Specifically, in this example, a system and a method for pervasive resource configuration management based on a knowledge graph are provided, where the configuration system may be as shown in fig. 2, and includes: a graph database for storing nodes and relationships and their respective associated attributes; the forwarding module is used for receiving node data from different external sources; the node module is used for performing operations such as adding, deleting and the like on the nodes and the attributes thereof; the relation module is used for performing operations such as adding, deleting, and the like on the relation among the nodes; the model module is used for defining the association relation between the nodes and generating an association relation tree; the metadata module is used for defining default mandatory properties of nodes and relations thereof; the query module is used for searching detailed information of the nodes and the relations of the nodes and performing visual display; the monitoring module is used for monitoring the configuration change condition, notifying and displaying; and the relation integrity verification module is used for verifying whether the node has an island phenomenon or not.
The configuration system based on the above may form a graphic database as follows:
1) Node changes, may include:
s1: the forwarding module receives information such as data of various data nodes from various data sources, operation types and the like, and simultaneously obtains information such as default values, attribute types and the like of the data in the metadata module. For data conforming to the metadata definition information, processing is performed by the node module.
S2: and the node module judges which nodes need to be modified according to the operation type, and updates the nodes needing to be modified into the graph database.
S3: and acquiring an association relation tree of the model module, judging whether the node relation of the node needs to be modified, and for the node needing to be modified, sending a message to a forwarding module by the node module to trigger the relation to be processed.
2) Relationship changes, which may include:
s1: after receiving the relation modification notification, the forwarding module forwards the relation modification notification to the relation module for relation change;
s2: the relation module acquires the association relation tree of the model module, compares the association relation tree with the relation in the relation modification notification to determine whether the relation needs modification or not, and updates the graphic database if the relation needs modification.
3) Model changes, which may include:
s1: the model module establishes an association relationship between two types of nodes according to a basic four-element group of a source type, a source attribute, a target type and a target attribute defined by a user, and establishes a complete tree structure of the relationship between the nodes.
S2: the model module notifies the relationship module to process for the relationship with the change.
S3: the relation module acquires the association relation tree of the model module, compares the association relation tree with the relation in the relation modification notification to determine whether the relation needs modification or not, and updates the graphic database if the relation needs modification.
4) Metadata processing may include:
s1: the metadata module modifies metadata default information according to user definition and informs the node module to perform metadata verification.
S2: the node module verifies whether the node information accords with the rule according to the change of the metadata module, modifies the node information content according to the metadata verification information, and alarms the metadata which do not meet the condition. And for nodes without metadata, skipping metadata verification and directly updating.
S3: for the nodes with modified attributes, the relation module is notified to perform relation adjustment.
5) Query processing may include:
S1: the query module obtains a user query condition.
S2: the query module acquires the association relation tree in the model module, searches the node topology required by the user according to the query condition of the user and displays the node topology in a visual mode. Specifically, when query display is performed, data in the user permission can be displayed according to the node attribute and the identity attribute of the user.
6) The monitoring process may include:
s1: and when the node and the relation change, the monitoring module is informed to process.
S2: the monitoring module informs corresponding personnel according to the change condition and performs comparison display on the CMDB;
7) Relationship integrity verification may include:
and the relation integrity verification module is used for verifying all island nodes (namely, node relations which exist in the association relation tree of the model module but do not exist in the graphic data of the graphic database) which have the association model but do not establish the association relation, and notifying corresponding personnel to process.
In the above example, compared with the existing CMDB, the general resource configuration management platform based on the graphic database has no type limitation on various node resources, no quantity structure limitation on resource attributes, can define the relationship, the node and the attribute of any two resources, and can dynamically add and delete any information of the node, the relationship and the attribute, thereby being flexible and convenient. Meanwhile, the conditions of untimely, incomplete and incorrect conditions possibly caused by manual maintenance of nodes, relations and attributes can be solved through dynamic maintenance relation association, so that the working pressure can be reduced, the maintenance time is shortened, and the functions of visual inquiry, split right notification and the like are realized.
The method embodiments provided in the above embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the operation on a server as an example, fig. 3 is a block diagram of the hardware structure of a computer terminal of a graphic database establishing method according to an embodiment of the present invention. As shown in fig. 3, the server 10 may include one or more (only one is shown in the figure) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 3 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the server 10 may also include more or fewer components than shown in FIG. 3, or have a different configuration than shown in FIG. 3.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the graphic database creation method in the embodiment of the present invention, and the processor 102 executes the software programs and modules stored in the memory 104 to perform various functional applications and data processing, that is, implement the graphic database creation method of the application program. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 106 is used to receive or transmit data via a network. The specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission module 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
At the software level, the apparatus may, as shown in fig. 4, include:
a first obtaining module 401, configured to obtain a node, a node attribute, and an association relationship between the nodes;
a generating module 402, configured to generate an association tree according to the association between nodes;
the building module 403 is configured to build a graph database according to the node, the node attribute and the association tree.
In one embodiment, the graphic database creation device may further include: a second determining module for determining whether metadata information of the same data type as the input node data exists; a first updating module, configured to directly compare the input node data with nodes in the graph database to update the graph database through the input node data when it is determined that metadata information having the same data type as the input node data does not exist; a third determining module, configured to determine, in the presence of metadata information of the same data type as the input node data, whether an attribute of the input node data conforms to a rule defined in the metadata information; the alarm module is used for determining that the input node data is not input into the graphic database and giving an alarm under the condition of determining that the input node data is not met; and the second updating module is used for comparing the input node data with the nodes in the graphic database under the condition of coincidence so as to update the graphic database through the input node data.
In one embodiment, the graphic database creation device may further include: the first receiving module is used for receiving a modification request of a user for metadata definition information; the verification module is used for verifying the data of each node in the graphic database through the modified metadata definition information after receiving the modification request; and the second alarm module is used for alarming when the node data which does not accord with the modified metadata definition information is determined to exist.
In one embodiment, the graphic database creation device may further include: a fourth determining module, configured to determine whether an association relationship of each node changes after updating the graphic database according to externally input node data and updating the graphic database according to externally input node data; and the third updating module is used for updating the node relation in the association relation tree according to the determined change under the condition that the node with the changed association relation is determined.
In one embodiment, the graphic database creation device may further include: the second receiving module is used for receiving externally input node relations after a graph database is established according to the nodes, the node attributes and the association relation tree; the comparison module is used for comparing the externally input node relation with the node relation in the association relation tree; and the fourth updating module is used for updating the node relation in the association relation tree according to the input node relation under the condition that the change exists.
In one embodiment, the graphic database creation device may further include: the second acquisition module is used for acquiring a query request of a user after a graph database is established according to the nodes, the node attributes and the association relation tree; the third acquisition module is used for acquiring authority information of the user and node attributes of the nodes requested to be queried by the user based on the query request; and the calling module is used for calling and displaying node topology data in the permission from the association relation tree according to the permission information and the node attribute of the node requesting to be inquired.
In one embodiment, the graphic database creation device may further include: a fifth determining module, configured to determine whether a triggering condition is satisfied after the graph database is established according to the node, the node attribute, and the association tree; a sixth determining module, configured to determine whether there is a node relationship in the association tree and no node relationship in the graph database if it is determined that the trigger condition is satisfied; and the third alarm module is used for determining the node relation as island node data and giving an alarm under the condition that the existence is determined.
In one embodiment, the generating module 402 may include: the acquisition unit is used for acquiring the source type, the source attribute, the target type and the target attribute defined by the user; the establishing unit is used for establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
The embodiment of the application also provides a specific implementation mode of the electronic device capable of realizing all the steps in the graphic database establishing method in the embodiment, and the electronic device specifically comprises the following contents: a processor (processor), a memory (memory), a communication interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete communication with each other through the bus; the processor is configured to invoke the computer program in the memory, where the processor executes the computer program to implement all the steps in the method for creating a graphic database in the foregoing embodiment, for example, the processor executes the computer program to implement the following steps:
step 1: acquiring nodes, node attributes and association relations among the nodes;
step 2: generating an association relation tree according to the association relation between the nodes;
step 3: and establishing a graph database according to the nodes, the node attributes and the association relation tree.
From the above description, the embodiment of the present application obtains the node, the node attribute and the association relationship between the nodes, then generates an association relationship tree according to the association relationship between the nodes, and then establishes a graph database according to the node, the node attribute and the association relationship tree. That is, in this example, instead of building a graphic database based on a preset data structure, the association relationship tree is built first, and then the graphic database is built, so that the database does not need to be redesigned under the condition that the architecture is changed, and the maintenance efficiency of the database and the safety and accuracy of the data are ensured.
The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the graphic database creation method in the above embodiments, the computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements all the steps of the graphic database creation method in the above embodiments, for example, the processor implementing the following steps when executing the computer program:
step 1: acquiring nodes, node attributes and association relations among the nodes;
step 2: generating an association relation tree according to the association relation between the nodes;
step 3: and establishing a graph database according to the nodes, the node attributes and the association relation tree.
From the above description, the embodiment of the present application obtains the node, the node attribute and the association relationship between the nodes, then generates an association relationship tree according to the association relationship between the nodes, and then establishes a graph database according to the node, the node attribute and the association relationship tree. That is, in this example, instead of building a graphic database based on a preset data structure, the association relationship tree is built first, and then the graphic database is built, so that the database does not need to be redesigned under the condition that the architecture is changed, and the maintenance efficiency of the database and the safety and accuracy of the data are ensured.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a hardware+program class embodiment, the description is relatively simple, as it is substantially similar to the method embodiment, as relevant see the partial description of the method embodiment.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Although the present application provides method operational steps as described in the examples or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented by an actual device or client product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiments or figures.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a car-mounted human-computer interaction device, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Although the present description provides method operational steps as described in the examples or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented in an actual device or end product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even in a distributed data processing environment) as illustrated by the embodiments or by the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, it is not excluded that additional identical or equivalent elements may be present in a process, method, article, or apparatus that comprises a described element.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, when implementing the embodiments of the present disclosure, the functions of each module may be implemented in the same or multiple pieces of software and/or hardware, or a module that implements the same function may be implemented by multiple sub-modules or a combination of sub-units, or the like. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller can be regarded as a hardware component, and means for implementing various functions included therein can also be regarded as a structure within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description embodiments may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present embodiments may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments. In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing is merely an example of an embodiment of the present disclosure and is not intended to limit the embodiment of the present disclosure. Various modifications and variations of the illustrative embodiments will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of the embodiments of the present specification, should be included in the scope of the claims of the present application.

Claims (9)

1. A method of creating a graphic database, the method comprising:
acquiring nodes, node attributes and association relations among the nodes;
generating an association relation tree according to the association relation between the nodes;
establishing a graph database according to the nodes, the node attributes and the association relation tree;
wherein after the graphic database is established according to the nodes, the node attributes and the association relation tree, the method further comprises the following steps:
receiving externally input node data;
determining the data type of the input node data;
determining whether metadata information of the same data type as the input node data exists;
if the metadata information with the same data type as the input node data does not exist, directly comparing the input node data with the nodes in the graph database so as to update the graph database through the input node data;
If metadata information of the same data type as the input node data exists, determining whether the attribute of the input node data accords with a rule defined in the metadata information;
if not, determining that the input node data is not input into the graphic database, and alarming;
if yes, comparing the input node data with nodes in the graph database to update the graph database through the input node data;
wherein, generating an association tree according to the association between nodes, comprising:
acquiring a source type, a source attribute, a target type and a target attribute defined by a user;
and establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
2. The method as recited in claim 1, further comprising:
receiving a modification request of a user for metadata definition information;
after receiving the modification request, verifying the node data in the graphic database through the modified metadata definition information;
and if node data which does not accord with the modified metadata definition information exists, alarming.
3. The method of claim 1, further comprising, after updating the graphic database according to externally input node data:
after updating the graphic database according to externally input node data, determining whether the association relation of each node changes;
if there is a node whose association is changed, updating the node relationship in the association tree according to the determined change.
4. The method of claim 1, further comprising, after building a graph database from nodes, node attributes, and the association tree:
receiving externally input node relations;
comparing the externally input node relation with the node relation in the association relation tree;
if the change exists, updating the node relation in the association relation tree according to the input node relation.
5. The method of claim 1, further comprising, after building a graph database from nodes, node attributes, and the association tree:
acquiring a query request of a user;
acquiring authority information of a user and node attributes of nodes requested to be queried by the user based on the query request;
And according to the authority information and the node attribute of the node requesting the query, according to the information defined by the association relation tree, the node topology data in the authority are called from the graphic database and displayed.
6. The method of claim 1, further comprising, after building a graph database from nodes, node attributes, and the association tree:
determining whether a trigger condition is satisfied;
under the condition that the trigger condition is met is determined, determining whether node relations exist in the association relation tree and do not exist in the graph database;
if so, determining the node relation as island node data and giving an alarm.
7. A graphic database creation apparatus, comprising:
the first acquisition module is used for acquiring the nodes, the node attributes and the association relation among the nodes;
the generation module is used for generating an association relation tree according to the association relation between the nodes;
the building module is used for building a graph database according to the nodes, the node attributes and the association relation tree;
wherein, the device further includes:
the receiving module is used for receiving externally input node data after a graph database is established according to the nodes, the node attributes and the association relation tree;
The first determining module is used for determining the data type of the input node data;
a second determining module for determining whether metadata information of the same data type as the input node data exists;
a first updating module, configured to directly compare the input node data with nodes in the graph database to update the graph database through the input node data when it is determined that metadata information having the same data type as the input node data does not exist;
a third determining module, configured to determine, in the presence of metadata information of the same data type as the input node data, whether an attribute of the input node data conforms to a rule defined in the metadata information;
the alarm module is used for determining that the input node data is not input into the graphic database and giving an alarm under the condition of determining that the input node data is not met;
the second updating module is used for comparing the input node data with the nodes in the graphic database under the condition of coincidence so as to update the graphic database through the input node data;
Wherein, generating an association tree according to the association between nodes, comprising:
acquiring a source type, a source attribute, a target type and a target attribute defined by a user;
and establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
8. A terminal device comprising a processor and a memory for storing processor-executable instructions, which when executed by the processor implement the steps of:
acquiring nodes, node attributes and association relations among the nodes;
generating an association relation tree according to the association relation between the nodes;
establishing a graph database according to the nodes, the node attributes and the association relation tree;
wherein after the graphic database is established according to the nodes, the node attributes and the association relation tree, the method further comprises the following steps:
receiving externally input node data;
determining the data type of the input node data;
determining whether metadata information of the same data type as the input node data exists;
if the metadata information with the same data type as the input node data does not exist, directly comparing the input node data with the nodes in the graph database so as to update the graph database through the input node data;
If metadata information of the same data type as the input node data exists, determining whether the attribute of the input node data accords with a rule defined in the metadata information;
if not, determining that the input node data is not input into the graphic database, and alarming;
if yes, comparing the input node data with nodes in the graph database to update the graph database through the input node data;
wherein, generating an association tree according to the association between nodes, comprising:
acquiring a source type, a source attribute, a target type and a target attribute defined by a user;
and establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
9. A computer readable storage medium having stored thereon computer instructions which when executed perform the steps of a method of:
acquiring nodes, node attributes and association relations among the nodes;
generating an association relation tree according to the association relation between the nodes;
establishing a graph database according to the nodes, the node attributes and the association relation tree;
Wherein after the graphic database is established according to the nodes, the node attributes and the association relation tree, the method further comprises the following steps:
receiving externally input node data;
determining the data type of the input node data;
determining whether metadata information of the same data type as the input node data exists;
if the metadata information with the same data type as the input node data does not exist, directly comparing the input node data with the nodes in the graph database so as to update the graph database through the input node data;
if metadata information of the same data type as the input node data exists, determining whether the attribute of the input node data accords with a rule defined in the metadata information;
if not, determining that the input node data is not input into the graphic database, and alarming;
if yes, comparing the input node data with nodes in the graph database to update the graph database through the input node data;
wherein, generating an association tree according to the association between nodes, comprising:
Acquiring a source type, a source attribute, a target type and a target attribute defined by a user;
and establishing the association relation tree according to the source type, the source attribute, the target type and the target attribute defined by the user.
CN202010793840.3A 2020-08-10 2020-08-10 Graphic database establishing method and device and readable storage medium Active CN111949831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010793840.3A CN111949831B (en) 2020-08-10 2020-08-10 Graphic database establishing method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010793840.3A CN111949831B (en) 2020-08-10 2020-08-10 Graphic database establishing method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN111949831A CN111949831A (en) 2020-11-17
CN111949831B true CN111949831B (en) 2023-08-08

Family

ID=73331873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010793840.3A Active CN111949831B (en) 2020-08-10 2020-08-10 Graphic database establishing method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111949831B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559804A (en) * 2020-11-27 2021-03-26 国家电网有限公司大数据中心 Graph database-based power grid CIM/E model data processing method and device
CN113239063B (en) * 2021-06-23 2024-03-29 北京金山数字娱乐科技有限公司 Graph database updating method and device
CN113434506B (en) * 2021-06-29 2023-05-16 平安科技(深圳)有限公司 Data management and retrieval method, device, computer equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855332A (en) * 2012-09-24 2013-01-02 上海天玑科技股份有限公司 Graphic configuration management database based on graphic database
CN102868601A (en) * 2012-09-24 2013-01-09 上海天玑科技股份有限公司 Routing system related to network topology based on graphic configuration database businesses
CN104123369A (en) * 2014-07-24 2014-10-29 中国移动通信集团广东有限公司 CMDB system based on graphic data base and implementation method
CN111444287A (en) * 2020-03-17 2020-07-24 北京齐尔布莱特科技有限公司 Graph database construction method, associated information query method, device and computing equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190102477A1 (en) * 2017-10-03 2019-04-04 Servicenow, Inc. Novel metadata relationships in a configuration management database
US20190114369A1 (en) * 2017-10-17 2019-04-18 Bank Of America Corporation Multidimensional graph structured database with property and relationship subclasses

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855332A (en) * 2012-09-24 2013-01-02 上海天玑科技股份有限公司 Graphic configuration management database based on graphic database
CN102868601A (en) * 2012-09-24 2013-01-09 上海天玑科技股份有限公司 Routing system related to network topology based on graphic configuration database businesses
CN104123369A (en) * 2014-07-24 2014-10-29 中国移动通信集团广东有限公司 CMDB system based on graphic data base and implementation method
CN111444287A (en) * 2020-03-17 2020-07-24 北京齐尔布莱特科技有限公司 Graph database construction method, associated information query method, device and computing equipment

Also Published As

Publication number Publication date
CN111949831A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
CN111949831B (en) Graphic database establishing method and device and readable storage medium
US8892557B2 (en) Optimal persistence of a business process
CN113157980B (en) Data synchronization method, device, equipment and storage medium
KR20140138712A (en) Synchronizing local and remote data
CN112182349A (en) Method, device and system for querying compliance file
CN112199200B (en) Resource scheduling method and device, computer equipment and storage medium
CN112035466B (en) External index development framework for block chain query
CN112686580A (en) Workflow definition method and system capable of customizing flow
CN108536447B (en) Operation and maintenance management method
CN113419921B (en) Task monitoring method, device, equipment and storage medium
CN115543428A (en) Simulated data generation method and device based on strategy template
CN112418796B (en) Sub-process task node activation method and device, electronic equipment and storage medium
US11023361B1 (en) Intelligent automated way of baselining integration content using messages from historical tests to be used for regression testing
CN113722315A (en) Data generation method and device, electronic equipment and computer readable medium
CN110896358A (en) Dynamic updating method and device for resource data in NFV
CN114268540B (en) Rule engine optimization method, device and equipment
CN111930718B (en) Node adjustment method and device for configuration management database
US20240143809A1 (en) Service and system integration
CN113760882B (en) Data abnormity alarm method and device, electronic equipment and computer readable medium
CN114710395B (en) Method for constructing network service implementation example based on digital twin technology
CN116756460B (en) Combined data acquisition method and device and related equipment
CN117112654B (en) City data display method, device, computer equipment and storage medium
US11108862B2 (en) Bi-directional data sync between a client device and an application server
CN109636324B (en) Electronic service contract processing method and device
CN115617390A (en) Configuration information maintenance method, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant