Ontology matching method and system of particle swarm optimization algorithm based on tree structure
Through the tree-structured particle swarm optimization algorithm, ontology entities are extracted and standardized, and combined with multiple similarity measurement methods, the adaptability and interpretability problems of ontology matching in the existing technology are solved, and efficient ontology matching effects are achieved.
Patent Information
- Application Number
- CN202510705042.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-12
AI Technical Summary
Existing machine learning-based ontology matching methods do not work well in open domain, multi-source heterogeneous or data-scarce scenarios, and lack structural transparency and interpretability, making them difficult to adapt to complex ontology matching tasks.
The tree-structured particle swarm optimization algorithm is adopted to extract the core entities of the ontology and perform terminology standardization. A similarity matrix is constructed by combining multiple similarity measurement methods. The particle swarm optimization algorithm is used for individual update and fitness evaluation to achieve efficient ontology matching.
It improves the accuracy and efficiency of ontology matching, and is particularly suitable for complex nonlinear and hierarchical solution spaces. It can effectively handle nonlinear and complex ontology matching tasks, provide more efficient solutions, solve the locality of traditional methods, and provide higher adaptability and adaptability. It is suitable for complex nonlinearities and structural transparency, and suitable for actual systems that change frequently or are sensitive to response time.
Smart Images

Figure CN120632479A_ABST
Abstract
Description
Technical Field
[0001] The present invention proposes an ontology matching method and system based on a tree-structured particle swarm optimization algorithm, and relates to the technical field of intelligent computing and semantic matching. Background Art
[0002] Although machine learning-based similarity feature construction methods have received widespread attention in recent years, their practical performance in ontology matching is often inferior to heuristic-based methods. Machine learning methods, such as decision trees, support vector machines, and neural networks, typically rely on large amounts of labeled matching / mismatching entity pairs as training data to learn the complex relationships between features. However, these methods suffer from several key drawbacks: First, their heavy reliance on labeled data makes them difficult to adapt to open-domain, multi-source, heterogeneous, or data-scarce ontology matching scenarios; second, machine learning models often focus on classification accuracy while neglecting the structural composition and interpretability of similarity features, a significant drawback for ontology matching tasks that require the construction of a well-defined and controllable similarity function; and finally, while methods such as deep learning models can handle complex feature interactions, they suffer from high training costs, difficulty in parameter tuning, and strong black-box nature, making them difficult to generalize to real-world systems with frequent changes or sensitive response times.
[0003] In comparison, heuristic-based similarity feature construction methods have higher flexibility and interpretability. Such methods usually preset a series of basic similarity measurement methods, and combine and optimize them through rules, functions or evolutionary algorithms (such as genetic algorithms, particle swarm optimization, etc.). This method does not rely on a large amount of training data, and can quickly adjust the feature combination strategy according to task requirements. At the same time, the constructed similarity function has a clear structure, which is convenient for human understanding and intervention. More importantly, heuristic methods can combine ontology structure information, semantic hierarchy and other field knowledge for feature construction, and have stronger adaptability and robustness. Therefore, in ontology matching scenarios that emphasize efficiency, generalization ability and structural transparency, heuristic methods are usually more practical than machine learning-based methods. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the Particle Swarm Optimization (PSO) algorithm has proven to be highly effective among numerous heuristic methods. The core concept of PSO draws on the foraging behavior of flocks of birds in nature, simulating the collective motion of particles in a search space to find the optimal solution. PSO's individual particles are known as "particles," each with a position and velocity in the search space. They update their position based on their individual historical experience and the best experience of all particles.
[0005] Unlike traditional optimization algorithms, PSO leverages information sharing between particles through group collaboration to continuously evolve toward the optimal solution. Each particle's movement is guided by its individual optimal position and the global optimal position, ultimately reaching the global optimal or near-optimal solution through multiple iterative searches.
[0006] The advantages of PSO lie in its simple structure, ease of implementation, and strong global search capabilities, effectively avoiding being trapped in local optimal solutions. Due to its excellent performance, PSO is widely used in fields such as function optimization, machine learning, image processing, and engineering optimization. It is particularly advantageous in solving complex nonlinear and multimodal optimization problems.
[0007] The present invention proposes an ontology matching method and system based on a tree-structured particle swarm optimization algorithm, which includes the following contents:
[0008] An ontology matching method based on a tree-structured particle swarm optimization algorithm comprises the following steps:
[0009] Step S1: extract the core entities of the source ontology and the target ontology, where the core entities include classes, data attributes, and object attributes, and perform terminology standardization on the core entities and preprocess the entity names;
[0010] Step S2: Use different similarity feature methods to construct similarity matrices for the source and target ontology, which serve as leaf nodes of the individual tree in the population; then initialize the entire population, and update the global optimal individual and the personal historical optimal individual;
[0011] Step S3: Determine whether the task meets the termination condition. If so, output the current global best solution; otherwise, execute S4;
[0012] Step S4: Based on the global optimal individual and the individual historical optimal individual, a tree-structured particle swarm optimization algorithm is used to update the speed and position of individuals in the population; thereafter, the fitness of the population is evaluated, and the global optimal solution and the individual historical optimal solution are updated.
[0013] Furthermore, step S1 includes the following contents:
[0014] Step S11: extracting the core entities of the source ontology and the target ontology, the core entities of the source ontology and the target ontology include classes, data attributes and object attributes;
[0015] The class extraction of the source ontology and the target ontology includes extracting the class names of the source ontology and the target ontology and their hierarchical relationships;
[0016] The data attributes of the source ontology and the target ontology are extracted including the attribute name, definition domain and value range of the source ontology and the target ontology;
[0017] The object attributes include the extracted attribute name, the definition domain of the associated class, and the value range of the target class;
[0018] Step S12: After extracting the core entities, perform terminology standardization on the core entities. Since different ontologies may use different naming methods, terminology standardization unifies these terms by defining mapping rules or using synonym tools;
[0019] Step S13: Preprocess the data. The preprocessing generally includes converting all entity names to lowercase, removing special characters and extra spaces, and unifying the format.
[0020] Furthermore, step S2 includes the following contents:
[0021] Step S211: Select different similarity measurement methods and functions:
[0022] The terminal items and functions in ontology matching include the following:
[0023] The syntax-based similarity feature focuses on the grammatical features of entity names; the language-based similarity feature is used to evaluate similarity through language context and meaning; the structure-based similarity feature is used to analyze the structural properties of the ontology;
[0024] Furthermore, step S2 also includes the following:
[0025] Step S212: The formula of the similarity measurement method includes the following:
[0026] The formula N-Gram distance is used to directly quantify the grammatical similarity of entity names in ontology matching, including the following:
[0027]
[0028] Among them, G A , G B are the N-Gram sets of strings A and B respectively;
[0029] The formula SMOA-distance is used in ontology matching to comprehensively evaluate the matching degree of entities in the ontology by integrating the similarity of semantics, structure and vocabulary, including the following:
[0030] SMOA(A,B)=α·SemSim(A,B)+β·StructSim(A,B)+γ·LexSim(A,B)
[0031] Among them: α, β, γ are weight coefficients used to balance the contributions of different similarity dimensions; SemSim(A, B) represents semantic similarity based on word vectors; StructSim(A, B) represents similarity based on ontology hierarchy; LexSim(A, B) represents similarity based on vocabulary.
[0032] Furthermore, step S2 also includes the following:
[0033] Step S213: The formula of the similarity measurement method includes the following:
[0034] The Wu-and-Palmer formula is used to quantify the semantic closeness of the hyponymy relationship in ontology matching by the lowest common ancestor depth of concepts in the classification hierarchy, including the following:
[0035]
[0036] Where: c1, c2 represent the two ontology entities to be compared; LCA(c1, c2) represents the nearest common ancestor node of the two entities in the ontology hierarchy; depth(X) represents the path length from entity X to the root node;
[0037] The formula Resnik distance is used to provide key semantic similarity basis in ontology matching, including the following:
[0038] Sim Resnik (c1,c2)=IC(LCS(c1,c2))
[0039] c1 and c2 represent the two concepts to be compared; LCS(c1,c2) represents the most recent common ancestor of the two concepts; IC(c) represents the information content of concept c, which is calculated as:
[0040] IC(c)=-logP(c)
[0041] The leaf nodes of the tree represent different similarity measurement methods, and the internal nodes of the tree represent functions; P(c) is the probability of concept c appearing in the corpus.
[0042] Furthermore, step S2 also includes the following:
[0043] Step S23: Initialize the population according to the similarity matrix obtained in S22; wherein the leaf nodes of the individual trees in the population are similarity feature matrices and constants corresponding to different similarity measurement methods, and the internal nodes of the population are functions.
[0044] Step S24: After initializing the population, the population is decoded and then fitness is evaluated to initialize the global best individual and the personal best individual. The global best individual is the individual with the highest fitness value in the current population, and the personal best individual is the optimal fitness solution experienced by the individual in the population evolution. Fitness evaluation includes the following formula:
[0045] The accuracy expression is as follows:
[0046]
[0047] Relevant Mappings represent relevant mappings that meet the requirements, and Retrieved Mappings represent selected or extracted mappings;
[0048] The recall rate Recall expression is as follows:
[0049]
[0050] The fitness (f-measure) expression is as follows:
[0051]
[0052] Where: Precision is the accuracy rate, Recall is the recall rate.
[0053] Furthermore, step S3 includes the following contents:
[0054] In step S3, it is determined whether the fitness (f-measure) is 1.00 or whether the maximum number of population evolutions has been reached.
[0055] When the fitness (f-measure) is equal to 1.00, the loop is exited and the current global best solution is output;
[0056] Among them, when the fitness (f-measure) reaches the maximum number of population evolutions, the loop is exited and the current global best solution is output;
[0057] When the fitness (f-measure) is not equal to 1.00, step S4 is executed;
[0058] When the fitness (f-measure) does not reach the maximum number of population evolutions, step S4 is executed.
[0059] Furthermore, step S4 includes the following contents:
[0060] Step S41: input the global best individual Global Best, the personal best individual Personal Best, and the population W;
[0061] Step S42: Update the speed of all individuals in the population. The speed update formula is:
[0062] v i (t+1)=Wv i (t)+Constant[pB i (t)-x i (t)]+Constant[gB i (t)-x i (t)]
[0063] Where: W represents the inertia weight, which is used to control the inertia of particle motion; Constant is a random number randomly selected between [0,1]; pBi represents the individual optimal solution corresponding to the i-th individual, gBi represents the group optimal solution, and v i (t) is the velocity corresponding to the i-th individual, x i (t) is the position corresponding to the i-th individual;
[0064] Step S43: Based on the current population velocity obtained in S42, the positions of all individuals in the population are updated. The position update formula is:
[0065] x i (t+1)=x i +v i (t+1)
[0066] in:
[0067] x i (t) is the position of the individual at the current moment, v i (t+1) is the velocity of the individual at the current moment;
[0068] Step S44: Evaluate the fitness of the updated population and update the global best individual Global Best and the personal best individual Personal Best;
[0069] Step S45: performing a tree compression operation on the updated population individuals;
[0070] Step S46: Re-execute step S3.
[0071] According to a second aspect of the present invention, an ontology matching system based on a tree-structured particle swarm optimization algorithm includes an electronic device, wherein the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and is characterized in that when the processor executes the computer program, an ontology matching method based on a tree-structured particle swarm optimization algorithm as described in any one of the present inventions is implemented.
[0072] According to a third aspect of the present invention, an ontology matching system based on a tree-structured particle swarm optimization algorithm includes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements an ontology matching method based on a tree-structured particle swarm optimization algorithm as described in any one of the present inventions.
[0073] The present invention has the following advantages:
[0074] The present invention proposes an ontology matching method based on a tree-structured particle swarm optimization algorithm, which has the following advantages:
[0075] This innovation enables the present invention to effectively handle nonlinear and hierarchical similarity calculation problems, making it particularly suitable for complex ontology matching tasks and providing a more efficient and flexible solution than traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 Flowchart of the tree-structured particle optimization algorithm.
[0077] Figure 2 It is the individual encoding method of tree-based particle swarm optimization algorithm.
[0078] Figure 3 This is the individual decoding process of the tree-based particle swarm optimization algorithm.
[0079] Figure 4 Schematic diagram of the particle swarm velocity update process.
[0080] Figure 5 Schematic diagram of the particle swarm position update process. DETAILED DESCRIPTION
[0081] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0082] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.
[0083] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form, and it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.
[0084] The present invention proposes an ontology matching method and system based on a tree-structured particle swarm optimization algorithm, which includes the following contents:
[0085] like Figure 1 、 Figure 2 、 Figure 3 、 Figure 4 and Figure 5 As shown, an ontology matching method based on a tree-structured particle swarm optimization algorithm includes the following steps:
[0086] Step S1: extract the core entities of the source ontology and the target ontology, where the core entities include classes, data attributes, and object attributes, and perform terminology standardization on the core entities and preprocess the entity names;
[0087] Step S2: Use different similarity feature methods to construct similarity matrices for the source and target ontology, which serve as leaf nodes of the individual tree in the population; then initialize the entire population, and update the global optimal individual and the personal historical optimal individual;
[0088] Step S3: Determine whether the task meets the termination condition. If so, output the current global best solution; otherwise, execute S4;
[0089] Step S4: Based on the global optimal individual and the individual historical optimal individual, a tree-structured particle swarm optimization algorithm is used to update the speed and position of individuals in the population; thereafter, the fitness of the population is evaluated, and the global optimal solution and the individual historical optimal solution are updated.
[0090] Furthermore, step S1 includes the following contents:
[0091] Step S11: extracting the core entities of the source ontology and the target ontology, the core entities of the source ontology and the target ontology include classes, data attributes and object attributes;
[0092] The class extraction of the source ontology and the target ontology includes extracting the class names of the source ontology and the target ontology and their hierarchical relationships;
[0093] The data attributes of the source ontology and the target ontology are extracted including the attribute name, definition domain and value range of the source ontology and the target ontology;
[0094] The object attributes include the extracted attribute name, the definition domain of the associated class, and the value range of the target class;
[0095] Step S12: After extracting the core entities, perform terminology standardization on the core entities. Since different ontologies may use different naming methods, terminology standardization unifies these terms by defining mapping rules or using synonym tools;
[0096] Step S13: Preprocess the data. The preprocessing generally includes converting all entity names to lowercase, removing special characters and extra spaces, and unifying the format.
[0097] Furthermore, step S2 includes the following contents:
[0098] Step S211: Select different similarity measurement methods and functions:
[0099] The terminal items and functions in ontology matching include the following:
[0100] The syntax-based similarity feature focuses on the grammatical features of entity names; the language-based similarity feature is used to evaluate similarity through language context and meaning; the structure-based similarity feature is used to analyze the structural properties of the ontology;
[0101] Furthermore, step S2 also includes the following:
[0102] Step S212: The formula of the similarity measurement method includes the following:
[0103] The formula N-Gram distance is used to directly quantify the grammatical similarity of entity names in ontology matching, including the following:
[0104]
[0105] Among them, G A , G B are the N-Gram sets of strings A and B respectively;
[0106] The formula SMOA-distance is used in ontology matching to comprehensively evaluate the matching degree of entities in the ontology by integrating the similarity of semantics, structure and vocabulary, including the following:
[0107] SMOA(A,B)=α·SemSim(A,B)+β·StructSim(A,B)+γ·LexSim(A,B)
[0108] Among them: α, β, γ are weight coefficients used to balance the contributions of different similarity dimensions; SemSim(A, B) represents semantic similarity based on word vectors; StructSim(A, B) represents similarity based on ontology hierarchy; LexSim(A, B) represents similarity based on vocabulary.
[0109] Furthermore, step S2 also includes the following:
[0110] Step S213: The formula of the similarity measurement method includes the following:
[0111] The Wu-and-Palmer formula is used to quantify the semantic closeness of the hyponymy relationship in ontology matching by the lowest common ancestor depth of concepts in the classification hierarchy, including the following:
[0112]
[0113] Where: c1, c2 represent the two ontology entities to be compared; LCA(c1, c2) represents the nearest common ancestor node of the two entities in the ontology hierarchy; depth(X) represents the path length from entity X to the root node;
[0114] The formula Resnik distance is used to provide key semantic similarity basis in ontology matching, including the following:
[0115] Sim Resnik (c1,c2)=IC(LCS(c1,c2))
[0116] c1 and c2 represent the two concepts to be compared; LCS(c1,c2) represents the most recent common ancestor of the two concepts; IC(c) represents the information content of concept c, which is calculated as:
[0117] IC(c)=-logP(c)
[0118] The leaf nodes of the tree represent different similarity measurement methods, and the internal nodes of the tree represent functions; P(c) is the probability of concept c appearing in the corpus.
[0119] Furthermore, step S2 also includes the following:
[0120] Step S23: Initialize the population according to the similarity matrix obtained in S22; wherein the leaf nodes of the individual trees in the population are similarity feature matrices and constants corresponding to different similarity measurement methods, and the internal nodes of the population are functions.
[0121] like Figure 3 As shown, in one embodiment of the present invention, decoding the population includes the following:
[0122] Step S24: After initializing the population, the population is decoded and then fitness is evaluated to initialize the global best individual and the personal best individual. The global best individual is the individual with the highest fitness value in the current population, and the personal best individual is the optimal fitness solution experienced by the individual in the population evolution. Fitness evaluation includes the following formula:
[0123] The accuracy expression is as follows:
[0124]
[0125] Relevant Mappings represent relevant mappings that meet the requirements, and Retrieved Mappings represent selected or extracted mappings;
[0126] The recall rate Recall expression is as follows:
[0127]
[0128] The fitness (f-measure) expression is as follows:
[0129]
[0130] Where: Precision is the accuracy rate, Recall is the recall rate.
[0131] Furthermore, step S3 includes the following contents:
[0132] In step S3, it is determined whether the fitness (f-measure) is 1.00 or whether the maximum number of population evolutions has been reached.
[0133] When the fitness (f-measure) is equal to 1.00, the loop is exited and the current global best solution is output;
[0134] Among them, when the fitness (f-measure) reaches the maximum number of population evolutions, the loop is exited and the current global best solution is output;
[0135] When the fitness (f-measure) is not equal to 1.00, step S4 is executed;
[0136] When the fitness (f-measure) does not reach the maximum number of population evolutions, step S4 is executed.
[0137] Furthermore, step S4 includes the following contents:
[0138] Step S41: input the global best individual Global Best, the personal best individual Personal Best, and the population W;
[0139] Step S42: Update the speed of all individuals in the population. The speed update formula is:
[0140] v i (t+1)=Wv i (t)+Constant[pB i (t)-x i (t)]+Constant[gB i (t)-x i (t)]
[0141] Where: W represents the inertia weight, which is used to control the inertia of particle motion; Constant is a random number randomly selected between [0,1]; pBi represents the individual optimal solution corresponding to the i-th individual, gBi represents the group optimal solution, and v i (t) is the velocity corresponding to the i-th individual, x i (t) is the position corresponding to the i-th individual;
[0142] Step S43: Based on the current population velocity obtained in S42, the positions of all individuals in the population are updated. The position update formula is:
[0143] x i (t+1)=x i +v i (t+1)
[0144] in:
[0145] x i (t) is the position of the individual at the current moment, v i (t+1) is the velocity of the individual at the current moment;
[0146] Step S44: Evaluate the fitness of the updated population and update the global best individual Global Best and the personal best individual Personal Best;
[0147] Step S45: performing a tree compression operation on the updated population individuals;
[0148] Step S46: Re-execute step S3.
[0149] According to a second aspect of the present invention, an ontology matching system based on a tree-structured particle swarm optimization algorithm includes an electronic device, wherein the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and is characterized in that when the processor executes the computer program, an ontology matching method based on a tree-structured particle swarm optimization algorithm as described in any one of the present inventions is implemented.
[0150] According to a third aspect of the present invention, an ontology matching system based on a tree-structured particle swarm optimization algorithm includes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements an ontology matching method based on a tree-structured particle swarm optimization algorithm as described in any one of the present inventions.
[0151] In one embodiment of the present invention, commonly used terminal items and functions in ontology matching in step S211 include the following:
[0152]
[0153] Table 1 Common terminal items and functions in ontology matching
[0154] Instance-based distance is a method for quantifying the similarity between concepts by comparing the distributional similarity of instances (data objects) associated with concepts (or categories). The core idea is that the more instances two concepts share, or the closer the distribution of instance features, the higher their semantic similarity.
[0155] The Instance-based Distance formula is as follows
[0156] Assume two concepts c1 and c2, corresponding to instance sets and Then their similarity can be calculated as follows:
[0157] Similarity based on instance overlap:
[0158]
[0159] The distance is defined as:
[0160] Distance(c1,c2)=1-Sim(c1,c2)
[0161] Meaning: Directly measures the degree of overlap between instance sets of two concepts.
[0162] Role in ontology matching: Instance-based Distance provides a data-driven supplementary solution for ontology matching through quantitative analysis of instance feature distribution, especially in scenarios with missing structures, complex concepts, or dynamically changing data.
[0163] Neighbor-Concept Based Distance (NCBD) indirectly measures the semantic similarity between two concepts by comparing the similarity of their neighbors in the ontology (e.g., parent classes, child classes, sibling classes, attribute-related concepts, etc.). The core idea is that the more similar the neighbor structures of two concepts are, the stronger their semantic association is.
[0164] formula:
[0165] Distance(c1,c2)=α·PathLength(c1,c2)+β·NeighborSim(c1,c2)
[0166] Combine the hierarchical path length between concepts (PathLength) and the weighted sum of neighbor similarities (NeighborSim).
[0167] The parameters α and β control the weights of the two contributions and need to be adjusted according to the characteristics of the entity.
[0168] like Figure 4 、 Figure 5 As shown, in one embodiment of the present invention, the method for updating the velocity and position of the particle in step S4 includes the following:
[0169] positions,velocities=updatePositionAndVelocity(positions,velocities,pBest,gBest,w,constant,constant)
[0170] In order to simplify, a two-dimensional matrix is used instead of the high-dimensional matrix corresponding to the input.
[0171] Assume that positios is the matrix [[0.3,0.2],[0.4,0.6]], velocities is the matrix [[0.2,0.2],[0.4,0.8]],
[0172] Pbest=[[0.2,0.2],[0.4,0.6]], gBest=[[0.2,0.2],[0.4,0.5]], w=0.5, constant=0.5
[0173] The speed update process is:
[0174] velocities=w*velocities+constant*(pBest-positions)+constant*(gBest-
[0175] positions)=0.5*[[0.3,0.2],[0.4,0.6]]+0.5([[0.2,0.2],[0.4,0.6]]-[[0.2,0.2],[0.4,0 .8]])+0.5*([[0.2,0.2],[0.4,0.5]]-[[0.2,0.2],[0.4,0.8]])=[[0.15,0.10],[0.20,0.05]]
[0176] The location update process is:
[0177] Positions=positions+velocities=[[0.3,0.2],[0.4,0.6]]+[[0.15,0.10],[0.20,0.05]]=
[0178] [[0.45,0.3],[0.60,0.65]]
[0179] In this way, the current individual is updated based on the global optimal individual, the local optimal individual, and the current position of itself.
[0180] The updated population is evaluated to obtain the global optimal individual, and then the global optimal individual is evaluated to obtain the f-measure of the global optimal individual.
[0181]
[0182] The iteration ends if the f-measure value is 1. Otherwise, the population is iterated continuously until the maximum number of iterations of the population is reached or the f-measure value is 1.
[0183] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions and effects do not exceed the scope of the technical solution of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. An ontology matching method based on a tree-structured particle swarm optimization algorithm, characterized in that: The following steps are involved: Step S1: extract the core entities of the source ontology and the target ontology, where the core entities include classes, data attributes, and object attributes, and perform terminology standardization on the core entities and preprocess the entity names; Step S2: Use different similarity feature methods to construct similarity matrices for the source and target ontology, which serve as leaf nodes of the individual tree in the population; then initialize the entire population, and update the global optimal individual and the personal historical optimal individual; Step S3: Determine whether the task meets the termination conditions. If so, output the current global best solution. Otherwise, execute S4; Step S4: Based on the global optimal individual and the individual historical optimal individual, a tree-structured particle swarm optimization algorithm is used to update the speed and position of the individuals in the population; thereafter, the fitness of the population is evaluated, and the global optimal solution and the individual historical optimal solution are updated.
2. The ontology matching method based on the tree-structured particle swarm optimization algorithm according to claim 1, characterized in that: Step S1 includes the following contents: Step S11: extracting the core entities of the source ontology and the target ontology, the core entities of the source ontology and the target ontology include classes, data attributes and object attributes; The class extraction of the source ontology and the target ontology includes extracting the class names of the source ontology and the target ontology and their hierarchical relationships; The data attributes of the source ontology and the target ontology are extracted including the attribute name, definition domain and value range of the source ontology and the target ontology; The object attributes include the extracted attribute name, the definition domain of the associated class, and the value range of the target class; Step S12: After extracting the core entities, perform terminology standardization on the core entities, wherein term standardization unifies these terms by defining mapping rules or using synonym tools; Step S13: pre-processing the data, wherein the pre-processing generally includes converting all entity names into lowercase, removing special characters and extra spaces, and unifying the format.
3. The ontology matching method based on the tree-structured particle swarm optimization algorithm according to claim 2, characterized in that: Step S2 includes the following contents: Step S211: Select different similarity measurement methods and functions: The terminal items and functions in ontology matching include the following: The syntax-based similarity feature focuses on the grammatical features of entity names; the language-based similarity feature is used to evaluate similarity through language context and meaning; and the structure-based similarity feature is used to analyze the structural properties of the ontology.
4. The ontology matching method based on the tree-structured particle swarm optimization algorithm according to claim 3, characterized in that: Step S2 also includes the following: Step S212: The formula of the similarity measurement method includes the following: The formula N-Gram distance is used to directly quantify the grammatical similarity of entity names in ontology matching, including the following: Among them, G A , G B are the N-Gram sets of strings A and B respectively; The formula SMOA-distance is used in ontology matching to comprehensively evaluate the matching degree of entities in the ontology by integrating the similarity of semantics, structure and vocabulary, including the following: SMOA(A,B)=α·SemSim(A,B)+β·StructSim(A,B)+γ·LexSim(A,B) Among them: α, β, γ are weight coefficients used to balance the contributions of different similarity dimensions; SemSim(A, B) represents semantic similarity based on word vectors; StructSim(A, B) represents similarity based on ontology hierarchy; LexSim(A, B) represents similarity based on vocabulary.
5. The ontology matching method based on the tree-structured particle swarm optimization algorithm according to claim 4, characterized in that: Step S2 also includes the following: Step S213: The formula of the similarity measurement method includes the following: The Wu-and-Palmer formula is used to quantify the semantic closeness of the hyponymy relationship in ontology matching by the lowest common ancestor depth of concepts in the classification hierarchy, including the following: Where: c1, c2 represent the two ontology entities to be compared; LCA(c1, c2) represents the nearest common ancestor node of the two entities in the ontology hierarchy; depth(X) represents the path length from entity X to the root node; The formula Resnik distance is used to provide key semantic similarity basis in ontology matching, including the following: Sim Resnik (c1,c2)=IC(LCS(c1,c2)) c1 and c2 represent the two concepts to be compared; LCS(c1,c2) represents the most recent common ancestor of the two concepts; IC(c) represents the information content of concept c, which is calculated as: IC(c)=-logP(c) The leaf nodes of the tree represent different similarity measurement methods, and the internal nodes of the tree represent functions; P(c) is the probability of concept c appearing in the corpus.
6. The ontology matching method based on the tree-structured particle swarm optimization algorithm according to claim 5, characterized in that: Step S2 also includes the following: Step S23: Initialize the population according to the similarity matrix obtained in S22; wherein the leaf nodes of the individual trees in the population are the similarity feature matrices and constants corresponding to different similarity measurement methods, and the internal nodes of the population are functions; Step S24: After initializing the population, the population is decoded and then fitness is evaluated to initialize the global best individual and the personal best individual. The global best individual is the individual with the highest fitness value in the current population, and the personal best individual is the optimal fitness solution experienced by the individual in the population evolution. Fitness evaluation includes the following formula: The accuracy expression is as follows: Relevant Mappings represent relevant mappings that meet the requirements, and Retrieved Mappings represent selected or extracted mappings; The recall rate Recall expression is as follows: The fitness (f-measure) expression is as follows: Where: Precision is the accuracy rate, Recall is the recall rate.
7. The ontology matching method based on the tree-structured particle swarm optimization algorithm according to claim 6, characterized in that: Step S3 includes the following contents: In step S3, it is determined whether the fitness (f-measure) is 1.00 or whether the maximum number of population evolutions has been reached. When the fitness (f-measure) is equal to 1.00, the loop is exited and the current global best solution is output; Among them, when the fitness (f-measure) reaches the maximum number of population evolutions, the loop is exited and the current global best solution is output; When the fitness (f-measure) is not equal to 1.00, step S4 is executed; When the fitness (f-measure) does not reach the maximum number of population evolutions, step S4 is executed.
8. The ontology matching method based on the tree-structured particle swarm optimization algorithm according to claim 7, characterized in that: Step S4 includes the following contents: Step S41: input the global best individual Global Best, the personal best individual Personal Best, and the population W; Step S42: Update the speed of all individuals in the population. The speed update formula is: v i (t+1)=Wv i (t)+Constant[pB i (t)-x i (t)]+Constant[gB i (t)-x i (t)] Where: W represents the inertia weight, which is used to control the inertia of particle motion; Constant is a random number randomly selected between [0,1]; pBi represents the individual optimal solution corresponding to the i-th individual, gBi represents the group optimal solution, and v i (t) is the velocity corresponding to the i-th individual, x i (t) is the position corresponding to the i-th individual; Step S43: Based on the current population velocity obtained in S42, the positions of all individuals in the population are updated. The position update formula is: x i (t+1)=x i +v i (t+1) in: x i (t) is the position of the individual at the current moment, v i (t+1) is the velocity of the individual at the current moment; Step S44: Evaluate the fitness of the updated population and update the global best individual Global Best and the personal best individual Personal Best; Step S45: performing a tree compression operation on the updated population individuals; Step S46: Re-execute step S3.
9. An ontology matching system based on a tree-structured particle swarm optimization algorithm, comprising an electronic device, wherein the electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the ontology matching method based on the tree-structured particle swarm optimization algorithm according to any one of claims 1 to 8 is implemented.
10. An ontology matching system based on a tree-structured particle swarm optimization algorithm, comprising a computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the ontology matching method based on a tree-structured particle swarm optimization algorithm according to any one of claims 1 to 8 is implemented.