A time-aware RDF quad model for MongoDB storage and a redundant attribute elimination method
By constructing a temporal RDF quadruple model for MongoDB storage, the problems of rapid growth of RDF data and ontology ambiguity are solved, enabling accurate description and efficient querying of time-sensitive data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2023-01-13
- Publication Date
- 2026-05-12
AI Technical Summary
Existing RDF storage management systems cannot adapt to the rapid growth of RDF data, especially when dealing with big data storage, high-performance querying, and low-modification requirements, and also suffer from ontology ambiguity issues.
Construct a temporal RDF quadruple model for MongoDB storage. This model extends temporal information into a quadruple model and uses a weighted approach to find and eliminate duplicate instance attributes. It is then stored and managed using a non-relational MongoDB database.
It enables accurate description of time-sensitive data, solves the ontology ambiguity problem caused by repetitive instance attributes in the ontology library, and improves data query efficiency and redundant attribute management capabilities.
Smart Images

Figure CN116467278B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of combining temporal data model construction and data semantic processing technology, specifically a temporal RDF quadruple model and a method for eliminating redundant attributes for MongoDB storage. Background Technology
[0002] Due to the rapid development and widespread adoption of modern computer applications, an increasing number of users of different ages and social organizations from various fields are participating extensively in the activities of the internet world, resulting in massive data volume, diverse data formats, and rich data content. This data is often intricately linked to the attribute of time.
[0003] Because the data displayed by application systems constantly changes over time, uncovering the patterns of data change over time has become highly significant in the context of current big data and artificial intelligence technologies. Consequently, temporal data mining techniques based on traditional domains have gradually gained widespread attention and research in academia and engineering. However, before performing a series of operations and analyses on time-attribute data, it is first necessary to perform temporal modeling on the existing data and add temporal information labels to the data. This better serves time-based data mining techniques.
[0004] From the perspective of document version management research, temporal models offer an effective management solution. The increasing size and complexity of computer application systems have made managing the constantly generated document versions more cumbersome. Currently, most application systems use document snapshots or methods based on changed content for document version management, but these suffer from drawbacks such as excessive data redundancy or poor historical version recovery performance. Temporal models, by allowing the retrieval of different versions of document objects at different times, can comprehensively and effectively solve the data redundancy problem and improve the performance of historical version recovery.
[0005] With the development of the Semantic Web and knowledge engineering, the Resource Description Framework (RDF) has formed a more systematic and comprehensive technical architecture for data and knowledge representation and processing, becoming one of the main forms of knowledge representation. Based on RDF's advantages in data and knowledge representation, many researchers have proposed using RDF for temporal data representation and management in recent years. Using RDF data models to represent temporal data can ensure the accurate and flexible description of temporal data semantics and also facilitate the sharing of temporal data in various applications within the Internet of Things (IoT) scenario.
[0006] On the other hand, with the rapid development of the Semantic Web, the amount of resource data described in RDF format is increasing. Current RDF storage management systems are no longer able to keep up with this rapid growth, especially when it comes to meeting the demands for big data storage, high-performance querying, and low-increase / decrease requirements. When building and maintaining ontology systems in an open environment, ontology ambiguity arises. Because different organizations or individuals may maintain or add knowledge instances to the ontology library for the same domain, duplicate descriptions of instances may occur, meaning different descriptions of the same object may contradict each other, leading to ambiguity.
[0007] The purpose of this invention is to provide a temporal RDF quadruple model and a method for eliminating redundant attributes for MongoDB storage. It is particularly effective for resources with time characteristics such as stocks, weather, and news, achieving accurate description of time-sensitive data. At the same time, it solves the ontology ambiguity problem caused by repetitive instance attributes in ontology knowledge instances. Summary of the Invention
[0008] This invention aims to solve the problems of the prior art. It proposes a temporal RDF quadruple model and a method for eliminating redundant attributes for MongoDB storage. The invention constructs a temporal RDF quadruple data model, stores the data in a non-relational MongoDB database, and finally uses a weighted method to find duplicate instance attributes. The model designed in this invention is particularly effective for resources with temporal characteristics, and also solves the ontology ambiguity problem caused by duplicate instance attributes. The technical solution of this invention is as follows:
[0009] A temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage, comprising the following steps:
[0010] Step 1: Construct a temporal RDF quadruple data model, using temporal information as a new tuple to expand the RDF triples, expanding the triples into a quadruple model containing temporal information, and defining the expanded temporal RDF quadruple data model.
[0011] Step 2: Store the temporal RDF quadruple instance data using a document-oriented, non-relational MongoDB database;
[0012] Step 3: Use a weighted design algorithm to find instance attributes with high redundancy in the temporal RDF quadruple data in text form stored in the MongoDB database, and eliminate these redundant instance attributes in the already constructed ontology library.
[0013] Furthermore, in step 1, the temporal RDF quadruple model is constructed by extending temporal information from RDF triples. The specific steps are as follows:
[0014] (1): Select a tense representation method from multiple tense representation methods, and determine that time point and time interval are used as timestamps to represent tense information. A time interval means that an object is valid from the beginning to the end of the time interval; a timestamp means that an object is valid at a certain time point.
[0015] (2): Extract the temporal information of the data. The temporal information can be divided into three types: validity time, transactional time, and user-defined time. Select the validity time, that is, the validity status information in the data model that describes the changes of the past, present and even future over time, as the new tuple to expand the triple. Use the timestamp and the number of data updates as temporal information to form the quad.
[0016] (3): Define the concept of the RDF quadruple model with added temporal information, provide examples for illustration, and give the time point and time interval representation of the temporal RDF graph.
[0017] Furthermore, in step 1, the temporal RDF (Resource Description Framework, a markup language for describing Web resources) quadruple model construction involves the Resource Description Framework RDF and the RDF vocabulary description language RDF. Schema is a standard language proposed by the W3C (World Wide Web Consortium, also known as the W3C Council) for describing information resources on the Web. It describes the semantic relationships between classes in the RDF model, uses uniquely identifiable URIs to identify resources on the Semantic Web, and describes resources using attributes and attribute values. The basic structure of RDF consists of edges and graphs containing nodes. Two nodes and one edge form a triple, which is a subject-verb-object (s, p, o) statement, which can also be understood as the conceptual relationship between resource, attribute, and value. The syntactic form of subject, verb, and object links attributes, attribute values, and resources to form a complete resource description. The subject describes the resource of the thing, the verb corresponds to the resource identified by the attribute, and the object is the value of the attribute, which is either a resource or a literal. When the object is a resource, it describes the relationship between resources. If it is a literal, it is a description of the resource attribute, that is, a declaration of the resource attribute and attribute value, and this declaration is called a statement.
[0018] Furthermore, the representation syntax of the temporal RDF quadruple data model is as follows:
[0019] Time point representation: (s, p, o, [t] - n), t ∈ T, n ∈ N.
[0020] The time interval is represented as: (s, p, o, [ts, te] - n), ts, te ∈ T & ts ≤ te, n ∈ N.
[0021] In the temporal RDF quadruple model, (s,p,o) is the subject-verb-object representation of the standard RDF triple mentioned above;
[0022] [t]-n or [ts,te]-n is the temporal information part of the temporal RDF quadruple, and both ends of the time information are closed intervals. The data type of t, ts, and te is xsd:date, and T = {[ts,te]|xsd:date} is the time domain. It is worth noting that the time point information is represented by [t], and the time interval information is represented by [ts,te]. When ts = te, the time interval (s,p,o,[ts,te]-n) is equivalent to the time point (s,p,o,[t]-n), where t = ts = te;
[0023] In [t]-n or [ts,te]-n, n represents the update count, indicating that this temporal RDF quadruple has been updated n times. The default value of n is 1. The change of n is based on the change of transaction time, that is, the actual time that the data exists in the database. The largest n represents the latest historical record of this temporal RDF quadruple. Based on the update count n, the change records of the quadruple can be quickly found by sorting the query result set, and transactions can be created to roll back the data when needed. When any number m (1≤m≤n) from 1 to n is not included in the query result set, it means that the triple with the update count m has been deleted.
[0024] Furthermore, in step 2, the constructed temporal RDF quadruple data instances are stored and managed in text format using a document-oriented MongoDB database. The specific steps are as follows:
[0025] (1): Construct a MongoDB collection as a table similar to a database, and create a temporal RDF quadruple set;
[0026] (2): Using Jena, the information of the temporal RDF quadruples is stored into the corresponding sets according to the decomposition rules;
[0027] (3): Use RDFS syntax as the index to create an index for the main collection.
[0028] Furthermore, Jena is used to store the information of temporal RDF quadruples into corresponding sets through decomposition rules. Jena is an open-source tool for semantic web research and a Java-based semantic web application framework. Its main structure can be divided into three layers: Graph Layer, EnhGraph Layer, and Model Layer. Jena can be used to parse RDF (Resource Description Framework) and XML (Markup Extensible Language). Jena has object classes that represent graphs, resources, properties, and text. The methods provided by these classes can be used to decompose RDF quadruple information. At the same time, Jena can also be used to query RDF data.
[0029] The index is built using RDFS (Resource Description Framework Schema Syntax) as the primary collection. RDFS is the meta-language of RDF and an extension of RDF. Statements in RDFS are also in triple format, grouping RDF resources into categories and declaring subclasses, properties, subproperties, and the domain and range of the properties.
[0030] Furthermore, in step 3, a weighted algorithm is designed to identify instance attributes with high repetition rates using the temporal RDF quadruple model data stored in MongoDB. These redundant attributes can then be eliminated. The specific steps are as follows:
[0031] (1): Define the frequency of occurrence of attributes in temporal RDF quadruple instance data and explain the calculation formula;
[0032] (2): Define the attribute redundancy of temporal RDF quadruple instance data and explain the calculation formula;
[0033] (3): The Humming Distance method, a string similarity comparison method, is used to compare attribute values;
[0034] (4): Taking the above three factors into account as the basis for searching, we can search for instance attributes with high repetition and then eliminate these redundant instance attributes in the ontology.
[0035] Furthermore, step 3 is specifically as follows: Define G as an instance set G = {g1, g2, ..., g...} q}, M represents the attribute set M = {m1, m2, ..., m n}, T represents the temporal information attribute T={t1,t2,...,t n The frequency of occurrence of the information corresponding to the attribute set is ω = {ω1, ω2, ..., ω}. n}(0≤ω≤1,0≤i≤n). Where ω i For attribute m i Accompanying temporal information attribute t i The frequency of occurrence is calculated using the following formula:
[0036]
[0037] 2. Attribute set M = {m1, m2, ..., m} n The temporal information attribute set T = {t1, t2, ..., t} n The set of repetition values corresponding to the degree of repetition is V = {v1, v2, ..., v}. n}, attribute redundancy v i The formula for calculating (0≤i≤1) is as follows:
[0038]
[0039] 3. The Humming Distance method is used to compare attribute values. Let strings a and b be examples; their similarity is:
[0040]
[0041] 4. Finally, considering the above three factors, if there are any two instances g1 and g2 in strings a and b respectively, g1 ≠ g2 and g1 and g2 belong to G, and M1 and M2 are the attribute sets of g1 and g2 respectively, The similarity calculation method for g1 and g2 is as follows:
[0042] Sim(g1,g2)=ω i ×v i ×Sim(a,b)
[0043] 5. Redundant instance attributes with high similarity and repetition are eliminated in the already constructed ontology library.
[0044] The advantages and beneficial effects of this invention are as follows:
[0045] (1) The data model based on temporal RDF quadruples described in step 1 is provided, which can mine temporal information in the data and provide a more efficient query model for resources with temporal characteristics such as stocks, weather, and news, so as to achieve accurate description of data containing temporal information.
[0046] (2) As described in step 2, the constructed temporal RDF quadruple data is efficiently stored and managed using a non-relational MongoDB database. Traditional relational databases focus more on transaction processing and are relatively inferior in terms of query speed and scalability. In environments where large amounts of Web resource data are processed and transaction requirements are low, MongoDB, as a document-oriented NoSQL database, is more convenient for comparing and searching repetitive instance attributes, and is also more efficient in data storage and querying.
[0047] (3) The weighted method described in step 3 is used to give the comparison strategy and comparison formula. By finding the duplicate instance attributes in this string comparison method, the problem of ontology ambiguity caused by different organizations or personnel building or maintaining the same domain ontology is solved to a certain extent.
[0048] (4) The temporal RDF quadruple data model proposed in step 1 also provides more ideas for query optimization for the RDF query language SPARQL. When facing different types of resources, choosing the appropriate data model can enable querying with the lowest cost and the highest accuracy execution plan.
[0049] (5) Existing data query solutions are mostly based on databases, and a few operate on the data. This invention operates on the data model based on RDF, laying a solid foundation for future semantic interoperability work. Attached Figure Description
[0050] Figure 1 This is a temporal RDF quadruple model diagram representing time points according to a preferred embodiment of the present invention.
[0051] Figure 2 It is a temporal RDF quadruple model represented at time points.
[0052] Figure 3 It is a temporal RDF quadruple storage mode based on MongoDB.
[0053] Figure 4 This is the overall flowchart provided by the present invention. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.
[0055] The technical solution of the present invention to solve the above-mentioned technical problems is:
[0056] like Figure 4As shown, a temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage includes the following steps:
[0057] 1: Construct a temporal RDF quadruple data model, using temporal information as a new tuple to extend the RDF triple, expanding the triple into a quadruple model containing temporal information, and defining the extended temporal RDF quadruple data model.
[0058] 2: Use a document-oriented, non-relational MongoDB database to store temporal RDF quadruple instance data, thereby achieving effective management of temporal RDF quadruple data instances.
[0059] 3: For temporal RDF quadruple data in text form stored in MongoDB database, an algorithm based on weighted methods is designed to find instance attributes with high repetition. These redundant instance attributes can be eliminated in the already constructed ontology library.
[0060] Furthermore, in step 1, the construction of the temporal RDF quadruple model is carried out by extending temporal information from RDF triples. The specific steps are as follows:
[0061] (1): Select a suitable tense representation method from various tense representation methods, and determine that time points and time intervals are used as timestamps to represent tense information. A time interval means that an object is valid from the beginning to the end of the time interval. A timestamp means that an object is valid at a certain point in time.
[0062] (2): Extract the temporal information of the data. The temporal information can be divided into three types: validity time, transactional time, and user-defined time. This invention selects validity time, that is, the validity status information in the data model that describes the changes of the past, present and even future over time, as a new tuple to expand the triple. The timestamp and the number of data updates are used as temporal information to form a quad.
[0063] (3): Define the concept of the RDF quadruple model with added temporal information, provide examples for illustration, and give the time point and time interval representation of the temporal RDF graph.
[0064] Furthermore, the specific steps for effectively storing and managing the constructed temporal RDF quadruple data instances in text format using a document-oriented MongoDB database, as described in step 2, are as follows:
[0065] (1): Construct a MongoDB collection as a table similar to a database and create a temporal RDF quadruple set.
[0066] (2): Using Jena, the information of the temporal RDF quadruples is stored into the corresponding sets by decomposition rules.
[0067] (3): Use RDFS syntax as the index to create an index for the main collection to improve query efficiency.
[0068] Furthermore, in step 3, an algorithm based on weighted summation is used to identify instance attributes with high repetition rates in the temporal RDF quadruple model data stored in MongoDB. These redundant attributes can be eliminated. The specific steps are as follows:
[0069] (1): Define the frequency of occurrence of attributes in temporal RDF quadruple instance data and explain the calculation formula.
[0070] (2): Define the attribute redundancy of temporal RDF quadruple instance data and explain the calculation formula.
[0071] (3): It is worth noting that this invention is mainly based on text similarity to find redundant instance data. Therefore, we use the Humming Distance method, a string similarity comparison method, to compare attribute values.
[0072] (4): Taking the above three factors into account as the basis for searching, we can search for instance attributes with high repetition and then eliminate these redundant instance attributes in the ontology.
[0073] This invention relates to a temporal RDF quadruple model and a method for eliminating redundant attributes for MongoDB storage. In step 1, the construction of the temporal RDF quadruple model utilizes the Resource Description Framework (RDF) and the RDF Schema, a standard language proposed by the W3C (World Wide Web Consirtium) for describing information resources on the Web. RDF describes the semantic relationships between classes in the RDF model, uses uniquely identifiable URIs to identify resources on the Semantic Web, and describes resources using attributes and attribute values. The basic structure of RDF consists of edges containing nodes and a graph. Two nodes and one edge form a triple, expressed in the form of subject-verb-object (s, p, o), which can also be understood as the conceptual relationship between resource, attribute, and value. The syntactic form of subject, verb, and object links attributes, attribute values, and resources to form a complete resource description. The subject describes the resource of the thing, the verb corresponds to the resource identified by the attribute, and the object is the value of the attribute, which can be a resource or a literal. When the object is a resource, it describes the relationship between resources. If it is a literal, it describes the attributes of the resource, that is, it is a declaration of the resource attributes and attribute values, and this declaration is called a statement.
[0074] This invention adds time information and update count information as new tuples to the traditional RDF triple to form a temporal RDF quadruple representation, thereby describing resources containing time information. Specifically, as described below, in order to represent temporal data using time information and update count information, the basic idea of this invention is to retain the basic form of RDF triples and add time information and update count information as new tuples, i.e., temporal information, to extend the traditional RDF triple to a quadruple representation containing temporal information, that is, to form a quadruple (s, p, o, [t]-n) representation.
[0075] Regarding the representation of temporal information, this invention uses validity time as the time information t, that is, the time describing the historical, present, and even future validity status information of the data model as it changes over time. It is worth noting that validity time can be a point in time or a time interval. A time interval indicates that the data is valid from the beginning to the end of that time interval. The boundary values of the time interval are represented by the start time point ts and the end time point te. Meanwhile, to further describe the temporal information, to be able to query historical versions of the data in the database, and to perform version rollback when there are erroneous updates, this invention adds an update technique information n. The specific representation syntax of the temporal RDF quadruple data model is as follows:
[0076] Time point representation: (s, p, o, [t] - n), t ∈ T, n ∈ N.
[0077] The time interval is represented as: (s, p, o, [ts, te] - n), ts, te ∈ T & ts ≤ te, n ∈ N.
[0078] In the temporal RDF quadruple model, (s,p,o) is the subject-verb-object representation of the standard RDF triple mentioned above.
[0079] [t]-n or [ts,te]-n is the temporal information part of the temporal RDF quadruple, and both ends of the time information are closed intervals. The data types of t, ts, and te are xsd:date, and T = {[ts,te]|xsd:date} is the time domain. It is worth noting that the time point information is represented by [t], and the time interval information is represented by [ts,te]. When ts = te, the time interval (s,p,o,[ts,te]-n) is equivalent to the time point (s,p,o,[t]-n), where t = ts = te.
[0080] In [t]-n or [ts,te]-n, 'n' represents the update count, indicating that this temporal RDF quadruple has been updated n times. The default value of 'n' is 1. Changes in 'n' are based on transactional time, i.e., the actual time the data has existed in the database. The largest 'n' represents the latest historical record of this temporal RDF quadruple. Based on the update count 'n', by sorting the query result set, the change records of the quadruple can be quickly found, and transactions can be created to roll back the data when needed. It is particularly important to note that if any number m (1 ≤ m ≤ n) from 1 to n is not included in the query result set, it means that the triplet with an update count of m has been deleted.
[0081] To better understand this model, a simple example of a temporal RDF quadruple model is given here.
[0082] Example: A temporal RDF quadruple model data sample representing the personal information of student Li Lei.
[0083] @prefix rdf: <http: / / www.w3.org / 19999 / 2 / 22-rdf-syntax-ns#>.
[0084] @prefix rdfs:<htttp: / / www.w3.org / 2000 / 01 / rdf-schema#> .
[0085] @prefix xsd:<http: / / www.w3.org / 2001 / XMLSchema#> .
[0086] <lilei> <name>"LiLei".
[0087] <lilei> <hasbirthcity>"ChongQing″[2000-01-01]-1.
[0088] <lilei><Study_In>″CQUPT″[2018-09-01,2019-07-01]-1.
[0089] <lilei><study_In>″CQUPT″[2019-09-01,2020-07-01]-2.
[0090] <lilei><study_In>″CQUPT″[2020-09-01,2021-07-01]-3.
[0091] <lilei><Study_In>"CQUPT″[2021-09-01,2022-07-01]-4.
[0092] <lilei><Credit_Hour>″20"[2019-07-01]-1.
[0093] <lilei><Credit_Hour>″45"[2020-07-01]-2.
[0094] <lilei><Credit_Hour>″76"[2020-07-01]-3.
[0095] <lilei><Credit_Hour>"100"[2020-07-01]-4.
[0096] The above illustrates a data example, including a student's personal information such as birth information, enrollment date, and credits earned at the start of each academic year, with time measured in days. As can be seen from the above, this model can represent not only temporal information but also updated count information that changes over time.
[0097] Furthermore, this invention defines several new properties in the RDF-based vocabulary that conform to the temporal RDF quadruple model:
[0098] rdft: hasTime indicates that time information is presented in a point-in-time format.
[0099] rdft: hasStartTime indicates that the time information is presented in a time interval format and has a start time.
[0100] rdft: hasEndTime indicates that the time information is presented in a time interval format and has an end time.
[0101] rdft: hasUpdateNum represents the temporal RDF quadruple update count information.
[0102] The point in time is used as a syntactic description of time information d(s, p, o, [t]-n).
[0103] ? statement rdf: type rdf: Statement.
[0104] ? statement rdf:subject s.
[0105] ? statement rdf: predicate p.
[0106] ? statement rdf: ob ject o.
[0107] ? dare rdft:hasTime t.
[0108] ? date rdft:hasUpdateNum n.
[0109] The time interval is used as a syntactic description of time information d(s, p, o, [ts, te]-n).
[0110] ? statement rdf: type rdf: Statement.
[0111] ? statement rdf:subject s.
[0112] ? statement rdf: predicate p.
[0113] ? statement rdf: ob ject o.
[0114] ? date rdft:hasStartTime ts.
[0115] ? date rdft: hasEndTime te.
[0116] ? date rdft:hasUpdateNum n.
[0117] Based on the two temporal RDF quadruple model data examples given above and the newly defined RDF vocabulary attributes, the following example description is provided: the first quadruple indicates that student Li Lei was born in Chongqing on January 1, 2000, and the second quadruple indicates that he attended Chongqing University of Posts and Telecommunications between September 1, 2021 and July 1, 2022.
[0118] <lilei> <hasbirthcity>"ChongQing"[2000-01-01]-1.
[0119] <lilei><Study_In>"CQUPT"[2021-09-01,2022-07-01]-4.
[0120] rdf:type rdf:Statement.
[0121] rdf:sub ject <lilei>.
[0122] rdf:predicate <hasbirthcity>.
[0123] rdf:ob ject"ChongQing".
[0124] ?date rdf:type rdf:Property.
[0125] ?date rdft:hasTime"2000-01-01″^^xsd:date.
[0126] ?date rdft:hasUpdateNum″1"^^xsd:integer.
[0127] rdf:sub ject <lilei>.
[0128] rdf: predicate<Study_In> .
[0129] rdf:object"CQUPT".
[0130] ? date rdf:type rdf:Property.
[0131] ? date rdft:hasStartTime"2021-09-01"^^xsd:dare.
[0132] ? date rdft:hasEndTime"2022-07-01"^^xsd:date.
[0133] ? date rdft: hasUpdateNum″4″^^xsd: integer.
[0134] Similar to traditional RDF models, each temporal RDF quadruple can be represented as a temporal RDF graph, where S, P, and 0 represent the subject, verb, and object, respectively, and T represents the newly added tuple, i.e., temporal information. Based on the time point and time interval, they are represented as follows: Figure 1 and Figure 2 express.
[0135] The specific implementation of step 2, which uses a document-oriented, non-relational MongoDB database to store and manage the constructed temporal RDF quadruple data instances, is as follows.
[0136] Using XML to store data according to the RDF specification requires an ontology library. In environments with rapidly growing data volumes, this can result in enormous files, making direct manipulation of these files inefficient. Therefore, choosing a suitable database is crucial. When processing large amounts of data, the requirements for transactional processing are generally low. Therefore, after constructing the temporal RDF quadruple model, this invention selects MongoDB, a document-oriented NoSQL database, as the storage database for the temporal RDF quadruple model. MongoDB stores data in document format, making its high access and read speeds ideal for this environment.
[0137] The parsing tool used is the standard Jena, which parses the attributes and stores the resulting attribute values as strings in a MongoDB database. Below is the MongoDB database storage schema design, as shown in the diagram. Figure 3 As shown.
[0138] Data in MongoDB is stored as documents. A document in MongoDB is equivalent to a table in a relational database, and a collection is equivalent to a table in a relational database. The specific steps are as follows:
[0139] 1. Create a database named t-rdf.
[0140] 2. Create t-RDF and t-RDFS collections.
[0141] 3. Using Jena, the tuple information of the temporal RDF quadruples is stored into the response set according to the decomposition rules.
[0142] 4. It is worth noting that the index order in MongoDB databases is very important; any shuffling or reordering may affect search efficiency.
[0143] In step 3, a weighted algorithm is designed to find and eliminate instance attributes with high repetition rates from the temporal RDF quadruple data stored in the MongoDB database. The specific implementation is as follows.
[0144] An ontology is a collection of public vocabularies for a specific domain. It can be formalized to varying degrees and defines the meanings of terms within that domain and the relationships between them. The construction of an ontology often utilizes a great deal of information related to the domain to describe it. In cases where multiple developers work on the ontology without interaction or data sharing, inconsistencies in the definition of ontology concepts can arise, leading to semantic multiplicity issues caused by ambiguities or differing interpretations of the same objects.
[0145] To address the aforementioned semantic multiplicity problem, this invention relates to a weighted approach for finding instance attributes with high repetition rates, which can then be eliminated within a pre-constructed ontology repository. As defined by RDF, it describes data in the form of triples, and URIs within an ontology repository are unique, marking the uniqueness of the described objects. The RDF-based temporal data model proposed in this invention similarly describes resources using unique URIs, thus allowing the search for equivalent instances using the same URI.
[0146] In RDF resource descriptions, all concepts and attributes are equally important. However, in practical applications, users often add or remove certain attributes based on their needs. This invention uses a weighted approach to differentiate the importance of these attributes based on text similarity and identifies instance attributes with high repetition rates.
[0147] 1. Define G as a set of instances G = {g1, g2, ..., g...} q }, M represents the attribute set M = {m1, m2, ..., m n }, T represents the temporal information attribute T={t1,t2,...,t n The frequency of occurrence of the information corresponding to the attribute set is ω = {ω1, ω2, ..., ω}. n }(0≤ω≤1,0≤i≤n). Where ω i For attribute m i Accompanying temporal information attribute t i The frequency of occurrence is calculated using the following formula.
[0148]
[0149] 2. Attribute set M = {m1, m2, ..., m} n The temporal information attribute set T = {t1, t2, ..., t} n The set of repetition values corresponding to the degree of repetition is V = {v1, v2, ..., v}. n }. Attribute redundancy v i The formula for calculating (0≤i≤1) is as follows:
[0150]
[0151] 3. Comparison of Attribute Values This invention uses the string similarity method Humming Distance. Let strings a and b be , then their similarity is:
[0152]
[0153] 4. Finally, considering the above three factors, if there are any two instances g1 and g2 in strings a and b respectively, g1 ≠ g2 and g1 and g2 belong to G, and M1 and M2 are the attribute sets of g1 and g2 respectively, The similarity calculation method for g1 and g2 is as follows:
[0154] Sim(g1,g2)=ω i ×v i ×Sim(a,b)
[0155] 5. Redundant instance attributes with high similarity and repetition are eliminated in the already constructed ontology library.
[0156] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0157] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0158] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0159] The above embodiments should be understood as illustrative only and not as limiting the scope of protection of the present invention. After reading the description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.< / lilei> < / hasbirthcity> < / lilei> < / lilei> < / hasbirthcity> < / lilei> < / lilei> < / lilei> < / lilei> < / lilei> < / lilei> < / lilei> < / lilei> < / lilei> < / hasbirthcity> < / lilei> < / name> < / lilei>
Claims
1. A temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage, characterized in that, Includes the following steps: Step 1: Construct a temporal RDF quadruple data model. Temporal information is used as a new tuple to expand the RDF triples, transforming the triples into quadruple models containing temporal information. The expanded temporal RDF quadruple data model is then defined. Specifically, Step 1 uses timestamps and data update counts as temporal information to construct quadruples. The syntax for representing the temporal RDF quadruple data model is as follows: Time point representation: Time interval representation: In the temporal RDF quadruple model It is the subject-verb-object representation of the standard RDF triple mentioned above; or It is the temporal information part of the temporal RDF quad, and both ends of the time information are closed intervals; , and The data type is For the time domain; it is worth noting that point-in-time information is used This indicates that time interval information is used... It means that when Time interval Equivalent to a point in time ,in ; or In This indicates that the count information has been updated, meaning that this temporal RDF quad has been updated. Second-rate; Step 2: Store the temporal RDF quadruple instance data using a document-oriented, non-relational MongoDB database; Step 3: Use a weighted design algorithm to find instance attributes with high redundancy in the text-based temporal RDF quadruple data stored in the MongoDB database, and eliminate these redundant instance attributes in the already constructed ontology library; the specific steps of step 3 are as follows: A1. Definition For a collection of instances , Represents a set of attributes , Represents temporal information attributes The frequency of occurrence of the information corresponding to the attribute set is .in For attributes Accompanying temporal information attributes The frequency of occurrence; the calculation formula is as follows: ; A2. Attribute Set Temporal information attribute set The set of corresponding duplicate value repetition is Attribute redundancy The calculation formula is as follows: ; A3. The Humming Distance method is used to compare attribute values. Let the string be... and Then their similarity is: ; A4. Finally, considering the above three factors comprehensively, if there are any two instances... and In the string respectively and Inside, and , belong ,and , They are respectively and The set of attributes, ,but and The similarity calculation method is as follows ; A5. Redundant instance attributes with high similarity and repetition are eliminated in the already constructed ontology library.
2. The temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage as described in claim 1, characterized in that, In step 1, the temporal RDF quadruple model is constructed by extending temporal information from RDF triples. The specific steps are as follows: B1. Select a tense representation method from multiple tense representation methods, and determine that time points and time intervals are used as timestamps to represent tense information. A time interval means that an object is valid from the beginning to the end of the time interval; a timestamp means that an object exists and is valid at a certain time point. B2. Extract the temporal information of the data. The temporal information can be divided into three types: validity time, transactional time, and user-defined time. Select the validity time, that is, the validity status information in the data model that describes the changes of the past, present and even future over time, as the new tuple to expand the triple. Use the timestamp and the number of data updates as temporal information to form a quadruple. B3. Define the concept of the RDF quadruple model with added temporal information, provide examples for illustration, and give the time point and time interval representation of the temporal RDF graph.
3. The temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage as described in claim 2, characterized in that, The resource description framework RDF and RDF Schema in step 1, which constructs the temporal RDF resource description framework quadruplet model, are standard languages proposed by the W3C World Wide Web Consortium for describing information resources on the Web. They describe the semantic relationships between classes in the RDF model, use uniquely identifiable URIs to identify resources on the Semantic Web, and describe resources using attributes and attribute values. The basic structure of RDF consists of edges and graphs containing nodes; two nodes and one edge form a triple, namely subject-verb-object. The statement form represents the conceptual relationship between resources, attributes, and values. It uses a subject, predicate, and object grammatical structure to link attributes, attribute values, and resources, forming a complete resource description. The subject describes the resource of the thing, the predicate corresponds to the resource that describes the attribute identifier, and the object is the value of the attribute, which can be either a resource or a literal. When the object is a resource, it describes the relationship between resources; if it is a literal, it describes the resource attribute, that is, it declares the resource attribute and attribute value, and this declaration is called a statement.
4. The temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage as described in claim 3, characterized in that, The The default value is 1; The changes are based on changes in the time of things, that is, the actual time that the data exists in the database, the largest. This represents the latest historical record of this temporal RDF quad, used to update the count. Based on this, by sorting the query result set, changes to the four-tuple can be quickly found, and transactions can be created to roll back the data when needed; when any number in If it is not included in the query result set, it means that the update count is [number missing]. The triplet was deleted.
5. The temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage according to claim 3, characterized in that, In step 2, the document-oriented MongoDB database is used to store and manage the constructed temporal RDF quadruple data instances in text format. The specific steps are as follows: C1. Construct a MongoDB collection as a table similar to a database, and create a collection of temporal RDF quadruples; C2. Using Jena, the information of the temporal RDF quadruples is stored into the corresponding sets according to the decomposition rules; C3. Use RDFS syntax as the index to create an index for the primary collection.
6. The temporal RDF quadruple model and redundant attribute elimination method for MongoDB storage as described in claim 5, characterized in that, The process involves using Jena to decompose temporal RDF quadruple information into corresponding sets using decomposition rules. Jena is an open-source tool for semantic web research, a Java-based semantic web application framework. Its main structure consists of three layers: Graph Layer, EnhGraph Layer, and Model Layer. Jena can be used to parse RDF (Resource Description Framework) and XML (Markupable Extensible Language). Jena provides object classes representing graphs, resources, properties, and text. The methods provided by these classes are used to decompose RDF quadruple information. Jena is also used for querying RDF data. The RDFS (Resource Description Framework Schema Syntax) is used as the index to build the main collection. RDFS is the meta-language of RDF and an extension of RDF. Statements in RDFS are also in triple format, which divides RDF resources into categories in the form of groups and declares subclasses, properties, subproperties, and the domain and range of the properties.