Syntactic enhancement-based multi-dimensional vectorized text similarity calculation method

By combining word segmentation, syntax analysis, WoBERT model, Transformer self-attention mechanism and deep integration transformer in text similarity calculation, the problem of poor computing efficiency and accuracy in the prior art is solved, and more efficient and accurate text similarity calculation is achieved.

CN119918526AActive Publication Date: 2025-05-02XIANGJIANG LAB

Patent Information

Application Number
CN202510416311.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-05-02
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

The prior art has poor computational efficiency and accuracy in text similarity calculation, making it difficult to effectively combine syntactic analysis and semantic features of word vectors.

Method used

A multi-dimensional vectorized text similarity calculation method based on syntax enhancement is used to generate component labels through word segmentation and syntax analysis, and vectorized representation is combined with the WoBERT model and Transformer's self-attention mechanism, and dimensionality reduction is performed through a deep integration transformer, and the similarity is finally calculated by the asimil similarity formula and the weighted average method.

Benefits of technology

The accuracy and calculation efficiency of text processing are improved, the word vector representation is optimized, and the semantic similarity between words is accurately calculated, thereby improving the accuracy and efficiency of similarity calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918526A_ABST
    Figure CN119918526A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multidimensional vectorized text similarity calculation method based on syntactic enhancement, which belongs to the technical field of data processing, and specifically comprises the following steps: step 1, carrying out word segmentation and syntactic analysis on an input text to obtain a word segmentation result and a corresponding component tag; step 2, performing vectorization representation and fusion on word segmentation results by adopting a WoBERT model and a self-attention mechanism of Transform respectively to obtain a fusion vector; 3, dimension reduction processing is conducted on the fusion vector through a deep integration converter, and a target word vector with the high expression ability is generated; step 4, for the target word vectors of the same component labels, calculating a similarity value through a seme similarity formula; and step 5, based on all similarity values, adjusting a final similarity score through weighted average. According to the scheme, a text similarity matching method based on syntax and word vector combination is introduced, and the accuracy and efficiency of similarity calculation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a multi-dimensional vectorized text similarity calculation method based on syntax enhancement. Background Art

[0002] At present, in the field of natural language processing (NLP), text similarity calculation is an important task for understanding and processing text data. With the rapid development of the Internet and social media, the magnitude and complexity of text data are increasing, and the traditional similarity calculation method based on word frequency can no longer meet the requirements of accuracy and efficiency. In recent years, the application of word vector models (such as Word2Vec, GloVe, etc.) and deep learning technology has enabled semantic-based text similarity calculation to be realized, which can capture the semantic relationship between words by mapping vocabulary to high-dimensional space. However, relying solely on word vectors may ignore the syntactic structure and contextual information of the text, thereby limiting the accuracy of similarity calculation. Syntactic analysis, as an important direction of text processing, reveals the grammatical relationship between words and provides rich contextual information, but traditional syntactic analysis methods often cannot effectively combine the semantic features of word vectors. Therefore, how to combine syntactic analysis with word vectors, make full use of the advantages of both, and improve the accuracy of text similarity calculation has become an important topic of current research.

[0003] It can be seen that there is an urgent need for a multi-dimensional vectorized text similarity calculation method based on syntactic enhancement that can improve computational efficiency and accuracy. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a multi-dimensional vectorized text similarity calculation method based on syntax enhancement, which at least partially solves the problems of poor calculation efficiency and accuracy in the prior art.

[0005] The embodiment of the present invention provides a method for calculating multi-dimensional vectorized text similarity based on syntax enhancement, comprising: Step 1: Perform word segmentation and syntactic analysis on the input text to obtain the word segmentation results and their corresponding component labels; Step 2: Use the WoBERT model and Transformer’s self-attention mechanism to vectorize and fuse the word segmentation results to obtain a fused vector. Step 3: Reduce the dimension of the fused vector through the deep integration transformer to generate a target word vector with strong expressive ability; Step 4: For the target word vectors with the same component label, calculate the similarity value using the semantic similarity formula; Step 5: Based on all similarity values, adjust the final similarity score by weighted average.

[0006] According to a specific implementation of the embodiment of the present invention, step 1 includes: Step 1.1: Use the Jieba model to segment the input text, split the sentences in the input text into independent words, and generate segmentation results; Step 1.2: Input all the word segmentation results into the conditional random field model to obtain the component label corresponding to each word segmentation result.

[0007] According to a specific implementation of the embodiment of the present invention, before step 1.2, the method further includes: Use the Jieba model to segment the sample text, split the sentences in the sample text into independent words, generate the segmentation results and form a word list based on them. Suppose the input sentence is S and the segmentation result is ; Use the pre-trained model to perform part-of-speech tagging on the words in the word list W, and output the corresponding part-of-speech tags to form a part-of-speech list based on them , wherein the part-of-speech tags include nouns, verbs, and adjectives; Constructing a corresponding feature set for each word segmentation result, wherein the feature set includes the word segmentation result, part of speech, context words, word length, and whether it is the first or last word; The part-of-speech list indicates the component label corresponding to each word in the word list to form a component label set; The conditional random field model is trained using the feature set and component label set. The relationship between words and their components is learned by maximizing the conditional probability, and the model parameters are optimized to obtain a trained conditional random field model.

[0008] According to a specific implementation of the embodiment of the present invention, step 2 specifically includes: Step 2.1, use the WoBERT model to extract the initial word vector corresponding to each word segmentation result; Step 2.2, use the Transformer's self-attention mechanism to generate a dynamic word vector corresponding to each word segmentation result; Step 2.3, fuse the initial word vector and the dynamic word vector to obtain a fused vector.

[0009] According to a specific implementation of the embodiment of the present invention, step 3 specifically includes: Step 3.1, use the forward-looking layer to perform preliminary processing on the fusion vector through the deep neural network architecture, perform linear transformation and nonlinear activation on the fusion vector through multiple neurons, and generate the output feature vector H Among them, H is the output feature vector of the forward-looking layer, represents the fusion vector, is the weight matrix, is the bias vector, is the activation function; Step 3.2, introduce an integrated learning strategy, learn and predict the feature vector H through multiple sub-models of the autoencoder, integrate the outputs of different sub-models through an aggregation function, and obtain an aggregate vector, wherein the integrated learning strategy includes random forest and gradient boosting, and the expression of the aggregate vector is in, is the output of different models, Aggregate is the aggregation function, Indicates the number of word segmentation results; Step 3.3: Refine the aggregated vector to obtain a reduced dimension vector in, represents the weight matrix used for linear transformation, represents the bias vector used for linear transformation; Step 3.4: Combine the context information and dynamically adjust the dimensionality reduction vector to obtain the target word vector in, represents a function that nonlinearly maps the reduced-dimensional vector based on context information, Represents the context feature vector extracted from the input text.

[0010] According to a specific implementation of the embodiment of the present invention, step 3.2 further includes: Sparse coding constraints are introduced to construct the loss function, and the outputs of multiple sub-models of the autoencoder are controlled by minimizing the loss function.

[0011] According to a specific implementation of the embodiment of the present invention, step 4 specifically includes: Assume that the target word vectors of two identical component labels are and , the similarity value between them is calculated by the semantic similarity formula, where the semantic similarity formula is Among them, the molecule Represents the sum of the conceptual similarities of the two target word vectors, that is, their conceptual inner product, the denominator It represents the product of the norms of the two target word vectors, which is used to normalize the inner product value so that the similarity is between 0 and 1. k is the dimension of the target word vector.

[0012] According to a specific implementation of the embodiment of the present invention, step 5 specifically includes: Step 5.1, let all similarity values ​​be , where n is the number of words; Step 5.2: Assign corresponding weights to different component labels based on their importance or grammatical structure. ; Step 5.3: Similarity of all ingredient labels , these similarities are summarized by weighted geometric mean to obtain the overall sentence similarity for: .

[0013] The multi-dimensional vectorized text similarity calculation scheme based on syntax enhancement in the embodiment of the present invention includes: step 1, performing word segmentation and syntax analysis on the input text to obtain the word segmentation result and its corresponding component label; step 2, respectively using the WoBERT model and the self-attention mechanism of Transformer to vectorize and fuse the word segmentation result to obtain a fusion vector; step 3, performing dimensionality reduction processing on the fusion vector through a deep integrated transformer to generate a target word vector with strong expression ability; step 4, for the target word vector with the same component label, calculating the similarity value through the semantic similarity formula; step 5, based on all similarity values, adjusting the final similarity score through weighted average.

[0014] The beneficial effects of the embodiments of the present invention are as follows: through the scheme of the present invention, word segmentation, syntactic analysis and WoBERT model, Transformer self-attention mechanism are combined, a text similarity matching method based on syntax and word vector is introduced, the accuracy of text processing is improved, and the deep integrated transformer is used for dimensionality reduction processing to optimize the word vector representation. At the same time, the semantic similarity between words is accurately calculated through the semantic similarity formula and weighted average method, thereby improving the accuracy and efficiency of similarity calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1A flowchart of a method for calculating multi-dimensional vectorized text similarity based on syntax enhancement is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0018] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0019] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present invention, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.

[0020] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention. The drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0021] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0022] An embodiment of the present invention provides a multi-dimensional vectorized text similarity calculation method based on syntax enhancement, which can be applied to the text similarity calculation process in a natural language processing scenario.

[0023] See also Figure 1 , is a flow chart of a method for calculating multi-dimensional vectorized text similarity based on syntax enhancement provided by an embodiment of the present invention. Figure 1 As shown, the method mainly comprises the following steps: Step 1: Perform word segmentation and syntactic analysis on the input text to obtain the word segmentation results and their corresponding component labels; Furthermore, the step 1 comprises: Step 1.1: Use the Jieba model to segment the input text, split the sentences in the input text into independent words, and generate segmentation results; Step 1.2: Input all the word segmentation results into the conditional random field model to obtain the component label corresponding to each word segmentation result.

[0024] Optionally, before step 1.2, the method further includes: Use the Jieba model to segment the sample text, split the sentences in the sample text into independent words, generate the segmentation results and form a word list based on them. Suppose the input sentence is S and the segmentation result is ; Use the pre-trained model to perform part-of-speech tagging on the words in the word list W, and output the corresponding part-of-speech tags to form a part-of-speech list based on them , wherein the part-of-speech tags include nouns, verbs, and adjectives; Constructing a corresponding feature set for each word segmentation result, wherein the feature set includes the word segmentation result, part of speech, context words, word length, and whether it is the first or last word; The part-of-speech list indicates the component label corresponding to each word in the word list to form a component label set; The conditional random field model is trained using the feature set and component label set. The relationship between words and their components is learned by maximizing the conditional probability, and the model parameters are optimized to obtain a trained conditional random field model.

[0025] In the specific implementation, in the field of natural language processing, in order to enhance syntactic relations, the input text is regarded as data, and specific word segmentation and syntactic analysis are performed on each text to extract sentence component information. The following is the specific process of sentence segmentation and component extraction: Step 1.1: Use the Jieba model to segment the input sentence. The segmentation process splits the sentence into independent words and generates a word list. Let the input sentence be S and the segmentation result be ; Step 1.2: Use the pre-trained model (HanLP) to perform part-of-speech tagging on the words in the word list and output the corresponding part-of-speech tags, such as noun, verb, adjective, etc. Perform part-of-speech tagging on the word list W and output the part-of-speech list ; Step 1.3: Use the conditional random field (CRF) model to perform sentence component analysis. In this process, first build a feature set for each word. The features may include the word itself, part of speech, context words (such as previous and next words), word length, and whether it is the first and last word. These features will help the model understand the role of each word in the sentence. Next, prepare a labeled training dataset, where the label corresponding to each word indicates its component in the sentence (such as subject, predicate, object, etc.). These labels will be used to train the CRF model. During the model training stage, the prepared feature set and labels are input into the CRF model for training. CRF learns the relationship between words and their components by maximizing conditional probability and optimizes the model parameters. For each word Constructing feature vectors , which can be expressed as: in, Indicates the number of characters in the current word. An indication of whether it is a boundary word; Assume that the label set is, the model maximizes the conditional probability To train: in, is the normalization factor, is the characteristic function, It is a sentence component; Step 1.4: Use the trained model to predict the components of the newly input sentence. The model will analyze the new sentence based on the previously constructed feature set and predict the component label of each word. After word segmentation and feature extraction, the model outputs the predicted component label Y. This step enhances syntactic analysis.

[0026] Step 2: Use the WoBERT model and Transformer’s self-attention mechanism to vectorize and fuse the word segmentation results to obtain a fused vector. Based on the above embodiment, step 2 specifically includes: Step 2.1, use the WoBERT model to extract the initial word vector corresponding to each word segmentation result; Step 2.2, use the Transformer's self-attention mechanism to generate a dynamic word vector corresponding to each word segmentation result; Step 2.3, fuse the initial word vector and the dynamic word vector to obtain a fused vector.

[0027] In the specific implementation, each word in the word list decomposed in step 1 is represented by a vector using the self-attention mechanism of WoBERT and Transformer to reduce the deviation of semantic capture. The process of representing words by these two vectors is as follows: Step 2.1: Use the WoBERT model to perform word-level segmentation and extract word-level vector representations, focusing on processing word semantics in Chinese. WoBERT is optimized for the word-level characteristics of Chinese, and can effectively capture the contextual connections between words and generate word vectors. : Step 2.2: Use Transformer-XL to capture long-distance dependencies and dynamically adjust word vectors so that they can be dynamically updated according to changes in context. : Finally, these two vector representations are output: .

[0028] Step 3: Reduce the dimension of the fused vector through the deep integration transformer to generate a target word vector with strong expressive ability; Based on the above embodiment, step 3 specifically includes: Step 3.1, use the forward-looking layer to perform preliminary processing on the fusion vector through the deep neural network architecture, perform linear transformation and nonlinear activation on the fusion vector through multiple neurons, and generate the output feature vector H Among them, H is the output feature vector of the forward-looking layer, represents the fusion vector, is the weight matrix, is the bias vector, is the activation function; Step 3.2, introduce an integrated learning strategy, learn and predict the feature vector H through multiple sub-models of the autoencoder, integrate the outputs of different sub-models through an aggregation function, and obtain an aggregate vector, wherein the integrated learning strategy includes random forest and gradient boosting, and the expression of the aggregate vector is in, is the output of different models, Aggregate is the aggregation function, Indicates the number of word segmentation results; Step 3.3: Refine the aggregated vector to obtain a reduced dimension vector in, represents the weight matrix used for linear transformation, represents the bias vector used for linear transformation; Step 3.4: Combine the context information and dynamically adjust the dimensionality reduction vector to obtain the target word vector in, represents a function that nonlinearly maps the reduced-dimensional vector based on context information, Represents the context feature vector extracted from the input text.

[0029] Furthermore, the step 3.2 also includes: Sparse coding constraints are introduced to construct the loss function, and the outputs of multiple sub-models of the autoencoder are controlled by minimizing the loss function.

[0030] In the specific implementation, the high-dimensional vector E generated in step 2 is used to reduce the dimension of high-dimensional features using deep integrated transformers (DETs). The specific steps are as follows: Step 3.1: Use the forward-thinking layer to perform preliminary processing on the input features through the deep neural network architecture, extract key features and learn complex relationships in high-dimensional space. At this point, the input features are linearly transformed and nonlinearly activated (using the Leaky ReLU activation function) through multiple neurons to generate the output feature vector H: Among them, H is the output feature vector of the forward-looking layer, is the weight matrix, is the bias vector, is the activation function (Leaky ReLU); Step 3.2: Introduce ensemble learning strategies, including random forest and gradient boosting, to learn and predict features through multiple models, thereby enhancing the robustness of feature representation. The outputs of different models are integrated through aggregation functions: in, is the output of different models, Aggregate is the aggregation function; Step 3.3: Further refine the processed feature vector to generate dimensionality reduction features with strong expressive power: in, Represents the weight matrix used for linear transformation. Its function is to aggregate vectors Linear mapping is performed to compress the information in the high-dimensional space into the low-dimensional space, thereby achieving dimensionality reduction. Each weight value in the matrix is ​​optimized to retain the meaningful information in the aggregate vector to the greatest extent while reducing the redundancy and noise of the data. Represents the bias vector used for linear transformation. It introduces an offset mechanism in the dimensionality reduction process, making the mapped vector more expressive and better adapted to specific task requirements. The bias value can help the model adjust the output more flexibly; Step 3.4: Introduce sparse coding constraints in the loss function of the autoencoder to promote the model to generate more interpretable feature representations, thereby improving the sparsity and generalization ability of the features. Here, L is the total loss, including the reconstruction loss and the weight W of the sparsity regularization. Feature generation is optimized by minimizing this loss function: Where L is the total loss, is the reconstruction loss, is the weight of sparsity regularization, W is the model weight; Step 3.5: Combined with the context information, dynamically adjust the feature vector after dimensionality reduction so that the final feature representation can adapt to different application scenarios: .

[0031] Step 4: For the target word vectors with the same component label, calculate the similarity value using the semantic similarity formula; Based on the above embodiment, step 4 specifically includes: Assume that the target word vectors of two identical component labels are and , the similarity value between them is calculated by the semantic similarity formula, where the semantic similarity formula is Among them, the molecule Represents the sum of the conceptual similarities of the two target word vectors, that is, their conceptual inner product, the denominator It represents the product of the norms of the two target word vectors, which is used to normalize the inner product value so that the similarity is between 0 and 1. k is the dimension of the target word vector.

[0032] In the specific implementation, for the word vectors generated in step 3, the similarity of the word vectors of the same Y in the two sentences is calculated. If a certain Y only appears in one sentence and not in the other sentence, it is directly removed. Suppose the word vectors of the two identical Ys are and ; Step 4.1: For the vector and , define their similarity is the similarity value calculated by semantic similarity, and the similarity formula is: molecular Represents the sum of the conceptual similarities of two vectors, that is, their conceptual inner product. Represents the norm product of two vectors, which is used to normalize the inner product value so that the similarity is between 0 and 1; Step 4.2: Two Vectors and The inner product of is defined as: Where k is the dimension of the vector; Step 4.3: Define the norm of the vector and define the vector The norm of is the square root of its own inner product, that is: Similarly, define the vector The norm of for: The design idea of ​​this formula is based on the cosine similarity of vectors, ensuring that the similarity score is between 0 and 1. The closer the value is to 1, the more similar the two vectors are.

[0033] Step 5: Based on all similarity values, adjust the final similarity score by weighted average.

[0034] Based on the above embodiment, step 5 specifically includes: Step 5.1, let all similarity values ​​be , where n is the number of words; Step 5.2: Assign corresponding weights to different component labels based on their importance or grammatical structure. ; Step 5.3: Similarity of all ingredient labels , these similarities are summarized by weighted geometric mean to obtain the overall sentence similarity for: .

[0035] In the specific implementation, the similarity calculation values ​​of the word vectors of the same components are obtained from step 4, and these similarity values ​​are , where n is the number of words; Step 5.1: Assign weights to different components Y according to their importance or grammatical structure. Weight of each component Determined by its role in the sentence.

[0036] Step 5.2: Similarity of all components , these similarities are summarized by weighted geometric mean, and the overall sentence similarity is for: The geometric mean method can organically integrate the similarities of each component and effectively reduce the interference of the extreme similarity of a single component on the overall result. This method makes the overall similarity of the sentence more robust and avoids the adverse effects of local outliers on the final calculation results.

[0037] The multi-dimensional vectorized text similarity calculation method based on syntax enhancement provided in this embodiment introduces a text similarity matching method based on the combination of syntax and word vectors by combining word segmentation, syntactic analysis, and the Transformer self-attention mechanism, thereby improving the accuracy of text processing, using a deep integrated transformer for dimensionality reduction processing, and optimizing the word vector representation. At the same time, through the semantic similarity formula and the weighted average method, the semantic similarity between words is accurately calculated, thereby improving the accuracy and efficiency of similarity calculation.

[0038] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof.

[0039] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A multi-dimensional vectorized text similarity calculation method based on syntax enhancement, characterized in that: include: Step 1: Perform word segmentation and syntactic analysis on the input text to obtain the word segmentation results and their corresponding component labels; Step 2: Use the WoBERT model and Transformer’s self-attention mechanism to vectorize and fuse the word segmentation results to obtain a fused vector. Step 3: Reduce the dimension of the fused vector through the deep integration transformer to generate a target word vector with strong expressive ability; Step 4: For the target word vectors with the same component label, calculate the similarity value using the semantic similarity formula; Step 5: Based on all similarity values, adjust the final similarity score by weighted average.

2. The method according to claim 1, characterized in that The step 1 comprises: Step 1.1: Use the Jieba model to segment the input text, split the sentences in the input text into independent words, and generate segmentation results; Step 1.2: Input all the word segmentation results into the conditional random field model to obtain the component label corresponding to each word segmentation result.

3. The method according to claim 2, characterized in that Before step 1.2, the method further comprises: Use the Jieba model to segment the sample text, split the sentences in the sample text into independent words, generate the segmentation results and form a word list based on them. Suppose the input sentence is S and the segmentation result is ; Use the pre-trained model to perform part-of-speech tagging on the words in the word list W, and output the corresponding part-of-speech tags to form a part-of-speech list based on them , wherein the part-of-speech tags include nouns, verbs, and adjectives; Constructing a corresponding feature set for each word segmentation result, wherein the feature set includes the word segmentation result, part of speech, context words, word length, and whether it is the first or last word; The part-of-speech list indicates the component label corresponding to each word in the word list to form a component label set; The conditional random field model is trained using the feature set and component label set. The relationship between words and their components is learned by maximizing the conditional probability, and the model parameters are optimized to obtain a trained conditional random field model.

4. The method according to claim 3, characterized in that The step 2 specifically includes: Step 2.1, use the WoBERT model to extract the initial word vector corresponding to each word segmentation result; Step 2.2, use the Transformer's self-attention mechanism to generate a dynamic word vector corresponding to each word segmentation result; Step 2.3, fuse the initial word vector and the dynamic word vector to obtain a fused vector.

5. The method according to claim 4, characterized in that The step 3 specifically includes: Step 3.1, use the forward-looking layer to perform preliminary processing on the fusion vector through the deep neural network architecture, perform linear transformation and nonlinear activation on the fusion vector through multiple neurons, and generate the output feature vector H Among them, H is the output feature vector of the forward-looking layer, represents the fusion vector, is the weight matrix, is the bias vector, is the activation function; Step 3.2, introduce an integrated learning strategy, learn and predict the feature vector H through multiple sub-models of the autoencoder, integrate the outputs of different sub-models through an aggregation function, and obtain an aggregate vector, wherein the integrated learning strategy includes random forest and gradient boosting, and the expression of the aggregate vector is in, is the output of different models, Aggregate is the aggregation function, Indicates the number of word segmentation results; Step 3.3: Refine the aggregated vector to obtain a reduced dimension vector in, represents the weight matrix used for linear transformation, represents the bias vector used for linear transformation; Step 3.4: Combine the context information and dynamically adjust the dimensionality reduction vector to obtain the target word vector in, represents a function that nonlinearly maps the dimension-reduced vector based on context information, Represents the context feature vector extracted from the input text.

6. The method according to claim 5, characterized in that The step 3.2 also includes: Sparse coding constraints are introduced to construct the loss function, and the outputs of multiple sub-models of the autoencoder are controlled by minimizing the loss function.

7. The method according to claim 6, characterized in that The step 4 specifically includes: Assume that the target word vectors of two identical component labels are and , the similarity value between them is calculated by the semantic similarity formula, where the semantic similarity formula is Among them, the molecule Represents the sum of the conceptual similarities of the two target word vectors, that is, their conceptual inner product, the denominator It represents the product of the norms of the two target word vectors, which is used to normalize the inner product value so that the similarity is between 0 and 1. k is the dimension of the target word vector.

8. The method according to claim 7, characterized in that The step 5 specifically includes: Step 5.1, let all similarity values ​​be , where n is the number of words; Step 5.2: Assign corresponding weights to different component labels based on their importance or grammatical structure. ; Step 5.3: Similarity of all ingredient labels , these similarities are summarized by weighted geometric mean to obtain the overall sentence similarity for: 。

Citation Information

Patent Citations

  • Text similarity calculation method and device, computer equipment and computer storage medium

    CN110287312A

  • Chinese natural language processing tool system based on machine learning and deep learning

    CN110705296A

  • Automatic abstracting method and device based on XLNet

    CN111666764A

  • Short text similarity calculation method based on deep learning and topic model

    CN114897078A

  • Long text multi-label classification model optimization method and device

    CN116361686A

Cited By

  • Vehicle space-time trajectory similarity calculation method and device based on semantic information

    CN120123787A

  • Text-to-three-dimensional generation architecture optimization method and system based on hierarchical feature fusion

    CN121580331A

  • Text-to-three-dimensional generation architecture optimization method and system based on hierarchical feature fusion

    CN121580331B