Multi-source knowledge fusion method, device and equipment based on semantic calculation
Through the multi-source knowledge fusion method based on semantic computing, the target word vector model and confidence evaluation model are used to solve the problem of inaccurate semantic understanding in multi-source knowledge fusion, efficient and accurate knowledge fusion is achieved, and knowledge decision support and intelligent analysis capabilities are improved.
Patent Information
- Application Number
- CN202510876781.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The multi-source knowledge fusion method in the prior art lacks semantic understanding and inaccurate processing, and cannot effectively process complex semantic information, resulting in large differences in knowledge format, granularity and accuracy, and data redundancy or conflict problems.
A multi-source knowledge fusion method based on semantic computing is adopted to generate structured data in a unified format through preprocessing, and the target semantic vector of knowledge units is constructed using the target word vector model, and the comprehensive similarity is determined by combining the normalized weighted values of cosine similarity and Euclidean distance, and a fused knowledge base is generated based on the confidence evaluation model.
It realizes efficient fusion of multi-source knowledge, ensures the accuracy and consistency of data fusion, and improves the decision-making support and intelligent analysis capabilities of knowledge.
Smart Images

Figure CN120372022A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a multi-source knowledge fusion method, device and equipment based on semantic computing. Background Art
[0002] With the development of Internet, artificial intelligence and big data technologies, more and more knowledge is obtained through various channels. Such knowledge includes structured data knowledge from different sources, as well as structured knowledge extracted from multi-source unstructured data. Multi-source knowledge may have synonymous, near-synonymous, polysemous and other expressions, facing possible data redundancy or conflict problems, resulting in large differences in knowledge formats, granularities and precisions, and it is necessary to perform fusion processing on it to obtain a unified expression.
[0003] Multi-source knowledge fusion technology is to judge whether two or more pieces of knowledge represent the same meaning through corresponding rules and algorithms, and fuse the description information about an entity, concept, relationship or event from different sources to improve the richness and accuracy of knowledge. Usually, for more knowledge fusion work, conflict detection, name unification, entity disambiguation, entity alignment and other fusion processing are carried out on multi-source knowledge, merging the same ones and unifying the similar ones.
[0004] Previous knowledge fusion methods mainly relied on traditional algorithms such as rule matching and data mining. These methods usually cannot effectively process complex semantic information and the processing accuracy is not high. Summary of the Invention
[0005] In view of the above deficiencies in the prior art, the present invention provides a multi-source knowledge fusion method, device and equipment based on semantic computing, which effectively fuses knowledge from different sources, and ensures the accuracy of data fusion through confidence evaluation values and comprehensive similarity calculation, thus solving the problems of lack of semantic understanding and inaccurate processing in the prior art.
[0006] In a first aspect, the present invention provides a multi-source knowledge fusion method based on semantic computing, which includes the following steps: Preprocess multi-source data to generate multiple pieces of structured data in a unified format, and extract knowledge units corresponding to each of the structured data in the unified format from each of the structured data; Input each of the knowledge units into a target word vector model to obtain target semantic vectors corresponding to each of the knowledge units; Determine the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the comprehensive similarity is determined based on the normalized weighted value of cosine similarity and Euclidean distance; Based on the confidence evaluation model, determine the confidence evaluation values of each of the knowledge units; the confidence evaluation values of each of the knowledge units are used to characterize the reliability of each of the knowledge units; Generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation values of each of the knowledge units.
[0007] According to a multi-source knowledge fusion method based on semantic computing provided by the present invention, the target word vector model includes an embedding layer, a self-attention mechanism module, and a pooling layer, and the embedding layer is a lightweight bidirectional encoder representation (ALBERT) model; The step of inputting each of the knowledge units into the target word vector model to obtain the target semantic vector corresponding to each of the knowledge units includes: Perform vector conversion on each of the knowledge units to obtain the multi-dimensional word vectors corresponding to each of the knowledge units; Input the multi-dimensional word vectors corresponding to each of the knowledge units into the ALBERT model to obtain the embedding vectors corresponding to each of the knowledge units; Input the embedding vectors corresponding to each of the knowledge units into the encoder of the ALBERT model to obtain the first semantic vectors corresponding to each of the knowledge units; Input each of the first semantic vectors into the self-attention mechanism module to obtain the second semantic vectors corresponding to each of the first semantic vectors output by the self-attention mechanism module; Input each of the second semantic vectors into the pooling layer for mean pooling to obtain the target semantic vectors corresponding to each of the knowledge units; the target semantic vectors are global semantic vector representations.
[0008] According to a multi-source knowledge fusion method based on semantic computing provided by the present invention, the step of inputting each of the first semantic vectors into the self-attention mechanism module to obtain the second semantic vectors corresponding to each of the first semantic vectors output by the self-attention mechanism module includes: Multiply each of the first semantic vectors by the query matrix, the key matrix, and the value matrix respectively to generate the query vectors, key vectors, and value vectors corresponding to each of the first semantic vectors; Determine the attention scores of each of the first semantic vectors through the inner product of the query vectors and the key vectors corresponding to each of the first semantic vectors; Use the softmax function to normalize the attention scores of each of the first semantic vectors to obtain the attention weights of each of the first semantic vectors; Perform weighted summation of the attention weights of each of the first semantic vectors and the value vectors to obtain each of the second semantic vectors.
[0009] A multi-source knowledge fusion method based on semantic computing provided by the present invention, the determining of the comprehensive similarity between the target semantic vectors corresponding to the respective knowledge units includes: Determine the cosine similarity between the respective target semantic vectors and the Euclidean distance between the respective target semantic vectors; the cosine similarity represents the direction between two vectors, and the Euclidean distance represents the distance between two vectors; Through a first preset weight coefficient and a second preset weight coefficient, perform weighted normalization on the cosine similarity and the Euclidean distance between the respective target semantic vectors to obtain the comprehensive similarity between the target semantic vectors corresponding to the respective knowledge units; the sum of the first preset weight coefficient and the second preset weight coefficient is 1.
[0010] A multi-source knowledge fusion method based on semantic computing provided by the present invention, the determining of the confidence evaluation value of each knowledge unit based on a confidence evaluation model includes: Construct a multi-dimensional feature matrix including source information, evidence materials, literature records, logic, expert opinions, public evaluations, time factors, space factors, and association information; Generate an index parameter weight matrix through pairwise index comparison, and perform normalization processing on the index parameter weight matrix to obtain the weight values of the respective index parameters; Based on the weight values of the respective index parameters and the multi-dimensional feature matrix, perform weighted summation on the multi-dimensional features to generate the confidence evaluation values of the respective knowledge units.
[0011] A multi-source knowledge fusion method based on semantic computing provided by the present invention, the generating of a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to the respective knowledge units and the confidence evaluation values of the respective knowledge units includes: Determine redundant knowledge pairs and contradictory knowledge pairs in each knowledge unit according to the comprehensive similarity between the target semantic vectors corresponding to the respective knowledge units; Generate the fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs.
[0012] A multi-source knowledge fusion method based on semantic computing provided by the present invention, the determining of redundant knowledge pairs and contradictory knowledge pairs in each knowledge unit according to the comprehensive similarity between the target semantic vectors corresponding to the respective knowledge units includes: If the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units in each knowledge unit is greater than or equal to a preset redundancy threshold, mark the any two knowledge units as the redundant knowledge pairs; If any two knowledge units are contradictory and the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units is lower than the preset redundancy threshold, mark the two knowledge units as the contradictory knowledge pair; Generating the fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs includes: Retain the knowledge unit with a larger confidence evaluation value in the redundant knowledge pair, and perform weighted fusion according to the confidence evaluation value of the contradictory knowledge pair to generate a new knowledge unit; Based on each knowledge unit with a larger confidence evaluation value and each new knowledge unit, determine the fused knowledge base.
[0013] According to a multi-source knowledge fusion method based on semantic computing provided by the present invention, the method further includes: Quantify the performance of the fusion result by accuracy, recall rate, and F1 value; Among them, the accuracy rate is the ratio of the number of correctly fused knowledge pairs to the total number of fused pairs, the recall rate is the ratio of the number of correctly fused knowledge pairs to the total number of pairs that should be fused, and the F1 value is the harmonic mean of the accuracy rate and the recall rate.
[0014] In a second aspect, the present invention further provides a multi-source knowledge fusion device based on semantic computing, and the device includes the following modules: A preprocessing module for preprocessing multi-source data to generate multiple structured data in a unified format, and extracting the knowledge units corresponding to each of the structured data in the unified format from each of the structured data; A fusion module for inputting each knowledge unit into a target word vector model to obtain the target semantic vector corresponding to each knowledge unit; Determine the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit; the comprehensive similarity is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance; Based on a confidence evaluation model, determine the confidence evaluation value of each knowledge unit; the confidence evaluation value of each knowledge unit is used to characterize the reliability of each knowledge unit; Generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit.
[0015] In a third aspect, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements the multi-source knowledge fusion method based on semantic computing as described in any one of the above.
[0016] Fourthly, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the multi-source knowledge fusion method based on semantic calculation as described in any one of the above.
[0017] Fifthly, the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the multi-source knowledge fusion method based on semantic calculation as described in any one of the above.
[0018] For the multi-source knowledge fusion method, device and equipment provided by the present invention, firstly, preprocess multi-source data to generate multiple structured data in a unified format, and extract knowledge units corresponding to each structured data in the unified format from each of the structured data in the unified format; then, input each knowledge unit into a target word vector model to obtain a target semantic vector corresponding to each knowledge unit, and construct a semantic vector space based on the target semantic vectors corresponding to each knowledge unit; further, determine the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit, and the comprehensive similarity is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance; based on a confidence evaluation model, determine the confidence evaluation value of each knowledge unit; the confidence evaluation value of each knowledge unit is used to represent the reliability degree of each knowledge unit; furthermore, according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit, generate a fused knowledge base.
[0019] The present invention first preprocesses multi-source data, uses a target word vector model to generate target semantic vectors corresponding to each knowledge unit, and then fuses each knowledge unit based on the comprehensive similarity of each target semantic vector and the confidence evaluation value of each knowledge unit to obtain a fused knowledge base, effectively fusing knowledge from different sources, and ensuring the accuracy of data fusion through the confidence evaluation value and comprehensive similarity calculation, thus solving the problems of lack of semantic understanding and inaccurate processing existing in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 is one of the flow diagrams of the multi-source knowledge fusion method based on semantic calculation provided by the present invention.
[0022] Figure 2It is a schematic diagram of the effect of the multi-source knowledge fusion method based on semantic computing provided by the present invention.
[0023] Figure 3 It is the second schematic diagram of the process of the multi-source knowledge fusion method based on semantic computing provided by the present invention.
[0024] Figure 4 It is a schematic diagram of the structure of the multi-source knowledge fusion device provided by the present invention.
[0025] Figure 5 It is a schematic diagram of the structure of the electronic device provided by the present invention. Specific embodiments
[0026] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.
[0027] To more clearly understand the embodiments provided by the present invention, first, the technical content involved in the present invention is introduced as follows: With the rapid development of big data and artificial intelligence technologies, multi-source knowledge fusion has become a key means to obtain accurate and comprehensive knowledge and an important research direction in the field of artificial intelligence. However, knowledge from different sources often presents different formats, structures and semantic expressions. In multi-source knowledge fusion, there are often certain gaps in terms of accuracy, efficiency, knowledge representation, fusion effect, etc. compared with the actual application requirements. This makes researching more effective fusion methods and achieving more efficient fusion effects the key to the knowledge fusion problem.
[0028] Previous knowledge fusion methods usually cannot effectively process complex semantic information, lack flexibility and accuracy, and have low processing efficiency. In addition, single similarity calculation cannot handle synonymous, near-synonymous, and polysemous phenomena in different contexts and also has limited capabilities in automatic reasoning and intelligent recognition of context information. For example, "apple" can represent both a kind of fruit and a mobile phone brand, and for another example, place names in different places may be the same.
[0029] Therefore, there is an urgent need for a multi-source knowledge fusion method based on semantic computing that can automatically and accurately fuse data and knowledge from different sources to enhance the capabilities of knowledge decision support, automatic reasoning, and intelligent analysis.
[0030] Based on the above deficiencies in the prior art, the present invention provides a method for efficient fusion of multi-source knowledge based on semantic computing, which can effectively fuse knowledge from different sources and ensure the accuracy and consistency of information through knowledge confidence evaluation, thereby solving the problems of lack of semantic understanding and inaccurate processing in the prior art.
[0031] The following combines Figures 1-5 to describe the multi-source knowledge fusion method, device and equipment based on semantic computing of the present invention.
[0032] Figure 1 is one of the schematic flowcharts of the multi-source knowledge fusion method based on semantic computing provided by the present invention. As Figure 1 shown, the method includes the following: Step 101: Preprocess the multi-source data to generate multiple structured data in a unified format, and extract the knowledge units corresponding to each structured data in the unified format from the structured data in the unified format. It should be noted that the execution subject of the present invention is an electronic device, which is used to realize the multi-source knowledge fusion based on semantic computing. By constructing a unified knowledge semantic vector space, calculating the normalized similarity, and combining the confidence evaluation algorithm, the efficient fusion of multi-source knowledge is realized, effectively solving the accuracy and efficiency problems in multi-source knowledge fusion, and providing strong support for the development of the big data and artificial intelligence fields.
[0033] The method provided in this embodiment includes the following: First, preprocess the multi-source data to obtain multiple structured data in a unified format.
[0034] Structured, semi-structured, and unstructured data are obtained through connection from multiple channels. Using the built-in module functions of Python or the operation statements of the database, preprocessing operations such as cleaning, deduplication, and format conversion are performed to obtain multiple structured data in a unified format. Python is a high-level scripting language that combines interpretability, compilation, interactivity, and object orientation.
[0035] Furthermore, extract the knowledge units corresponding to each structured data in the unified format from the structured data in the unified format.
[0036] For example, based on the dataset mapping and the trained extraction model tool, corresponding entity names, attributes, relationships, events, etc. are extracted from the multi-source data to obtain the knowledge units corresponding to each structured data in the unified format.
[0037] There may be repetitions, polysemies, near-synonyms, ambiguities, etc. in the expression of these knowledges. For example, in the entity target fields such as airports, ports, airplanes, ships, vehicles, etc., different expressions may point to the same entity name.
[0038] Step 102: Input each knowledge unit into the target word vector model to obtain the target semantic vector corresponding to each knowledge unit. After extracting each knowledge unit corresponding to the multi-source data, through an improved word vector model (target word vector model), each knowledge unit can be vectorized to obtain the target semantic vector corresponding to each knowledge unit. Furthermore, a semantic vector space can be constructed.
[0039] After that, similarity calculation and confidence evaluation value calculation can be performed based on each target semantic vector, facilitating the effective integration of multi-source knowledge.
[0040] The target word vector model of the present invention includes an embedding layer, a pooling layer, and a self-attention mechanism module. The embedding layer is a A Lite Bidirectional Encoder Representations from Transformers (ALBERT) model, and a self-attention mechanism is introduced between the embedding layer and the pooling layer, enabling the generated word vectors to pay more attention to the keywords and important context information in the text and being able to handle polysemous words.
[0041] Input each knowledge unit into the embedding layer, self-attention mechanism, and pooling layer in sequence to obtain the output target semantic vectors.
[0042] Step 103: Determine the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit; the comprehensive similarity is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance. Specifically, for each knowledge unit in the multi-source knowledge, calculate its similarity with other knowledge units to form a similarity matrix, facilitating subsequent determination of the fusion strategy based on the comprehensive similarity.
[0043] The comprehensive similarity in the present invention is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance. Through the comprehensive similarity calculation based on the semantic vector space, the normalized formulas of the angle and spatial distance are fused for similarity calculation, and the result is more comprehensive.
[0044] Step 104: Based on the confidence evaluation model, determine the confidence evaluation value of each knowledge unit; the confidence evaluation value of each knowledge unit is used to represent the reliability of each knowledge unit. It should be noted that for some knowledge from multiple sources, due to various factors such as the authority of the data source, time and space changes, collection methods, and processing methods, it is sometimes impossible to ensure the authenticity and accuracy of the acquired knowledge, and there are situations of contradictions or "true and false being difficult to distinguish".
[0045] Therefore, the present invention uses a confidence evaluation model to calculate the confidence evaluation value of each knowledge unit, so as to rank the confidence levels of knowledge units with conflicting information from multiple sources. For the knowledge with a higher ranking, it is determined which knowledge should be fused according to the similarity threshold, and then stored in the knowledge base, while the rest are discarded.
[0046] Among them, the confidence evaluation value of each knowledge unit is used to represent the reliability of each knowledge unit. The larger the confidence evaluation value of a knowledge unit, the higher the reliability of the knowledge unit; conversely, the smaller the confidence evaluation value of a knowledge unit, the lower the reliability of the knowledge unit.
[0047] Step 105: Generate a fused knowledge base based on the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit.
[0048] Specifically, optimize the knowledge fusion algorithm according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit. Thus, generate a fused knowledge base based on the knowledge fusion algorithm.
[0049] The method provided in this embodiment first preprocesses multi-source data to generate multiple pieces of structured data in a unified format, and extracts the knowledge units corresponding to each piece of structured data in a unified format from the structured data; then, inputs each knowledge unit into the target word vector model to obtain the target semantic vector corresponding to each knowledge unit, and constructs a semantic vector space based on the target semantic vectors corresponding to each knowledge unit; further, determine the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit, and the comprehensive similarity is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance; based on the confidence evaluation model, determine the confidence evaluation value of each knowledge unit; the confidence evaluation value of each knowledge unit is used to represent the reliability of each knowledge unit; furthermore, generate a fused knowledge base based on the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit.
[0050] The present invention first preprocesses multi-source data, uses the target word vector model to generate the target semantic vector corresponding to each knowledge unit, and then fuses each knowledge unit based on the comprehensive similarity of each target semantic vector and the confidence evaluation value of each knowledge unit to obtain a fused knowledge base, effectively fusing knowledge from different sources, and ensuring the accuracy of data fusion through the calculation of the confidence evaluation value and the comprehensive similarity, thus solving the problems of lack of semantic understanding and inaccurate processing in the prior art.
[0051] Specifically, In the method provided in this embodiment, It should be noted that each embodiment of this application can be freely combined, the order can be swapped, or each can be executed independently, without relying on or depending on a fixed execution order.
[0052] According to a multi-source knowledge fusion method based on semantic calculation provided by the present invention, the target word vector model includes an embedding layer, a self-attention mechanism module, and a pooling layer. The embedding layer is a lightweight bidirectional encoder representation ALBERT model; Input each knowledge unit into the target word vector model to obtain the target semantic vector corresponding to each knowledge unit, including: Perform vector conversion on each knowledge unit to obtain the multi-dimensional word vector corresponding to each knowledge unit; Input the multi-dimensional word vectors corresponding to each knowledge unit into the ALBERT model to obtain the embedding vectors corresponding to each knowledge unit; Input the embedding vectors corresponding to each knowledge unit into the encoder of the ALBERT model to obtain the first semantic vector corresponding to each knowledge unit; Input each first semantic vector into the self-attention mechanism module to obtain the second semantic vector corresponding to each first semantic vector output by the self-attention mechanism module; Input each second semantic vector into the pooling layer for mean pooling to obtain the target semantic vector corresponding to each knowledge unit; the target semantic vector is a global semantic vector representation.
[0053] Specifically, in some embodiments, the target word vector model includes an embedding layer, a self-attention mechanism module, and a pooling layer, and the embedding layer is an ALBERT model.
[0054] The present invention represents multi-source knowledge through an improved word vector model to construct a semantic vector space V. The embedding layer of the improved word vector model (target word vector model) is an ALBERT model, and a self-attention mechanism is introduced between the embedding layer and the pooling layer, enabling the generated word vectors to pay more attention to the keywords and important context information in the text and being able to handle polysemous words.
[0055] Step 102 is implemented through the following steps: Step 2-1: Train each knowledge unit to obtain the multi-dimensional word vector corresponding to each knowledge unit.
[0056] For example, train two pieces of multi-source knowledge S A 、S B after preprocessing to generate multi-dimensional word vectors (matrices), and obtain matrix A = (a1, a2, a3,..., a m ) T , B = (b1, b2, b3,..., b m ) T . Among them, ai =(a i1 ,a i2 ,a i3 ,…,a id ) is the row vector of the $i$-th row of matrix $A$, and $b$ j =(b j1 ,b j2 ,b j3 ,…,b jd ) is the row vector of the $j$-th row of matrix $B$, $A\in R$ m×d , $B\in R$ m×d , $a$ i and $b$ i respectively represent the word vectors of the $i$-th word in two multi-source knowledge $S$ A and $S$ B , $d$ represents the dimension of the word vector, ($i = 1,2,3,\cdots,m$; $j = 1,2,3,\cdots,m$).
[0057] Step 2-2: Input the multi-dimensional word vectors corresponding to each knowledge unit into the ALBERT model to obtain the embedding vectors corresponding to each knowledge unit.
[0058] For example, in the embedding layer, an embedding vector is generated for each word in each multi-source knowledge. Input is the input, Position Embeddings, Segment Embeddings, and Token Embeddings are the position encoding, paragraph encoding, and character encoding of each word in the multi-source knowledge respectively. The synthesized input vector (embedding vector) is shown as follows:
[0059] Among them, is the position encoding of the word vector, is the context information of the word vector, is the character embedding of the word vector, represents the word vector, and the synthesized vector .
[0060] Step 2-3: Input the embedding vectors corresponding to each knowledge unit into the encoder of the ALBERT model to obtain the first semantic vectors corresponding to each knowledge unit.
[0061] For example, input the synthesized vector further into the bidirectional encoder of the ALBERT model (ALBERT) to obtain the first semantic vectors corresponding to each knowledge unit.
[0062] Step 2-4: Input each first semantic vector into the self-attention mechanism module to obtain the second semantic vectors corresponding to each first semantic vector output by the self-attention mechanism module.
[0063] For example, input the first semantic vector into the self-attention mechanism module to obtain the second semantic vector Output. The obtained output represents a weighted combination of the inputs, where the weight of each input is determined by the content of other inputs. This enables the model to focus on different parts of the input and capture long-range dependencies.
[0064] Step 2-5: Perform mean pooling on each second semantic vector to obtain the target semantic vector corresponding to each knowledge unit; the target semantic vector is a global semantic vector representation.
[0065] For example, by performing mean pooling on the output of the self-attention layer, each piece of knowledge is transformed into a fixed-length vector. This vector can be regarded as the overall representation of the input knowledge. The output of the self-attention layer is a matrix of dimension n×d, where n is the number of characters in the sentence and d is the dimension of each character vector. For each feature dimension, calculate the average value Average of all character vectors, as shown in the following formula:
[0066] where Output i is the i-th row of the output of the self-attention layer, and the obtained average value vector has d words, representing the vector representation of this piece of knowledge.
[0067] In the method provided in this embodiment, multi-source knowledge is vectorized through the target word vector model to construct a semantic vector space. The embedding layer of the target word vector model is the ALBERT model, and a self-attention mechanism is introduced between the embedding layer and the pooling layer, enabling the generated word vectors to pay more attention to the keywords and important context information in the text, being able to handle polysemous words, thereby improving the accuracy of data fusion.
[0068] According to a multi-source knowledge fusion method based on semantic calculation provided by the present invention, input each first semantic vector into the self-attention mechanism module to obtain the second semantic vector corresponding to each first semantic vector output by the self-attention mechanism module, including: Multiply each first semantic vector by the query matrix, key matrix, and value matrix respectively to generate the query vector, key vector, and value vector corresponding to each first semantic vector; Determine the attention score of each first semantic vector through the inner product of the query vector and the key vector corresponding to each first semantic vector; Use the Soft-max function to normalize the attention scores of each first semantic vector to obtain the attention weights of each first semantic vector; Perform weighted summation of the attention weights of each first semantic vector and the value vectors to obtain each second semantic vector.
[0069] Specifically, in some embodiments, the specific implementation process of steps 2-4 includes the following steps: (1) Multiply each first semantic vector by the query matrix, key matrix, and value matrix respectively to generate a query vector, key vector, and value vector corresponding to each first semantic vector.
[0070] The Self-Attention Mechanism is a variant based on the attention mechanism. Its main purpose is to enable the model to automatically focus on different parts of the input sequence, thereby capturing the relationships between different words in the knowledge. The core idea of the self-attention mechanism is to assign a weight to each word in the input sequence, and these weights are proportional to the correlation with other words.
[0071] Here, the word vector matrix (first semantic vector) of the input text is multiplied by 3 weight matrices respectively 、 and to obtain the vector sequences of query, key, and value. And QK T is to take the inner product of the query and key vectors pairwise, and use the soft-max function to normalize the result. The normalized attention matrix represents the degree of association between each element of the query and the key. Multiply the attention matrix by the value vector sequence to obtain the final output vector sequence.
[0072] Currently, the most widespread attention method is the self-attention Self-Attention mechanism, and its 、 、 all come from the linear transformation of the same input sequence, which reduces the dependence on external information and is better at capturing the internal correlation of data or features.
[0073] Through the self-attention mechanism, the model calculates the degree of association between each word in the input sequence and all other words, and performs weighted averaging according to these degrees of association to generate new word vectors. It is necessary to construct a query, key, and value for each input vector. This is achieved by multiplying the input vector by 3 groups of weight matrices, as shown in the following formula:
[0074] Among them, represents the query vector corresponding to the first semantic vector, represents the first semantic vector, is the query matrix to be learned;
[0075] Among them, represents the key vector corresponding to the first semantic vector, represents the first semantic vector, is the key matrix to be learned;
[0076] Among them, represents the value vector corresponding to the first semantic vector, represents the first semantic vector, is the value matrix to be learned.
[0077] (2) Determine the attention scores of each first semantic vector through the inner product of the query vector corresponding to each first semantic vector and the key vector.
[0078] For example, use the query and the key to calculate the attention score, as shown in the following formula:
[0079] Among them, represents the attention score of the first semantic vector, represents the query vector corresponding to the first semantic vector, represents the key vector corresponding to the first semantic vector, is the dimension of the key.
[0080] (3) Use the Soft-max function to normalize the attention scores of each first semantic vector to obtain the attention weights of each first semantic vector.
[0081] For example, apply the Soft-max function to the attention scores to obtain the attention weights of each input to other inputs. Among them, the Soft-max function essentially maps the original output through the softmax function to values in (0, 1), as shown in the following formula: AttentionWeights = soft-max(AttentionScore) Among them, AttentionWeights represents the attention weight of the first semantic vector, and AttentionScore represents the attention score of the first semantic vector.
[0082] (4) Perform a weighted sum of the attention weights of each first semantic vector and the value vector to obtain each second semantic vector.
[0083] For example, use the attention weights and the values to calculate the output, as shown in the following formula: Output = AttentionWeights × V =soft-max (AttentionScore)×V =soft-max ×V Among them, Output represents the second semantic vector, AttentionWeights represents the attention weights of the first semantic vector, represents the value vector corresponding to the first semantic vector, represents the query vector corresponding to the first semantic vector, represents the key vector corresponding to the first semantic vector, is the dimension of the key.
[0084] In the method provided in this embodiment, the obtained second semantic vector represents a weighted combination of the inputs, where the weight of each input is determined by the content of other inputs, which enables the model to focus on different parts of the input and capture long-distance dependencies. The target word vector model of the present invention introduces a self-attention mechanism between the embedding layer and the pooling layer, enabling the generated word vectors to pay more attention to the keywords and context important information in the text and being able to handle polysemous words.
[0085] According to a multi-source knowledge fusion method based on semantic calculation provided by the present invention, determining the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit includes: Determining the cosine similarity between each target semantic vector and the Euclidean distance between each target semantic vector; the cosine similarity characterizes the direction between two vectors, and the Euclidean distance characterizes the distance between two vectors; Through a first preset weight coefficient and a second preset weight coefficient, performing weighted normalization on the cosine similarity and the Euclidean distance between each target semantic vector to obtain the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit; the sum of the first preset weight coefficient and the second preset weight coefficient is 1.
[0086] Specifically, in some embodiments, step 103 can be implemented through the following steps: determining the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit includes: First, determining the cosine similarity between each target semantic vector and the Euclidean distance between each target semantic vector.
[0087] In the knowledge semantic space, using measurement methods such as cosine similarity and Euclidean distance to calculate the similarity between different knowledges. For each knowledge unit in the multi-source knowledge, calculating its similarity with other knowledge units can form a similarity matrix.
[0088] Among them, the cosine similarity characterizes the direction between two vectors, and the Euclidean distance characterizes the distance between two vectors. Combining the two can improve the calculation effect of similarity and can more comprehensively evaluate the similarity between two vectors.
[0089] The cosine similarity corresponding to the vectors of two knowledge units extended to the n-dimensional space is calculated using the following formula:
[0090] Where is the cosine similarity between vector and vector , represents the output vector, represents another output vector, and respectively represent the components of vector and . Among them, represents the dot product of vector and vector , and respectively represent the Euclidean norms (i.e., the lengths of the vectors) of vector and .
[0091] The Euclidean distance (also known as the Euclidean metric) is a commonly used distance definition, referring to the actual distance between two points in the n-dimensional space. The Euclidean distance in two-dimensional and three-dimensional spaces is the actual distance between two points. The distance formula in the n-dimensional space is:
[0092] Where represents the Euclidean distance between vector and vector , represents the output vector, represents another output vector, represents the i-th component of vector , represents the i-th component of vector .
[0093] Through the first preset weight coefficient k1 and the second preset weight coefficient k2, the cosine similarity and Euclidean distance between each target semantic vector are weighted and normalized to obtain the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit.
[0094] Among them, the sum of the first preset weight coefficient k1 and the second preset weight coefficient k2 is 1. For the determination of the preset weight coefficients k1 and k2, it is determined whether they can be fused through the vector calculation results of different knowledge, so as to obtain appropriate values of k1 and k2, and then the threshold is calculated, and then the fusion strategy is selected according to the threshold.
[0095] For example, the combination of cosine similarity and Euclidean distance with the normalization formula is as follows:
[0096] (0 ≤ k1, k2 ≤ 1, and k1 + k2 = 1) Among them, s is the normalized similarity value. When the included angle θ between two vectors is smaller, cosθ is larger, and (1 - cosθ) is smaller. The value range of d is between 0 and 1; when the distance between two vectors is closer, is smaller, and the value of
[0097] is smaller, and its value is between 0 and 1. Therefore, the value of s is between 0 and 1. When θ is 0 and d is also 0, s is 0; when θ is 180° and d is infinite, s is 1. By reasonably taking the values of k1 and k2, and according to the value of s, the similarity of two vectors can be comprehensively evaluated.
[0098] The method provided in this embodiment calculates the comprehensive similarity between the output vectors of different knowledge units by using the cosine similarity and Euclidean distance formulas. Furthermore, based on the similarity calculation results, multi-source knowledge can be fused to obtain a more accurate and comprehensive knowledge representation, improving the accuracy of knowledge fusion. Construct a multi-dimensional feature matrix including source information, evidence materials, literature records, logic, expert opinions, public evaluations, time factors, space factors, and association information; Generate an index parameter weight matrix by comparing two-by-two indicators, and perform normalization processing on the index parameter weight matrix to obtain the weight values of each index parameter; Based on the weight values of each index parameter and the multi-dimensional feature matrix, perform weighted summation on the multi-dimensional features to generate the confidence evaluation values of each knowledge unit.
[0099] Specifically, in some embodiments, step 104 can be implemented through the following steps: First, construct a multi-dimensional feature matrix including source information, evidence materials, literature records, logic, expert opinions, public evaluations, time factors, space factors, and association information.
[0100] The m knowledge to be evaluated for confidence forms a data set UE ={e1, e2,..., e i ,..., e m} T (i = 1, 2,..., m), the source information, evidence materials, literature records, logic, expert opinions, public evaluations, time factors, space factors, and associated information, etc. of each piece of knowledge are taken as confidence indicators, and the set of indicator parameters is F = {f1, f2,..., f j ,..., f n} (j = 1, 2,..., n), and the set of weights of indicator parameters is U W = {w1, w2,..., w j ,..., w n} (j = 1, 2,..., n).
[0101] Indicator parameters are generally text data, and the confidence indicators can be quantitatively assigned according to the hierarchical evaluation method. Each piece of knowledge obtains m indicator values, that is, e i = {e i1 , e i2 ,..., e ij ,..., e in}, (j = 1, 2,..., n), and thus the confidence indicator matrix of knowledge E = (e ij )m×n, (i = 1, 2,..., m; j = 1, 2,..., n), that is, an m-dimensional feature matrix of m pieces of knowledge is obtained. The m-dimensional feature matrix is shown in Table 1: Table 1:
[0102] Further, an indicator parameter weight matrix is generated by pairwise comparison of indicators, and the indicator parameter weight matrix is normalized to obtain the weight values of each indicator parameter.
[0103] For example, first calculate the weight values of indicator parameters, judge the importance degree of indicators by pairwise comparison, and assign values of 4, 3, 2, 1 respectively according to very important, important, equally important, and unimportant. Construct the indicator parameter weight matrix W = (w ij ) n×n , (i = 1, 2,..., n; j = 1, 2,..., n). The indicator parameter weight matrix is shown in Table 2: Table 2:
[0104] (1) Normalize the indicator parameter weight matrix to obtain the normalized indicator parameter weight matrix W’ = (w ij ’) n×n .
[0105]
[0106]
[0107] in, is the normalized importance of the ith indicator compared to the jth indicator, is the importance of the i-th indicator compared to the j-th indicator.
[0108] (2) Calculate the indicator parameter weight value of the jth indicator :
[0109]
[0110] in, represents the weight value of the indicator parameter of the jth indicator, is the normalized importance of the i-th indicator compared to the j-th indicator.
[0111] Furthermore, after obtaining the weight value of each indicator parameter and the multidimensional feature matrix, the multidimensional features are weighted and summed based on the weight value of each indicator parameter and the multidimensional feature matrix to generate the confidence evaluation value of each knowledge unit.
[0112] For example, the confidence evaluation value of the i-th knowledge unit is the weighted sum of the quantitative values of each indicator:
[0113]
[0114] in, represents the confidence evaluation value of the i-th knowledge unit, represents the characteristic value of the jth indicator of the i-th knowledge unit, Represents the indicator parameter weight value of the j-th indicator.
[0115] Therefore, the n knowledge units can be sorted from high to low according to the confidence evaluation value as the judgment condition for knowledge fusion. For example, the knowledge with the highest ranking can be judged according to the similarity threshold to be fused and stored in the knowledge base, and the rest can be discarded.
[0116] The method provided in this embodiment calculates the confidence evaluation value of each knowledge unit based on the confidence evaluation model, which facilitates the subsequent fusion of each knowledge unit based on the confidence evaluation value and comprehensive similarity, thereby improving the accuracy of multi-source data fusion.
[0117] A multi-source knowledge fusion method based on semantic computing provided by the present invention generates a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit, including: Determine redundant knowledge pairs and contradictory knowledge pairs in each knowledge unit according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit; Generate a fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs.
[0118] Specifically, in some embodiments, step 105 can be implemented through the following steps: First, determine redundant knowledge pairs and contradictory knowledge pairs in each knowledge unit according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit.
[0119] It should be noted that two situations need to be processed during fusion: redundant knowledge and contradictory knowledge. Redundant knowledge will affect the refinement of the knowledge base, causing the bloating of the data volume of the knowledge base and the lack of actual knowledge volume. Contradictory knowledge will affect the accuracy of the knowledge base, causing the fuzziness of knowledge or even the unreliability of the knowledge base. In this embodiment, redundant knowledge pairs and contradictory knowledge pairs are determined according to the semantic comprehensive similarity calculation results.
[0120] Furthermore, generate a fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs.
[0121] Specifically, after obtaining the redundant knowledge pairs and the contradictory knowledge pairs, multi-source knowledge can be fused according to the semantic comprehensive similarity calculation results combined with the confidence evaluation values. For example, knowledge pairs with a comprehensive similarity higher than a preset redundancy threshold (similarity threshold) are fused as redundant knowledge. Knowledge pairs with a comprehensive similarity lower than the preset redundancy threshold (similarity threshold) and with contradictions are fused as contradictory knowledge according to the confidence evaluation value. Finally, a fused knowledge base can be obtained.
[0122] In the method provided in this embodiment, a fused knowledge base is generated according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit. The comprehensive similarity result is more comprehensive. According to the comprehensive similarity and confidence results, the knowledge fusion algorithm is optimized, realizing the accurate and efficient fusion of multi-source knowledge.
[0123] A multi-source knowledge fusion method based on semantic computing provided by the present invention determines redundant knowledge pairs and contradictory knowledge pairs in each knowledge unit according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit, including: If the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units in each knowledge unit is greater than or equal to a preset redundancy threshold, mark any two knowledge units as redundant knowledge pairs; If there is a contradiction between any two knowledge units and the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units is lower than the preset redundancy threshold, mark any two knowledge units as a pair of contradictory knowledge. Generate a fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs, including: Retain the knowledge unit with a larger confidence evaluation value in the redundant knowledge pair, and perform weighted fusion according to the confidence evaluation value of the contradictory knowledge pair to generate a new knowledge unit. Determine the fused knowledge base based on each knowledge unit with a larger confidence evaluation value and each new knowledge unit.
[0124] Specifically, in some embodiments, the process of determining the redundant knowledge pairs and the contradictory knowledge pairs in each knowledge unit is exemplified as follows: If the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units in each knowledge unit is greater than or equal to the preset redundancy threshold, mark any two knowledge units as redundant knowledge pairs. If there is a contradiction between any two knowledge units and the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units is lower than the preset redundancy threshold, mark any two knowledge units as a pair of contradictory knowledge.
[0125] For example, the preset redundancy threshold is 0.8. When the comprehensive similarity s≥0.8, it indicates that any two knowledge units are marked as redundant knowledge pairs. When s<0.8 and there is a contradiction between any two knowledge units, they are marked as a pair of contradictory knowledge.
[0126] Furthermore, the specific implementation process of generating a fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs includes the following steps: First, for the redundant knowledge pairs, retain the knowledge unit with a larger confidence evaluation value; for the contradictory knowledge pairs, perform weighted fusion according to the confidence evaluation value of the contradictory knowledge pair to generate a new knowledge unit.
[0127] Then, determine the fused knowledge base based on each knowledge unit with a larger confidence evaluation value and each new knowledge unit.
[0128] That is, according to the knowledge confidence score, perform weighted fusion on the multi-source knowledge to obtain the fused knowledge representation and store it in the knowledge base.
[0129] Exemplarily, the multi-source knowledge fusion algorithm is as follows: Input: New knowledge set K, original knowledge base KB1 Output: Fused knowledge base KB2 Process: 1. If KB1 does not exist, create KB1; 2. Read a piece of knowledge k (k ∈ K); 3. If there exists k1 (k1 ∈ K) that is redundant with k, discard k according to the threshold or rule, add k1 to KB2, and go back to step 2; 4. If there exists k2 (k2 ∈ K) that is contradictory to k, call the confidence evaluation algorithm to calculate the confidence scores of k2 and k. If the confidence score of k2 is high, add k2 to KB2 and delete k. Otherwise, discard k2 and go back to step 2; 5. Output the fused knowledge base KB2.
[0130] The method provided in this embodiment fuses multi-source knowledge according to the semantic comprehensive similarity calculation result and the confidence evaluation value. For knowledge with high similarity, fusion is performed. For knowledge with low similarity and contradictions, according to the knowledge confidence evaluation value, weighted fusion of multi-source knowledge is carried out to obtain the fused knowledge representation and generate the fused knowledge base, realizing the optimization of the knowledge fusion algorithm according to the comprehensive similarity and confidence evaluation results, and achieving the accurate and efficient fusion of multi-source knowledge.
[0131] According to a multi-source knowledge fusion method based on semantic calculation provided by the present invention, the method further includes: Quantify the performance of the fusion result through accuracy, recall rate, and F1 value; Among them, the accuracy rate is the ratio of the number of correctly fused knowledge pairs to the total number of fused pairs, the recall rate is the ratio of the number of correctly fused knowledge pairs to the total number of pairs that should be fused, and the F1 value is the harmonic mean of the accuracy rate and the recall rate.
[0132] Specifically, in some embodiments, the method further includes: Quantify the performance of the fusion result through accuracy, recall rate, and F1 value. For example, check and evaluate the fused knowledge base to determine whether the fused knowledge base is accurate, complete, and reasonable.
[0133] Conduct performance evaluation by constructing an evaluation index system. The evaluation indexes include accuracy (whether the fused knowledge conforms to the facts), integrity (whether it contains important content that should be retained in the multi-source knowledge), consistency (whether there is self-contradiction within the fused knowledge), etc. Score these indexes and finally comprehensively evaluate the fusion effect.
[0134] Among them, the accuracy rate is the ratio of the number of correctly fused knowledge pairs to the total number of fused pairs. That is, the accuracy rate (Precision) refers to the proportion of the number of correctly fused knowledge pairs (TP) to the total number of fused pairs (TP + FP), which is used to measure the proportion of correct mergers in the fusion result and avoid incorrect matches. The relevant calculation formula for the accuracy rate is as follows:
[0135] In the formula, is the accuracy rate, represents the number of correctly fused knowledge pairs (knowledge pairs that should be fused), represents the number of incorrectly fused knowledge pairs (knowledge pairs that should not be fused but are fused).
[0136] The recall rate is the proportion of the number of correctly fused knowledge pairs to the total number of pairs that should be fused. That is, the recall rate refers to the proportion of the number of correctly fused knowledge pairs (TP) to the total number of pairs that need to be fused (TP + FN), which is used to measure the ability of the system to discover true associations and avoid missed matches. The relevant calculation formula for the recall rate is as follows:
[0137] Among them, is the recall rate, represents the number of correctly fused knowledge pairs, represents the number of missed-fused knowledge pairs (knowledge pairs that should be fused but are not).
[0138] The F1 value is the harmonic mean of the accuracy rate and the recall rate, which is used to comprehensively measure the performance of knowledge fusion. The calculation formula for the F1 value is as follows:
[0139] In the formula, is the accuracy rate, is the recall rate, and the F1 value is the harmonic mean of the accuracy rate and the recall rate.
[0140] Exemplarily, Figure 2 is a schematic diagram of the effect of the multi-source knowledge fusion method based on semantic calculation provided by the present invention. As Figure 2 shown, the horizontal axis in the attached drawing represents the amount of data (pieces), the vertical axis represents the accuracy rate (%), and the three curves from top to bottom are the accuracy curves of the present method, based on Bert, and based on Word2Vec respectively. It can be seen from the figure that the performance of the data fusion accuracy of the present method in different amounts of data is better than that of the other two methods.
[0141] Also, for example, Table 3 shows the comparison of the experimental fusion effects of the three methods: Table 3:
[0142] Compared with the prior art, the key of the present invention lies in adopting an optimized semantic calculation normalization algorithm and a confidence evaluation algorithm that combine cosine similarity and Euclidean distance to achieve effective integration of multi-source knowledge. By constructing a knowledge semantic vector space, the words in the knowledge data are converted into vector representations, and then the similarity between different words is calculated using the cosine similarity and Euclidean distance formulas. Based on the similarity calculation results, multi-source knowledge can be fused to obtain a more accurate and comprehensive knowledge representation.
[0143] The key technologies and algorithms involved in the present invention have been verified in practical applications and achieved remarkable results. By implementing the present invention, the accuracy and efficiency problems in multi-source knowledge fusion can be effectively solved, providing strong support for the development of the big data and artificial intelligence fields.
[0144] The method provided in this embodiment can judge whether the fused knowledge is accurate, complete and reasonable by checking and evaluating the fused knowledge.
[0145] Figure 3 is the second flow schematic diagram of the multi-source knowledge fusion method based on semantic calculation provided by the present invention. As Figure 3 shown, the method includes: Step 301, obtaining multi-source knowledge data; Step 302, preprocessing multi-source data: including cleaning, deduplication, unifying formats, and knowledge unit extraction; Step 303, constructing a unified knowledge semantic vector space based on multiple knowledge units; Step 304, calculating the comprehensive similarity between multiple knowledge units. The comprehensive similarity is the normalized value of cosine similarity and Euclidean distance; Step 305, evaluating the confidence of multiple knowledge units using the subjective and objective weight method and sorting them according to the confidence level; Step 306, performing multi-source knowledge fusion based on the comprehensive similarity between multiple knowledge units and the confidence of multiple knowledge units; Step 307, outputting the fused knowledge in a unified format.
[0146] The method provided in this embodiment, after preprocessing and unifying the formats of multi-source knowledge, constructs a unified knowledge semantic vector space using the lightweight ALBERT model, performs semantic calculation using an optimized normalization algorithm that combines cosine similarity and Euclidean distance, and combines the knowledge confidence evaluation algorithm to achieve effective fusion of multi-source knowledge.
[0147] The multi-source knowledge fusion device based on semantic computing provided by the present invention will be described below. The multi-source knowledge fusion device based on semantic computing described below can be correspondingly referred to the multi-source knowledge fusion method based on semantic computing described above.
[0148] Figure 4 FIG. is a schematic structural diagram of the multi-source knowledge fusion device based on semantic computing provided by the present invention. As Figure 4 shown, the multi-source knowledge fusion device 400 based on semantic computing includes the following modules: A preprocessing module 410, configured to preprocess multi-source data, generate multiple pieces of structured data in a unified format, and extract knowledge units corresponding to each of the structured data in the unified format from each of the structured data in the unified format; A fusion module 420, configured to input each of the knowledge units into a target word vector model to obtain target semantic vectors corresponding to each of the knowledge units; Determine the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the comprehensive similarity is determined based on a normalized weighted value of cosine similarity and Euclidean distance; Based on a confidence evaluation model, determine the confidence evaluation value of each of the knowledge units; the confidence evaluation value of each of the knowledge units is used to characterize the reliability of each of the knowledge units; Generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation value of each of the knowledge units.
[0149] For the device provided by the present invention, first, the preprocessing module 410 is configured to preprocess multi-source data, generate multiple pieces of structured data in a unified format, and extract knowledge units corresponding to each of the structured data in the unified format from each of the structured data in the unified format; then, the fusion module 420 is configured to input each of the knowledge units into a target word vector model to obtain target semantic vectors corresponding to each of the knowledge units; further, determine the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units, the comprehensive similarity is determined based on a normalized weighted value of cosine similarity and Euclidean distance; based on a confidence evaluation model, determine the confidence evaluation value of each of the knowledge units; the confidence evaluation value of each of the knowledge units is used to characterize the reliability of each of the knowledge units; furthermore, generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation value of each of the knowledge units.
[0150] The present invention first preprocesses multi-source data, generates target semantic vectors corresponding to each knowledge unit by using a target word vector model, and then fuses each knowledge unit based on the comprehensive degree of each target semantic vector and the confidence evaluation value of each knowledge unit to obtain a fused knowledge base, effectively fusing knowledge from different sources, and ensuring the accuracy of data fusion through the confidence evaluation value and comprehensive similarity calculation, thereby solving the problems of lack of semantic understanding and inaccurate processing existing in the prior art.
[0151] According to a multi-source knowledge fusion device 400 based on semantic calculation provided by the present invention, the target word vector model includes an embedding layer, a self-attention mechanism module, and a pooling layer, and the embedding layer is a lightweight bidirectional encoder representation (ALBERT) model; The fusion module 420 is specifically configured to: Perform vector conversion on each of the knowledge units to obtain multi-dimensional word vectors corresponding to each of the knowledge units; Input the multi-dimensional word vectors corresponding to each of the knowledge units into the ALBERT model to obtain embedding vectors corresponding to each of the knowledge units; Input the embedding vectors corresponding to each of the knowledge units into the encoder of the ALBERT model to obtain first semantic vectors corresponding to each of the knowledge units; Input each of the first semantic vectors into the self-attention mechanism module to obtain second semantic vectors corresponding to each of the first semantic vectors output by the self-attention mechanism module; Input each of the second semantic vectors into the pooling layer for mean pooling to obtain target semantic vectors corresponding to each of the knowledge units; the target semantic vectors are global semantic vector representations.
[0152] According to a multi-source knowledge fusion device 400 based on semantic calculation provided by the present invention, the fusion module 420 is further configured to: Multiply each of the first semantic vectors by a query matrix, a key matrix, and a value matrix respectively to generate query vectors, key vectors, and value vectors corresponding to each of the first semantic vectors; Determine the attention scores of each of the first semantic vectors through the inner product of the query vectors corresponding to each of the first semantic vectors and the key vectors; Use the softmax function to normalize the attention scores of each of the first semantic vectors to obtain the attention weights of each of the first semantic vectors; Perform weighted summation of the attention weights of each of the first semantic vectors and the value vectors to obtain each of the second semantic vectors.
[0153] A multi-source knowledge fusion device 400 based on semantic computing provided by the present invention, the fusion module 420 is further configured to: Determine the cosine similarity between the target semantic vectors and the Euclidean distance between the target semantic vectors; the cosine similarity represents the direction between two vectors, and the Euclidean distance represents the distance between two vectors; Through a first preset weight coefficient and a second preset weight coefficient, perform weighted normalization on the cosine similarity and the Euclidean distance between the target semantic vectors to obtain the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit; the sum of the first preset weight coefficient and the second preset weight coefficient is 1.
[0154] A multi-source knowledge fusion device 400 based on semantic computing provided by the present invention, the confidence evaluation model is used to determine the confidence evaluation value of each knowledge unit, including: Construct a multi-dimensional feature matrix including source information, evidence materials, literature records, logic, expert opinions, public evaluations, time factors, space factors, and association information; Generate an index parameter weight matrix by comparing two-by-two indexes, and perform normalization processing on the index parameter weight matrix to obtain the weight values of each index parameter; Based on the weight values of each index parameter and the multi-dimensional feature matrix, perform weighted summation on the multi-dimensional features to generate the confidence evaluation value of each knowledge unit.
[0155] A multi-source knowledge fusion device 400 based on semantic computing provided by the present invention, the fusion module 420 is further configured to: Determine the redundant knowledge pairs and contradictory knowledge pairs in each knowledge unit; Generate the fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs.
[0156] A multi-source knowledge fusion device 400 based on semantic computing provided by the present invention, the fusion module 420 is further configured to: If the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units in each knowledge unit is greater than or equal to a preset redundancy threshold, mark the any two knowledge units as the redundant knowledge pairs; If the any two knowledge units are contradictory and the comprehensive similarity between the target semantic vectors corresponding to the any two knowledge units is lower than the preset redundancy threshold, mark the any two knowledge units as the contradictory knowledge pairs; The generating the fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs includes: Retain the knowledge units with relatively large confidence evaluation values in the redundant knowledge pairs, and perform weighted fusion according to the confidence evaluation values of the contradictory knowledge pairs to generate new knowledge units; Based on each of the knowledge units with relatively large confidence evaluation values and each of the new knowledge units, determine the fused knowledge base.
[0157] According to a multi-source knowledge fusion device 400 based on semantic computing provided by the present invention, the multi-source knowledge fusion device 400 based on semantic computing further includes: a fusion effect evaluation module; The fusion effect evaluation module is used for: Quantify the performance of the fusion result through accuracy, recall rate, and F1 value; Among them, the accuracy rate is the ratio of the number of correctly fused knowledge pairs to the total number of fused pairs, the recall rate is the ratio of the number of correctly fused knowledge pairs to the total number of pairs to be fused, and the F1 value is the harmonic mean of the accuracy rate and the recall rate.
[0158] Figure 5 An example of the entity structure diagram of an electronic device is as Figure 5 shown. The electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 complete communication with each other through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute a multi-source knowledge fusion method based on semantic computing. The method includes: Preprocess multi-source data to generate multiple structured data in a unified format, and extract the knowledge units corresponding to each of the structured data in the unified format from each of the structured data; Input each of the knowledge units into a target word vector model to obtain the target semantic vectors corresponding to each of the knowledge units; Determine the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the comprehensive similarity is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance; Based on a confidence evaluation model, determine the confidence evaluation values of each of the knowledge units; the confidence evaluation values of each of the knowledge units are used to characterize the reliability of each of the knowledge units; Generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation values of each of the knowledge units.
[0159] In addition, when the logical instructions in the above-mentioned memory 530 can be implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0160] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the multi-source knowledge fusion method based on semantic calculation provided by the above-mentioned various methods. The method includes: Preprocess multi-source data to generate multiple structured data in a unified format, and extract knowledge units corresponding to each of the structured data in the unified format from the structured data; Input each of the knowledge units into a target word vector model to obtain target semantic vectors corresponding to each of the knowledge units; Determine the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the comprehensive similarity is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance; Based on a confidence evaluation model, determine the confidence evaluation value of each of the knowledge units; the confidence evaluation value of each of the knowledge units is used to represent the reliability degree of each of the knowledge units; Generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation value of each of the knowledge units.
[0161] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes the multi-source knowledge fusion method based on semantic calculation provided by the above-mentioned various methods. The method includes: Preprocess multi-source data to generate multiple structured data in a unified format, and extract knowledge units corresponding to each of the structured data in the unified format from the structured data; Input each of the knowledge units into the target word vector model to obtain the target semantic vector corresponding to each knowledge unit; Determine the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the comprehensive similarity is determined based on the normalized weighted value of the cosine similarity and the Euclidean distance; Based on the confidence evaluation model, determine the confidence evaluation value of each knowledge unit; the confidence evaluation value of each knowledge unit is used to characterize the reliability of each knowledge unit; Generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each knowledge unit and the confidence evaluation value of each knowledge unit.
[0162] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.
[0163] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-source knowledge fusion method based on semantic computing, characterized in that, Including: Preprocessing multi-source data to generate multiple structured data in a unified format, and extracting knowledge units corresponding to each of the structured data in the unified format; Inputting each of the knowledge units into a target word vector model to obtain target semantic vectors corresponding to each of the knowledge units; Determining the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the comprehensive similarity is determined based on a normalized weighted value of cosine similarity and Euclidean distance; Based on a confidence evaluation model, determining the confidence evaluation value of each of the knowledge units; the confidence evaluation value of each of the knowledge units is used to characterize the reliability of each of the knowledge units; Generating a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation value of each of the knowledge units.
2. The multi-source knowledge fusion method based on semantic computing according to claim 1, wherein The target word vector model includes an embedding layer, a self-attention mechanism module, and a pooling layer, and the embedding layer is a lightweight bidirectional encoder representation (ALBERT) model; The step of inputting each of the knowledge units into the target word vector model to obtain target semantic vectors corresponding to each of the knowledge units includes: Performing vector transformation on each of the knowledge units to obtain multi-dimensional word vectors corresponding to each of the knowledge units; Inputting the multi-dimensional word vectors corresponding to each of the knowledge units into the ALBERT model to obtain embedding vectors corresponding to each of the knowledge units; Inputting the embedding vectors corresponding to each of the knowledge units into the encoder of the ALBERT model to obtain first semantic vectors corresponding to each of the knowledge units; Inputting each of the first semantic vectors into the self-attention mechanism module to obtain second semantic vectors corresponding to each of the first semantic vectors output by the self-attention mechanism module; Inputting each of the second semantic vectors into the pooling layer for mean pooling to obtain target semantic vectors corresponding to each of the knowledge units; the target semantic vector is a global semantic vector representation.
3. The multi-source knowledge fusion method based on semantic computing according to claim 2, wherein The step of inputting each of the first semantic vectors into the self-attention mechanism module to obtain second semantic vectors corresponding to each of the first semantic vectors output by the self-attention mechanism module includes: Multiplying each of the first semantic vectors by a query matrix, a key matrix, and a value matrix respectively to generate a query vector, a key vector, and a value vector corresponding to each of the first semantic vectors; Determining the attention score of each of the first semantic vectors through the inner product of the query vector and the key vector corresponding to each of the first semantic vectors; Using the Soft-max function to normalize the attention scores of each of the first semantic vectors to obtain the attention weights of each of the first semantic vectors; Performing weighted summation of the attention weights of each of the first semantic vectors and the value vectors to obtain each of the second semantic vectors.
4. The multi-source knowledge fusion method based on semantic computing according to claim 1, wherein The step of determining the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units includes: Determining the cosine similarity between each of the target semantic vectors and the Euclidean distance between each of the target semantic vectors; the cosine similarity characterizes the direction between two vectors, and the Euclidean distance characterizes the distance between two vectors; By using a first preset weight coefficient and a second preset weight coefficient, weighted normalization is performed on the cosine similarity and the Euclidean distance between the target semantic vectors, to obtain the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the sum of the first preset weight coefficient and the second preset weight coefficient is 1.
5. The multi-source knowledge fusion method based on semantic computing according to claim 1, characterized in that Determining the confidence evaluation values of each of the knowledge units based on the confidence evaluation model includes: Constructing a multi-dimensional feature matrix including source information, evidence materials, literature records, logic, expert opinions, public evaluations, time factors, space factors, and association information; Generating an index parameter weight matrix by comparing two-by-two indexes, and performing normalization processing on the index parameter weight matrix to obtain the weight values of each index parameter; Based on the weight values of each index parameter and the multi-dimensional feature matrix, performing weighted summation on the multi-dimensional features to generate the confidence evaluation values of each of the knowledge units.
6. The multi-source knowledge fusion method based on semantic computing according to claim 1, wherein Generating a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation values of each of the knowledge units includes: Determining redundant knowledge pairs and contradictory knowledge pairs in each of the knowledge units according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; Generating the fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs.
7. The multi-source knowledge fusion method based on semantic computing according to claim 6, wherein Determining redundant knowledge pairs and contradictory knowledge pairs in each of the knowledge units according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units includes: If the comprehensive similarity between the target semantic vectors corresponding to any two knowledge units in each of the knowledge units is greater than or equal to a preset redundancy threshold, marking the any two knowledge units as the redundant knowledge pairs; If the any two knowledge units are contradictory and the comprehensive similarity between the target semantic vectors corresponding to the any two knowledge units is lower than the preset redundancy threshold, marking the any two knowledge units as the contradictory knowledge pairs; Generating the fused knowledge base based on the confidence evaluation values of the redundant knowledge pairs and the contradictory knowledge pairs includes: Retaining the knowledge unit with a larger confidence evaluation value in the redundant knowledge pairs, and performing weighted fusion according to the confidence evaluation values of the contradictory knowledge pairs to generate new knowledge units; Determining the fused knowledge base based on each of the knowledge units with larger confidence evaluation values and each of the new knowledge units.
8. The multi-source knowledge fusion method based on semantic computing according to any one of claims 1-7, characterized in that The method further includes: Quantifying the performance of the fusion result by accuracy, recall rate, and F1 value; Wherein, the accuracy rate is the ratio of the number of correctly fused knowledge pairs to the total number of fused pairs, the recall rate is the ratio of the number of correctly fused knowledge pairs to the total number of pairs to be fused, and the F1 value is the harmonic mean of the accuracy rate and the recall rate.
9. A multi-source knowledge fusion device based on semantic computing, characterized in that, Including: A preprocessing module, configured to preprocess multi-source data to generate multiple structured data in a unified format, and extract the knowledge units corresponding to each of the structured data in the unified format from each of the structured data; A fusion module, configured to input each of the knowledge units into a target word vector model to obtain a target semantic vector corresponding to each of the knowledge units; Determine the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units; the comprehensive similarity is determined based on a normalized weighted value of cosine similarity and Euclidean distance; Based on a confidence evaluation model, determine the confidence evaluation value of each of the knowledge units; the confidence evaluation value of each of the knowledge units is used to characterize the reliability of each of the knowledge units; Generate a fused knowledge base according to the comprehensive similarity between the target semantic vectors corresponding to each of the knowledge units and the confidence evaluation value of each of the knowledge units.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the multi-source knowledge fusion method based on semantic calculation according to any one of claims 1 to 8.
Citation Information
Patent Citations
Clustering method and device based on comprehensive similarity
CN114118310A
Information data fusion method and device
CN114860822A
Knowledge graph confidence evaluation method and device, electronic equipment and medium
CN115757837A
Drug repositioning method and system fusing multi-source knowledge graph
WO2024138803A1
Cited By
Multi-source heterogeneous data management method for generative artificial intelligence model
CN120910053A
Multi-source heterogeneous data governance method for generating artificial intelligence model
CN120910053B
Method and system for automatically generating video based on multi-agent unstructured knowledge
CN121418636A
Method and system for automatically generating a video based on unstructured knowledge using multi-agent
CN121418636B