Text semantic analysis system based on deep learning
By dividing text information into two categories: simple and complex, and combining fixed and dynamic weighted fusion strategies, the system solves the problem of semantic conflict in multimodal text information, improving the accuracy and robustness of sentiment analysis.
Patent Information
- Application Number
- CN202411771041.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
When processing multimodal text information, it is difficult to effectively deal with semantic conflicts between modals, resulting in a decrease in the accuracy of sentiment analysis.
By dividing text information into two categories: simple and complex, and combining different fusion strategies, the system adopts fixed fusion when the information is consistent, introduces dynamic weighted fusion in conflict scenarios, and adaptively adjusts modal weights to avoid semantic conflicts affecting sentiment analysis.
It improves the robustness and adaptability of the system in complex multimodal situations, reduces the risk of misjudgment, and makes sentiment analysis more reliable and accurate in semantic conflict situations.
Smart Images

Figure CN119721046A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text semantic analysis, and in particular to a text semantic analysis system based on deep learning. Background Art
[0002] Text semantic analysis based on deep learning is a method that uses deep neural networks to understand and process text data. It achieves a deeper level of language understanding by analyzing semantic information at the word, sentence, and paragraph levels. Compared with traditional analysis that relies on keywords or word frequency, deep learning automatically learns semantic patterns in text through a large amount of corpus training, improves the ability to understand implicit meanings, and can be used for tasks such as sentiment analysis, automatic summary generation, information retrieval, and machine translation. In addition, in the processing of multimodal data sources (such as images, audio, and video), deep learning can also integrate the features of different types of data with text semantics through multimodal learning to achieve cross-modal understanding, such as associating audio and image information in video analysis, or generating text descriptions in image processing, thereby improving the machine's overall perception of multi-source data.
[0003] Text semantic analysis based on deep learning includes multimodal semantic fusion, especially in scenarios where multiple information sources (such as text, images, audio, video, etc.) need to be integrated to achieve a more comprehensive semantic understanding. Multimodal semantic fusion refers to the integration of data from different modalities and collaborative analysis through deep learning models to capture richer semantic relationships. For example, in sentiment analysis, not only the sentiment of the text is analyzed, but also the expressions in the image or the tone in the audio are combined to generate more accurate sentiment judgments. Multimodal semantic fusion improves the depth and breadth of semantic analysis, enabling the model to identify multi-dimensional information in complex environments and improve the accuracy of understanding.
[0004] The prior art has the following deficiencies:
[0005] Existing technologies usually use a single fusion strategy to integrate and collaboratively analyze text information extracted from different types of data sources (such as text, images, audio, video, etc.) in order to more comprehensively understand semantics from multiple perspectives. This approach is applicable in most scenarios, but when text information from different modalities contradicts each other, a single fusion strategy may not be able to effectively handle the conflict. For example, in a multimodal scenario, the news headline is "Local parks welcome a peak in tourists, and the environment is becoming more beautiful", which conveys positive emotions; the audio commentary also describes the scene in a calm tone as "active" community life, further strengthening the positive atmosphere. However, the accompanying picture shows a lot of garbage and chaotic scenes, suggesting negative emotions about environmental issues. This semantic conflict may cause the model to misunderstand the emotional judgment because the positive information in the text and audio masks the negative implications of the picture. If the fixed fusion strategy cannot identify and adjust this modal conflict, the model may make judgments based on incorrect assumptions, resulting in semantic understanding bias. This misjudgment can cause the model to draw inaccurate conclusions in sentiment analysis, such as incorrectly judging it as neutral or mixed sentiment, ignoring the emotional transitions or background information in the text and images, and directly affecting the accuracy of the task, especially in applications such as sentiment analysis, emotion recognition, and contextual inference.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0007] The purpose of the present invention is to provide a text semantic analysis system based on deep learning. By dividing the text into simple and complex categories and combining different fusion strategies, the system adopts fixed fusion when the information is consistent, and efficiently integrates multimodal information; dynamic weighted fusion is introduced in conflict scenarios to accurately focus on the most relevant modality and avoid semantic conflicts affecting the accuracy of sentiment analysis. The dynamic weighted fusion module enables the model to adaptively adjust the modal weights, improve the robustness and adaptability of the system in complex multimodal situations, and is suitable for applications such as emotion recognition and sentiment analysis to solve the problems in the above-mentioned background technology.
[0008] In order to achieve the above object, the present invention provides the following technical solution: a text semantic analysis system based on deep learning, including a semantic extraction module, a feature extraction and evaluation module, a text complexity division module, a fixed fusion strategy module and a dynamic weighted fusion module:
[0009] The semantic extraction module first extracts semantic information from the generated text data, mines the semantic relations and structural information in the text, and captures the key topics, sentiment tendencies, and intentions in the text;
[0010] The feature extraction and evaluation module extracts features from the acquired text semantic information and intelligently evaluates the acquired text semantic information based on the extracted features through a pre-learned machine learning model.
[0011] The text complexity division module divides the acquired text semantic information into simple text information and complex text information based on the evaluation results of the machine learning model;
[0012] Fixed fusion strategy module: for simple text information, a fixed fusion strategy matching its characteristics is selected for processing. By fusing information from various modalities, the semantics of the text can be understood more comprehensively from multiple perspectives.
[0013] The dynamic weighted fusion module uses the attention mechanism to process complex text information. According to the specific task requirements and the current situation, it identifies the contribution of modal information to the current decision, improves its influence accordingly, and dynamically adjusts the weights between different modalities.
[0014] Preferably, the specific steps of extracting semantic information from the generated text data, mining the semantic relationship and structural information in the text, and capturing the key topics, emotional tendencies, and intentions in the text are as follows:
[0015] First, preprocess the generated text data and convert it into a format that the model can process;
[0016] After completing the preprocessing, the text needs to be converted into a numerical representation;
[0017] Through the text represented by the vector, the semantic relationship and sentiment information are analyzed next;
[0018] Finally, the key topics of the text are extracted through the topic model to further refine the intention of the text.
[0019] Preferably, feature extraction is performed on the acquired text semantic information, and the extracted features include the syntactic complexity of the text and the degree of dispersion of different viewpoints in the text. Under the detection window, after analyzing the syntactic complexity of the text and the degree of dispersion of different viewpoints in the text, a syntactic depth index and an opinion dispersion index are generated respectively, and the syntactic depth index and the opinion dispersion index are input into a pre-learned machine learning model, and a text semantic complexity coefficient is generated by the machine learning model. The acquired text semantic information is intelligently evaluated by the text semantic complexity coefficient.
[0020] Preferably, in the detection window, the syntactic complexity of the text is analyzed and the specific steps of generating the syntactic depth index are as follows:
[0021] In the detection window, the input text is parsed syntactically, and each sentence S iConverted into its corresponding syntax tree PT i , where S i ={S1, S2, S3, ..., S n},S i is the i-th sentence, PT i ={PT1, PT2, PT3,..., PT n}, PT i is the syntactic tree of the i-th sentence, each sentence corresponds to a syntactic tree, and n is the total number of sentences;
[0022] In the generated syntax tree, the maximum level nesting depth of each syntax tree is calculated to reflect the hierarchical complexity of the sentence. The calculation expression is as follows:
[0023]
[0024] , where D i is the syntax tree PT i The maximum level of nesting depth, that is, the syntactic tree PT corresponding to each sentence i i Maximum nesting depth, N i is the syntax tree PT i The set of all nodes, N j is the syntax tree PT i The jth node, depth(N j ) represents the distance from the root node to node N j The path length;
[0025] Calculate the dependency path complexity of each sentence. The dependency path complexity comprehensively considers the strength of the dependency relationship between words within the sentence and the path depth. The semantic density of the path is reflected by multiplying the weights of the dependency relationship on the path. The calculation expression is as follows:
[0026]
[0027] , where C i is the dependency path complexity, indicating that sentence S i The dependency path complexity, L i is the i-th sentence S i The number of paths, i.e., the sentence S i The number of all paths from the root node to the leaf node in the syntax tree, k is the index number of the path, is the weighted product of the dependencies in the path, α z is the dependency weight, i.e., the weight of the zth dependency in path k;
[0028] The maximum level of nesting depth D for each sentence i and dependency path complexity C iCombined, the syntactic depth index of the entire text is generated, and the calculation expression is as follows:
[0029]
[0030] , where SDI is the syntactic depth index and γ is the dependency path complexity C i The tuning parameter, β is the overall tuning parameter.
[0031] Preferably, under the detection window, the dispersion degree of different opinions in the text is analyzed, and the specific steps of generating the opinion dispersion index are as follows:
[0032] Under the detection window, the text is divided into multiple paragraphs, each paragraph is regarded as an independent opinion unit and marked as Q r , Q r = {Q1, Q2, Q3, ..., Q u}, Q r is the opinion unit of the rth paragraph, and u is the total number of paragraphs;
[0033] For each view unit Q r , use the deep learning model to convert it into a high-dimensional vector representation, and the calculation expression is as follows: V r =BERT(Q r ), where V r is the opinion vector representation, is the opinion unit Q r BERT is a pre-trained language model based on the Transformer architecture that captures the semantic information of text through bidirectional context understanding.
[0034] In order to measure the dispersion degree between each opinion unit, the cosine similarity between each two opinion vectors is calculated to obtain the semantic distance. The calculation expression is as follows:
[0035]
[0036] , where g re is the semantic distance between opinions, V e It is the view unit Q e The view vector represents cos(V r ,V e ) is the opinion vector V r and the opinion vector V e cosine similarity of ;
[0037] Based on the computation of the semantic distance g between opinions re , construct the scattered matrix, the expression is as follows:
[0038]
[0039] , where G is the opinion dispersion matrix and the semantic distance between opinions is g re It is one of the elements in the opinion dispersion matrix;
[0040] Based on the eigenvalue decomposition results of the opinion dispersion matrix G, the opinion dispersion index is generated. The calculation expression is as follows:
[0041]
[0042] , where VDI is the opinion dispersion index, λ max (G) is the maximum eigenvalue of the opinion dispersion matrix G, λ k (G) is the kth eigenvalue of the opinion dispersion matrix G, and m is the total number of eigenvalues.
[0043] Preferably, the text semantic complexity coefficient generated after analyzing the text semantic information under the detection window is compared and analyzed with a preset text semantic complexity coefficient reference threshold, and the acquired text semantic information is divided, and the division steps are as follows:
[0044] If the text semantic complexity coefficient is greater than or equal to a preset text semantic complexity coefficient reference threshold, the text semantic information is divided into complex text information;
[0045] If the text semantic complexity coefficient is less than a preset text semantic complexity coefficient reference threshold, the text semantic information is divided into simple text information.
[0046] Preferably, for complex text information, an attention mechanism is used for processing. According to specific task requirements and the current context, the contribution of modal information to the current decision is identified, and its influence is increased accordingly. The specific steps for dynamically adjusting the weights between different modalities are as follows:
[0047] First, based on the attention mechanism, the contribution of text information extracted by each modality to decision-making in the current situation is calculated. The calculation expression is as follows: y =f(x y ,TSCC), where A y is the initial attention score of the text information y extracted by the modality, x y is the input feature of the text information y extracted by the modality, and f is the adaptability function, which dynamically generates the attention score by combining the features of the modality and the text semantic complexity coefficient TSCC;
[0048] According to the complexity coefficient TSCC of text semantics and the pre-set text semantic complexity reference threshold TSCC RT , adjust the attention score of each modality, if TSCC ≥ TSCC RT, it indicates complex text information, and the weight is increased to highlight the modal information with great contribution. The calculation expression is as follows:
[0049]
[0050] , where A y ′ is the adjusted attention score of the text information y extracted by the modality, and ω is the adjustment coefficient, which is used to control the influence of the complexity coefficient on the attention score;
[0051] The syntactic depth index SDI and opinion dispersion index VDI are used to further adjust the weight of the text information y extracted from each modality. The calculation expression is as follows:
[0052]
[0053] , where w y ′ is the weight of the text information y extracted from the adjusted modality, is the adjustment coefficient of the syntactic depth index SDI, which is used to control the influence of the syntactic depth index on the weight of the text information extracted by the modality. τ is the adjustment coefficient of the opinion dispersion index VDI, which controls the influence of the opinion dispersion index on the weight of the text information extracted by the modality. A v ′ is the adjusted attention score of the text information v extracted by the modality, and X is the total amount of text information extracted by the modality;
[0054] In order to obtain the final weight w of each mode y ′, the features of each modality are weighted and fused according to the weights to obtain the output of multimodal semantic fusion. The calculation expression is as follows:
[0055]
[0056] , where F 融合 It is the final multimodal fusion result, which means the sum of the feature information of each modality weighted according to its weight.
[0057] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0058] The present invention divides text information into two categories: simple text and complex text, and combines different fusion strategies to more accurately process emotions and semantics when conflicts occur in multimodal information. This division enables the system to use an efficient fixed fusion strategy when the information is consistent, and introduce dynamic weighted fusion in complex text scenarios with conflicting information. Especially in sentiment analysis and context inference, fixed fusion is used for simple text information to quickly integrate multimodal information, ensuring accuracy and efficiency. For complex texts, dynamic weighted fusion focuses more attention on the most relevant modality by adaptively adjusting the weights of each modality, avoiding the masking of key information by emotional and semantic conflicts, thereby more accurately understanding the emotional turning points and background information of the text. This greatly reduces the risk of misjudging as neutral or mixed emotions, making sentiment analysis more reliable and accurate in semantic conflict situations.
[0059] The present invention uses a dynamic weighted fusion module to enable the model to adaptively adjust the information weights of each modality according to different task requirements and situations, thus solving the limitation that fixed fusion strategies are difficult to adapt to various situations. The system can identify the most influential modality in the current decision according to the situation and task requirements, thereby dynamically adjusting its influence to ensure the optimal semantic understanding under multimodal conflicts. For example, when the image expresses contradictions with the text and audio information, the negative information in the image is identified through an adaptive attention mechanism, and the weights are reasonably allocated to avoid being covered by positive text and audio information. This flexible adjustment strategy not only improves the performance of the model in complex scenarios, but also enhances its wide applicability in different applications (such as emotion recognition, sentiment analysis, context understanding, etc.), making the system more robust and adaptable, so as to cope with complex and changeable real application scenarios of multimodal information. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0061] Figure 1 This is a module schematic diagram of the text semantic analysis system based on deep learning of the present invention. DETAILED DESCRIPTION
[0062] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art.
[0063] The present invention provides a text semantic analysis system based on deep learning as shown in Figure 1 Figure, which includes a semantic extraction module, a feature extraction and evaluation module, a text complexity division module, a fixed fusion strategy module, and a dynamic weighted fusion module:
[0064] The semantic extraction module, first, extracts semantic information from the generated text data, mines the semantic relationships and structural information in the text, and captures the key themes, emotional tendencies, and intentions in the text;
[0065] The specific steps for extracting semantic information from the generated text data, mining the semantic relationships and structural information in the text, and capturing the key themes, emotional tendencies, and intentions are as follows:
[0066] First, preprocess the generated text data and convert it into a format that the model can process;
[0067] The preprocessing includes steps such as word segmentation, stop word removal, and part-of-speech tagging. Word segmentation splits the text into independent word or sub-word units, which is the basis for subsequent analysis; removing stop words (such as "de", "shi", etc.) helps to retain the key information in the text; part-of-speech tagging can help identify the parts of speech such as nouns and verbs, providing assistance for analyzing the text structure. Through text preprocessing, the model can focus more on the core content of the text and ensure that effective semantic information is extracted in subsequent steps.
[0068] After completing the preprocessing, the text needs to be converted into a numerical representation;
[0069] Word embedding (such as Word2Vec, GloVe) is a commonly used method that represents words as vectors, enabling the model to process text semantics in a mathematical space. Word embedding technology captures the semantic similarity between words. For example, "cat" and "dog" are placed in a similar vector space. For scenarios where context is important, more advanced context word embedding techniques (such as BERT, ELMo) can be used. These models dynamically adjust the representation of words according to the context. This step enables the model to understand the similarity and relevance between words and lays the foundation for subsequent semantic relationship extraction.
[0070] For the text represented by vectors, next, analyze the semantic relationships and emotional information;
[0071] Deep learning models (such as LSTM or self-attention mechanisms) can be used to identify contextual relationships, sentiment tendencies, and intent in text. These models can identify subject-verb-object structures, modification relationships, etc. in text, helping to understand the core semantics of sentences. Sentiment analysis uses specific sentiment vocabulary and contextual features to determine the sentiment tendency of text, such as positive, negative, or neutral. This step provides strong support for the model to identify the theme, sentiment, and intent of the text.
[0072] Finally, the key topics of the text are extracted through topic models (such as LDA and BERT-based topic models) to further refine the intent of the text;
[0073] Topic extraction can help the model identify the main discussion content of the text, while intent identification infers the purpose of the text by analyzing sentence patterns, keywords, etc. For example, in customer feedback, the topic may be product features, while the intent may be to express dissatisfaction or suggestions. Topic extraction and intent identification provide the model with an overall framework of the text, enabling it to understand the text semantics more comprehensively and accurately, and provide high-quality semantic information for subsequent tasks (such as sentiment analysis and classification).
[0074] The feature extraction and evaluation module extracts features from the acquired text semantic information and intelligently evaluates the acquired text semantic information based on the extracted features through a pre-learned machine learning model.
[0075] Extract features from the acquired text semantic information. The extracted features include the syntactic complexity of the text and the dispersion degree of different viewpoints in the text. Under the detection window, after analyzing the syntactic complexity of the text and the dispersion degree of different viewpoints in the text, generate a syntactic depth index and a viewpoint dispersion index respectively. Input the syntactic depth index and the viewpoint dispersion index into a pre-learned machine learning model. Generate a text semantic complexity coefficient through the machine learning model. Perform intelligent evaluation on the acquired text semantic information through the text semantic complexity coefficient.
[0076] A sharp increase in the syntactic complexity of a text usually indicates that its semantic information structure is more complex. Syntactic complexity includes the frequent use of nested clauses, multiple modifiers, long sentences, and complex sentences, which make the logical relationship between sentences more difficult to parse. For example, nested clauses and multiple modifiers increase the level of understanding, so that each clause or modifier may have an independent meaning or provide additional background information. Complex syntactic structure also means that the dependency relationship between words is more intensive, and the positioning of core components such as subject, predicate, and object becomes difficult, which increases the challenge of the model in deconstructing and understanding the text. In addition, complex syntax is usually accompanied by richer semantic relationships, such as logical associations such as cause and effect, contrast, and concession. If these associations are not handled properly, they will cause semantic deviations or misunderstandings. Therefore, the increase in syntactic complexity directly affects the structural complexity of the text, indicating that its semantic information contains richer and more layered content, which requires more detailed analysis and higher comprehension ability to accurately parse.
[0077] Under the detection window, the syntactic complexity of the text is analyzed and the specific steps to generate the syntactic depth index are as follows:
[0078] In the detection window, the input text is parsed syntactically, and each sentence S i Converted into its corresponding syntax tree PT i , where S i ={S1, S2, S3, ..., S n},S i is the i-th sentence, PT i ={PT1, PT2, PT3,…,PT n}, PT i is the syntactic tree of the i-th sentence, each sentence corresponds to a syntactic tree, and n is the total number of sentences;
[0079] A syntactic tree (ParseTree) is a tree diagram that represents the internal grammatical structure of a sentence. It helps to understand the overall grammatical structure of a sentence by showing the hierarchical relationship and dependency relationship between words and phrases in a sentence. In a syntactic tree, nodes represent the components of a sentence, such as words, phrases, or clauses, and the lines between these nodes represent grammatical dependencies, such as subject-predicate relationships, modification relationships, etc. Syntactic trees can be divided into two main types: dependency syntactic trees (DependencyParseTree), which focuses on the dependency relationship between words; and constituency syntactic trees (ConstituencyParseTree), which focuses on the phrase hierarchy of a sentence. By constructing a syntactic tree, the model can perform in-depth grammatical analysis of sentences and identify semantic levels, providing a basis for semantic analysis and sentiment analysis in natural language processing.
[0080] In the generated syntax tree, the maximum level nesting depth of each syntax tree is calculated to reflect the hierarchical complexity of the sentence. The calculation expression is as follows:
[0081]
[0082] , where D i is the syntax tree PT i The maximum level of nesting depth, that is, the syntactic tree PT corresponding to each sentence i i Maximum nesting depth, N i is the syntax tree PT i The set of all nodes, N j is the syntax tree PT i The jth node, depth(N j ) represents the distance from the root node to node N j The path length;
[0083] The hierarchical nesting depth of a syntactic tree refers to the number of levels from the root node to the deepest leaf node in the tree structure, reflecting the grammatical complexity of a sentence. The greater the hierarchical nesting depth, the more nested structures (such as clauses and modifiers) the sentence contains, and the more complex the grammatical relationship. For example, a simple sentence may only contain a subject and a predicate, with a small nesting depth; while a sentence containing multiple clauses and modifiers will have a deeper nesting and a higher hierarchical nesting depth. This depth indicator is used to measure the structural complexity of a sentence. The more nesting, the more difficult it is to parse and understand the sentence.
[0084] The path length from the root node to the node refers to the number of edges from the root node of the syntactic tree to a specific node, reflecting the hierarchical position of the node in the sentence structure. The longer the path length, the farther away the node is from the core components of the sentence (such as the subject-predicate structure) in a deeper level of nesting. Generally, the path length from the root node to the leaf node can be used to calculate the relative importance and dependencies of each component. For example, in a sentence, the subject and predicate are usually on a shorter path, while modifiers or clauses may be on a longer path. Path length helps parse the hierarchy and semantic dependencies of sentences, providing a basis for semantic understanding in natural language processing.
[0085] Calculate the dependency path complexity of each sentence. The dependency path complexity represents the complexity and strength of each dependency relationship in the path from the root node to the leaf node. The dependency path complexity comprehensively considers the strength of the dependency relationship between words within the sentence and the depth of the path. The semantic density of the path is reflected by the weighted multiplication of the dependency relationship on the path. The calculation expression is as follows:
[0086]
[0087] , where C iis the dependency path complexity, indicating that sentence S i The dependency path complexity, L i is the i-th sentence S i The number of paths, i.e., the sentence S i The number of all paths from the root node to the leaf node in the syntax tree of , k is the index number of the path, which is used to traverse each path from the root node to the leaf node, is the weighted multiplication of the dependencies in the path, is the weighted multiplication of each dependency on path k, and represents the dependency complexity of the path, α z is the dependency weight, i.e., the weight of the zth dependency in path k, which indicates the strength or complexity of the dependency between nodes;
[0088] Dependency path complexity is an indicator that measures the complexity and strength of each dependency relationship on the path from the root node to the leaf node in the syntax tree. A dependency path refers to a path in the syntax tree that gradually extends from the root node to the leaf node along the dependency relationship, usually including dependencies between multiple words. Path complexity is represented by the weights of these dependencies. The weight of each dependency relationship reflects the strength of the relationship (such as the subject-predicate relationship or the modification relationship) and the importance of the dependency relationship to the semantics. The higher the path complexity, the more complex the hierarchy and association of the dependency relationships on the path, and the structure and difficulty of understanding the sentence will increase accordingly.
[0089] The root node and the leaf node are two key node types in the syntax tree. The root node is located at the top of the syntax tree, usually representing the core or subject-predicate structure of the sentence, controlling the grammatical hierarchy of the entire sentence, and is the starting point of all dependency paths. The leaf node is located at the end of the syntax tree, without any child nodes, and usually represents the specific words of the sentence (such as nouns, verbs, etc.). The path from the root node to the leaf node represents the layered dependency relationship from the core structure to the specific words of the sentence. These paths can fully display the hierarchical relationship and semantic dependency of the sentence's grammatical structure.
[0090] The maximum level of nesting depth D for each sentence i and dependency path complexity C i Combined, the syntactic depth index of the entire text is generated, and the calculation expression is as follows:
[0091]
[0092] , where SDI is the syntactic depth index and γ is the dependency path complexity C i Adjustment parameters to control the dependency path complexity C i The degree of influence on the syntactic depth index SDI, β is the overall adjustment parameter, which is used to control the nonlinear adjustment of the overall result;
[0093] Under the detection window, the larger the syntactic depth index value generated after analyzing the syntactic complexity of the text, the more complex the structure of the acquired text semantic information is. The syntactic depth index reflects the complexity of the syntax by measuring factors such as the nesting level, number of clauses, and complex modifiers of the syntactic structure in the text. When the syntactic depth index is high, it means that there are more nested structures, complex sentences, and multi-level semantic relationships in the text, which makes the dependency relationship between sentences more complex, thereby increasing the difficulty of understanding. Therefore, the larger the syntactic depth index generated under the monitoring window, the text usually contains richer semantic levels and complex structural logic; on the contrary, a lower index indicates that the text structure is relatively simple and the semantic information is more direct.
[0094] When the degree of dispersion of different opinions in the text increases, it indicates that the structure of the acquired text semantic information is more complex. This is because highly dispersed texts usually contain multiple independent or contradictory opinions, involving different topics or positions, so that the text is no longer centered around a single core, but presents a multi-level and multi-directional discussion. The differences between opinions, potential conflicts, and cross-topic correlations increase the complexity of the text semantic structure. When analyzing, the model needs to understand and integrate different opinions, distinguish the subtle differences, and identify the emotional tendencies and logical relationships of each opinion. In addition, highly dispersed texts often contain implicit hierarchical expressions. For example, some opinions are not clearly stated but presented in metaphors, contrasts, etc., which makes the surface semantics and deep semantics of the text different, further increasing the difficulty of semantic analysis. Therefore, the increase in the degree of dispersion of opinions indicates that the text contains a complex semantic structure, and the model needs stronger semantic understanding and reasoning capabilities to accurately parse the multiple information therein.
[0095] Under the detection window, the dispersion degree of different opinions in the text is analyzed, and the specific steps of generating the opinion dispersion index are as follows:
[0096] Under the detection window, the text is divided into multiple paragraphs, each paragraph is regarded as an independent opinion unit and marked as Q r , Q r = {Q1, Q2, Q3, ..., Q u}, Q r is the opinion unit of the rth paragraph, u is the total number of paragraphs, and the length and complexity of the text determine the segmentation granularity. Long texts can be further divided to ensure that each paragraph can express an independent opinion;
[0097] The overall length of the text and the complexity of the content affect how we segment it so that we can more accurately extract independent ideas in the analysis. If the text is long or the content contains multiple levels of semantics, we can divide it into smaller parts (such as sentences or short paragraphs), each of which can express a complete idea on its own. This refined segmentation helps ensure that the model can accurately capture the independence and characteristics of each idea and avoid confusion or loss of semantic information, especially when dealing with complex or diverse content.
[0098] For each view unit Q r , use a deep learning model (such as BERT) to convert it into a high-dimensional vector representation, and the calculation expression is as follows: V r =BERT(Q r ), where V r is the opinion vector representation, is the opinion unit Q r BERT is a pre-trained language model based on the Transformer architecture. It captures the semantic information of text through bidirectional context understanding. The BERT model encodes the given text and converts it into a high-dimensional vector representation suitable for semantic analysis.
[0099] Opinion vector representation refers to converting each opinion unit in the text into a high-dimensional vector through a deep learning model to capture its semantic information. This vector representation quantifies the semantic features of the text, allowing the model to analyze the relationship between different opinions in the vector space. Here, the role of opinion vector representation is to facilitate the model to compare and calculate the semantics of different paragraphs or opinions in the text. For example, by calculating the semantic distance between each opinion vector, the degree of opinion dispersion or semantic conflict in the text can be identified, thereby more accurately analyzing the overall structural complexity of the text. This process is crucial for semantic parsing in tasks such as multimodal semantic fusion.
[0100] In order to measure the dispersion degree between each opinion unit, the cosine similarity between each two opinion vectors is calculated to obtain the semantic distance. The calculation expression is as follows:
[0101]
[0102] , where g re is the semantic distance between opinions, V e It is the view unit Q e The view vector represents cos(V r ,V e ) is the opinion vector V r and the opinion vector V e cosine similarity of ;
[0103] Cosine similarity is a way to measure the similarity between two vectors. It expresses the similarity by calculating the cosine value of the angle between the two vectors. The value range is from -1 to 1. The closer the value is to 1, the more similar the two vectors are. Here, the role of cosine similarity is to measure the semantic similarity between different opinion units in the text, and to identify semantic consistency or difference by judging the angle between opinion vectors. This method helps the model analyze the semantic distance between different opinions and provides a basis for the calculation of the opinion dispersion index, so as to better understand the structural complexity and internal semantic relationship of the text.
[0104] Based on the computation of the semantic distance g between opinions re , construct the scattered matrix, the expression is as follows:
[0105]
[0106] , where G is the opinion dispersion matrix and the semantic distance between opinions is g re It is one of the elements in the opinion dispersion matrix;
[0107] The role of the opinion dispersion matrix is to quantify and represent the semantic distance or dispersion degree between opinion units in the text. It helps the model identify and analyze the internal structure and complexity of the text by recording the semantic differences between each opinion. When the distance value of each opinion unit in the matrix is large, it indicates that the opinions in the text are more dispersed or conflicting, and have higher semantic complexity; when the distance value is small, it indicates that the opinions are concentrated and the semantic consistency is strong. The opinion dispersion matrix provides a basis for multimodal semantic analysis, allowing the model to more accurately understand the multi-level semantic relationships of the text and dynamically adjust the analysis strategy to cope with complex text content.
[0108] Based on the eigenvalue decomposition results of the opinion dispersion matrix G, the opinion dispersion index is generated. The opinion dispersion index is defined as the ratio of the spectral radius (i.e., the maximum eigenvalue) of the matrix G to the harmonic mean of all eigenvalues, in order to highlight the most significant dispersion characteristics while reducing the influence of outliers. The calculation expression is as follows:
[0109]
[0110] , where VDI is the opinion dispersion index, λ max (G) is the maximum eigenvalue of the opinion dispersion matrix G, which indicates the degree of dispersion in the most significant direction of opinion dispersion, and λ k (G) is the kth eigenvalue of the opinion dispersion matrix G, and the eigenvalue λ k (G) is the result obtained after eigenvalue decomposition of matrix G. Each λ k(G) corresponds to an eigenvector, which reflects the degree of variation of the opinion dispersion matrix in a certain direction. m is the total number of eigenvalues, which indicates the number of all eigenvalues in the opinion dispersion matrix G;
[0111] Maximum eigenvalue λ max (G) represents the most significant direction of opinion dispersion in the text. A larger value indicates that there is a significant difference in opinion in a certain semantic direction. This value is in the numerator, making the dispersion index more sensitive to the direction of significant semantic dispersion.
[0112] Under the detection window, the larger the value of the opinion dispersion index generated after analyzing the dispersion of different opinions in the text, the higher the dispersion of different opinions in the text, which in turn reflects the complexity of the text's semantic information structure. Specifically, when the opinion dispersion index is high, the text usually contains multiple positions, cross-topic content, and even contradictory opinions, which increases the difficulty of the model in semantic integration and distinction during the analysis process. Therefore, a higher opinion dispersion index shows that the text requires stronger semantic parsing and reasoning capabilities, indicating that its structure is complex; when the opinion dispersion index is low, the text's semantics is more concentrated, the opinions are consistent, and the information structure is relatively simple, which makes the model easy to understand and process.
[0113] The machine learning model is not limited here, and any machine learning model that can realize comprehensive analysis of the syntactic depth index SDI and the opinion dispersion index VDI to generate the text semantic complexity coefficient TSCC can be used. In order to realize the technical solution of the present invention, the present invention provides a specific implementation method:
[0114] The text semantic complexity coefficient TSCC calculation expression is as follows:
[0115]
[0116] , where k1 and k2 are the preset proportional coefficients of the syntactic depth index SDI and the opinion dispersion index VDI, and both k1 and k2 are greater than 0.
[0117] From the calculation expression of the text semantic complexity coefficient, it can be seen that under the detection window, the larger the expression value of the syntactic depth index generated after analyzing the syntactic complexity of the text, the larger the expression value of the opinion dispersion index generated after analyzing the degree of dispersion of different opinions in the text, and the larger the expression value of the text semantic complexity coefficient generated after analyzing the text semantic information under the detection window, indicating that the text semantic information structure is more complex, otherwise it indicates that the text semantic information structure is relatively simple.
[0118] The text complexity division module divides the acquired text semantic information into simple text information and complex text information based on the evaluation results of the machine learning model;
[0119] The text semantic complexity coefficient generated after analyzing the text semantic information under the detection window is compared and analyzed with the pre-set text semantic complexity coefficient reference threshold, and the obtained text semantic information is divided. The division steps are as follows:
[0120] If the text semantic complexity coefficient is greater than or equal to a preset text semantic complexity coefficient reference threshold, the text semantic information is divided into complex text information;
[0121] If the text semantic complexity coefficient is less than a preset text semantic complexity coefficient reference threshold, the text semantic information is divided into simple text information;
[0122] Simple text information refers to text with clear semantics, concise structure and consistent emotions, while complex text information refers to text that contains multiple viewpoints, cross-topic content or implicit semantics. Its structure is usually richer and more varied, and its semantic expression may involve multiple emotional tendencies and even contradictory viewpoints.
[0123] Fixed fusion strategy module: for simple text information, a fixed fusion strategy matching its characteristics is selected for processing. By fusing information from various modalities, the semantics of the text can be understood more comprehensively from multiple perspectives.
[0124] Since the semantics of simple text information is clear and the information between modalities is usually consistent, traditional fusion methods such as early fusion and late fusion can be used to directly integrate information from modalities such as text, images, and audio. These strategies can efficiently combine multimodal data and improve the model's understanding ability.
[0125] The selected fusion strategy is used to integrate and collaboratively analyze simple text and other modal data. By fusing information from each modality, the model can more comprehensively understand the semantics of the text from multiple perspectives. For example, in news reports, combining text content and related pictures can more accurately convey the full picture of the event. Collaborative analysis helps the model capture details and improve the accuracy and reliability of the analysis.
[0126] The dynamic weighted fusion module uses the attention mechanism to process complex text information. According to the specific task requirements and the current situation, it identifies the contribution of modal information to the current decision, improves its influence accordingly, and dynamically adjusts the weights between different modalities.
[0127] For complex text information, the attention mechanism is used to process it. According to the specific task requirements and the current situation, the contribution of modal information to the current decision is identified and its influence is increased accordingly. The specific steps for dynamically adjusting the weights between different modalities are as follows:
[0128] First, based on the attention mechanism, the contribution of text information extracted by each modality to decision-making in the current situation is calculated. The calculation expression is as follows: y =f(x y ,TSCC), where A y is the initial attention score of the text information y extracted by the modality, x y is the input feature of the text information y extracted by the modality, and f is the adaptability function, which dynamically generates the attention score by combining the features of the modality and the text semantic complexity coefficient TSCC;
[0129] An adaptive function is a function that dynamically adjusts model parameters or weights to automatically adapt the model output based on input features or context information. Here, the adaptive function f(x y ,TSCC) is used to extract the text information from each modality and input the feature x y And the semantic complexity coefficient TSCC of the text to calculate the attention score A y , thereby measuring the contribution of the modality to the current decision. This adaptive adjustment allows the model to flexibly handle complex situations, and by dynamically giving more important modalities higher weights, it makes semantic analysis more accurate. Especially in multimodal information conflicts or complex texts, the adaptive function helps the model focus on the most informative modality.
[0130] According to the complexity coefficient TSCC of text semantics and the pre-set text semantic complexity reference threshold TSCC RT , adjust the attention score of each modality, if TSCC ≥ TSCC RT , it indicates complex text information, and the weight is increased to highlight the modal information with great contribution. The calculation expression is as follows:
[0131]
[0132] , where A y ′ is the adjusted attention score of the text information y extracted by the modality, and ω is the adjustment coefficient, which is used to control the influence of the complexity coefficient on the attention score;
[0133] The role of the adjustment coefficient is to control the influence of the text semantic complexity coefficient on the attention score. When the complexity of the text is high, the adjustment coefficient can amplify the influence of the complexity on the model's attention allocation, ensuring that the model pays more attention to key modal information; when the complexity is low, the adjustment coefficient can weaken the influence of complexity and avoid unnecessary weight adjustments. This adjustment mechanism allows the model to flexibly respond to changes in complexity in different contexts, ensure the accuracy and stability of the attention mechanism, and thus improve the accuracy of semantic analysis.
[0134] The syntactic depth index SDI and opinion dispersion index VDI are used to further adjust the weight of the text information y extracted from each modality. The calculation expression is as follows:
[0135]
[0136] , where w′ y is the weight of the text information y extracted from the adjusted modality, is the adjustment coefficient of the syntactic depth index SDI, which is used to control the influence of the syntactic depth index on the weight of the text information extracted by the modality. τ is the adjustment coefficient of the opinion dispersion index VDI, which controls the influence of the opinion dispersion index on the weight of the text information extracted by the modality. A′ v is the adjusted attention score of the text information v extracted by the modality, and X is the total amount of text information extracted by the modality;
[0137] In order to obtain the final weight w′ of each mode y After that, the features of each modality are weighted and fused according to the weights to obtain the output of multimodal semantic fusion. The calculation expression is as follows:
[0138]
[0139] , where F 融合 It is the final multimodal fusion result, which means the sum of the feature information of each modality weighted according to its weight.
[0140] Through this weighted fusion, the model is able to focus on modal information with higher contribution while taking into account the contextual characteristics of complex text, making the final output more interpretable and accurate.
[0141] The present invention divides text information into two categories: simple text and complex text, and combines different fusion strategies to more accurately process emotions and semantics when conflicts occur in multimodal information. This division enables the system to use an efficient fixed fusion strategy when the information is consistent, and introduce dynamic weighted fusion in complex text scenarios with conflicting information. Especially in sentiment analysis and context inference, fixed fusion is used for simple text information to quickly integrate multimodal information, ensuring accuracy and efficiency. For complex texts, dynamic weighted fusion focuses more attention on the most relevant modality by adaptively adjusting the weights of each modality, avoiding the masking of key information by emotional and semantic conflicts, thereby more accurately understanding the emotional turning points and background information of the text. This greatly reduces the risk of misjudging as neutral or mixed emotions, making sentiment analysis more reliable and accurate in semantic conflict situations.
[0142] The present invention uses a dynamic weighted fusion module to enable the model to adaptively adjust the information weights of each modality according to different task requirements and situations, thus solving the limitation that fixed fusion strategies are difficult to adapt to various situations. The system can identify the most influential modality in the current decision according to the situation and task requirements, thereby dynamically adjusting its influence to ensure the optimal semantic understanding under multimodal conflicts. For example, when the image expresses contradictions with the text and audio information, the negative information in the image is identified through an adaptive attention mechanism, and the weights are reasonably allocated to avoid being covered by positive text and audio information. This flexible adjustment strategy not only improves the performance of the model in complex scenarios, but also enhances its wide applicability in different applications (such as emotion recognition, sentiment analysis, context understanding, etc.), making the system more robust and adaptable, so as to cope with complex and changeable real application scenarios of multimodal information.
[0143] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A text semantic analysis system based on deep learning, characterized by: It includes semantic extraction module, feature extraction and evaluation module, text complexity division module, fixed fusion strategy module and dynamic weighted fusion module: The semantic extraction module first extracts semantic information from the generated text data, mines the semantic relations and structural information in the text, and captures the key topics, sentiment tendencies, and intentions in the text; The feature extraction and evaluation module extracts features from the acquired text semantic information and intelligently evaluates the acquired text semantic information based on the extracted features through a pre-learned machine learning model. The text complexity division module divides the acquired text semantic information into simple text information and complex text information based on the evaluation results of the machine learning model; Fixed fusion strategy module: for simple text information, a fixed fusion strategy matching its characteristics is selected for processing. By fusing information from various modalities, the semantics of the text can be understood more comprehensively from multiple perspectives. The dynamic weighted fusion module uses the attention mechanism to process complex text information. According to the specific task requirements and the current situation, it identifies the contribution of modal information to the current decision, improves its influence accordingly, and dynamically adjusts the weights between different modalities.
2. The text semantic analysis system based on deep learning according to claim 1, characterized in that: The specific steps for extracting semantic information from the generated text data, mining the semantic relationships and structural information in the text, and capturing the key topics, sentiment tendencies, and intentions in the text are as follows: First, preprocess the generated text data and convert it into a format that the model can process; After completing the preprocessing, the text is converted into a numerical representation; By representing the text with vectors, we then analyze the semantic relationships and sentiment information; Finally, the key topics of the text are extracted through the topic model to further refine the intention of the text.
3. The text semantic analysis system based on deep learning according to claim 1, characterized in that: The acquired text semantic information is subjected to feature extraction, and the extracted features include the syntactic complexity of the text and the dispersion degree of different viewpoints in the text. Under the detection window, after analyzing the syntactic complexity of the text and the dispersion degree of different viewpoints in the text, a syntactic depth index and an opinion dispersion index are generated respectively. The syntactic depth index and the opinion dispersion index are input into a pre-learned machine learning model, and a text semantic complexity coefficient is generated by the machine learning model. The acquired text semantic information is intelligently evaluated by the text semantic complexity coefficient.
4. The text semantic analysis system based on deep learning according to claim 3, characterized in that: Under the detection window, the syntactic complexity of the text is analyzed and the specific steps to generate the syntactic depth index are as follows: In the detection window, the input text is parsed syntactically, and each sentence S i Converted into its corresponding syntax tree PT i , where S i ={S1, S2, S3, ..., S n },S i is the i-th sentence, PT i ={PT1, PT2, PT3,..., PT n }, PT i is the syntactic tree of the i-th sentence, each sentence corresponds to a syntactic tree, and n is the total number of sentences; In the generated syntax tree, the maximum level nesting depth of each syntax tree is calculated to reflect the hierarchical complexity of the sentence. The calculation expression is as follows: Where D i is the syntax tree PT i The maximum level of nesting depth, that is, the syntactic tree PT corresponding to each sentence i i Maximum nesting depth, N i is the syntax tree PT i The set of all nodes, N j is the syntax tree PT i The jth node, depth(N j ) represents the distance from the root node to node N j The path length; Calculate the dependency path complexity of each sentence. The dependency path complexity comprehensively considers the strength of the dependency relationship between words within the sentence and the path depth. The semantic density of the path is reflected by multiplying the weights of the dependency relationship on the path. The calculation expression is as follows: In the formula, C i is the dependency path complexity, indicating that sentence S i The dependency path complexity, L i is the i-th sentence S i The number of paths, i.e., the sentence S i The number of all paths from the root node to the leaf node in the syntax tree, k is the index number of the path, is the weighted product of the dependencies in the path, α z is the dependency weight, i.e., the weight of the zth dependency in path k; The maximum level of nesting depth D for each sentence i and dependency path complexity C i Combined, the syntactic depth index of the entire text is generated, and the calculation expression is as follows: Where SDI is the syntactic depth index and γ is the dependency path complexity C i The tuning parameter, β is the overall tuning parameter.
5. The text semantic analysis system based on deep learning according to claim 3, characterized in that: Under the detection window, the dispersion degree of different opinions in the text is analyzed, and the specific steps of generating the opinion dispersion index are as follows: Under the detection window, the text is divided into multiple paragraphs, each paragraph is regarded as an independent opinion unit and marked as Q r , Q r = {Q1, Q2, Q3, ..., Q u }, Q r is the opinion unit of the rth paragraph, and u is the total number of paragraphs; For each view unit Q r , use the deep learning model to convert it into a high-dimensional vector representation, and the calculation expression is as follows: V r =BERT(Q r ), where V r is the opinion vector representation, is the opinion unit Q r BERT is a pre-trained language model based on the Transformer architecture that captures the semantic information of text through bidirectional context understanding. In order to measure the dispersion degree between each opinion unit, the cosine similarity between each two opinion vectors is calculated to obtain the semantic distance. The calculation expression is as follows: In the formula, g re is the semantic distance between opinions, V e It is the view unit Q e The view vector represents cos(V r ,V e ) is the opinion vector V r and the opinion vector V e cosine similarity of ; Based on the computation of the semantic distance g between opinions re , construct the scattered matrix, the expression is as follows: Where G is the opinion dispersion matrix, and the semantic distance between opinions is g re It is one of the elements in the opinion dispersion matrix; Based on the eigenvalue decomposition results of the opinion dispersion matrix G, the opinion dispersion index is generated. The calculation expression is as follows: Where VDI is the opinion dispersion index, λ max (G) is the maximum eigenvalue of the opinion dispersion matrix G, λ k (G) is the kth eigenvalue of the opinion dispersion matrix G, and m is the total number of eigenvalues.
6. The text semantic analysis system based on deep learning according to claim 3, characterized in that: The text semantic complexity coefficient generated after analyzing the text semantic information under the detection window is compared and analyzed with the pre-set text semantic complexity coefficient reference threshold, and the obtained text semantic information is divided. The division steps are as follows: If the text semantic complexity coefficient is greater than or equal to a preset text semantic complexity coefficient reference threshold, the text semantic information is divided into complex text information; If the text semantic complexity coefficient is less than a preset text semantic complexity coefficient reference threshold, the text semantic information is divided into simple text information.
7. The text semantic analysis system based on deep learning according to claim 6, characterized in that: For complex text information, the attention mechanism is used to process it. According to the specific task requirements and the current situation, the contribution of modal information to the current decision is identified and its influence is increased accordingly. The specific steps for dynamically adjusting the weights between different modalities are as follows: First, based on the attention mechanism, the contribution of text information extracted by each modality to decision-making in the current situation is calculated. The calculation expression is as follows: y =f(x y ,TSCC), where A y is the initial attention score of the text information y extracted by the modality, x y is the input feature of the text information y extracted by the modality, and f is the adaptability function, which dynamically generates the attention score by combining the features of the modality and the text semantic complexity coefficient TSCC; According to the complexity coefficient TSCC of text semantics and the pre-set text semantic complexity reference threshold TSCC RT , adjust the attention score of each modality, if TSCC ≥ TSCC RT , it indicates complex text information, and the weight is increased to highlight the modal information with great contribution. The calculation expression is as follows: In the formula, A y′ is the adjusted attention score of the text information y extracted by the modality, and ω is the adjustment coefficient, which is used to control the influence of the complexity coefficient on the attention score; The syntactic depth index SDI and opinion dispersion index VDI are used to further adjust the weight of the text information y extracted from each modality. The calculation expression is as follows: Where w′ y is the weight of the text information y extracted from the adjusted modality, is the adjustment coefficient of the syntactic depth index SDI, which is used to control the influence of the syntactic depth index on the weight of the text information extracted by the modality. τ is the adjustment coefficient of the opinion dispersion index VDI, which controls the influence of the opinion dispersion index on the weight of the text information extracted by the modality. A′ v is the adjusted attention score of the text information v extracted by the modality, and X is the total amount of text information extracted by the modality; In order to obtain the final weight w′ of each mode y After that, the features of each modality are weighted and fused according to the weights to obtain the output of multimodal semantic fusion. The calculation expression is as follows: In the formula, F 融合 It is the final multimodal fusion result, which means the sum of the feature information of each modality weighted according to its weight.
Citation Information
Patent Citations
Multi-modal sentiment analysis method based on double-flow attention and gating fusion
CN117010407A
Industry knowledge base system and method based on entity link and relation extraction
CN117151220A
Cross-modal positive and negative semantic classification method based on text emotion and image content perception
CN118690259A
Semantically-aware image-based visual localization
US20200357143A1
Cited By
Calculation power distribution method and system for cloud computing platform to support edge collaboration
CN122395201A
A cloud computing platform supports edge coordination computing power allocation method and system
CN122395201B