Text sentiment analysis method and device based on large language model, equipment and medium

By employing multi-path parallel reasoning and multi-granularity sentiment analysis using a large language model, the accuracy and stability of sentiment analysis in financial texts are addressed, enabling in-depth understanding and stable analysis of complex financial texts.

CN122242521APending Publication Date: 2026-06-19SHENZHEN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN UNIV
Filing Date
2026-03-26
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately and reliably quantify management’s true sentiments from complex, technical, and often embellished financial texts, especially when faced with complex sentence structures and emerging terminology, leading to misjudgments and inconsistent results.

Method used

By employing multi-path parallel reasoning based on a large language model and multi-granularity sentiment analysis, target syntactic structures and domain-specific terms in financial texts are identified. Combined with semantic consistency and logical conflict resolution, the final sentiment analysis results are generated.

Benefits of technology

It significantly improves the accuracy and stability of sentiment analysis of financial texts, enhances the system's self-checking and self-correcting capabilities, and suppresses noise output and factual illusions through deep contextual understanding and verifiable reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122242521A_ABST
    Figure CN122242521A_ABST
Patent Text Reader

Abstract

This application discloses a text sentiment analysis method, apparatus, device, and medium based on a large language model (LLM), relating to the field of natural language processing technology. The method includes: acquiring financial text to be analyzed; performing multi-granularity sentiment analysis on the financial text based on preset prompts and a large language model (LLM), outputting multiple independent preliminary sentiment analysis results; wherein the preliminary sentiment analysis results at least include sentiment tendency and sentiment intensity scores; and integrating the multiple preliminary sentiment analysis results based on semantic consistency and logical conflict resolution using the LLM to generate a final sentiment analysis result. This application, by combining a multi-agent architecture, deeply customized multi-granularity parsing logic for financial text, and advanced integration strategies, eliminates the dependence on large-scale labeled data and significantly improves the accuracy of sentiment analysis by introducing semantic consistency analysis and logical conflict resolution reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing technology, and in particular to a method, apparatus, device and medium for text sentiment analysis based on a large language model. Background Technology

[0002] In the field of financial risk management, analyzing textual information in listed companies' annual reports, especially the "Management Discussion and Analysis" section, to provide early warnings of potential corporate misconduct has become an important technological requirement. Since parts of a listed company's annual report are written by management, they contain their subjective judgments and emotional biases regarding the company's situation, making them a crucial unstructured data source for capturing risk signals.

[0003] To address this challenge, the initial and widely adopted approach in existing technologies relies on predefined financial sentiment dictionaries for keyword matching and statistics. This method completely ignores linguistic context and is prone to failure when encountering complex sentence structures or emerging terms. Furthermore, while supervised learning-based machine learning models partially consider context, their performance heavily depends on massive amounts of high-quality manually labeled data and suffers from bottlenecks in processing long texts. In recent years, the rise of general-purpose large language models has brought new possibilities to this task, demonstrating their powerful contextual understanding capabilities. However, existing applications still have significant shortcomings: on the one hand, the inherent randomness of their generative output leads to inconsistent sentiment conclusions for the same text under different calls, and the output results are usually only discrete labels or single scores, lacking interpretable judgment criteria, making it difficult to establish effective trust in their output in serious scenarios such as financial risk control; on the other hand, due to the lack of structured reasoning processes and verifiable judgment reasons, when the model misjudges or faces complex semantic conflicts, users cannot trace, verify, or logically correct the output results, and it is even more difficult to stably integrate this black-box output into downstream prediction processes in a standardized and reproducible form.

[0004] Therefore, accurately and consistently quantifying the true emotional inclinations of management from complex, professional, and often embellished financial texts constitutes a core technical challenge in this field.

[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main purpose of this application is to provide a text sentiment analysis method based on a large language model, which aims to solve the technical problem of how to accurately and stably quantify the true sentiment of management from complex, professional, and often embellished financial texts.

[0007] To achieve the above objectives, this application proposes a text sentiment analysis method based on a large language model, the method comprising:

[0008] Obtain the financial text to be analyzed; Based on preset prompts and a large language model (LLM), multi-granularity sentiment analysis is performed on the financial text using parallel reasoning and multi-path thinking, outputting multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; The initial sentiment analysis results are integrated and processed based on the semantic consistency and logical conflict resolution of the large language model to generate the final sentiment analysis result.

[0009] In one embodiment, the step of obtaining the financial text to be analyzed is followed by: The financial text is cleaned to remove formatting tags, irrelevant characters, and preset templated statements to obtain intermediate text. Based on the intermediate text, the text content of the target chapter is extracted as the target analysis text.

[0010] In one embodiment, the preset prompt information includes a professional role for setting up the LLM to perform financial text analysis, a task description for performing sentiment analysis on the financial text and outputting quantitative results, and a structured output format for specifying the preliminary sentiment analysis results.

[0011] In one embodiment, the multi-granularity sentiment analysis performed on the financial text through multi-path parallel reasoning includes: The LLM is guided to identify target syntactic structures in the financial text, wherein the target syntactic structures include at least one or more of the following: concession structures, contrast structures, and comparison structures. Based on the identified target syntactic structure, the sentiment tendency in the financial text is determined.

[0012] In one embodiment, the multi-granularity sentiment analysis of the financial text through multi-path parallel reasoning further includes: Guide the LLM to identify domain-specific terms in the financial text; By considering the context of the domain-specific terminology in the financial text, the sentiment tendency of the domain-specific terminology in the current context is determined.

[0013] In one embodiment, the multi-granularity sentiment analysis of the financial text through multi-path parallel reasoning further includes: The LLM is guided to perform hierarchical sentiment quantification inference to evaluate the basic sentiment polarity and initial intensity of the sentiment-carrying units in the financial text. The moderating effect of syntactic structure on the initial value of the emotional intensity of the emotional carrying unit is analyzed, and the moderated clause-level emotional intensity is calculated. The sentiment intensity of each clause is integrated and normalized based on the overall rhetorical purpose and contextual tone of the sentences in the financial text, and the final sentiment intensity score is output.

[0014] In one embodiment, the step of integrating multiple preliminary sentiment analysis results based on the semantic consistency and logical conflict resolution of the large language model to generate the final sentiment analysis result includes: Based on the judgment reasoning text attached to multiple preliminary sentiment analysis results, the LLM is guided to perform semantic consistency analysis and logical conflict resolution reasoning. Based on the reasoning results, a set of fusion weights is generated for the multiple preliminary sentiment analysis results; Using the fusion weights, the sentiment tendency and sentiment intensity scores from multiple preliminary sentiment analysis results are weighted and fused to generate the final sentiment analysis result.

[0015] Furthermore, to achieve the above objectives, this application also proposes a text sentiment analysis device based on a large language model, the text sentiment analysis device based on a large language model comprising: The text acquisition module is used to acquire the financial text to be analyzed. The text parsing module is used to perform multi-granularity sentiment analysis on the financial text based on preset prompts and a large language model (LLM), and output multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; An integrated processing module is used to perform integrated processing on multiple preliminary sentiment analysis results based on the semantic consistency and logical conflict resolution of the large language model, and generate the final sentiment analysis result.

[0016] Furthermore, to achieve the above objectives, this application also proposes a text sentiment analysis device based on a large language model, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the text sentiment analysis method based on a large language model as described above.

[0017] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the text sentiment analysis method based on a large language model as described above.

[0018] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the text sentiment analysis method based on a large language model as described above.

[0019] One or more technical solutions proposed in this application have at least the following technical effects: This application acquires the financial text to be analyzed; based on preset prompts and a Large Language Model (LLM), it performs multi-granularity sentiment analysis on the financial text using multi-path parallel reasoning, outputting multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; the multiple preliminary sentiment analysis results are integrated and processed based on the semantic consistency and logical conflict resolution of the LLM to generate the final sentiment analysis result. This application significantly enhances the stability and reliability of the sentiment analysis results of financial text based on the LLM, while improving the accuracy of sentiment quantification in complex financial contexts by deeply utilizing the model's contextual understanding capabilities. By introducing semantic consistency analysis and logical conflict resolution reasoning, the system possesses self-checking and self-correcting cognitive capabilities, and resolves conflicts based on global semantic understanding. Combined with outputting verifiable judgment reasoning text, it suppresses the "noise output" and "factual illusion" common in professional financial text analysis tasks of the LLM. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating an embodiment of the text sentiment analysis method based on a large language model provided in this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the text sentiment analysis method based on a large language model in this application. Figure 3 This is a flowchart illustrating Embodiment 3 of the text sentiment analysis method based on a large language model provided in this application; Figure 4 This is a flowchart illustrating Embodiment 4 of the text sentiment analysis method based on a large language model in this application. Figure 5This is a flowchart illustrating Embodiment 5 of the text sentiment analysis method based on a large language model in this application. Figure 6 This is a schematic diagram of the module structure of the text sentiment analysis device based on a large language model according to an embodiment of this application; Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the text sentiment analysis method based on a large language model in the embodiments of this application.

[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0024] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0025] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0026] The existing technology has the problem of being unable to accurately and reliably quantify the true sentiment of management from complex, professional, and often embellished financial texts.

[0027] This application provides a solution to obtain financial text to be analyzed; based on preset prompts and a Large Language Model (LLM), perform multi-granularity sentiment analysis on the financial text using multi-path parallel reasoning, and output multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; and perform integrated processing on the multiple preliminary sentiment analysis results based on semantic consistency and logical conflict resolution of the LLM to generate the final sentiment analysis result.

[0028] Based on this, embodiments of this application provide a text sentiment analysis method based on a large language model, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the text sentiment analysis method based on a large language model according to this application.

[0029] In this embodiment, the text sentiment analysis method based on a large language model includes steps S10 to S30: Step S10: Obtain the financial text to be analyzed; It should be noted that, in this embodiment, financial text refers to unstructured textual materials published by financial institutions or entities that contain descriptions related to finance, operations, and risks. A typical example is the annual report of a listed company, particularly the "Management Discussion and Analysis" section. This embodiment can "obtain" such text from public data sources or internal databases through automated means, meaning that the target text content can be loaded into the analysis system of this application through application programming interface calls, web crawlers, file system reading, etc.

[0030] Optionally, the sources of the financial text include, but are not limited to, information disclosure websites designated by securities exchanges, databases of third-party financial data service providers (such as Wind and CSMAR), or PDF format announcement documents published by the company itself.

[0031] Step S20: Based on the preset prompts and the Large Language Model (LLM), perform multi-granularity sentiment analysis on the financial text using multi-path parallel reasoning, and output multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; It should be noted that this embodiment aims to address the dual shortcomings of traditional methods in analyzing financial text: superficial contextual understanding and unstable results. Here, "pre-set prompts" refers to a pre-designed set of text instructions to guide the Large Language Model (LLM) in completing a specific task. This typically includes a set of text instructions specifying role settings, task descriptions, and output format requirements. "Large Language Model (LLM)" refers to a deep learning model trained on massive amounts of data, possessing hundreds of billions or even trillions of parameters, capable of understanding and generating human language. It has powerful contextual understanding and instruction-following capabilities; typical examples include the ChatGLM series, GPT series, and Wenxin Yiyan series. "Multi-path parallel reasoning" refers to guiding the model to simultaneously activate multiple independent reasoning paths during a single model call using prompting engineering techniques (such as mind trees, mind maps, and multi-path sampling). Each path performs a complete sentiment analysis of the same input text from different perspectives or focuses, and the model output layer returns multiple independent and non-interfering analytical conclusions at once. "Multi-granularity sentiment analysis" refers to the process of analyzing text sentiment at multiple linguistic levels. Specifically, this includes: identifying sentiment-carrying units and their basic polarities at the lexical / phrase level; analyzing the moderating effect of syntactic structure on sentiment at the clause level; and comprehensively evaluating the overall sentiment tone and performing normalization calibration at the sentence level. "Multiple independent preliminary sentiment analysis results" refers to multiple sentiment analysis conclusions output by the model at once after parallel reasoning through multiple thought processes. Each conclusion is a complete analysis result object, and they are logically independent of each other, with no information sharing or mutual influence. "Sentiment tendency" typically refers to the polarity classification of the emotion expressed in the text, such as "positive," "negative," or "neutral." "Sentiment intensity score" is a quantifiable numerical value used to represent the strength of the sentiment tendency, for example, a continuous value between 0.0 and 1.0, where 0.5 represents neutral, closer to 0 indicates more negative, and closer to 1 indicates more positive.

[0032] This embodiment utilizes carefully designed prompts to "shape" a general-purpose large language model into a professional financial text analyst, enabling it to deeply understand the true meaning of complex syntax (such as transitions and concessions) and professional terms in specific contexts, thereby achieving accurate sentiment judgment. At the same time, by initiating multiple independent parsings in parallel (which can be understood as creating multiple independent "analysis agents"), the system can obtain multiple analytical perspectives on the same text. Thus, the semantic accuracy of sentiment judgment is significantly improved through deep contextual parsing, and by generating multiple independent results, conditions are created for obtaining stable conclusions.

[0033] Step S30: Integrate the multiple preliminary sentiment analysis results based on the semantic consistency and logical conflict resolution of the large language model to generate the final sentiment analysis result.

[0034] It should be noted that in this embodiment, "integration processing" refers to the process of combining, summarizing, and recalculating multiple independent preliminary sentiment analysis results according to predetermined rules or algorithms. "Final sentiment analysis result" refers to the sentiment judgment conclusion obtained after integration processing, which has higher stability and reliability and is the final output, including at least the finally determined sentiment tendency and sentiment intensity score.

[0035] Optionally, the integrated processing adopts a "majority voting-arithmetic mean" strategy, that is, firstly, the number of times the "sentiment tendency" label appears in multiple preliminary results is counted, and the label with the most occurrences is defined as the final sentiment tendency; then, the arithmetic mean of the "sentiment intensity scores" in all preliminary results is directly calculated as the final sentiment intensity score.

[0036] Optionally, the integration process can also be based on the "reasoning" text accompanying each preliminary result. The system can guide another large language model instance (or reuse the original model) to perform semantic consistency analysis and logical conflict resolution reasoning on these reasons, evaluate the argumentative strength of each preliminary conclusion, dynamically assign different integration weights to them, and then perform weighted voting and weighted averaging to generate the final result.

[0037] This embodiment treats multiple preliminary results as the opinions of an "expert committee" and uses specific algorithms (such as voting, weighted averaging, or more complex conflict resolution) to aggregate collective wisdom, thereby offsetting the bias or random errors of individual analyses and significantly enhancing the stability and reproducibility of sentiment analysis results.

[0038] In one possible implementation, the step of acquiring the financial text to be analyzed is followed by: The financial text is cleaned to remove formatting tags, irrelevant characters, and preset templated statements to obtain intermediate text. Based on the intermediate text, the text content of the target chapter is extracted as the target analysis text.

[0039] It should be noted that, in this embodiment, financial text specifically refers to electronic documents obtained from the public market or databases that contain descriptions of a company's operations and financial status, typically represented by listed companies' annual reports (10-K, annual reports, etc.). Text cleaning is a data preprocessing procedure aimed at removing machine-readable symbols and redundant content unrelated to natural language semantics from the original document. Specifically, this includes removing "formatting tags" such as HTML / XML, eliminating "irrelevant characters" such as garbled characters and extra spaces, and filtering out "pre-defined templated statements" that appear repeatedly in each disclosure, such as "The Board of Directors and all members of this company guarantee that the content of this report does not contain any false records, misleading statements or material omissions." Intermediate text refers to data that has been cleaned of surface noise and exists in plain text form but whose structure is not yet clear. "Extracting target chapters" involves locating and extracting the specific parts most valuable for risk analysis from the intermediate text based on the inherent chapter structure of the financial text (such as a table of contents or fixed headings). In this application, the target chapter specifically refers to the "Management Discussion and Analysis" (MD&A) section, and the finally extracted content is the "target analysis text."

[0040] Optionally, text cleaning can be achieved through a series of regular expression matching and replacement rules, adapting different cleaning rule sets to different document sources (such as PDF parsed text, HTML webpage source code). Furthermore, extracting target chapters can employ a combination of rule-based and natural language processing methods: first, initial location is achieved using key heading texts such as "Management Discussion and Analysis" and "Business Situation Discussion and Analysis" and their variations; if location fails, a pre-trained text classification model or sequence labeling model is activated to determine whether it belongs to the MD&A category based on paragraph content and contextual semantics.

[0041] This embodiment uses automated cleaning to eliminate the interference of format information and legal templates on the language model, ensuring that the model focuses on meaningful narrative content; by accurately extracting MD&A chapters, it focuses on the parts where management's subjective judgments and forward-looking statements are most concentrated, improving the signal-to-noise ratio and relevance of the analysis task from the data source.

[0042] In one possible implementation, the preset prompt information includes a professional role for setting up the LLM to perform financial text analysis, a task description for performing sentiment analysis on the financial text and outputting quantitative results, and a structured output format for specifying the preliminary sentiment analysis results.

[0043] It should be noted that this embodiment aims to address the engineering challenges of general-purpose LLM models when directly applied to professional fields, such as ambiguous task orientation, strong output randomness, and difficulty in integrating result formats. The "pre-defined prompts" are a set of pre-compiled text instructions designed to guide the Large Language Model (LLM) in completing specific analytical tasks. "Assigning a professional role to the LLM for financial text analysis" means explicitly assigning the model a virtual, professionally qualified identity at the beginning of the instruction (e.g., "You are an SEC-certified financial text analyst"). This aims to selectively activate knowledge modules and reasoning patterns related to financial analysis and risk identification from the model's vast pre-trained knowledge, enabling it to think from an expert's perspective and context. The core instruction is "Task description for performing sentiment analysis on the financial text and outputting quantitative results," which clearly and specifically defines the operations the model needs to perform. This typically includes requiring the model to classify the sentiment tendency of the input text (e.g., "positive" or "negative") and provide a quantitative "sentiment intensity score" (e.g., a value between [0.0, 1.0]), thereby transforming subjective language descriptions into objective, comparable data indicators. "Specify the structured output format of the preliminary sentiment analysis results" is a mandatory constraint on the output form of the model. For example, it requires that the results be returned in a machine-readable structured data format such as JSON or XML (such as a JSON object containing fixed fields such as "label" and "score"), which ensures that the analysis results can be stably and unambiguously parsed and used by downstream programs.

[0044] This embodiment guides the model into a professional state through "role setting", clarifies its specific work content and quantitative requirements through "task description", and locks in the delivery form of the results through "structured output format". The three constitute a complete instruction framework, which improves the alignment accuracy between the model output and the requirements of financial text analysis tasks.

[0045] Furthermore, referring to Figure 2 The second embodiment of the text sentiment analysis method based on a large language model in this application provides a flowchart, based on the above. Figure 2 The embodiment shown further refines the step of "performing multi-path parallel reasoning and multi-granularity sentiment analysis on the financial text" in step S20, including steps A201-A202: Step A201 guides the LLM to identify target syntactic structures in the financial text, wherein the target syntactic structures include at least one or more of the following: concession structures, contrast structures, and comparison structures. It should be noted that this embodiment aims to instruct the analysis system (specifically, the large language model it invokes) to actively scan and locate linguistic signals containing key logical relationships within the text. Here, "guidance" refers to issuing explicit, executable instructions to the large language model through the aforementioned preset prompts, focusing its attention on a specific analysis task. "Target syntactic structure" refers to a specific grammatical paradigm in natural language that can significantly alter or clarify the internal logical relationships and emotional focus of a sentence. "Concessive structure" refers to sentence patterns such as "although / although…, but / yet…" that first acknowledge a fact and then transition to introduce a more important viewpoint; its core lies in identifying the "concession" and "subject" parts. "Adversative structure" refers to sentence patterns introduced by conjunctions such as "however," "but," and "yet," indicating a opposite or relative change in semantics. "Comparative structure" refers to sentence patterns such as "relative to…," "compared to…," and "better / worse than…" that express comparative relationships; its key lies in identifying the two parties being compared and the result of the comparison.

[0046] Optionally, the prompts are not limited to keywords, but require the model to determine whether there are semantic concessions, transitions, or contrasts in the sentence, even if typical conjunctions are not used.

[0047] This embodiment leverages the deep understanding of natural language grammar and semantics of large language models to go beyond simple word matching and "understand" the logical structure within sentences. By identifying specific syntactic structures, the system can parse the rhetorical strategies used by management when making statements, such as whether they emphasize achievements after acknowledging difficulties (concessions) or whether they highlight their own advantages through selective comparisons, thereby significantly improving the contextual accuracy and depth of sentiment judgment.

[0048] Step A202: Based on the identified target syntactic structure, determine the sentiment tendency in the financial text.

[0049] It should be noted that in this embodiment, reasoning and synthesis are performed based on the target syntactic structure to make a clear classification decision on the emotional tone of the text as a whole or the dominant part. In this embodiment, emotional tendency specifically refers to discrete polarity categories such as "positive" or "negative," which is a qualitative summary of the emotional attitude expressed by the text.

[0050] The focus of this embodiment is to understand the "master-slave status" or "semantic focus" of each part in different syntactic structures, that is, to make a final judgment on the emotional color of the text by using the parsed syntactic logical relations.

[0051] Optionally, the system submits the original text fragments containing structures such as "concession / contrast / comparison" along with implicit guidance instructions to the LLM. For example, the instruction might simply state, "Please analyze the sentiment tendency of the following sentences, focusing on the impact of internal logical relationships on sentiment expression." The entire process, from structure recognition to sentiment determination, is autonomously completed by the LLM through its autoregressive reasoning. In another possible implementation, the system explicitly injects the output structured information (e.g., "Subordinate clause: content A, Main clause: content B, Relationship: contrast") into the LLM as context, but the LLM still autonomously decides how to weigh the sentiment weights of A and B, rather than imposing a preset rule of "main clause weight 100%".

[0052] This application's embodiments identify key syntactic structures (such as concession, contrast, and comparison) in financial texts by using a guided Large Language Model (LLM), and determine the dominant sentiment tendency of the text based on the logical master-slave relationship revealed by the structure. This effectively solves the problem of "false neutrality" misjudgment caused by traditional sentiment analysis methods ignoring contextual logic. By understanding complex syntax, it significantly improves the semantic accuracy and contextual reliability of sentiment tendency judgment in financial texts.

[0053] Furthermore, referring to Figure 3 The third embodiment of the text sentiment analysis method based on a large language model in this application provides a flowchart, based on the above. Figure 3 The embodiment shown further refines the step of "performing multi-path parallel reasoning and multi-granularity sentiment analysis on the financial text" in step S20, and also includes steps A301-A302: Step A301 guides the LLM to identify domain-specific terms in the financial text; It should be noted that in this embodiment, "domain-specific terms" refer to words or phrases with special meanings used in specific professional fields (here, finance, accounting, and business management). These terms may be difficult for non-professionals to understand or are prone to ambiguity, such as "off-balance sheet liabilities," "fair value measurement," "cash flow hedging," "goodwill impairment," "deleveraging," and emerging concepts such as "stablecoins" and "digital assets."

[0054] This embodiment leverages the extensive knowledge learned by the large language model during the pre-training phase from massive amounts of multi-source data (including a large number of financial documents and reports), enabling it to distinguish between general and specialized vocabulary. By proactively identifying domain-specific terms, the system shifts the focus of analysis from general narratives to professional discussions, thereby significantly improving the coverage and relevance of sentiment analysis in professional contexts.

[0055] Step A302: Based on the context of the domain-specific term in the financial text, determine the sentiment tendency of the domain-specific term in the current context.

[0056] It should be noted that this embodiment aims to address the core deficiency of traditional sentiment analysis methods based on fixed dictionaries, which completely fail when faced with specialized terminology. In making judgments, it considers not only the dictionary meaning of the term itself, but also its comprehensive understanding within the semantic context of the complete sentence, surrounding sentences, and even paragraphs in which it appears. Sentiment judgment refers to assessing whether the emotional tone conveyed by the term in the current specific language usage scenario is positive (e.g., indicating opportunity, advantage, gain), negative (e.g., indicating risk, loss, challenge), or neutral.

[0057] This embodiment relies on the powerful semantic understanding and contextual reasoning capabilities of the large language model to "disambiguate" and "assign sentiment" to the dynamic meaning of the same term in different contexts. It can dynamically and accurately grasp the true sentiment meaning of professional terms in specific disclosure situations, thereby avoiding systematic misjudgments caused by static word lists and the inability to handle emerging terms.

[0058] In one specific implementation, for the term "hedging" identified in the previous example, the system further guides the large language model to analyze its context. For the sentence "During the reporting period, the company used foreign exchange forward contracts to hedge against euro assets, effectively avoiding losses caused by exchange rate fluctuations," the model, considering the context of "effectively avoiding...losses," determines that the term "hedging" here conveys a positive, protective sentiment. However, for another sentence, "Due to adverse market fluctuations, the company's commodity futures hedging strategy failed to work, resulting in significant losses," the model, considering the context of "failed to work" and "recorded significant losses," determines that the term "hedging" here conveys a negative, loss-leading sentiment.

[0059] This application identifies technical terms in financial texts by using a guided Large Language Model (LLM) and dynamically determines the sentiment tendency of each term in the current context based on its specific context. It effectively solves the problem that traditional sentiment analysis methods cannot accurately understand the sentiment color of technical and emerging terms due to their reliance on static dictionaries. Through context-driven dynamic semantic disambiguation, it significantly improves the accuracy and adaptability of sentiment analysis in complex financial technical texts.

[0060] Furthermore, referring to Figure 4 The fourth embodiment of the text sentiment analysis method based on a large language model in this application provides a flowchart, based on the above. Figure 4 The embodiment shown further refines the step of "performing multi-path parallel reasoning and multi-granularity sentiment analysis on the financial text" in step S20, and also includes steps A401 to A403: Step A401: Guide the LLM to perform hierarchical sentiment quantification reasoning to evaluate the basic sentiment polarity and initial intensity values ​​of the sentiment-carrying units in the financial text; It should be noted that, in this embodiment, hierarchical sentiment quantification reasoning refers to the reasoning process in which the system, through preset prompts, instructs the large language model to deconstruct and quantify the sentiment information in financial texts according to a cognitive hierarchy from micro to macro. A sentiment-carrying unit refers to the smallest linguistic unit in the text capable of independently carrying or expressing sentiment information. Specifically, this includes lexical units, phrase units, and idiomatic expression units, such as words with clear emotional connotations (e.g., "growth," "challenge"), phrases (e.g., "better than expected," "facing pressure"), and idiomatic expressions (e.g., "leading the way"). Basic sentiment polarity refers to the inherent sentiment direction attribute of the unit itself, without considering contextual modifications and syntactic relationships; it is usually categorized as a discrete category of "positive," "negative," or "neutral." The initial intensity value is a preliminary quantitative estimate of the strength of the sentiment expressed by the unit.

[0061] This embodiment decomposes the input text into a series of emotion-carrying units, and then calls upon the embedded language knowledge to independently determine the emotional attributes and assign a preliminary intensity value to each unit, simulating the instantaneous emotional response of humans to keywords when reading.

[0062] In one specific implementation, for the sentence "The company's performance has achieved significant growth", the system guides the large language model to identify the sentiment-carrying unit "significant growth" and assess its basic sentiment polarity as "positive". At the same time, it assigns a high initial strength value based on the modifier "significant" (e.g., 0.8 on a scale of 0 to 1).

[0063] Step A402: Analyze the moderating effect of syntactic structure on the initial value of the emotional intensity of the emotional carrying unit, and calculate the moderated clause-level emotional intensity; It should be noted that this embodiment aims to place isolated emotional words within a dynamic sentence logic for "contextualization" to more accurately reflect the actual expressive effect of language. Here, syntactic structure refers to the grammatical framework formed by the combination and arrangement rules between words, phrases, and clauses in a sentence, such as the "concession structure" and "adversative structure" identified in the previous steps. Moderating effect refers to the fact that syntactic structure, like an "operation symbol," can change the actual effectiveness or weight of the emotion expressed by the emotional carrying units within its jurisdiction. For example, a negative word in a concession clause may have its negative intensity weakened; while a positive word in an adversative clause may have its positive intensity enhanced. Clause-level emotional intensity refers to a comprehensive emotional intensity value calculated for each logically relatively complete clause (such as a main clause or subordinate clause) in a complex sentence containing main and subordinate or parallel relationships after syntactic adjustment, thus elevating the calculation of emotional intensity from the lexical level to the syntactic level.

[0064] This embodiment leverages the deep understanding of grammar and logic provided by a large language model to establish mapping rules between syntactic structure and sentiment intensity. The model determines how the sentiment weights of parts A and B are redistributed in a specific structure, thereby dynamically correcting the obtained "initial value of basic intensity" (e.g., weakening the intensity of A and strengthening the intensity of B). This solves the problem of traditional methods treating all sentiment words in a sentence equally, achieving a precise grasp of the sentiment center of complex sentence structures, and making the calculated sentiment intensity more consistent with human reading comprehension.

[0065] Optionally, the adjustment rules are predefined and encoded. For example, when the "although...but..." structure is detected, the strength of the clause before "but" is multiplied by a down-adjustment coefficient (e.g., 0.3), and the strength of the clause after "but" is multiplied by an up-adjustment coefficient (e.g., 1.5). In addition, the system directly guides the large language model to infer and output the syntactically adjusted clause strength based on the specific context, without the need for preset fixed coefficients.

[0066] Optionally, sentiment intensity modulation is achieved through a large language model. Based on a deep joint understanding of syntactic structure and semantic content, the model autonomously infers the sentiment contribution weight of each sentiment-carrying unit at a specific syntactic position, thus completely overcoming the limitations of traditional methods that rely on preset fixed adjustment coefficients or manual empirical rules. The system guides the LLM to perform context-sensitive weight inference tasks through prompts. The model comprehensively evaluates the following multi-dimensional information: 1) the type of syntactic structure and its explicitness within the sentence; 2) the semantic strength and sentiment polarity of the sentiment-carrying unit itself; 3) the specific position of the unit in the syntactic structure (e.g., at the beginning of a subordinate clause, at the end of a main clause); 4) the relevance of the content described by the unit to the sentence's theme; and 5) expression habits specific to the financial text domain (e.g., management tends to place negative information in concessive clauses to mitigate their impact). Based on the aforementioned combined factors, the LLM dynamically and instantiately generates a moderating weight (typically ranging from 0.0 to 2.0, representing the attenuation or enhancement factor of the initial intensity value) for each sentiment-carrying unit or clause, and uses this weight to weight the initial sentiment intensity value, thereby calculating the moderated clause-level sentiment intensity. For example, the system employs an explicit weight inference strategy: the prompt explicitly requires the LLM to output a dynamic moderating weight for each identified syntactic structure and its associated sentiment-carrying unit, along with a brief explanation of the weight allocation; the system then uses this weight to weight the initial intensity value. Alternatively, the system employs an implicit end-to-end moderating strategy: it does not require the LLM to explicitly output weight values, but directly guides the model to infer the moderated clause-level sentiment intensity in one step based on the original sentence, syntactic structure labels, and the initial intensity value of the sentiment-carrying unit. In another specific implementation, the system can guide the LLM to adopt an attention mechanism visualization approach, deriving the moderating weight through the interaction intensity of sentiment-carrying units in the self-attention layer.

[0067] Step A403: Integrate the sentiment intensity of each clause and perform normalization calibration based on the overall rhetorical purpose and contextual tone of the sentences in the financial text, and output the final sentiment intensity score.

[0068] It should be noted that this embodiment aims to generate a standardized final intensity score that reflects both the internal emotional details of the sentence and is consistent with the overall expressive intent. Integration refers to merging the calculated "clause-level emotional intensities" according to their logical relationships and semantic contributions into a single value that represents the overall emotional intensity of the sentence, such as through weighted averaging or selecting the intensity of the dominant clause. Rhetorical purpose refers to the desired expressive effect achieved through the sentence, such as "emphasis," "contrast," "downplaying," or "conservative statement." Contextual tone refers to the overall emotional atmosphere created by the larger textual context (such as paragraphs or chapters) in which the sentence is located, such as "optimistic," "cautious," or "neutral." Normalization calibration is the process of adjusting the integrated intensity value according to the rhetorical purpose and contextual tone to bring it into a standard, uniform numerical range (e.g., [0.0, 1.0]) and better align it with the overall semantics. The emotional intensity score is a continuous value, and its value range represents a continuous interval from the most negative emotion to the most positive emotion.

[0069] This embodiment uses mathematical or logical methods (such as taking the maximum value or weighted sum) to merge the strength of each clause into an intermediate value; then it guides the large language model to evaluate the rhetorical purpose and contextual tone of the sentence, such as determining whether management is "positively promoting" achievements or "deliberately downplaying" risks; finally, based on high-level semantic judgment, the intermediate strength value is fine-tuned (for example, for sentences that "positively promote", their positive strength score is appropriately increased; for relatively positive sentences that appear in an overall pessimistic report, their scores are appropriately decreased) to deal with the implicit expressions and context-dependent phenomena common in financial texts.

[0070] Optionally, integration is achieved by taking the weighted average of the strengths of each clause, with the weight determined by the grammatical position of the clause in the sentence (e.g., the main clause has a higher weight); calibration is implemented through a rule-based or small neural network calibration function. Furthermore, the integration and calibration processes are completed in one go by the large language model through end-to-end inference.

[0071] In one specific implementation, the sentence contains two clauses with adjusted sentiment intensities of 0.3 (negative) and 0.9 (positive). The system (via LLM) determines that the sentence's rhetorical purpose is to "emphasize positive results after acknowledging difficulties," and the overall contextual tone is "cautiously optimistic." During integration, the main clause is given higher weight, resulting in a median intensity value of 0.8 (slightly positive). Since the context is "cautiously optimistic" rather than "extremely optimistic," the system slightly lowers the median value as calibration, ultimately outputting a sentiment intensity score of 0.75. This score reflects both the strong internal contrast and the overall cautious tone.

[0072] This application guides a large language model (LLM) to start by assessing the basic strength of sentiment-carrying units through hierarchical sentiment quantification inference. The strength is then calculated at the clause level through syntactic structure adjustment, and finally integrated and calibrated based on rhetorical purpose and contextual tone to output a refined final sentiment intensity score. This effectively solves the problems of coarse quantification and neglect of dynamic contextual influence in traditional sentiment intensity analysis. By introducing a multi-level, controlled inference and calibration mechanism, the application significantly improves the refinement, context relevance, and overall reliability of the sentiment intensity score, making it a more informative feature in downstream risk prediction models.

[0073] Furthermore, referring to Figure 5 The fifth embodiment of the text sentiment analysis method based on a large language model in this application provides a flowchart, based on the above... Figure 5 The embodiment shown further refines the step S30 of "integrating multiple preliminary sentiment analysis results based on the semantic consistency and logical conflict resolution of the large language model to generate the final sentiment analysis result" and includes steps A501 to A503: Step A501: Based on the judgment reasoning text attached to the preliminary sentiment analysis results, guide the LLM to perform semantic consistency analysis and logical conflict resolution reasoning. It should be noted that, in this embodiment, the judgment reasoning text refers to the text fragments or key phrase references that the large language model outputs along with the prompts when generating the preliminary sentiment analysis results, used to explain the basis for its specific sentiment judgment. Semantic consistency analysis refers to the process by which the system guides another or the same large language model instance to compare multiple judgment reasoning texts and evaluate their degree of overlap, complementarity, or contradiction at the semantic level (i.e., the stated facts, basis, and emphasis). Logical conflict resolution reasoning is the process of guiding the large language model to act as an "arbitrator" when semantic contradictions or different conclusions are found among multiple reasons, based on a deeper understanding of the original financial text, common sense, and financial logic, to judge the conflict and deduce which reason is more reliable and more consistent with the overall contextual logic.

[0074] In one specific implementation, for the same MD&A sentence, the preliminary results returned by the three analysis agents include the following reasoning: Reason for agency: "Highlighted 'increased market share' and 'technological leadership,' overall positive"; Agent 2's reasoning: "Acknowledging 'cost pressures,' but emphasizing in the main clause that the net effect of 'efficiency optimization' is positive"; The agent's third reason: "The frequent use of words such as 'challenge' and 'pressure' indicates a negative tone." The system guides a large language model to perform consistency analysis on the three reasons. It finds that the conclusions and reasons of Agent 1 and Agent 2 are complementary and both point to a positive outcome, but Agent 3's reason directly conflicts with them semantically. Subsequently, the system guides an LLM (Language Modeling) to perform conflict resolution reasoning. Based on a rereading of the entire sentence, the LLM may determine that Agent 3 overemphasizes local negative words while ignoring sentence structure (possibly a transition sentence), thus ruling that the reasons of Agent 1 and Agent 2 are more consistent with the overall contextual logic.

[0075] Step A502: Based on the reasoning results, generate a set of fusion weights for the multiple preliminary sentiment analysis results; It should be noted that in this embodiment, the reasoning result refers to the conclusion formed after semantic consistency analysis and logical conflict resolution, which may include, for example, the assessment of the reliability of each preliminary result, the arbitration opinions of the conflicting parties, etc. The fusion weight is a set of values, each value corresponding to a preliminary sentiment analysis result, used to represent the relative importance or credibility share that result should occupy in the final integrated decision; the sum of all weights is usually 1.

[0076] Step A503: Using the fusion weights, the sentiment tendency and sentiment intensity scores in the multiple preliminary sentiment analysis results are weighted and fused to generate the final sentiment analysis result.

[0077] It should be noted that in this embodiment, a weighted voting mechanism can be used for sentiment tendency. The sum of the weights obtained by each tendency category is compared, and the category with the largest sum is determined as the final sentiment tendency. "Weighted fusion" specifically refers to the process of taking multiple preliminary sentiment analysis results and their corresponding fusion weights as input, and generating the final sentiment analysis result through a semantic comprehensive adjudication mechanism driven by a large language model, rather than a fixed mathematical formula.

[0078] In one possible implementation, the intensity score is calculated based on a weighted arithmetic mean, ensuring that the final sentiment analysis result no longer treats each agent's output equally, but rather fully reflects the system's assessment of the differences in quality among the various outputs through advanced reasoning. Furthermore, building upon the "weight generation-numerical calculation" process, this embodiment inputs the complete reasoning conclusion text, weight values, and the preliminary sentiment analysis results along with their reasoning texts into the large language model. The LLM, based on a global semantic understanding of all the above information, directly and end-to-end determines the final sentiment tendency and sentiment intensity score.

[0079] In one possible implementation, the system employs a full-information input strategy: presenting the preliminary sentiment analysis results, the reasoning text, the generated inference conclusion text, and the explicit fusion weight values ​​to the LLM in a structured format (such as JSON), instructing it to "integrate all quantitative and qualitative information and execute the final decision." In another possible implementation, for sentiment bias decisions, the system can retain a weighted voting mechanism as a fallback strategy, but it is only triggered in exceptional circumstances such as the LLM's initial decision failure or timeout. This fallback strategy is still superior to pure numerical voting because its weights already contain semantic reasoning results. For weighted voting on sentiment bias, if the sum of the weights of two categories is the same, the bias supported by the single result with the largest weight is prioritized, or a new round of analysis is triggered.

[0080] This application guides a large language model to perform semantic consistency analysis and logical conflict resolution reasoning on the judgment reasons of multiple preliminary sentiment analysis results, and generates dynamic fusion weights accordingly. Finally, the final sentiment analysis result is produced through weighted fusion. This effectively solves the problem that traditional multi-model ensemble methods rely on simple statistical rules and cannot make optimal decisions when dealing with semantic conflicts. By introducing a dynamic weighting mechanism based on advanced semantic reasoning, the logical consistency, decision quality, and robustness to complex and ambiguous texts of the ensemble results are significantly improved.

[0081] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the text sentiment analysis method based on the large language model of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0082] This application also provides a text sentiment analysis device based on a large language model, please refer to... Figure 6 The text sentiment analysis device based on a large language model includes: Text acquisition module 10 is used to acquire financial text to be analyzed; The text parsing module 20 is used to perform multi-granularity sentiment analysis on the financial text based on preset prompts and a large language model (LLM), and output multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; The integrated processing module 30 is used to perform integrated processing on multiple preliminary sentiment analysis results based on the semantic consistency and logical conflict resolution of the large language model, and generate the final sentiment analysis result.

[0083] The text sentiment analysis device based on a large language model provided in this application, employing the text sentiment analysis method based on a large language model in the above embodiments, can solve the technical problem of how to accurately and stably quantify the true sentiment inclination of management from complex, professional, and often embellished financial texts. Compared with the prior art, the beneficial effects of the text sentiment analysis device based on a large language model provided in this application are the same as those of the text sentiment analysis method based on a large language model provided in the above embodiments, and other technical features in the text sentiment analysis device based on a large language model are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0084] This application provides a text sentiment analysis device based on a large language model. The text sentiment analysis device based on a large language model includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the text sentiment analysis method based on a large language model in the above embodiment 1.

[0085] The following is for reference. Figure 7 This document illustrates a structural diagram of a text sentiment analysis device based on a large language model suitable for implementing embodiments of this application. The text sentiment analysis device based on a large language model in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The text sentiment analysis device based on a large language model shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0086] like Figure 7As shown, a text sentiment analysis device based on a large language model may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the text sentiment analysis device based on the large language model. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the large language model-based text sentiment analysis device to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows large language model-based text sentiment analysis devices with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.

[0087] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0088] The text sentiment analysis device based on a large language model provided in this application, employing the text sentiment analysis method based on a large language model in the above embodiments, can solve the technical problem of how to accurately and stably quantify the true sentiment inclination of management from complex, professional, and often embellished financial texts. Compared with the prior art, the beneficial effects of the text sentiment analysis device based on a large language model provided in this application are the same as those of the text sentiment analysis method based on a large language model provided in the above embodiments, and other technical features of this text sentiment analysis device based on a large language model are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0089] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0090] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0091] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the text sentiment analysis method based on a large language model in the above embodiments.

[0092] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0093] The aforementioned computer-readable storage medium may be included in a text sentiment analysis device based on a large language model; or it may exist independently and not assembled into a text sentiment analysis device based on a large language model.

[0094] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a text sentiment analysis device based on a large language model (LLM), the LLM-based text sentiment analysis device: acquires the financial text to be analyzed; performs multi-granularity sentiment analysis on the financial text based on preset prompts and the LLM, and outputs multiple independent preliminary sentiment analysis results; wherein the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; and performs integrated processing on the multiple preliminary sentiment analysis results based on semantic consistency and logical conflict resolution using the LLM to generate the final sentiment analysis result.

[0095] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0097] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0098] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the aforementioned text sentiment analysis method based on a large language model. This solves the technical problem of accurately and stably quantifying the true sentiment of management from complex, professional, and often embellished financial texts. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the text sentiment analysis method based on a large language model provided in the above embodiments, and will not be repeated here.

[0099] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the text sentiment analysis method based on a large language model as described above.

[0100] The computer program product provided in this application can solve the technical problem of how to accurately and stably quantify the true sentiment of management from complex, professional, and often embellished financial texts. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the text sentiment analysis method based on a large language model provided in the above embodiments, and will not be repeated here.

[0101] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for text sentiment analysis based on a large language model, characterized in that, The text sentiment analysis method based on a large language model includes: Obtain the financial text to be analyzed; Based on preset prompts and a large language model (LLM), multi-granularity sentiment analysis is performed on the financial text using parallel reasoning and multi-path thinking, outputting multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; The initial sentiment analysis results are integrated and processed based on the semantic consistency and logical conflict resolution of the large language model to generate the final sentiment analysis result. 2.The method of claim 1, wherein, The step of obtaining the financial text to be analyzed is followed by: The financial text is cleaned to remove formatting tags, irrelevant characters, and preset templated statements to obtain intermediate text. Based on the intermediate text, the text content of the target chapter is extracted as the target analysis text. 3.The method of claim 2, wherein, The preset prompt information includes a professional role for setting up the LLM to perform financial text analysis, a task description for performing sentiment analysis on the financial text and outputting quantitative results, and a structured output format for specifying the preliminary sentiment analysis results.

4. The text sentiment analysis method based on a large language model as described in claim 3, characterized in that, The multi-granularity sentiment analysis performed on the financial text using multi-path parallel reasoning includes: The LLM is guided to identify target syntactic structures in the financial text, wherein the target syntactic structures include at least one or more of the following: concession structures, contrast structures, and comparison structures. Based on the identified target syntactic structure, the sentiment tendency in the financial text is determined.

5. The text sentiment analysis method based on a large language model as described in claim 4, characterized in that, The multi-granularity sentiment analysis performed on the financial text through multi-path parallel reasoning also includes: Guide the LLM to identify domain-specific terms in the financial text; By considering the context of the domain-specific terminology in the financial text, the sentiment tendency of the domain-specific terminology in the current context is determined.

6. The text sentiment analysis method based on a large language model as described in claim 5, characterized in that, The multi-granularity sentiment analysis performed on the financial text through multi-path parallel reasoning also includes: The LLM is guided to perform hierarchical sentiment quantification inference to evaluate the basic sentiment polarity and initial intensity of the sentiment-carrying units in the financial text. The moderating effect of syntactic structure on the initial value of the emotional intensity of the emotional carrying unit is analyzed, and the moderated clause-level emotional intensity is calculated. The sentiment intensity of each clause is integrated and normalized based on the overall rhetorical purpose and contextual tone of the sentences in the financial text, and the final sentiment intensity score is output.

7. The text sentiment analysis method based on a large language model as described in claim 6, characterized in that, The step of integrating multiple preliminary sentiment analysis results based on the semantic consistency and logical conflict resolution of the large language model to generate the final sentiment analysis result includes: Based on the judgment reasoning text attached to multiple preliminary sentiment analysis results, the LLM is guided to perform semantic consistency analysis and logical conflict resolution reasoning. Based on the reasoning results, a set of fusion weights is generated for the multiple preliminary sentiment analysis results; Using the fusion weights, the sentiment tendency and sentiment intensity scores from multiple preliminary sentiment analysis results are weighted and fused to generate the final sentiment analysis result.

8. A text sentiment analysis device based on a large language model, characterized in that, The text sentiment analysis device based on a large language model includes: The text acquisition module is used to acquire the financial text to be analyzed. The text parsing module is used to perform multi-granularity sentiment analysis on the financial text based on preset prompts and a large language model (LLM), and output multiple independent preliminary sentiment analysis results; wherein, the preliminary sentiment analysis results include at least sentiment tendency and sentiment intensity scores; An integrated processing module is used to perform integrated processing on multiple preliminary sentiment analysis results based on the semantic consistency and logical conflict resolution of the large language model, and generate the final sentiment analysis result.

9. A text sentiment analysis device based on a large language model, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the text sentiment analysis method based on a large language model as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the text sentiment analysis method based on a large language model as described in any one of claims 1 to 7.