Data virtualization data source matching method based on ontology and first-order logic

Through the data virtualization method based on ontology and first-order logic, the problem of inability to integrate non-relational data sources and intelligent matching in the existing technology is solved, and the natural integration of heterogeneous data sources and intelligent matching of global query is realized, which improves the Automation and user experience of data virtualization.

CN119248981APending Publication Date: 2025-01-03ZHIYING FUTURE (XIAN) INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411316909.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Existing data virtualization technologies cannot effectively support the integration of non-relational data sources and ontology-based intelligent matching, resulting in incomplete coverage of heterogeneous data integration, and the application layer requires explicitly specifying data source information for global data query.

Method used

Using data virtualized data source matching method based on ontology and first-order logic, the data source is used to detect the available situation of global queries by establishing domain data ontology and local data views, and semantic matching and parameter rename are used for unary predicates and binary predicates. , realize intelligent matching between data sources and global queries.

Benefits of technology

Realize natural seamless integration across heterogeneous data sources and intelligent matching of global data query, blocking the application layer's dependence on the logical model and physical distribution of data resources, improving the automation and intelligence of data virtualization, and improving User experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248981A_ABST
    Figure CN119248981A_ABST
Patent Text Reader

Abstract

The invention discloses an ontology and first-order logic-based data virtualization data source matching method, which comprises the following steps of: establishing a domain data ontology, recording in a form of a set of unitary predicates and binary predicates, and forming a domain data view; using a variable tuple and a unary predicate and binary predicate set for constraining the variable tuple based on a domain ontology to record the capability of each data source for providing data service to the outside, and forming a local data view; and when a user needs to carry out global query, detecting the availability condition of each data source for the global query according to the field data view and the local data view. The field data ontology in a first-order logic formula form is adopted to describe the field data view, so that unified mode description can be carried out on structured and semi-structured heterogeneous and dispersed data sources. When a data virtualization application expresses a global query, a data view related to the query does not need to be clearly specified, and the dependence of the application on a logic data model and data physical distribution of field data resources is shielded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data virtualization, and in particular relates to a data virtualization data source matching method based on ontology and first-order logic. Background Art

[0002] J. Wang et al. proposed a method for implementing unified query of heterogeneous relational databases using SPARQL (J. Wang, Z. Miao, Y. Zhang and B. Zhou, "Querying Heterogeneous Relational Database using SPARQL," 2009 Eighth IEEE / ACIS International Conference on Computer and Information Science, Shanghai, China, 2009, pp. 475-480.). On the one hand, this method does not support the integration of non-relational data sources, and on the other hand, it does not explicitly use the support of ontology and first-order logic. The method proposed by J. Wang in the literature requires that when using SPARQL query to describe the data source view, the correspondence between the variable name in the SPARQL query and the field name in the table of the relational database must be given, which is not convenient for simple expression of the data source, and is not convenient for supporting non-relational data sources. Moreover, it does not check whether there is a semantic contradiction between the matched data source and the global query based on the first-order logic theory.

[0003] The patent with application number 2023106601190 and titled "Data virtualization system, method, device, equipment and medium based on graph structure" discloses a data virtualization system, method, device, equipment and medium based on graph structure, including: configuring metadata relationship graph according to metadata configuration parameters, and initializing cache data table according to metadata relationship graph, receiving virtual view query request sent by user end, parsing request parameters, obtaining virtual view SQL, converting virtual view SQL into SQL query statement, executing SQL query statement on cache and data node according to request parameters, obtaining collection data, and feeding back collection data into virtual view to user end. The method of this patent is still based on metadata to realize the conversion of virtual view query SQL to data source SQL, and cannot realize intelligent matching based on ontology, and of course does not support the access of non-relational data source, so the coverage of heterogeneous data integration is incomplete. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a data virtualization data source matching method based on ontology and first-order logic, which solves the defect that the global data view in the existing data virtualization technology contains data source information, and further requires the application layer to clearly indicate the data source when expressing global data queries.

[0005] In order to achieve the above-mentioned purpose of the invention, the technical solution adopted by the present invention is: a data virtualization data source matching method based on ontology and first-order logic, comprising the following steps:

[0006] S1. Establish a domain data ontology, record it in the form of a set of unary predicates and binary predicates, and form a domain data view;

[0007] S2. Use variable tuples and unary predicates and binary predicate sets constraining them based on domain ontology to record the ability of each data source to provide data services to the outside world, forming a local data view;

[0008] S3. When the user needs to perform a global query, the availability of each data source for the global query is detected based on the domain data view and the local data view.

[0009] Further: In S1, the method of recording in the form of a set of unary predicates and binary predicates is specifically:

[0010] The unary predicate Class(A) is used to indicate that A is a concept, and the binary predicate P(A, B) is used to indicate that there is a relationship between A and B specified by P, where the attribute P of A in the binary predicate P(A, B) has a value B, and B is a concept or a simple data type.

[0011] Further: In S2, the method for recording the capability of each data source to provide external data services is specifically:

[0012] The ability of any data source to provide external data services is described in the form of a variable tuple and a first-order logic formula constraining it. The ability of the data source S to provide external data services is described in the first-order logic formula as follows:

[0013] <Y1,Y2,...,Y ns >← <S1,S2,...,S ms ,C S >

[0014] In the formula, <Y1,Y2,...,Y ns >Header describing the data source; <S1,S2,...,S ms ,C S > is the body described by the data source, where Y i1is the i1th output variable of the data source, and i1=1,2,…,ns, ns is the total number of output variables of the data source, which is used to represent the data items provided by the data source, S j1 is the semantic constraint condition for the header data item using the unary and binary predicates in the domain data ontology, and j1 = 1, 2, ..., ms, where ms is the number of constraint predicates, C S These are logical formulas constructed using comparison operators, describing the value constraints on the head variables.

[0015] Further: In S3, the method for detecting the availability of any data source for the global query is specifically:

[0016] S31. Each predicate R in the body of the global query j2 , and each predicate S in the body of the data source j1 , perform semantic matching according to the domain data ontology, and rename the parameters of the variables in the data source according to the semantic matching;

[0017] The global query G is in the form of <X1,X2,...,X ng >← <R1,R2,...,R mg ,C G >, where <X1,X2,...,X ng > is the query header, used to name the query result variable, X i2 is the i2th result variable name, and i2=1,2,…,ng, where ng is the total number of query result variable names; <R1,R2,...,R mg ,C G > is the body of the query, where R j2 is the semantic constraint condition for the value of the header result variable name using the unary and binary predicates in the domain data ontology, and j2 = 1, 2, ..., mg, mg is the number of constraint predicates, C G It is a number of logical formulas constructed with comparison operators, used to describe the value constraints on the header variable name;

[0018] S32. Determine whether the data source description after parameter name change meets the fifth condition. If so, the data source is available for global query. If not, the data source is useless for global query.

[0019] Further: In said S31, the method for renaming parameters is specifically as follows:

[0020] If both predicates being matched are unary predicates, such as R j2 (x) and semantic S j1 (y), where x is the variable name in the global query header, y is the variable name in the data source representation header, and R j2 and Sj1 Same name or in the domain data ontology S j1 YesR j2 If the first and second conditions are met at the same time, the variable y in the data source is replaced by the variable x;

[0021] The first condition is that the variable y in the data source has never been replaced, and the second condition is that if the variable x exists in the data source, the variable x in the data source is replaced with a new variable first;

[0022] If both predicates being matched are binary predicates, such as predicate R j2 (x1,x2) and S j1 (y1,y2), where x1 and x2 are the variable names in the global query header, y1 and y2 are the variable names in the data source representation header, and R j2 and S j1 Same name or in the domain data ontology S j1 YesR j2 If the third and fourth conditions are met at the same time, the variables y1 and y2 in the data source are replaced by variables x1 and x2 respectively;

[0023] The third condition is that the variables y1 and y2 in the data source have never been replaced, and the fourth condition is that if the variables x1 and x2 exist in the data source, the variables x1 and x2 in the data source are replaced with new variables.

[0024] Further: in said S32, the fifth condition is specifically:

[0025] After the variables in the description of the data source S are renamed in the data source matching process, the variable name set in the header of the data source S has an intersection with the variable name set in the header of the global query G, and there is no logical contradiction between the body of the data source S and the body of the global query G.

[0026] The beneficial effects of the present invention are as follows: the present invention provides a data virtualization data source matching method based on ontology and first-order logic, which can express global queries across heterogeneous data sources based on domain data ontology, and use ontology and first-order logic to achieve intelligent matching between global queries and physical data sources, without the need to use SQL language to express queries on specified data views at the application layer as in existing technologies and products, and achieve mapping between application layer queries and physical data sources with the help of metadata management, thereby naturally supporting multi-source heterogeneous data fusion and unified data queries across heterogeneous data sources based on the fusion, shielding the logical organization and physical distribution of multi-source heterogeneous data resources from the application layer, greatly improving the user experience of using distributed heterogeneous data resources, and having the following advantages in finding available data sources for a given global query in the field of data virtualization:

[0027] (1) Using the domain data ontology in the form of first-order logic formulas to describe the domain data view can provide a unified schema description for structured and semi-structured heterogeneous and distributed data sources.

[0028] (2) When expressing global queries, data virtualization applications do not need to explicitly specify the data views involved in the query, thereby shielding the application from dependence on the logical data model and physical distribution of domain data resources.

[0029] (3) Guide the development of new data virtualization devices so that they can automatically find data sources that can share global query tasks, automatically eliminate irrelevant data sources, improve the automation and intelligence of the devices, and improve the application experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 The present invention is a flowchart of a data virtualization data source matching method based on ontology and first-order logic.

[0031] Figure 2 Schematic diagram of the domain ontology used for the example. DETAILED DESCRIPTION

[0032] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0033] Embodiment 1:

[0034] like Figure 1 As shown, in one embodiment of the present invention, a data virtualization data source matching method based on ontology and first-order logic includes the following steps:

[0035] S1. Establish a domain data ontology, record it in the form of a set of unary predicates and binary predicates, and form a domain data view;

[0036] S2. Use variable tuples and unary predicates and binary predicate sets constraining them based on domain ontology to record the ability of each data source to provide data services to the outside world, forming a local data view;

[0037] S3. When the user needs to perform a global query, the availability of each data source for the global query is detected based on the domain data view and the local data view.

[0038] The purpose of the present invention is to achieve natural and seamless integration of structured, semi-structured, distributed and heterogeneous data sources based on ontology, and to achieve seamless decomposition of data queries based on global virtual data views into physical data source queries, thereby overcoming the defects of existing data virtualization technologies that require clear global expression methods of virtual data views and require the application layer to clearly understand the organization of virtual data, and to achieve the expression of data query requirements by the application layer only based on domain data ontology, thereby improving the application experience and application development efficiency of multi-source heterogeneous data virtualization technologies.

[0039] In S1, the method of recording in the form of a set of unary predicates and binary predicates is specifically as follows:

[0040] The unary predicate Class(A) is used to indicate that A is a concept, and the binary predicate P(A, B) is used to indicate that there is a relationship between A and B specified by P, where the attribute P of A in the binary predicate P(A, B) has a value B, and B is a concept or a simple data type.

[0041] In this embodiment, the present invention adopts domain data ontology to express domain data view, and describes the data view of global query and data source based on the domain data ontology, and also realizes intelligent matching of global query and related data sources based on the domain data ontology, thereby realizing automatic query task decomposition.

[0042] Domain data ontology is a method of describing domain knowledge and can be expressed as a set of triples. A triple is expressed as<s,p,o> , where s is the subject, which is the subject described by the triple; p is a binary predicate, which is used to describe a certain characteristic of s, and its value is o. Its predicate representation is p(s,o), and o can be a simple numeric value or another subject. When o is the subject, s and o can be an abstract concept, which is formally called a class, such as Person, or an instance of a concept, such as "Zhang San", which is formally represented by the unary predicate Person (Zhang San) to indicate that Zhang San is an instance of the concept Person. In this way, the domain data ontology can be regarded as a set composed of unary predicates and binary predicates, and the elements in the set are in a logical "conjunction" relationship, that is, a logical "and" relationship.

[0043] The present invention uses concepts and the relationships between concepts to describe the organizational model of data in a domain. In other words, a set of binary relationships is used to represent the global data model of a domain, forming a directed graph formed by concepts and their relationships in a visual image, also known as the global view of domain data. This global data model can uniformly express and integrate structured and semi-structured heterogeneous data models:

[0044] (1) For the structured relational data model R(F1,F2,...,F n), where R is the table name of the relational database, F1, F2, ..., F n is the field name, for each field F i , which is represented in the ontology as a i The binary relationship of (R,o), o is a basic data type or another table name. Similarly, the same conclusion applies to structured data in EXCEL and CSV formats;

[0045] (2) For common data resources in the form of JSON represented by key-value pairs, they can also be represented by the binary predicate p(s,o), because the role of the key-value pair is to describe the value of the key p for an object s as o. Similarly, for semi-structured data resources directly represented by XML and XML schema, their external data model can also be described by ontology.

[0046] The domain global data model based on the domain data ontology description constructed based on the above theory does not contain data source information. The upper-level application only needs to express data query requirements across data sources seamlessly on this model, and the global data management platform automatically solves the mapping relationship between the global query and the underlying distributed and heterogeneous data sources, thereby realizing flexible and near real-time global data acquisition.

[0047] In S2, the method for recording the capability of each data source to provide external data services is specifically as follows:

[0048] The ability of any data source to provide external data services is described in the form of a variable tuple and a first-order logic formula constraining it. The ability of the data source S to provide external data services is described in the first-order logic formula as follows:

[0049] <Y1,Y2,...,Y ns >← <S1,S2,...,S ms ,C S >

[0050] In the formula, <Y1,Y2,...,Y ns >Header describing the data source, denoted as S->head; <S1,S2,...,S ms ,C S > is the body described by the data source, denoted as S->body, where Y i1 is the i1th output variable of the data source, and i1=1,2,…,ns, ns is the total number of output variables of the data source, which is used to represent the data items provided by the data source, S j1 is the semantic constraint condition for the header data item using the unary and binary predicates in the domain data ontology, and j1 = 1, 2, ..., ms, where ms is the number of constraint predicates, C SThese are logical formulas constructed using comparison operators, describing the value constraints on the head variables.

[0051] In this embodiment, the variable names in the logic formula do not have to use the terms in the domain data ontology, but can be any variable names, so that the method of the present invention has good flexibility in application.

[0052] In S3, the method for detecting the availability of any data source for global query is specifically as follows:

[0053] S31. Each predicate R in the body of the global query j2 , and each predicate S in the body of the data source j1 , perform semantic matching according to the domain data ontology, and rename the parameters of the variables in the data source according to the semantic matching;

[0054] The global query G is in the form of <X1,X2,...,X ng >← <R1,R2,...,R mg ,C G >, where <X1,X2,...,X ng > is the head of the query, denoted as G->head, which is used to name the query result variable, X i2 is the i2th result variable name, and i2=1,2,…,ng, where ng is the total number of query result variable names; <R1,R2,...,R mg ,C G > is the body of the query, denoted as G->body, where R j2 is the semantic constraint condition for the value of the header result variable name using the unary and binary predicates in the domain data ontology, and j2 = 1, 2, ..., mg, mg is the number of constraint predicates, C G It is a number of logical formulas constructed with comparison operators, used to describe the value constraints on the header variable name;

[0055] S32, determining whether the data source description after the parameter name is changed satisfies the fifth condition;

[0056] If yes, the data source is available to the global query. In this case, the variables with the same name in the header of the data source and the header of the global query can be recorded for other use.

[0057] If not, the data source is useless for the global query, and the subsequent execution plan for the global query does not need to consider the existence of the data source.

[0058] In this embodiment, the judgment principle of semantic matching between data source and global query is:

[0059] Since the variables in the header of the global query and the header of the data source are named by different units or users of this method, they cannot be coordinated, and considering the flexibility of the method application, coordination should not be required. Therefore, the purpose of the following matching process is to use the semantic provisions of the body of the global query and the body of the data source to replace the variable names in the header of the data source and align them with the variable names in the header of the global query, so as to examine whether the data source is useful for the global query.

[0060] In S31, the method for renaming parameters is specifically as follows:

[0061] If both predicates being matched are unary predicates, such as R j2 (x) and semantic S j1 (y), where x is the variable name in the global query header, y is the variable name in the data source representation header, and R j2 and S j1 Same name or in the domain data ontology S j1 YesR j2 If the first and second conditions are met at the same time, the variable y in the data source is replaced by the variable x;

[0062] The first condition is that the variable y in the data source has never been replaced, and the second condition is that if the variable x exists in the data source, the variable x in the data source is replaced with a new variable first;

[0063] If both predicates being matched are binary predicates, such as predicate R j2 (x1,x2) and S j1 (y1,y2), where x1 and x2 are the variable names in the global query header, y1 and y2 are the variable names in the data source representation header, and R j2 and S j1 Same name or in the domain data ontology S j1 YesR j2 If the third and fourth conditions are met at the same time, the variables y1 and y2 in the data source are replaced by variables x1 and x2 respectively;

[0064] The third condition is that the variables y1 and y2 in the data source have never been replaced, and the fourth condition is that if the variables x1 and x2 exist in the data source, the variables x1 and x2 in the data source are replaced with new variables.

[0065] Through the above method, according to the domain data view and the local data view, the semantic matching between the output of any data source and the output required by the global query is checked. If there is no match at all, the data source does not participate in the execution of the global query; if there is a partial match, the data source can participate in the execution of the global query.

[0066] In the S32, the fifth condition is specifically:

[0067] After the variables in the description of the data source S are renamed in the data source matching process, the variable name set in the header of the data source S has an intersection with the variable name set in the header of the global query G, and there is no logical contradiction between the body of the data source S and the body of the global query G.

[0068] Embodiment 2:

[0069] This embodiment is an example provided for Embodiment 1.

[0070] Step 1: Set and establish a domain ontology;

[0071] like Figure 2 As shown, in this embodiment, Figure 2 It is an ontology about the vehicle domain, in which NewCar represents new cars, UsedCar represents used cars, CarForSale represents cars for sale, etc. Some RDFS terms are used in the figure, such as subClassOf represents the parent-child relationship between concepts.

[0072] Step 2: There are five data sources, which are described as follows:

[0073] 1) Data source 1 (S1):

[0074] <m1,t1,y1,p1,s1> ← <CarForSale(c1),UsedCar(c1),Category(c1,t1),Price(c1,p1),Model(c1,mm1),MM(mm1),ModelValue(mm1,m1),Year(c1,yy1),YY(yy1),YearValue(yy1,y1),SellerContact(c1,s1)>

[0075] The above formula indicates that data source S1 can provide 5-tuple relational data consisting of 5 fields. The data of the 5 fields are returned by variables m1, t1, y1, p1, and s1 respectively. The meanings of these variables are specified by the right side of the formula. The following data source description is not given here.

[0076] 2) Data source 2 (S2):

[0077] <m,t,y,p,s>← <CarForSale(c),Category(c,t),Price(c,p),Model(c,mm),MM(mm),ModelValue(mm,m),Year(c,yy),YY(yy),YearValue(yy,y),SellerContact(c,s),p> =20000>

[0078] 3) Data source 3 (S3):

[0079] <m,t,y,p,s> ← <CarForSale(c),Category(c,t),Price(c,p),Model(c,mm),MM(mm),ModelValue(mm,m),Year(c,yy),YY(yy),YearValue(yy,y),SellerContact(c,s),y<=1950>

[0080] 4) Data source 4 (S4):

[0081] <m,y,p,s> ← <Motorcycle(c),Price(c,p),Model(c,mm),ModelValue(mm,m),Year(c,yy),YearValue(yy,y),SellerContact(c,s)>

[0082] 5) Data source 5 (S5):

[0083] <m,y,r> ←<Car(c),Model(c,mm),MM(mm),ModelValue(mm,m),Year(c,yy),YY(yy),YearValue(yy,y),y> =1990,PM(myr,mm),MYR(myr),PY(myr,yy),Review(myr,r)>

[0084] Step 3: Assume that the global query (abbreviated as G) is expressed as follows:

[0085] q(m,p,r)←CarForSale(c),Category(c,cc),Year(c,yy),YY(yy),YearValue(yy,yv),yv>="1992",

[0086] Price(c,p),Model(c,mm),MM(mm),PM(myr,mm),MYR(myr),ModelValue(mm,m),

[0087] PY(myr,yy),Review(myr,r),cc="sportscar"

[0088] It means that you need to find the models, prices and descriptions of all cars for sale: they are all sports cars produced before 1992.

[0089] Check which data sources are useful for global queries. The following takes the check of data source 1 (S1) as an example for detailed description:

[0090] 1) Use CarForSale(c) in G->body to perform ontology semantic matching with each item in S1->body and rename the parameters.

[0091] (1) CarForSale(c) in G->body is semantically matched with CarForSale(c1) in S1->body. All c1 in S1 should be replaced with c, forming the following intermediate result:

[0092] <m1,t1,y1,p1,s1> ← <CarForSale(c),UsedCar(c),Category(c,t1),Price(c,p1),Model(c,mm1),MM(mm1),ModelValue(mm1,m1),Year(c,yy1),YY(yy1),YearValue(yy1,y1),SellerContact(c,s1)>

[0093] Note that all c1s are replaced by c.

[0094] (2) CarForSale(c) in G->body is semantically matched with UsedCar(c) in the intermediate result of S1. Obviously, CarForSale and UsedCar are in the global ontology ( Figure 1 ), so no variable renaming is performed on this intermediate result. Similarly, CarForSale(c) has no semantic relationship with other predicates in this intermediate result, and no variable renaming is performed on this intermediate result.

[0095] 2) Use Category(c,cc) in G->body to semantically match each predicate of the above intermediate result. It is found that it can only semantically match Category(c,t1). As a result, all t1 in S2 needs to be replaced with cc, forming the following intermediate result of S1:

[0096] <m1,cc,y1,p1,s1>← <CarForSale(c),UsedCar(c),Category(c,cc),Price(c,p1),Model(c,mm1),MM(mm1),ModelValue(mm1,m1),Year(c,yy1),YY(yy1),YearValue(yy1,y1),SellerContact(c,s1)> . ......

[0098] Repeat the above process, and finally get the processing result of S1 as follows:

[0099] <m,“sportscar”,yv,p,s1> <---CarForSale(c),UsedCar(c),Category(c,"sportscar"),Price(c,p),Model(c,mm),ModelValue(mm,m),Year(c,yy),YearValue(yy,yv),SellerContact(c,s1).

[0100] So far, we can see that the two parameter variables m and p in the renamed S1->head overlap with the parameter variables in G->head, that is, m1 in the original S1 semantically corresponds to m in G, and p1 corresponds to p. It is also easy to check that the renamed S->body and G->body can be satisfied after logical conjunction, so we can finally infer that data source 1 can provide data for the global query G.

[0101] Similarly, it can be inferred (process omitted) that S2 and S5 can both provide data for the global query G, but S3 and S4 have nothing to do with the global query G.

[0102] The beneficial effects of the present invention are as follows: the present invention provides a data virtualization data source matching method based on ontology and first-order logic, which can express global queries across heterogeneous data sources based on domain data ontology, and use ontology and first-order logic to achieve intelligent matching between global queries and physical data sources, without the need to use SQL language to express queries on specified data views at the application layer as in existing technologies and products, and achieve mapping between application layer queries and physical data sources with the help of metadata management, thereby naturally supporting multi-source heterogeneous data fusion and unified data queries across heterogeneous data sources based on the fusion, shielding the logical organization and physical distribution of multi-source heterogeneous data resources from the application layer, greatly improving the user experience of using distributed heterogeneous data resources, and having the following advantages in finding available data sources for a given global query in the field of data virtualization:

[0103] (1) Using the domain data ontology in the form of first-order logic formulas to describe the domain data view can provide a unified schema description for structured and semi-structured heterogeneous and distributed data sources.

[0104] (2) When expressing global queries, data virtualization applications do not need to explicitly specify the data views involved in the query, thereby shielding the application from dependence on the logical data model and physical distribution of domain data resources.

[0105] (3) Guide the development of new data virtualization devices so that they can automatically find data sources that can share global query tasks, automatically eliminate irrelevant data sources, improve the automation and intelligence of the devices, and improve the application experience.

[0106] In the description of the present invention, it is necessary to understand that the orientation or positional relationship indicated by the terms "center", "thickness", "upper", "lower", "horizontal", "top", "bottom", "inner", "outer", "radial", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", and "third" are used only for descriptive purposes, and cannot be understood as indicating or implying the relative importance or the number of implicitly specified technical features. Therefore, the features defined by "first", "second", and "third" may explicitly or implicitly include one or more of the features.

Claims

1. A data virtualization data source matching method based on ontology and first-order logic, characterized in that: The following steps are involved: S1. Establish a domain data ontology, record it in the form of a set of unary predicates and binary predicates, and form a domain data view; S2. Use variable tuples and unary predicates and binary predicate sets constraining them based on domain ontology to record the ability of each data source to provide data services to the outside world, forming a local data view; S3. When the user needs to perform a global query, the availability of each data source for the global query is detected based on the domain data view and the local data view.

2. The data source matching method for data virtualization based on ontology and first-order logic according to claim 1 is characterized in that: In S1, the method of recording in the form of a set of unary predicates and binary predicates is specifically as follows: The unary predicate Class(A) is used to indicate that A is a concept, and the binary predicate P(A, B) is used to indicate that there is a relationship between A and B specified by P, where the attribute P of A in the binary predicate P(A, B) has a value B, and B is a concept or a simple data type.

3. The data virtualization data source matching method based on ontology and first-order logic according to claim 2 is characterized in that: In S2, the method for recording the capability of each data source to provide external data services is specifically as follows: The ability of any data source to provide external data services is described in the form of a variable tuple and a first-order logic formula constraining it. The ability of the data source S to provide external data services is described in the first-order logic formula as follows: <Y1,Y2,...,Y ns >←<S1,S2,...,S ms ,C S > In the formula, <Y1,Y2,...,Y ns >Header describing the data source; <S1,S2,...,S ms ,C S > is the body described by the data source, where Y i1 is the i1th output variable of the data source, and i1=1,2,…,ns, ns is the total number of output variables of the data source, which is used to represent the data items provided by the data source, S j1 is the semantic constraint condition for the header data item using the unary and binary predicates in the domain data ontology, and j1 = 1, 2, ..., ms, where ms is the number of constraint predicates, C S These are logical formulas constructed using comparison operators, describing the value constraints on the head variables.

4. The data source matching method for data virtualization based on ontology and first-order logic according to claim 3 is characterized in that: In S3, the method for detecting the availability of any data source for global query is specifically as follows: S31. Each predicate R in the body of the global query j2 , and each predicate S in the body of the data source j1 , perform semantic matching according to the domain data ontology, and rename the parameters of the variables in the data source according to the semantic matching; The global query G is in the form of <X1,X2,...,X ng >← <R1,R2,...,R mg ,C G >, where <X1,X2,...,X ng > is the query header, used to name the query result variable, X i2 is the i2th result variable name, and i2=1,2,…,ng, where ng is the total number of query result variable names; <R1,R2,...,R mg ,C G > is the body of the query, where R j2 is the semantic constraint condition for the value of the header result variable name using the unary and binary predicates in the domain data ontology, and j2 = 1, 2, ..., mg, mg is the number of constraint predicates, C G It is a number of logical formulas constructed with comparison operators, used to describe the value constraints on the header variable name; S32. Determine whether the data source description after parameter name change meets the fifth condition. If so, the data source is available for global query. If not, the data source is useless for global query.

5. The data source matching method for data virtualization based on ontology and first-order logic according to claim 4 is characterized in that: In S31, the method for renaming parameters is specifically as follows: If both predicates being matched are unary predicates, such as R j2 (x) and semantic S j1 (y), where x is the variable name in the global query header, y is the variable name in the data source representation header, and R j2 and S j1 Same name or in the domain data ontology S j1 YesR j2 If the first and second conditions are met at the same time, the variable y in the data source is replaced by the variable x; The first condition is that the variable y in the data source has never been replaced, and the second condition is that if the variable x exists in the data source, the variable x in the data source is replaced with a new variable first; If both predicates being matched are binary predicates, such as predicate R j2 (x1,x2) and S j1 (y1,y2), where x1 and x2 are the variable names in the global query header, y1 and y2 are the variable names in the data source representation header, and R j2 and S j1 Same name or in the domain data ontology S j1 YesR j2 If the third and fourth conditions are met at the same time, the variables y1 and y2 in the data source are replaced by variables x1 and x2 respectively; The third condition is that the variables y1 and y2 in the data source have never been replaced, and the fourth condition is that if the variables x1 and x2 exist in the data source, the variables x1 and x2 in the data source are replaced with new variables.

6. The data source matching method for data virtualization based on ontology and first-order logic according to claim 4 is characterized in that: In S32, the fifth condition is specifically: After the variables in the description of the data source S are renamed in the data source matching process, the variable name set in the header of the data source S intersects with the variable name set in the header of the global query G, and there is no logical contradiction between the body of the data source S and the body of the global query G.