Emotion metaphor recognition method and device based on knowledge extraction and co-evolution reasoning

Through the method based on knowledge extraction and collaborative evolution reasoning, the problems of insufficient recognition accuracy and low feature extraction efficiency in emotional metaphor recognition are solved, and the accurate identification of emotional metaphors and accurate annotation of emotional categories are achieved, providing more efficient and more accurate technical support.

CN120011864AActive Publication Date: 2025-05-16HUAQIAO UNIVERSITY

Patent Information

Application Number
CN202510480934.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-05-16
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

The prior art has problems in emotional metaphor recognition that lacks recognition accuracy, low feature extraction efficiency, and difficulty in dealing with noise and redundant information in large-scale text data.

Method used

Using a method based on knowledge extraction and collaborative evolution reasoning, we can construct emotional metaphor corpus, perform feature vector processing, use fuzzy multi-grained knowledge extraction technology to extract multi-grained knowledge, construct emotional metaphor order parameters and input them into competitive networks for dynamic evolution processing, and finally achieve accurate recognition of emotional metaphor.

Benefits of technology

It significantly improves the accuracy and robustness of emotional metaphor recognition, effectively removes noise and redundant features, improves the efficiency and accuracy of feature selection, and provides more comprehensive and accurate technical support for sentiment analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011864A_ABST
    Figure CN120011864A_ABST
Patent Text Reader

Abstract

The invention provides an emotion metaphor recognition method and device based on knowledge extraction and co-evolution reasoning, and relates to the technical field of natural language processing.The method comprises the steps that a high-quality emotion metaphor corpus is constructed, and advanced feature vectorization technology is combined to conduct deep processing on text data; key features are accurately extracted by using a fuzzy multi-granularity knowledge extraction technology, and an optimized feature subset is formed, so that redundant information is effectively removed, and the accuracy of feature selection is improved; furthermore, dynamic recognition and labeling of the emotion metaphor are achieved through a matching network and a co-evolution reasoning mechanism, and metaphor labels and emotion categories can be output at the same time. The method aims at solving the problems that in the prior art, emotion metaphor recognition precision is insufficient, the reasoning ability is limited, and noise and redundant information in large-scale text data are difficult to process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and device for identifying emotional metaphors based on knowledge extraction and co-evolutionary reasoning. Background Art

[0002] In today's digital age, natural language processing (NLP), as a key field of artificial intelligence, is constantly developing and widely used in multiple scenarios such as information extraction, sentiment analysis, and intelligent customer service. Sentiment analysis, as an important branch, aims to identify and understand emotional tendencies from texts, and has extremely high application value in business decision-making, public opinion monitoring, and social governance. However, emotional expression is not always direct and explicit. Metaphor, as a complex and common linguistic phenomenon, is often used to convey emotional information. Emotional metaphors enhance the expressiveness of language by connecting abstract emotions with concrete things or concepts, but they also bring huge challenges to automatic recognition.

[0003] The recognition of emotional metaphors requires not only understanding the literal meaning of the text, but also digging deep into the implicit meaning and emotional color behind it. This complexity stems from the polysemy, cultural dependence, and context sensitivity of metaphors. For example, the same metaphor may express different emotions in different contexts, and may even be misunderstood due to cultural differences. In addition, with the rise of social media and online platforms, a large amount of text data is mixed with a lot of noise and redundant information, which further interferes with the accurate recognition of emotional metaphors.

[0004] Traditional natural language processing methods often rely on rules or simple statistical models when dealing with emotional metaphors, but these methods are difficult to cope with complex and changeable metaphorical expressions and semantic diversity. In recent years, although deep learning technology has made significant progress in feature extraction and pattern recognition, it still has limitations when dealing with emotional metaphors. On the one hand, deep learning models usually require a large amount of labeled data to train, and the labeling of emotional metaphors is time-consuming and complex; on the other hand, these models lack simulation of human cognitive processes and are difficult to effectively handle the dynamic and multi-granular characteristics of metaphors.

[0005] In addition, the recognition of emotional metaphors faces challenges in multiple dimensions. For example, the semantics of emotional metaphors may span multiple levels of granularity, from word meaning to sentence structure to text context, and each level may contain key information. However, existing technologies still have shortcomings in multi-granularity feature fusion and collaborative reasoning, making it difficult to fully utilize knowledge of different granularities to improve recognition accuracy. At the same time, noise and redundant information in large-scale text data will also interfere with the training and reasoning process of the model, resulting in low recognition efficiency and insufficient accuracy.

[0006] Therefore, the current field of emotional metaphor recognition urgently needs a new method that can effectively process multi-granular features, simulate the dynamics of cognitive processes, and have efficient noise filtering capabilities. This method should be able to accurately identify emotional metaphors in complex contexts and output metaphor labels and emotional categories at the same time, providing more comprehensive and accurate technical support for sentiment analysis.

[0007] In view of this, this application is filed. Summary of the invention

[0008] The present invention provides a method and device for identifying emotional metaphors based on knowledge extraction and co-evolutionary reasoning, which can at least partially improve the above-mentioned problems.

[0009] To achieve the above object, the present invention adopts the following technical solutions: A method for identifying emotional metaphors based on knowledge extraction and co-evolutionary reasoning, comprising: According to the preset public corpus data, an emotional metaphor corpus is constructed, a training corpus set and a test corpus are obtained from the emotional metaphor corpus, and feature vectorization is performed on the training corpus and the test corpus to obtain feature vectors; Based on the fuzzy multi-granularity knowledge extraction technology, the feature vector is extracted and processed to extract the multi-granularity knowledge, and the prototype pattern vector and the test pattern vector are obtained; The prototype pattern vector and the test pattern vector are constructed and processed by using a matching network to construct and generate an emotional metaphor order parameter; Inputting the emotion metaphor order parameter into the competition network, performing dynamic evolution processing, obtaining the emotion metaphor annotation mode, and obtaining the evolution result based on the emotion metaphor annotation mode; The evolution results are annotated to obtain an annotation result, and metaphor labels and emotion categories in the text are identified based on the annotation result to obtain an emotion metaphor recognition result.

[0010] The present invention also provides an emotional metaphor recognition device based on knowledge extraction and co-evolutionary reasoning, which comprises: A corpus processing unit is used to construct an emotional metaphor corpus based on preset public corpus data, divide the emotional metaphor corpus into a training corpus set and a test corpus set, and perform feature vectorization processing on the training corpus set and the test corpus set to obtain a feature vector; A knowledge extraction unit, used to extract the feature vector based on fuzzy multi-granularity knowledge extraction technology, extract multi-granularity knowledge, and obtain a prototype pattern vector and a test pattern vector; A matching network unit, used for constructing and processing the prototype pattern vector and the test pattern vector by using a matching network to construct and generate an emotional metaphor order parameter; An evolutionary reasoning unit, used for inputting the emotion metaphor order parameter into a competition network, performing dynamic evolution processing, obtaining an emotion metaphor annotation mode, and obtaining an evolution result based on the emotion metaphor annotation mode; The annotation recognition unit is used to annotate the evolution results to obtain annotation results, and to recognize metaphor labels and emotion categories in the text according to the annotation results to obtain emotion metaphor recognition results.

[0011] In summary, the emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning aims to solve the problems of insufficient accuracy in emotional metaphor recognition, low efficiency in feature extraction, and difficulty in processing noise and redundant information in large-scale text data in the existing technology. The core is to perform word embedding processing on text data, convert it into vector representation and combine it into a matrix; through fuzzy multi-granularity knowledge extraction technology, based on granular ball calculation and purity threshold screening, a list of granular balls that meet the conditions is constructed, and the importance of candidate features is evaluated using variable precision fuzzy dependency functions, and finally an optimized feature reduction matrix is ​​generated. This process effectively removes noise and redundant features, retains key features with strong identification capabilities, and significantly improves the efficiency and accuracy of feature selection.

[0012] Furthermore, the prototype pattern vector and the test pattern vector are separated from the feature reduction matrix, and the numerical matrices of the training set and the test set are constructed respectively. The emotional metaphor order parameter is constructed through the matching network and input into the competition network for dynamic evolution. This dynamic evolution mechanism can effectively identify the annotation pattern of emotional metaphor, and output the metaphor label and emotional category in parallel through the annotation results, and finally realize the accurate identification of emotional metaphor. This method combines fuzzy multi-granularity knowledge extraction with co-evolutionary reasoning, which not only improves the accuracy and robustness of emotional metaphor recognition, but also provides an efficient technical solution for emotional metaphor analysis. Its innovative technical path can effectively cope with the complexity in high-dimensional text data, solve the limitations of traditional methods in processing large-scale text data, and provide more accurate and efficient solutions for emotional metaphor related fields, which has important academic and application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flowchart of the method for identifying emotional metaphors based on knowledge extraction and co-evolutionary reasoning provided by the first embodiment of the present invention; Figure 2 It is a flowchart of the emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning provided by the first embodiment of the present invention; Figure 3 It is a flow chart of the fuzzy multi-granularity knowledge extraction part of the emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning provided by the first embodiment of the present invention; Figure 4is a schematic diagram of emotion metaphor recognition of the emotion metaphor recognition method based on knowledge extraction and co-evolutionary reasoning provided by the first embodiment of the present invention; Figure 5 It is a schematic diagram of the principle structure of the emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning provided by the first embodiment of the present invention; Figure 6 It is a module diagram of an emotional metaphor recognition device based on knowledge extraction and co-evolutionary reasoning provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0014] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0015] In the prior art, there are problems that the accuracy and efficiency of emotion metaphor recognition are affected by the noise and redundant information contained in high-dimensional text data; when processing large-scale text data, it is difficult to effectively deal with the recognition accuracy problems caused by semantic ambiguity and context interference; when facing multi-level semantic features, traditional recognition models have limited system performance due to the single knowledge representation and lack of dynamic evolution capabilities; when dealing with complex emotion metaphor expressions, the multi-granularity understanding of the knowledge structure is insufficient, thus affecting the accuracy and efficiency of recognition. Based on this, the present invention provides an innovative solution to solve the technical problems faced by the prior art when processing large-scale emotion metaphor texts, such as insufficient recognition accuracy and limited reasoning ability. Specifically: refer to Figure 1 , Figure 2 , Figure 5 As shown, the first embodiment of the present invention discloses a method for identifying emotional metaphors based on knowledge extraction and co-evolutionary reasoning, which can be executed by an emotional metaphor identification device based on knowledge extraction and co-evolutionary reasoning (hereinafter referred to as identification device), and in particular, executed by one or more processors in the identification device to implement the following method: S1, constructing an emotional metaphor corpus based on preset public corpus data, dividing the emotional metaphor corpus into a training corpus and a test corpus, and performing feature vectorization processing on the training corpus and the test corpus to obtain a feature vector; Specifically, step S1 includes: obtaining text data from preset public corpus data, and annotating each text data to construct an emotional metaphor corpus, wherein the annotation processing includes whether there is a metaphor annotation and an emotional category annotation; The emotional metaphor corpus is partitioned to obtain a training corpus set and a test corpus set, and text preprocessing is performed on the training corpus set and the test corpus set. Among them, the text preprocessing includes word segmentation and stop word removal. Multiple linguistic features are extracted from the preprocessed training corpus set and test corpus set. The linguistic features include: word meaning, semantic role, emotion, and phonology. Based on the linguistic features, a feature dictionary is constructed, and each linguistic feature is mapped to an ID. Each sentence is represented as a feature vector, where each dimension corresponds to a feature ID in the feature dictionary.

[0016] Preferably, the emotional category annotation includes joy, goodness, anger, sorrow, fear, disgust, and surprise.

[0017] In this embodiment, to obtain rich text data from the preset publicly available corpus data, these text data can cover various types, such as novels, dramas, lyrics, microblog comments, and other text types rich in emotional colors. They mainly come from the Internet, corpus, and book data documents to ensure the diversity and representativeness of the corpus. After obtaining the text data, meticulous annotation processing is performed on each text data to construct an emotional metaphor corpus. The annotation processing includes metaphor presence / absence annotation and emotional category annotation. The emotional categories can include joy, goodness, anger, sorrow, fear, disgust, surprise, etc. Through manual annotation, the accuracy and reliability of the annotation are ensured. Simply put, after obtaining the text data, screening is carried out. For example: about 10,000 texts are collected in the first round, and about 2,000 texts remain after screening. Manual annotation is performed on each piece of data: metaphor label (metaphor - 0 / no metaphor - 1), emotional category (joy - 1 / goodness - 2 / anger - 3 / sorrow - 4 / fear - 5 / disgust - 6 / surprise - 7), to construct an emotional metaphor corpus.

[0018] Next, the constructed emotional metaphor corpus is partitioned to obtain a training corpus set and a test corpus set. The partitioning ratio can be set according to actual needs. For example, a common ratio is 80% for the training set and 20% for the test set. Then, text preprocessing is performed on the training corpus set and the test corpus set. The text preprocessing includes word segmentation and stop word removal. Word segmentation is to split the text data into individual words for subsequent feature extraction and analysis. Stop word removal is to remove common meaningless stop words in the text, such as "de", "shi", "zai", etc., to reduce the interference of noise information on the recognition result and improve the accuracy and efficiency of emotional metaphor recognition.

[0019] After completing the text preprocessing, multiple linguistic features are extracted from the preprocessed training corpus and test corpus. These linguistic features include word meaning, semantic role, emotion, and phonology. Word meaning features can reflect the basic meaning of words; semantic role features can reveal the semantic role of words in sentences; emotion features can reflect the emotional tendency expressed by the text; and phonological features can provide auxiliary information for the identification of emotional metaphors from the phonetic level. By extracting these multi-dimensional linguistic features, the characteristics of the text can be more comprehensively characterized, laying the foundation for the subsequent identification of emotional metaphors.

[0020] Based on the extracted linguistic features, a feature dictionary is constructed, and each linguistic feature is mapped to a unique ID. In this way, each sentence can be represented as a feature vector, where each dimension corresponds to a feature ID in the feature dictionary. In this way, the text data is converted into a numerical feature vector, which is convenient for subsequent calculation and processing. This feature vectorization processing method can not only effectively integrate multiple linguistic features, but also improve the processing efficiency and accuracy of the emotional metaphor recognition system, so that it can better cope with the processing needs of large-scale text data.

[0021] In short, in this embodiment, the training set and the test set are divided from the constructed emotional metaphor corpus, and the word segmentation component "jieba" is used to divide the text data into a sequence of several words, and the stop words are removed to obtain the final word order. Linguistic features such as word meaning, semantic role, emotion and phonology are extracted from the corpus, a feature dictionary is constructed, each feature is mapped to an ID, and each sentence is represented as a feature vector, where each dimension corresponds to a feature ID in the feature dictionary. Use row vector x i Indicates i The feature vector corresponding to the sentence, then the number of sentences is p The corpus (including p sentences, each with q features), we can use the matrix It is expressed as: .

[0022] See also Figure 3 , S2, based on the fuzzy multi-granularity knowledge extraction technology, the feature vector is extracted and processed to extract the multi-granularity knowledge to obtain the prototype pattern vector and the test pattern vector; Specifically, step S2 includes: based on the feature vector, obtaining a feature subset , and according to the purity threshold p =1.0 performs particle spherical calculation on the feature subset, and performs particle spherical calculation on the sample data set. UThe purity of each ball is judged. When the purity of the ball does not reach the purity threshold, it is divided into two sub-balls using 2-means clustering. When the purity of all balls reaches the purity threshold, a ball list is obtained. ,in, l is the total number of spheres, For the A ball, C is a feature set; Calculation Sample x The fuzzy similarity of: ,in, For the A ball, , , is the fuzzy similarity, , represents the sample data set U Samples in According to the parameters List of pellets , construct a fuzzy neighborhood in the form of a piecewise function, sample x The granular fuzzy neighborhood membership of is: ; Decision based on sample D The sample data set U Divide into r Decision Class Set , get the sample y The granular fuzzy decision membership of is: ,in, represents the cardinality of a set, For sample y The granular fuzzy neighborhood of is a fuzzy set that contains all samples x and its corresponding membership ; Based on accuracy t , get the decision set D Relative to feature subset B Variable precision fuzzy dependency function: , ,in, Decision Set D Relative to feature subset B The variable precision fuzzy positive domain of For the union, For the k Decision Class Set Relative to feature subset BThe variable precision fuzzy lower approximation of , the variable precision fuzzy dependency function represents the proportion of samples that can be accurately classified in the sample data set U under the feature subset B, which is used to quantify the classification ability of the feature subset to the decision set. The higher the value, the stronger the classification ability of the feature subset. is a fuzzy set, containing all samples x and its corresponding membership , ,in, To take the large operation, To take the smallest operation; this formula is divided into two parts. The first part is for the granular fuzzy decision membership Not exceeding precision , and calculate the corresponding and The maximum value of , and take all Sample y The minimum value of the corresponding maximum result; the second part is the granular fuzzy decision membership Exceeding precision , and calculate the corresponding and The maximum value of , and take all sample y The minimum value of the corresponding maximum result; finally, combine the two smaller results and take the minimum value; According to the variable precision importance, it is determined whether the corresponding candidate attribute can be added to the optimal feature subset. Relative to feature subset B Variable precision importance of: ,in, is a feature set With feature subset The difference of For feature subset B With candidate features The union of is a list of spheres, The parameters used to calculate the granular fuzzy neighborhood membership, t The precision parameter used to calculate the variable precision fuzzy lower approximation, is the decision set D relative to the union Variable precision fuzzy dependency function; Reduce the features to a set Initialized to an empty set, based on and feature set Each feature in , get the list of particles, and calculate the particle-ball fuzzy similarity relationship and particle-ball fuzzy neighborhood based on the particle-ball list, and get each feature The corresponding variable precision fuzzy dependency and variable precision importance; where, the feature set C=(c1, c2,…, c h ) is a collection of linguistic features obtained through feature vectorization, including word meaning, semantic role, emotion, and phonology. (s=1,2,…,h) belongs to the feature set C, where h is the total number of features in C; Filter out the features corresponding to the maximum importance , , when the maximum importance is greater than 0, the feature From the feature set Removed from the feature set and added to the feature reduction set middle; Repeat the above steps until all feature sets are checked. all the features in the feature selection process, end the feature selection process, obtain the feature selection result, generate a feature reduction matrix according to the feature selection result, and separate the prototype pattern vector and the test pattern vector from the feature reduction matrix.

[0023] In this embodiment, the matrix Each row of is considered as a sample, then the matrix All row vectors of can constitute a sample set ; The matrix Each column of is a feature of the sample, then the matrix All column vectors of can constitute the feature set of the sample ; The decision of the sample is recorded as ,in Represent the metaphor label and sentiment category of the sample respectively. The sample collection can be U Divide into r Decision Class Set For each feature , calculate the sample x and samples y The fuzzy similarity , ,in , Representation sample x In Features Then calculate the normalized value based on the feature set C The fuzzy similarity .

[0024] Specifically, in this embodiment, this step is one of the core links of the emotional metaphor recognition method. The feature vector is processed by fuzzy multi-granularity knowledge extraction technology, multi-granularity knowledge is extracted, and finally the prototype pattern vector and the test pattern vector are obtained. This process can not only effectively remove noise and redundant features, but also significantly improve the accuracy of feature selection and the model's ability to capture the internal structure of the data, providing high-quality feature representation for subsequent emotional metaphor recognition.

[0025] Specifically, a feature subset is obtained based on the text data processed by feature vectorization, and the purity threshold is set. p =1.0 performs spherical calculation on the feature subset; spherical calculation is a data grouping method that groups samples with small feature value differences in the data set into the same spherical ball. Spherical ball purity is a quantitative indicator that describes the quality of spherical balls. The higher the purity, the better the quality of the spherical ball. The goal of this process is to group the sample data set into U The sample is divided into multiple balls, and the samples in each ball have high similarity in feature values. During the division process, the purity of each ball is judged. If the purity of a ball does not reach the set purity threshold, that is, the sample feature values ​​in the ball are very different, it is divided into two sub-balls using the 2-means clustering method. This operation can further refine the balls and improve the purity and quality of the balls. When the purity of all balls reaches the purity threshold, a ball list is finally obtained, which contains l balls, and each ball corresponds to a feature set. C Then, we calculate the sample x Fuzzy similarity is an important indicator to measure the similarity between samples.

[0026] Based on the parameters and the list of spheres, a fuzzy neighborhood in the form of a piecewise function is constructed. The fuzzy neighborhood is used to describe the membership of the sample in the sphere. The introduction of the fuzzy neighborhood makes the classification of samples no longer limited to the binary judgment of "yes" and "no", but allows the existence of a "maybe" state, that is, there is a [0,1] range to describe the membership of the sample to the category. This fuzzy processing method can better adapt to the complex semantic features and contextual dependencies in emotional metaphor recognition. Furthermore, according to the decision set D , get the sample y The membership degree of granular fuzzy decision making.

[0027] Next, in order to further optimize the feature selection process, the precision t The concept of decision set D Relative to feature subset BThe variable precision fuzzy dependency function of feature subset B is used to represent the ratio of samples that can be accurately classified under feature subset B to the total samples. Therefore, the dependency function is an indicator for evaluating the ability of feature subset B to identify samples. The dependency function can be calculated to determine whether a candidate feature can be reduced. Constructing dependency functions at multiple granularity levels will enable richer classification information to be obtained. The introduction of variable precision fuzzy dependency functions enables the feature selection process to dynamically adjust the granularity parameters to obtain richer classification information. By analyzing the impact of different granularities on the feature selection results, the granularity parameters can be dynamically adjusted to more flexibly optimize the selection of feature subsets, thereby optimizing the selection of attribute subsets. This multi-granularity analysis method can not only improve the accuracy of feature selection, but also enhance the model's ability to capture the intrinsic structure of the data.

[0028] Based on the above variable precision fuzzy dependency function, the variable precision importance of the candidate feature relative to the feature subset B is calculated. According to the calculation result of the variable precision importance, it can be determined whether the corresponding candidate attribute can be added to the optimal feature subset. , Accuracy t The goal of fuzzy multi-granularity knowledge extraction is to find an optimal feature subset to maximize the fuzzy positive domain formed under this subset. As mentioned above, the result of knowledge extraction is different from the entire feature set. C The smallest feature subset with the same classification ability. When a new feature is added, the change in fuzzy dependency reflects the change in classification ability. This process achieves dynamic optimization of the feature set by quantifying the importance of features, ensuring that the final selected feature subset has the strongest classification ability and emotional metaphor recognition ability.

[0029] In the specific implementation, the parameters and precision t Set it within a certain range to obtain feature selection results of different granularity. t For each combination of , there is a step: initialize the feature reduction set to an empty set. Then, based on the parameters and each feature in the feature set, a sphere list is obtained, and the sphere fuzzy similarity relationship and sphere fuzzy neighborhood are calculated according to the sphere list, and then the variable precision fuzzy dependency and variable precision importance corresponding to each feature are obtained. Through this series of calculations, the features corresponding to the maximum importance are screened out. When it is judged that the maximum importance is greater than 0, the feature is removed from the feature set and added to the feature reduction set. This operation ensures that the feature reduction set contains only the most valuable features for emotional metaphor recognition, thereby improving the efficiency and accuracy of the model.

[0030] Repeat the above steps until all features in the feature set are checked and the feature selection process ends. Finally, the feature reduction matrix is ​​generated based on the feature selection results. , and separate the prototype pattern vector and the test pattern vector from the feature reduction matrix. The prototype pattern vector is used for the subsequent emotional metaphor recognition model training, while the test pattern vector is used for model testing and verification. Through the fuzzy multi-granularity knowledge extraction technology, this method not only effectively removes noise and redundant features, but also significantly improves the accuracy of feature selection and the model's ability to capture the intrinsic structure of the data, providing high-quality feature representation for emotional metaphor recognition, thus laying a solid foundation for achieving high-precision emotional metaphor recognition.

[0031] S3, using a matching network to construct and process the prototype pattern vector and the test pattern vector to construct and generate an emotional metaphor order parameter; Specifically, step S3 includes: using the inner product method to construct a vector reflecting the prototype pattern and the test pattern vector Similarity of emotional metaphor order parameter ,in, d Represents the number of sentences in the test set.

[0032] In this embodiment, after completing the fuzzy multi-granularity knowledge extraction in step S2, the optimized prototype pattern vector and test pattern vector have been obtained. These vectors represent the emotional metaphor pattern in the training data and the pattern to be identified in the test data, respectively. In order to further evaluate the similarity between the test pattern and the prototype pattern, a matching network is used for processing in step S3. Among them, the core idea of ​​the matching network is to calculate the similarity between the prototype pattern vector and the test pattern vector by the inner product method. The inner product method is a simple and efficient mathematical tool that can directly reflect the linear correlation between two vectors. In the specific operation, for each test pattern vector in the test set, an inner product operation is performed on it and the prototype pattern vector to obtain an emotional metaphor order parameter. This order parameter can quantitatively represent the similarity between the test pattern and the prototype pattern, and provide key information for subsequent emotional metaphor recognition.

[0033] Through the inner product operation, an emotional metaphor order parameter matrix is ​​obtained, and each element in the matrix corresponds to the similarity between a test pattern and the prototype pattern. This similarity calculation method based on the inner product method has significant beneficial effects. First, the inner product method is simple and efficient in calculation, and can quickly complete the similarity evaluation on a large-scale data set, greatly improving the operating efficiency of the emotional metaphor recognition system. Secondly, the emotional metaphor order parameter obtained by the inner product method can directly reflect the linear similarity between the test pattern and the prototype pattern, providing accurate input for the subsequent dynamic evolution process. This similarity evaluation method can not only effectively capture the semantic characteristics of emotional metaphors, but also reduce the interference of noise and redundant information to a certain extent, further improving the accuracy and robustness of emotional metaphor recognition. The emotional metaphor order parameter constructed by matching the network provides an important intermediate result for emotional metaphor recognition. This order parameter can not only efficiently quantify the similarity between the prototype pattern and the test pattern, but also provide key input for the subsequent dynamic evolution of the competitive network, thereby realizing the accurate recognition of emotional metaphors and accurate labeling of emotional categories.

[0034] See also Figure 4 , S4, inputting the emotion metaphor order parameter into the competition network, performing dynamic evolution processing, obtaining the emotion metaphor annotation mode, and obtaining the evolution result based on the emotion metaphor annotation mode; Specifically, step S4 includes: the mathematical expression of the dynamic evolution processing is: ,in, To note the parameters, is the self-excitation term, is the self-inhibition term, is the lateral inhibition term.

[0035] S5, annotating the evolution results to obtain annotated results, and identifying metaphor labels and emotion categories in the text according to the annotated results to obtain emotion metaphor recognition results.

[0036] Specifically, step S5 includes: obtaining reconstructed order parameters through dynamic evolution processing, sorting the order parameters, screening out the prototype pattern vector corresponding to the highest order parameter, and determining whether the sentence to be identified belongs to the prototype pattern, and generating a labeling result.

[0037] In this embodiment, these order parameters are input into the competition network for dynamic evolution processing. The core of this process is to simulate the evolution process of the emotional metaphor pattern through the dynamic equation, so as to obtain the emotional metaphor annotation pattern. Among them, the attention parameter is used to control the speed of the change of the pattern to be tested; the parameter combination Together they determine the recognition performance of collaborative pattern recognition. B = C =1.2, They are taken as 0.18, 0.36, 0.54 and 0.72 respectively; the self-excitation term represents the feedback excitation effect of the mode on itself; the self-inhibition term reflects the inhibition of the mode on its own excessive growth; the lateral inhibition term reflects the mutual inhibition between modes, which is equivalent to a penalty term to ensure the diversity and competitiveness of the modes during the evolution process.

[0038] Through the above dynamic evolution equation, the competitive network can dynamically adjust and optimize the input emotional metaphor order parameters, and finally obtain the reconstructed order parameters. This process can effectively process complex semantic information, capture the dynamic characteristics of emotional metaphors, and select the prototype pattern vector that best fits the emotional metaphor pattern through the evolution mechanism.

[0039] Next, the evolution results are annotated. The specific operation is to sort the reconstructed order parameters and select the prototype pattern vector corresponding to the highest order parameter. The prototype pattern vector corresponding to this highest order parameter is the emotional metaphor pattern of the sentence to be identified. Based on this pattern, it can be determined that the sentence to be identified belongs to the prototype pattern and generate an annotation result. Through this annotation result, the system can further identify the metaphor labels and emotional categories in the text, and finally obtain the emotional metaphor recognition result. This method based on dynamic evolution and annotation processing has significant beneficial effects. First, the dynamic evolution process can effectively process complex emotional metaphor patterns, and simulate the dynamic evolution characteristics in the human cognitive process through self-excitation, self-inhibition and lateral inhibition mechanisms, significantly improving the accuracy and robustness of the recognition system. Secondly, by sorting and selecting the prototype pattern vector corresponding to the highest order parameter, the system can efficiently identify the emotional metaphor pattern and annotate the metaphor label and emotional category for the text. This process can not only effectively reduce the interference of noise and redundant information, but also improve the operating efficiency of the system, enabling it to quickly and accurately process large-scale text data.

[0040] In summary, the emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning constructs an emotional metaphor corpus and performs feature vectorization processing, extracts multi-granularity knowledge using fuzzy multi-granularity knowledge extraction technology, and generates prototype pattern vectors and test pattern vectors. The emotional metaphor order parameter is further constructed through the matching network, and it is input into the competitive network for dynamic evolution processing, and finally the accurate labeling of emotional metaphors and the identification of emotional categories are achieved. Specifically, the text data is first processed by word embedding, converted into vector representation and combined into a matrix. Through the fuzzy multi-granularity knowledge extraction technology, based on granular ball calculation and purity threshold screening, a list of granular balls that meet the conditions is constructed, and the importance of candidate features is evaluated using variable precision fuzzy dependency functions to generate an optimized feature reduction matrix. This process effectively removes noise and redundant features, retains key features with strong discrimination ability, and significantly improves the efficiency and accuracy of feature selection. Subsequently, the emotional metaphor order parameter is constructed through the matching network, and the similarity between the prototype pattern vector and the test pattern vector is calculated using the inner product method. This similarity evaluation method can not only efficiently quantify the relationship between the prototype pattern and the test pattern, but also provide an important basis for subsequent dynamic evolution. Through the dynamic evolution processing of the competitive network, the emotional metaphor order parameters can be dynamically adjusted to select the prototype pattern vector that best matches the emotional metaphor pattern, and based on this, the annotation results can be generated to achieve accurate identification of metaphor labels and emotional categories.

[0041] The beneficial effect is that the fuzzy multi-granularity knowledge extraction technology can effectively remove noise and redundant features, improve the accuracy of feature selection and the model's ability to capture the intrinsic structure of the data. At the same time, the dynamic evolution processing simulates the dynamic characteristics of the human cognitive process, significantly improving the accuracy and robustness of emotional metaphor recognition. In addition, by outputting metaphor labels and emotional categories in parallel, the present invention not only improves the efficiency of emotional metaphor recognition, but also provides a more comprehensive and accurate technical solution for the field of sentiment analysis. In short, this method solves many limitations of existing technologies in emotional metaphor recognition (for example: insufficient accuracy in emotional metaphor recognition, low efficiency in feature extraction, and difficulty in processing noise and redundant information in large-scale text data) through an innovative technical path, providing more efficient and accurate technical support for emotional metaphor-related fields, and has important academic value and broad application prospects.

[0042] See also Figure 6 The second embodiment of the present invention provides an emotional metaphor recognition device based on knowledge extraction and co-evolutionary reasoning, which includes: The corpus processing unit 201 is used to construct an emotional metaphor corpus according to preset public corpus data, divide the emotional metaphor corpus into a training corpus set and a test corpus set, and perform feature vectorization processing on the training corpus set and the test corpus set to obtain feature vectors; The knowledge extraction unit 202 is used to extract the feature vector based on the fuzzy multi-granularity knowledge extraction technology, extract the multi-granularity knowledge, and obtain the prototype pattern vector and the test pattern vector; A matching network unit 203 is used to construct and process the prototype pattern vector and the test pattern vector using a matching network to construct and generate an emotional metaphor order parameter; The evolutionary reasoning unit 204 is used to input the emotion metaphor order parameter into the competition network, perform dynamic evolution processing, obtain the emotion metaphor annotation mode, and obtain the evolution result based on the emotion metaphor annotation mode; The annotation and recognition unit 205 is used to annotate the evolution results to obtain annotation results, and to recognize metaphor labels and emotion categories in the text according to the annotation results to obtain emotion metaphor recognition results.

[0043] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for identifying emotional metaphors based on knowledge extraction and co-evolutionary reasoning, characterized in that: include: According to the preset public corpus data, an emotional metaphor corpus is constructed, a training corpus set and a test corpus are obtained from the emotional metaphor corpus, and feature vectorization is performed on the training corpus and the test corpus to obtain feature vectors; Based on the fuzzy multi-granularity knowledge extraction technology, the feature vector is extracted and processed to extract the multi-granularity knowledge, and the prototype pattern vector and the test pattern vector are obtained; The prototype pattern vector and the test pattern vector are constructed and processed by using a matching network to construct and generate an emotional metaphor order parameter; Inputting the emotion metaphor order parameter into the competition network, performing dynamic evolution processing, obtaining the emotion metaphor annotation mode, and obtaining the evolution result based on the emotion metaphor annotation mode; The evolution results are annotated to obtain an annotation result, and metaphor labels and emotion categories in the text are identified based on the annotation result to obtain an emotion metaphor recognition result.

2. The emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning according to claim 1 is characterized in that: According to the preset public corpus data, an emotional metaphor corpus is constructed, a training corpus and a test corpus are obtained from the emotional metaphor corpus, and feature vectorization is performed on the training corpus and the test corpus to obtain feature vectors, specifically: Acquire text data from the preset public corpus data, and annotate each text data to construct an emotional metaphor corpus, wherein the annotation process includes annotating whether there is a metaphor and annotating emotional categories; The emotional metaphor corpus is divided into a training corpus and a test corpus, and the training corpus and the test corpus are preprocessed, wherein the text preprocessing includes word segmentation processing and stop word removal processing; Extract multiple linguistic features from the preprocessed training corpus and test corpus, including word meaning, semantic role, sentiment and phonology; Based on the linguistic features, a feature dictionary is constructed, and each linguistic feature is mapped into an ID, and each sentence is represented as a feature vector, wherein each dimension corresponds to a feature ID in the feature dictionary.

3. The emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning according to claim 2 is characterized in that: The emotion category labels include happiness, good, anger, sadness, fear, hatred, and shock.

4. The emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning according to claim 1 is characterized in that: Based on the fuzzy multi-granularity knowledge extraction technology, the feature vector is extracted and processed to extract the multi-granularity knowledge, and the prototype pattern vector and the test pattern vector are obtained, which are specifically: Based on the feature vector, a feature subset is obtained , and according to the purity threshold p =1.0 performs particle spherical calculation on the feature subset, and performs particle spherical calculation on the sample data set. U The purity of each ball is judged. When the purity of the ball does not reach the purity threshold, it is divided into two sub-balls using 2-means clustering. When the purity of all balls reaches the purity threshold, a ball list is obtained. ,in, l is the total number of spheres, For the A ball, C is a feature set; Calculation Sample x The fuzzy similarity of: ,in, For the A ball, , , is the fuzzy similarity, , represents the sample data set U Samples in According to the parameters List of pellets , construct a fuzzy neighborhood in the form of a piecewise function, sample x The granular fuzzy neighborhood membership of is: ; Decision based on sample D The sample data set U Divide into r Decision Class Set , get the sample y The granular fuzzy decision membership of is: ,in, represents the cardinality of a set, For sample y The granular fuzzy neighborhood of is a fuzzy set that contains all samples x and its corresponding membership ; Based on accuracy t , and get the decision set D Relative to feature subset B Variable precision fuzzy dependency function: , ,in, For decision set D Relative to feature subset B The variable precision fuzzy positive domain of For the union, For the k Decision Class Set Relative to feature subset B The variable precision fuzzy lower approximation of , the variable precision fuzzy dependency function represents the proportion of samples that can be accurately classified in the sample data set U under the feature subset B, which is used to quantify the classification ability of the feature subset to the decision set. The higher the value, the stronger the classification ability of the feature subset. is a fuzzy set, containing all samples x and its corresponding membership , ,in, To take the large operation, To take the smaller operation; According to the variable precision importance, it is determined whether the corresponding candidate attribute can be added to the optimal feature subset. Relative to feature subset B Variable precision importance of: ,in, is a feature set With feature subset The difference of For feature subset B With candidate features The union of is a list of spheres, The parameters used to calculate the granular fuzzy neighborhood membership, t The precision parameter used to calculate the variable precision fuzzy lower approximation, is the decision set D relative to the union Variable precision fuzzy dependency function; Reduce the features to a set Initialized to an empty set, based on and feature set Each linguistic feature in , get the ball list, and calculate the ball fuzzy similarity relationship and ball fuzzy neighborhood based on the ball list to get each linguistic feature The corresponding variable precision fuzzy dependency and variable precision importance; Filter out the features corresponding to the maximum importance , , when the maximum importance is greater than 0, the feature From the feature set Removed from the feature set and added to the feature reduction set middle; Repeat the above steps until all feature sets are checked. all the features in the feature selection process, end the feature selection process, obtain the feature selection result, generate a feature reduction matrix according to the feature selection result, and separate the prototype pattern vector and the test pattern vector from the feature reduction matrix.

5. The emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning according to claim 1 is characterized in that: The prototype pattern vector and the test pattern vector are constructed and processed by a matching network to generate an emotional metaphor order parameter, specifically: The inner product method is used to construct the vector reflecting the prototype pattern and the test pattern vector Similarity of emotional metaphor order parameter ,in, d Represents the number of sentences in the test set.

6. The emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning according to claim 1 is characterized in that: The mathematical expression of dynamic evolution processing is: ,in, To note the parameters, is the self-excitation term, is the self-inhibition term, is the lateral inhibition term.

7. The emotional metaphor recognition method based on knowledge extraction and co-evolutionary reasoning according to claim 6 is characterized in that: The evolution results are annotated to obtain the annotated results, which are as follows: The reconstructed order parameters are obtained through dynamic evolution processing, and the order parameters are sorted to screen out the prototype pattern vector corresponding to the highest order parameter, and it is determined that the sentence to be identified belongs to the prototype pattern to generate the annotation result.

8. An emotional metaphor recognition device based on knowledge extraction and co-evolutionary reasoning, characterized in that: include: A corpus processing unit is used to construct an emotional metaphor corpus based on preset public corpus data, divide the emotional metaphor corpus into a training corpus set and a test corpus set, and perform feature vectorization processing on the training corpus set and the test corpus set to obtain a feature vector; A knowledge extraction unit, used to extract the feature vector based on fuzzy multi-granularity knowledge extraction technology, extract multi-granularity knowledge, and obtain a prototype pattern vector and a test pattern vector; A matching network unit, used for constructing and processing the prototype pattern vector and the test pattern vector by using a matching network to construct and generate an emotional metaphor order parameter; An evolutionary reasoning unit, used for inputting the emotion metaphor order parameter into a competition network, performing dynamic evolution processing, obtaining an emotion metaphor annotation mode, and obtaining an evolution result based on the emotion metaphor annotation mode; The annotation recognition unit is used to annotate the evolution results to obtain annotation results, and to recognize metaphor labels and emotion categories in the text according to the annotation results to obtain emotion metaphor recognition results.

Citation Information

Patent Citations

  • Scenic spot evaluation knowledge base construction method based on metaphor topic mining

    CN111078894A

  • Method and system for extracting text semantic data based on implicit sentiment word analysis

    CN112329472A

  • Metaphor calculation and device based on knowledge graph representation learning

    CN113157932A

  • Emotion classification model construction method based on metaphor recognition

    CN114942991A

  • Encoder, system and method for metaphor detection in natural language processing

    US20210271822A1

Cited By

  • Education automatic question and answer method based on text metaphor processing and emotion perception

    CN120196731A

  • An educational automatic question answering method based on text metaphor processing and emotion perception

    CN120196731B

  • Granule calculation-based multi-mode co-evolution anti-interference identification method and device

    CN120892869A