Search engine system based on text sentiment analysis

By introducing emotional polarization index and expected violation index into the search engine system, the problem of satirical language misjudgment is solved, and more accurate sentiment analysis is achieved, helping companies effectively deal with market feedback and uncertainty.

CN119577110AActive Publication Date: 2025-03-07INFORMATION & COMM BRANCH OF STATE GRID JIANGSU ELECTRIC POWER
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411617129.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-07
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

Existing search engines based on text sentiment analysis are prone to misjudgment when dealing with satirical language, resulting in companies incorrectly classifying satirical negative reviews as positive feedback when monitoring products or brand reputation.

Method used

Introduce emotional polarization index and expected violation index, and accurately capture negative emotions in complex emotions and ironic language through real-time parameter capture and storage module, abnormal analysis and model comparison module, risk assessment module and response measures module, and avoid misjudgment.

Benefits of technology

It effectively avoids misjudgment as positive feedback, improves the accuracy and robustness of sentiment analysis, ensures that companies can timely identify and respond to negative emotions in the public, and avoids business losses and brand image damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577110A_ABST
    Figure CN119577110A_ABST
Patent Text Reader

Abstract

The invention discloses a search engine system based on text sentiment analysis, which relates to the technical field of search engines, and comprises a real-time parameter capture and storage module, an exception analysis and model comparison module, a risk assessment module and a response measure module, each text can generate a series of parameters, and the parameters generated when the sentiment analysis model carries out text analysis are captured and stored in real time, so that low delay and integrity of data flow are ensured. According to the method, the emotion polarization index and the expected violation index are introduced, so that the system accurately captures complex emotions, and misjudgment is avoided. Real-time parameter capture guarantees low delay, and machine learning multi-level analysis improves robustness. Through low, medium and high risk grading, the system realizes on-demand intervention and resource optimization, avoids business loss and brand image damage, and ensures that an enterprise efficiently deals with market feedback and uncertainty.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of search engines, and in particular to a search engine system based on text sentiment analysis. Background Art

[0002] A search engine based on text sentiment analysis is an intelligent system that uses natural language processing (NLP) and sentiment analysis technology to help users obtain search results related to sentiment tendencies. It can not only identify and understand the user's query content, but also analyze the sentiment tendencies of texts such as documents, comments and articles on the Internet, such as positive, negative or neutral emotions. Unlike traditional search engines that are mainly based on keyword matching and page relevance sorting, sentiment analysis search engines pay more attention to the subjective information of the text, such as user emotions, opinion tendencies or evaluations in specific situations. This allows it to provide more expected results when users query sentiment-related information such as product reviews or event emotions. Its advantage is that it can provide a more accurate and personalized experience. For example, when a user wants to know the reputation of a product, the system not only displays relevant information, but also filters positive or negative reviews to present more valuable feedback. This type of engine is particularly useful in e-commerce, social media public opinion monitoring and other fields, helping users quickly obtain the required sentiment information. At the same time, it can also be applied to the news field to filter reports with specific sentiment tendencies, or to assist companies in identifying and responding to the public's negative emotions in crisis management. Therefore, search engines based on sentiment analysis not only expand the depth of information retrieval, but also significantly improve users' search experience and efficiency.

[0003] The search engine based on text sentiment analysis is implemented through natural language processing (NLP) and machine learning models. Its working principle includes several key steps. First, when the user enters a query, the system will segment the query content and remove meaningless words, and use the intent recognition model to analyze the user's real needs. For example, when the user enters "well-reviewed mobile phones", the system can recognize that the user wants to find products with positive reviews. Then, the search engine crawls massive data from the Internet, such as comments, news, and social media dynamics, and cleans and formats the data to convert the text into structured data for subsequent analysis. The core part is the application of sentiment analysis models. The system uses models such as BERT or Transformer to identify the sentiment tendency of the text, such as positive, negative, or neutral emotions, and further analyzes the intensity and type of sentiment in advanced systems. After the analysis is completed, the system generates sentiment tags for each text and stores them together with keywords in the database to build an index. After the user query is matched with the database, the system sorts the results according to the keyword matching degree and sentiment tags, and optimizes the sorting based on information such as time, click-through rate, and user feedback. Finally, the system displays the sentiment results that meet the user's needs and marks the sentiment tendency on the interface to facilitate users to make quick judgments. In addition, the search engine will continuously optimize its models and algorithms through user feedback to improve the experience. This sentiment analysis-driven search engine is not only suitable for e-commerce and social media monitoring, but also plays an important role in crisis public relations and market intelligence.

[0004] The prior art has the following deficiencies:

[0005] When search engines perform sentiment analysis on captured text data, sarcastic language uses positive words but actually expresses negative emotions. For example, "This phone is awesome, but it broke after two days of use." In this case, the sentiment analysis model may misjudge such sentences as positive comments, ignoring their potential negative meanings. This misjudgment can cause companies to mistakenly classify sarcastic negative comments as positive feedback when monitoring product or brand reputation, leading companies to mistakenly believe that the market is highly satisfied with their products, thereby ignoring hidden product problems or customer dissatisfaction. If companies fail to detect these problems in a timely manner and take corrective measures, they may miss opportunities to optimize products and services, and trigger a public relations crisis after problems accumulate.

[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 search engine system based on text sentiment analysis. By introducing the sentiment polarization index and the expectation violation index, the system accurately captures complex emotions and negative emotions in sarcastic language to avoid misjudging positive feedback. Real-time parameter capture ensures low latency and integrity, and multi-level analysis of machine learning models enhances system robustness. Under the three risk levels of low, medium and high, the system implements on-demand intervention and resource optimization. Log monitoring is performed when the risk is low, alarms are triggered and backup model adjustments are made when the risk is medium, and models are quickly switched and audited and repaired when the risk is high, avoiding business losses and damage to brand image, ensuring that enterprises efficiently respond to market feedback and uncertainty, so as 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 search engine system based on text sentiment analysis, comprising a real-time parameter capture and storage module, an abnormality analysis and model comparison module, a risk assessment module and a countermeasure module:

[0009] Real-time parameter capture and storage module: During the sentiment analysis process, each text will generate a series of parameters. The parameters generated by the sentiment analysis model during text analysis are captured and stored in real time to ensure low latency and integrity of data flow.

[0010] The anomaly analysis and model comparison module analyzes the anomalies of the acquired parameter information and inputs the parameter information after anomaly analysis into the pre-trained machine learning model to determine whether there are potential errors in the current sentiment analysis through feature comparison;

[0011] The risk assessment module further analyzes the analysis process with potential errors based on the analysis results of the machine learning model and identifies the risk level of potential errors;

[0012] The response module takes different response measures according to different risk levels.

[0013] Preferably, the parameters generated by the sentiment analysis model when performing text analysis include sentiment complexity information and expectation consistency information. Sentiment complexity information refers to the situation where multiple emotions appear simultaneously in the text and conflict or intertwine with each other. Expectation consistency information is used to measure whether the text expression meets the user's expectations or conventional cognition, reflecting the degree of consistency between the user experience and their original expectations.

[0014] Preferably, after obtaining the sentiment complexity information and expected consistency information generated by the sentiment analysis model when performing text analysis, the sentiment complexity information is subjected to an abnormal analysis to generate a sentiment polarization index, and the expected consistency information is subjected to an abnormal analysis to generate an expected violation index. The generated sentiment polarization index and expected violation index are input into a pre-learned machine learning model, and an analysis anomaly index is generated through the machine learning model. The analysis anomaly index is used to determine whether there are potential errors in the current sentiment analysis.

[0015] Preferably, the analysis anomaly index generated when the sentiment analysis model performs text analysis is compared with a preset reference threshold of the analysis anomaly index to determine whether there is a potential error in the current sentiment analysis. The analysis results are as follows:

[0016] If the analysis anomaly index is greater than or equal to a preset analysis anomaly index reference threshold, the text analysis state of the sentiment analysis model is classified as a potential error analysis state;

[0017] If the analysis anomaly index is less than a preset analysis anomaly index reference threshold, the text analysis state of the sentiment analysis model is classified as a correct analysis state.

[0018] Preferably, when the text analysis process of the sentiment analysis model is divided into a potential error analysis state, a plurality of analysis anomaly indexes generated by the subsequent process of the text analysis of the sentiment analysis model are continuously obtained to establish a data set for comprehensive analysis, and the analysis anomaly index in the analysis set is compared with the first-level reference threshold, the second-level reference threshold and the analysis anomaly index reference threshold, wherein the second-level reference threshold is greater than the first-level reference threshold, and the first-level reference threshold is greater than the analysis anomaly index reference threshold, and the analysis anomaly index is compared and analyzed with the second-level reference threshold, the first-level reference threshold and the analysis anomaly index reference threshold, and the number of analysis anomaly indices that are less than the first-level reference threshold and greater than or equal to the analysis anomaly index reference threshold is calibrated as La, the number of analysis anomaly indices that are less than the second-level reference threshold and greater than or equal to the first-level reference threshold is calibrated as Lb, and the number of analysis anomaly indices that are greater than or equal to the second-level reference threshold is calibrated as Lc;

[0019] Comprehensively analyze La, Lb, and Lc to generate the risk level coefficient RLC based on the following formula:

[0020]

[0021] , where k1, k2, k3 are the preset proportional coefficients of La, Lb, Lc, respectively, and k1, k2, k3 are all greater than 0.

[0022] Preferably, the generated risk level coefficient is compared and analyzed with the preset first risk level coefficient reference threshold and the second risk level coefficient reference threshold to determine the risk level of the potential error analysis state. The comparison and analysis results are as follows:

[0023] If the risk level coefficient is less than a preset risk level coefficient reference threshold, the potential error analysis state is classified as a low-risk potential error analysis;

[0024] If the risk level coefficient is greater than or equal to the first risk level coefficient reference threshold and less than the second risk level coefficient reference threshold, the potential error analysis state is classified as a medium risk potential error analysis;

[0025] If the risk level coefficient is greater than the second risk level coefficient reference threshold, the potential error analysis state is classified as a high-risk potential error analysis.

[0026] Preferably, under the detection window, the logic of performing abnormal analysis on the emotion complexity information to generate the emotion polarization index is as follows:

[0027] Under the detection window, the text to be analyzed is broken down into multiple emotion categories, and each emotion category is assigned an emotion intensity score through the emotion classification model. The emotion distribution vector generated by each text is calibrated as V s , where s∈{pos,neg,neu}, pos represents positive emotion, neg represents negative emotion, neu represents neutral emotion, and the value of each element of the emotion distribution vector is the emotion intensity score, expressed as follows: V s = {P pos , P neg , P neu}, where P pos is the intensity score of positive emotion, P neg is the intensity score of negative sentiment, P neu is the intensity score of neutral emotion;

[0028] The opposition function is defined to measure the difference between two sentiment categories. The calculation expression is as follows:

[0029]

[0030] , where D(s1, s2) is the degree of opposition between two emotion categories, represents the intensity score of sentiment category s1 in the text, represents the intensity score of sentiment category s2 in the text, s1 and s2 correspond to any sentiment category in the sentiment distribution vector, ∈ is a small constant to prevent the denominator from being zero, ensuring the stability of the calculation;

[0031] The D emotion category opposition degree D(s1, s2) is accumulated to generate the emotion polarization index. The calculation expression is as follows:

[0032]

[0033] Where EPI is the sentiment polarization index, (s1, s2)∈C is the combination of sentiment categories, and C is the set of all sentiment category combinations.

[0034] Preferably, within the detection window, the logic for performing anomaly analysis on the expected consistency information to generate an expected violation index is as follows:

[0035] In the detection window, the similarity analysis is performed between the input text and the preset expected model. The calculation expression is as follows:

[0036]

[0037] In the formula, S match is the similarity score between the text and the expected model, T i is the i-th keyword in the input text, M i is the i-th keyword in the expected model, n is the total number of keywords, and w i It is the weight of the keyword;

[0038] For each keyword T in the text i Calculate the degree of deviation from the expected model in the semantic space. The calculation expression is as follows:

[0039]

[0040] Where D shift Represents the total outlier point offset distance, E(T i ) is the keyword T in the input text i The vector embedding of E(M i ) is the keyword M in the expected model i The vector embedding of ||E(T i )-E(M i )|| is the Euclidean distance;

[0041] In order to capture the impact of the transition of emotion or context in a sentence on the expectation violation, the context transition influence coefficient is introduced, and the calculation expression is as follows:

[0042]

[0043] In the formula, C shift is the context transition influence coefficient, α is the adjustment coefficient, which is used to control the influence weight of transition words on the results, N contrast is the number of occurrences of transition words in the sentence, N totalis the total number of words in the sentence;

[0044] Combine the similarity score S of the text with the expected model match , the total outlier point offset distance D shift and context transition coefficient C shift , generate the expectation violation index, the calculation expression is as follows:

[0045]

[0046] Where EVI is the expectation violation index.

[0047] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0048] By introducing the sentiment polarization index and expectation violation index, the present invention enables the system to more accurately capture the negative emotions hidden in complex emotions and sarcastic language, avoiding misjudgment as positive feedback. The introduction of real-time parameter capture and storage modules ensures low-latency transmission and integrity of data, enabling the model to quickly capture potential errors and perform abnormal analysis. At the same time, the use of machine learning models for multi-level comparison and analysis further improves the robustness of the model. Even in the face of complex emotional expressions or deviations from expectations, the system can respond in a timely manner when errors first occur to avoid the accumulation of misjudgments. Comprehensive risk assessment and dynamic response mechanisms ensure that errors in the model's daily operations are no longer ignored, providing companies with more reliable sentiment analysis results and helping them gain a deeper understanding of market feedback.

[0049] The present invention divides risks into three categories: low, medium, and high, to ensure that enterprise resources can be reasonably allocated, to achieve on-demand intervention, and to avoid unnecessary manual intervention and waste of resources. In low-risk situations, log records and data accumulation are used for continuous monitoring to provide data support for subsequent model optimization. In medium-risk scenarios, the system will trigger an alarm and conduct manual review, while using backup models to make temporary adjustments to avoid excessive impact on the business. In high-risk situations, the system quickly switches to the backup model and generates a detailed audit report to ensure that model problems can be fixed in a timely manner. This multi-level response mechanism reduces the possibility of business losses, improves the flexibility and efficiency of the system in dealing with uncertainty, while avoiding damage to the brand image due to analytical errors, and ensures the healthy development of the relationship between the company and its customers. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] 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.

[0051] Figure 1 This is a system flow chart of a search engine system based on text sentiment analysis of the present invention. DETAILED DESCRIPTION

[0052] 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.

[0053] The present invention provides Figure 1 A search engine system based on text sentiment analysis is shown, characterized in that it includes a real-time parameter capture and storage module, an abnormality analysis and model comparison module, a risk assessment module, and a countermeasure module:

[0054] Real-time parameter capture and storage module: During the sentiment analysis process, each text will generate a series of parameters. The parameters generated by the sentiment analysis model during text analysis are captured and stored in real time to ensure low latency and integrity of data flow.

[0055] The parameters generated by the sentiment analysis model during text analysis include sentiment complexity information and expectation consistency information. Sentiment complexity information refers to the situation where multiple emotions appear simultaneously in the text and conflict or interweave with each other. Expectation consistency information is used to measure whether the text expression meets the user's expectations or conventional cognition, reflecting the degree of consistency between the user experience and their original expectations.

[0056] The anomaly analysis and model comparison module analyzes the anomalies of the acquired parameter information and inputs the parameter information after anomaly analysis into the pre-trained machine learning model to determine whether there are potential errors in the current sentiment analysis through feature comparison;

[0057] After obtaining the sentiment complexity information and expected consistency information generated by the sentiment analysis model during text analysis, after performing an abnormal analysis on the sentiment complexity information, a sentiment polarization index is generated; after performing an abnormal analysis on the expected consistency information, an expected violation index is generated; the generated sentiment polarization index and expected violation index are input into a pre-learned machine learning model; an analysis abnormality index is generated through the machine learning model; and whether there is a potential error in the current sentiment analysis is determined by analyzing the abnormality index;

[0058] During the text analysis process of sentiment analysis models, changes in sentiment complexity information often indicate that the text contains multiple emotions or conflicting expressions, which is a common feature of sarcastic language. Sarcastic language uses positive words on the surface (such as "awesome"), but the context or subsequent part of the sentence conveys implicit negative emotions (such as "it broke after two days of use"). Since sentiment analysis models usually rely on keyword weights, sentiment scores, and simple syntactic structures to judge emotions, they are prone to misjudgment when faced with such mixed emotions. The model may mistakenly assign high positive weights to these seemingly positive words, while ignoring turning points or implicit negative emotions. In particular, without introducing context changes, syntactic reversals, or sarcasm detection mechanisms, the model will classify such sentences as positive reviews and ignore their negative connotations. This misjudgment is particularly dangerous in product evaluation and user feedback monitoring, because companies may mistakenly believe that market satisfaction is high, while ignoring potential problems and customer dissatisfaction.

[0059] Under the detection window, the logic of abnormal analysis of emotional complexity information to generate the emotional polarization index is as follows:

[0060] Under the detection window, the text to be analyzed is broken down into multiple sentiment categories (such as positive, negative, and neutral), and each category of sentiment is assigned a sentiment intensity score through the sentiment classification model. The sentiment distribution vector generated for each text is calibrated as V s , where s∈{pos,neg,neu}, pos represents positive emotion, neg represents negative emotion, neu represents neutral emotion, and the value of each element of the emotion distribution vector is the emotion intensity score, expressed as follows: V s = {P pos , P neg , P neu}, where P pos is the intensity score of positive emotion (such as the weighted sum of praise or compliment words), P neg is the intensity score of negative sentiment (such as the sum of the word weights of criticism and dissatisfaction), P neu is the intensity score of neutral emotions (e.g., descriptive words without emotional tendencies);

[0061] The opposition function is defined to measure the difference between two emotion categories (such as the conflict between positive and negative emotions). The calculation expression is as follows:

[0062]

[0063] Where D(s1,s2) is the degree of opposition between two emotion categories (such as positive and negative emotions), represents the intensity score of sentiment category s1 in the text, It represents the intensity score of sentiment category s2 in the text. s1 and s2 correspond to any sentiment category in the sentiment distribution vector respectively, which is determined according to the context in the actual text. ∈ is a small constant to prevent the denominator from being zero, ensuring the stability of calculation.

[0064] The difference between two emotion categories refers to the conflict, contradiction or inconsistency between the intensity, tendency and semantic expression of different emotion types in sentiment analysis. This difference is not only reflected in the numerical difference of emotion intensity, but also in the relationship between different categories of emotion in the language context. This difference is particularly important for detecting mixed emotions, sarcastic expressions or emotional transitions.

[0065] The core dimensions of the difference between two emotion categories

[0066] 1. Differences in emotional intensity

[0067] Definition: The degree to which two sentiment categories (such as positive and negative sentiment) differ in their intensity scores.

[0068] Function: When the scores of two emotion categories are close (such as positive emotion P pos =0.6 and negative emotions P neg =0.5), the system will consider the emotion complexity to be high, which may be sarcastic language or contradictory evaluation.

[0069] Example: "These headphones sound great, but the battery life is too short."

[0070] The positive emotion intensity in this sentence is high (good sound quality), but the negative emotion is also significantly present (bad battery), showing emotional conflict.

[0071] 2. Semantic opposition of sentiment categories

[0072] Definition: The semantic properties between different sentiment categories are essentially opposite. For example, positive sentiment and negative sentiment are in natural conflict.

[0073] Function: When positive and negative emotions appear in the same text at the same time, they will show emotional contradiction or opposition. This semantic opposition is an important basis for judging emotional complexity in sentiment analysis.

[0074] 3. Contextual relevance of emotion categories

[0075] Definition: Whether the association between two emotion categories is consistent with the contextual logic. If a certain emotion category appears in a context that does not match it, the difference increases.

[0076] What it does: For example, if a compliment is mixed with a derogatory description, or a positive modifier is added to a negative comment, the system needs to determine whether there is irony or contradiction based on the context.

[0077] Example: "The service was 'terrific'. We waited two hours for our food to arrive."

[0078] The emotional difference between the surface positive emotion ("great") and the actual experience ("wait for two hours") is huge, which means that the sentiment analysis system needs to capture this semantic contradiction.

[0079] 4. Temporal or syntactic transitions

[0080] Definition: The sentiment within the text changes and shifts in different time periods or syntactic structures. For example, the first half is a positive evaluation, while the second half is a negative evaluation.

[0081] Effect: This transition will increase the differences between sentiment categories. The system needs to recognize the existence of this transition to avoid misjudgment.

[0082] Example: "This phone looked great, but it broke after a few days of use."

[0083] The first half of the sentence has positive sentiment, while the second half turns to negative sentiment. The difference between the sentiment categories indicates that the user is actually dissatisfied.

[0084] The D emotion category opposition degree D(s1,s2) is accumulated to generate the emotion polarization index. The calculation expression is as follows:

[0085]

[0086] Where EPI is the sentiment polarization index, (s1,s2)∈C is the combination of sentiment categories, and C is the set of all sentiment category combinations;

[0087] From the calculation expression of the sentiment polarization index, we can see that the larger the sentiment polarization index expression value generated after the abnormal analysis of the sentiment complexity information, the higher the sentiment complexity in the text, that is, there is an obvious emotional conflict or reversal, such as sarcastic language uses positive words on the surface, but the emotions it actually expresses are negative. In this case, because the model is easily disturbed by superficial positive words and ignores turning points or implicit negative emotions, the probability of misjudging as a positive evaluation will increase significantly. High polarization values ​​reflect the fierce opposition between positive and negative emotions in the sentence. If the model is not sensitive to such complex emotions, the risk of misidentification will increase. On the contrary, when the sentiment polarization index expression value is smaller, the expression of emotions is more single and consistent, and the possibility of sarcastic language or irony is lower. Therefore, the risk of the model misjudging negative emotions as positive evaluations is relatively small.

[0088] During the text analysis process of the sentiment analysis model, the change in expected consistency indicates that the user's actual experience or emotional expression deviates from the conventional expectation, which is an important feature of sarcastic language. Although the expression of sarcastic language uses positive words on the surface (such as "awesome" and "excellent"), these words convey negative emotions in the specific context (such as "this phone is awesome, it broke after two days of use"). This expression breaks the user's usual emotional expression logic, making it difficult for the sentiment analysis model to accurately judge the emotional tendency through keywords or simple sentiment classification. If the model only relies on the positive and negative emotional tendencies of the surface words and ignores the semantics and emotional transitions of the context, misjudgment will occur and sarcastic expressions will be misclassified as positive comments. As a result, the system ignores the potential negative meaning and fails to capture the user's dissatisfaction and disappointment. This misjudgment will cause companies to mistakenly believe that the market feedback is good when monitoring brand public opinion or analyzing product evaluations, ignoring the hidden negative emotions, thereby missing the opportunity to discover and solve problems, which may eventually lead to greater customer churn or public relations crises.

[0089] Under the detection window, the logic of performing anomaly analysis on expected consistency information to generate the expected violation index is as follows:

[0090] In the detection window, the similarity analysis is performed between the input text and the preset expected model. The calculation expression is as follows:

[0091]

[0092] In the formula, S match is the similarity score between the text and the expected model, T i is the i-th keyword in the input text, M i is the i-th keyword in the expected model, n is the total number of keywords, and w i It is the weight of the keyword;

[0093] The expectation model is a reference template constructed based on historical data and general cognition, describing the user's reasonable expectations for a specific scenario (such as a product or service).

[0094] For each keyword T in the text i Calculate the degree of deviation from the expected model in the semantic space. The calculation expression is as follows:

[0095]

[0096] Where D shift Represents the total outlier point offset distance, E(T i ) is the keyword T in the input text i The vector embedding of E(M i ) is the keyword M in the expected model iThe vector embedding of ||E(T i )-E(M i )|| is the Euclidean distance, which is used to calculate the keyword T in the text i The keyword M in the period model i The Euclidean distance in the semantic vector space quantifies the degree of semantic deviation between the two words;

[0097] Vector embedding is the process of converting words, phrases or sentences in a text into high-dimensional continuous vectors through mathematical models, so that they can represent semantic features and relationships in the vector space. The embedding vector captures the semantic similarities and differences of words in context, and maps the originally discrete language data into a structure that can be used for mathematical operations and machine learning analysis. Common vector embedding methods include Word2Vec, GloVe, BERT, etc. They generate embedded representations for each word through large-scale corpus training, so that semantically similar words (such as "king" and "queen") are close in distance in the vector space, while semantically unrelated words (such as "king" and "car") are far away. In this way, the model can perform deeper semantic analysis, such as sentiment classification, similarity matching, and anomaly detection. The dimensions of the embedding vector are usually tens to hundreds of dimensions, allowing the system to efficiently process complex language information.

[0098] In order to capture the impact of the transition of emotion or context in a sentence on the expectation violation, the context transition influence coefficient is introduced, and the calculation expression is as follows:

[0099]

[0100] In the formula, C shift is the context transition influence coefficient, α is the adjustment coefficient, which is used to control the influence weight of transition words on the results, N contrast is the number of occurrences of transition words in the sentence, N total is the total number of words in the sentence;

[0101] In sentiment analysis, the transition of emotions or contexts can have a significant impact on the judgment of expectation violation. Such transitions are usually reflected in specific sentence patterns (such as transition words or causal sentence patterns), suggesting that user feedback may not meet expectations. The following details the key factors that affect sentiment transitions and how to capture them:

[0102] 1. The influence of transition words

[0103] describe:

[0104] Transition words in sentences (such as "but", "however", and "although") often indicate a reversal of emotions. These words usually connect the semantics and emotions of the preceding and following sentences, making the true emotion expressed as a whole not as positive as it appears. For example:

[0105] Example: "This phone looks great, but the battery life is terrible."

[0106] On the surface, there is a positive evaluation ("the appearance is beautiful"), but the transition word "but" reveals the user's dissatisfaction and the main emotional tendency is negative.

[0107] Influence:

[0108] If these transition words are ignored, the sentiment analysis model may misjudge the sentence as positive. Therefore, the system needs to introduce transition word detection and increase their weight on the overall sentiment judgment to avoid misclassification.

[0109] 2. Contextual coherence and contextual variation

[0110] describe:

[0111] In long or multi-sentence expressions, the coherence and changes of the preceding and following contexts will affect the interpretation of emotions. For example, a user may express satisfaction first and then make a serious complaint. For such context changes, the system needs to weight the emotions of the preceding and following sentences to capture the user's true feelings:

[0112] Example: "I am very satisfied with the environment of this hotel, but the quality of service is far from what I expected."

[0113] Influence:

[0114] If the system only analyzes the emotion of the first half of the sentence, it may mistakenly think that the user is satisfied. However, the emotional expression of the second half of the sentence is the real core. Therefore, the system needs to analyze the contextual transition between the first and second sentences and improve its sensitivity to contextual changes.

[0115] 3. The influence of causal sentences

[0116] describe:

[0117] Some sentences use cause and effect to show that an event or experience brings about a specific result, and the hidden emotion is often revealed through the result part. For example:

[0118] Example: "I have a very bad impression of this company because of the slow response time from the customer service."

[0119] Although a neutral statement appears in the sentence (“customer service response”), the result expresses a strong negative emotion.

[0120] Influence:

[0121] The system must identify the core sentiment in the causal relationship to avoid being misled by the preceding description (such as customer service response). Negative sentiment in causal sentences is usually concentrated in the result part and should be given more weight.

[0122] 4. Adjust the weight of emotion intensity

[0123] describe:

[0124] In sentences with emotional transitions, the emotional strength of different parts is often inconsistent. The system needs to perform a weighted calculation of the overall emotion based on the emotional strength after the transition. For example:

[0125] Example: "While the room was nice, I would never stay at this hotel again."

[0126] Although the first half of the sentence gives positive feedback, the second half has a stronger negative sentiment and implies the user's final attitude.

[0127] Influence:

[0128] The system needs to dynamically adjust the overall judgment based on the intensity of the emotion. For example, the emotional intensity of each part of the sentence can be calculated through semantic embedding, and more weight can be given to important parts to ensure that the analysis results accurately reflect the user's true emotions.

[0129] When capturing emotional or contextual transitions, the system needs to analyze transition words, contextual coherence, causal sentence patterns, and changes in emotional intensity, and achieve accurate emotional judgment through reasonable weight adjustment and parameter setting. Capturing these transitions is crucial to the generation of the expectation violation index, which can help the system identify hidden emotions in complex expressions and avoid misjudgment. At the same time, with the help of vector embedding and parameter models, the system can efficiently process multi-layer emotions and transition contexts, thereby improving the accuracy and sensitivity of the analysis.

[0130] Combine the similarity score S of the text with the expected model match , the total outlier point offset distance D shift and context transition coefficient C shift , generate the expectation violation index, the calculation expression is as follows:

[0131]

[0132] Where, EVI is the expectation violation index;

[0133] From the expression of the expectation violation index calculation, we can see that the larger the expectation violation index performance value generated after the abnormal analysis of the expectation consistency information, the more obvious the expectation violation is in the text, that is, positive words are used on the surface, but the context conveys negative emotions. In this case, the sentiment analysis model may misjudge it as a positive evaluation because it relies on the emotional tendency of the surface words, and the probability of ignoring the negative meaning behind it will be greater. For example, in a sentence like "This phone is awesome, it broke after two days of use", "awesome" is a positive word, but combined with the subsequent content, the overall emotion is negative. If the expectation violation index is low, it means that the emotional expression of the text is more direct and meets the user's expectations (such as "the phone is very good" or "the phone is very bad"), in which case the model is less likely to misjudge. Therefore, the expectation violation index can be used as an important signal for identifying sarcastic language. The larger the expectation violation index performance value, the greater the probability of misjudgment, and the model needs to further analyze the contextual relationship and emotional transition; conversely, the smaller the expectation violation index performance value, the higher the accuracy of the model analysis, and it is not easy to ignore the potential emotional reversal.

[0134] The machine learning model is not limited here, and any machine learning model that can comprehensively analyze the emotion polarization index EPI and the expectation violation index EVI to generate the analysis anomaly index AAI can be used. In order to realize the technical solution of the present invention, the present invention provides a specific implementation method:

[0135] The calculation formula for generating the analysis anomaly index AAI is: AAI=ln(EPI·f1+EVI·f2), where f1 and f2 are the preset proportional coefficients of the emotional polarization index EPI and the expectation violation index EVI, respectively, and both f1 and f2 are greater than 0.

[0136] It can be seen from the calculation expression of the analysis anomaly index that, under the detection window, the larger the performance value of the sentiment polarization index generated after the abnormal analysis of the sentiment complexity information, the larger the performance value of the expectation violation index generated after the abnormal analysis of the expected consistency information, that is, the larger the performance value of the generated analysis anomaly index, the greater the probability of misjudgment when the sentiment analysis model performs text analysis, and vice versa, the smaller the probability of prediction when the sentiment analysis model performs text analysis.

[0137] The analysis anomaly index generated by the sentiment analysis model during text analysis is compared with the pre-set reference threshold of the analysis anomaly index to determine whether there are potential errors in the current sentiment analysis. The analysis results are as follows:

[0138] If the analysis anomaly index is greater than or equal to a preset analysis anomaly index reference threshold, the text analysis state of the sentiment analysis model is classified as a potential error analysis state;

[0139] If the analysis anomaly index is less than a preset analysis anomaly index reference threshold, the text analysis state of the sentiment analysis model is classified as a correct analysis state;

[0140] The risk assessment module further analyzes the analysis process with potential errors based on the analysis results of the machine learning model and identifies the risk level of potential errors;

[0141] After the text analysis process of the sentiment analysis model is divided into a potential error analysis state, a number of analysis anomaly indexes generated by the subsequent process of the text analysis of the sentiment analysis model are continuously obtained to establish a data set for comprehensive analysis, and the analysis anomaly index in the analysis set is compared with the first-level reference threshold, the second-level reference threshold, and the analysis anomaly index reference threshold, wherein the second-level reference threshold is greater than the first-level reference threshold, and the first-level reference threshold is greater than the analysis anomaly index reference threshold, and the analysis anomaly index is compared and analyzed with the second-level reference threshold, the first-level reference threshold, and the analysis anomaly index reference threshold, and the number of analysis anomaly indices that are less than the first-level reference threshold and greater than or equal to the analysis anomaly index reference threshold is calibrated as La, the number of analysis anomaly indices that are less than the second-level reference threshold and greater than or equal to the first-level reference threshold is calibrated as Lb, and the number of analysis anomaly indices that are greater than or equal to the second-level reference threshold is calibrated as Lc;

[0142] Comprehensively analyze La, Lb, and Lc to generate the risk level coefficient RLC based on the following formula:

[0143]

[0144] , where k1, k2, k3 are the preset proportional coefficients of La, Lb, Lc respectively, and k1, k2, k3 are all greater than 0.

[0145] From the risk level coefficient calculation expression, it can be seen that the larger the risk level coefficient performance value, the more serious the potential error analysis state that occurs when the sentiment analysis model performs text analysis, and vice versa, the less serious the potential error analysis state that occurs when the sentiment analysis model performs text analysis;

[0146] The generated risk level coefficient is compared and analyzed with the preset first risk level coefficient reference threshold and the second risk level coefficient reference threshold to determine the risk level of the potential error analysis state. The comparison and analysis results are as follows:

[0147] If the risk level coefficient is less than a preset risk level coefficient reference threshold, the potential error analysis state is classified as a low-risk potential error analysis;

[0148] If the risk level coefficient is greater than or equal to the first risk level coefficient reference threshold and less than the second risk level coefficient reference threshold, the potential error analysis state is classified as a medium risk potential error analysis;

[0149] If the risk level coefficient is greater than the second risk level coefficient reference threshold, the potential error analysis state is classified as a high-risk potential error analysis;

[0150] The response module takes different response measures according to different risk levels;

[0151] Countermeasures for low-risk potential error analysis

[0152] For low-risk potential error analysis, due to the low risk level coefficient, it means that the model's errors have a slight impact on the overall system and may be within the normal error range. Therefore, logging and continuous monitoring can be used. Specifically, the system will record the error analysis status and its corresponding analysis anomaly index in the log, and track it through periodic data analysis tools (such as monitoring panels). At this time, there is no need to take immediate intervention measures. The system will analyze the model performance based on the accumulated error data and provide data support for future model optimization. This method not only avoids unnecessary waste of resources, but also ensures the robustness of the system in long-term operation.

[0153] Countermeasures for medium-risk potential error analysis

[0154] When the error status is classified as medium risk, it indicates that the error may have a certain business impact on the system and requires semi-automatic intervention and manual review. The system will trigger the preset alarm mechanism and send detailed information of the analysis error (such as anomaly index and related text content) to the designated review queue for review by a manual analyst. The system will also use backup models or preset error handling rules to temporarily adjust the subsequent sentiment analysis process to ensure that the accuracy of the analysis results will not deteriorate further. Such measures are suitable for scenarios where the business has not yet been seriously damaged, but risks need to be controlled in advance.

[0155] Countermeasures for high-risk potential error analysis

[0156] When the error status is judged as high risk, it means that the model's erroneous analysis may have a serious impact on the business and requires urgent intervention and comprehensive response. In this case, the system will immediately switch to the backup sentiment analysis model or roll back to the last stable version, and suspend the use of the current model. The system will generate a detailed analysis report and submit it to the technical team for quick repair. It may also introduce an expert review mechanism to re-label specific data sets and fine-tune the model. In addition, a comprehensive audit of the model's historical data and analysis process is required to prevent similar problems from happening again. This emergency response ensures that the system can be restored to stability as soon as possible to avoid major damage to the business and brand image.

[0157] By introducing the sentiment polarization index and expectation violation index, the present invention enables the system to more accurately capture the negative emotions hidden in complex emotions and sarcastic language, avoiding misjudgment as positive feedback. The introduction of real-time parameter capture and storage modules ensures low-latency transmission and integrity of data, enabling the model to quickly capture potential errors and perform abnormal analysis. At the same time, the use of machine learning models for multi-level comparison and analysis further improves the robustness of the model. Even in the face of complex emotional expressions or deviations from expectations, the system can respond in a timely manner when errors first occur to avoid the accumulation of misjudgments. Comprehensive risk assessment and dynamic response mechanisms ensure that errors in the model's daily operations are no longer ignored, providing companies with more reliable sentiment analysis results and helping them gain a deeper understanding of market feedback.

[0158] The present invention divides risks into three categories: low, medium, and high, to ensure that enterprise resources can be reasonably allocated, to achieve on-demand intervention, and to avoid unnecessary manual intervention and waste of resources. In low-risk situations, log records and data accumulation are used for continuous monitoring to provide data support for subsequent model optimization. In medium-risk scenarios, the system will trigger an alarm and conduct manual review, while using backup models to make temporary adjustments to avoid excessive impact on the business. In high-risk situations, the system quickly switches to the backup model and generates a detailed audit report to ensure that model problems can be fixed in a timely manner. This multi-level response mechanism reduces the possibility of business losses, improves the flexibility and efficiency of the system in dealing with uncertainty, while avoiding damage to the brand image due to analytical errors, and ensures the healthy development of the relationship between the company and its customers.

[0159] 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 search engine system based on text sentiment analysis, characterized in that: It includes real-time parameter capture and storage module, abnormal analysis and model comparison module, risk assessment module and countermeasures module: Real-time parameter capture and storage module: During the sentiment analysis process, each text will generate a series of parameters. The parameters generated by the sentiment analysis model during text analysis are captured and stored in real time to ensure low latency and integrity of data flow. The anomaly analysis and model comparison module analyzes the anomalies of the acquired parameter information and inputs the parameter information after anomaly analysis into the pre-trained machine learning model to determine whether there are potential errors in the current sentiment analysis through feature comparison; The risk assessment module further analyzes the analysis process with potential errors based on the analysis results of the machine learning model and identifies the risk level of potential errors; The response module takes different response measures according to different risk levels.

2. A search engine system based on text sentiment analysis according to claim 1, characterized in that: The parameters generated by the sentiment analysis model when performing text analysis include sentiment complexity information and expectation consistency information. Sentiment complexity information refers to the situation where multiple emotions appear simultaneously in the text and conflict or intertwine with each other. Expectation consistency information is used to measure whether the text expression meets the user's expectations or conventional cognition, reflecting the degree of consistency between the user experience and their original expectations.

3. A search engine system based on text sentiment analysis according to claim 2, characterized in that: After obtaining the sentiment complexity information and expected consistency information generated by the sentiment analysis model during text analysis, the sentiment complexity information is analyzed for anomalies to generate a sentiment polarization index, and the expected consistency information is analyzed for anomalies to generate an expected violation index. The generated sentiment polarization index and expected violation index are input into a pre-learned machine learning model, and an analysis anomaly index is generated through the machine learning model. The analysis anomaly index is used to determine whether there are potential errors in the current sentiment analysis.

4. A search engine system based on text sentiment analysis according to claim 3, characterized in that: The analysis anomaly index generated by the sentiment analysis model during text analysis is compared with the pre-set reference threshold of the analysis anomaly index to determine whether there are potential errors in the current sentiment analysis. The analysis results are as follows: If the analysis anomaly index is greater than or equal to a preset analysis anomaly index reference threshold, the text analysis state of the sentiment analysis model is classified as a potential error analysis state; If the analysis anomaly index is less than a preset analysis anomaly index reference threshold, the text analysis state of the sentiment analysis model is classified as a correct analysis state.

5. A search engine system based on text sentiment analysis according to claim 4, characterized in that: When the text analysis process of the sentiment analysis model is divided into a potential error analysis state, a number of analysis anomaly indexes generated by the subsequent process of the text analysis of the sentiment analysis model are continuously obtained to establish a data set for comprehensive analysis, and the analysis anomaly index in the analysis set is compared with the first-level reference threshold, the second-level reference threshold, and the analysis anomaly index reference threshold, wherein the second-level reference threshold is greater than the first-level reference threshold, and the first-level reference threshold is greater than the analysis anomaly index reference threshold, and the analysis anomaly index is compared and analyzed with the second-level reference threshold, the first-level reference threshold, and the analysis anomaly index reference threshold, and the number of analysis anomaly indices that are less than the first-level reference threshold and greater than or equal to the analysis anomaly index reference threshold is calibrated as La, the number of analysis anomaly indices that are less than the second-level reference threshold and greater than or equal to the first-level reference threshold is calibrated as Lb, and the number of analysis anomaly indices that are greater than or equal to the second-level reference threshold is calibrated as Lc; Comprehensively analyze La, Lb, and Lc to generate the risk level coefficient RLC based on the following formula: Wherein, k1, k2, k3 are preset proportional coefficients of La, Lb, Lc respectively, and k1, k2, k3 are all greater than 0.

6. A search engine system based on text sentiment analysis according to claim 5, characterized in that: The generated risk level coefficient is compared and analyzed with the preset first risk level coefficient reference threshold and the second risk level coefficient reference threshold to determine the risk level of the potential error analysis state. The comparison and analysis results are as follows: If the risk level coefficient is less than a preset risk level coefficient reference threshold, the potential error analysis state is classified as a low-risk potential error analysis; If the risk level coefficient is greater than or equal to the first risk level coefficient reference threshold and less than the second risk level coefficient reference threshold, the potential error analysis state is classified as a medium risk potential error analysis; If the risk level coefficient is greater than the second risk level coefficient reference threshold, the potential error analysis state is classified as a high-risk potential error analysis.

7. A search engine system based on text sentiment analysis according to claim 3, characterized in that: Under the detection window, the logic of abnormal analysis of emotional complexity information to generate the emotional polarization index is as follows: Under the detection window, the text to be analyzed is broken down into multiple emotion categories, and each emotion category is assigned an emotion intensity score through the emotion classification model. The emotion distribution vector generated by each text is calibrated as V s , where s∈{pos,neg,neu}, pos represents positive emotion, neg represents negative emotion, neu represents neutral emotion, and the value of each element of the emotion distribution vector is the emotion intensity score, expressed as follows: V s = {P pos , P neg , P neu }, where P pos is the intensity score of positive emotion, P neg is the intensity score of negative sentiment, P neu is the intensity score of neutral emotion; The opposition function is defined to measure the difference between two sentiment categories. The calculation expression is as follows: Where D(s1, s2) is the degree of opposition between two sentiment categories. represents the intensity score of sentiment category s1 in the text, represents the intensity score of sentiment category s2 in the text, s1 and s2 correspond to any sentiment category in the sentiment distribution vector, ∈ is a small constant to prevent the denominator from being zero, ensuring the stability of the calculation; The D emotion category opposition degree D(s1, s2) is accumulated to generate the emotion polarization index. The calculation expression is as follows: Where EPI is the sentiment polarization index, (s1, s2)∈C is the combination of sentiment categories, and C is the set of all sentiment category combinations.

8. A search engine system based on text sentiment analysis according to claim 3, characterized in that: Under the detection window, the logic of performing anomaly analysis on expected consistency information to generate the expected violation index is as follows: In the detection window, the similarity analysis is performed between the input text and the preset expected model. The calculation expression is as follows: In the formula, S match is the similarity score between the text and the expected model, T i is the i-th keyword in the input text, M i is the i-th keyword in the expected model, n is the total number of keywords, and w i It is the weight of the keyword; For each keyword T in the text i Calculate the degree of deviation from the expected model in the semantic space. The calculation expression is as follows: Where D shift Represents the total outlier point offset distance, E(T i ) is the keyword T in the input text i The vector embedding of E(M i ) is the keyword M in the expected model i The vector embedding of ||E(T i )-E(M i )|| is the Euclidean distance; In order to capture the impact of the transition of emotion or context in a sentence on the expectation violation, the context transition influence coefficient is introduced, and the calculation expression is as follows: In the formula, C shift is the context transition influence coefficient, α is the adjustment coefficient, which is used to control the influence weight of transition words on the results, N contrast is the number of occurrences of transition words in the sentence, N total is the total number of words in the sentence; Combine the similarity score S of the text with the expected model match , the total outlier point offset distance D shift and context transition coefficient C shift , generate the expectation violation index, the calculation expression is as follows: Where EVI is the expectation violation index.

Citation Information

Patent Citations

  • Method and system for calculating text emotion index

    CN102929861A

  • Multilevel sentiment analysis method based on social media

    CN108804412A

  • Public opinion propagation force analysis method

    CN112395513A

  • Text analysis method and device and storage medium

    CN113971201A

  • Sentiment classification method and device and storage medium

    CN116975261A