A method and system for retrieving cross-endpoint association paths driven by RDF class relationships

By extracting RDF class relationships and storing them in a graph database, and dynamically encapsulating SPARQL federated query statements, the problems of low efficiency and insufficient accuracy in cross-endpoint RDF data association path retrieval are solved, and efficient cross-endpoint path query is realized.

CN116955396BActive Publication Date: 2026-03-27COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies cannot achieve cross-endpoint RDF data association path retrieval, resulting in low query efficiency and insufficient accuracy. Federated query engines also lack stability and accuracy, failing to meet the needs of large-scale applications.

Method used

By extracting RDF class relationships and storing them in a graph database, and dynamically encapsulating SPARQL federated query statements, cross-endpoint association path queries are supported. By utilizing graph databases and SPARQL federated query technology, cross-endpoint path retrieval can be achieved.

Benefits of technology

It enables cross-endpoint path queries, improving query efficiency and accuracy, reducing time complexity, and supporting path queries from multiple data sources and arbitrary association directions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955396B_ABST
    Figure CN116955396B_ABST
Patent Text Reader

Abstract

The application discloses a cross-endpoint associated path retrieval method and system driven by RDF class relation, and belongs to the technical field of semantic web data association. The application carries out preprocessing on data in a SPARQL endpoint, extracts RDF class relation from an ontology and entity relation; the extracted RDF class relation is stored in a graph database in the form of graph data; when a user carries out relation query between entities, inputs a retrieval word and selects a data source; the entity URI of the retrieval word is determined, the entity URI is parsed to determine the class to which the entity belongs, and the associated path of the class is queried in the graph database; the associated path information between the classes that are queried is dynamically encapsulated into a SPARQL federated query statement; the SPARQL federated query statement is executed, and the associated path result of the query is dynamically visualized and displayed. The application can retrieve the associated path between entities across SPARQL endpoints, supports multiple data source endpoints and any associated direction, and improves the efficiency and quality of cross-endpoint associated path retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application discloses a cross-endpoint associated path retrieval method and system, and belongs to the technical field of semantic network data association. BACKGROUND

[0002] Linked Science is proposed by Tomi Kauppinen and Giovana Mira de Espindola in 2011. The definition of Linked Science on the website LinkedScience.org is: Linked Science is a method to interlink scientific assets to support transparent, reproducible and interdisciplinary research. It is a combination of linked data, semantic web and web standards, open resources and online environments, cloud computing, legal and technical infrastructure of knowledge sharing license agreement (CC agreement). Linked Science requires breaking the data semantic islands formed between data centers and data endpoints, realizing the deep and extensive association and fusion of scientific data across fields, and then effectively revealing the association relationship of scientific data at the content level, mining the implicit knowledge content, and assisting major scientific research innovation and scientific discovery; the cross-field and cross-endpoint associated path retrieval is an important technical means to achieve this goal.

[0003] RDF (Resource Description Framework) is a data model expressed in XML syntax, used to describe the characteristics of Web resources and the relationship between resources, and is a triple of subject-predicate-object. At present, the widely used method for retrieving the associated path between RDF data is to store the RDF data into a graph database, such as Neo4j and gStore, and retrieve the associated path based on the characteristics of the database, but it can only be retrieved in the same database and cannot be retrieved across databases and connected with open SPARQL endpoints. Some tools can also realize the associated path retrieval of RDF data, for example, RelFinder (a visualization tool for linked data, which can extract and visualize the relationship between given objects in RDF data) can discover the associated path between data by splicing SPARQL (a query language and data acquisition protocol developed for RDF), but it limits the connection direction and path form between data, which may cause incomplete data association path discovery. In addition, the use of RelFinder depends on Flash, and it can only be retrieved in the same SPARQL endpoint and cannot realize simultaneous retrieval across multiple endpoints.

[0004] For cross-endpoint RDF data queries, SPARQL 1.1 provides a federated query approach, using the SERVICE keyword to query RDF data from remote endpoints. This approach requires specifying the SPARQL endpoint for each WHERE triple condition, thus leading to the development of federated query engines. Open-source federated query engines such as Comunica, RDF4J FedX, CostFed, and LargeRDFBench do not require the SERVICE keyword; they only require writing SPARQL queries and specifying multiple endpoints to be queried. However, testing has revealed that these federated query engines still have shortcomings in stability and accuracy, and cannot meet the needs of large-scale real-world applications.

[0005] In reality, a large amount of RDF data is stored across different endpoints, and the ability to retrieve the association paths between data from different endpoints is what users urgently need. Current association data retrieval technologies still have many prominent problems that urgently need to be solved, including:

[0006] 1. Current association path retrieval technology is limited to a single endpoint and cannot perform cross-endpoint queries.

[0007] 2. The exhaustive search method results in a huge number of related paths, with too many invalid paths, resulting in low query efficiency.

[0008] 3. Although federated query engines can perform cross-endpoint queries, they cannot directly perform path retrieval, and the related open-source framework technologies are still immature, resulting in low query efficiency and accuracy. Summary of the Invention

[0009] The purpose of this invention is to propose a cross-endpoint association path retrieval method and system driven by RDF class relations, which can retrieve the association path between entities across SPARQL endpoints, supports multiple data source endpoints and arbitrary association directions, and improves the efficiency and quality of cross-endpoint association path retrieval.

[0010] To achieve the above objectives, the present invention adopts the following technical solution:

[0011] A method for retrieving cross-endpoint association paths driven by RDF class relationships includes the following steps:

[0012] Preprocess the data in the SPARQL endpoints to extract RDF class relations from the ontology and entity relations;

[0013] For the extracted RDF class relations, the classes that serve as subjects and objects are used as nodes, the predicates between classes are used as relations, and the data source information to which the predicates belong is used as the attribute of the relation, and all of these are stored in the graph database.

[0014] When a user makes a query between entities, the user inputs a search term and selects a data source; the entity URI of the search term is determined, and the entity URI is parsed to determine the class to which the entity belongs; the associated path of the class is queried in the graph database according to the class to which each entity belongs and the selected data source;

[0015] The associated path information between the classes that are queried is dynamically encapsulated into a SPARQL federated query statement, which is used to query all triple information contained in the current path;

[0016] The SPARQL federated query statement is executed, and the associated path result of the query is dynamically visualized and displayed.

[0017] Further, the method for extracting the RDF class relationship from the ontology comprises: extracting the class relationship from the ontology according to the definition domain and the value domain of the object attribute in the ontology.

[0018] Further, the method for extracting the RDF class relationship from the entity relationship comprises: for the relationship between internal entities, directly using a SPARQL query to obtain the class relationship; for the relationship between the internal entity and the external entity, first querying the relationship between the internal class and the external entity, and then further querying the class corresponding to the external entity to extract the associated relationship between the internal class and the external class.

[0019] Further, the entity URI of the search term is determined through the rdfs:label attribute of the RDF data.

[0020] Further, the associated path information between the classes comprises a starting class endpoint of each edge in the path, a relationship of the edge, and a SPARQL endpoint address to which the edge belongs.

[0021] Further, the associated path information between the classes that are queried is encapsulated in a JSON form.

[0022] Further, the step of dynamically encapsulating the associated path information between the classes that are queried into a SPARQL federated query statement comprises:

[0023] Each edge in the path is corresponded to a WHERE triple condition in SPARQL, and the attribute of the edge is taken as the predicate of the WHERE triple condition; variables are dynamically assigned to the starting point and the ending point of the edge, and the assigned variables are taken as the subject and the object of the WHERE triple condition, respectively;

[0024] The WHERE triple condition is synchronously added to the CONSTRUCT condition as the query result of the SPARQL;

[0025] Add the SERVICE keyword outside each WHERE triple condition to specify the SPARQL endpoint address as the data source to which the edge belongs, and if the adjacent SERVICE specifies the same SPARQL endpoint, the WHERE triple condition is combined into one SERVICE;

[0026] The FILTER condition is used to specify the start entity and end entity of the path.

[0027] Further, the vis.js plug-in is used to realize dynamic visual display of the associated path result of the query.

[0028] A cross-endpoint associated path retrieval system driven by RDF class relationship, comprising a storage, a processor and a visualization panel, the computer program is stored on the storage, the processor implements the steps of the above method when executing the program, and the associated path result of the query is dynamically displayed through the visualization panel.

[0029] The method has the advantages of:

[0030] 1. Cross-endpoint path query: the method proposed by the application supports cross-endpoint path query, and through driving by the RDF class relationship, the cross-endpoint path query can be realized in distributed RDF data. This makes the query cover multiple data sources and support the associated path query in any direction.

[0031] 2. Comprehensive query result: through mapping the cross-endpoint data entity associated path retrieval into the RDF class associated path retrieval, the application can make the query result more comprehensive, and all paths corresponding to the class relationship can be queried out.

[0032] 3. Low time complexity: through cross-endpoint class path filtering of possible associated paths between entities, it is not necessary to match all possible paths, which can greatly reduce the number of invalid paths, and compared with the exhaustive method, the time complexity is reduced.

[0033] 4. Extracting class relationship from ontology: the application proposes a method for extracting class relationship from ontology, through analyzing the definition domain and value domain of the object attribute in the ontology, the associated relationship between classes can be extracted, which is used as the basis of class path query.

[0034] 5. Extracting class relationship from SPARQL endpoint: the application proposes a method for extracting class relationship from SPARQL endpoint, for the SPARQL endpoint containing ontology content, the class relationship can be directly extracted from the SPARQL endpoint, which is used as part of the class path query.

[0035] 6. The federal query efficiency is high: the entity relationship is mapped to the class relationship, the SPARQL federal query statement of the specified endpoint and predicate is dynamically encapsulated through the class path, and the efficiency and quality of the federal query are improved. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 It is the overall flowchart of cross-endpoint association path retrieval.

[0037] Figure 2 It is the flowchart of extracting class relationship from ontology.

[0038] Figure 3 It is the flowchart of extracting class relationship from entity relationship.

[0039] Figure 4 It is the relationship example of SPARQL query internal class in RDF triple.

[0040] Figure 5 It is the relationship example of SPARQL query internal class and external entity in RDF triple.

[0041] Figure 6 It is the distributed endpoint RDF class relationship graph.

[0042] Figure 7 It is the dynamic encapsulation process diagram of SPARQL federal query statement.

[0043] Figure 8 It is the cross-endpoint association path retrieval example page. DETAILED DESCRIPTION

[0044] In order to make the above technical solutions of the present application and various technical features and various advantages or technical effects more obvious and easy to understand, the following will be described in detail with reference to the drawings.

[0045] In order to solve the problems existing in the prior art, the present application proposes a cross-endpoint association path retrieval method driven by RDF class relationship, the overall flowchart of which is shown in Figure 1 Firstly, the data in the SPARQL endpoint is preprocessed, and the RDF class relationship (i.e. the association relationship of RDF class) is extracted from the entity relationship according to the class (i.e. the rdf:type attribute) to which the entity belongs. Then the class relationship and the endpoint information to which the relationship belongs are stored in the graph database, so as to retrieve the path between classes. When the path between two entities is queried, the class to which the entity belongs is found first, and then the SPARQL federal query statement is dynamically encapsulated according to the class path information. Finally, the query statement is executed, and the association path result of the query is dynamically visualized. The method can support multiple data source endpoints, arbitrary association direction, and multi-hop dynamic query, and can effectively solve the key problems of low query efficiency and poor accuracy in cross-endpoint association path query.

[0046] The method can be implemented by an RDF class relationship driven cross-endpoint association path retrieval system provided by the application, which comprises a memory, a processor and a visualization panel. The memory stores a computer program (including a graph database), the computer program is executed by the processor to implement the above method, and the visualization panel is used to dynamically display the final query result.

[0047] The steps of the method are described in detail below:

[0048] 1. Distributed data source class relationship automatic extraction and storage

[0049] The class relationship of the distributed RDF data source is the core and basis of the method, and can be implemented separately as data preprocessing in the application, mainly including two key parts of RDF class relationship automatic extraction and RDF class relationship storage.

[0050] 1.1 RDF class relationship automatic extraction

[0051] The RDF class relationship extraction method is one of the innovations of the application, mainly including extraction from ontology and extraction from entity relationship. The process of extracting class relationship from ontology is shown in Figure 2 The ontology mainly exists in the ontology platform or the SPARQL endpoint. The well-known ontology platforms include EBIOLS, Ontobee, BioPortal, etc. Some SPARQL endpoints also contain related content of ontology, such as DBpedia. The object property in the ontology describes the association relationship between classes (i.e. class relationship), which can be extracted by the definition domain (rdfs: domain) and value domain (rdfs: range) of the object property.

[0052] The extraction of class relationship from entity relationship is one of the innovations of the application, and the process is shown in Figure 3 This is a general method that can support any SPARQL endpoint. Since the relationship between entities is already included in the RDF triple, the entity relationship includes the relationship between internal entities and the relationship between internal entities and external entities. For the relationship between internal entities, SPARQL query can be directly used, as shown in Figure 4 For the relationship between internal entities and external entities, the relationship between internal classes and external entities can be queried first, as shown in Figure 5 Further query the class corresponding to the external entity to extract the association relationship between the internal class and the external class. This step will take a long time in the case of a large number of RDF triples, and the multi-threading method needs to be combined to improve the overall efficiency of class relationship extraction.

[0053] 1.2 RDF class relationship storage After obtaining the RDF class relationship, the class as the subject and object is stored as a node, the predicate between the classes is stored as a relationship, and the data source information to which the predicate belongs is stored as an attribute of the relationship in a graph database (such as Neo4j). The correspondence between the SPARQL query result and the Neo4j storage is shown in Table 1. The graph database is very suitable for the storage and query of the association relationship. When it is necessary to determine whether there is an association relationship between two classes, the relationship between the classes can be efficiently queried by using the specific query language (such as Cypher) or API of the graph database. The class relationship storage form is shown in Figure 6

[0054] Table 1. Correspondence between SPARQL query result and Neo4j storage

[0055] Class relationship composition Neo4j Subject Node Predicate Relationship Object Node Subject uri Node property, e.g. name:uri Predicate uri Relationship property, e.g. name:uri Object uri Node property, e.g. name:uri SPARQL endpoint address Relationship property, e.g. sparqlUrl:endpointAddress

[0056] 2. Entity type automatic identification and class path query

[0057] When the association path between classes across endpoints is searched, the user needs to input the search term name and select the data source (which can be multiple). The system first determines the entity URI (Uniform Resource Identifier) of the search term through the rdfs:label attribute (used to describe the readable label of the resource), and further analyzes the entity URI to determine the class (i.e. the rdf:type value) to which the entity belongs. Then, the association path between the classes is searched in the graph database according to the classes to which the entities belong and the selected data source. Since the graph database has good support for path search, the association path between the given class endpoints can be queried in the graph database by using the graph database query language (such as Cypher). The association path information queried contains the starting class endpoint (i.e. the class URI) of each edge in the path, the relationship of the edge (i.e. the attribute URI), and the SPARQL endpoint address to which the edge belongs. Finally, each piece of association path information is encapsulated in JSON form to facilitate the analysis in the next step.

[0058] 3. Dynamic encapsulation of SPARQL federated query statement

[0059] After the association path between all classes is queried, the information of each association path between the classes can be dynamically encapsulated into a SPARQL federated query statement. The encapsulated SPARQL statement can query all triples contained in the path, and the encapsulation process is shown in Figure 7 ​As shown. First, each edge in the path is mapped to a WHERE triple condition in SPARQL, with the properties of the edge as the predicate of the WHERE triple condition, dynamically assigning variables (variable names can be?s1,?s2,?s3 and incrementing sequentially) to the start and end points of the edge, and assigning the assigned variables as the subject and object of the WHERE triple condition. Add the WHERE triple condition to the CONSTRUCT condition as the query result of SPARQL. Add the SERVICE keyword outside each WHERE triple condition to specify the SPARQL endpoint address of the data source to which the edge belongs. If the adjacent SERVICE specifies the same SPARQL endpoint, combine the WHERE triple conditions into one SERVICE to improve the execution efficiency of the statement and enhance readability. Finally, use the FILTER condition to specify the start and end entities of the path. Through the above steps, the class path can be dynamically encapsulated into a SPARQL federation query statement.

[0060] 4. Dynamic query and visual display

[0061] Considering the depth of the associated path and the influence of multiple paths on query time and user experience, background dynamic query and front-end asynchronous display of query result data are adopted. The path information queried in the graph database is first returned to the front end, and then the associated path is asynchronously requested for query in the front end according to the entity class path and data source endpoint information. The vis.js plug-in is used to dynamically display the associated path nodes and edge information in the page. When all the path queries are completed, the user is prompted in the page that the query result is complete, and whether there is key path information is prompted. The query result is as shown in Figure 8

[0062] Comparison test of the present application and prior art:

[0063] The present application and Relfinder and the exhaustive method based on depth-first algorithm are comprehensively compared and analyzed. Relfinder is a typical associated path retrieval method in the semantic web, but it has certain limitations in the connection direction between data and the form of the path, and cannot support simultaneous query of multiple SPARQL endpoints. The exhaustive method based on the depth-first algorithm can avoid the limitations of Relfinder, but also increases the time complexity of the query, as shown in Table 2. In addition, since the SPARQL endpoint of each edge in the path is unknown, in order to query multiple SPARQL endpoints simultaneously, each edge in the path needs to be matched with any SPARQL endpoint, further increasing the query burden. The specific comparison results of the several methods are shown in Table 3.

[0064] Table 2 All possible paths of the exhaustive method based on the depth-first algorithm ​

[0065]

[0066]

[0067] Table 3 comparison results of associated path retrieval core functions

[0068]

[0069] In summary, the method has significant advantages in the comprehensive application range and query efficiency of associated path retrieval.

[0070] To test and verify the query performance of the cross-endpoint associated path retrieval technology driven by RDF class relationship, according to different cross-endpoint numbers and path lengths, some SPARQL federation query statements for verification are written, as shown in Table 4.

[0071] Table 4 SPARQL federation query statements

[0072]

[0073]

[0074] Under the same test environment, the retrieval efficiency comparison experiments are carried out using the SPARQL statements in Table 4, and the comparison results are shown in Table 5.

[0075] Table 5 comparison results of associated path retrieval performance

[0076]

[0077] Through comparison, it can be seen that the speed of SPARQL cross-endpoint federation query after specifying the endpoint and attribute is greatly improved, which can prove that the application has significant advantages in query efficiency.

[0078] Although the application has been disclosed as above, it is not intended to limit the application, and appropriate modifications or equivalent replacements of the technical solutions of the application made by those skilled in the art should be covered in the protection scope of the application, and the protection scope of the application is defined by the claims.

Claims

1. A cross-endpoint association path retrieval method driven by RDF class relations, characterized in that, Includes the following steps: Preprocess the data in the SPARQL endpoints to extract RDF class relations from the ontology and entity relations; For the extracted RDF class relations, the classes that serve as subjects and objects are used as nodes, the predicates between classes are used as relations, and the data source information to which the predicates belong is used as the attribute of the relation, and all of these are stored in the graph database. When users perform queries about relationships between entities, they enter search terms and select a data source; the entity URI for the search terms is determined, and the entity URI is parsed to determine the class to which the entity belongs; In the graph database, the association path of a class is queried based on the class to which each entity belongs and the selected data source; The association path information between the retrieved classes is dynamically encapsulated into a SPARQL federated query statement, which is used to query all triple information contained in the current path; The steps for dynamically encapsulating the association path information between the retrieved classes into a SPARQL federated query statement include: mapping each edge in the path to a WHERE triple condition in SPARQL, and using the attributes of that edge as the predicate of the WHERE triple condition; dynamically assigning variables to the start and end points of the edge, and using the assigned variables as the subject and object of the WHERE triple condition, respectively; synchronously adding the WHERE triple condition to the CONSTRUCT condition as the query result of SPARQL; adding the SERVICE keyword to the outer layer of each WHERE triple condition, specifying the SPARQL endpoint address as the data source to which the edge belongs; if adjacent SERVICEs specify the same SPARQL endpoint, then merging the WHERE triple conditions into one SERVICE; and using the FILTER condition to specify the start and end entities of the path. Execute SPARQL federated queries and dynamically visualize the results of the query's related paths.

2. The method as described in claim 1, characterized in that, Methods for extracting RDF class relationships from an ontology include: extracting class relationships from the ontology based on the domain and range of object attributes in the ontology.

3. The method as described in claim 2, characterized in that, Ontologies primarily exist in open ontology platforms or SPARQL endpoints.

4. The method as described in claim 1, characterized in that, Methods for extracting RDF class relationships from entity relationships include: for relationships between internal entities, directly using SPARQL queries to obtain class relationships; for relationships between internal and external entities, first querying the relationship between the internal class and the external entity, and then further querying the class corresponding to the external entity to extract the association relationship between the internal class and the external class.

5. The method as described in claim 1, characterized in that, The entity URI of the search term is determined by the rdfs:label attribute of the RDF data.

6. The method as described in claim 1, characterized in that, The association path information between classes includes the starting class endpoint of each edge in the path, the relationship between the edges, and the SPARQL endpoint address to which the edge belongs.

7. The method as described in claim 1, characterized in that, The association path information between the retrieved classes is encapsulated in JSON format.

8. The method as described in claim 1, characterized in that, The vis.js plugin is used to dynamically visualize the results of queries related to the path.

9. A cross-endpoint association path retrieval system driven by RDF class relations, characterized in that, It includes a memory, a processor, and a visualization panel, wherein a computer program is stored in the memory, the processor executes the program to implement the steps of the method according to any one of claims 1-8, and the visualization panel dynamically displays the associated path results of the query.

Citation Information

Patent Citations

  • RDF graphical partition method based on lexeme

    CN106844445A