A multi-source heterogeneous data semantic similarity calculation method
By using a semantic similarity estimation method for multi-source heterogeneous data, the problems of adaptability and measurement accuracy in multi-source heterogeneous data processing are solved. This method achieves efficient semantic similarity measurement across data types, improves measurement accuracy and computational efficiency, and adapts to the dynamic changes in complex multi-source heterogeneous data scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN SHUCHUANG FUTURE TECH CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-10
Smart Images

Figure CN122364952A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multi-source heterogeneous data processing and semantic analysis technology, specifically involving a method for calculating the semantic similarity of multi-source heterogeneous data. Background Technology
[0002] Multi-source heterogeneous data includes various types such as text, images, audio, structured data, and semi-structured data. Semantic similarity measurement aims to uncover the degree of semantic association between data from different sources and in different formats, and is widely used in scenarios such as data fusion, intelligent retrieval, and knowledge graph construction. Current mainstream semantic similarity measurement technologies can be divided into two main categories based on data type adaptability: single-type data measurement algorithms and cross-type data measurement algorithms.
[0003] Among them, text data semantic similarity measurement algorithms are the most mature, and can be divided into traditional statistical methods and deep learning-based methods. Traditional statistical methods are represented by TF-IDF, cosine similarity, etc., which are simple to implement and have high computational efficiency, but can only capture the surface statistical features of words and cannot explore deep semantic associations. They are also weak in handling synonyms and polysemous words. Deep learning-based methods are based on Word2Vec and BERT models, which significantly improve the measurement accuracy, but rely on large-scale labeled corpora, have poor adaptability to domain-specific texts, and have large model parameter scale and high computational cost.
[0004] Image data semantic similarity measurement algorithms are divided into visual feature-based methods and semantic feature-based methods. Visual feature-based methods calculate similarity by extracting low-level visual features such as color, texture, and shape. They are suitable for simple image scenes, but cannot capture high-level semantic information and are easily affected by factors such as image size, rotation, and lighting. Semantic feature-based methods, represented by CNN and ViT models, can improve the measurement accuracy in complex scenes, but they suffer from high training costs and insufficient adaptability to heterogeneous image data.
[0005] Cross-type data semantic similarity measurement algorithms are a current research hotspot. The core idea is to map different types of data to a unified semantic space and then calculate the similarity. Mainstream methods include cross-modal mapping algorithms based on intermediate representations and algorithms based on heterogeneous feature fusion. However, existing cross-type measurement algorithms have problems such as large semantic mapping deviations and insufficient heterogeneous feature fusion, making it difficult to balance measurement accuracy and computational efficiency. Furthermore, they have poor type compatibility with multi-source heterogeneous data and cannot adapt to the collaborative similarity measurement of three or more types of data.
[0006] In addition, existing algorithms are mostly designed for specific scenarios or data types, lacking a general framework for calculating semantic similarity of multi-source heterogeneous data. They are insufficient in handling heterogeneous data formats, sources, and semantics, and are prone to semantic loss and large measurement deviations in multi-source heterogeneous data fusion scenarios. At the same time, the algorithm model parameters and feature extraction strategies are mostly fixed settings, lacking dynamic adaptive capabilities, and their performance is prone to fluctuations when switching scenarios, resulting in poor adaptability. Summary of the Invention
[0007] To address the problems mentioned in the background art, this invention provides a method for semantic similarity estimation of multi-source heterogeneous data, which solves the problems of limited adaptability of single-type algorithms, weak cross-type measurement capabilities, insufficient semantic feature extraction, imbalance between measurement accuracy and computational efficiency, poor compatibility of heterogeneous data, and insufficient dynamic adaptive capabilities in the existing technology.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] A method for semantic similarity estimation of multi-source heterogeneous data includes the following steps:
[0010] A1: Heterogeneous data preprocessing; The input multi-source heterogeneous data is sequentially processed with format standardization, noise filtering, and data cleaning to obtain effective data;
[0011] A2: Dynamic type recognition and strategy matching; extract the format features, content features and structural features of effective data to construct type recognition vectors, determine the data type based on the matching degree between the type recognition vectors and the type template library, and dynamically match the corresponding heterogeneous semantic feature extraction strategy according to the determination result;
[0012] A3: Heterogeneous semantic feature extraction; According to the matching heterogeneous semantic feature extraction strategy, surface features and deep semantic features are extracted for the corresponding types of data respectively. After fusion and dimensionality reduction, semantic feature vectors of the corresponding types are generated.
[0013] A4: Feature optimization and fusion; For each type of semantic feature vector generated, feature redundancy removal, heterogeneous feature weighted fusion and feature dimension alignment are performed sequentially to obtain heterogeneous semantic feature vectors with unified dimensions;
[0014] A5: Construction of a unified semantic space; A bilinear mapping model is used to map heterogeneous semantic feature vectors with unified dimensions to a unified semantic space. Through dynamic space optimization, parameter iterative optimization and space calibration, a unified semantic vector of the data to be measured is obtained.
[0015] A6: Multi-dimensional semantic similarity measurement and result optimization; Based on the unified semantic vector of the data to be measured, perform multi-dimensional weighted fusion semantic similarity measurement, and after adaptive correction and outlier processing of the measurement results, output the final semantic similarity result.
[0016] Preferably, in A2, a vector similarity algorithm is used to calculate the matching degree between the type identification vector and the template vectors of each type. If the matching degree reaches a preset matching threshold, it is determined to be the corresponding data type; if multiple types match, it is marked as a composite type; based on the data type identification results, a strategy mapping table is constructed to match the corresponding feature extraction strategy:
[0017] Improved BERT feature extraction strategy for text data matching, lightweight CNN feature extraction strategy for image data matching, MFCC+CNN feature extraction strategy for audio data matching, regularized feature extraction strategy for structured / semi-structured data matching, and multi-strategy fusion feature extraction logic for composite data matching.
[0018] Preferably, for the extraction of heterogeneous semantic features from text data, an improved BERT model is adopted, specifically including: reducing the number of Transformer encoder layers in the BERT model to 6 layers and setting the hidden layer dimension to 512;
[0019] A 256-dimensional surface feature vector of text data is extracted based on a term frequency-inverse document frequency statistical algorithm. A 512-dimensional deep semantic feature vector of text data is extracted using an improved BERT model. The surface feature vector and the deep semantic feature vector are concatenated and then subjected to dimensionality reduction to generate the text semantic feature vector.
[0020] Preferably, for image data, a lightweight CNN model combined with visual semantic mapping is used to extract low-level visual features and high-level semantic features respectively. After semantic mapping optimization and normalization, an image semantic feature vector of a preset dimension is generated. For audio data, an acoustic feature extraction combined with a lightweight CNN is used to extract acoustic features and semantic features. After smoothing and normalization, an audio semantic feature vector of a preset dimension is generated. For structured / semi-structured data, a regular extraction combined with semantic mapping is used to extract field features and semantic association features. After concatenation and dimensionality reduction, a structured / semi-structured data semantic feature vector of a preset dimension is generated.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] 1. Breaking through the limitations of single-type algorithm adaptability, this invention possesses excellent cross-type measurement capabilities: Through dynamic type recognition and strategy matching mechanisms, it is compatible with multiple types of data such as text, images, audio, structured data, and semi-structured data, and supports collaborative semantic similarity measurement of three or more types of data; by constructing a unified semantic space through a bilinear mapping model, it effectively reduces the semantic mapping deviation of different types of data and significantly improves the accuracy of cross-type data similarity measurement.
[0023] 2. This invention achieves joint extraction of surface features and deep semantic features, fully exploring the deep semantic relationships of data: It designs differentiated feature extraction strategies for different types of data, simultaneously extracting surface statistical features and high-level semantic features of the data, effectively solving the problem of one-sided semantic expression in traditional algorithms; at the same time, it combines feature optimization and fusion mechanisms to reduce data noise interference and improve the robustness of feature extraction and the completeness of semantic feature expression.
[0024] 3. Effectively balances measurement accuracy and computational efficiency, adapting to large-scale, multi-source, heterogeneous data scenarios: This invention significantly reduces model computation costs and inference time by simplifying the deep learning model structure, using a lightweight streaming preprocessing architecture, and optimizing feature redundancy removal; at the same time, it ensures the accuracy of similarity measurement through a multi-dimensional weighted fusion measurement mechanism, solving the pain point of the imbalance between accuracy and efficiency in existing algorithms.
[0025] 4. Excellent heterogeneous data compatibility and algorithm robustness: This invention designs a targeted processing mechanism for the multi-dimensional heterogeneous characteristics of multi-source heterogeneous data in terms of format, source, and semantics. It achieves unified semantic extraction of data in different formats through format standardization, balances the semantic weights of data from different sources through dynamic weight allocation, and resolves semantic conflicts through semantic space calibration, effectively reducing similarity measurement deviation and improving algorithm robustness.
[0026] 5. Possesses dynamic adaptive capability and strong scene adaptability: The model parameters, feature extraction strategies, and weight coefficients of this invention can be dynamically adjusted according to data type, source, and scene requirements. When the data distribution changes or the scene switches, the parameters can be adaptively optimized without the need for repeated manual adjustments or retraining of the model. It can adapt to the dynamic measurement needs of complex multi-source heterogeneous data scenarios. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the process of this application. Detailed Implementation
[0028] To facilitate understanding of the technical content of this invention by those skilled in the art, the invention will be further described in detail below with reference to the accompanying drawings and specific examples. It should be understood that the specific examples described herein are merely illustrative and not intended to limit the scope of the invention.
[0029] A method for semantic similarity estimation of multi-source heterogeneous data, such as Figure 1 As shown, it includes the following steps:
[0030] Step 1: Heterogeneous data preprocessing;
[0031] This step employs a lightweight streaming architecture, adapting to the chunked processing of multi-source heterogeneous data, avoiding memory pressure caused by loading the full data. The following three operations are executed sequentially to obtain standardized and valid data:
[0032] The format standardization algorithm incorporates built-in automatic data type recognition sub-logic. Based on data file headers, format identifiers, and content features, it achieves accurate identification of text, images, audio, structured, and semi-structured data, with an accuracy rate of ≥99%. It performs corresponding standardization processing for different data types.
[0033] Text data is uniformly converted to UTF-8 encoding to eliminate encoding redundancy;
[0034] Image data is uniformly scaled to 224×224 pixels and converted to RGB format to eliminate size and channel differences;
[0035] The audio data has a uniform sampling rate of 16kHz and a quantization bit depth of 16 bits, and mono features are extracted.
[0036] Structured data is converted into a "key-value pair + fixed delimiter" format, and semi-structured data (XML / JSON) is parsed into a standardized key-value structure, unifying the data organization format.
[0037] The noise filtering operation employs differentiated filtering rules based on the noise characteristics of different data types:
[0038] Text data is filtered for invalid control characters, consecutive null values (≥3), and meaningless stop words (based on a general stop word list + a dynamically expanded list).
[0039] Image data was filtered using a Gaussian filtering algorithm (3×3 kernel size, standard deviation σ=0.8) to remove salt-and-pepper noise and Gaussian noise;
[0040] The audio data is filtered using the Wiener filtering algorithm to remove background noise while retaining effective audio features;
[0041] Structured / semi-structured data is filtered for null fields and outliers (based on the 3σ principle, |x-μ|>3σ is considered an anomaly) to ensure data validity.
[0042] The data cleaning algorithm combines rule-based cleaning with adaptive cleaning.
[0043] For structured data, correct data format errors based on field constraint rules;
[0044] For text data, we perform word segmentation, part-of-speech tagging, and synonym replacement (based on the CNKI thesaurus extended version) to unify semantic expression;
[0045] For multi-source data, a rolling hash algorithm (base value b=911382629, modulus m=2^32-1) is used to remove duplicate data, while marking the data source and quality level to provide a basis for subsequent feature extraction and weight allocation.
[0046] Step 2: Dynamic type identification and strategy matching;
[0047] Dynamic type recognition: The algorithm has a built-in lightweight type recognition model that extracts the format features, content features, and structural features of the preprocessed data to construct a 128-dimensional type recognition vector. The cosine similarity is used to calculate the matching degree between the type recognition vector and the template vector of each type. If the matching degree is ≥0.8, it is determined to be the corresponding type. If there are multiple type matches (such as images with text annotations), they are marked as composite types, and the multi-strategy fusion feature extraction logic is called.
[0048] Dynamic matching of strategies: The algorithm dynamically matches feature extraction strategies and parameters based on the recognition results and constructs a strategy mapping table. The core mapping rules are as follows: text data is matched with improved BERT feature extraction strategies, image data is matched with lightweight CNN feature extraction strategies, audio data is matched with MFCC+CNN feature extraction strategies, structured / semi-structured data is matched with regularized feature extraction strategies, and composite data is matched with multi-strategy fusion feature extraction logic.
[0049] Step 3: Extraction of heterogeneous semantic features;
[0050] This step designs differentiated feature extraction sub-algorithms for different types of data, simultaneously fusing surface features and deep semantic features to ensure the completeness and accuracy of feature representation. The specific implementations of each sub-algorithm are as follows:
[0051] Semantic feature extraction from text data employs an improved BERT model, optimizing the model structure to reduce computational complexity. Specific implementation details are as follows:
[0052] Model structure optimization: The number of Transformer layers in the BERT model is reduced, retaining 6 Transformer encoder layers (the original base model has 12 layers), and the hidden layer dimension is set to 512, reducing the parameter size by more than 30%, while retaining the bidirectional semantic capture capability.
[0053] Surface feature extraction: Based on the TF-IDF algorithm, text keyword features are extracted. The word frequency threshold Tf=0.001 and the inverse document frequency threshold Tidf=2.0 are set to select core keywords and construct a 256-dimensional surface feature vector.
[0054] Deep semantic feature extraction: The preprocessed text is input into the improved BERT model to obtain the sentence vectors and word vectors of the text. The vectors are then weighted and fused through an attention mechanism (keyword weight coefficient is 0.6, and ordinary word weight is 0.4) to generate a 512-dimensional deep semantic feature vector.
[0055] Feature fusion: The surface feature vector is concatenated with the deep semantic feature vector, and the dimensionality is reduced to 512 dimensions through PCA to eliminate feature redundancy and generate the final text semantic feature vector.
[0056] Image data semantic feature extraction employs a lightweight CNN model (MobileNetV3-small) combined with visual semantic mapping, specifically implemented as follows:
[0057] Low-level visual feature extraction: The color, texture, and shape features of the image are extracted through the first 8 convolutional layers of the MobileNetV3-small model to generate a 1024-dimensional low-level feature vector.
[0058] High-level semantic feature extraction: The model's last four convolutional layers and global average pooling layers are used to extract high-level semantic features of the image, generating a 512-dimensional high-level semantic feature vector. Attention mechanism is also introduced to strengthen the feature weights of key regions.
[0059] Semantic mapping optimization: Based on a pre-trained image semantic dictionary, high-level feature vectors are mapped to standardized semantic space vectors, correcting the deviation between visual features and semantic expressions and improving the accuracy of semantic features.
[0060] Feature normalization: The L2 normalization algorithm is used to normalize the feature vectors so that the vector magnitude is 1, eliminating scale differences and generating the final 512-dimensional image semantic feature vector.
[0061] Semantic feature extraction from audio data employs a combination of MFCC features and a lightweight CNN, specifically implemented as follows:
[0062] Acoustic feature extraction: Perform short-time Fourier transform on the standardized audio data (frame length 25ms, frame shift 10ms) to extract 24-dimensional MFCC features, 1-dimensional fundamental frequency features and 1-dimensional energy features, and construct a 26-dimensional acoustic feature vector sequence.
[0063] Semantic feature extraction: The acoustic feature vector sequence is input into a 3-layer lightweight CNN model to extract the semantic features of the audio and generate a 512-dimensional audio semantic feature vector. At the same time, the feature expression of key audio segments is enhanced through a temporal attention mechanism.
[0064] Feature optimization: The mean filtering algorithm is used to smooth the feature vector and eliminate noise interference. Then, L2 normalization is applied to generate the final 512-dimensional audio semantic feature vector.
[0065] Semantic feature extraction from structured / semi-structured data employs a combination of rule-based extraction and semantic mapping, specifically implemented as follows:
[0066] Field feature extraction: For the standardized key-value pair data, extract three major features: field name, field type, and field value. Normalize the numerical fields (map to the [0,1] interval) and use one-hot encoding for categorical fields to construct a 256-dimensional field feature vector.
[0067] Semantic association extraction: Based on the domain knowledge graph, we mine the semantic associations between fields, calculate the semantic similarity of fields, and generate a 128-dimensional semantic association feature vector.
[0068] Feature fusion: The field feature vector is concatenated with the semantic association feature vector, and the dimensionality is reduced to 512 dimensions through PCA to generate the final structured / semi-structured data semantic feature vector.
[0069] Step 4: Feature optimization and fusion;
[0070] Feature redundancy removal: The mutual information entropy algorithm is used to calculate the mutual information value between features in each dimension. The mutual information threshold Tm=0.7 is set to remove redundant features with mutual information values higher than the threshold, retain the core effective features, and reduce the computational complexity.
[0071] Heterogeneous feature weighted fusion: Based on the quality level and type importance of the data source, feature weights are dynamically allocated. The higher the quality level of the data source, the larger the weight coefficient (weight range 0.6~0.9). At the same time, the feature weights of each type of data are adjusted according to the needs of the scenario. The default weight coefficient of text and structured data is 0.8, and the default weight coefficient of image and audio data is 0.7. Composite data types are fused with the feature weights of each type proportionally.
[0072] Feature Dimension Alignment: A linear mapping algorithm is used to uniformly map the semantic feature vectors of all types of data to a 512-dimensional space, ensuring consistent feature dimensions and laying the foundation for the subsequent construction of a unified semantic space.
[0073] Step 5: Construction of a unified semantic space;
[0074] This step constructs a unified semantic space adapted to multi-source heterogeneous data through dynamic semantic mapping and spatial optimization, achieving accurate semantic alignment of heterogeneous data. Specifically, the implementation is as follows:
[0075] Semantic mapping model construction: A bilinear mapping model is used to map aligned multi-type feature vectors to a unified semantic space. The mapping formula is as follows:
[0076] ;
[0077] Wherein, X is a 512×1 column vector, representing the semantic feature vector of the input heterogeneous data. After feature optimization and dimension alignment, all types of data are 512-dimensional and are output by the feature extraction stage; W is a 512×512 matrix, representing the first-order linear mapping matrix, responsible for feature recombination and weight allocation within the dimension of the input features. The algorithm is dynamically optimized and initially a random orthogonal matrix; V is a 512×512 matrix, representing the second-order linear mapping matrix, which works with W to achieve bilinear interaction and strengthen the semantic association of heterogeneous features. The algorithm is dynamically optimized and initially a random orthogonal matrix; b is a 512×1 column vector, representing the bias vector, which compensates for the feature offset after bilinear mapping and avoids overfitting of the mapping result. The algorithm is dynamically optimized and initially a vector of all zeros; Y is a 512×1 column vector, representing the output unified semantic space vector. All heterogeneous data are mapped to vectors of the same dimension and semantic scale through this formula, which is the core carrier of the unified semantic space.
[0078] Dynamic space optimization: Based on the data distribution characteristics, the semantic space parameters are dynamically adjusted. An adaptive learning rate is used to optimize the mapping matrix and bias vector. The initial learning rate is 0.001, which decays with the number of iterations, with a decay coefficient of 0.95. The goal is to minimize the semantic mapping error for different types of data. The objective function is:
[0079] ;
[0080] Where Loss is a scalar representing the mapping error loss value; the smaller the value, the better the mapping effect and the smaller the semantic bias; n is a positive integer representing the number of heterogeneous data types participating in the mapping, which changes dynamically with the input data type; m is a positive integer representing the number of samples in each class of data, which changes dynamically with the amount of input data; Y i Y is a 512×1 column vector representing the unified semantic vector of the i-th data type, generated by the bilinear mapping formula; j This is a 512×1 column vector, representing the unified semantic vector of the j-th data type, and is related to Y. i Data of different types but semantically similar; As a scalar, representing Y i With Y j The squared Euclidean distance reflects the mapping deviation between two semantically related data sets; the smaller the value, the smaller the deviation. λ is a positive decimal representing the regularization coefficient, fixed at 0.0001, used to balance minimizing mapping error with controlling model complexity and avoiding overfitting. i It is a 512×1 column vector, representing the i-th column vector of the mapping matrix W; ||W i ||2 is a scalar, representing W i The L2 norm is calculated as follows:
[0081] The value reflects the complexity of the W matrix; the smaller the value, the simpler the matrix.
[0082] Parameter Iterative Optimization: The gradient descent method is used to iteratively update the mapping parameters W, V, and b. The partial derivatives of the loss function Loss with respect to W, V, and b are calculated. The parameter values are adjusted along the gradient descent direction until the Loss value converges. The convergence condition is that the change in Loss over 100 consecutive iterations is less than 10^-6. At this point, the optimal mapping parameters are obtained.
[0083] Spatial calibration: A domain semantic benchmark library is introduced to calibrate the constructed unified semantic space. Known semantically homologous data pairs in the domain are substituted into the optimal mapping model to verify the semantic alignment effect. If there is a deviation, the mapping parameters are fine-tuned to correct the semantic deviation and ensure that the semantic distance of different types of data in the space can accurately reflect the actual similarity.
[0084] Step 6: Multi-dimensional semantic similarity calculation and result optimization;
[0085] Multi-dimensional semantic similarity measurement employs a multi-dimensional weighted fusion approach to calculate semantic similarity, avoiding the limitations of single-dimensional measurement. Specific implementation details are as follows:
[0086] Basic similarity calculation: The basic similarity S1 between uniform semantic vectors is calculated using the cosine similarity algorithm. The formula is as follows:
[0087] ;
[0088] Among them, Y a With Y b These are the unified semantic vectors of the data to be measured.
[0089] Semantic relevance calculation: Based on knowledge graph and semantic dictionary, the semantic relevance S2 between the data to be tested is calculated, taking into account semantic relationships such as synonyms and hyponyms. The semantic relevance weight is dynamically allocated according to the relationship type (synonyms 0.9, hyponyms 0.7, related words 0.5).
[0090] Feature contribution calculation: Calculate the contribution S3 of each dimension feature to the similarity. Use the entropy weight method to determine the feature weight. The higher the contribution, the greater the impact on the similarity result.
[0091] Weighted fusion: S1, S2, and S3 are weighted and fused according to weight coefficients (S1: 0.5; S2: 0.3; S3: 0.2) to obtain the final semantic similarity S. The formula is as follows:
[0092] ;
[0093] The similarity value ranges from [0,1], with the closer to 1 indicating a higher semantic similarity.
[0094] Step 7: Result Optimization and Output;
[0095] Result Correction: An adaptive correction algorithm is adopted, which dynamically adjusts the similarity weight coefficient based on historical measurement data and actual annotation results to correct measurement deviations and ensure the accuracy of the results. The correction formula is as follows:
[0096] ;
[0097] Among them, S true The actual labeled similarity is represented by α, which is a correction coefficient (0.1~0.3, dynamically adjusted).
[0098] Outlier handling: Set a similarity outlier threshold (below 0.1 or above 0.95), review the outlier results, and if the outlier is caused by data noise, re-execute feature extraction and calculation; if it is a true semantic association, retain the result and mark it.
[0099] Output results: The system outputs standardized similarity results, while also providing auxiliary information such as feature contribution analysis and semantic association paths. It supports result visualization and can be adapted to the needs of different application scenarios.
[0100] If step 2 fails, a general cross-modal feature extraction strategy is adopted to output a 512-dimensional standardized semantic feature vector, which is adapted to subsequent steps in the entire process. Specifically:
[0101] First, a general standardization preprocessing is performed on the heterogeneous data that failed to be identified, eliminating format differences and extracting common metadata features. Then, a lightweight, general-purpose cross-modal backbone network adapted to the original architecture is used to simultaneously extract low-level statistical and high-level general semantic features. Next, dimensionality reduction and L2 normalization are performed on the initial features, outputting standardized semantic feature vectors with consistent dimensions. Finally, default weights adapted to the entire process are configured for the features, and samples are labeled for iterative optimization of the type recognition model.
[0102] Those skilled in the art should understand that the above embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Any reasonable modifications, equivalent substitutions, or adaptive improvements made based on the technical concepts disclosed in this invention without departing from the essential spirit of the invention should be considered to fall within the scope of protection defined by the claims of this invention.
Claims
1. A method for semantic similarity estimation of multi-source heterogeneous data, characterized in that, Includes the following steps: A1: Heterogeneous data preprocessing; The input multi-source heterogeneous data is sequentially processed with format standardization, noise filtering, and data cleaning to obtain effective data; A2: Dynamic type recognition and strategy matching; extract the format features, content features and structural features of effective data to construct type recognition vectors, determine the data type based on the matching degree between the type recognition vectors and the type template library, and dynamically match the corresponding heterogeneous semantic feature extraction strategy according to the determination result; A3: Heterogeneous semantic feature extraction; According to the matching heterogeneous semantic feature extraction strategy, surface features and deep semantic features are extracted for the corresponding types of data respectively. After fusion and dimensionality reduction, semantic feature vectors of the corresponding types are generated. A4: Feature optimization and fusion; For each type of semantic feature vector generated, feature redundancy removal, heterogeneous feature weighted fusion and feature dimension alignment are performed sequentially to obtain heterogeneous semantic feature vectors with unified dimensions; A5: Construction of a unified semantic space; A bilinear mapping model is used to map heterogeneous semantic feature vectors with unified dimensions to a unified semantic space. Through dynamic space optimization, parameter iterative optimization and space calibration, a unified semantic vector of the data to be measured is obtained. A6: Multi-dimensional semantic similarity measurement and result optimization; Based on the unified semantic vector of the data to be measured, a multi-dimensional weighted fusion semantic similarity measurement is performed. After adaptive correction and outlier handling of the measurement results, the final semantic similarity result is output.
2. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 1, characterized in that, A1's heterogeneous data preprocessing employs a lightweight streaming architecture, specifically including: Format standardization operation: Based on the file header and format identifier of the input data, preliminary type identification is performed. The preliminary types include text, image, audio, structured and semi-structured data. According to the preliminary type, the corresponding encoding, size, sampling rate and data organization form of the input data are standardized and converted. Noise filtering operation: Different filtering rules are adopted according to the noise characteristics of different initial types of input data, and corresponding noise removal processing is performed on text, image, audio, structured and semi-structured data respectively; Data cleaning operations: A combination of rule-based cleaning and adaptive cleaning is used to correct data format errors, unify semantic expression, remove duplicate data, and mark the data source and quality level.
3. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 2, characterized in that, In A2, a vector similarity algorithm is used to calculate the matching degree between the type identification vector and the template vectors of each type. If the matching degree reaches a preset matching threshold, it is determined to be the corresponding data type; if multiple types match, it is marked as a composite type; based on the data type identification results, a strategy mapping table is constructed to match the corresponding feature extraction strategy. Improved BERT feature extraction strategy for text data matching, lightweight CNN feature extraction strategy for image data matching, MFCC+CNN feature extraction strategy for audio data matching, regularized feature extraction strategy for structured / semi-structured data matching, and multi-strategy fusion feature extraction logic for composite data matching.
4. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 3, characterized in that, For heterogeneous semantic feature extraction of text data, an improved BERT model is adopted, specifically including: reducing the number of Transformer encoder layers in the BERT model to 6 layers and setting the hidden layer dimension to 512; A 256-dimensional surface feature vector of text data is extracted based on a term frequency-inverse document frequency statistical algorithm. A 512-dimensional deep semantic feature vector of text data is extracted using an improved BERT model. The surface feature vector and the deep semantic feature vector are concatenated and then subjected to dimensionality reduction to generate the text semantic feature vector.
5. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 4, characterized in that, For image data, a lightweight CNN model combined with visual semantic mapping is used to extract low-level visual features and high-level semantic features respectively. After semantic mapping optimization and normalization, an image semantic feature vector of a preset dimension is generated. For audio data, an acoustic feature extraction combined with a lightweight CNN is used to extract acoustic features and semantic features. After smoothing and normalization, an audio semantic feature vector of a preset dimension is generated. For structured / semi-structured data, a regular extraction combined with semantic mapping is used to extract field features and semantic association features. After concatenation and dimensionality reduction, a structured / semi-structured data semantic feature vector of a preset dimension is generated.
6. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 5, characterized in that, A4 feature optimization and fusion specifically include: Feature redundancy removal: The mutual information entropy algorithm is used to calculate the mutual information value between each semantic feature vector, a preset mutual information threshold is set, and redundant features with mutual information values higher than the threshold are removed. Heterogeneous feature weighted fusion: Based on the quality level and type importance of the data source of semantic feature vectors, feature weights are dynamically allocated for weighted fusion. The higher the quality level of the data source, the larger the weight coefficient. The weight values are within a preset weight range. Feature Dimension Alignment: A linear mapping algorithm is used to uniformly map all semantic feature vectors to a feature space of a preset dimension, resulting in heterogeneous semantic feature vectors with unified dimensions.
7. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 6, characterized in that, In A5, the mapping formula for the bilinear mapping model is: ; Where X is a column vector, W is the first-order linear mapping matrix matching X, V is the second-order linear mapping matrix matching the dimension of X, b is the bias vector matching the dimension of the output vector Y, W, V, and b are all dynamically optimized according to data characteristics and mapping requirements, and Y is a column vector of a preset dimension, representing the unified semantic space vector of the output.
8. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 7, characterized in that, In A5, dynamic space optimization uses an adaptive learning rate to optimize the mapping parameters, with the following formula as the objective function: ; Where Loss is the mapping error loss value, n is the number of heterogeneous data types participating in the mapping, m is the number of samples in each class of data, and Y i Y is the unified semantic space vector of the i-th type of data. j To be with Y i The unified semantic space vector of semantically homologous j-th class data, where λ is a preset regularization coefficient, and W i Let ||W| be the i-th column vector of the mapping matrix W. i ||2 is W i The L2 norm; The gradient descent method is used to iteratively update the mapping parameters W, V, and b until the loss value reaches the preset convergence condition. A domain semantic benchmark library is introduced to calibrate the constructed unified semantic space.
9. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 8, characterized in that, In A6, multi-dimensional semantic similarity measurement specifically includes: The cosine similarity algorithm is used to calculate the basic similarity S1 between vectors in the unified semantic space; based on the knowledge graph and semantic dictionary, the semantic association S2 between the data to be tested is calculated, and the corresponding weights are dynamically assigned according to the semantic relationship type; the entropy weight method is used to determine the weights of each dimension of features and calculate the feature contribution S3. S1, S2, and S3 are weighted and fused according to a preset weight coefficient to obtain an initial semantic similarity S, wherein the value range of the semantic similarity S is [0,1].
10. The method for semantic similarity estimation of multi-source heterogeneous data according to claim 9, characterized in that, In A6, the optimization of the results specifically includes: using an adaptive correction algorithm to correct the initial semantic similarity S, with the correction formula as follows: ; Among them, S true The actual labeled similarity is given by α, which is a correction factor. Set a preset similarity anomaly threshold range, review the calculation results outside the anomaly threshold range, process the results based on the review results, and output the final semantic similarity result and supporting auxiliary information.