CN114817558B - Method for constructing sub-graph model to perform map query - Google Patents

Method for constructing sub-graph model to perform map query Download PDF

Info

Publication number
CN114817558B
CN114817558B CN202210364544.0A CN202210364544A CN114817558B CN 114817558 B CN114817558 B CN 114817558B CN 202210364544 A CN202210364544 A CN 202210364544A CN 114817558 B CN114817558 B CN 114817558B
Authority
CN
China
Prior art keywords
graph
sub
query
entity
map
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
CN202210364544.0A
Other languages
Chinese (zh)
Other versions
CN114817558A (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.)
Hangzhou Half Cloud Technology Co ltd
Original Assignee
Hangzhou Half Cloud 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 Half Cloud Technology Co ltd filed Critical Hangzhou Half Cloud Technology Co ltd
Priority to CN202210364544.0A priority Critical patent/CN114817558B/en
Publication of CN114817558A publication Critical patent/CN114817558A/en
Application granted granted Critical
Publication of CN114817558B publication Critical patent/CN114817558B/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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • 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/9032Query formulation
    • 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/90335Query processing
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for constructing a sub-graph model to perform map query, which comprises the following steps: s1, creating a query: creating a scene of a certain sub-graph query in a graph preview module, determining the name of the sub-graph query and selecting a graph to be queried; s2, constructing a sub-graph model in the sub-graph creation module; s3, running the sub-graph model in the sub-graph running module and obtaining a query result; s33, checking a background result: and outputting and displaying results on a map exploration page of the system in two modes of map relation and json format. According to the invention, by supporting creation of sub-graph query, the query of selecting a small-range region relation in a complex large graph to perform graph data is realized, no additional background is needed to create a new graph, other sub-graph queries are not influenced, and no special graph database script knowledge is needed by a query person to meet the requirements of refined and accurate positioning query.

Description

Method for constructing sub-graph model to perform map query
Technical Field
The invention relates to the technical field of graph databases, in particular to a method for constructing a sub-graph model to perform graph query.
Background
With the rapid development of scientific technology, the representation learning technology represented by deep learning has made important progress, the semantic information of the entity can be represented as a dense low-dimensional real value vector, and further the entity, the relation and the complex semantic association between the entity and the relation can be efficiently calculated in a low-dimensional space, the knowledge graph has important significance for the construction, reasoning, fusion and application of a knowledge base, the knowledge graph provides a more effective mode for massive, heterogeneous and dynamic large data expression, organization and management on the Internet, the intelligent level of the network is higher and is more similar to the cognitive thinking of human, the knowledge graph technology is based on a graph database, the development graph database benefiting from the knowledge graph is also greatly developed, the graph database is a data management system based on point and side as a basic storage unit, the efficient storage and the query graph data are designed, the graph concept is a set of point and side, the point represents the relation between the entities, the relationship between the entities and the important point represents the important relation between the data and the data in the graph database, and the important relation between the data and the data are also used as a part of the data can be stored in advance in the data base, and the optimal relation can be stored in advance, and the relationship graph is stored in the data base, and the optimal relation is visualized relation is searched in advance, and the data is stored in the data base.
At present, most of atlas construction is to construct entities and relations through tools or atlas platforms developed by the user, and establish entity and relation mapping to import relation databases or text data into the atlas databases, but when inquiring the atlas data, a certain entity is often selected to inquire or index the whole amount of the atlas, firstly, the processing process in the manner only can inquire the entity, only the inquired entity is displayed when inquiring and displaying, and if the relation of the certain entity is much, the computer browser is paved to output a result inquiry page when the relationship of the entity is unfolded, so that the effective identification cannot be realized;
Secondly, if the data size in the map is particularly large, the full-scale index query is performed, even if the map data has superior query performance than the relational database, and in many cases, we may only need to query the data of one entity and one relation between the entity and another entity in hundreds of thousands of entity relations in the whole large map, and other relations and entities do not need to be checked, so that the query scope needs to be reduced.
Therefore, although many graph databases provide professional query tools and presentation interfaces at present, users are required to have the script writing capability of the professional graph databases and the use experience of the graph databases, and the specific functional requirements of the users in different business scenes cannot be completely solved in use.
Disclosure of Invention
In order to solve the technical problems mentioned in the background art, a method for constructing a sub-graph model to perform map query is provided.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a method for constructing a sub-graph model for map query comprises the following steps:
S1, creating a query: creating a scene of a certain sub-graph query in a graph preview module, determining the name of the sub-graph query and selecting a graph to be queried;
S2, constructing a sub-graph model in the sub-graph creation module: s21, picking up a map relation: picking up a certain relation in the map, and acquiring two entity information associated with the relation in a sub-graph interface;
S22, entity combination: when picking up a plurality of relations, entity merging and deduplication are needed for repeated entities, and the relations of the repeated entities are automatically merged;
s23, entity attribute filtering and relationship attribute filtering: after the sub-graph entity and the relationship are determined, selectively filtering the attributes of the entity and the relationship respectively, wherein the steps comprise four filtering condition selections which are equal to, unequal to, including and not including, and setting the numerical value of the filtering of the attribute condition to complete the configuration of the sub-graph model;
S3, running the sub-graph model in the sub-graph running module and obtaining a query result: s31, running sub-graph query: after the sub-graph model is configured, sub-graph model operation is carried out, the sub-graph operation module carries out logic verification on the parameter configuration of the entity, the relation and the attribute of the sub-graph, the operation is passed, the graph data query is carried out, and the failure prompt is carried out when the operation is failed;
logic verification starts from a starting point firstly, whether the entity in a matched total graph in the total graph exists or not is judged according to English name identification of the starting point entity, whether the connection relation of the starting point entity in the sub graph exists in the total graph is continuously verified if verification exists, whether the other end entity associated with the starting point in the sub graph exists in the total graph is continuously verified if verification passes, and verification is sequentially carried out to ensure that the logic relation of the sub graph is matched with the total graph;
Obtaining parameter values configured by the attribute fields, verifying parameter settings of the attribute fields of the entity and the relation, verifying whether the attribute belongs to the entity or the relation, verifying whether the value filled in the numerical field is numerical, verifying whether the character string type has a space and a blank character string, and verifying whether the filtering condition of the attribute field is filled in;
S32, inquiring the map statement: after the sub-graph model is operated, converting the parameter configuration of the entity, the relation and the attribute of the sub-graph into a graph query statement through a graph statement converter, transferring to a graph database for query, operating the converted graph query statement through the graph database, and storing the query result in an internal buffer module;
s33, checking a background result: and outputting and displaying results on a map exploration page of the system in two modes of map relation and json format.
As a further description of the above technical solution:
in step S31, firstly, it is checked whether the configuration of the sub-graph model is correct, if there are duplicate or isolated entities and duplicate relationships, the operation fails, secondly, it is checked whether the entities configure the start point and the end point, and finally, it is checked whether the filtering conditions of the entity attribute and the relationship attribute configuration are qualified, and the sub-graph model is operated after all the conditions are satisfied.
As a further description of the above technical solution:
the map preview module is used for displaying the entities and the relations of the total map and the subgraph in the map exploration page, selecting partial relations and entities needing to be queried in the total map, and outputting and displaying in the subgraph.
As a further description of the above technical solution:
the sub-graph creation module is used for picking up the entities and the relations in the total graph, showing the entities in the sub-graph area, combining the repeated entities in the sub-graph area, processing intersection, union and difference of output results of different types of relations, and creating virtual entities for entity screening.
As a further description of the above technical solution:
the sub-graph operation module is used for inquiring the configured sub-graph model, obtaining an inquiry result through setting attribute filtering conditions of the entity and the relation, and outputting and displaying the inquiry result in two modes of the map relation and the json format.
As a further description of the above technical solution:
And the graph relation memory is used for storing the entity, relation and filtering parameter condition of the sub-graph model.
As a further description of the above technical solution:
The map statement converter is used for converting parameter configuration of entities, relations and attributes of the subgraph into map query statements which can be identified by the map database.
As a further description of the above technical solution:
the system also comprises an internal buffer module, wherein the internal buffer module is used for carrying out memory storage on the query result and returning the query result to the map exploration page.
In summary, due to the adoption of the technical scheme, the beneficial effects of the invention are as follows: in the invention, firstly, the scope of query is narrowed by selecting sub-graph entities and relations in the total graph, secondly, the attribute filtering conditions of the entities and the relations can be set to accurately position the relation data to be queried, the transformation query is carried out after the compliance verification and confirmation, finally, the graph relation memory and the graph statement converter are combined to convert the graph data query statement into query data in a database, and the query data are displayed at the front end in two modes of graph relations and json format, and the sub-graph query is supported to be created, so that the query of the graph data is carried out by selecting small-scope regional relations in a complex large graph without additional background creation of new graph, and other sub-graph queries are not influenced, and the refined and accurate positioning query can be satisfied without requiring specialized graph database script knowledge by query personnel.
Drawings
FIG. 1 is a schematic flow chart of a method for constructing a sub-graph model for performing a graph query according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a partial structure of a method for constructing a sub-graph model for performing a graph query according to an embodiment of the present invention;
FIG. 3 shows a first schematic diagram of entities and relationships of a method for constructing a sub-model for a graph query according to an embodiment of the present invention;
FIG. 4 shows a second schematic diagram of entities and relationships of a method for constructing a sub-model for a graph query according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a graph relationship of a method for constructing a sub-graph model for graph query according to an embodiment of the present invention;
fig. 6 is a json format schematic diagram of a method for constructing a sub-graph model for performing a graph query according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1-6, the present invention provides a technical solution: a method for constructing a sub-graph model for map query comprises the following steps:
S1, creating a query: creating a scene of a sub-map query in a map preview module, determining the name of the sub-map query and selecting a map to be queried, such as creating a 'bus sub-line query' and selecting a 'bus line map' map;
the map preview module is used for displaying the entities and the relations of the total map and the sub-map on the map exploration page of the system registered by the computer browser, selecting part of the relations and the entities to be queried from the total map, and outputting and displaying the sub-map;
S2, constructing a sub-graph model in a sub-graph creation module, wherein the sub-graph creation module is used for picking up entities and relations in a total graph, showing the entities in a sub-graph area, merging repeated entities in the sub-graph area, performing intersection, union and difference processing on output results of different types of relations, and creating virtual entities for entity screening;
s21, picking up a map relation: picking up a certain relation in the map, and acquiring two entity information related to the relation in a sub-map interface, for example, selecting an 'containing' relation of a station and a route in a total map of a 'bus route map', wherein the entity and the relation map of the 'station' (containing) - 'route') appear in the sub-map.
S22, entity combination: when picking up multiple relations, for repeated entities, entity merging and deduplication are needed, and the relations of the entities can be automatically merged, for example, if two 'site' entities exist in a subgraph, merging processing can be carried out on the two 'site' entities;
S23, entity attribute filtering and relationship attribute filtering: after the sub-graph entity and the relationship are determined, selectively filtering the attributes of the entity and the relationship respectively, wherein the steps comprise four condition selections which are equal to, unequal to, including and not including, and setting the numerical value of the attribute condition filtering to complete the sub-graph model configuration;
For entity attribute filtering, for example, selecting a "route" in a subgraph of a "station" - (including) - "route", setting an equal "100 routes" in an attribute "name" (referring to the fact that an attribute such as "name" and "gender" of a person can be used for selecting and filtering, suggesting to change to an attribute related to an example, for example, an entity of a route has an attribute of "name" or "x"), namely, inquiring information data related to a bus route whose route name is 100 routes;
For relationship attribute filtering, such as selecting an "include" relationship in a subgraph of "site" - (include) - "route", setting equal to "running" in an attribute "state";
S3, running the sub-graph model in a sub-graph running module and obtaining a query result, wherein the sub-graph running module is used for querying the configured sub-graph model, obtaining the query result through setting attribute filtering conditions of entities and relations, and outputting and displaying the query result in two modes of a graph relation and a json format:
s31, running sub-graph query: after the sub-model is configured, carrying out sub-model operation, wherein the sub-model operation module carries out logic verification on entity, relation and parameter configuration of the sub-model, if the operation is passed, the query of the image data is carried out, and if the operation is failed, failure prompt is carried out, specifically, firstly, whether the configuration of the sub-model is correct or not is checked, if repeated or isolated entity and repeated relation exist, the operation is failed, secondly, whether the entity is configured with a starting point and an ending point is checked, finally, whether the filtering conditions of the entity attribute and the relation attribute configuration are qualified is checked, and if all the conditions are met, the sub-model is operated and passed, and the entity, the relation and the filtering parameter conditions of the sub-model are stored through a graph relation memory;
The logic verification is started from a starting point firstly, whether the entity exists in a total graph is matched according to English name identification of the starting point entity, whether the connection relation of the starting point entity in the sub graph exists in the total graph is continuously verified through verification, whether the other end entity related to the starting point in the sub graph exists in the total graph is continuously verified, then the verification is sequentially performed, the logic relation of the sub graph is ensured to be matched with the total graph, parameter values configured by attribute fields are acquired, parameter settings of the entity and the attribute fields of the relation are verified, whether the attribute belongs to the entity or the relation is verified, whether values filled in the numeric fields are numeric, whether the character string type is verified to exceed the maximum limit or not, whether blank character strings are filled in or not, whether filtering conditions of the attribute fields are verified or not are verified, and the purpose of logic verification helps a user to find configuration errors in time, and wrong query sentences are prevented from being put into a graph database to execute occupied graph data resources;
S32, inquiring the map statement: after the sub-graph model is operated, converting the parameter configuration of the entity, the relation and the attribute of the sub-graph into a graph query statement through a graph statement converter, transferring to a graph database for query, and operating the converted graph query statement through the graph database, and storing a query result in an internal buffer module, wherein the graph statement converter is used for converting the parameter configuration of the entity, the relation and the attribute of the sub-graph into the graph query statement which can be identified by the graph database;
Specifically, for example, data of which the query route name is 100 routes in the subgraph of 'site' (including) - 'route', is converted into a map query sentence by a map sentence converter;
S33, checking a background result: the system comprises a spectrum exploration page, a spectrum searching page, a query result display module, an internal buffer module and a query result display module, wherein the query result is displayed on the spectrum exploration page of the system in two modes of a spectrum relation and a json format, and the internal buffer module is used for carrying out memory storage on the query result and returning the query result to the spectrum exploration page.
Further, the embodiment provides a method for constructing a sub-model of a bus sub-line to perform map query, which comprises the following steps:
S1, creating a query: the system map searching page point 'creates inquiry' buttons, names are filled in 'bus sub-line inquiry' in pop-up boxes, a 'bus line map' map is selected in a map drop-down box, the 'bus sub-line inquiry' page is popped up, the page is divided into an upper part and a lower part, the lower part is a total map preview, all entities and relations of the 'bus line map' map are displayed, the upper part is a sub-map preview, and entities, relations and tool bars of the sub-map are displayed;
S2, creating a subgraph: clicking a ' pick-up ' button in a sub-image part toolbar in a page of a ' bus sub-line inquiry ', clicking a ' containing ' relation link between a ' site ' and a ' line ' in a total diagram by a mouse, and then, picking up the ' possession ' relation of a ' bus company ' and a ' line ' in the sub-image area by repeating the above operation, wherein the two relations and four entities of the ' line ' (entity name) — ' containing ' (relation name) — ' site ' (entity name) —) and the ' bus company ' (entity name) — ' line ' (entity name) appear in the sub-image area, and at the same time, the sub-image area has the two relations and four entities of the ' line ' (entity name) — line ' (entity name) as shown in fig. 3;
S3, entity combination: in step S2, knowing that 2 relations and 2 "line" entities appear in the sub-graph area, the repeated entities need to be combined, the shift key is pressed, the two "line" entities can be combined into one entity by selecting 2 "line" point combination "buttons in the sub-graph area with a mouse, and the relation connecting lines are automatically connected in the past to form a sub-graph of" public transportation company "(entity name) —" owned "(relation name) —" line "(entity name) —" containing "(relation name) —" station ", as shown in fig. 4;
S4, entity attribute filtering and relation attribute filtering: after the entity and the relation are established in the sub-image interface, more accurate data can be filtered by adding query conditions on the attributes of the entity and the relation, a 'line' entity is selected by a mouse, a parameter configuration interface appears on the right side of the sub-image interface, then a filtering condition 'equal' is selected under the attribute of 'line name', and '100' is input in an input box below, namely, the filtering operation of the query line with the name of 100 routes is carried out on the attribute filtering configuration of the relation, the attribute filtering condition is temporarily not set as the entity, the attribute filtering condition comprises 'equal', 'not equal', 'containing', 'not containing', and 'not equal' which belongs to data with equal or unequal query values of the accurate matching sub-elements, the fuzzy query is included, and all the query is carried out as long as the attribute field contains the value, for example, the values of 'containing' condition value is '100', and the values of '10000' and '1100' are also searched.
S5, running sub-graph query: after the sub-model configuration of the public transportation sub-line inquiry is finished, a mouse selects an entity of a public transportation company, a starting point is selected in an attribute interface on the right to set the public transportation company as the starting point of the inquiry, then a mouse mark point operates a button, a sub-operation module logically verifies the parameter configuration of the entity, the relation and the attribute of the sub-image, if the verification passes, the diagram data inquiry is carried out, failure prompt is carried out, the specific process of the sub-image inquiry is carried out, firstly, whether the configuration of the sub-image is correct or not is checked, if the repeated or isolated entity and the repeated relation all lead to the operation failure, secondly, whether the entity configures the starting point and the ending point is checked, finally, whether the parameter condition of the attribute configuration is qualified or not is checked, if all the conditions are met, the sub-image is verified and submitted to a diagram sentence converter, and in the verification process, the sub-image inquiry module stores the entity, the relation and the filtered parameter condition of the sub-image in a service database through a diagram relation memory;
S6, inquiring the map statement: after the sub-graph model is operated, converting the parameter configuration of the entity, the relation and the attribute of the sub-graph into a graph query statement through a graph statement converter, transferring to a graph database for query, operating the converted graph query statement through the graph database, and returning a query result to an internal buffer module, wherein the graph statement converter is used for converting the parameter configuration of the entity, the relation and the attribute of the sub-graph into the graph query statement which can be identified by the graph database;
specifically, the query route name configured in the "bus sub-route query" is 100-way data, which is converted into data of 100 routes by the map statement converter:
"MATCH(RES_1_GONGJIAOGONGSI:GONGJIAOGONGSI)<-[RES_2_GJYONGYOUXL:GJYONGYOUXL]-(RES_3_ROUTE:ROUTE)<-[RES_4_XLBAOHANZD:XLBAOHANZD]-(RES_5_SITE:SITE)WHERE 1==1AND RES_3_ROUTE.NAME=='100'RETURNRES_1_GONGJIAOGONGSI,RES_2_GJYONGYOUXL,RES_3_ROUTE,RES_4_XLBAOHANZD,RES_5_SITE" Is a query statement of (2);
s7, checking results: the result obtained by inquiring the graph database is transmitted to an internal buffer module in a json format, the internal buffer module returns the result to a subimage inquiring interface for exploring the graph, json is a lightweight data exchange format, the graph database returns by taking the json format as an original data format, one entity is one record, one relation is one record, the record is output in a pure text mode, and two buttons are arranged in a front-end interface 'result output' frame of the subimage inquiring And/>The first button is to display the relationship and entity of the json format data converted into the map as shown in fig. 5, and the second button is to directly output the json format in a list form as shown in fig. 6.
In the invention, firstly, the scope of query is narrowed by selecting sub-graph entities and relations in the total graph, secondly, the attribute filtering conditions of the entities and the relations can be set to accurately position the relation data to be queried, the transformation query is carried out after the compliance verification and confirmation, finally, the graph relation memory and the graph statement converter are combined to convert the graph data query statement into query data in a database, and the query data are displayed at the front end in two modes of graph relations and json format, and the sub-graph query is supported to be created, so that the query of the graph data is carried out by selecting small-scope regional relations in a complex large graph without additional background creation of new graph, and other sub-graph queries are not influenced, and the refined and accurate positioning query can be satisfied without requiring specialized graph database script knowledge by query personnel.
The foregoing is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art, who is within the scope of the present invention, should make equivalent substitutions or modifications according to the technical scheme of the present invention and the inventive concept thereof, and should be covered by the scope of the present invention.

Claims (8)

1. The method for constructing the sub-graph model to perform the map query is characterized by comprising the following steps:
S1, creating a query: creating a scene of a certain sub-graph query in a graph preview module, determining the name of the sub-graph query and selecting a graph to be queried;
S2, constructing a sub-graph model in the sub-graph creation module: s21, picking up a map relation: picking up a certain relation in the map, and acquiring two entity information associated with the relation in a sub-graph interface;
S22, entity combination: when picking up a plurality of relations, entity merging and deduplication are needed for repeated entities, and the relations of the repeated entities are automatically merged;
s23, entity attribute filtering and relationship attribute filtering: after the sub-graph entity and the relationship are determined, selectively filtering the attributes of the entity and the relationship respectively, wherein the steps comprise four filtering condition selections which are equal to, unequal to, including and not including, and setting the numerical value of the filtering of the attribute condition to complete the configuration of the sub-graph model;
S3, running the sub-graph model in the sub-graph running module and obtaining a query result: s31, running sub-graph query: after the sub-graph model is configured, sub-graph model operation is carried out, the sub-graph operation module carries out logic verification on the parameter configuration of the entity, the relation and the attribute of the sub-graph, the operation is passed, the graph data query is carried out, and the failure prompt is carried out when the operation is failed;
logic verification starts from a starting point firstly, whether the entity in a matched total graph in the total graph exists or not is judged according to English name identification of the starting point entity, whether the connection relation of the starting point entity in the sub graph exists in the total graph is continuously verified if verification exists, whether the other end entity associated with the starting point in the sub graph exists in the total graph is continuously verified if verification passes, and verification is sequentially carried out to ensure that the logic relation of the sub graph is matched with the total graph;
Obtaining parameter values configured by the attribute fields, verifying parameter settings of the attribute fields of the entity and the relation, verifying whether the attribute belongs to the entity or the relation, verifying whether the value filled in the numerical field is numerical, verifying whether the character string type has a space and a blank character string, and verifying whether the filtering condition of the attribute field is filled in;
S32, inquiring the map statement: after the sub-graph model is operated, converting the parameter configuration of the entity, the relation and the attribute of the sub-graph into a graph query statement through a graph statement converter, transferring to a graph database for query, operating the converted graph query statement through the graph database, and storing the query result in an internal buffer module;
s33, checking a background result: and outputting and displaying results on a map exploration page of the system in two modes of map relation and json format.
2. The method for constructing a sub-model for map query according to claim 1, wherein in step S31, firstly, it is checked whether the configuration of the sub-model is correct, if there is a duplicate or isolated entity, the duplicate relationship will cause operation failure, secondly, it is checked whether the entity configures a start point and an end point, and finally, it is checked whether the filtering conditions of the entity attribute and the relationship attribute configuration are qualified, and then the sub-model will be operated after all the conditions are satisfied.
3. The method for constructing a sub-graph model for map query according to claim 1, wherein the map preview module is configured to display entities and relationships between a total graph and the sub-graph in a map exploration page, select a part of relationships and entities to be queried in the total graph, and output and display in the sub-graph.
4. The method for constructing a sub-graph model for map query according to claim 1, wherein the sub-graph creation module is configured to pick up entities and relationships in a total graph and present the entities in a sub-graph area, and perform merging operations on repeated entities in the sub-graph area, perform intersection, union and difference processing on output results of different types of relationships, and create virtual entities for entity screening.
5. The method for constructing a sub-graph model for graph query according to claim 1, wherein the sub-graph operation module is configured to query the configured sub-graph model, obtain a query result by setting attribute filtering conditions of entities and relationships, and output and display the query result in two modes of graph relationships and json format.
6. The method of constructing a sub-model for a graph query of claim 1, further comprising a graph relationship memory for storing entities, relationships and filter parameter conditions for the sub-model.
7. The method for constructing a sub-graph model for a graph query as claimed in claim 1, wherein the graph statement converter is configured to convert the parameter configuration of the entities, relationships and attributes of the sub-graph into a graph query statement that can be identified by the graph database.
8. The method for constructing a sub-graph model for graph query according to claim 1, further comprising an internal buffer module, wherein the internal buffer module is configured to store a query result in a memory and return the query result to a graph exploration page.
CN202210364544.0A 2022-04-07 2022-04-07 Method for constructing sub-graph model to perform map query Active CN114817558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210364544.0A CN114817558B (en) 2022-04-07 2022-04-07 Method for constructing sub-graph model to perform map query

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210364544.0A CN114817558B (en) 2022-04-07 2022-04-07 Method for constructing sub-graph model to perform map query

Publications (2)

Publication Number Publication Date
CN114817558A CN114817558A (en) 2022-07-29
CN114817558B true CN114817558B (en) 2024-05-10

Family

ID=82535641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210364544.0A Active CN114817558B (en) 2022-04-07 2022-04-07 Method for constructing sub-graph model to perform map query

Country Status (1)

Country Link
CN (1) CN114817558B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115826956B (en) * 2023-02-14 2023-06-16 长威信息科技发展股份有限公司 Knowledge graph business rule visual arrangement analysis method and visual constructor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10002154B1 (en) * 2017-08-24 2018-06-19 Illumon Llc Computer data system data source having an update propagation graph with feedback cyclicality
CN109033135A (en) * 2018-06-06 2018-12-18 北京大学 A kind of natural language querying method and system of software-oriented project knowledge map
US10572606B1 (en) * 2017-02-17 2020-02-25 Narrative Science Inc. Applied artificial intelligence technology for runtime computation of story outlines to support natural language generation (NLG)
CN112667860A (en) * 2020-12-30 2021-04-16 海南普适智能科技有限公司 Sub-graph matching method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11693856B2 (en) * 2020-09-17 2023-07-04 The Regents Of The University Of California Query processing in a polystore

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10572606B1 (en) * 2017-02-17 2020-02-25 Narrative Science Inc. Applied artificial intelligence technology for runtime computation of story outlines to support natural language generation (NLG)
US10002154B1 (en) * 2017-08-24 2018-06-19 Illumon Llc Computer data system data source having an update propagation graph with feedback cyclicality
CN109033135A (en) * 2018-06-06 2018-12-18 北京大学 A kind of natural language querying method and system of software-oriented project knowledge map
CN112667860A (en) * 2020-12-30 2021-04-16 海南普适智能科技有限公司 Sub-graph matching method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114817558A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US5929858A (en) Device for aiding analysis of infeasible solution and unbounded solution
US5806066A (en) Method of integrating schemas of distributed heterogeneous databases
US6199059B1 (en) System and method for classifying and retrieving information with virtual object hierarchy
JP3842577B2 (en) Structured document search method, structured document search apparatus and program
US7720873B2 (en) Dynamic data discovery of a source data schema and mapping to a target data schema
US6738759B1 (en) System and method for performing similarity searching using pointer optimization
US7099887B2 (en) Hierarchical environments supporting relational schemas
JP5410514B2 (en) Method for mapping an X500 data model to a relational database
JP2004086782A (en) Apparatus for supporting integration of heterogeneous database
JP2005302029A (en) Method, system and computer readable medium for providing parameterized queries
JP2005063332A (en) Information system coordination device, and coordination method
US7769758B2 (en) System and method for managing bundle data database storing data association structure
CN114817558B (en) Method for constructing sub-graph model to perform map query
US20070106767A1 (en) Database device database search device, and method thereof
KR20200082179A (en) Data transformation method for spatial data&#39;s semantic annotation
Tuchinda et al. Building data integration queries by demonstration
JP2007527058A (en) Form composition mechanism and method for linking data and meta data
CN110209699B (en) Data interface dynamic generation and execution method based on openEHR Composition template
JP3914081B2 (en) Access authority setting method and structured document management system
Gultom et al. Implementing web data extraction and making Mashup with Xtractorz
JP6775740B1 (en) Design support device, design support method and design support program
Castano et al. A general methodological framework for the development of web-based information systems
CN113608734B (en) Automatic generation method of domain-driven design model code
JPH0689309A (en) Data base retrieval processing method by graphing set
US7958124B2 (en) System and method for managing bundle data database storing data association structure

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