CN115618070A - Graph database-based visual modeling method, system, device and medium - Google Patents

Graph database-based visual modeling method, system, device and medium Download PDF

Info

Publication number
CN115618070A
CN115618070A CN202211610717.9A CN202211610717A CN115618070A CN 115618070 A CN115618070 A CN 115618070A CN 202211610717 A CN202211610717 A CN 202211610717A CN 115618070 A CN115618070 A CN 115618070A
Authority
CN
China
Prior art keywords
graph
creating
data
template
drawing board
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.)
Pending
Application number
CN202211610717.9A
Other languages
Chinese (zh)
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.)
Hangzhou Yueshu Technology Co ltd
Original Assignee
Hangzhou Yueshu 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 Hangzhou Yueshu Technology Co ltd filed Critical Hangzhou Yueshu Technology Co ltd
Priority to CN202211610717.9A priority Critical patent/CN115618070A/en
Publication of CN115618070A publication Critical patent/CN115618070A/en
Pending legal-status Critical Current

Links

Images

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/903Querying
    • G06F16/9038Presentation of query results

Abstract

The application relates to a graph database-based visual modeling method, system, device and medium, wherein the method comprises the following steps: creating and initializing a template drawing board, wherein the template drawing board is used for repeatedly importing data; creating a first graph on a canvas area of a template drawing board, wherein the first graph corresponds to node data in the underlying data; creating a second graph through an anchor point between the first graphs, wherein the second graph corresponds to the side data in the bottom layer data; and creating a drawing space in the drawing database, applying the template drawing board to the drawing space, and further creating a schema model in the drawing space. By the method and the device, the problem of how to efficiently and conveniently construct the schema model in the graph database is solved, the schema model is created without code sentences, and the code construction learning threshold is reduced; and rapidly creating the schema model in a visualized interactive form instead of the api sentence, and repeatedly applying the schema model to different diagram spaces.

Description

Graph database-based visual modeling method, system, device and medium
Technical Field
The present application relates to the field of graph databases, and in particular, to a graph database-based visual modeling method, system, device, and medium.
Background
With the continuous development of computer technology, nebula graph is being used by companies in more and more fields such as social networks, knowledge graphs and financial wind control as an original graph database which is sourced, distributed and easy to expand.
NebulaGraph specially designs an declarative SQL-like graph query language nGQL for development and operation and maintenance personnel, a user can add, delete, modify and check data of a graph database through the nGQL, meanwhile, the construction of a schema model in the graph database also needs to be based on the nGQL, the user needs to understand and memorize a plurality of nGQL creation sentences for creating graph spaces, points and edges, and the nGQL creation sentences are repeatedly used in the creation process, so that a higher learning threshold is added for creating a model, and the creation of the model becomes inefficient. And no statement can acquire a clear and complete graph structure after the creation.
At present, no effective solution is provided for how to efficiently and conveniently construct the schema model in the graph database in the related technology.
Disclosure of Invention
The embodiment of the application provides a graph database-based visual modeling method, a graph database-based visual modeling system, a graph database-based visual modeling device and a graph database-based visual modeling medium, so as to at least solve the problem of how to efficiently and conveniently construct a schema model in a graph database in the related technology.
In a first aspect, an embodiment of the present application provides a graph database-based visualization modeling method, where the method includes:
creating and initializing a template drawing board, wherein the template drawing board is used for repeatedly importing data;
creating a first graph on a canvas area of the template drawing board, wherein the first graph corresponds to node data in the underlying data;
creating a second graph through the anchor point between the first graphs, wherein the second graph corresponds to the edge data in the bottom layer data;
and creating a drawing space in a graph database, applying the template drawing board to the drawing space, and further creating a schema model in the drawing space.
In some of these embodiments, creating a second graphic via an anchor point between the first graphics comprises:
selecting a starting point anchor point of a starting point first graph, and selecting an end point anchor point of an end point first graph;
and creating a second graph between the starting point anchor point and the ending point anchor point so as to connect the starting point first graph and the ending point first graph.
In some of these embodiments, creating and initializing a template palette comprises:
based on a Nebula Graph database, taking a editor Graph editing library as a bottom rendering library, wherein the bottom rendering library is used for registering containers, nodes and edges;
and registering the basic style and the built-in model basic attribute of the definition node, registering the basic style and the built-in model basic attribute of the definition edge, and registering the initialization container to obtain the template drawing board.
In some of these embodiments, after creating the second graphic, the method includes:
counting the number of second graphs corresponding to the starting point first graph and the end point first graph, and setting an initial value of an initial index according to the number;
traversing the second graphs, adding graph index attributes to each second graph, and assigning the graph index attributes according to the initial values to obtain data values of the graph index attributes;
and drawing a Bezier curve according to the data value and the preset curvature so as to optimize the layout of the second graph.
In some of these embodiments, after creating the second graphic, the method includes:
and supplementing basic parameter information for the second graph, performing parameter validity check, and synchronously updating the basic parameter information into attribute data of a corresponding edge of the second graph, wherein the basic parameter information comprises a name, remarks and associated attributes of a complete edge type.
In some of these embodiments, after creating the first graphic, the method includes:
and supplementing basic parameter information for the first graph, performing parameter validity check, and synchronously updating the basic parameter information to attribute data of a corresponding node of the first graph, wherein the basic parameter information comprises the name, remark and associated attributes of a complete label.
In some embodiments, after creating the schema model, the method further comprises:
acquiring basic parameter information of the label and the edge type in the graph space through the query statement of the graph database;
acquiring data of the label and the edge type according to the basic parameter information of the label and the edge type;
and (3) the data of the label and the edge type are arranged and abstracted into json data of nodes and edges, and a complete data model is rendered by adopting a editor diagram editing library.
In a second aspect, an embodiment of the present application provides a graph database-based visualization modeling system, which includes an initialization module, a graph creation module, and a template application module;
the initialization module is used for creating and initializing a template drawing board, and the template drawing board is used for repeatedly importing data;
the graph creating module is used for creating a first graph on a canvas area of the template drawing board, wherein the first graph corresponds to node data in the underlying data; creating a second graph through the anchor point between the first graphs, wherein the second graph corresponds to the edge data in the bottom layer data;
the template application module is used for creating a drawing space in a drawing database, applying the template drawing board to the drawing space and further creating a schema model in the drawing space.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor, when executing the computer program, implements the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to the first aspect.
Compared with the related art, the graph database-based visual modeling method, system, device and medium provided by the embodiment of the application are characterized in that a template drawing board is created and initialized, and the template drawing board is used for importing data repeatedly; creating a first graph on a canvas area of a template drawing board, wherein the first graph corresponds to node data in the underlying data; creating a second graph through an anchor point between the first graphs, wherein the second graph corresponds to the side data in the bottom layer data; creating a graph space in a graph database, applying a template drawing board to the graph space, and further creating a schema model in the graph space, so that the problem of how to efficiently and conveniently construct the schema model in the graph database is solved, the schema model is created without a code statement, and the code construction learning threshold is reduced; and rapidly creating the schema model in a visualized interactive form instead of the api sentence, and repeatedly applying the schema model to different diagram spaces.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of steps of a graph database based visualization modeling method according to an embodiment of the present application;
FIG. 2 is a first schematic diagram of a template palette according to an embodiment of the present application;
FIG. 3 is a second schematic diagram of a template palette according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a second graph after optimization according to an embodiment of the application;
FIG. 5 is a block diagram of a graph database based visualization modeling system according to an embodiment of the present application;
fig. 6 is an internal structural diagram of an electronic device according to an embodiment of the present application.
Description of the drawings: 51. initializing a module; 52. a graph creation module; 53. and a template application module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but rather can include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, "a and/or B" may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The embodiment of the present application provides a graph database-based visual modeling method, and fig. 1 is a flowchart illustrating steps of the graph database-based visual modeling method according to the embodiment of the present application, as shown in fig. 1, the method includes the following steps:
step S102, a template drawing board is created and initialized, and the template drawing board is used for repeatedly importing data;
step S102, specifically, based on the Nebula Graph database, a editor Graph editing library is used as a bottom rendering library, and the bottom rendering library is used for registering containers, nodes and edges;
registering basic styles and built-in model basic properties of the definition nodes, and registering basic styles and built-in model basic properties of the definition edges, preferably the registering code is implemented as follows:
node:{x:number, y:number, width:number, height:number, uuid:string, name:string, comment:string, properties, color:string};
line:{from:string, to:string, uuid:string, name:string, comment:string, properties};
registering the initialization container to obtain a template drawing board, preferably the registration code is implemented as follows:
{nodes:[], lines:[]}。
step S104, creating a first graph on a canvas area of the template drawing board, wherein the first graph corresponds to node data in the underlying data;
step S104, preferably, fig. 2 is a schematic diagram i of a template drawing board according to an embodiment of the present application, as shown in fig. 2, a circle (a first graph) is dragged to any position of a canvas on a tag (tag) operation bar of the template drawing board, where the circle is a node (node) in the schema model, and when a node is added in a canvas area, node data is added in bottom layer data nodes, uuid in the node data is a unique identifier thereof, and in addition, the canvas area also has a coordinate system function, and x and y are canvas coordinate information.
And step S104, supplementing basic parameter information to the first graph in a detail panel of the template drawing board, performing parameter validity check, and synchronously updating the basic parameter information to the attribute data of the corresponding node of the first graph, where the basic parameter information includes a name (name), a comment (comment), and an associated attribute (properties) of the complete label.
Step S106, creating a second graph through the anchor point between the first graphs, wherein the second graph corresponds to the side data in the bottom layer data;
step S106, specifically, selecting a starting point anchor point of the starting point first graph and selecting an end point anchor point of the end point first graph; a second graph is created between the start point anchor point and the end point anchor point to connect the start point first graph and the end point first graph.
Step S106 is preferably that fig. 3 is a schematic diagram two of the template drawing board according to the embodiment of the present application, as shown in fig. 3, a line (line) data is added to the bottom layer data lines by clicking an anchor point (multiple anchor points may be on a circle) on a starting point circle in a canvas area of the selected template drawing board and then dragging to any anchor point of an ending point circle, where uuid in the line data is a unique identifier of the line data.
And step S106 is followed by supplementing basic parameter information to the second graph in the detail panel of the template drawing board, performing parameter validity check, and synchronously updating the basic parameter information to the attribute data of the corresponding edge of the second graph, where the basic parameter information includes a name (name), a comment (comment), and an associated attribute (properties) of the complete label.
It should be noted that, in step S106, since the user interaction behavior is a line drawn by using the anchor point as the starting point and the ending point, the shape of the line is difficult to unify when the relative positions of the nodes are different, which causes a whole view structure to be disordered, and the expression of the model relationship is not clear enough, the embodiment of the present application optimizes the final curve: all the directed edges between the nodes take the connecting line of the circle centers of the two nodes as a parting line, the Bezier curve is used for rendering a half line on the two symmetrical sides respectively, and if the number of the lines is an odd number, one line is rendered as a straight line.
The specific second graph optimization comprises the following steps:
counting the number of second graphs corresponding to a starting point first graph and an end point first graph, and setting an initial value of an initial index according to the number;
preferably, after the user drags the line to the end point, lines in the bottom-layer storage data are obtained, the number of lines between the two points is screened out by using uuid of the start point and the end point, an initial index (index) is set, if the number of lines is an odd number, the initial value of the index is 0, otherwise, the initial value of the index is 1.
Traversing second graphs, adding graph index attributes to each second graph, and assigning the graph index attributes according to initial values to obtain data values of the graph index attributes;
step two, preferably, lines are traversed, a graph index (graph index) attribute is added to each line, and the lines are assigned by increasing indexes, wherein the edges between two points are directed edges, the starting points and the ending points of a plurality of lines are possibly opposite to each other, in order to make the view table achieve clearer, the indexes of the opposite edges are set to be negative values, and the edges in opposite directions are conveniently drawn at the two ends in the subsequent drawing process.
Step three, calculating the curvature of the line according to the graph index (graph index) attribute updated in step two, and adjusting the curvature of the whole line by configuring some constants, first determining whether the data value of the graph index (graph index) is odd or even, and setting the direction (direction) to be true/false, so as to ensure that the number of both ends is symmetrical in each rendering, then rendering the same direction on the same side and the opposite side according to whether the data value of the graph index is greater than 0 adjustment position, and the last math.ceil (math.abs (graph index)/2) × 0.1 is the curvature, preferably, the final preset curvature may be set as:
curvature=(direction
Figure 561592DEST_PATH_IMAGE001
1:-1)*(graphIndex>0
Figure 243109DEST_PATH_IMAGE001
1:-1)*(Math.ceil(Math.abs(graphIndex)/2)*0.1)。
and fourthly, drawing a Bezier curve according to the data value and the preset curvature so as to optimize the layout of the second graph.
Preferably, the shortest straight line distance Math.sqrt (Math.pow (dst.x-src.x, 2) + Math.pow (dst.y-src.y, 2)) between the two circle centers is calculated, and then multiplied by the curvature to obtain the relative offset; calculating the azimuth angle of the circle centers of the two nodes by Math.atan 2; then obtaining the coordinate of the middle point of a straight line between two circle centers, calculating the coordinate after deviation according to the relative deviation amount and the azimuth angle, namely the control point of the secondary Bezier curve, wherein the calculated deviation amount is also arranged at two sides of the straight line because the indexes of the two direction sides have positive and negative relations, and thus the lines in different directions are respectively drawn at two sides, so that the structure is relatively clear; and finally, drawing a final Bezier curve and an arrow according to the coordinates of the circle center and the coordinates of the control points so as to optimize the layout of the second graph. Fig. 4 is a schematic diagram of a second graph after optimization according to an embodiment of the application.
And step S108, creating a drawing space in the drawing database, applying the template drawing board to the drawing space, and further creating a schema model in the drawing space.
Step S108 preferably, a diagram space is created and a template schema structure is imported, or a template schema structure is directly imported in an existing diagram space; and sending statements corresponding to all tag and edge types to the NebuLAGraph database by splicing statements CREATE $ { type } $ { name } $ { propertisString) COMMENT = "$ { COMMENT }", thereby sequentially creating the schema model.
It should be noted that, for a graph database with weak relationship constraint, the current industry lacks an existing query language or other approaches to quickly and intuitively obtain the schema model. But the user will often want to show his data and relationships in a more macroscopically clear angle for further presentation or analysis in some situations.
In order to solve the problem, in the embodiment of the present application, the relationship between the actually inserted data is obtained by fetching the data stored in the database, and the current complete data model is gradually calculated after internal relationship mapping and data cleaning, theoretically, the more the fetched data is, the higher the accuracy of the final model is, and if the user data itself has strong constraint, even a small amount of data is sufficient, and the specific implementation manner is as follows:
acquiring basic parameter information of labels and edge types in a graph space through query statements of a graph database; acquiring data of the label and the edge type according to the basic parameter information of the label and the edge type; and (3) sorting and abstracting the data of the label and the edge type into json data of the nodes and the edges, and rendering a complete data model by adopting a vector diagram editing library.
Preferably, basic information (name, remark and associated attributes) of existing labels and EDGE types in the current graph space is obtained by using the SHOW TAGS, SHOW EDGES, DESCRIBE TAG and DESCRIBE EDGE statements.
And traversing and splicing all the obtained edge types into a plurality of match () - [ e: $ { edge type } ] → () return e limit $ { number } sentences, and randomly fishing the data of each edge type in the database, wherein the number is the randomly fished number and can be flexibly configured.
And then, acquiring a certain amount of data of all edge types by using the query statement, wherein each piece of data comprises the edge types and the corresponding id of the starting point and the end point.
After the obtained id of the starting point and the end point is repeatedly filtered, the detailed information of all points is inquired by using match (v) where id (v) in [ $ { ids } ] return id (v) as id and tags (v), and then the tag associated with each point can be obtained.
All edge type data and the labels represented by its start and end points are thus obtained.
And (3) sorting and abstracting the label and edge type data into json data of nodes and lines, and quickly rendering a complete data model by using a vector diagram editing library.
Finally the front-end will buffer this result and sample 1% for subsequent queries to check if the current model is correct or not, requiring correction.
In addition, in this embodiment, after the first graph and the second graph are created on the canvas area of the template drawing board, the overall layout can be adjusted by dragging, and finally the { nodes: [ ], lines: [ ] } stored in the bottom layer includes layout information x and y of each node and schema information name/comment/properties, and a specific example of the bottom layer code is as follows:
{
"nodes": [{
"x": 497,
"y": 349.5,
"width": 80,
"height": 80,
"name": "player",
"type": "tag",
"comment" includes "player",
"properties": [{
"name": "name",
"type": "string",
"fixedLength": ""
}, {
"name": "age",
"type": "int",
"fixedLength": ""
}],
"uuid": "4ec86a1055a711eda47f1d9b46f1dc06"
}, {
"x": 710,
"y": 333.5,
"width": 80,
"height": 80,
"name": "team",
"type": "tag",
"comment": team ",
"properties": [{
"name": "name",
"type": "string",
"fixedLength": ""
}],
"uuid": "4f9de28055a711eda47f1d9b46f1dc06"
}],
"lines": [{
"from": "4ec86a1055a711eda47f1d9b46f1dc06",
"to": "4f9de28055a711eda47f1d9b46f1dc06",
"uuid": "699f7270-55a7-11ed-a47f-1d9b46f1dc06",
"graphIndex": 0,
"type": "edge",
"name": "serve",
"comment" means "service",
"properties": [{
"name": "start_year",
"type": "int",
"fixedLength": ""
}, {
"name": "end_year",
"type": "int",
"fixedLength": ""
}],
}]
}
through the steps S102 to S108 in the embodiment of the application, the schema model is not required to be created through a code statement, and the code construction learning threshold is reduced; and rapidly creating the schema model in a visualized interactive form instead of the api sentence, and repeatedly applying the schema model to different diagram spaces. The directed edges among the nodes are dynamically calculated to update the curve positions in real time, and lines in opposite directions are separated, so that the structural expression is clearer. Meanwhile, in a point-edge weak relational database such as NebuLAGraph, since the database is not internally stored and cannot acquire a complete schema structure through query sentences, all point-edge type information is acquired through the sentences, and a certain amount of data is randomly fished to calculate and draw the complete schema structure.
It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
Fig. 5 is a block diagram of a graph database-based visualization modeling system according to an embodiment of the present application, and as shown in fig. 5, the system includes an initialization module 51, a graph creation module 52, and a template application module 53;
an initialization module 51, configured to create and initialize a template drawing board, where the template drawing board is used to repeatedly import data;
the graph creating module 52 is configured to create a first graph on a canvas area of the template drawing board, where the first graph corresponds to node data in the underlying data; creating a second graph through an anchor point between the first graphs, wherein the second graph corresponds to the side data in the bottom layer data;
and the template application module 53 is configured to create a drawing space in the graph database, apply the template drawing board to the drawing space, and further create a schema model in the drawing space.
Through the steps S102 to S108 in the embodiment of the application, the schema model is not required to be created through a code statement, and the code construction learning threshold is reduced; and rapidly creating the schema model by replacing api sentences in a visualized interactive form, and repeatedly applying the schema model to different diagram spaces.
In some of these embodiments, graph creation module 52 is configured to select a start anchor point for a start first graph and select an end anchor point for an end first graph; a second graph is created between the start point anchor point and the end point anchor point to connect the start point first graph and the end point first graph.
In some embodiments, the initialization module 51 is configured to use a reporter Graph editing library as a bottom rendering library based on the Nebula Graph database, where the bottom rendering library is used to register containers, nodes, and edges; registering basic styles and built-in model basic attributes of definition nodes, registering basic styles and built-in model basic attributes of definition edges, and registering an initialization container to obtain a template drawing board.
It should be noted that the above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules may be located in different processors in any combination.
The present embodiment also provides an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
In addition, in combination with the graph database-based visualization modeling method in the foregoing embodiments, the embodiments of the present application may provide a storage medium to implement. The storage medium having stored thereon a computer program; the computer program, when executed by a processor, implements any of the graph database based visualization modeling methods of the embodiments described above.
In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a graph database based visualization modeling method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In an embodiment, fig. 6 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, there is provided an electronic device, which may be a server, and its internal structure diagram may be as shown in fig. 6. The electronic device comprises a processor, a network interface, an internal memory and a non-volatile memory connected by an internal bus, wherein the non-volatile memory stores an operating system, a computer program and a database. The processor is used for providing calculation and control capability, the network interface is used for communicating with an external terminal through network connection, the internal memory is used for providing an environment for an operating system and the running of a computer program, the computer program is executed by the processor to realize a visual modeling method based on a graph database, and the database is used for storing data.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the electronic device to which the present application is applied, and a particular electronic device may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. 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 a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A visual modeling method based on a graph database, the method comprising:
creating and initializing a template drawing board, wherein the template drawing board is used for repeatedly importing data;
creating a first graph on a canvas area of the template drawing board, wherein the first graph corresponds to node data in the underlying data;
creating a second graph through the anchor point between the first graphs, wherein the second graph corresponds to the edge data in the bottom layer data;
and creating a drawing space in a drawing database, applying the template drawing board to the drawing space, and further creating a schema model in the drawing space.
2. The method of claim 1, wherein creating a second graph via an anchor point between the first graphs comprises:
selecting a starting point anchor point of a starting point first graph, and selecting an end point anchor point of an end point first graph;
and creating a second graph between the starting point anchor point and the ending point anchor point so as to connect the starting point first graph and the ending point first graph.
3. The method of claim 1, wherein creating and initializing a template palette comprises:
based on a Nebula Graph database, taking a editor Graph editing library as a bottom rendering library, wherein the bottom rendering library is used for registering containers, nodes and edges;
registering basic styles and built-in model basic attributes of definition nodes, registering basic styles and built-in model basic attributes of definition edges, and registering an initialization container to obtain a template drawing board.
4. Method according to claim 1 or 2, characterized in that after creating the second graphic, the method comprises:
counting the number of second graphs corresponding to the starting point first graph and the end point first graph, and setting an initial value of an initial index according to the number;
traversing the second graphs, adding graph index attributes to each second graph, and assigning the graph index attributes according to the initial values to obtain data values of the graph index attributes;
and drawing a Bezier curve according to the data value and a preset curvature so as to optimize the layout of the second graph.
5. The method of claim 1, wherein after creating the second graphic, the method comprises:
and supplementing basic parameter information for the second graph, performing parameter validity check, and synchronously updating the basic parameter information into attribute data of a corresponding edge of the second graph, wherein the basic parameter information comprises a name, remarks and associated attributes of a complete edge type.
6. The method of claim 1, wherein after creating the first graphic, the method comprises:
and supplementing basic parameter information for the first graph, performing parameter validity check, and synchronously updating the basic parameter information to attribute data of a corresponding node of the first graph, wherein the basic parameter information comprises the name, remark and associated attributes of a complete label.
7. The method of claim 1, wherein after creating the schema model, the method further comprises:
acquiring basic parameter information of the label and the edge type in the graph space through the query statement of the graph database;
acquiring data of the label and the edge type according to the basic parameter information of the label and the edge type;
and (3) the data of the label and the edge type are arranged and abstracted into json data of nodes and edges, and a complete data model is rendered by adopting a editor diagram editing library.
8. A visual modeling system based on a graph database is characterized by comprising an initialization module, a graph creation module and a template application module;
the initialization module is used for creating and initializing a template drawing board, and the template drawing board is used for repeatedly importing data;
the graph creating module is used for creating a first graph on a canvas area of the template drawing board, wherein the first graph corresponds to node data in the underlying data; creating a second graph through the anchor point between the first graphs, wherein the second graph corresponds to the edge data in the bottom layer data;
the template application module is used for creating a drawing space in a drawing database, applying the template drawing board to the drawing space and further creating a schema model in the drawing space.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202211610717.9A 2022-12-15 2022-12-15 Graph database-based visual modeling method, system, device and medium Pending CN115618070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211610717.9A CN115618070A (en) 2022-12-15 2022-12-15 Graph database-based visual modeling method, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211610717.9A CN115618070A (en) 2022-12-15 2022-12-15 Graph database-based visual modeling method, system, device and medium

Publications (1)

Publication Number Publication Date
CN115618070A true CN115618070A (en) 2023-01-17

Family

ID=84880451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211610717.9A Pending CN115618070A (en) 2022-12-15 2022-12-15 Graph database-based visual modeling method, system, device and medium

Country Status (1)

Country Link
CN (1) CN115618070A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116955674A (en) * 2023-09-20 2023-10-27 杭州悦数科技有限公司 Method and web device for generating graph database statement through LLM

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090198A (en) * 2017-12-22 2018-05-29 浙江创邻科技有限公司 Chart database creates and data load method, equipment and medium
US20190028369A1 (en) * 2017-07-20 2019-01-24 Servicenow, Inc. Splitting Network Discovery Payloads based on Degree of Relationships between Nodes
CN109753573A (en) * 2018-12-26 2019-05-14 北京中亦安图科技股份有限公司 A kind of processing method and processing device based on chart database building preset model
CN109857870A (en) * 2019-01-03 2019-06-07 成都数联铭品科技有限公司 Visual Ontology for knowledge mapping constructs system and method
CN114564630A (en) * 2022-02-08 2022-05-31 杭州欧若数网科技有限公司 Method, system and medium for visualizing graph data Web3D

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190028369A1 (en) * 2017-07-20 2019-01-24 Servicenow, Inc. Splitting Network Discovery Payloads based on Degree of Relationships between Nodes
CN108090198A (en) * 2017-12-22 2018-05-29 浙江创邻科技有限公司 Chart database creates and data load method, equipment and medium
CN109753573A (en) * 2018-12-26 2019-05-14 北京中亦安图科技股份有限公司 A kind of processing method and processing device based on chart database building preset model
CN109857870A (en) * 2019-01-03 2019-06-07 成都数联铭品科技有限公司 Visual Ontology for knowledge mapping constructs system and method
CN114564630A (en) * 2022-02-08 2022-05-31 杭州欧若数网科技有限公司 Method, system and medium for visualizing graph data Web3D

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116955674A (en) * 2023-09-20 2023-10-27 杭州悦数科技有限公司 Method and web device for generating graph database statement through LLM
CN116955674B (en) * 2023-09-20 2024-01-09 杭州悦数科技有限公司 Method and web device for generating graph database statement through LLM

Similar Documents

Publication Publication Date Title
CN108027818B (en) Inquiry based on figure
US10048946B2 (en) Converting visual diagrams into code
CN108492346B (en) Method and device for realizing chart assembly
US20150199378A1 (en) Method and apparatus for realizing a dynamically typed file or object system enabling a user to perform calculations over the fields associated with the files or objects in the system
CN104750771B (en) The method and system of context data analysis is carried out using domain information
US9280320B2 (en) Software design sharing systems and methods
CN112199086A (en) Automatic programming control system, method, device, electronic device and storage medium
US11023481B2 (en) Navigation platform for performing search queries
US11727058B2 (en) Unsupervised automatic taxonomy graph construction using search queries
CN115618070A (en) Graph database-based visual modeling method, system, device and medium
US20150193531A1 (en) Modeling and visualizing level-based hierarchies
CN113018870A (en) Data processing method and device and computer readable storage medium
US20190079649A1 (en) Ui rendering based on adaptive label text infrastructure
CN112463986A (en) Information storage method and device
CN110119416A (en) A kind of service data analysis system and method
CN111444368B (en) Method and device for constructing user portrait, computer equipment and storage medium
US10282398B1 (en) Editing tool for domain-specific objects with reference variables corresponding to preceding pages
US11880378B2 (en) Data visualization analytical canvas with functionally independent visual containers
CN116467433A (en) Knowledge graph visualization method, device, equipment and medium for multi-source data
CN115563355A (en) Nebula Graph database query method, system, electronic device and medium
CN115080046A (en) Multi-component abstract association fusion method and device in page design
CN114327395A (en) Webpage design method, device, computer equipment, storage medium and product
Roith et al. Supporting the building design process with graph-based methods using centrally coordinated federated databases
Milovanovic et al. Python Data Visualization Cookbook
US9721041B2 (en) Configurable data analysis using a configuration model

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230117